stickyflow 0.3.0 → 0.5.0

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 (65) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +51 -5
  3. package/dist/binding/index.cjs +34 -0
  4. package/dist/binding/index.cjs.map +1 -0
  5. package/dist/binding/index.d.cts +11 -0
  6. package/dist/binding/index.d.ts +11 -0
  7. package/dist/binding/index.js +5 -0
  8. package/dist/binding/index.js.map +1 -0
  9. package/dist/{chunk-XEN5QIIJ.js → chunk-7VW2XKVB.js} +3 -3
  10. package/dist/{chunk-XEN5QIIJ.js.map → chunk-7VW2XKVB.js.map} +1 -1
  11. package/dist/chunk-BODZN3ZI.js +1182 -0
  12. package/dist/chunk-BODZN3ZI.js.map +1 -0
  13. package/dist/{chunk-CSXQD3ON.js → chunk-G7NRK5AG.js} +1128 -1081
  14. package/dist/chunk-G7NRK5AG.js.map +1 -0
  15. package/dist/{chunk-BYMIYXP5.js → chunk-IEHE6WVN.js} +197 -19
  16. package/dist/chunk-IEHE6WVN.js.map +1 -0
  17. package/dist/{chunk-HFOGKSNU.cjs → chunk-L3VJXZFD.cjs} +15 -15
  18. package/dist/{chunk-HFOGKSNU.cjs.map → chunk-L3VJXZFD.cjs.map} +1 -1
  19. package/dist/{chunk-65IVT4GK.js → chunk-LTGF5OHP.js} +1008 -631
  20. package/dist/chunk-LTGF5OHP.js.map +1 -0
  21. package/dist/chunk-TWDLOXRM.cjs +1189 -0
  22. package/dist/chunk-TWDLOXRM.cjs.map +1 -0
  23. package/dist/{chunk-UXDWH2JC.cjs → chunk-VK3T6O5Z.cjs} +1165 -1118
  24. package/dist/chunk-VK3T6O5Z.cjs.map +1 -0
  25. package/dist/{chunk-CXL254BT.cjs → chunk-XY2GZUHC.cjs} +204 -18
  26. package/dist/chunk-XY2GZUHC.cjs.map +1 -0
  27. package/dist/{chunk-DDCTNLLD.cjs → chunk-ZMLQIMJK.cjs} +1504 -1128
  28. package/dist/chunk-ZMLQIMJK.cjs.map +1 -0
  29. package/dist/index.cjs +53 -1013
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +22 -14
  32. package/dist/index.d.ts +22 -14
  33. package/dist/index.js +6 -993
  34. package/dist/index.js.map +1 -1
  35. package/dist/interaction/index.cjs +474 -305
  36. package/dist/interaction/index.cjs.map +1 -1
  37. package/dist/interaction/index.d.cts +11 -3
  38. package/dist/interaction/index.d.ts +11 -3
  39. package/dist/interaction/index.js +255 -87
  40. package/dist/interaction/index.js.map +1 -1
  41. package/dist/{render-C5X74hds.d.cts → render-CgX_y15a.d.cts} +193 -116
  42. package/dist/{render-C5X74hds.d.ts → render-CgX_y15a.d.ts} +193 -116
  43. package/dist/runtime-DnUxca3Y.d.ts +10 -0
  44. package/dist/runtime-reWgr7MP.d.cts +10 -0
  45. package/dist/{runtimeTypes-D8hPZ62T.d.ts → runtimeTypes-CEBGueYM.d.ts} +10 -5
  46. package/dist/{runtimeTypes-yTSAvtCn.d.cts → runtimeTypes-D60w6nyF.d.cts} +10 -5
  47. package/dist/stickyflow-diagram.global.js +35 -35
  48. package/dist/stickyflow-diagram.global.js.map +1 -1
  49. package/dist/{types-BDKDf4zr.d.cts → types-DYLC_lsk.d.ts} +3 -2
  50. package/dist/{types-CdgGdtoD.d.ts → types-DvhMpqrL.d.cts} +3 -2
  51. package/dist/viewer/index.cjs +9 -9
  52. package/dist/viewer/index.d.cts +4 -4
  53. package/dist/viewer/index.d.ts +4 -4
  54. package/dist/viewer/index.js +4 -4
  55. package/dist/web-component/index.cjs +6 -6
  56. package/dist/web-component/index.d.cts +2 -2
  57. package/dist/web-component/index.d.ts +2 -2
  58. package/dist/web-component/index.js +4 -4
  59. package/package.json +6 -1
  60. package/dist/chunk-65IVT4GK.js.map +0 -1
  61. package/dist/chunk-BYMIYXP5.js.map +0 -1
  62. package/dist/chunk-CSXQD3ON.js.map +0 -1
  63. package/dist/chunk-CXL254BT.cjs.map +0 -1
  64. package/dist/chunk-DDCTNLLD.cjs.map +0 -1
  65. package/dist/chunk-UXDWH2JC.cjs.map +0 -1
@@ -0,0 +1,10 @@
1
+ import { H as RenderOptions, J as RenderResult } from './render-CgX_y15a.js';
2
+ import { R as Row, c as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-CEBGueYM.js';
3
+
4
+ declare function createBindingRuntime(sfl: string, options?: BindingRuntimeOptions): BindingRuntime;
5
+ interface RenderBoundOptions extends RenderOptions {
6
+ data?: Record<string, Row | Row[]>;
7
+ }
8
+ declare function renderBound(sfl: string, options?: RenderBoundOptions): RenderResult;
9
+
10
+ export { type RenderBoundOptions as R, createBindingRuntime as c, renderBound as r };
@@ -0,0 +1,10 @@
1
+ import { H as RenderOptions, J as RenderResult } from './render-CgX_y15a.cjs';
2
+ import { R as Row, c as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-D60w6nyF.cjs';
3
+
4
+ declare function createBindingRuntime(sfl: string, options?: BindingRuntimeOptions): BindingRuntime;
5
+ interface RenderBoundOptions extends RenderOptions {
6
+ data?: Record<string, Row | Row[]>;
7
+ }
8
+ declare function renderBound(sfl: string, options?: RenderBoundOptions): RenderResult;
9
+
10
+ export { type RenderBoundOptions as R, createBindingRuntime as c, renderBound as r };
@@ -1,6 +1,6 @@
1
- import { R as RenderInput, h as RenderResult, g as RenderOptions } from './render-C5X74hds.js';
1
+ import { d as RenderInput, w as ComponentValue, J as RenderResult, H as RenderOptions } from './render-CgX_y15a.js';
2
2
 
3
- declare const NAMED_BLOCK_KINDS: readonly ["Project", "Model", "Group", "Entity", "Container", "Path", "Chart", "Widget", "Shape", "Text", "Isometric", "Link", "Connection", "Layout", "Style", "Shader", "Axis", "Series", "Rule", "Net", "Symbol", "Port", "DataSource"];
3
+ declare const NAMED_BLOCK_KINDS: readonly ["Project", "Model", "Group", "Entity", "Container", "Path", "Chart", "Widget", "Component", "Shape", "Text", "Isometric", "Link", "Connection", "Layout", "Style", "Shader", "Axis", "Series", "Rule", "Net", "Symbol", "Port", "DataSource"];
4
4
  type NamedBlockKind = (typeof NAMED_BLOCK_KINDS)[number];
5
5
  type BlockKind = NamedBlockKind | 'data';
6
6
  type Side = 'top' | 'bottom' | 'left' | 'right';
@@ -176,7 +176,7 @@ interface BoundHandler {
176
176
  }
177
177
  interface ElementInfo {
178
178
  kind: BlockKind;
179
- widgetType?: string;
179
+ componentType?: string;
180
180
  }
181
181
 
182
182
  type SourceListener = () => void;
@@ -212,13 +212,16 @@ interface BindingTarget {
212
212
  update(next: {
213
213
  svg: string;
214
214
  }): void;
215
- setWidgetValue?(widgetId: string, value: string | number): unknown;
215
+ setComponentValue?(componentId: string, value: string | number): unknown;
216
+ setWidgetValue?(componentId: string, value: string | number): unknown;
216
217
  setShaderParameters?(ownerId: string, parameters: Record<string, number>): unknown;
217
218
  }
218
219
  interface ElementState {
219
220
  pressed: boolean;
220
221
  hovered: boolean;
222
+ focused: boolean;
221
223
  pointer: number;
224
+ value: ComponentValue;
222
225
  }
223
226
  interface BindingRuntime {
224
227
  readonly diagnostics: BindingDiagnostic[];
@@ -229,6 +232,8 @@ interface BindingRuntime {
229
232
  setElementState(id: string, state: Partial<ElementState>): void;
230
233
  press(id: string): void;
231
234
  release(id: string, tapped: boolean): void;
235
+ activate(id: string): void;
236
+ change(id: string, value: ComponentValue): boolean;
232
237
  drag(id: string, pointer?: number): void;
233
238
  tick(seconds: number): void;
234
239
  flush(): RenderResult | null;
@@ -236,4 +241,4 @@ interface BindingRuntime {
236
241
  attach(target: BindingTarget): () => void;
237
242
  }
238
243
 
239
- export { type BindingRuntimeOptions as B, type DataSource as D, type ElementInfo as E, type InteractiveElements as I, type MutableDataSource as M, type Row as R, type SflDocument as S, type Side as a, type BindingRuntime as b, type BindingDiagnostic as c, type BindingGraph as d, type BindingTarget as e, type BindingType as f, type BindingValue as g, type BoundAssignment as h, type BoundHandler as i, type BoundProperty as j, type DataSourceContract as k, type ElementState as l, buildBindingGraph as m, createDataSource as n, interactiveElements as o };
244
+ export { type BindingDiagnostic as B, type DataSourceContract as D, type ElementInfo as E, type InteractiveElements as I, type MutableDataSource as M, type Row as R, type SflDocument as S, type BindingGraph as a, type BindingRuntime as b, type BindingRuntimeOptions as c, type BindingTarget as d, type BindingType as e, type BindingValue as f, type BoundAssignment as g, type BoundHandler as h, type BoundProperty as i, type DataSource as j, type ElementState as k, buildBindingGraph as l, createDataSource as m, interactiveElements as n, type Side as o };
@@ -1,6 +1,6 @@
1
- import { R as RenderInput, h as RenderResult, g as RenderOptions } from './render-C5X74hds.cjs';
1
+ import { d as RenderInput, w as ComponentValue, J as RenderResult, H as RenderOptions } from './render-CgX_y15a.cjs';
2
2
 
3
- declare const NAMED_BLOCK_KINDS: readonly ["Project", "Model", "Group", "Entity", "Container", "Path", "Chart", "Widget", "Shape", "Text", "Isometric", "Link", "Connection", "Layout", "Style", "Shader", "Axis", "Series", "Rule", "Net", "Symbol", "Port", "DataSource"];
3
+ declare const NAMED_BLOCK_KINDS: readonly ["Project", "Model", "Group", "Entity", "Container", "Path", "Chart", "Widget", "Component", "Shape", "Text", "Isometric", "Link", "Connection", "Layout", "Style", "Shader", "Axis", "Series", "Rule", "Net", "Symbol", "Port", "DataSource"];
4
4
  type NamedBlockKind = (typeof NAMED_BLOCK_KINDS)[number];
5
5
  type BlockKind = NamedBlockKind | 'data';
6
6
  type Side = 'top' | 'bottom' | 'left' | 'right';
@@ -176,7 +176,7 @@ interface BoundHandler {
176
176
  }
177
177
  interface ElementInfo {
178
178
  kind: BlockKind;
179
- widgetType?: string;
179
+ componentType?: string;
180
180
  }
181
181
 
182
182
  type SourceListener = () => void;
@@ -212,13 +212,16 @@ interface BindingTarget {
212
212
  update(next: {
213
213
  svg: string;
214
214
  }): void;
215
- setWidgetValue?(widgetId: string, value: string | number): unknown;
215
+ setComponentValue?(componentId: string, value: string | number): unknown;
216
+ setWidgetValue?(componentId: string, value: string | number): unknown;
216
217
  setShaderParameters?(ownerId: string, parameters: Record<string, number>): unknown;
217
218
  }
218
219
  interface ElementState {
219
220
  pressed: boolean;
220
221
  hovered: boolean;
222
+ focused: boolean;
221
223
  pointer: number;
224
+ value: ComponentValue;
222
225
  }
223
226
  interface BindingRuntime {
224
227
  readonly diagnostics: BindingDiagnostic[];
@@ -229,6 +232,8 @@ interface BindingRuntime {
229
232
  setElementState(id: string, state: Partial<ElementState>): void;
230
233
  press(id: string): void;
231
234
  release(id: string, tapped: boolean): void;
235
+ activate(id: string): void;
236
+ change(id: string, value: ComponentValue): boolean;
232
237
  drag(id: string, pointer?: number): void;
233
238
  tick(seconds: number): void;
234
239
  flush(): RenderResult | null;
@@ -236,4 +241,4 @@ interface BindingRuntime {
236
241
  attach(target: BindingTarget): () => void;
237
242
  }
238
243
 
239
- export { type BindingRuntimeOptions as B, type DataSource as D, type ElementInfo as E, type InteractiveElements as I, type MutableDataSource as M, type Row as R, type SflDocument as S, type Side as a, type BindingRuntime as b, type BindingDiagnostic as c, type BindingGraph as d, type BindingTarget as e, type BindingType as f, type BindingValue as g, type BoundAssignment as h, type BoundHandler as i, type BoundProperty as j, type DataSourceContract as k, type ElementState as l, buildBindingGraph as m, createDataSource as n, interactiveElements as o };
244
+ export { type BindingDiagnostic as B, type DataSourceContract as D, type ElementInfo as E, type InteractiveElements as I, type MutableDataSource as M, type Row as R, type SflDocument as S, type BindingGraph as a, type BindingRuntime as b, type BindingRuntimeOptions as c, type BindingTarget as d, type BindingType as e, type BindingValue as f, type BoundAssignment as g, type BoundHandler as h, type BoundProperty as i, type DataSource as j, type ElementState as k, buildBindingGraph as l, createDataSource as m, interactiveElements as n, type Side as o };