* Add distribute nodes
* Fix node alt-clone does not work like copy/paste
* Impl. emitEvent across LGraphCanvas
- Create TS types and union for all events
- Replaces all relevant dispatchEvent calls with emitEvent()
* Remove unused code
- showShowGraphOptionsPanel throws an exception when run. Safe to assume this function not in use.
- Remove old commented code
* Refactor - minor changes to clear TS errors
* Add TS types
* nit - ts-expect-error, comments
* Remove legacy hook
* Refactor - prefer typeof / instanceof / isArray
* Refactor - TS type narrowing
* nit
* nit - Format
* nit - auto const/let
* nit - Refactor / format
* Add TS types
* Replace dynamic getter/setter with class decls
* Make group move nodes param optional
* Format only
* Revert accidental change
* Fix redundant falsy check - uninit. var
* nit - Refactor const/let
* nit - Refactor const/let (manual)
* nit - Redeclared params
* Add TS types & minor refactor only
* Refactor - Clean up / reformat
- Add strings.ts helper functions
- Remove unused vars & local function params
- Simplifies code
- Rename vars for clarity
- Add TODOs and other comments
- Add ts-expect-error
* Redirect draw.ts enums to global file (temp.)
Should be revisited after TS merge complete
Corrects import of types from draw.ts into interfaces
* Add measure.ts - move util funcs from Global
* Add all imports required for TS conversion
* Refactor - TS narrowing
* nit - TS types & minor refactor
* Add missing types from recent PRs
Removes duplicate declarations
Fixes some type mismatches
* nit - Refactor recent PRs
* Revert incorrect decls backported
* Remove unused params
* Add TS types only
* Fix minor TS type coercion issues
Also removes redundant code
* nit - Refactor
* Remove @ts-nocheck
* Fix refactor regression - drag link to output
Issue was the result of fixing var declared outside of closure
* Restore original logic
---------
Co-authored-by: huchenlei <huchenlei@proton.me>
* Format only
* nit - Refactor
* Refactor & reformat only
* Refactor TS narrowing & coercion
* Remove ts-nocheck
* Fix downstream break when node id is string
* Convert litegraph.js to TS
* Overhaul static litegraph.d.ts with updated types
* Fix rename oversights and revert fix unused param
- Some functions were broken by merging updated TS function signatures which included param renames
- Removal of unused params does not belong in the TS conversion PR, and has been reverted
* Remove legacy static .d.ts file
* Add callback decl from #180
Support allowing links to widgets (#180)
c23e610c11
* Convert NodeId to string | number
Results in significantly less downstream changes, despite being a change from the old static file.
---------
Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
* ContextMenu ES6 class conversion
* Fix compat with extensions
* CurveEditor ES6 class conversion
* Split most of the LiteGraph global out to a class
* Move remainder of LiteGraph global to class file
* Remove IIFE wrapper
* Fix jest tests throwing due to type narrowing