@kabel-project/kabel 1.0.7
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/(1.0.7)kabel.md +18 -0
- package/README.md +96 -0
- package/_READ_ME_MEDIA_/documentation/docs.md +293 -0
- package/_READ_ME_MEDIA_/workspace.png +0 -0
- package/comment-renderer/renderer.ts +228 -0
- package/controllers/base.ts +186 -0
- package/controllers/wasd.ts +132 -0
- package/docs/README.md +98 -0
- package/docs/_media/docs.md +289 -0
- package/docs/_media/index.html +168 -0
- package/docs/_media/workspace.png +0 -0
- package/docs/classes/CommentModel.md +271 -0
- package/docs/classes/CommentRenderer.md +457 -0
- package/docs/classes/ConnectableField.md +597 -0
- package/docs/classes/Connection.md +191 -0
- package/docs/classes/ContextMenuHTML.md +163 -0
- package/docs/classes/Coordinates.md +187 -0
- package/docs/classes/DropdownContainer.md +300 -0
- package/docs/classes/DummyField.md +393 -0
- package/docs/classes/Eventer.md +185 -0
- package/docs/classes/Field.md +461 -0
- package/docs/classes/InjectMsg.md +85 -0
- package/docs/classes/NodeSvg.md +1011 -0
- package/docs/classes/NumberField.md +559 -0
- package/docs/classes/OptConnectField.md +624 -0
- package/docs/classes/Renderer.md +1636 -0
- package/docs/classes/RendererConstants.md +343 -0
- package/docs/classes/Representer.md +95 -0
- package/docs/classes/RepresenterNode.md +175 -0
- package/docs/classes/TextField.md +559 -0
- package/docs/classes/Toolbox.md +172 -0
- package/docs/classes/WASDController.md +616 -0
- package/docs/classes/Widget.md +195 -0
- package/docs/classes/WorkspaceController.md +385 -0
- package/docs/classes/WorkspaceCoords.md +218 -0
- package/docs/classes/WorkspaceSvg.md +1380 -0
- package/docs/functions/clearMainWorkspace.md +20 -0
- package/docs/functions/getMainWorkspace.md +19 -0
- package/docs/functions/inject.md +35 -0
- package/docs/functions/setMainWorkspace.md +28 -0
- package/docs/globals.md +95 -0
- package/docs/interfaces/ColorStyle.md +43 -0
- package/docs/interfaces/ConnectorToFrom.md +57 -0
- package/docs/interfaces/DrawState.md +81 -0
- package/docs/interfaces/FieldConnectionData.md +25 -0
- package/docs/interfaces/FieldOptions.md +63 -0
- package/docs/interfaces/FieldRawBoxData.md +25 -0
- package/docs/interfaces/FieldVisualInfo.md +65 -0
- package/docs/interfaces/GridOptions.md +61 -0
- package/docs/interfaces/InjectOptions.md +133 -0
- package/docs/interfaces/InputFieldJson.md +50 -0
- package/docs/interfaces/KabelCommentRendering.md +31 -0
- package/docs/interfaces/KabelInterface.md +469 -0
- package/docs/interfaces/KabelNodeRendering.md +77 -0
- package/docs/interfaces/KabelUIX.md +105 -0
- package/docs/interfaces/KabelUtils.md +215 -0
- package/docs/interfaces/NodeEvents.md +42 -0
- package/docs/interfaces/NodeJson.md +104 -0
- package/docs/interfaces/NodePrototype.md +82 -0
- package/docs/interfaces/RegisteredEl.md +53 -0
- package/docs/interfaces/SerializedNode.md +128 -0
- package/docs/interfaces/TblxCategoryStruct.md +41 -0
- package/docs/interfaces/TblxFieldStruct.md +28 -0
- package/docs/interfaces/TblxNodeStruct.md +35 -0
- package/docs/interfaces/WidgetOptions.md +115 -0
- package/docs/interfaces/WidgetPrototypeList.md +15 -0
- package/docs/type-aliases/AnyField.md +13 -0
- package/docs/type-aliases/AnyFieldCls.md +13 -0
- package/docs/type-aliases/Color.md +13 -0
- package/docs/type-aliases/Connectable.md +13 -0
- package/docs/type-aliases/EventArgs.md +11 -0
- package/docs/type-aliases/EventSetupFn.md +25 -0
- package/docs/type-aliases/Hex.md +13 -0
- package/docs/type-aliases/RGBObject.md +37 -0
- package/docs/type-aliases/RGBString.md +13 -0
- package/docs/type-aliases/RGBTuple.md +13 -0
- package/docs/type-aliases/TblxObjStruct.md +52 -0
- package/docs/variables/CategoryColors.md +29 -0
- package/docs/variables/FieldMap.md +41 -0
- package/docs/variables/NodePrototypes.md +18 -0
- package/docs/variables/default.md +11 -0
- package/events/comment-drag-handle.ts +61 -0
- package/events/comment-input.ts +291 -0
- package/events/connection-line.ts +68 -0
- package/events/connector.ts +116 -0
- package/events/draggable.ts +119 -0
- package/events/events.ts +7 -0
- package/events/input-box.ts +213 -0
- package/events/node-x-btn.ts +25 -0
- package/index.d.ts +4 -0
- package/package.json +49 -0
- package/renderers/apollo/apollo.ts +21 -0
- package/renderers/apollo/constants.ts +40 -0
- package/renderers/apollo/renderer.ts +331 -0
- package/renderers/atlas/atlas.ts +15 -0
- package/renderers/constants.ts +87 -0
- package/renderers/renderer.ts +1288 -0
- package/renderers/representer-node.ts +52 -0
- package/renderers/representer.ts +25 -0
- package/src/category.ts +107 -0
- package/src/colors.ts +20 -0
- package/src/comment.ts +142 -0
- package/src/connection.ts +114 -0
- package/src/context-menu.ts +194 -0
- package/src/coordinates.ts +74 -0
- package/src/core.ts +202 -0
- package/src/ctx-menu-registry.ts +143 -0
- package/src/dropdown-menu.ts +215 -0
- package/src/field.ts +595 -0
- package/src/flyout.ts +165 -0
- package/src/fonts-manager.ts +38 -0
- package/src/grid.ts +162 -0
- package/src/headless-node.ts +27 -0
- package/src/index.ts +115 -0
- package/src/inject-headless.ts +18 -0
- package/src/inject.ts +213 -0
- package/src/main-workspace.ts +51 -0
- package/src/mutator.ts +40 -0
- package/src/node-types.ts +27 -0
- package/src/nodesvg.ts +756 -0
- package/src/prototypes.ts +9 -0
- package/src/renderer-map.ts +86 -0
- package/src/styles.css +224 -0
- package/src/toolbox.ts +125 -0
- package/src/types.ts +205 -0
- package/src/undo-redo.ts +87 -0
- package/src/visual-types.ts +29 -0
- package/src/widget-prototypes.ts +11 -0
- package/src/widget.ts +139 -0
- package/src/workspace-coords.ts +14 -0
- package/src/workspace-svg.ts +736 -0
- package/src/workspace.ts +155 -0
- package/test-server.js +61 -0
- package/themes/dark.ts +32 -0
- package/themes/default.ts +28 -0
- package/themes/themes.ts +9 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +10 -0
- package/util/emitter.ts +33 -0
- package/util/env.ts +11 -0
- package/util/escape-html.ts +22 -0
- package/util/eventer.ts +108 -0
- package/util/has-prop.ts +4 -0
- package/util/parse-color.ts +42 -0
- package/util/path.ts +99 -0
- package/util/styler.ts +41 -0
- package/util/uid.ts +184 -0
- package/util/unescape-html.ts +22 -0
- package/util/user-state.ts +68 -0
- package/util/wait-anim-frames.ts +24 -0
- package/util/window-listeners.ts +62 -0
- package/webpack.config.js +80 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
[**Kabel Project Docs v1.0.6**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[Kabel Project Docs](../globals.md) / WorkspaceCoords
|
|
6
|
+
|
|
7
|
+
# Class: WorkspaceCoords
|
|
8
|
+
|
|
9
|
+
Defined in: [src/workspace-coords.ts:9](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/workspace-coords.ts#L9)
|
|
10
|
+
|
|
11
|
+
A class that represents Workspace Camera Coords.
|
|
12
|
+
May be used in the future, right now its a no-op Coords wrapper.
|
|
13
|
+
|
|
14
|
+
## Extends
|
|
15
|
+
|
|
16
|
+
- [`Coordinates`](Coordinates.md)
|
|
17
|
+
|
|
18
|
+
## Constructors
|
|
19
|
+
|
|
20
|
+
### Constructor
|
|
21
|
+
|
|
22
|
+
> **new WorkspaceCoords**(`x`, `y`): `WorkspaceCoords`
|
|
23
|
+
|
|
24
|
+
Defined in: [src/workspace-coords.ts:10](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/workspace-coords.ts#L10)
|
|
25
|
+
|
|
26
|
+
#### Parameters
|
|
27
|
+
|
|
28
|
+
##### x
|
|
29
|
+
|
|
30
|
+
`number` = `0`
|
|
31
|
+
|
|
32
|
+
##### y
|
|
33
|
+
|
|
34
|
+
`number` = `0`
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`WorkspaceCoords`
|
|
39
|
+
|
|
40
|
+
#### Overrides
|
|
41
|
+
|
|
42
|
+
[`Coordinates`](Coordinates.md).[`constructor`](Coordinates.md#constructor)
|
|
43
|
+
|
|
44
|
+
## Properties
|
|
45
|
+
|
|
46
|
+
### x
|
|
47
|
+
|
|
48
|
+
> **x**: `number`
|
|
49
|
+
|
|
50
|
+
Defined in: [src/coordinates.ts:6](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L6)
|
|
51
|
+
|
|
52
|
+
X position
|
|
53
|
+
|
|
54
|
+
#### Inherited from
|
|
55
|
+
|
|
56
|
+
[`Coordinates`](Coordinates.md).[`x`](Coordinates.md#x)
|
|
57
|
+
|
|
58
|
+
***
|
|
59
|
+
|
|
60
|
+
### y
|
|
61
|
+
|
|
62
|
+
> **y**: `number`
|
|
63
|
+
|
|
64
|
+
Defined in: [src/coordinates.ts:8](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L8)
|
|
65
|
+
|
|
66
|
+
Y position
|
|
67
|
+
|
|
68
|
+
#### Inherited from
|
|
69
|
+
|
|
70
|
+
[`Coordinates`](Coordinates.md).[`y`](Coordinates.md#y)
|
|
71
|
+
|
|
72
|
+
## Methods
|
|
73
|
+
|
|
74
|
+
### clone()
|
|
75
|
+
|
|
76
|
+
> **clone**(): [`Coordinates`](Coordinates.md)
|
|
77
|
+
|
|
78
|
+
Defined in: [src/coordinates.ts:34](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L34)
|
|
79
|
+
|
|
80
|
+
Returns a copy of this coordinate
|
|
81
|
+
|
|
82
|
+
#### Returns
|
|
83
|
+
|
|
84
|
+
[`Coordinates`](Coordinates.md)
|
|
85
|
+
|
|
86
|
+
A new Coordinates instance with the same x and y
|
|
87
|
+
|
|
88
|
+
#### Inherited from
|
|
89
|
+
|
|
90
|
+
[`Coordinates`](Coordinates.md).[`clone`](Coordinates.md#clone)
|
|
91
|
+
|
|
92
|
+
***
|
|
93
|
+
|
|
94
|
+
### distanceTo()
|
|
95
|
+
|
|
96
|
+
> **distanceTo**(`other`): `number`
|
|
97
|
+
|
|
98
|
+
Defined in: [src/coordinates.ts:43](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L43)
|
|
99
|
+
|
|
100
|
+
Calculate the Euclidean distance to another coordinate
|
|
101
|
+
|
|
102
|
+
#### Parameters
|
|
103
|
+
|
|
104
|
+
##### other
|
|
105
|
+
|
|
106
|
+
[`Coordinates`](Coordinates.md)
|
|
107
|
+
|
|
108
|
+
The target coordinate
|
|
109
|
+
|
|
110
|
+
#### Returns
|
|
111
|
+
|
|
112
|
+
`number`
|
|
113
|
+
|
|
114
|
+
The distance as a number
|
|
115
|
+
|
|
116
|
+
#### Inherited from
|
|
117
|
+
|
|
118
|
+
[`Coordinates`](Coordinates.md).[`distanceTo`](Coordinates.md#distanceto)
|
|
119
|
+
|
|
120
|
+
***
|
|
121
|
+
|
|
122
|
+
### set()
|
|
123
|
+
|
|
124
|
+
> **set**(`x`, `y`): `void`
|
|
125
|
+
|
|
126
|
+
Defined in: [src/coordinates.ts:25](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L25)
|
|
127
|
+
|
|
128
|
+
Set the coordinates to new values
|
|
129
|
+
|
|
130
|
+
#### Parameters
|
|
131
|
+
|
|
132
|
+
##### x
|
|
133
|
+
|
|
134
|
+
`number`
|
|
135
|
+
|
|
136
|
+
The new x value
|
|
137
|
+
|
|
138
|
+
##### y
|
|
139
|
+
|
|
140
|
+
`number`
|
|
141
|
+
|
|
142
|
+
The new y value
|
|
143
|
+
|
|
144
|
+
#### Returns
|
|
145
|
+
|
|
146
|
+
`void`
|
|
147
|
+
|
|
148
|
+
#### Inherited from
|
|
149
|
+
|
|
150
|
+
[`Coordinates`](Coordinates.md).[`set`](Coordinates.md#set)
|
|
151
|
+
|
|
152
|
+
***
|
|
153
|
+
|
|
154
|
+
### toArray()
|
|
155
|
+
|
|
156
|
+
> **toArray**(): \[`number`, `number`\]
|
|
157
|
+
|
|
158
|
+
Defined in: [src/coordinates.ts:61](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L61)
|
|
159
|
+
|
|
160
|
+
Convert the coordinate to an array [x, y]
|
|
161
|
+
|
|
162
|
+
#### Returns
|
|
163
|
+
|
|
164
|
+
\[`number`, `number`\]
|
|
165
|
+
|
|
166
|
+
Tuple of numbers [x, y]
|
|
167
|
+
|
|
168
|
+
#### Inherited from
|
|
169
|
+
|
|
170
|
+
[`Coordinates`](Coordinates.md).[`toArray`](Coordinates.md#toarray)
|
|
171
|
+
|
|
172
|
+
***
|
|
173
|
+
|
|
174
|
+
### toObject()
|
|
175
|
+
|
|
176
|
+
> **toObject**(): `object`
|
|
177
|
+
|
|
178
|
+
Defined in: [src/coordinates.ts:69](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L69)
|
|
179
|
+
|
|
180
|
+
Convert the coordinate to an object { x, y }
|
|
181
|
+
|
|
182
|
+
#### Returns
|
|
183
|
+
|
|
184
|
+
`object`
|
|
185
|
+
|
|
186
|
+
Object with x and y properties
|
|
187
|
+
|
|
188
|
+
##### x
|
|
189
|
+
|
|
190
|
+
> **x**: `number`
|
|
191
|
+
|
|
192
|
+
##### y
|
|
193
|
+
|
|
194
|
+
> **y**: `number`
|
|
195
|
+
|
|
196
|
+
#### Inherited from
|
|
197
|
+
|
|
198
|
+
[`Coordinates`](Coordinates.md).[`toObject`](Coordinates.md#toobject)
|
|
199
|
+
|
|
200
|
+
***
|
|
201
|
+
|
|
202
|
+
### toString()
|
|
203
|
+
|
|
204
|
+
> **toString**(): `string`
|
|
205
|
+
|
|
206
|
+
Defined in: [src/coordinates.ts:53](https://github.com/FentFentFent/Kabel/blob/6a658c7afa967c18ecfb5cdff24af90b7d7319c3/src/coordinates.ts#L53)
|
|
207
|
+
|
|
208
|
+
Convert the coordinate to a string representation
|
|
209
|
+
|
|
210
|
+
#### Returns
|
|
211
|
+
|
|
212
|
+
`string`
|
|
213
|
+
|
|
214
|
+
A string like "(x, y)"
|
|
215
|
+
|
|
216
|
+
#### Inherited from
|
|
217
|
+
|
|
218
|
+
[`Coordinates`](Coordinates.md).[`toString`](Coordinates.md#tostring)
|