### Virtual helper "slots"
Adds a virtual input and output slot to native reroutes, allowing links
to be dragged from them to other reroutes or nodes.
https://github.com/user-attachments/assets/67d308c4-4732-4b04-a2b9-0a2b0c79b413
### Notes
- Reroute slots automatically show an outline as the pointer gets close
- When the slot is clickable, it will highlight in the same colour as
the reroute
- Enables opposite direction connecting: from reroute to node outputs
- Floating reroutes only show one slot - to whichever side is not
connected
- Converts type assertions to use inference via discriminated unions
- Removes the LayoutElement class (only used by node slots, and recently
reduced to a single function)
- Splits `boundingRect` property out from `Positionable` interface
- Slots now use the standard `boundingRect` property
- Perf improvements / Removes redundant code
https://github.com/Comfy-Org/ComfyUI_frontend/pull/3323
Some widgets are only used for display purpose (The preview image
widget), their value shouldn't be serialized into the workflow. This PR
adds a flag to allow widget to skip value serialization.
This PR is the litegraph side change necessary for widget sockets
feature in ComfyUI_frontend. Changes include
- Add readonly `Widget.computedDisabled` property for getting the
computed disabled state. When the associated socket is connected, the
widget is disabled
- Dynamically show the associated socket when
- the mouse is over the widget
- the slot is valid during link drop
- the slot is connected
- Removes the legacy widget drop behavior
Ref: https://github.com/Comfy-Org/rfcs/pull/9
Currently widget needs to get access to `LGraphCanvas` instance to know
whether the canvas is rendering in low quality (Zoomed out). Usually
canvas object is obtained from `ComfyApp` instance.
This PR passes the lowQuality value to `IWidget.draw` to decouple the
dependency on `LGraphCanvas`.
- Updates UUIDv4 generator
- Adds a unique id & revision support to graphs
- `revision` to be incremented downstream (e.g. on save)
- `id` automatically assigned if not provided
- Fixes root cause of minor in-memory-only corruption when deleting
reroutes from output slots
- Already automatically corrected via serialisation
- If `reroutes` or `links` are empty arrays, removes them from newer
object-based serialised output entirely
- Minor refactors
- Removes unused code
- Fixes some serialisation types
- Adds `ReadonlyLinkNetwork` interface
Resolved issues with history due to merges, opened a new pull request.
A more visual widget that the usual number/slider. Differentiates itself
from the functionality of a slider by not setting the value on click,
only stepping, emulating an actual knob.
- Left/Right takes 1 step at a time
- Up/Down moves 1% or 1 step, whichever is larger
- Move + Shift moves by 10% or 1 step, whichever is larger
This also includes a fixes to some size logic.
- [x] ~~Still missing being able to drag the knob itself, as the
clicking of the widget is not recognized if it's outside of where a
normal height widget would be.~~

- Prefer comments above lines over end-of-line comments
- Makes auto-formatting easier
- Subjective, but it is generally easier to read in JS
- Standardises JSdoc format
- Auto-fixes for many issues (applies on save w/ESLint extension)
- Part of effort to convert LGraphNode to TS strict
- Adds some small runtime changes - no impact expected, but it is
possible
- Runtime changes are in separate commits from compile-time type changes
- Risk of downstream impact is low
* Remove downstream types
These optional type definitions were test code and should not have been upstreamed.
* Remove unnecessary workaround
Build workaround TS conversion; no longer relevant.
* Fix TS type - widget size callback