stickyflow 0.4.0 → 0.6.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 +43 -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-BYMIYXP5.js → chunk-4G2R7PEL.js} +513 -61
  10. package/dist/chunk-4G2R7PEL.js.map +1 -0
  11. package/dist/{chunk-HFOGKSNU.cjs → chunk-4LENHH6C.cjs} +15 -15
  12. package/dist/{chunk-HFOGKSNU.cjs.map → chunk-4LENHH6C.cjs.map} +1 -1
  13. package/dist/{chunk-65IVT4GK.js → chunk-FVHVOJS2.js} +1333 -650
  14. package/dist/chunk-FVHVOJS2.js.map +1 -0
  15. package/dist/chunk-JIJMZMGY.cjs +1189 -0
  16. package/dist/chunk-JIJMZMGY.cjs.map +1 -0
  17. package/dist/{chunk-UXDWH2JC.cjs → chunk-KTNCDNDB.cjs} +1165 -1118
  18. package/dist/chunk-KTNCDNDB.cjs.map +1 -0
  19. package/dist/chunk-MFNUJA26.js +1182 -0
  20. package/dist/chunk-MFNUJA26.js.map +1 -0
  21. package/dist/{chunk-XEN5QIIJ.js → chunk-ULQZ6CZW.js} +3 -3
  22. package/dist/{chunk-XEN5QIIJ.js.map → chunk-ULQZ6CZW.js.map} +1 -1
  23. package/dist/{chunk-DDCTNLLD.cjs → chunk-WQRT5PVT.cjs} +1837 -1155
  24. package/dist/chunk-WQRT5PVT.cjs.map +1 -0
  25. package/dist/{chunk-CSXQD3ON.js → chunk-WRDVNMFS.js} +1128 -1081
  26. package/dist/chunk-WRDVNMFS.js.map +1 -0
  27. package/dist/{chunk-CXL254BT.cjs → chunk-XJ4W6TW4.cjs} +528 -60
  28. package/dist/chunk-XJ4W6TW4.cjs.map +1 -0
  29. package/dist/index.cjs +73 -1013
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +67 -14
  32. package/dist/index.d.ts +67 -14
  33. package/dist/index.js +6 -993
  34. package/dist/index.js.map +1 -1
  35. package/dist/interaction/index.cjs +246 -236
  36. package/dist/interaction/index.cjs.map +1 -1
  37. package/dist/interaction/index.d.cts +3 -2
  38. package/dist/interaction/index.d.ts +3 -2
  39. package/dist/interaction/index.js +18 -8
  40. package/dist/interaction/index.js.map +1 -1
  41. package/dist/{render-C5X74hds.d.cts → render-Db0eSz_s.d.cts} +216 -118
  42. package/dist/{render-C5X74hds.d.ts → render-Db0eSz_s.d.ts} +216 -118
  43. package/dist/runtime-BhivvBeL.d.cts +10 -0
  44. package/dist/runtime-n2yG-_j-.d.ts +10 -0
  45. package/dist/{runtimeTypes-yTSAvtCn.d.cts → runtimeTypes-CrkMHvVi.d.cts} +10 -5
  46. package/dist/{runtimeTypes-D8hPZ62T.d.ts → runtimeTypes-DnI7mRF5.d.ts} +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-CdgGdtoD.d.ts → types-BHfUKT4s.d.cts} +3 -2
  50. package/dist/{types-BDKDf4zr.d.cts → types-D4cH4f1a.d.ts} +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
@@ -1,3 +1,143 @@
1
+ type ComponentGroup = 'readout' | 'input' | 'action' | 'navigation';
2
+ type ComponentValueType = 'number' | 'string' | 'boolean';
3
+ type ComponentValue = number | string | boolean;
4
+ type ComponentInteraction = 'none' | 'toggle' | 'press' | 'scale';
5
+ interface ComponentValueDescriptor {
6
+ type: ComponentValueType;
7
+ writable: boolean;
8
+ default: ComponentValue;
9
+ }
10
+ type ComponentPropertyDescriptor = {
11
+ type: 'number';
12
+ default: number;
13
+ min?: number;
14
+ max?: number;
15
+ step?: number;
16
+ } | {
17
+ type: 'boolean';
18
+ default: boolean;
19
+ } | {
20
+ type: 'string';
21
+ default: string;
22
+ } | {
23
+ type: 'color';
24
+ default: string;
25
+ } | {
26
+ type: 'enum';
27
+ default: string;
28
+ options: readonly string[];
29
+ };
30
+ interface ComponentSize {
31
+ width: number;
32
+ height: number;
33
+ minWidth?: number;
34
+ minHeight?: number;
35
+ aspect?: number;
36
+ }
37
+ interface ComponentDescriptor {
38
+ type: string;
39
+ group: ComponentGroup;
40
+ value?: ComponentValueDescriptor;
41
+ properties: Record<string, ComponentPropertyDescriptor>;
42
+ interaction: ComponentInteraction;
43
+ pointerScale: boolean;
44
+ size: ComponentSize;
45
+ role?: string;
46
+ }
47
+
48
+ interface RollingNumberComponentStyle {
49
+ color?: string;
50
+ surface?: string;
51
+ divider?: string;
52
+ labelColor?: string;
53
+ fontFamily?: string;
54
+ variant?: 'flip' | 'plain';
55
+ motion?: 'roll' | 'fade';
56
+ fontWeight?: string;
57
+ fontSize?: number;
58
+ }
59
+ interface RollingNumberComponent {
60
+ id: string;
61
+ type: 'rollingNumber';
62
+ value: string;
63
+ digits?: number;
64
+ duration?: number;
65
+ label?: string;
66
+ x: number;
67
+ y: number;
68
+ width: number;
69
+ height: number;
70
+ rotation?: number;
71
+ order?: number;
72
+ sourceIndex?: number;
73
+ parentFrameId?: string;
74
+ style: RollingNumberComponentStyle;
75
+ }
76
+ interface TickScaleComponent {
77
+ id: string;
78
+ type: 'tickScale';
79
+ value: string;
80
+ max?: number;
81
+ label?: string;
82
+ x: number;
83
+ y: number;
84
+ width: number;
85
+ height: number;
86
+ rotation?: number;
87
+ order?: number;
88
+ sourceIndex?: number;
89
+ parentFrameId?: string;
90
+ parameters: Record<string, string | number>;
91
+ labels?: {
92
+ size?: number;
93
+ color?: string;
94
+ offset?: number;
95
+ weight?: string;
96
+ fontFamily?: string;
97
+ };
98
+ }
99
+ interface RulerComponent {
100
+ id: string;
101
+ type: 'ruler';
102
+ value: string;
103
+ min?: number;
104
+ max?: number;
105
+ label?: string;
106
+ x: number;
107
+ y: number;
108
+ width: number;
109
+ height: number;
110
+ rotation?: number;
111
+ order?: number;
112
+ sourceIndex?: number;
113
+ parentFrameId?: string;
114
+ parameters: Record<string, string | number>;
115
+ labels?: {
116
+ size?: number;
117
+ color?: string;
118
+ offset?: number;
119
+ weight?: string;
120
+ fontFamily?: string;
121
+ };
122
+ }
123
+ interface GenericComponent {
124
+ id: string;
125
+ type: string;
126
+ value: ComponentValue;
127
+ disabled: boolean;
128
+ label?: string;
129
+ x: number;
130
+ y: number;
131
+ width: number;
132
+ height: number;
133
+ rotation?: number;
134
+ order?: number;
135
+ sourceIndex?: number;
136
+ parentFrameId?: string;
137
+ properties: Record<string, ComponentValue>;
138
+ }
139
+ type Component = RollingNumberComponent | TickScaleComponent | RulerComponent | GenericComponent;
140
+
1
141
  interface ChartZone {
2
142
  label: string;
3
143
  color?: string;
@@ -402,6 +542,13 @@ interface CustomChart extends TypedChart<'custom', CustomChartConfig> {
402
542
  }
403
543
  type Chart = BarChart | BoxplotChart | CustomChart | FieldChart | HeatmapChart | HexbinChart | LineChart | MekkoChart | PieChart | PolarAreaChart | RadarChart | RadialBarChart | RadialChart | SankeyChart | ScatterChart | TreemapChart;
404
544
 
545
+ interface Diagnostic {
546
+ severity: 'warning' | 'error';
547
+ code: string;
548
+ message: string;
549
+ ownerId?: string;
550
+ }
551
+
405
552
  interface Point {
406
553
  x: number;
407
554
  y: number;
@@ -414,6 +561,50 @@ interface Bounds {
414
561
  }
415
562
  type Side = 'top' | 'right' | 'bottom' | 'left';
416
563
 
564
+ interface Dimension {
565
+ id: string;
566
+ start: Point;
567
+ end: Point;
568
+ offset: number;
569
+ text?: string;
570
+ unit?: string;
571
+ strokeColor?: string;
572
+ strokeWidth?: number;
573
+ textColor?: string;
574
+ fontSize?: number;
575
+ order?: number;
576
+ sourceIndex?: number;
577
+ parentFrameId?: string;
578
+ }
579
+
580
+ interface Frame {
581
+ id: string;
582
+ name?: string;
583
+ x: number;
584
+ y: number;
585
+ width: number;
586
+ height: number;
587
+ title?: string | null;
588
+ strokeColor: string;
589
+ strokeWidth: number;
590
+ dash?: number[];
591
+ cornerRadius: number;
592
+ fillColor: string;
593
+ textColor: string;
594
+ fontSize: number;
595
+ fontWeight: 'normal' | 'bold';
596
+ fontFamily?: string;
597
+ showLabel: boolean;
598
+ labelPosition?: 'top' | 'bottom' | 'left' | 'right';
599
+ shadow?: boolean;
600
+ layerGroup?: string;
601
+ orderKey?: string;
602
+ order?: number;
603
+ sourceIndex?: number;
604
+ isVisible?: boolean;
605
+ isLocked?: boolean;
606
+ }
607
+
417
608
  type IsometricFace = 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right';
418
609
  interface IsometricObject {
419
610
  id: string;
@@ -422,6 +613,8 @@ interface IsometricObject {
422
613
  width: number;
423
614
  height: number;
424
615
  depth: number;
616
+ footprint?: Array<[number, number]>;
617
+ form?: 'box' | 'sphere';
425
618
  rotation?: number;
426
619
  order?: number;
427
620
  sourceIndex?: number;
@@ -501,7 +694,9 @@ interface Link {
501
694
  laneId?: string;
502
695
  }
503
696
 
504
- type PathPoint = Point;
697
+ interface PathPoint extends Point {
698
+ tension?: number;
699
+ }
505
700
  interface FreeformPath {
506
701
  id: string;
507
702
  x: number;
@@ -583,119 +778,6 @@ interface SymbolDef {
583
778
  }>;
584
779
  }
585
780
 
586
- type WidgetType = 'rollingNumber' | 'tickScale' | 'ruler';
587
- interface RollingNumberWidgetStyle {
588
- color?: string;
589
- surface?: string;
590
- divider?: string;
591
- labelColor?: string;
592
- fontFamily?: string;
593
- variant?: 'flip' | 'plain';
594
- motion?: 'roll' | 'fade';
595
- fontWeight?: string;
596
- fontSize?: number;
597
- }
598
- interface RollingNumberWidget {
599
- id: string;
600
- type: 'rollingNumber';
601
- value: string;
602
- digits?: number;
603
- duration?: number;
604
- label?: string;
605
- x: number;
606
- y: number;
607
- width: number;
608
- height: number;
609
- rotation?: number;
610
- order?: number;
611
- sourceIndex?: number;
612
- parentFrameId?: string;
613
- style: RollingNumberWidgetStyle;
614
- }
615
- interface TickScaleWidget {
616
- id: string;
617
- type: 'tickScale';
618
- value: string;
619
- max?: number;
620
- label?: string;
621
- x: number;
622
- y: number;
623
- width: number;
624
- height: number;
625
- rotation?: number;
626
- order?: number;
627
- sourceIndex?: number;
628
- parentFrameId?: string;
629
- parameters: Record<string, string | number>;
630
- labels?: {
631
- size?: number;
632
- color?: string;
633
- offset?: number;
634
- weight?: string;
635
- fontFamily?: string;
636
- };
637
- }
638
- interface RulerWidget {
639
- id: string;
640
- type: 'ruler';
641
- value: string;
642
- min?: number;
643
- max?: number;
644
- label?: string;
645
- x: number;
646
- y: number;
647
- width: number;
648
- height: number;
649
- rotation?: number;
650
- order?: number;
651
- sourceIndex?: number;
652
- parentFrameId?: string;
653
- parameters: Record<string, string | number>;
654
- labels?: {
655
- size?: number;
656
- color?: string;
657
- offset?: number;
658
- weight?: string;
659
- fontFamily?: string;
660
- };
661
- }
662
- type Widget = RollingNumberWidget | TickScaleWidget | RulerWidget;
663
-
664
- interface Diagnostic {
665
- severity: 'warning' | 'error';
666
- code: string;
667
- message: string;
668
- ownerId?: string;
669
- }
670
-
671
- interface Frame {
672
- id: string;
673
- name?: string;
674
- x: number;
675
- y: number;
676
- width: number;
677
- height: number;
678
- title?: string | null;
679
- strokeColor: string;
680
- strokeWidth: number;
681
- dash?: number[];
682
- cornerRadius: number;
683
- fillColor: string;
684
- textColor: string;
685
- fontSize: number;
686
- fontWeight: 'normal' | 'bold';
687
- fontFamily?: string;
688
- showLabel: boolean;
689
- labelPosition?: 'top' | 'bottom' | 'left' | 'right';
690
- shadow?: boolean;
691
- layerGroup?: string;
692
- orderKey?: string;
693
- order?: number;
694
- sourceIndex?: number;
695
- isVisible?: boolean;
696
- isLocked?: boolean;
697
- }
698
-
699
781
  interface Lane {
700
782
  id: string;
701
783
  label: string;
@@ -743,8 +825,10 @@ interface RenderInput {
743
825
  swimlanes: Swimlane[];
744
826
  isometricObjects?: IsometricObject[];
745
827
  paths?: FreeformPath[];
828
+ dimensions?: Dimension[];
746
829
  charts?: Chart[];
747
- widgets?: Widget[];
830
+ components?: Component[];
831
+ widgets?: Component[];
748
832
  links: RenderInputLink[];
749
833
  diagnostics?: Diagnostic[];
750
834
  }
@@ -808,7 +892,13 @@ interface SceneStyle {
808
892
  d: string;
809
893
  };
810
894
  }
811
- type SceneRole = 'shape' | 'link' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric';
895
+ type SceneRole = 'shape' | 'link' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric' | 'dimension';
896
+ interface SceneAria {
897
+ role: string;
898
+ checked?: boolean;
899
+ pressed?: boolean;
900
+ disabled?: boolean;
901
+ }
812
902
  interface SceneIdentity {
813
903
  role: SceneRole;
814
904
  id: string;
@@ -816,6 +906,7 @@ interface SceneIdentity {
816
906
  primary?: boolean;
817
907
  label?: string;
818
908
  parentFrameId?: string;
909
+ aria?: SceneAria;
819
910
  }
820
911
  interface SceneLinkSegment {
821
912
  ax: number;
@@ -997,7 +1088,7 @@ interface SceneRollingNumber extends SceneBase {
997
1088
  digits?: number;
998
1089
  duration: number;
999
1090
  label?: string;
1000
- widgetStyle: Required<RollingNumberWidgetStyle>;
1091
+ componentStyle: Required<RollingNumberComponentStyle>;
1001
1092
  }
1002
1093
  interface SceneImage extends SceneBase {
1003
1094
  type: 'image';
@@ -1037,5 +1128,12 @@ interface RenderOptions {
1037
1128
  }
1038
1129
  declare function renderCanvas(input: RenderInput, options?: RenderOptions): RenderResult;
1039
1130
  declare function render(source: string, options?: RenderOptions): RenderResult;
1131
+ interface ComponentSceneContext {
1132
+ order: number;
1133
+ }
1134
+ interface ComponentDefinition extends ComponentDescriptor {
1135
+ scene(component: GenericComponent, context: ComponentSceneContext): RenderNode[];
1136
+ }
1137
+ declare function defineComponent(definition: ComponentDefinition): () => void;
1040
1138
 
1041
- export { renderCanvas as A, type Bounds as B, type Chart as C, type Diagnostic as D, type Side as E, type Frame as F, type IsometricFace as I, type LinkStyle as L, type MeasureTextFactory as M, type PathPoint as P, type RenderInput as R, type Shader as S, type TextMetrics as T, type Widget as W, type ShadowStyle as a, type Shape as b, type Link as c, type Swimlane as d, type IsometricObject as e, type FreeformPath as f, type RenderOptions as g, type RenderResult as h, CHART_TYPES as i, type ChartAxis as j, type ChartRamp as k, type ChartSeries as l, type ChartType as m, type Point as n, type RenderDiagnostic as o, type RenderNode as p, type RenderScene as q, type RollingNumberWidget as r, type RollingNumberWidgetStyle as s, type RulerWidget as t, type SceneRole as u, type ShaderParameter as v, type ShapeType as w, type TickScaleWidget as x, type WidgetType as y, render as z };
1139
+ export { type Dimension as A, type Bounds as B, type Component as C, type Diagnostic as D, type RenderDiagnostic as E, type Frame as F, type GenericComponent as G, type RenderNode as H, type IsometricFace as I, type RenderOptions as J, type RenderResult as K, type LinkStyle as L, type MeasureTextFactory as M, type RenderScene as N, type SceneRole as O, type PathPoint as P, type ShaderParameter as Q, type RollingNumberComponent as R, type Shader as S, type TickScaleComponent as T, type ShapeType as U, type TextMetrics as V, defineComponent as W, render as X, renderCanvas as Y, type Side as Z, type ComponentDescriptor as a, type Point as b, type RollingNumberComponentStyle as c, type RulerComponent as d, type RenderInput as e, type ShadowStyle as f, type Shape as g, type Link as h, type Swimlane as i, type IsometricObject as j, type FreeformPath as k, type Chart as l, CHART_TYPES as m, type ChartAxis as n, type ChartRamp as o, type ChartSeries as p, type ChartType as q, type ComponentDefinition as r, type ComponentGroup as s, type ComponentInteraction as t, type ComponentPropertyDescriptor as u, type ComponentSceneContext as v, type ComponentSize as w, type ComponentValue as x, type ComponentValueDescriptor as y, type ComponentValueType as z };
@@ -0,0 +1,10 @@
1
+ import { J as RenderOptions, K as RenderResult } from './render-Db0eSz_s.cjs';
2
+ import { R as Row, c as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-CrkMHvVi.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 };
@@ -0,0 +1,10 @@
1
+ import { J as RenderOptions, K as RenderResult } from './render-Db0eSz_s.js';
2
+ import { R as Row, c as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-DnI7mRF5.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 };
@@ -1,6 +1,6 @@
1
- import { R as RenderInput, h as RenderResult, g as RenderOptions } from './render-C5X74hds.cjs';
1
+ import { e as RenderInput, x as ComponentValue, K as RenderResult, J as RenderOptions } from './render-Db0eSz_s.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", "Dimension", "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.js';
1
+ import { e as RenderInput, x as ComponentValue, K as RenderResult, J as RenderOptions } from './render-Db0eSz_s.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", "Dimension", "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 };