@bemedev/mind-flow 0.0.1 → 0.1.1
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/README.md +95 -0
- package/lib/helpers/createContext.d.ts +8 -11
- package/lib/helpers/createContext.d.ts.map +1 -1
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +240 -235
- package/lib/server.cjs.js +181 -121
- package/lib/server.es.js +181 -121
- package/lib/services/main.machine.d.ts +7 -9
- package/lib/services/main.machine.d.ts.map +1 -1
- package/lib/services/main.typings.d.ts +3 -3
- package/lib/services/main.typings.d.ts.map +1 -1
- package/lib/ui/Flow.d.ts +2 -2
- package/lib/ui/Flow.d.ts.map +1 -1
- package/lib/ui/components/Bounds.d.ts +4 -4
- package/lib/ui/components/Bounds.d.ts.map +1 -1
- package/lib/ui/components/EdgeComponent.d.ts +2 -2
- package/lib/ui/components/EdgeComponent.d.ts.map +1 -1
- package/lib/ui/components/EdgesBoard.d.ts +2 -2
- package/lib/ui/components/EdgesBoard.d.ts.map +1 -1
- package/lib/ui/components/FlowChart.context.d.ts +10 -18
- package/lib/ui/components/FlowChart.context.d.ts.map +1 -1
- package/lib/ui/components/FlowChart.d.ts +4 -10
- package/lib/ui/components/FlowChart.d.ts.map +1 -1
- package/lib/ui/components/FlowChart.data.d.ts +10 -11
- package/lib/ui/components/FlowChart.data.d.ts.map +1 -1
- package/lib/ui/components/NodeComponent.d.ts +2 -2
- package/lib/ui/components/NodeComponent.d.ts.map +1 -1
- package/lib/ui/components/NodesBoard.d.ts +2 -2
- package/lib/ui/components/NodesBoard.d.ts.map +1 -1
- package/lib/ui/components/classes.d.ts +2 -2
- package/package.json +3 -9
- package/src/README.md +2 -2
- package/src/helpers/createContext.ts +8 -11
- package/src/services/main.machine.ts +18 -46
- package/src/services/main.typings.ts +3 -3
- package/src/ui/Flow.tsx +3 -2
- package/src/ui/components/Bounds.tsx +35 -44
- package/src/ui/components/EdgeComponent.tsx +7 -8
- package/src/ui/components/EdgesBoard.tsx +3 -2
- package/src/ui/components/FlowChart.context.ts +75 -82
- package/src/ui/components/FlowChart.data.ts +12 -15
- package/src/ui/components/FlowChart.tsx +6 -11
- package/src/ui/components/NodeComponent.tsx +13 -25
- package/src/ui/components/NodesBoard.tsx +120 -111
- package/src/ui/components/classes.ts +2 -2
package/lib/server.es.js
CHANGED
|
@@ -10,8 +10,8 @@ import { DragDropProvider, DragDropSensors, DragOverlay, createDraggable, useDra
|
|
|
10
10
|
import { dequal as dequal$1 } from "dequal";
|
|
11
11
|
//#region src/ui/components/classes.ts
|
|
12
12
|
/**
|
|
13
|
-
* List of Tailwind CSS class names used across flowchart UI components to
|
|
14
|
-
*
|
|
13
|
+
* List of Tailwind CSS class names used across flowchart UI components to ensure
|
|
14
|
+
* compilation safelist.
|
|
15
15
|
*/
|
|
16
16
|
var CLASSES = [
|
|
17
17
|
"fill-transparent",
|
|
@@ -97,19 +97,16 @@ var CLASSES = [
|
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region src/helpers/createContext.ts
|
|
99
99
|
/**
|
|
100
|
-
* Creates a Solid context provider component and a custom hook to consume
|
|
101
|
-
* it.
|
|
100
|
+
* Creates a Solid context provider component and a custom hook to consume it.
|
|
102
101
|
*
|
|
103
|
-
* @template T - The type of the context value.
|
|
102
|
+
* @template `T` - The type of the context value.
|
|
104
103
|
*
|
|
105
|
-
* @param context - Factory function returning a non-nullable context value
|
|
106
|
-
*
|
|
107
|
-
* @param options - Optional context configuration of type
|
|
108
|
-
* {@linkcode Options}.
|
|
104
|
+
* @param context - Factory function returning a non-nullable context value of type
|
|
105
|
+
* `NonNullable<T>`.
|
|
106
|
+
* @param options - Optional context configuration of type {@linkcode Options}.
|
|
109
107
|
*
|
|
110
|
-
* @returns A tuple containing the Provider component of
|
|
111
|
-
* {@linkcode ParentComponent}, the accessor hook, and the Solid context
|
|
112
|
-
* object.
|
|
108
|
+
* @returns A tuple containing the Provider component of interface
|
|
109
|
+
* {@linkcode ParentComponent}, the accessor hook, and the Solid context object.
|
|
113
110
|
*/
|
|
114
111
|
var createContext$1 = (context, options) => {
|
|
115
112
|
const _context = createContext(context(), options);
|
|
@@ -135,7 +132,7 @@ type(({ optional, use }) => ({
|
|
|
135
132
|
input: optional(use(point)),
|
|
136
133
|
output: use(point)
|
|
137
134
|
}));
|
|
138
|
-
/** Schema definition for edge extremities */
|
|
135
|
+
/** Schema definition for edge extremities. */
|
|
139
136
|
var extremities = type({
|
|
140
137
|
from: "string",
|
|
141
138
|
to: "string"
|
|
@@ -167,8 +164,7 @@ type({
|
|
|
167
164
|
//#endregion
|
|
168
165
|
//#region src/services/main.machine.ts
|
|
169
166
|
/**
|
|
170
|
-
* Constructs a unique edge identifier string from source and destination
|
|
171
|
-
* node IDs.
|
|
167
|
+
* Constructs a unique edge identifier string from source and destination node IDs.
|
|
172
168
|
*
|
|
173
169
|
* @param out - The source node ID string.
|
|
174
170
|
* @param _in - The destination node ID string.
|
|
@@ -189,8 +185,8 @@ var buildNodeID = (generated) => {
|
|
|
189
185
|
return `node-${generated}`;
|
|
190
186
|
};
|
|
191
187
|
/**
|
|
192
|
-
* State machine managing flowchart state transitions, nodes, edges,
|
|
193
|
-
*
|
|
188
|
+
* State machine managing flowchart state transitions, nodes, edges, selection, and
|
|
189
|
+
* layout actions.
|
|
194
190
|
*/
|
|
195
191
|
var machine = createMachine({
|
|
196
192
|
initial: "idle",
|
|
@@ -207,15 +203,10 @@ var machine = createMachine({
|
|
|
207
203
|
target: "/working"
|
|
208
204
|
} },
|
|
209
205
|
working: { on: {
|
|
210
|
-
MOVE: {
|
|
211
|
-
actions: ["moveNode", "buildUI"],
|
|
212
|
-
target: "/construction"
|
|
213
|
-
},
|
|
214
206
|
MOVE_IMMEDIATE: { actions: [{
|
|
215
207
|
name: "buildImmediateUI",
|
|
216
208
|
description: "Must be in the ui"
|
|
217
209
|
}] },
|
|
218
|
-
UPDATE_UI: "/construction",
|
|
219
210
|
ADD_CHILD: {
|
|
220
211
|
actions: [
|
|
221
212
|
"generateID",
|
|
@@ -249,6 +240,10 @@ var machine = createMachine({
|
|
|
249
240
|
],
|
|
250
241
|
target: "/construction"
|
|
251
242
|
},
|
|
243
|
+
MOVE: {
|
|
244
|
+
actions: ["moveNode", "buildUI"],
|
|
245
|
+
target: "/construction"
|
|
246
|
+
},
|
|
252
247
|
ADD_EDGE: {
|
|
253
248
|
actions: ["addEdge"],
|
|
254
249
|
target: "/construction"
|
|
@@ -286,6 +281,7 @@ var machine = createMachine({
|
|
|
286
281
|
DESELECT: "never",
|
|
287
282
|
ADD_EDGE: use(extremities)
|
|
288
283
|
})),
|
|
284
|
+
sync: true,
|
|
289
285
|
pContext: type(({ union }) => ({ generatedId: union("string", "null") })),
|
|
290
286
|
context: type(({ optional, use, array }) => ({
|
|
291
287
|
data: optional({
|
|
@@ -300,8 +296,7 @@ var machine = createMachine({
|
|
|
300
296
|
}),
|
|
301
297
|
selected: optional("string"),
|
|
302
298
|
updatingUI: optional("boolean")
|
|
303
|
-
}))
|
|
304
|
-
sync: true
|
|
299
|
+
}))
|
|
305
300
|
}).provideOptions(({ assign, batch, erase }) => ({ actions: {
|
|
306
301
|
configure: batch(assign("context.data", () => ({
|
|
307
302
|
nodes: [],
|
|
@@ -385,14 +380,17 @@ var getDefaultOutputOffset = (width = 0) => ({
|
|
|
385
380
|
y: 18
|
|
386
381
|
});
|
|
387
382
|
/**
|
|
388
|
-
* Boundary padding constraints for node dragging and positioning within
|
|
389
|
-
*
|
|
383
|
+
* Boundary padding constraints for node dragging and positioning within the
|
|
384
|
+
* viewport.
|
|
390
385
|
*/
|
|
391
386
|
var BOUNDS_CONSTRAINTS = {
|
|
392
|
-
horizontal:
|
|
393
|
-
vertical:
|
|
387
|
+
horizontal: 55,
|
|
388
|
+
vertical: 40
|
|
394
389
|
};
|
|
395
|
-
/**
|
|
390
|
+
/**
|
|
391
|
+
* Default node items of type {@linkcode NodeProps} provided when no initial
|
|
392
|
+
* configuration is given.
|
|
393
|
+
*/
|
|
396
394
|
var DEFAULT_NODES = [{
|
|
397
395
|
id: "node-0",
|
|
398
396
|
data: {
|
|
@@ -408,22 +406,31 @@ var DEFAULT_NODES = [{
|
|
|
408
406
|
//#endregion
|
|
409
407
|
//#region src/ui/components/FlowChart.context.ts
|
|
410
408
|
/**
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*/
|
|
414
|
-
var service = interpret(machine, {
|
|
415
|
-
context: {},
|
|
416
|
-
pContext: { generatedId: null }
|
|
417
|
-
});
|
|
418
|
-
/**
|
|
419
|
-
* Solid Context Provider component and hook for accessing flowchart board
|
|
420
|
-
* state, services, and zoom.
|
|
409
|
+
* Solid Context Provider component and hook for accessing flowchart board state,
|
|
410
|
+
* services, and zoom.
|
|
421
411
|
*/
|
|
422
412
|
var [Provider, useFlow] = createContext$1(() => {
|
|
413
|
+
/**
|
|
414
|
+
* Shared state machine interpreter service instance for flowchart state
|
|
415
|
+
* management.
|
|
416
|
+
*/
|
|
417
|
+
const service = interpret(machine, {
|
|
418
|
+
context: {},
|
|
419
|
+
pContext: { generatedId: null }
|
|
420
|
+
});
|
|
423
421
|
const zoom = createSignal(1);
|
|
424
422
|
const newEdge = createSignal();
|
|
425
423
|
const [boardRef, setBoardRef] = createSignal();
|
|
426
424
|
const [dimensions, setDimensions] = createSignal({}, { equals: dequal });
|
|
425
|
+
/**
|
|
426
|
+
* Converts client viewport coordinates to board canvas coordinates adjusted for
|
|
427
|
+
* zoom and scroll.
|
|
428
|
+
*
|
|
429
|
+
* @param clientX - Viewport horizontal coordinate.
|
|
430
|
+
* @param clientY - Viewport vertical coordinate.
|
|
431
|
+
*
|
|
432
|
+
* @returns Board coordinate point of type {@linkcode Point}.
|
|
433
|
+
*/
|
|
427
434
|
const getBoardPoint = (clientX, clientY) => {
|
|
428
435
|
const el = boardRef();
|
|
429
436
|
if (!el) return {
|
|
@@ -433,11 +440,21 @@ var [Provider, useFlow] = createContext$1(() => {
|
|
|
433
440
|
const rect = el.getBoundingClientRect();
|
|
434
441
|
const currentZoom = zoom[0]();
|
|
435
442
|
return {
|
|
436
|
-
x:
|
|
437
|
-
y:
|
|
443
|
+
x: clientX - rect.left / currentZoom,
|
|
444
|
+
y: clientY - rect.top / currentZoom
|
|
438
445
|
};
|
|
439
446
|
};
|
|
440
447
|
const [edgesPositions, setEdgesPositions] = createSignal({}, { equals: false });
|
|
448
|
+
/**
|
|
449
|
+
* Clamps node coordinates within the visible container boundaries.
|
|
450
|
+
*
|
|
451
|
+
* @param x - Desired horizontal X coordinate.
|
|
452
|
+
* @param y - Desired vertical Y coordinate.
|
|
453
|
+
* @param nodeWidth - Width of the node element in pixels, defaults to `192`.
|
|
454
|
+
* @param nodeHeight - Height of the node element in pixels, defaults to `50`.
|
|
455
|
+
*
|
|
456
|
+
* @returns Clamped coordinate point of type {@linkcode Point}.
|
|
457
|
+
*/
|
|
441
458
|
const clampPosition = (x, y, nodeWidth = 192, nodeHeight = 50) => {
|
|
442
459
|
const container = boardRef()?.parentElement;
|
|
443
460
|
if (!container) return {
|
|
@@ -517,9 +534,7 @@ var [Provider, useFlow] = createContext$1(() => {
|
|
|
517
534
|
buildUI: batch(voidAction(({ context: { data } }) => {
|
|
518
535
|
const edges = data?.edges ?? [];
|
|
519
536
|
setEdgesPositions((data) => {
|
|
520
|
-
const array = Object.entries({ ...data }).filter(([id]) =>
|
|
521
|
-
return edges?.some((edge) => edge.id === id);
|
|
522
|
-
});
|
|
537
|
+
const array = Object.entries({ ...data }).filter(([id]) => edges.some((edge) => edge.id === id));
|
|
523
538
|
return Object.fromEntries(array);
|
|
524
539
|
});
|
|
525
540
|
}), voidAction({
|
|
@@ -638,17 +653,18 @@ var [Provider, useFlow] = createContext$1(() => {
|
|
|
638
653
|
getBoardPoint,
|
|
639
654
|
edgesPositions: [edgesPositions, setEdgesPositions],
|
|
640
655
|
service,
|
|
641
|
-
zoom
|
|
656
|
+
zoom,
|
|
657
|
+
clampPosition
|
|
642
658
|
};
|
|
643
659
|
}, { name: "FlowContext" });
|
|
644
660
|
//#endregion
|
|
645
661
|
//#region src/ui/components/Bounds.tsx
|
|
646
662
|
/**
|
|
647
|
-
* Drag boundary transformer component that clamps draggable nodes within
|
|
648
|
-
*
|
|
663
|
+
* Drag boundary transformer component that clamps draggable nodes within container
|
|
664
|
+
* scroll bounds.
|
|
649
665
|
*
|
|
650
|
-
* @returns `null` as this component performs side-effect transformer
|
|
651
|
-
*
|
|
666
|
+
* @returns `null` as this component performs side-effect transformer registrations
|
|
667
|
+
* only.
|
|
652
668
|
*/
|
|
653
669
|
var DragBounds = () => {
|
|
654
670
|
const { board: [ref], zoom: [zoom] } = useFlow();
|
|
@@ -657,23 +673,23 @@ var DragBounds = () => {
|
|
|
657
673
|
id: "clamp-to-container",
|
|
658
674
|
order: 100,
|
|
659
675
|
callback: (transform) => {
|
|
660
|
-
const container = ref()
|
|
676
|
+
const container = ref();
|
|
661
677
|
const activeDraggable = state.active.draggable;
|
|
662
678
|
if (!container || !activeDraggable) return transform;
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
const innerLeft = containerRect.left + container.clientLeft;
|
|
666
|
-
const innerTop = containerRect.top + container.clientTop;
|
|
667
|
-
const innerRight = innerLeft + container.clientWidth;
|
|
668
|
-
const innerBottom = innerTop + container.clientHeight;
|
|
679
|
+
const node = activeDraggable.node;
|
|
680
|
+
if (!node) return transform;
|
|
669
681
|
const currentZoom = zoom();
|
|
670
|
-
const
|
|
671
|
-
const
|
|
672
|
-
const
|
|
673
|
-
const
|
|
682
|
+
const minBoardX = BOUNDS_CONSTRAINTS.horizontal;
|
|
683
|
+
const maxBoardX = Math.max(minBoardX, container.clientWidth / currentZoom - node.offsetWidth - BOUNDS_CONSTRAINTS.horizontal);
|
|
684
|
+
const minBoardY = BOUNDS_CONSTRAINTS.vertical;
|
|
685
|
+
const maxBoardY = Math.max(minBoardY, container.clientHeight / currentZoom - node.offsetHeight - BOUNDS_CONSTRAINTS.vertical);
|
|
686
|
+
const minTransformX = (minBoardX - node.offsetLeft) * currentZoom;
|
|
687
|
+
const maxTransformX = (maxBoardX - node.offsetLeft) * currentZoom;
|
|
688
|
+
const minTransformY = (minBoardY - node.offsetTop) * currentZoom;
|
|
689
|
+
const maxTransformY = (maxBoardY - node.offsetTop) * currentZoom;
|
|
674
690
|
return {
|
|
675
|
-
x: Math.min(Math.max(transform.x,
|
|
676
|
-
y: Math.min(Math.max(transform.y,
|
|
691
|
+
x: Math.min(Math.max(transform.x, minTransformX), maxTransformX),
|
|
692
|
+
y: Math.min(Math.max(transform.y, minTransformY), maxTransformY)
|
|
677
693
|
};
|
|
678
694
|
}
|
|
679
695
|
};
|
|
@@ -694,7 +710,7 @@ var _tmpl$$4 = [
|
|
|
694
710
|
"\"",
|
|
695
711
|
"></path>"
|
|
696
712
|
];
|
|
697
|
-
var _tmpl$2$
|
|
713
|
+
var _tmpl$2$2 = [
|
|
698
714
|
"<g",
|
|
699
715
|
" cursor=\"pointer\" transform=\"",
|
|
700
716
|
"\" style=\"",
|
|
@@ -709,8 +725,8 @@ var _tmpl$2$1 = [
|
|
|
709
725
|
*/
|
|
710
726
|
var calculateOffset = (value) => value * 100 / 200;
|
|
711
727
|
/**
|
|
712
|
-
* Generates an SVG cubic bezier path `d` string between coordinates `(x0,
|
|
713
|
-
*
|
|
728
|
+
* Generates an SVG cubic bezier path `d` string between coordinates `(x0, y0)` and
|
|
729
|
+
* `(x1, y1)`.
|
|
714
730
|
*
|
|
715
731
|
* @param vector - Vector coordinates of type {@linkcode Vector}.
|
|
716
732
|
*
|
|
@@ -720,8 +736,8 @@ var draw = ({ x0, y0, x1, y1 }) => {
|
|
|
720
736
|
return `M ${x0} ${y0} C ${x0 + calculateOffset(Math.abs(x1 - x0))} ${y0}, ${x1 - calculateOffset(Math.abs(x1 - x0))} ${y1}, ${x1} ${y1}`;
|
|
721
737
|
};
|
|
722
738
|
/**
|
|
723
|
-
* SVG edge component rendering bezier curves and delete interaction
|
|
724
|
-
*
|
|
739
|
+
* SVG edge component rendering bezier curves and delete interaction handles for node
|
|
740
|
+
* connections.
|
|
725
741
|
*
|
|
726
742
|
* @param props - Edge properties of type {@linkcode Props}.
|
|
727
743
|
*
|
|
@@ -747,7 +763,7 @@ var EdgeComponent = (props) => {
|
|
|
747
763
|
return selected();
|
|
748
764
|
},
|
|
749
765
|
get children() {
|
|
750
|
-
return ssr(_tmpl$2$
|
|
766
|
+
return ssr(_tmpl$2$2, ssrHydrationKey(), `translate(${escape(middlePoint().x, true)}, ${escape(middlePoint().y, true)})`, ssrStyleProperty("pointer-events:", "all") + ssrStyleProperty(";z-index:", "30"));
|
|
751
767
|
}
|
|
752
768
|
})];
|
|
753
769
|
};
|
|
@@ -760,8 +776,8 @@ var _tmpl$$3 = [
|
|
|
760
776
|
"<!--/--></svg>"
|
|
761
777
|
];
|
|
762
778
|
/**
|
|
763
|
-
* SVG board overlay component that renders all active connecting edges and
|
|
764
|
-
*
|
|
779
|
+
* SVG board overlay component that renders all active connecting edges and ongoing
|
|
780
|
+
* edge creation previews.
|
|
765
781
|
*
|
|
766
782
|
* @returns The rendered SVG JSX element.
|
|
767
783
|
*/
|
|
@@ -811,13 +827,13 @@ var _tmpl$$2 = [
|
|
|
811
827
|
" class=\"cursor-pointer overflow-visible rounded-full bg-green-500 p-0.5 text-center font-bold hover:bg-green-600\" style=\"",
|
|
812
828
|
"\" viewBox=\"0 0 1024 1024\" preserveAspectRatio=\"xMaxYMax\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"white\"><g id=\"background\"><path d=\"M467.40667,277.66696c-0.05948,-14.53055 5.75527,-22.95613 -8.62044,-20.90487c-112.55699,16.0607 -222.1609,112.14558 -245.06161,239.85765c-46.52056,259.43466 231.33083,443.06705 449.51209,316.97506c117.31668,-67.80002 160.95215,-190.43324 151.34416,-288.29849c-5.92276,-60.32819 -27.80273,-107.95668 -53.44246,-144.25469l59.39269,-42.05363c111.72214,156.309 73.11535,351.55635 -25.06953,459.45565c-184.18877,202.4124 -470.46624,145.52064 -592.95027,-32.92123c-156.18269,-227.53604 -27.15324,-543.64371 261.18883,-582.44416c5.0579,-0.68061 3.56556,-7.04079 3.56442,-8.58985c-0.05594,-76.3354 -0.11021,-76.7687 1.10909,-77.24589c2.06886,-0.80969 151.41433,118.4561 151.92482,118.95524c4.65592,4.55233 -0.99548,7.829 -29.07828,30.50907c-120.49369,97.31245 -120.4977,98.55675 -123.0691,97.87586c-0.43639,-0.11555 -0.80698,-0.31322 -0.74442,-66.91571Z\"></path><path d=\"M316.61562,611.03414c0.11517,-90.16257 -0.25516,-99.92912 0.64739,-101.78856c1.56486,-3.22393 131.99102,0.91032 134.6959,-1.89763c2.21336,-2.2977 -0.59362,-129.97807 1.1376,-132.37034c0.7253,-1.00225 11.10552,-0.99175 12.07474,-0.99077c104.50336,0.10564 104.90098,-0.37811 105.967,0.85765c1.56461,1.81373 0.25596,114.18436 0.67852,129.81412c0.1322,4.88975 3.22386,3.28152 99.72028,3.4563c33.0841,0.05992 36.14259,-1.40368 36.21852,4.50462c0.11713,9.11348 1.41954,110.45369 -0.40274,113.92715c-1.81106,3.45208 -130.39967,-0.42618 -134.48289,1.62075c-2.29035,1.14816 -0.36989,101.12392 -1.11542,130.51904c-0.09548,3.76459 -2.13506,3.20617 -47.84854,3.17365c-69.30253,-0.0493 -69.31099,-0.25627 -69.65762,-0.42191c-3.77927,-1.80595 0.16287,-129.33555 -2.24266,-132.58994c-1.79931,-2.43424 -124.06108,-0.29118 -132.80252,-0.97392c-3.81102,-0.29766 -2.58229,-14.8847 -2.58758,-16.8402Z\"></path></g></svg>"
|
|
813
829
|
];
|
|
814
|
-
var _tmpl$2 = [
|
|
830
|
+
var _tmpl$2$1 = [
|
|
815
831
|
"<div",
|
|
816
832
|
" id=\"outputs\" class=\"pointer-events-none absolute top-0 z-10 flex cursor-default flex-col\" style=\"",
|
|
817
833
|
"\"><div class=\"cursor-default rounded-full bg-[#e38b29] shadow-md\" style=\"",
|
|
818
834
|
"\"></div></div>"
|
|
819
835
|
];
|
|
820
|
-
var _tmpl$3 = [
|
|
836
|
+
var _tmpl$3$1 = [
|
|
821
837
|
"<div",
|
|
822
838
|
" class=\"",
|
|
823
839
|
"\" style=\"",
|
|
@@ -843,8 +859,8 @@ var _tmpl$5 = [
|
|
|
843
859
|
"</div>"
|
|
844
860
|
];
|
|
845
861
|
/**
|
|
846
|
-
* Interactive flowchart node component supporting dragging, selection,
|
|
847
|
-
*
|
|
862
|
+
* Interactive flowchart node component supporting dragging, selection, handle
|
|
863
|
+
* connections, and child/sibling creation.
|
|
848
864
|
*
|
|
849
865
|
* @param props - Node rendering properties of type {@linkcode Props}.
|
|
850
866
|
*
|
|
@@ -854,17 +870,17 @@ var NodeComponent = (props) => {
|
|
|
854
870
|
const [ref, setRef] = createSignal();
|
|
855
871
|
const { dimensions: [dimensions, setDimensions], newEdge: [newEdge, setNewEdge], getBoardPoint, service, zoom: [zoom] } = useFlow();
|
|
856
872
|
const selected = useState(service, { selector: (s) => s.context.selected === props.id });
|
|
857
|
-
|
|
873
|
+
onMount(() => {
|
|
858
874
|
ref();
|
|
859
875
|
zoom();
|
|
860
876
|
});
|
|
861
877
|
const hasParent = useState(service, { selector: ({ context: { data } }) => {
|
|
862
878
|
const edges = data?.edges;
|
|
863
879
|
if (!edges) return false;
|
|
864
|
-
return
|
|
880
|
+
return edges.some(({ to }) => to === props.id);
|
|
865
881
|
} });
|
|
866
882
|
createDraggable(props.id);
|
|
867
|
-
return ssr(_tmpl$3, ssrHydrationKey() + ssrAttribute("id", escape(props.id, true), false), `flex flex-col absolute cursor-grab bg-white rounded-md shadow-md select-none transition-[border,box-shadow] duration-200 ease-in-out hover:shadow-lg draggable ${selected() ? "border border-[#e38c29] z-[100]" : ""} ${!selected() ? "border border-[#e6d4be] z-[1]" : ""} min-w-48`, ssrStyleProperty("top:", `${escape(props.y, true)}px`) + ssrStyleProperty(";left:", `${escape(props.x, true)}px`), `pointer-events-none absolute flex items-center justify-end -top-7.5 right-0 transition-all duration-200 ease-in-out space-x-2 ${selected() ? "w-full opacity-100" : ""} ${!selected() ? "w-0 -right-3 opacity-0 overflow-hidden" : ""}`, ssrStyleProperty("overflow:", "visible") + ssrStyleProperty(";pointer-events:", "all") + ssrStyleProperty(";width:", `${escape(12, true) * 2}px`) + ssrStyleProperty(";height:", `${escape(12, true) * 2}px`), escape(createComponent(Show, {
|
|
883
|
+
return ssr(_tmpl$3$1, ssrHydrationKey() + ssrAttribute("id", escape(props.id, true), false), `flex flex-col absolute cursor-grab bg-white rounded-md shadow-md select-none transition-[border,box-shadow] duration-200 ease-in-out hover:shadow-lg draggable ${selected() ? "border border-[#e38c29] z-[100]" : ""} ${!selected() ? "border border-[#e6d4be] z-[1]" : ""} min-w-48`, ssrStyleProperty("top:", `${escape(props.y, true)}px`) + ssrStyleProperty(";left:", `${escape(props.x, true)}px`), `pointer-events-none absolute flex items-center justify-end -top-7.5 right-0 transition-all duration-200 ease-in-out space-x-2 ${selected() ? "w-full opacity-100" : ""} ${!selected() ? "w-0 -right-3 opacity-0 overflow-hidden" : ""}`, ssrStyleProperty("overflow:", "visible") + ssrStyleProperty(";pointer-events:", "all") + ssrStyleProperty(";width:", `${escape(12, true) * 2}px`) + ssrStyleProperty(";height:", `${escape(12, true) * 2}px`), escape(createComponent(Show, {
|
|
868
884
|
get when() {
|
|
869
885
|
return hasParent();
|
|
870
886
|
},
|
|
@@ -888,7 +904,7 @@ var NodeComponent = (props) => {
|
|
|
888
904
|
return props.input || hasParent();
|
|
889
905
|
},
|
|
890
906
|
get children() {
|
|
891
|
-
return ssr(_tmpl$2, ssrHydrationKey(), ssrStyleProperty("left:", `-${escape(18, true)}px`), ssrStyleProperty("width:", `${escape(12, true)}px`) + ssrStyleProperty(";height:", `${escape(12, true)}px`) + ssrStyleProperty(";margin-top:", `${escape(12, true)}px`) + ssrStyleProperty(";pointer-events:", "all"));
|
|
907
|
+
return ssr(_tmpl$2$1, ssrHydrationKey(), ssrStyleProperty("left:", `-${escape(18, true)}px`), ssrStyleProperty("width:", `${escape(12, true)}px`) + ssrStyleProperty(";height:", `${escape(12, true)}px`) + ssrStyleProperty(";margin-top:", `${escape(12, true)}px`) + ssrStyleProperty(";pointer-events:", "all"));
|
|
892
908
|
}
|
|
893
909
|
})), ssrStyleProperty("right:", `-${escape(18, true)}px`), ssrStyleProperty("width:", `${escape(12, true)}px`) + ssrStyleProperty(";height:", `${escape(12, true)}px`) + ssrStyleProperty(";margin-top:", `${escape(12, true)}px`) + ssrStyleProperty(";pointer-events:", "all"));
|
|
894
910
|
};
|
|
@@ -896,22 +912,33 @@ var NodeComponent = (props) => {
|
|
|
896
912
|
//#region src/ui/components/NodesBoard.tsx
|
|
897
913
|
var _tmpl$$1 = [
|
|
898
914
|
"<div",
|
|
899
|
-
" class=\"relative
|
|
900
|
-
"<!--/--><!--$-->",
|
|
915
|
+
" class=\"relative h-full w-full overflow-scroll rounded-lg border-2 border-gray-600\"><!--$-->",
|
|
901
916
|
"<!--/--><div class=\"",
|
|
902
917
|
"\" style=\"",
|
|
918
|
+
"\"><div class=\"relative h-full w-full\" style=\"",
|
|
903
919
|
"\"><!--$-->",
|
|
904
920
|
"<!--/--><!--$-->",
|
|
905
|
-
"
|
|
906
|
-
"
|
|
921
|
+
"<!--/--><!--$-->",
|
|
922
|
+
"<!--/--></div></div></div>"
|
|
923
|
+
];
|
|
924
|
+
var _tmpl$2 = [
|
|
925
|
+
"<div",
|
|
926
|
+
" class=\"absolute right-4 bottom-4 z-50 flex items-center gap-2 rounded-xl border border-gray-200 bg-white/90 p-2 shadow-lg backdrop-blur-md\"><button type=\"button\" class=\"flex size-9 cursor-pointer items-center justify-center rounded-lg bg-gray-100 text-lg font-bold text-gray-700 shadow-sm transition-all duration-150 hover:bg-gray-200 active:scale-95\" title=\"Zoom out\" aria-label=\"Zoom out\">-</button><button type=\"button\" class=\"h-9 cursor-pointer rounded-lg px-2 text-xs font-semibold text-gray-700 transition-colors hover:bg-gray-100\" title=\"Reset zoom\" aria-label=\"Reset zoom\"><!--$-->",
|
|
927
|
+
"<!--/-->%</button><button type=\"button\" class=\"flex size-9 cursor-pointer items-center justify-center rounded-lg bg-gray-100 text-lg font-bold text-gray-700 shadow-sm transition-all duration-150 hover:bg-gray-200 active:scale-95\" title=\"Zoom in\" aria-label=\"Zoom in\">+</button><div class=\"h-5 w-px bg-gray-300\"></div><button type=\"button\" class=\"flex size-9 cursor-pointer items-center justify-center rounded-lg bg-blue-600 text-white shadow transition-all duration-150 hover:bg-blue-700 active:scale-95\" title=\"Add parent node\" aria-label=\"Add parent node\"><svg class=\"size-5\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path></svg></button></div>"
|
|
928
|
+
];
|
|
929
|
+
var _tmpl$3 = [
|
|
930
|
+
"<div",
|
|
931
|
+
" class=\"relative mx-auto h-[calc(100vh-64px)] w-[calc(100vw-32px)] overflow-hidden\">",
|
|
932
|
+
"</div>"
|
|
907
933
|
];
|
|
908
934
|
/**
|
|
909
|
-
* Interactive board component containing the drag-drop viewport, zoom
|
|
910
|
-
*
|
|
935
|
+
* Interactive board component containing the drag-drop viewport, zoom controls,
|
|
936
|
+
* panning gestures, and rendered nodes/edges.
|
|
911
937
|
*
|
|
912
938
|
* @returns The rendered Solid component.
|
|
913
939
|
*/
|
|
914
940
|
var NodesBoard = () => {
|
|
941
|
+
let containerRef;
|
|
915
942
|
const [isPanning, setIsPanning] = createSignal(false);
|
|
916
943
|
const [transform, setTransform] = createSignal({
|
|
917
944
|
x: 0,
|
|
@@ -919,11 +946,23 @@ var NodesBoard = () => {
|
|
|
919
946
|
});
|
|
920
947
|
const [id, setId] = createSignal("");
|
|
921
948
|
const [previousZoom, setPreviousZoom] = createSignal();
|
|
922
|
-
let
|
|
923
|
-
|
|
949
|
+
let percentX = 0;
|
|
950
|
+
let percentY = 0;
|
|
924
951
|
const { board: [, setRef], service, newEdge: [newEdge], zoom: [zoom, setZoom] } = useFlow();
|
|
925
|
-
createEffect(on(zoom, () => {
|
|
952
|
+
createEffect(on(zoom, () => {
|
|
953
|
+
const maxScrollX = containerRef.scrollWidth - containerRef.clientWidth;
|
|
954
|
+
const maxScrollY = containerRef.scrollHeight - containerRef.clientHeight;
|
|
955
|
+
if (maxScrollX > 0) containerRef.scrollLeft = percentX * maxScrollX;
|
|
956
|
+
if (maxScrollY > 0) containerRef.scrollTop = percentY * maxScrollY;
|
|
957
|
+
}, { defer: true }));
|
|
926
958
|
const selectedId = useState(service, { selector: (s) => s.context?.selected });
|
|
959
|
+
/**
|
|
960
|
+
* Determines whether the given element ID matches the currently selected entity.
|
|
961
|
+
*
|
|
962
|
+
* @param id - The node or edge identifier to check.
|
|
963
|
+
*
|
|
964
|
+
* @returns `true` if the item is currently selected, otherwise `false`.
|
|
965
|
+
*/
|
|
927
966
|
const selected = (id) => selectedId() === id;
|
|
928
967
|
const nodes = useState(service, {
|
|
929
968
|
selector: (s) => {
|
|
@@ -938,21 +977,27 @@ var NodesBoard = () => {
|
|
|
938
977
|
},
|
|
939
978
|
equals: dequal$1
|
|
940
979
|
});
|
|
941
|
-
const
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
}
|
|
946
|
-
return createComponent(DragDropProvider, {
|
|
947
|
-
onDragMove: ({ draggable: { transform: _transform, node, id }
|
|
980
|
+
const CANVAS_SIZE = 500;
|
|
981
|
+
const MARGIN_X = 265;
|
|
982
|
+
const MARGIN_Y = 425;
|
|
983
|
+
const cWidth = () => `calc((${CANVAS_SIZE}vw - ${MARGIN_X}px) * ${zoom()})`;
|
|
984
|
+
const cHeight = () => `calc((${CANVAS_SIZE}vh - ${MARGIN_Y}px) * ${zoom()})`;
|
|
985
|
+
return ssr(_tmpl$3, ssrHydrationKey(), escape(createComponent(DragDropProvider, {
|
|
986
|
+
onDragMove: ({ draggable: { transform: _transform, node, id } }) => {
|
|
948
987
|
setId(id);
|
|
949
988
|
if (selected(id)) {
|
|
950
|
-
const
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
const
|
|
955
|
-
const
|
|
989
|
+
const grandParent = node.parentElement?.parentElement;
|
|
990
|
+
const currentZoom = zoom();
|
|
991
|
+
const minX = 0;
|
|
992
|
+
const maxX = grandParent ? Math.max(0, grandParent.clientWidth / currentZoom - node.offsetWidth) : Infinity;
|
|
993
|
+
const minY = 0;
|
|
994
|
+
const maxY = grandParent ? Math.max(0, grandParent.clientHeight / currentZoom - node.offsetHeight) : Infinity;
|
|
995
|
+
const targetX = node.offsetLeft + _transform.x / currentZoom;
|
|
996
|
+
const targetY = node.offsetTop + _transform.y / currentZoom;
|
|
997
|
+
const x = Math.min(Math.max(targetX, minX), maxX);
|
|
998
|
+
const y = Math.min(Math.max(targetY, minY), maxY);
|
|
999
|
+
const deltaX = x - node.offsetLeft;
|
|
1000
|
+
const deltaY = y - node.offsetTop;
|
|
956
1001
|
node.style.setProperty("transform", `translate3d(${deltaX}px, ${deltaY}px, 0)`);
|
|
957
1002
|
service.send({
|
|
958
1003
|
type: "MOVE_IMMEDIATE",
|
|
@@ -962,13 +1007,24 @@ var NodesBoard = () => {
|
|
|
962
1007
|
y
|
|
963
1008
|
}
|
|
964
1009
|
});
|
|
965
|
-
setTransform({
|
|
1010
|
+
setTransform({
|
|
1011
|
+
x: deltaX * currentZoom,
|
|
1012
|
+
y: deltaY * currentZoom
|
|
1013
|
+
});
|
|
966
1014
|
}
|
|
967
1015
|
},
|
|
968
1016
|
onDragEnd: ({ draggable: { node, id } }) => {
|
|
969
1017
|
if (!selected(id)) return;
|
|
970
|
-
const
|
|
971
|
-
const
|
|
1018
|
+
const grandParent = node.parentElement?.parentElement;
|
|
1019
|
+
const currentZoom = zoom();
|
|
1020
|
+
const minX = 0;
|
|
1021
|
+
const maxX = grandParent ? Math.max(0, grandParent.clientWidth / currentZoom - node.offsetWidth) : Infinity;
|
|
1022
|
+
const minY = 0;
|
|
1023
|
+
const maxY = grandParent ? Math.max(0, grandParent.clientHeight / currentZoom - node.offsetHeight) : Infinity;
|
|
1024
|
+
const rawX = node.offsetLeft + transform().x / currentZoom;
|
|
1025
|
+
const rawY = node.offsetTop + transform().y / currentZoom;
|
|
1026
|
+
const X = Math.min(Math.max(rawX, minX), maxX);
|
|
1027
|
+
const Y = Math.min(Math.max(rawY, minY), maxY);
|
|
972
1028
|
node.style.setProperty("top", Y + "px");
|
|
973
1029
|
node.style.setProperty("left", X + "px");
|
|
974
1030
|
node.style.removeProperty("transform");
|
|
@@ -988,21 +1044,25 @@ var NodesBoard = () => {
|
|
|
988
1044
|
}, 0);
|
|
989
1045
|
},
|
|
990
1046
|
get children() {
|
|
991
|
-
return [
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1047
|
+
return [
|
|
1048
|
+
ssr(_tmpl$$1, ssrHydrationKey(), escape(createComponent(DragDropSensors, {})), `relative cursor-crosshair overflow-hidden ${isPanning() ? "cursor-grabbing" : ""}`, ssrStyleProperty("height:", escape(cHeight(), true)) + ssrStyleProperty(";width:", escape(cWidth(), true)), ssrStyleProperty("scale:", escape(zoom(), true)) + ssrStyleProperty(";transform-origin:", "top left"), escape(createComponent(DragBounds, {})), escape(createComponent(EdgesBoard, {})), escape(createComponent(For, {
|
|
1049
|
+
get each() {
|
|
1050
|
+
return nodes();
|
|
1051
|
+
},
|
|
1052
|
+
children: NodeComponent
|
|
1053
|
+
}))),
|
|
1054
|
+
ssr(_tmpl$2, ssrHydrationKey(), escape(Math.round(zoom() * 100))),
|
|
1055
|
+
createComponent(Show, {
|
|
1056
|
+
get when() {
|
|
1057
|
+
return !id() || !selected(id());
|
|
1058
|
+
},
|
|
1059
|
+
get children() {
|
|
1060
|
+
return createComponent(DragOverlay, { children: "" });
|
|
1061
|
+
}
|
|
1062
|
+
})
|
|
1063
|
+
];
|
|
1004
1064
|
}
|
|
1005
|
-
});
|
|
1065
|
+
})));
|
|
1006
1066
|
};
|
|
1007
1067
|
//#endregion
|
|
1008
1068
|
//#region src/ui/components/FlowChart.tsx
|
|
@@ -1013,8 +1073,8 @@ var _tmpl$ = [
|
|
|
1013
1073
|
"</div></div>"
|
|
1014
1074
|
];
|
|
1015
1075
|
/**
|
|
1016
|
-
* Flowchart board canvas component that renders interactive nodes, edges,
|
|
1017
|
-
*
|
|
1076
|
+
* Flowchart board canvas component that renders interactive nodes, edges, pan/zoom,
|
|
1077
|
+
* and toolbar controls.
|
|
1018
1078
|
*
|
|
1019
1079
|
* @param props - Flowchart configuration and event handlers of type
|
|
1020
1080
|
* {@linkcode FlowProps}.
|
|
@@ -1041,8 +1101,8 @@ var FlowChart = (props) => {
|
|
|
1041
1101
|
//#endregion
|
|
1042
1102
|
//#region src/ui/Flow.tsx
|
|
1043
1103
|
/**
|
|
1044
|
-
* Root Flow component wrapping the {@linkcode FlowChart} inside the flow
|
|
1045
|
-
*
|
|
1104
|
+
* Root Flow component wrapping the {@linkcode FlowChart} inside the flow context
|
|
1105
|
+
* provider.
|
|
1046
1106
|
*
|
|
1047
1107
|
* @param props - Flow chart configuration and callbacks of type
|
|
1048
1108
|
* {@linkcode FlowProps}.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Constructs a unique edge identifier string from source and destination
|
|
3
|
-
* node IDs.
|
|
2
|
+
* Constructs a unique edge identifier string from source and destination node IDs.
|
|
4
3
|
*
|
|
5
4
|
* @param out - The source node ID string.
|
|
6
5
|
* @param _in - The destination node ID string.
|
|
@@ -17,8 +16,8 @@ export declare const buildEdgeId: (out: string, _in: string) => string;
|
|
|
17
16
|
*/
|
|
18
17
|
export declare const buildNodeID: (generated?: string | null) => string;
|
|
19
18
|
/**
|
|
20
|
-
* State machine managing flowchart state transitions, nodes, edges,
|
|
21
|
-
*
|
|
19
|
+
* State machine managing flowchart state transitions, nodes, edges, selection, and
|
|
20
|
+
* layout actions.
|
|
22
21
|
*/
|
|
23
22
|
export declare const machine: import('@bemedev/app').SyncMachine<{
|
|
24
23
|
readonly initial: "idle";
|
|
@@ -40,17 +39,12 @@ export declare const machine: import('@bemedev/app').SyncMachine<{
|
|
|
40
39
|
};
|
|
41
40
|
readonly working: {
|
|
42
41
|
readonly on: {
|
|
43
|
-
readonly MOVE: {
|
|
44
|
-
readonly actions: readonly ["moveNode", "buildUI"];
|
|
45
|
-
readonly target: "/construction";
|
|
46
|
-
};
|
|
47
42
|
readonly MOVE_IMMEDIATE: {
|
|
48
43
|
readonly actions: readonly [{
|
|
49
44
|
readonly name: "buildImmediateUI";
|
|
50
45
|
readonly description: "Must be in the ui";
|
|
51
46
|
}];
|
|
52
47
|
};
|
|
53
|
-
readonly UPDATE_UI: "/construction";
|
|
54
48
|
readonly ADD_CHILD: {
|
|
55
49
|
readonly actions: readonly ["generateID", {
|
|
56
50
|
readonly name: "placeChild";
|
|
@@ -72,6 +66,10 @@ export declare const machine: import('@bemedev/app').SyncMachine<{
|
|
|
72
66
|
}, "linkSibling"];
|
|
73
67
|
readonly target: "/construction";
|
|
74
68
|
};
|
|
69
|
+
readonly MOVE: {
|
|
70
|
+
readonly actions: readonly ["moveNode", "buildUI"];
|
|
71
|
+
readonly target: "/construction";
|
|
72
|
+
};
|
|
75
73
|
readonly ADD_EDGE: {
|
|
76
74
|
readonly actions: readonly ["addEdge"];
|
|
77
75
|
readonly target: "/construction";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.machine.d.ts","sourceRoot":"","sources":["../../src/services/main.machine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.machine.d.ts","sourceRoot":"","sources":["../../src/services/main.machine.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,KAAK,MAAM,WAEnD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,YAAY,MAAM,GAAG,IAAI,WAEpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyLjB,CAAC"}
|
|
@@ -17,7 +17,7 @@ export declare const nodeOffset: import('@bemedev/typings').inferSh<{
|
|
|
17
17
|
y: "number";
|
|
18
18
|
};
|
|
19
19
|
}>;
|
|
20
|
-
/** Schema definition for edge extremities */
|
|
20
|
+
/** Schema definition for edge extremities. */
|
|
21
21
|
export declare const extremities: import('@bemedev/typings').inferSh<{
|
|
22
22
|
from: "string";
|
|
23
23
|
to: "string";
|
|
@@ -54,8 +54,8 @@ export declare const dimensions: import('@bemedev/typings').inferSh<{
|
|
|
54
54
|
}>;
|
|
55
55
|
}>;
|
|
56
56
|
/**
|
|
57
|
-
* Schema definition for a 2D line vector representing edge coordinates
|
|
58
|
-
* `(
|
|
57
|
+
* Schema definition for a 2D line vector representing edge coordinates `(x0, y0)` to
|
|
58
|
+
* `(x1, y1)`.
|
|
59
59
|
*/
|
|
60
60
|
export declare const vector: import('@bemedev/typings').inferSh<{
|
|
61
61
|
x0: "number";
|