@elicdavis/node-flow 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -4
- package/src/nodes/publisher.ts +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -359,6 +359,7 @@ declare class Publisher {
|
|
|
359
359
|
constructor(config?: PublisherConfig);
|
|
360
360
|
nodes(): Map<string, FlowNodeConfig>;
|
|
361
361
|
register(nodeType: string, config: FlowNodeConfig): void;
|
|
362
|
+
unregister(nodeType: string): boolean;
|
|
362
363
|
contextMenu(graph: NodeSubsystem, position: Vector2): ContextMenuConfig;
|
|
363
364
|
create(nodeType: string): FlowNode;
|
|
364
365
|
}
|
|
@@ -761,4 +762,4 @@ declare class WidgetFactory {
|
|
|
761
762
|
}
|
|
762
763
|
declare const GlobalWidgetFactory: WidgetFactory;
|
|
763
764
|
|
|
764
|
-
export { ButtonWidget, ColorWidget, FlowNode, type FlowNodeConfig, FlowNote, GlobalWidgetFactory, ImageWidget, NodeFlowGraph, NumberWidget, Publisher, type PublisherConfig, SliderWidget, StringWidget, Theme, ToggleWidget };
|
|
765
|
+
export { ButtonWidget, ColorWidget, FlowNode, type FlowNodeConfig, type FlowNodeGraphConfiguration, type FlowNodeStyle, type FlowNodeTitleConfig, FlowNote, GlobalWidgetFactory, type GraphRenderer, ImageWidget, NodeFlowGraph, type NodeIntersection, NodeState, NumberWidget, Publisher, type PublisherConfig, SliderWidget, StringWidget, Theme, ToggleWidget, type WidgetConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -359,6 +359,7 @@ declare class Publisher {
|
|
|
359
359
|
constructor(config?: PublisherConfig);
|
|
360
360
|
nodes(): Map<string, FlowNodeConfig>;
|
|
361
361
|
register(nodeType: string, config: FlowNodeConfig): void;
|
|
362
|
+
unregister(nodeType: string): boolean;
|
|
362
363
|
contextMenu(graph: NodeSubsystem, position: Vector2): ContextMenuConfig;
|
|
363
364
|
create(nodeType: string): FlowNode;
|
|
364
365
|
}
|
|
@@ -761,4 +762,4 @@ declare class WidgetFactory {
|
|
|
761
762
|
}
|
|
762
763
|
declare const GlobalWidgetFactory: WidgetFactory;
|
|
763
764
|
|
|
764
|
-
export { ButtonWidget, ColorWidget, FlowNode, type FlowNodeConfig, FlowNote, GlobalWidgetFactory, ImageWidget, NodeFlowGraph, NumberWidget, Publisher, type PublisherConfig, SliderWidget, StringWidget, Theme, ToggleWidget };
|
|
765
|
+
export { ButtonWidget, ColorWidget, FlowNode, type FlowNodeConfig, type FlowNodeGraphConfiguration, type FlowNodeStyle, type FlowNodeTitleConfig, FlowNote, GlobalWidgetFactory, type GraphRenderer, ImageWidget, NodeFlowGraph, type NodeIntersection, NodeState, NumberWidget, Publisher, type PublisherConfig, SliderWidget, StringWidget, Theme, ToggleWidget, type WidgetConfig };
|
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __export(index_exports, {
|
|
|
43
43
|
GlobalWidgetFactory: () => GlobalWidgetFactory,
|
|
44
44
|
ImageWidget: () => ImageWidget,
|
|
45
45
|
NodeFlowGraph: () => NodeFlowGraph,
|
|
46
|
+
NodeState: () => NodeState,
|
|
46
47
|
NumberWidget: () => NumberWidget,
|
|
47
48
|
Publisher: () => Publisher,
|
|
48
49
|
SliderWidget: () => SliderWidget,
|
|
@@ -3109,6 +3110,9 @@ var Publisher = class {
|
|
|
3109
3110
|
register(nodeType, config) {
|
|
3110
3111
|
__privateGet(this, _registeredNodes).set(nodeType, config);
|
|
3111
3112
|
}
|
|
3113
|
+
unregister(nodeType) {
|
|
3114
|
+
return __privateGet(this, _registeredNodes).delete(nodeType);
|
|
3115
|
+
}
|
|
3112
3116
|
contextMenu(graph, position) {
|
|
3113
3117
|
return __privateMethod(this, _Publisher_instances, recurseBuildMenu_fn).call(this, graph, __privateGet(this, _name3), __privateGet(this, _registeredNodes), position);
|
|
3114
3118
|
}
|
|
@@ -3873,6 +3877,12 @@ function FormPopup(config) {
|
|
|
3873
3877
|
|
|
3874
3878
|
// src/node.ts
|
|
3875
3879
|
var MINIMUM_NODE_WIDTH = 150;
|
|
3880
|
+
var NodeState = /* @__PURE__ */ ((NodeState2) => {
|
|
3881
|
+
NodeState2[NodeState2["Idle"] = 0] = "Idle";
|
|
3882
|
+
NodeState2[NodeState2["MouseOver"] = 1] = "MouseOver";
|
|
3883
|
+
NodeState2[NodeState2["Grabbed"] = 2] = "Grabbed";
|
|
3884
|
+
return NodeState2;
|
|
3885
|
+
})(NodeState || {});
|
|
3876
3886
|
var _position, _title2, _subTitle, _infoSymbol, _infoText, _input, _output, _widgets, _locked, _canEditTitle, _canEditInfo, _canEditPorts, _contextMenu2, _metadata, _onSelect, _onUnselect, _onFiledrop, _onDragStop, _titleChangeCallback, _infoChangeCallback, _titleColor, _selectedStyle, _stateStyles, _padding2, _portTextStyle, _elementSpacing, _selected, _inputPortPositions, _outputPortPositions, _widgetPositions, _data, _registeredAnyPropertyChangeCallbacks, _registeredPropertyChangeCallbacks, _FlowNode_instances, popupNodeTitleSelection_fn, popupNodeInfoSelection_fn, popupNewButtonWidget_fn, widgetSubmenu_fn, calculateStyle_fn;
|
|
3877
3887
|
var FlowNode = class {
|
|
3878
3888
|
constructor(config) {
|
|
@@ -6514,6 +6524,7 @@ renderQuickMenu_fn = function() {
|
|
|
6514
6524
|
GlobalWidgetFactory,
|
|
6515
6525
|
ImageWidget,
|
|
6516
6526
|
NodeFlowGraph,
|
|
6527
|
+
NodeState,
|
|
6517
6528
|
NumberWidget,
|
|
6518
6529
|
Publisher,
|
|
6519
6530
|
SliderWidget,
|