stickyflow 0.5.0 → 0.7.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 (62) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/binding/index.cjs +9 -9
  3. package/dist/binding/index.d.cts +4 -4
  4. package/dist/binding/index.d.ts +4 -4
  5. package/dist/binding/index.js +3 -3
  6. package/dist/{chunk-ZMLQIMJK.cjs → chunk-A73UJ5AQ.cjs} +1537 -738
  7. package/dist/chunk-A73UJ5AQ.cjs.map +1 -0
  8. package/dist/{chunk-VK3T6O5Z.cjs → chunk-BUOWM3LC.cjs} +745 -62
  9. package/dist/chunk-BUOWM3LC.cjs.map +1 -0
  10. package/dist/{chunk-L3VJXZFD.cjs → chunk-EKAWJFJQ.cjs} +15 -15
  11. package/dist/{chunk-L3VJXZFD.cjs.map → chunk-EKAWJFJQ.cjs.map} +1 -1
  12. package/dist/{chunk-BODZN3ZI.js → chunk-JCRPLPKV.js} +156 -23
  13. package/dist/chunk-JCRPLPKV.js.map +1 -0
  14. package/dist/{chunk-IEHE6WVN.js → chunk-JQK4IGXJ.js} +489 -51
  15. package/dist/chunk-JQK4IGXJ.js.map +1 -0
  16. package/dist/{chunk-XY2GZUHC.cjs → chunk-KXYSO6GC.cjs} +498 -50
  17. package/dist/chunk-KXYSO6GC.cjs.map +1 -0
  18. package/dist/{chunk-G7NRK5AG.js → chunk-MUKIGLR5.js} +717 -34
  19. package/dist/chunk-MUKIGLR5.js.map +1 -0
  20. package/dist/{chunk-TWDLOXRM.cjs → chunk-OWNVXKXN.cjs} +170 -37
  21. package/dist/chunk-OWNVXKXN.cjs.map +1 -0
  22. package/dist/{chunk-LTGF5OHP.js → chunk-SDMQRSRW.js} +941 -143
  23. package/dist/chunk-SDMQRSRW.js.map +1 -0
  24. package/dist/{chunk-7VW2XKVB.js → chunk-ZNHYW47T.js} +3 -3
  25. package/dist/{chunk-7VW2XKVB.js.map → chunk-ZNHYW47T.js.map} +1 -1
  26. package/dist/index.cjs +57 -29
  27. package/dist/index.d.cts +80 -7
  28. package/dist/index.d.ts +80 -7
  29. package/dist/index.js +5 -5
  30. package/dist/interaction/index.cjs +245 -235
  31. package/dist/interaction/index.cjs.map +1 -1
  32. package/dist/interaction/index.d.cts +3 -2
  33. package/dist/interaction/index.d.ts +3 -2
  34. package/dist/interaction/index.js +17 -7
  35. package/dist/interaction/index.js.map +1 -1
  36. package/dist/{render-CgX_y15a.d.ts → render-BU2uYzjG.d.cts} +40 -16
  37. package/dist/{render-CgX_y15a.d.cts → render-BU2uYzjG.d.ts} +40 -16
  38. package/dist/{runtime-reWgr7MP.d.cts → runtime-B7KiTmn8.d.cts} +2 -2
  39. package/dist/{runtime-DnUxca3Y.d.ts → runtime-BPzyD-Nd.d.ts} +2 -2
  40. package/dist/{runtimeTypes-D60w6nyF.d.cts → runtimeTypes-BIP70z72.d.cts} +3 -2
  41. package/dist/{runtimeTypes-CEBGueYM.d.ts → runtimeTypes-DalvhScn.d.ts} +3 -2
  42. package/dist/stickyflow-diagram.global.js +387 -36
  43. package/dist/stickyflow-diagram.global.js.map +1 -1
  44. package/dist/{types-DYLC_lsk.d.ts → types-DMWs27Hn.d.ts} +1 -1
  45. package/dist/{types-DvhMpqrL.d.cts → types-D_2NZ6lL.d.cts} +1 -1
  46. package/dist/viewer/index.cjs +9 -9
  47. package/dist/viewer/index.d.cts +5 -4
  48. package/dist/viewer/index.d.ts +5 -4
  49. package/dist/viewer/index.js +4 -4
  50. package/dist/web-component/index.cjs +6 -6
  51. package/dist/web-component/index.d.cts +2 -2
  52. package/dist/web-component/index.d.ts +2 -2
  53. package/dist/web-component/index.js +4 -4
  54. package/package.json +1 -1
  55. package/dist/chunk-BODZN3ZI.js.map +0 -1
  56. package/dist/chunk-G7NRK5AG.js.map +0 -1
  57. package/dist/chunk-IEHE6WVN.js.map +0 -1
  58. package/dist/chunk-LTGF5OHP.js.map +0 -1
  59. package/dist/chunk-TWDLOXRM.cjs.map +0 -1
  60. package/dist/chunk-VK3T6O5Z.cjs.map +0 -1
  61. package/dist/chunk-XY2GZUHC.cjs.map +0 -1
  62. package/dist/chunk-ZMLQIMJK.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  type ComponentGroup = 'readout' | 'input' | 'action' | 'navigation';
2
2
  type ComponentValueType = 'number' | 'string' | 'boolean';
3
3
  type ComponentValue = number | string | boolean;
4
- type ComponentInteraction = 'none' | 'toggle' | 'press' | 'scale';
4
+ type ComponentInteraction = 'none' | 'toggle' | 'press' | 'scale' | 'slide' | 'pick' | 'turn' | 'range';
5
5
  interface ComponentValueDescriptor {
6
6
  type: ComponentValueType;
7
7
  writable: boolean;
@@ -37,6 +37,7 @@ interface ComponentSize {
37
37
  interface ComponentDescriptor {
38
38
  type: string;
39
39
  group: ComponentGroup;
40
+ category?: string;
40
41
  value?: ComponentValueDescriptor;
41
42
  properties: Record<string, ComponentPropertyDescriptor>;
42
43
  interaction: ComponentInteraction;
@@ -549,6 +550,34 @@ interface Diagnostic {
549
550
  ownerId?: string;
550
551
  }
551
552
 
553
+ interface Point {
554
+ x: number;
555
+ y: number;
556
+ }
557
+ interface Bounds {
558
+ minX: number;
559
+ minY: number;
560
+ maxX: number;
561
+ maxY: number;
562
+ }
563
+ type Side = 'top' | 'right' | 'bottom' | 'left';
564
+
565
+ interface Dimension {
566
+ id: string;
567
+ start: Point;
568
+ end: Point;
569
+ offset: number;
570
+ text?: string;
571
+ unit?: string;
572
+ strokeColor?: string;
573
+ strokeWidth?: number;
574
+ textColor?: string;
575
+ fontSize?: number;
576
+ order?: number;
577
+ sourceIndex?: number;
578
+ parentFrameId?: string;
579
+ }
580
+
552
581
  interface Frame {
553
582
  id: string;
554
583
  name?: string;
@@ -577,18 +606,6 @@ interface Frame {
577
606
  isLocked?: boolean;
578
607
  }
579
608
 
580
- interface Point {
581
- x: number;
582
- y: number;
583
- }
584
- interface Bounds {
585
- minX: number;
586
- minY: number;
587
- maxX: number;
588
- maxY: number;
589
- }
590
- type Side = 'top' | 'right' | 'bottom' | 'left';
591
-
592
609
  type IsometricFace = 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right';
593
610
  interface IsometricObject {
594
611
  id: string;
@@ -597,6 +614,8 @@ interface IsometricObject {
597
614
  width: number;
598
615
  height: number;
599
616
  depth: number;
617
+ footprint?: Array<[number, number]>;
618
+ form?: 'box' | 'sphere';
600
619
  rotation?: number;
601
620
  order?: number;
602
621
  sourceIndex?: number;
@@ -676,7 +695,9 @@ interface Link {
676
695
  laneId?: string;
677
696
  }
678
697
 
679
- type PathPoint = Point;
698
+ interface PathPoint extends Point {
699
+ tension?: number;
700
+ }
680
701
  interface FreeformPath {
681
702
  id: string;
682
703
  x: number;
@@ -703,6 +724,7 @@ type ShaderParameter = string | number | boolean;
703
724
  interface Shader {
704
725
  name: string;
705
726
  program: string;
727
+ surfacePadding?: number;
706
728
  parameters: Record<string, ShaderParameter>;
707
729
  }
708
730
 
@@ -805,6 +827,7 @@ interface RenderInput {
805
827
  swimlanes: Swimlane[];
806
828
  isometricObjects?: IsometricObject[];
807
829
  paths?: FreeformPath[];
830
+ dimensions?: Dimension[];
808
831
  charts?: Chart[];
809
832
  components?: Component[];
810
833
  widgets?: Component[];
@@ -843,6 +866,7 @@ interface SceneStyle {
843
866
  lineJoin?: 'miter' | 'round' | 'bevel';
844
867
  opacity?: number;
845
868
  pointerEvents?: 'none' | 'all' | 'stroke';
869
+ transition?: number;
846
870
  shadow?: {
847
871
  color: string;
848
872
  opacity: number;
@@ -871,7 +895,7 @@ interface SceneStyle {
871
895
  d: string;
872
896
  };
873
897
  }
874
- type SceneRole = 'shape' | 'link' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric';
898
+ type SceneRole = 'shape' | 'link' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric' | 'dimension';
875
899
  interface SceneAria {
876
900
  role: string;
877
901
  checked?: boolean;
@@ -1115,4 +1139,4 @@ interface ComponentDefinition extends ComponentDescriptor {
1115
1139
  }
1116
1140
  declare function defineComponent(definition: ComponentDefinition): () => void;
1117
1141
 
1118
- export { type RenderDiagnostic as A, type Bounds as B, type Component as C, type Diagnostic as D, type RenderNode as E, type Frame as F, type GenericComponent as G, type RenderOptions as H, type IsometricFace as I, type RenderResult as J, type RenderScene as K, type LinkStyle as L, type MeasureTextFactory as M, type SceneRole as N, type ShaderParameter as O, type PathPoint as P, type ShapeType as Q, type RollingNumberComponent as R, type Shader as S, type TickScaleComponent as T, type TextMetrics as U, defineComponent as V, render as W, renderCanvas as X, type Side as Y, type ComponentDescriptor as a, type RollingNumberComponentStyle as b, type RulerComponent as c, type RenderInput as d, type ShadowStyle as e, type Shape as f, type Link as g, type Swimlane as h, type IsometricObject as i, type FreeformPath as j, type Chart as k, CHART_TYPES as l, type ChartAxis as m, type ChartRamp as n, type ChartSeries as o, type ChartType as p, type ComponentDefinition as q, type ComponentGroup as r, type ComponentInteraction as s, type ComponentPropertyDescriptor as t, type ComponentSceneContext as u, type ComponentSize as v, type ComponentValue as w, type ComponentValueDescriptor as x, type ComponentValueType as y, type Point as z };
1142
+ 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 };
@@ -1,7 +1,7 @@
1
1
  type ComponentGroup = 'readout' | 'input' | 'action' | 'navigation';
2
2
  type ComponentValueType = 'number' | 'string' | 'boolean';
3
3
  type ComponentValue = number | string | boolean;
4
- type ComponentInteraction = 'none' | 'toggle' | 'press' | 'scale';
4
+ type ComponentInteraction = 'none' | 'toggle' | 'press' | 'scale' | 'slide' | 'pick' | 'turn' | 'range';
5
5
  interface ComponentValueDescriptor {
6
6
  type: ComponentValueType;
7
7
  writable: boolean;
@@ -37,6 +37,7 @@ interface ComponentSize {
37
37
  interface ComponentDescriptor {
38
38
  type: string;
39
39
  group: ComponentGroup;
40
+ category?: string;
40
41
  value?: ComponentValueDescriptor;
41
42
  properties: Record<string, ComponentPropertyDescriptor>;
42
43
  interaction: ComponentInteraction;
@@ -549,6 +550,34 @@ interface Diagnostic {
549
550
  ownerId?: string;
550
551
  }
551
552
 
553
+ interface Point {
554
+ x: number;
555
+ y: number;
556
+ }
557
+ interface Bounds {
558
+ minX: number;
559
+ minY: number;
560
+ maxX: number;
561
+ maxY: number;
562
+ }
563
+ type Side = 'top' | 'right' | 'bottom' | 'left';
564
+
565
+ interface Dimension {
566
+ id: string;
567
+ start: Point;
568
+ end: Point;
569
+ offset: number;
570
+ text?: string;
571
+ unit?: string;
572
+ strokeColor?: string;
573
+ strokeWidth?: number;
574
+ textColor?: string;
575
+ fontSize?: number;
576
+ order?: number;
577
+ sourceIndex?: number;
578
+ parentFrameId?: string;
579
+ }
580
+
552
581
  interface Frame {
553
582
  id: string;
554
583
  name?: string;
@@ -577,18 +606,6 @@ interface Frame {
577
606
  isLocked?: boolean;
578
607
  }
579
608
 
580
- interface Point {
581
- x: number;
582
- y: number;
583
- }
584
- interface Bounds {
585
- minX: number;
586
- minY: number;
587
- maxX: number;
588
- maxY: number;
589
- }
590
- type Side = 'top' | 'right' | 'bottom' | 'left';
591
-
592
609
  type IsometricFace = 'top' | 'bottom' | 'front' | 'back' | 'left' | 'right';
593
610
  interface IsometricObject {
594
611
  id: string;
@@ -597,6 +614,8 @@ interface IsometricObject {
597
614
  width: number;
598
615
  height: number;
599
616
  depth: number;
617
+ footprint?: Array<[number, number]>;
618
+ form?: 'box' | 'sphere';
600
619
  rotation?: number;
601
620
  order?: number;
602
621
  sourceIndex?: number;
@@ -676,7 +695,9 @@ interface Link {
676
695
  laneId?: string;
677
696
  }
678
697
 
679
- type PathPoint = Point;
698
+ interface PathPoint extends Point {
699
+ tension?: number;
700
+ }
680
701
  interface FreeformPath {
681
702
  id: string;
682
703
  x: number;
@@ -703,6 +724,7 @@ type ShaderParameter = string | number | boolean;
703
724
  interface Shader {
704
725
  name: string;
705
726
  program: string;
727
+ surfacePadding?: number;
706
728
  parameters: Record<string, ShaderParameter>;
707
729
  }
708
730
 
@@ -805,6 +827,7 @@ interface RenderInput {
805
827
  swimlanes: Swimlane[];
806
828
  isometricObjects?: IsometricObject[];
807
829
  paths?: FreeformPath[];
830
+ dimensions?: Dimension[];
808
831
  charts?: Chart[];
809
832
  components?: Component[];
810
833
  widgets?: Component[];
@@ -843,6 +866,7 @@ interface SceneStyle {
843
866
  lineJoin?: 'miter' | 'round' | 'bevel';
844
867
  opacity?: number;
845
868
  pointerEvents?: 'none' | 'all' | 'stroke';
869
+ transition?: number;
846
870
  shadow?: {
847
871
  color: string;
848
872
  opacity: number;
@@ -871,7 +895,7 @@ interface SceneStyle {
871
895
  d: string;
872
896
  };
873
897
  }
874
- type SceneRole = 'shape' | 'link' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric';
898
+ type SceneRole = 'shape' | 'link' | 'frame' | 'swimlane' | 'path' | 'chart' | 'widget' | 'isometric' | 'dimension';
875
899
  interface SceneAria {
876
900
  role: string;
877
901
  checked?: boolean;
@@ -1115,4 +1139,4 @@ interface ComponentDefinition extends ComponentDescriptor {
1115
1139
  }
1116
1140
  declare function defineComponent(definition: ComponentDefinition): () => void;
1117
1141
 
1118
- export { type RenderDiagnostic as A, type Bounds as B, type Component as C, type Diagnostic as D, type RenderNode as E, type Frame as F, type GenericComponent as G, type RenderOptions as H, type IsometricFace as I, type RenderResult as J, type RenderScene as K, type LinkStyle as L, type MeasureTextFactory as M, type SceneRole as N, type ShaderParameter as O, type PathPoint as P, type ShapeType as Q, type RollingNumberComponent as R, type Shader as S, type TickScaleComponent as T, type TextMetrics as U, defineComponent as V, render as W, renderCanvas as X, type Side as Y, type ComponentDescriptor as a, type RollingNumberComponentStyle as b, type RulerComponent as c, type RenderInput as d, type ShadowStyle as e, type Shape as f, type Link as g, type Swimlane as h, type IsometricObject as i, type FreeformPath as j, type Chart as k, CHART_TYPES as l, type ChartAxis as m, type ChartRamp as n, type ChartSeries as o, type ChartType as p, type ComponentDefinition as q, type ComponentGroup as r, type ComponentInteraction as s, type ComponentPropertyDescriptor as t, type ComponentSceneContext as u, type ComponentSize as v, type ComponentValue as w, type ComponentValueDescriptor as x, type ComponentValueType as y, type Point as z };
1142
+ 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 };
@@ -1,5 +1,5 @@
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';
1
+ import { J as RenderOptions, K as RenderResult } from './render-BU2uYzjG.cjs';
2
+ import { R as Row, c as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-BIP70z72.cjs';
3
3
 
4
4
  declare function createBindingRuntime(sfl: string, options?: BindingRuntimeOptions): BindingRuntime;
5
5
  interface RenderBoundOptions extends RenderOptions {
@@ -1,5 +1,5 @@
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';
1
+ import { J as RenderOptions, K as RenderResult } from './render-BU2uYzjG.js';
2
+ import { R as Row, c as BindingRuntimeOptions, b as BindingRuntime } from './runtimeTypes-DalvhScn.js';
3
3
 
4
4
  declare function createBindingRuntime(sfl: string, options?: BindingRuntimeOptions): BindingRuntime;
5
5
  interface RenderBoundOptions extends RenderOptions {
@@ -1,6 +1,6 @@
1
- import { d as RenderInput, w as ComponentValue, J as RenderResult, H as RenderOptions } from './render-CgX_y15a.cjs';
1
+ import { e as RenderInput, x as ComponentValue, K as RenderResult, J as RenderOptions } from './render-BU2uYzjG.cjs';
2
2
 
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"];
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';
@@ -234,6 +234,7 @@ interface BindingRuntime {
234
234
  release(id: string, tapped: boolean): void;
235
235
  activate(id: string): void;
236
236
  change(id: string, value: ComponentValue): boolean;
237
+ slide(id: string, x: number, y?: number): void;
237
238
  drag(id: string, pointer?: number): void;
238
239
  tick(seconds: number): void;
239
240
  flush(): RenderResult | null;
@@ -1,6 +1,6 @@
1
- import { d as RenderInput, w as ComponentValue, J as RenderResult, H as RenderOptions } from './render-CgX_y15a.js';
1
+ import { e as RenderInput, x as ComponentValue, K as RenderResult, J as RenderOptions } from './render-BU2uYzjG.js';
2
2
 
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"];
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';
@@ -234,6 +234,7 @@ interface BindingRuntime {
234
234
  release(id: string, tapped: boolean): void;
235
235
  activate(id: string): void;
236
236
  change(id: string, value: ComponentValue): boolean;
237
+ slide(id: string, x: number, y?: number): void;
237
238
  drag(id: string, pointer?: number): void;
238
239
  tick(seconds: number): void;
239
240
  flush(): RenderResult | null;