@bemedev/mind-flow 0.0.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.
Files changed (50) hide show
  1. package/lib/helpers/createContext.d.ts +21 -0
  2. package/lib/helpers/createContext.d.ts.map +1 -0
  3. package/lib/index.cjs.js +1 -0
  4. package/lib/index.d.ts +4 -0
  5. package/lib/index.d.ts.map +1 -0
  6. package/lib/index.es.js +859 -0
  7. package/lib/output.css +2 -0
  8. package/lib/server.cjs.js +1058 -0
  9. package/lib/server.es.js +1056 -0
  10. package/lib/services/main.machine.d.ts +1198 -0
  11. package/lib/services/main.machine.d.ts.map +1 -0
  12. package/lib/services/main.typings.d.ts +68 -0
  13. package/lib/services/main.typings.d.ts.map +1 -0
  14. package/lib/ui/Flow.d.ts +13 -0
  15. package/lib/ui/Flow.d.ts.map +1 -0
  16. package/lib/ui/components/Bounds.d.ts +10 -0
  17. package/lib/ui/components/Bounds.d.ts.map +1 -0
  18. package/lib/ui/components/EdgeComponent.d.ts +20 -0
  19. package/lib/ui/components/EdgeComponent.d.ts.map +1 -0
  20. package/lib/ui/components/EdgesBoard.d.ts +9 -0
  21. package/lib/ui/components/EdgesBoard.d.ts.map +1 -0
  22. package/lib/ui/components/FlowChart.context.d.ts +1228 -0
  23. package/lib/ui/components/FlowChart.context.d.ts.map +1 -0
  24. package/lib/ui/components/FlowChart.d.ts +63 -0
  25. package/lib/ui/components/FlowChart.d.ts.map +1 -0
  26. package/lib/ui/components/FlowChart.data.d.ts +67 -0
  27. package/lib/ui/components/FlowChart.data.d.ts.map +1 -0
  28. package/lib/ui/components/NodeComponent.d.ts +34 -0
  29. package/lib/ui/components/NodeComponent.d.ts.map +1 -0
  30. package/lib/ui/components/NodesBoard.d.ts +9 -0
  31. package/lib/ui/components/NodesBoard.d.ts.map +1 -0
  32. package/lib/ui/components/classes.d.ts +6 -0
  33. package/lib/ui/components/classes.d.ts.map +1 -0
  34. package/package.json +146 -0
  35. package/src/README.md +36 -0
  36. package/src/helpers/createContext.ts +37 -0
  37. package/src/index.ts +3 -0
  38. package/src/input.css +15 -0
  39. package/src/services/main.machine.ts +247 -0
  40. package/src/services/main.typings.ts +50 -0
  41. package/src/ui/Flow.tsx +18 -0
  42. package/src/ui/components/Bounds.tsx +87 -0
  43. package/src/ui/components/EdgeComponent.tsx +106 -0
  44. package/src/ui/components/EdgesBoard.tsx +56 -0
  45. package/src/ui/components/FlowChart.context.ts +373 -0
  46. package/src/ui/components/FlowChart.data.ts +89 -0
  47. package/src/ui/components/FlowChart.tsx +112 -0
  48. package/src/ui/components/NodeComponent.tsx +288 -0
  49. package/src/ui/components/NodesBoard.tsx +298 -0
  50. package/src/ui/components/classes.ts +85 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.machine.d.ts","sourceRoot":"","sources":["../../src/services/main.machine.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqNjB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { inferT } from '@bemedev/app/typings';
2
+ /** Schema definition for 2D coordinates `(x, y)`. */
3
+ export declare const point: import('@bemedev/typings').inferSh<{
4
+ x: "number";
5
+ y: "number";
6
+ }>;
7
+ /** 2D coordinate point type inferred from schema {@linkcode point}. */
8
+ export type Point = inferT<typeof point>;
9
+ /** Schema definition for node handle offsets (input and output). */
10
+ export declare const nodeOffset: import('@bemedev/typings').inferSh<{
11
+ input: import('@bemedev/typings').Optional<{
12
+ x: "number";
13
+ y: "number";
14
+ }>;
15
+ output: {
16
+ x: "number";
17
+ y: "number";
18
+ };
19
+ }>;
20
+ /** Schema definition for edge extremities */
21
+ export declare const extremities: import('@bemedev/typings').inferSh<{
22
+ from: "string";
23
+ to: "string";
24
+ }>;
25
+ /** Schema definition for a serialized flowchart node entity. */
26
+ export declare const nodeJSON: import('@bemedev/typings').inferSh<{
27
+ position: {
28
+ x: "number";
29
+ y: "number";
30
+ };
31
+ data: {
32
+ label: import('@bemedev/typings').Optional<"string">;
33
+ content: "string";
34
+ };
35
+ input: "boolean";
36
+ }>;
37
+ /** Schema definition for a serialized flowchart edge entity. */
38
+ export declare const edgeJSON: import('@bemedev/typings').inferSh<{
39
+ from: "string";
40
+ to: "string";
41
+ }>;
42
+ /** Schema definition for layout dimensions and connection points of a node. */
43
+ export declare const dimensions: import('@bemedev/typings').inferSh<{
44
+ width: "number";
45
+ height: "number";
46
+ id: "string";
47
+ output: {
48
+ x: "number";
49
+ y: "number";
50
+ };
51
+ input: import('@bemedev/typings').Optional<{
52
+ x: "number";
53
+ y: "number";
54
+ }>;
55
+ }>;
56
+ /**
57
+ * Schema definition for a 2D line vector representing edge coordinates
58
+ * `(x0, y0)` to `(x1, y1)`.
59
+ */
60
+ export declare const vector: import('@bemedev/typings').inferSh<{
61
+ x0: "number";
62
+ y0: "number";
63
+ x1: "number";
64
+ y1: "number";
65
+ }>;
66
+ /** 2D vector coordinate type inferred from schema {@linkcode vector}. */
67
+ export type Vector = inferT<typeof vector>;
68
+ //# sourceMappingURL=main.typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.typings.d.ts","sourceRoot":"","sources":["../../src/services/main.typings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,qDAAqD;AACrD,eAAO,MAAM,KAAK;;;EAAqC,CAAC;AAExD,uEAAuE;AACvE,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC;AAEzC,oEAAoE;AACpE,eAAO,MAAM,UAAU;;;;;;;;;EAGpB,CAAC;AAEJ,6CAA6C;AAC7C,eAAO,MAAM,WAAW;;;EAAyC,CAAC;AAElE,gEAAgE;AAChE,eAAO,MAAM,QAAQ;;;;;;;;;;EAIlB,CAAC;AAEJ,gEAAgE;AAChE,eAAO,MAAM,QAAQ;;;EAAc,CAAC;AAEpC,+EAA+E;AAC/E,eAAO,MAAM,UAAU;;;;;;;;;;;;EAMpB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;EAKjB,CAAC;AAEH,yEAAyE;AACzE,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Component } from 'solid-js';
2
+ import { FlowProps } from './components/FlowChart';
3
+ /**
4
+ * Root Flow component wrapping the {@linkcode FlowChart} inside the flow
5
+ * context provider.
6
+ *
7
+ * @param props - Flow chart configuration and callbacks of type
8
+ * {@linkcode FlowProps}.
9
+ *
10
+ * @returns The rendered Solid component.
11
+ */
12
+ export declare const Flow: Component<FlowProps>;
13
+ //# sourceMappingURL=Flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flow.d.ts","sourceRoot":"","sources":["../../src/ui/Flow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnE;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,EAAE,SAAS,CAAC,SAAS,CAIrC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Component } from 'solid-js';
2
+ /**
3
+ * Drag boundary transformer component that clamps draggable nodes within
4
+ * container scroll bounds.
5
+ *
6
+ * @returns `null` as this component performs side-effect transformer
7
+ * registrations only.
8
+ */
9
+ export declare const DragBounds: Component;
10
+ //# sourceMappingURL=Bounds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bounds.d.ts","sourceRoot":"","sources":["../../../src/ui/components/Bounds.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,SAuExB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Component } from 'solid-js';
2
+ import { Vector } from '../../services/main.typings';
3
+ /** Properties for rendering an SVG connection edge between two points. */
4
+ type Props = {
5
+ /** Unique identifier of the edge. */
6
+ id: string;
7
+ /** Whether this is a temporary edge currently being dragged. */
8
+ isNew?: boolean;
9
+ } & Vector;
10
+ /**
11
+ * SVG edge component rendering bezier curves and delete interaction
12
+ * handles for node connections.
13
+ *
14
+ * @param props - Edge properties of type {@linkcode Props}.
15
+ *
16
+ * @returns The rendered SVG JSX elements.
17
+ */
18
+ export declare const EdgeComponent: Component<Props>;
19
+ export {};
20
+ //# sourceMappingURL=EdgeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EdgeComponent.d.ts","sourceRoot":"","sources":["../../../src/ui/components/EdgeComponent.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAoC,MAAM,UAAU,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAG1D,0EAA0E;AAC1E,KAAK,KAAK,GAAG;IACX,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,MAAM,CAAC;AAuBX;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,KAAK,CA+D1C,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Component } from 'solid-js';
2
+ /**
3
+ * SVG board overlay component that renders all active connecting edges and
4
+ * ongoing edge creation previews.
5
+ *
6
+ * @returns The rendered SVG JSX element.
7
+ */
8
+ export declare const EdgesBoard: Component;
9
+ //# sourceMappingURL=EdgesBoard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EdgesBoard.d.ts","sourceRoot":"","sources":["../../../src/ui/components/EdgesBoard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAMV,MAAM,UAAU,CAAC;AAIlB;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,SAsCxB,CAAC"}