@kabel-project/kabel 1.0.7 → 1.0.9
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/comment-renderer/renderer.d.ts +32 -0
- package/dist/comment-renderer/renderer.d.ts.map +1 -0
- package/dist/controllers/base.d.ts +39 -0
- package/dist/controllers/base.d.ts.map +1 -0
- package/dist/controllers/wasd.d.ts +33 -0
- package/dist/controllers/wasd.d.ts.map +1 -0
- package/dist/events/comment-drag-handle.d.ts +2 -0
- package/dist/events/comment-drag-handle.d.ts.map +1 -0
- package/dist/events/comment-input.d.ts +4 -0
- package/dist/events/comment-input.d.ts.map +1 -0
- package/dist/events/connection-line.d.ts +2 -0
- package/dist/events/connection-line.d.ts.map +1 -0
- package/dist/events/connector.d.ts +2 -0
- package/dist/events/connector.d.ts.map +1 -0
- package/dist/events/draggable.d.ts +2 -0
- package/dist/events/draggable.d.ts.map +1 -0
- package/{events/events.ts → dist/events/events.d.ts} +8 -7
- package/dist/events/events.d.ts.map +1 -0
- package/dist/events/input-box.d.ts +2 -0
- package/dist/events/input-box.d.ts.map +1 -0
- package/dist/events/node-x-btn.d.ts +2 -0
- package/dist/events/node-x-btn.d.ts.map +1 -0
- package/dist/kabel.js +2 -0
- package/dist/kabel.js.map +1 -0
- package/dist/renderers/apollo/apollo.d.ts +12 -0
- package/dist/renderers/apollo/apollo.d.ts.map +1 -0
- package/dist/renderers/apollo/constants.d.ts +21 -0
- package/dist/renderers/apollo/constants.d.ts.map +1 -0
- package/dist/renderers/apollo/renderer.d.ts +97 -0
- package/dist/renderers/apollo/renderer.d.ts.map +1 -0
- package/{renderers/atlas/atlas.ts → dist/renderers/atlas/atlas.d.ts} +6 -15
- package/dist/renderers/atlas/atlas.d.ts.map +1 -0
- package/dist/renderers/constants.d.ts +51 -0
- package/dist/renderers/constants.d.ts.map +1 -0
- package/dist/renderers/renderer.d.ts +470 -0
- package/dist/renderers/renderer.d.ts.map +1 -0
- package/dist/renderers/representer-node.d.ts +27 -0
- package/dist/renderers/representer-node.d.ts.map +1 -0
- package/dist/renderers/representer.d.ts +13 -0
- package/dist/renderers/representer.d.ts.map +1 -0
- package/dist/src/category.d.ts +48 -0
- package/dist/src/category.d.ts.map +1 -0
- package/{src/colors.ts → dist/src/colors.d.ts} +21 -20
- package/dist/src/colors.d.ts.map +1 -0
- package/dist/src/comment.d.ts +88 -0
- package/dist/src/comment.d.ts.map +1 -0
- package/dist/src/connection.d.ts +52 -0
- package/dist/src/connection.d.ts.map +1 -0
- package/dist/src/context-menu.d.ts +76 -0
- package/dist/src/context-menu.d.ts.map +1 -0
- package/dist/src/coordinates.d.ts +52 -0
- package/dist/src/coordinates.d.ts.map +1 -0
- package/dist/src/core.d.ts +153 -0
- package/dist/src/core.d.ts.map +1 -0
- package/dist/src/ctx-menu-registry.d.ts +22 -0
- package/dist/src/ctx-menu-registry.d.ts.map +1 -0
- package/dist/src/dropdown-menu.d.ts +87 -0
- package/dist/src/dropdown-menu.d.ts.map +1 -0
- package/dist/src/field.d.ts +305 -0
- package/dist/src/field.d.ts.map +1 -0
- package/dist/src/flyout.d.ts +41 -0
- package/dist/src/flyout.d.ts.map +1 -0
- package/dist/src/fonts-manager.d.ts +6 -0
- package/dist/src/fonts-manager.d.ts.map +1 -0
- package/dist/src/grid.d.ts +60 -0
- package/dist/src/grid.d.ts.map +1 -0
- package/dist/src/headless-node.d.ts +11 -0
- package/dist/src/headless-node.d.ts.map +1 -0
- package/dist/src/index.d.ts +38 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/inject-headless.d.ts +4 -0
- package/dist/src/inject-headless.d.ts.map +1 -0
- package/{src/inject.ts → dist/src/inject.d.ts} +142 -213
- package/dist/src/inject.d.ts.map +1 -0
- package/{src/main-workspace.ts → dist/src/main-workspace.d.ts} +31 -51
- package/dist/src/main-workspace.d.ts.map +1 -0
- package/dist/src/mutator.d.ts +2 -0
- package/dist/src/mutator.d.ts.map +1 -0
- package/{src/node-types.ts → dist/src/node-types.d.ts} +26 -27
- package/dist/src/node-types.d.ts.map +1 -0
- package/dist/src/nodesvg.d.ts +266 -0
- package/dist/src/nodesvg.d.ts.map +1 -0
- package/{src/prototypes.ts → dist/src/prototypes.d.ts} +10 -9
- package/dist/src/prototypes.d.ts.map +1 -0
- package/{src/renderer-map.ts → dist/src/renderer-map.d.ts} +51 -86
- package/dist/src/renderer-map.d.ts.map +1 -0
- package/dist/src/toolbox.d.ts +51 -0
- package/dist/src/toolbox.d.ts.map +1 -0
- package/{src/types.ts → dist/src/types.d.ts} +159 -205
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/undo-redo.d.ts +15 -0
- package/dist/src/undo-redo.d.ts.map +1 -0
- package/{src/visual-types.ts → dist/src/visual-types.d.ts} +34 -29
- package/dist/src/visual-types.d.ts.map +1 -0
- package/dist/src/widget-prototypes.d.ts +10 -0
- package/dist/src/widget-prototypes.d.ts.map +1 -0
- package/dist/src/widget.d.ts +62 -0
- package/dist/src/widget.d.ts.map +1 -0
- package/{src/workspace-coords.ts → dist/src/workspace-coords.d.ts} +10 -14
- package/dist/src/workspace-coords.d.ts.map +1 -0
- package/dist/src/workspace-svg.d.ts +371 -0
- package/dist/src/workspace-svg.d.ts.map +1 -0
- package/dist/src/workspace.d.ts +50 -0
- package/dist/src/workspace.d.ts.map +1 -0
- package/dist/themes/dark.d.ts +4 -0
- package/dist/themes/dark.d.ts.map +1 -0
- package/dist/themes/default.d.ts +4 -0
- package/dist/themes/default.d.ts.map +1 -0
- package/dist/themes/themes.d.ts +6 -0
- package/dist/themes/themes.d.ts.map +1 -0
- package/dist/util/emitter.d.ts +10 -0
- package/dist/util/emitter.d.ts.map +1 -0
- package/dist/util/env.d.ts +7 -0
- package/dist/util/env.d.ts.map +1 -0
- package/{util/escape-html.ts → dist/util/escape-html.d.ts} +16 -22
- package/dist/util/escape-html.d.ts.map +1 -0
- package/dist/util/eventer.d.ts +29 -0
- package/dist/util/eventer.d.ts.map +1 -0
- package/dist/util/has-prop.d.ts +2 -0
- package/dist/util/has-prop.d.ts.map +1 -0
- package/dist/util/parse-color.d.ts +6 -0
- package/dist/util/parse-color.d.ts.map +1 -0
- package/dist/util/path.d.ts +25 -0
- package/dist/util/path.d.ts.map +1 -0
- package/dist/util/styler.d.ts +12 -0
- package/dist/util/styler.d.ts.map +1 -0
- package/dist/util/uid.d.ts +42 -0
- package/dist/util/uid.d.ts.map +1 -0
- package/{util/unescape-html.ts → dist/util/unescape-html.d.ts} +16 -22
- package/dist/util/unescape-html.d.ts.map +1 -0
- package/dist/util/user-state.d.ts +37 -0
- package/dist/util/user-state.d.ts.map +1 -0
- package/{util/wait-anim-frames.ts → dist/util/wait-anim-frames.d.ts} +11 -24
- package/dist/util/wait-anim-frames.d.ts.map +1 -0
- package/dist/util/window-listeners.d.ts +8 -0
- package/dist/util/window-listeners.d.ts.map +1 -0
- package/package.json +5 -2
- package/(1.0.7)kabel.md +0 -18
- package/_READ_ME_MEDIA_/documentation/docs.md +0 -293
- package/_READ_ME_MEDIA_/workspace.png +0 -0
- package/comment-renderer/renderer.ts +0 -228
- package/controllers/base.ts +0 -186
- package/controllers/wasd.ts +0 -132
- package/docs/README.md +0 -98
- package/docs/_media/docs.md +0 -289
- package/docs/_media/workspace.png +0 -0
- package/docs/classes/CommentModel.md +0 -271
- package/docs/classes/CommentRenderer.md +0 -457
- package/docs/classes/ConnectableField.md +0 -597
- package/docs/classes/Connection.md +0 -191
- package/docs/classes/ContextMenuHTML.md +0 -163
- package/docs/classes/Coordinates.md +0 -187
- package/docs/classes/DropdownContainer.md +0 -300
- package/docs/classes/DummyField.md +0 -393
- package/docs/classes/Eventer.md +0 -185
- package/docs/classes/Field.md +0 -461
- package/docs/classes/InjectMsg.md +0 -85
- package/docs/classes/NodeSvg.md +0 -1011
- package/docs/classes/NumberField.md +0 -559
- package/docs/classes/OptConnectField.md +0 -624
- package/docs/classes/Renderer.md +0 -1636
- package/docs/classes/RendererConstants.md +0 -343
- package/docs/classes/Representer.md +0 -95
- package/docs/classes/RepresenterNode.md +0 -175
- package/docs/classes/TextField.md +0 -559
- package/docs/classes/Toolbox.md +0 -172
- package/docs/classes/WASDController.md +0 -616
- package/docs/classes/Widget.md +0 -195
- package/docs/classes/WorkspaceController.md +0 -385
- package/docs/classes/WorkspaceCoords.md +0 -218
- package/docs/classes/WorkspaceSvg.md +0 -1380
- package/docs/functions/clearMainWorkspace.md +0 -20
- package/docs/functions/getMainWorkspace.md +0 -19
- package/docs/functions/inject.md +0 -35
- package/docs/functions/setMainWorkspace.md +0 -28
- package/docs/globals.md +0 -95
- package/docs/interfaces/ColorStyle.md +0 -43
- package/docs/interfaces/ConnectorToFrom.md +0 -57
- package/docs/interfaces/DrawState.md +0 -81
- package/docs/interfaces/FieldConnectionData.md +0 -25
- package/docs/interfaces/FieldOptions.md +0 -63
- package/docs/interfaces/FieldRawBoxData.md +0 -25
- package/docs/interfaces/FieldVisualInfo.md +0 -65
- package/docs/interfaces/GridOptions.md +0 -61
- package/docs/interfaces/InjectOptions.md +0 -133
- package/docs/interfaces/InputFieldJson.md +0 -50
- package/docs/interfaces/KabelCommentRendering.md +0 -31
- package/docs/interfaces/KabelInterface.md +0 -469
- package/docs/interfaces/KabelNodeRendering.md +0 -77
- package/docs/interfaces/KabelUIX.md +0 -105
- package/docs/interfaces/KabelUtils.md +0 -215
- package/docs/interfaces/NodeEvents.md +0 -42
- package/docs/interfaces/NodeJson.md +0 -104
- package/docs/interfaces/NodePrototype.md +0 -82
- package/docs/interfaces/RegisteredEl.md +0 -53
- package/docs/interfaces/SerializedNode.md +0 -128
- package/docs/interfaces/TblxCategoryStruct.md +0 -41
- package/docs/interfaces/TblxFieldStruct.md +0 -28
- package/docs/interfaces/TblxNodeStruct.md +0 -35
- package/docs/interfaces/WidgetOptions.md +0 -115
- package/docs/interfaces/WidgetPrototypeList.md +0 -15
- package/docs/type-aliases/AnyField.md +0 -13
- package/docs/type-aliases/AnyFieldCls.md +0 -13
- package/docs/type-aliases/Color.md +0 -13
- package/docs/type-aliases/Connectable.md +0 -13
- package/docs/type-aliases/EventArgs.md +0 -11
- package/docs/type-aliases/EventSetupFn.md +0 -25
- package/docs/type-aliases/Hex.md +0 -13
- package/docs/type-aliases/RGBObject.md +0 -37
- package/docs/type-aliases/RGBString.md +0 -13
- package/docs/type-aliases/RGBTuple.md +0 -13
- package/docs/type-aliases/TblxObjStruct.md +0 -52
- package/docs/variables/CategoryColors.md +0 -29
- package/docs/variables/FieldMap.md +0 -41
- package/docs/variables/NodePrototypes.md +0 -18
- package/docs/variables/default.md +0 -11
- package/events/comment-drag-handle.ts +0 -61
- package/events/comment-input.ts +0 -291
- package/events/connection-line.ts +0 -68
- package/events/connector.ts +0 -116
- package/events/draggable.ts +0 -119
- package/events/input-box.ts +0 -213
- package/events/node-x-btn.ts +0 -25
- package/index.d.ts +0 -4
- package/renderers/apollo/apollo.ts +0 -21
- package/renderers/apollo/constants.ts +0 -40
- package/renderers/apollo/renderer.ts +0 -331
- package/renderers/constants.ts +0 -87
- package/renderers/renderer.ts +0 -1288
- package/renderers/representer-node.ts +0 -52
- package/renderers/representer.ts +0 -25
- package/src/category.ts +0 -107
- package/src/comment.ts +0 -142
- package/src/connection.ts +0 -114
- package/src/context-menu.ts +0 -194
- package/src/coordinates.ts +0 -74
- package/src/core.ts +0 -202
- package/src/ctx-menu-registry.ts +0 -143
- package/src/dropdown-menu.ts +0 -215
- package/src/field.ts +0 -595
- package/src/flyout.ts +0 -165
- package/src/fonts-manager.ts +0 -38
- package/src/grid.ts +0 -162
- package/src/headless-node.ts +0 -27
- package/src/index.ts +0 -115
- package/src/inject-headless.ts +0 -18
- package/src/mutator.ts +0 -40
- package/src/nodesvg.ts +0 -756
- package/src/styles.css +0 -224
- package/src/toolbox.ts +0 -125
- package/src/undo-redo.ts +0 -87
- package/src/widget-prototypes.ts +0 -11
- package/src/widget.ts +0 -139
- package/src/workspace-svg.ts +0 -736
- package/src/workspace.ts +0 -155
- package/test-server.js +0 -61
- package/themes/dark.ts +0 -32
- package/themes/default.ts +0 -28
- package/themes/themes.ts +0 -9
- package/tsconfig.json +0 -25
- package/typedoc.json +0 -10
- package/util/emitter.ts +0 -33
- package/util/env.ts +0 -11
- package/util/eventer.ts +0 -108
- package/util/has-prop.ts +0 -4
- package/util/parse-color.ts +0 -42
- package/util/path.ts +0 -99
- package/util/styler.ts +0 -41
- package/util/uid.ts +0 -184
- package/util/user-state.ts +0 -68
- package/util/window-listeners.ts +0 -62
- package/webpack.config.js +0 -80
- /package/{docs/_media → dist}/index.html +0 -0
|
@@ -1,205 +1,159 @@
|
|
|
1
|
-
import Kabel from './core';
|
|
2
|
-
import { DropdownContainer } from './dropdown-menu';
|
|
3
|
-
import WorkspaceSvg from './workspace-svg';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
/** Retrieves the main workspace instance. */
|
|
161
|
-
getMainWorkspace: typeof Kabel.getMainWorkspace;
|
|
162
|
-
|
|
163
|
-
/** Sets the main workspace instance. */
|
|
164
|
-
setMainWorkspace: typeof Kabel.setMainWorkspace;
|
|
165
|
-
|
|
166
|
-
/** NodeSVG class, represents a node in the workspace */
|
|
167
|
-
NodeSvg: typeof Kabel.NodeSvg;
|
|
168
|
-
|
|
169
|
-
/** Collection of registered node prototypes. */
|
|
170
|
-
Nodes: typeof Kabel.Nodes;
|
|
171
|
-
|
|
172
|
-
/** Collection of registered widget prototypes. */
|
|
173
|
-
Widgets: typeof Kabel.Widgets;
|
|
174
|
-
|
|
175
|
-
/** Workspace SVG class. */
|
|
176
|
-
WorkspaceSvg: typeof Kabel.WorkspaceSvg;
|
|
177
|
-
|
|
178
|
-
/** Workspace controller class which moves the workspace camera based on user interactions. */
|
|
179
|
-
WorkspaceController: typeof Kabel.WorkspaceController;
|
|
180
|
-
|
|
181
|
-
/** WASD controller for navigating the workspace. */
|
|
182
|
-
WASDController: typeof Kabel.WASDController;
|
|
183
|
-
|
|
184
|
-
/** Node rendering container, contains Renderer and RendererConstants classes */
|
|
185
|
-
nodeRendering: KabelNodeRendering;
|
|
186
|
-
/**
|
|
187
|
-
* A bunch of atlas renderer related classes.
|
|
188
|
-
*/
|
|
189
|
-
atlas: typeof Kabel.atlas;
|
|
190
|
-
/**
|
|
191
|
-
* A bunch of apollo renderer related classes
|
|
192
|
-
*/
|
|
193
|
-
apollo: typeof Kabel.apollo;
|
|
194
|
-
|
|
195
|
-
/** Comment rendering container, contains CommentModel and CommentRenderer classes. */
|
|
196
|
-
commentRendering: KabelCommentRendering;
|
|
197
|
-
|
|
198
|
-
/** The currently active main workspace instance. */
|
|
199
|
-
_mainWorkspace: WorkspaceSvg;
|
|
200
|
-
|
|
201
|
-
/** Dropdown UI singleton container. */
|
|
202
|
-
Dropdown: DropdownContainer;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export default KabelInterface;
|
|
1
|
+
import Kabel from './core';
|
|
2
|
+
import { DropdownContainer } from './dropdown-menu';
|
|
3
|
+
import WorkspaceSvg from './workspace-svg';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the UIX (UI experience utilities) portion of Kabel.
|
|
6
|
+
*/
|
|
7
|
+
export interface KabelUIX {
|
|
8
|
+
/**
|
|
9
|
+
* Event system for SVG.js elements, allowing reusable functionality and event handling.
|
|
10
|
+
*/
|
|
11
|
+
events: typeof Kabel.UIX.events;
|
|
12
|
+
/** handles loading fonts from Google fonts and possibly other CDNs in the future. */
|
|
13
|
+
FontManager: typeof Kabel.UIX.FontManager;
|
|
14
|
+
/**
|
|
15
|
+
* Stores the current state of the user.
|
|
16
|
+
*/
|
|
17
|
+
userState: typeof Kabel.UIX.userState;
|
|
18
|
+
/**
|
|
19
|
+
* window listener system.
|
|
20
|
+
*/
|
|
21
|
+
windowListeners: typeof Kabel.UIX.windowListeners;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Utility functions and classes provided by Kabel.
|
|
25
|
+
*/
|
|
26
|
+
export interface KabelUtils {
|
|
27
|
+
/** Path manipulation utilities. */
|
|
28
|
+
Path: typeof Kabel.Utils.Path;
|
|
29
|
+
/** Wait for a number of animation frames. */
|
|
30
|
+
waitFrames: typeof Kabel.Utils.waitFrames;
|
|
31
|
+
/** SVG utilities. */
|
|
32
|
+
SVG: typeof Kabel.Utils.SVG;
|
|
33
|
+
/** Parses a color string into an internal format. */
|
|
34
|
+
parseColor: typeof Kabel.Utils.parseColor;
|
|
35
|
+
/** Unique ID generation utilities. */
|
|
36
|
+
UID: typeof Kabel.Utils.UID;
|
|
37
|
+
/** Event emitter class for custom events. */
|
|
38
|
+
EventEmitter: typeof Kabel.Utils.EventEmitter;
|
|
39
|
+
/** Checks if an object has a property. */
|
|
40
|
+
hasProp: typeof Kabel.Utils.hasProp;
|
|
41
|
+
/** Styler helper functions. */
|
|
42
|
+
styler: typeof Kabel.Utils.styler;
|
|
43
|
+
/** Styler class for managing styles. */
|
|
44
|
+
Styler: typeof Kabel.Utils.Styler;
|
|
45
|
+
/** Escapes HTML for safe insertion into the DOM. */
|
|
46
|
+
escapeHTML: typeof Kabel.Utils.escapeHTML;
|
|
47
|
+
/** Unescapes HTML strings back to their original form. */
|
|
48
|
+
unescapeHTML: typeof Kabel.Utils.unescapeHTML;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Node rendering utilities and classes.
|
|
52
|
+
*/
|
|
53
|
+
export interface KabelNodeRendering {
|
|
54
|
+
/** Map of registered node renderers. */
|
|
55
|
+
rendererMap: typeof Kabel.nodeRendering.rendererMap;
|
|
56
|
+
Apollo: typeof Kabel.nodeRendering.Apollo;
|
|
57
|
+
Atlas: typeof Kabel.nodeRendering.Atlas;
|
|
58
|
+
/** Node renderer class. */
|
|
59
|
+
Renderer: typeof Kabel.nodeRendering.Renderer;
|
|
60
|
+
/** Constant class to be instantiated and used in node rendering. */
|
|
61
|
+
RendererConstants: typeof Kabel.nodeRendering.RendererConstants;
|
|
62
|
+
/**
|
|
63
|
+
* used by the renderer to create RepresenterNodes for each rendered node. (node.svg API is provided by this)
|
|
64
|
+
*/
|
|
65
|
+
Representer: typeof Kabel.nodeRendering.Representer;
|
|
66
|
+
/**
|
|
67
|
+
* Class behind node.svg API. Represents a renderer's DrawState.
|
|
68
|
+
*/
|
|
69
|
+
RepresenterNode: typeof Kabel.nodeRendering.RepresenterNode;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Comment rendering utilities and classes.
|
|
73
|
+
*/
|
|
74
|
+
export interface KabelCommentRendering {
|
|
75
|
+
/** Comment model class. */
|
|
76
|
+
CommentModel: typeof Kabel.commentRendering.CommentModel;
|
|
77
|
+
/** Comment renderer class. */
|
|
78
|
+
CommentRenderer: typeof Kabel.commentRendering.CommentRenderer;
|
|
79
|
+
}
|
|
80
|
+
/** The current environment */
|
|
81
|
+
export interface KabelEnv {
|
|
82
|
+
isBrowser: boolean;
|
|
83
|
+
isNode: boolean;
|
|
84
|
+
isWebWorker: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The main Kabel interface exposing core functionality, utilities, renderers, and UI components.
|
|
88
|
+
*/
|
|
89
|
+
export interface KabelInterface {
|
|
90
|
+
env: KabelEnv;
|
|
91
|
+
/** UI experience utilities section */
|
|
92
|
+
UIX: KabelUIX;
|
|
93
|
+
/** Context menu utilities. */
|
|
94
|
+
ContextMenu: typeof Kabel.ContextMenu;
|
|
95
|
+
/** Utility functions and classes. */
|
|
96
|
+
Utils: KabelUtils;
|
|
97
|
+
/** Widget system for creating interactive UI components. */
|
|
98
|
+
Widget: typeof Kabel.Widget;
|
|
99
|
+
/** Color categories for nodes and other UI elements. */
|
|
100
|
+
CategoryColors: typeof Kabel.CategoryColors;
|
|
101
|
+
/** Connection system for nodes. */
|
|
102
|
+
Connection: typeof Kabel.Connection;
|
|
103
|
+
/** Coordinates utility. */
|
|
104
|
+
Coordinates: typeof Kabel.Coordinates;
|
|
105
|
+
/** Base field class for node inputs. */
|
|
106
|
+
Field: typeof Kabel.Field;
|
|
107
|
+
/** Dummy field placeholder class. */
|
|
108
|
+
DummyField: typeof Kabel.DummyField;
|
|
109
|
+
/** Mapping of fields by type or ID. */
|
|
110
|
+
FieldMap: typeof Kabel.FieldMap;
|
|
111
|
+
/** Number input field for nodes. */
|
|
112
|
+
NumberField: typeof Kabel.NumberField;
|
|
113
|
+
/** Optional connection field. */
|
|
114
|
+
OptConnectField: typeof Kabel.OptConnectField;
|
|
115
|
+
/** Text input field for nodes. */
|
|
116
|
+
TextField: typeof Kabel.TextField;
|
|
117
|
+
/** Function to create a new workspace in kabel */
|
|
118
|
+
inject: typeof Kabel.inject;
|
|
119
|
+
/** Function to create a new workspace in kabel (headless) */
|
|
120
|
+
injectHeadless: typeof Kabel.injectHeadless;
|
|
121
|
+
/** Message type for injections. */
|
|
122
|
+
InjectMsg: typeof Kabel.InjectMsg;
|
|
123
|
+
/** Clears the main workspace. */
|
|
124
|
+
clearMainWorkspace: typeof Kabel.clearMainWorkspace;
|
|
125
|
+
/** Retrieves the main workspace instance. */
|
|
126
|
+
getMainWorkspace: typeof Kabel.getMainWorkspace;
|
|
127
|
+
/** Sets the main workspace instance. */
|
|
128
|
+
setMainWorkspace: typeof Kabel.setMainWorkspace;
|
|
129
|
+
/** NodeSVG class, represents a node in the workspace */
|
|
130
|
+
NodeSvg: typeof Kabel.NodeSvg;
|
|
131
|
+
/** Collection of registered node prototypes. */
|
|
132
|
+
Nodes: typeof Kabel.Nodes;
|
|
133
|
+
/** Collection of registered widget prototypes. */
|
|
134
|
+
Widgets: typeof Kabel.Widgets;
|
|
135
|
+
/** Workspace SVG class. */
|
|
136
|
+
WorkspaceSvg: typeof Kabel.WorkspaceSvg;
|
|
137
|
+
/** Workspace controller class which moves the workspace camera based on user interactions. */
|
|
138
|
+
WorkspaceController: typeof Kabel.WorkspaceController;
|
|
139
|
+
/** WASD controller for navigating the workspace. */
|
|
140
|
+
WASDController: typeof Kabel.WASDController;
|
|
141
|
+
/** Node rendering container, contains Renderer and RendererConstants classes */
|
|
142
|
+
nodeRendering: KabelNodeRendering;
|
|
143
|
+
/**
|
|
144
|
+
* A bunch of atlas renderer related classes.
|
|
145
|
+
*/
|
|
146
|
+
atlas: typeof Kabel.atlas;
|
|
147
|
+
/**
|
|
148
|
+
* A bunch of apollo renderer related classes
|
|
149
|
+
*/
|
|
150
|
+
apollo: typeof Kabel.apollo;
|
|
151
|
+
/** Comment rendering container, contains CommentModel and CommentRenderer classes. */
|
|
152
|
+
commentRendering: KabelCommentRendering;
|
|
153
|
+
/** The currently active main workspace instance. */
|
|
154
|
+
_mainWorkspace: WorkspaceSvg;
|
|
155
|
+
/** Dropdown UI singleton container. */
|
|
156
|
+
Dropdown: DropdownContainer;
|
|
157
|
+
}
|
|
158
|
+
export default KabelInterface;
|
|
159
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRo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CAAC,OAAO,CAAC;IAE9B,2BAA2B;IAC3B,YAAY,EAAE,OAAO,KAAK,CAAC,YAAY,CAAC;IAExC,8FAA8F;IAC9F,mBAAmB,EAAE,OAAO,KAAK,CAAC,mBAAmB,CAAC;IAEtD,oDAAoD;IACpD,cAAc,EAAE,OAAO,KAAK,CAAC,cAAc,CAAC;IAE5C,gFAAgF;IAChF,aAAa,EAAE,kBAAkB,CAAC;IAClC;;OAEG;IACH,KAAK,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAE5B,sFAAsF;IACtF,gBAAgB,EAAE,qBAAqB,CAAC;IAExC,oDAAoD;IACpD,cAAc,EAAE,YAAY,CAAC;IAE7B,uCAAuC;IACvC,QAAQ,EAAE,iBAAiB,CAAC;CAC/B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import WorkspaceSvg from "./workspace-svg";
|
|
2
|
+
export default class UndoRedoHistory {
|
|
3
|
+
private ws;
|
|
4
|
+
private undoStack;
|
|
5
|
+
private redoStack;
|
|
6
|
+
private isRecording;
|
|
7
|
+
constructor(ws: WorkspaceSvg);
|
|
8
|
+
emitChange(): void;
|
|
9
|
+
undo(): void;
|
|
10
|
+
redo(): void;
|
|
11
|
+
clear(): void;
|
|
12
|
+
canUndo(): boolean;
|
|
13
|
+
canRedo(): boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=undo-redo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../../src/undo-redo.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAM3C,MAAM,CAAC,OAAO,OAAO,eAAe;IACnC,OAAO,CAAC,EAAE,CAAe;IACzB,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,WAAW,CAAiB;gBAExB,EAAE,EAAE,YAAY;IAI5B,UAAU;IAWV,IAAI;IA2BJ,IAAI;IAmBJ,KAAK;IAML,OAAO;IAIP,OAAO;CAGP"}
|
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A RGB array (ex: {r: 255, g: 255, b: 255})
|
|
3
|
-
*/
|
|
4
|
-
export type RGBObject = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A RGB
|
|
11
|
-
*/
|
|
12
|
-
export type
|
|
13
|
-
/**
|
|
14
|
-
* A
|
|
15
|
-
*/
|
|
16
|
-
export type
|
|
17
|
-
/**
|
|
18
|
-
* A color
|
|
19
|
-
*/
|
|
20
|
-
export type
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A RGB array (ex: {r: 255, g: 255, b: 255})
|
|
3
|
+
*/
|
|
4
|
+
export type RGBObject = {
|
|
5
|
+
r: number;
|
|
6
|
+
g: number;
|
|
7
|
+
b: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A RGB tuple (ex: [255, 255, 255])
|
|
11
|
+
*/
|
|
12
|
+
export type RGBTuple = [number, number, number];
|
|
13
|
+
/**
|
|
14
|
+
* A RGB string (ex: '255, 255, 255')
|
|
15
|
+
*/
|
|
16
|
+
export type RGBString = `${number}, ${number}, ${number}`;
|
|
17
|
+
/**
|
|
18
|
+
* A hex color
|
|
19
|
+
*/
|
|
20
|
+
export type Hex = `#${string}`;
|
|
21
|
+
/**
|
|
22
|
+
* A color, whether it be #ffffff, {r, g, b}, 'r, g, b', or [r, g, b]
|
|
23
|
+
*/
|
|
24
|
+
export type Color = RGBObject | RGBString | RGBTuple | Hex;
|
|
25
|
+
/**
|
|
26
|
+
* Stores color data for a visual element on screen.
|
|
27
|
+
*/
|
|
28
|
+
export interface ColorStyle {
|
|
29
|
+
primary: Color;
|
|
30
|
+
secondary: Color;
|
|
31
|
+
tertiary: Color;
|
|
32
|
+
category?: string;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=visual-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-types.d.ts","sourceRoot":"","sources":["../../src/visual-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5D;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAChD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,GAAG,MAAM,KAAK,MAAM,KAAK,MAAM,EAAE,CAAC;AAC1D;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;AAC/B;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,GAAG,CAAC;AAC3D;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WidgetOptions } from "./widget";
|
|
2
|
+
/**
|
|
3
|
+
* A list of prototypes for widgets.
|
|
4
|
+
*/
|
|
5
|
+
export interface WidgetPrototypeList {
|
|
6
|
+
[key: string]: WidgetOptions;
|
|
7
|
+
}
|
|
8
|
+
declare const WidgetPrototypes: WidgetPrototypeList;
|
|
9
|
+
export default WidgetPrototypes;
|
|
10
|
+
//# sourceMappingURL=widget-prototypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-prototypes.d.ts","sourceRoot":"","sources":["../../src/widget-prototypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;CAC/B;AAED,QAAA,MAAM,gBAAgB,EAAE,mBAAwB,CAAC;AACjD,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import WorkspaceSvg from "./workspace-svg";
|
|
2
|
+
import Coordinates from "./coordinates";
|
|
3
|
+
import Workspace from "./workspace";
|
|
4
|
+
export interface WidgetOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Widget class to instantiate for the widget, by default it uses Kabel's
|
|
7
|
+
*/
|
|
8
|
+
cls?: typeof Widget;
|
|
9
|
+
/**
|
|
10
|
+
* Coordinates to spawn the widget at.
|
|
11
|
+
*/
|
|
12
|
+
coords?: Coordinates;
|
|
13
|
+
/**
|
|
14
|
+
* Width of the widget
|
|
15
|
+
*/
|
|
16
|
+
width?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Height of the widget.
|
|
19
|
+
*/
|
|
20
|
+
height?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Class to give the widget's html container.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Widget inner HTML default content.
|
|
27
|
+
*/
|
|
28
|
+
html?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Widget name
|
|
31
|
+
*/
|
|
32
|
+
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* Sets up a new widget of this type
|
|
35
|
+
* @param this - This context of the function points to widget.
|
|
36
|
+
* @param widget - The widget this function is called on.
|
|
37
|
+
* @param html - The html container of the widget.
|
|
38
|
+
* @returns - Void.
|
|
39
|
+
*/
|
|
40
|
+
init?: (this: WidgetOptions, widget: Widget, html: HTMLElement) => void;
|
|
41
|
+
}
|
|
42
|
+
declare class Widget {
|
|
43
|
+
workspace: WorkspaceSvg | Workspace;
|
|
44
|
+
container: HTMLDivElement;
|
|
45
|
+
coords: Coordinates;
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
visible: boolean;
|
|
49
|
+
name: string;
|
|
50
|
+
id: string;
|
|
51
|
+
options: WidgetOptions;
|
|
52
|
+
static WIDGET_GLOBAL_ID: number;
|
|
53
|
+
constructor(workspace: WorkspaceSvg | Workspace, options?: WidgetOptions);
|
|
54
|
+
show(): void;
|
|
55
|
+
hide(): void;
|
|
56
|
+
setCoords(coords: Coordinates): void;
|
|
57
|
+
setHTML(html: string): void;
|
|
58
|
+
reanimate(): void;
|
|
59
|
+
destroy(): void;
|
|
60
|
+
}
|
|
61
|
+
export default Widget;
|
|
62
|
+
//# sourceMappingURL=widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../src/widget.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,MAAM,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3E;AACD,cAAM,MAAM;IACR,SAAS,EAAE,YAAY,GAAC,SAAS,CAAC;IAClC,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,gBAAgB,SAAK;gBAChB,SAAS,EAAE,YAAY,GAAC,SAAS,EAAE,OAAO,GAAE,aAAkE;IAiC1H,IAAI;IAMJ,IAAI;IAMJ,SAAS,CAAC,MAAM,EAAE,WAAW;IAO7B,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,SAAS;IAsBT,OAAO;CAIV;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import Coordinates from "./coordinates";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
super(x, y);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
export default WorkspaceCoords;
|
|
1
|
+
import Coordinates from "./coordinates";
|
|
2
|
+
/**
|
|
3
|
+
* A class that represents Workspace Camera Coords.
|
|
4
|
+
* May be used in the future, right now its a no-op Coords wrapper.
|
|
5
|
+
*/
|
|
6
|
+
declare class WorkspaceCoords extends Coordinates {
|
|
7
|
+
constructor(x?: number, y?: number);
|
|
8
|
+
}
|
|
9
|
+
export default WorkspaceCoords;
|
|
10
|
+
//# sourceMappingURL=workspace-coords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-coords.d.ts","sourceRoot":"","sources":["../../src/workspace-coords.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAIxC;;;GAGG;AACH,cAAM,eAAgB,SAAQ,WAAW;gBACzB,CAAC,SAAI,EAAE,CAAC,SAAI;CAG3B;AACD,eAAe,eAAe,CAAC"}
|