@likec4/diagram 1.58.0 → 1.59.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 (229) hide show
  1. package/dist/LikeC4Diagram.js +1 -1
  2. package/dist/LikeC4Diagram.props.d.ts +1 -1
  3. package/dist/LikeC4Styles.js +1 -1
  4. package/dist/LikeC4View.js +2 -2
  5. package/dist/ReactLikeC4.d.ts +1 -1
  6. package/dist/base/Base.d.ts +3 -2
  7. package/dist/base/Base.js +14 -26
  8. package/dist/base/BaseXYFlow.d.ts +2 -1
  9. package/dist/base/BaseXYFlow.js +63 -4
  10. package/dist/base/keyboardZoom.d.ts +3 -0
  11. package/dist/base/keyboardZoom.js +20 -0
  12. package/dist/base/updateEdges.js +7 -16
  13. package/dist/base/updateNodes.js +3 -9
  14. package/dist/base-primitives/compound/CompoundActionButton.d.ts +2 -1
  15. package/dist/base-primitives/compound/CompoundActionButton.js +5 -2
  16. package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +2 -1
  17. package/dist/base-primitives/compound/CompoundDetailsButton.js +5 -2
  18. package/dist/base-primitives/compound/CompoundTitle.d.ts +7 -1
  19. package/dist/base-primitives/compound/CompoundTitle.js +2 -1
  20. package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
  21. package/dist/base-primitives/edge/EdgeActionButton.d.ts +2 -1
  22. package/dist/base-primitives/edge/EdgeActionButton.js +2 -1
  23. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  24. package/dist/base-primitives/edge/EdgeContainer.js +4 -2
  25. package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -0
  26. package/dist/base-primitives/edge/EdgeLabel.js +2 -5
  27. package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -0
  28. package/dist/base-primitives/element/ElementActionButtons.js +4 -1
  29. package/dist/base-primitives/element/ElementData.d.ts +3 -1
  30. package/dist/base-primitives/element/ElementData.js +2 -1
  31. package/dist/base-primitives/element/ElementDetailsButton.d.ts +2 -1
  32. package/dist/base-primitives/element/ElementDetailsButton.js +5 -2
  33. package/dist/base-primitives/element/ElementNodeContainer.js +1 -1
  34. package/dist/base-primitives/element/ElementShape.js +3 -0
  35. package/dist/components/ErrorFallback.js +3 -5
  36. package/dist/components/Link.js +6 -6
  37. package/dist/components/NavigationPanel.js +1 -1
  38. package/dist/components/SearchControl.css.js +11 -11
  39. package/dist/context/TagStylesContext.d.ts +3 -3
  40. package/dist/context/TagStylesContext.js +16 -16
  41. package/dist/custom/index.d.ts +1 -0
  42. package/dist/custom/index.js +3 -2
  43. package/dist/editor/actor/actions.js +1 -1
  44. package/dist/editor/actor/machine.d.ts +4 -6
  45. package/dist/editor/actor/setup.d.ts +16 -2
  46. package/dist/editor/actor/setup.js +5 -4
  47. package/dist/hooks/index.d.ts +1 -1
  48. package/dist/hooks/safeContext.d.ts +156 -3
  49. package/dist/hooks/safeContext.js +60 -12
  50. package/dist/hooks/useCurrentViewModel.js +1 -1
  51. package/dist/hooks/useDiagram.d.ts +8 -0
  52. package/dist/hooks/useDiagram.js +9 -2
  53. package/dist/hooks/useEditorActor.js +1 -1
  54. package/dist/hooks/useLikeC4ElementsTree.js +1 -1
  55. package/dist/hooks/useLikeC4Model.js +1 -1
  56. package/dist/hooks/useXYFlow.d.ts +1 -0
  57. package/dist/hooks/useXYFlow.js +5 -3
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +2 -2
  60. package/dist/likec4diagram/DiagramUI.js +19 -6
  61. package/dist/likec4diagram/DiagramXYFlow.js +39 -14
  62. package/dist/likec4diagram/convert-to-xyflow.d.ts +3 -5
  63. package/dist/likec4diagram/convert-to-xyflow.js +29 -10
  64. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +13 -4
  65. package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +11 -4
  66. package/dist/likec4diagram/custom/edges/edges.css.js +1 -1
  67. package/dist/likec4diagram/custom/index.d.ts +2 -1
  68. package/dist/likec4diagram/custom/index.js +5 -3
  69. package/dist/likec4diagram/custom/nodes/CompoundActions.js +1 -0
  70. package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
  71. package/dist/likec4diagram/custom/nodes/ElementActions.js +13 -3
  72. package/dist/likec4diagram/custom/nodes/NodeNotes.js +0 -4
  73. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +32 -19
  74. package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.ts +2 -0
  75. package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +234 -0
  76. package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
  77. package/dist/likec4diagram/custom/nodes/nodes.js +20 -5
  78. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
  79. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +1 -1
  80. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -14
  81. package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
  82. package/dist/likec4diagram/state/DiagramActorProvider.js +11 -20
  83. package/dist/likec4diagram/state/aligners.js +1 -1
  84. package/dist/likec4diagram/state/assign.d.ts +1 -1
  85. package/dist/likec4diagram/state/assign.js +1 -1
  86. package/dist/likec4diagram/state/createViewChange.js +1 -1
  87. package/dist/likec4diagram/state/diagram-api.d.ts +18 -10
  88. package/dist/likec4diagram/state/diagram-api.js +333 -229
  89. package/dist/likec4diagram/state/machine.actions.d.ts +1026 -332
  90. package/dist/likec4diagram/state/machine.actions.js +115 -44
  91. package/dist/likec4diagram/state/machine.actions.layout.d.ts +123 -51
  92. package/dist/likec4diagram/state/machine.actions.layout.js +40 -33
  93. package/dist/likec4diagram/state/machine.d.ts +154 -16
  94. package/dist/likec4diagram/state/machine.js +5 -41
  95. package/dist/likec4diagram/state/machine.setup.d.ts +84 -19
  96. package/dist/likec4diagram/state/machine.setup.js +65 -12
  97. package/dist/likec4diagram/state/machine.state.initializing.d.ts +59 -33
  98. package/dist/likec4diagram/state/machine.state.navigating.js +7 -3
  99. package/dist/likec4diagram/state/machine.state.ready.d.ts +1540 -476
  100. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +294 -53
  101. package/dist/likec4diagram/state/machine.state.ready.focused.js +3 -3
  102. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +264 -73
  103. package/dist/likec4diagram/state/machine.state.ready.idle.js +31 -6
  104. package/dist/likec4diagram/state/machine.state.ready.js +22 -16
  105. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +23 -9
  106. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +288 -84
  107. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +135 -66
  108. package/dist/likec4diagram/state/types.d.ts +4 -2
  109. package/dist/likec4diagram/state/utils.d.ts +7 -0
  110. package/dist/likec4diagram/state/utils.js +36 -34
  111. package/dist/likec4diagram/types.d.ts +47 -3
  112. package/dist/likec4diagram/ui/FloatingSequenceActors.d.ts +6 -0
  113. package/dist/likec4diagram/ui/FloatingSequenceActors.js +155 -0
  114. package/dist/likec4diagram/ui/LayoutDriftFrame.js +2 -2
  115. package/dist/likec4diagram/ui/index.d.ts +2 -0
  116. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -5
  117. package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +2 -0
  118. package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +519 -0
  119. package/dist/likec4diagram/ui/sequence-outline/state.d.ts +36 -0
  120. package/dist/likec4diagram/ui/sequence-outline/state.js +55 -0
  121. package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +1 -1
  122. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +112 -60
  123. package/dist/likec4diagram/xyflow-sequence/_types.d.ts +55 -5
  124. package/dist/likec4diagram/xyflow-sequence/const.d.ts +5 -5
  125. package/dist/likec4diagram/xyflow-sequence/const.js +4 -4
  126. package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +30 -6
  127. package/dist/likec4diagram/xyflow-sequence/layouter.js +561 -0
  128. package/dist/likec4diagram/xyflow-sequence/{sequence-layout.d.ts → sequence-view-to-xy.d.ts} +8 -2
  129. package/dist/likec4diagram/xyflow-sequence/{sequence-layout.js → sequence-view-to-xy.js} +111 -14
  130. package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +2 -7
  131. package/dist/likec4diagram/xyflow-sequence/sequence-view.js +144 -0
  132. package/dist/likec4diagram/xyflow-sequence/utils.d.ts +9 -1
  133. package/dist/likec4diagram/xyflow-sequence/utils.js +96 -0
  134. package/dist/navigationpanel/NavigationPanel.d.ts +5 -2
  135. package/dist/navigationpanel/NavigationPanel.js +58 -59
  136. package/dist/navigationpanel/NavigationPanelDropdown.js +45 -38
  137. package/dist/navigationpanel/_common.js +2 -2
  138. package/dist/navigationpanel/actor.actions.d.ts +19 -0
  139. package/dist/navigationpanel/actor.actions.js +45 -0
  140. package/dist/navigationpanel/actor.d.ts +34 -96
  141. package/dist/navigationpanel/actor.js +21 -84
  142. package/dist/navigationpanel/actor.setup.d.ts +98 -0
  143. package/dist/navigationpanel/actor.setup.js +31 -0
  144. package/dist/navigationpanel/comparepanel/DriftsSummary.js +4 -5
  145. package/dist/navigationpanel/controls/DetailsControls.js +7 -8
  146. package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
  147. package/dist/navigationpanel/editorpanel/styles.js +8 -8
  148. package/dist/navigationpanel/hooks.d.ts +20 -5
  149. package/dist/navigationpanel/hooks.js +4 -18
  150. package/dist/navigationpanel/styles.css.d.ts +1 -1
  151. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +2 -2
  152. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +4 -4
  153. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +23 -25
  154. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +5 -5
  155. package/dist/overlays/Overlays.d.ts +4 -2
  156. package/dist/overlays/Overlays.js +10 -10
  157. package/dist/overlays/element-details/ElementDetailsCard.css.js +17 -17
  158. package/dist/overlays/element-details/MetadataValue.js +15 -15
  159. package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -5
  160. package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -11
  161. package/dist/overlays/element-details/TabPanelRelationships.js +1 -1
  162. package/dist/overlays/element-details/TabPanelStructure.css.js +2 -2
  163. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  164. package/dist/overlays/element-details/actor.d.ts +2 -3
  165. package/dist/overlays/hooks.d.ts +28 -0
  166. package/dist/overlays/hooks.js +5 -0
  167. package/dist/overlays/overlay/Overlay.js +34 -25
  168. package/dist/overlays/overlaysActor.js +0 -1
  169. package/dist/overlays/relationship-details/custom/nodeTypes.js +1 -1
  170. package/dist/overlays/relationship-details/layout.js +1 -1
  171. package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
  172. package/dist/overlays/relationships-browser/actor.js +79 -78
  173. package/dist/overlays/relationships-browser/custom/nodeTypes.js +1 -1
  174. package/dist/overlays/relationships-browser/hooks.js +1 -1
  175. package/dist/overlays/relationships-browser/layout.js +2 -2
  176. package/dist/projects-overview/actor.js +4 -4
  177. package/dist/search/Search.js +1 -1
  178. package/dist/search/components/ElementsColumn.css.js +2 -2
  179. package/dist/search/components/ViewsColum.js +1 -1
  180. package/dist/search/components/_shared.css.d.ts +1 -1
  181. package/dist/search/components/_shared.css.js +23 -23
  182. package/dist/search/components/styles.css.js +4 -4
  183. package/dist/shadowroot/ShadowRoot.d.ts +1 -1
  184. package/dist/shadowroot/ShadowRoot.js +76 -28
  185. package/dist/styles2.js +1 -1
  186. package/dist/utils/defineActors.d.ts +21 -0
  187. package/dist/utils/defineActors.js +13 -0
  188. package/dist/utils/index.d.ts +1 -0
  189. package/dist/utils/index.js +5 -4
  190. package/dist/utils/readableText.d.ts +11 -0
  191. package/dist/utils/readableText.js +18 -0
  192. package/package.json +18 -30
  193. package/panda.buildinfo.json +267 -288
  194. package/styles-min.css +1 -1
  195. package/styles.css +1 -1
  196. package/adhoc-editor/package.json +0 -4
  197. package/dist/adhoc-editor/EditorPanel.d.ts +0 -1
  198. package/dist/adhoc-editor/EditorPanel.js +0 -106
  199. package/dist/adhoc-editor/ElementsTree.d.ts +0 -2
  200. package/dist/adhoc-editor/ElementsTree.js +0 -112
  201. package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +0 -4
  202. package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +0 -83
  203. package/dist/adhoc-editor/components/Tree.d.ts +0 -48
  204. package/dist/adhoc-editor/components/Tree.js +0 -213
  205. package/dist/adhoc-editor/hooks.d.ts +0 -14
  206. package/dist/adhoc-editor/hooks.js +0 -34
  207. package/dist/adhoc-editor/index.d.ts +0 -2
  208. package/dist/adhoc-editor/index.js +0 -2
  209. package/dist/adhoc-editor/state/ActorProvider.d.ts +0 -5
  210. package/dist/adhoc-editor/state/ActorProvider.js +0 -37
  211. package/dist/adhoc-editor/state/actor.d.ts +0 -13
  212. package/dist/adhoc-editor/state/actor.editor.d.ts +0 -56
  213. package/dist/adhoc-editor/state/actor.editor.js +0 -167
  214. package/dist/adhoc-editor/state/actor.js +0 -14
  215. package/dist/adhoc-editor/state/actor.layouter.d.ts +0 -51
  216. package/dist/adhoc-editor/state/actor.layouter.js +0 -54
  217. package/dist/adhoc-editor/state/actor.types.d.ts +0 -63
  218. package/dist/adhoc-editor/state/actor.types.js +0 -25
  219. package/dist/adhoc-editor/state/panel.d.ts +0 -95
  220. package/dist/adhoc-editor/state/panel.js +0 -124
  221. package/dist/adhoc-editor/state/utils.d.ts +0 -17
  222. package/dist/adhoc-editor/state/utils.js +0 -25
  223. package/dist/adhoc-editor/useElementsTree.d.ts +0 -18
  224. package/dist/adhoc-editor/useElementsTree.js +0 -98
  225. package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +0 -6
  226. package/dist/context/ShadowRootContext.d.ts +0 -3
  227. package/dist/context/ShadowRootContext.js +0 -5
  228. package/dist/shadowroot/styles.d.ts +0 -13
  229. package/dist/shadowroot/styles.js +0 -60
@@ -1,14 +1,71 @@
1
- import { GuardPredicate, ParameterizedObject, ActionFunction } from 'xstate';
1
+ import { GuardPredicate, ActionFunction, ParameterizedObject } from 'xstate';
2
2
  import { Context, Events, EmittedEvents } from './machine.setup';
3
+ import { SearchActorLogic } from '../../search/searchActor';
3
4
  import { HotkeyActorLogic } from './hotkeyActor';
4
5
  import { OverlaysActorLogic } from '../../overlays/overlaysActor';
5
- import { SearchActorLogic } from '../../search/searchActor';
6
6
  import { MediaPrintActorLogic } from './mediaPrintActor';
7
7
  import { EditorActorLogic } from '../../editor';
8
+ import { NavigationPanelActorLogic } from '../../navigationpanel/actor';
8
9
  export declare const idle: {
9
10
  id: string;
10
11
  on: {
11
12
  'xyflow.nodeClick': ({
13
+ description: string;
14
+ guard: GuardPredicate<Context, {
15
+ type: "xyflow.nodeClick";
16
+ node: import("../types").Types.Node;
17
+ }, unknown, {
18
+ type: "is dynamic view in sequence variant";
19
+ params: undefined;
20
+ } | {
21
+ type: "click: node.type = seq-subflow";
22
+ params: undefined;
23
+ } | {
24
+ type: "click: same node";
25
+ params: undefined;
26
+ }>;
27
+ actions: ActionFunction<Context, {
28
+ type: "xyflow.nodeClick";
29
+ node: import("../types").Types.Node;
30
+ }, Events, undefined, never, never, never, never, never>;
31
+ } | {
32
+ description: string;
33
+ guard: GuardPredicate<Context, {
34
+ type: "xyflow.nodeClick";
35
+ node: import("../types").Types.Node;
36
+ }, unknown, {
37
+ type: "is dynamic view in sequence variant";
38
+ params: undefined;
39
+ } | {
40
+ type: "click: node.type = seq-subflow";
41
+ params: undefined;
42
+ }>;
43
+ actions: ActionFunction<Context, Events, Events, undefined, {
44
+ src: "search";
45
+ logic: SearchActorLogic;
46
+ id: "search";
47
+ } | {
48
+ src: "hotkey";
49
+ logic: HotkeyActorLogic;
50
+ id: "hotkey";
51
+ } | {
52
+ src: "overlays";
53
+ logic: OverlaysActorLogic;
54
+ id: "overlays";
55
+ } | {
56
+ src: "mediaPrint";
57
+ logic: MediaPrintActorLogic;
58
+ id: "mediaPrint";
59
+ } | {
60
+ src: "editor";
61
+ logic: EditorActorLogic;
62
+ id: "editor";
63
+ } | {
64
+ src: "navigationPanel";
65
+ logic: NavigationPanelActorLogic;
66
+ id: "navigationPanel";
67
+ }, never, never, never, never>[];
68
+ } | {
12
69
  target: string;
13
70
  guard: GuardPredicate<Context, {
14
71
  type: "xyflow.nodeClick";
@@ -19,7 +76,10 @@ export declare const idle: {
19
76
  } | {
20
77
  type: "enabled: FocusMode";
21
78
  params: undefined;
22
- } | {
79
+ } | ({
80
+ type: "is dynamic view in sequence variant";
81
+ params: undefined;
82
+ } & ParameterizedObject) | {
23
83
  type: "click: node has connections";
24
84
  params: undefined;
25
85
  } | ((({
@@ -29,27 +89,110 @@ export declare const idle: {
29
89
  type: "click: selected node";
30
90
  params: undefined;
31
91
  }) | undefined) & ParameterizedObject)>;
32
- actions: ( ActionFunction<Context, Events, Events, undefined, {
33
- src: "hotkeyActorLogic";
92
+ actions: ActionFunction<Context, Events, Events, undefined, {
93
+ src: "search";
94
+ logic: SearchActorLogic;
95
+ id: "search";
96
+ } | {
97
+ src: "hotkey";
34
98
  logic: HotkeyActorLogic;
35
99
  id: "hotkey";
36
100
  } | {
37
- src: "overlaysActorLogic";
101
+ src: "overlays";
38
102
  logic: OverlaysActorLogic;
39
103
  id: "overlays";
40
104
  } | {
41
- src: "searchActorLogic";
42
- logic: SearchActorLogic;
43
- id: "search";
44
- } | {
45
- src: "mediaPrintActorLogic";
105
+ src: "mediaPrint";
46
106
  logic: MediaPrintActorLogic;
47
107
  id: "mediaPrint";
48
108
  } | {
49
- src: "editorActor";
109
+ src: "editor";
50
110
  logic: EditorActorLogic;
51
111
  id: "editor";
52
- }, never, never, never, never> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents>)[];
112
+ } | {
113
+ src: "navigationPanel";
114
+ logic: NavigationPanelActorLogic;
115
+ id: "navigationPanel";
116
+ }, never, {
117
+ type: "isReady";
118
+ params: unknown;
119
+ } | {
120
+ type: "enabled: Editor";
121
+ params: unknown;
122
+ } | {
123
+ type: "enabled: FitView";
124
+ params: unknown;
125
+ } | {
126
+ type: "enabled: FocusMode";
127
+ params: unknown;
128
+ } | {
129
+ type: "enabled: Readonly";
130
+ params: unknown;
131
+ } | {
132
+ type: "enabled: RelationshipDetails";
133
+ params: unknown;
134
+ } | {
135
+ type: "enabled: Search";
136
+ params: unknown;
137
+ } | {
138
+ type: "enabled: ElementDetails";
139
+ params: unknown;
140
+ } | {
141
+ type: "enabled: OpenSource";
142
+ params: unknown;
143
+ } | {
144
+ type: "enabled: DynamicViewWalkthrough";
145
+ params: unknown;
146
+ } | {
147
+ type: "enabled: NavigationPanel";
148
+ params: unknown;
149
+ } | {
150
+ type: "focus.node: autoUnfocus";
151
+ params: unknown;
152
+ } | {
153
+ type: "enabled: Overlays";
154
+ params: unknown;
155
+ } | {
156
+ type: "not readonly";
157
+ params: unknown;
158
+ } | {
159
+ type: "is dynamic view";
160
+ params: unknown;
161
+ } | {
162
+ type: "is dynamic view in sequence variant";
163
+ params: unknown;
164
+ } | {
165
+ type: "is same view";
166
+ params: unknown;
167
+ } | {
168
+ type: "is another view";
169
+ params: unknown;
170
+ } | {
171
+ type: "click: node has modelFqn";
172
+ params: unknown;
173
+ } | {
174
+ type: "click: selected node";
175
+ params: unknown;
176
+ } | {
177
+ type: "click: same node";
178
+ params: unknown;
179
+ } | {
180
+ type: "click: focused node";
181
+ params: unknown;
182
+ } | {
183
+ type: "click: node.type = seq-subflow";
184
+ params: unknown;
185
+ } | {
186
+ type: "click: node has connections";
187
+ params: unknown;
188
+ } | {
189
+ type: "click: selected edge";
190
+ params: unknown;
191
+ } | {
192
+ type: "click: active walkthrough step";
193
+ params: unknown;
194
+ }, never, EmittedEvents>[];
195
+ description?: never;
53
196
  } | {
54
197
  guard: GuardPredicate<Context, {
55
198
  type: "xyflow.nodeClick";
@@ -71,25 +214,29 @@ export declare const idle: {
71
214
  params: undefined;
72
215
  }) | undefined) & ParameterizedObject)>;
73
216
  actions: ActionFunction<Context, Events, Events, undefined, {
74
- src: "hotkeyActorLogic";
217
+ src: "search";
218
+ logic: SearchActorLogic;
219
+ id: "search";
220
+ } | {
221
+ src: "hotkey";
75
222
  logic: HotkeyActorLogic;
76
223
  id: "hotkey";
77
224
  } | {
78
- src: "overlaysActorLogic";
225
+ src: "overlays";
79
226
  logic: OverlaysActorLogic;
80
227
  id: "overlays";
81
228
  } | {
82
- src: "searchActorLogic";
83
- logic: SearchActorLogic;
84
- id: "search";
85
- } | {
86
- src: "mediaPrintActorLogic";
229
+ src: "mediaPrint";
87
230
  logic: MediaPrintActorLogic;
88
231
  id: "mediaPrint";
89
232
  } | {
90
- src: "editorActor";
233
+ src: "editor";
91
234
  logic: EditorActorLogic;
92
235
  id: "editor";
236
+ } | {
237
+ src: "navigationPanel";
238
+ logic: NavigationPanelActorLogic;
239
+ id: "navigationPanel";
93
240
  }, never, {
94
241
  type: "isReady";
95
242
  params: unknown;
@@ -120,6 +267,9 @@ export declare const idle: {
120
267
  } | {
121
268
  type: "enabled: DynamicViewWalkthrough";
122
269
  params: unknown;
270
+ } | {
271
+ type: "enabled: NavigationPanel";
272
+ params: unknown;
123
273
  } | {
124
274
  type: "focus.node: autoUnfocus";
125
275
  params: unknown;
@@ -132,6 +282,9 @@ export declare const idle: {
132
282
  } | {
133
283
  type: "is dynamic view";
134
284
  params: unknown;
285
+ } | {
286
+ type: "is dynamic view in sequence variant";
287
+ params: unknown;
135
288
  } | {
136
289
  type: "is same view";
137
290
  params: unknown;
@@ -150,6 +303,9 @@ export declare const idle: {
150
303
  } | {
151
304
  type: "click: focused node";
152
305
  params: unknown;
306
+ } | {
307
+ type: "click: node.type = seq-subflow";
308
+ params: unknown;
153
309
  } | {
154
310
  type: "click: node has connections";
155
311
  params: unknown;
@@ -160,27 +316,32 @@ export declare const idle: {
160
316
  type: "click: active walkthrough step";
161
317
  params: unknown;
162
318
  }, never, EmittedEvents>[];
319
+ description?: never;
163
320
  } | {
164
321
  actions: ActionFunction<Context, Events, Events, undefined, {
165
- src: "hotkeyActorLogic";
322
+ src: "search";
323
+ logic: SearchActorLogic;
324
+ id: "search";
325
+ } | {
326
+ src: "hotkey";
166
327
  logic: HotkeyActorLogic;
167
328
  id: "hotkey";
168
329
  } | {
169
- src: "overlaysActorLogic";
330
+ src: "overlays";
170
331
  logic: OverlaysActorLogic;
171
332
  id: "overlays";
172
333
  } | {
173
- src: "searchActorLogic";
174
- logic: SearchActorLogic;
175
- id: "search";
176
- } | {
177
- src: "mediaPrintActorLogic";
334
+ src: "mediaPrint";
178
335
  logic: MediaPrintActorLogic;
179
336
  id: "mediaPrint";
180
337
  } | {
181
- src: "editorActor";
338
+ src: "editor";
182
339
  logic: EditorActorLogic;
183
340
  id: "editor";
341
+ } | {
342
+ src: "navigationPanel";
343
+ logic: NavigationPanelActorLogic;
344
+ id: "navigationPanel";
184
345
  }, never, {
185
346
  type: "isReady";
186
347
  params: unknown;
@@ -211,6 +372,9 @@ export declare const idle: {
211
372
  } | {
212
373
  type: "enabled: DynamicViewWalkthrough";
213
374
  params: unknown;
375
+ } | {
376
+ type: "enabled: NavigationPanel";
377
+ params: unknown;
214
378
  } | {
215
379
  type: "focus.node: autoUnfocus";
216
380
  params: unknown;
@@ -223,6 +387,9 @@ export declare const idle: {
223
387
  } | {
224
388
  type: "is dynamic view";
225
389
  params: unknown;
390
+ } | {
391
+ type: "is dynamic view in sequence variant";
392
+ params: unknown;
226
393
  } | {
227
394
  type: "is same view";
228
395
  params: unknown;
@@ -241,6 +408,9 @@ export declare const idle: {
241
408
  } | {
242
409
  type: "click: focused node";
243
410
  params: unknown;
411
+ } | {
412
+ type: "click: node.type = seq-subflow";
413
+ params: unknown;
244
414
  } | {
245
415
  type: "click: node has connections";
246
416
  params: unknown;
@@ -251,102 +421,119 @@ export declare const idle: {
251
421
  type: "click: active walkthrough step";
252
422
  params: unknown;
253
423
  }, never, EmittedEvents>[];
424
+ description?: never;
254
425
  guard?: never;
255
426
  })[];
256
427
  'xyflow.paneClick': {
257
428
  actions: ( ActionFunction<Context, Events, Events, undefined, {
258
- src: "hotkeyActorLogic";
429
+ src: "search";
430
+ logic: SearchActorLogic;
431
+ id: "search";
432
+ } | {
433
+ src: "hotkey";
259
434
  logic: HotkeyActorLogic;
260
435
  id: "hotkey";
261
436
  } | {
262
- src: "overlaysActorLogic";
437
+ src: "overlays";
263
438
  logic: OverlaysActorLogic;
264
439
  id: "overlays";
265
440
  } | {
266
- src: "searchActorLogic";
267
- logic: SearchActorLogic;
268
- id: "search";
269
- } | {
270
- src: "mediaPrintActorLogic";
441
+ src: "mediaPrint";
271
442
  logic: MediaPrintActorLogic;
272
443
  id: "mediaPrint";
273
444
  } | {
274
- src: "editorActor";
445
+ src: "editor";
275
446
  logic: EditorActorLogic;
276
447
  id: "editor";
448
+ } | {
449
+ src: "navigationPanel";
450
+ logic: NavigationPanelActorLogic;
451
+ id: "navigationPanel";
277
452
  }, never, never, never, never> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents>)[];
278
453
  };
279
454
  'xyflow.paneDblClick': {
280
455
  actions: ( ActionFunction<Context, Events, Events, undefined, {
281
- src: "hotkeyActorLogic";
456
+ src: "search";
457
+ logic: SearchActorLogic;
458
+ id: "search";
459
+ } | {
460
+ src: "hotkey";
282
461
  logic: HotkeyActorLogic;
283
462
  id: "hotkey";
284
463
  } | {
285
- src: "overlaysActorLogic";
464
+ src: "overlays";
286
465
  logic: OverlaysActorLogic;
287
466
  id: "overlays";
288
467
  } | {
289
- src: "searchActorLogic";
290
- logic: SearchActorLogic;
291
- id: "search";
292
- } | {
293
- src: "mediaPrintActorLogic";
468
+ src: "mediaPrint";
294
469
  logic: MediaPrintActorLogic;
295
470
  id: "mediaPrint";
296
471
  } | {
297
- src: "editorActor";
472
+ src: "editor";
298
473
  logic: EditorActorLogic;
299
474
  id: "editor";
475
+ } | {
476
+ src: "navigationPanel";
477
+ logic: NavigationPanelActorLogic;
478
+ id: "navigationPanel";
300
479
  }, never, never, never, never> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents>)[];
301
480
  };
302
481
  'focus.node': ({
482
+ target: string;
303
483
  guard: "focus.node: autoUnfocus";
304
484
  actions: ActionFunction<Context, Events, Events, undefined, {
305
- src: "hotkeyActorLogic";
485
+ src: "search";
486
+ logic: SearchActorLogic;
487
+ id: "search";
488
+ } | {
489
+ src: "hotkey";
306
490
  logic: HotkeyActorLogic;
307
491
  id: "hotkey";
308
492
  } | {
309
- src: "overlaysActorLogic";
493
+ src: "overlays";
310
494
  logic: OverlaysActorLogic;
311
495
  id: "overlays";
312
496
  } | {
313
- src: "searchActorLogic";
314
- logic: SearchActorLogic;
315
- id: "search";
316
- } | {
317
- src: "mediaPrintActorLogic";
497
+ src: "mediaPrint";
318
498
  logic: MediaPrintActorLogic;
319
499
  id: "mediaPrint";
320
500
  } | {
321
- src: "editorActor";
501
+ src: "editor";
322
502
  logic: EditorActorLogic;
323
503
  id: "editor";
504
+ } | {
505
+ src: "navigationPanel";
506
+ logic: NavigationPanelActorLogic;
507
+ id: "navigationPanel";
324
508
  }, never, never, never, never>;
325
- target: string;
326
509
  } | {
510
+ target: string;
327
511
  guard: "enabled: FocusMode";
328
512
  actions: ActionFunction<Context, Events, Events, undefined, {
329
- src: "hotkeyActorLogic";
513
+ src: "search";
514
+ logic: SearchActorLogic;
515
+ id: "search";
516
+ } | {
517
+ src: "hotkey";
330
518
  logic: HotkeyActorLogic;
331
519
  id: "hotkey";
332
520
  } | {
333
- src: "overlaysActorLogic";
521
+ src: "overlays";
334
522
  logic: OverlaysActorLogic;
335
523
  id: "overlays";
336
524
  } | {
337
- src: "searchActorLogic";
338
- logic: SearchActorLogic;
339
- id: "search";
340
- } | {
341
- src: "mediaPrintActorLogic";
525
+ src: "mediaPrint";
342
526
  logic: MediaPrintActorLogic;
343
527
  id: "mediaPrint";
344
528
  } | {
345
- src: "editorActor";
529
+ src: "editor";
346
530
  logic: EditorActorLogic;
347
531
  id: "editor";
532
+ } | {
533
+ src: "navigationPanel";
534
+ logic: NavigationPanelActorLogic;
535
+ id: "navigationPanel";
348
536
  }, never, never, never, never>;
349
- target: string;
350
537
  })[];
351
538
  'xyflow.edgeClick': {
352
539
  guard: GuardPredicate<Context, {
@@ -356,35 +543,39 @@ export declare const idle: {
356
543
  type: "enabled: Readonly";
357
544
  params: undefined;
358
545
  } | {
359
- type: "is dynamic view";
546
+ type: "enabled: DynamicViewWalkthrough";
360
547
  params: undefined;
361
548
  } | {
362
- type: "enabled: DynamicViewWalkthrough";
549
+ type: "is dynamic view";
363
550
  params: undefined;
364
551
  } | {
365
552
  type: "click: selected edge";
366
553
  params: undefined;
367
554
  }>;
368
555
  actions: ( ActionFunction<Context, Events, Events, undefined, {
369
- src: "hotkeyActorLogic";
556
+ src: "search";
557
+ logic: SearchActorLogic;
558
+ id: "search";
559
+ } | {
560
+ src: "hotkey";
370
561
  logic: HotkeyActorLogic;
371
562
  id: "hotkey";
372
563
  } | {
373
- src: "overlaysActorLogic";
564
+ src: "overlays";
374
565
  logic: OverlaysActorLogic;
375
566
  id: "overlays";
376
567
  } | {
377
- src: "searchActorLogic";
378
- logic: SearchActorLogic;
379
- id: "search";
380
- } | {
381
- src: "mediaPrintActorLogic";
568
+ src: "mediaPrint";
382
569
  logic: MediaPrintActorLogic;
383
570
  id: "mediaPrint";
384
571
  } | {
385
- src: "editorActor";
572
+ src: "editor";
386
573
  logic: EditorActorLogic;
387
574
  id: "editor";
575
+ } | {
576
+ src: "navigationPanel";
577
+ logic: NavigationPanelActorLogic;
578
+ id: "navigationPanel";
388
579
  }, never, never, never, never> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents> | ActionFunction<Context, {
389
580
  type: "xyflow.edgeClick";
390
581
  edge: import("../types").Types.Edge;
@@ -1,18 +1,42 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
2
  import { machine, targetState, to } from "./machine.setup.js";
3
3
  import { raiseFitDiagram } from "./machine.actions.layout.js";
4
- import { assignFocusedNode, assignLastClickedNode, emitEdgeClick, emitNodeClick, emitOpenSourceOfView, emitPaneClick, openElementDetails, openSourceOfFocusedOrLastClickedNode, resetLastClickedNode } from "./machine.actions.js";
5
- import { and, or } from "xstate/guards";
4
+ import { assignFocusedNode, assignLastClickedNode, emitEdgeClick, emitNodeClick, emitOpenSourceOfView, emitPaneClick, openElementDetails, openSourceOfFocusedOrLastClickedNode, resetLastClickedNode, resetSelection } from "./machine.actions.js";
5
+ import { dynamicViewFlow, invariant, isDynamicView } from "@likec4/core";
6
6
  import { raise } from "xstate/actions";
7
+ import { and, not, or } from "xstate/guards";
7
8
  //#region src/likec4diagram/state/machine.state.ready.idle.ts
8
9
  var idle = machine.createStateConfig({
9
10
  id: targetState.idle.slice(1),
10
11
  on: {
11
12
  "xyflow.nodeClick": [
13
+ {
14
+ description: "Handle sequence subflow click in sequence variant",
15
+ guard: and([
16
+ "is dynamic view in sequence variant",
17
+ "click: node.type = seq-subflow",
18
+ "click: same node"
19
+ ]),
20
+ actions: raise(({ event: { node }, context }) => {
21
+ invariant(node.type === "seq-subflow");
22
+ invariant(isDynamicView(context.view));
23
+ const flow = dynamicViewFlow(context.view);
24
+ return {
25
+ type: "walkthrough.start",
26
+ stepId: flow.firstStep(node.data.flowId) ?? flow.firstStep()
27
+ };
28
+ })
29
+ },
30
+ {
31
+ description: "Handle sequence subflow click in sequence variant",
32
+ guard: and(["is dynamic view in sequence variant", "click: node.type = seq-subflow"]),
33
+ actions: [assignLastClickedNode()]
34
+ },
12
35
  {
13
36
  guard: and([
14
37
  "enabled: Readonly",
15
38
  "enabled: FocusMode",
39
+ not("is dynamic view in sequence variant"),
16
40
  "click: node has connections",
17
41
  or(["click: same node", "click: selected node"])
18
42
  ]),
@@ -46,6 +70,7 @@ var idle = machine.createStateConfig({
46
70
  "xyflow.paneClick": { actions: [resetLastClickedNode(), emitPaneClick()] },
47
71
  "xyflow.paneDblClick": { actions: [
48
72
  resetLastClickedNode(),
73
+ resetSelection(),
49
74
  raiseFitDiagram(),
50
75
  emitOpenSourceOfView(),
51
76
  emitPaneClick()
@@ -53,24 +78,24 @@ var idle = machine.createStateConfig({
53
78
  "focus.node": [{
54
79
  guard: "focus.node: autoUnfocus",
55
80
  actions: assignFocusedNode(),
56
- target: targetState.focused
81
+ ...to.focused
57
82
  }, {
58
83
  guard: "enabled: FocusMode",
59
84
  actions: assignFocusedNode(),
60
- target: targetState.focused
85
+ ...to.focused
61
86
  }],
62
87
  "xyflow.edgeClick": {
63
88
  guard: and([
64
89
  "enabled: Readonly",
65
- "is dynamic view",
66
90
  "enabled: DynamicViewWalkthrough",
91
+ "is dynamic view",
67
92
  "click: selected edge"
68
93
  ]),
69
94
  actions: [
70
95
  resetLastClickedNode(),
71
96
  raise(({ event }) => ({
72
97
  type: "walkthrough.start",
73
- stepId: event.edge.id
98
+ stepId: event.edge.data.id
74
99
  })),
75
100
  emitEdgeClick()
76
101
  ]