@likec4/diagram 1.56.0 → 1.58.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 (208) hide show
  1. package/dist/LikeC4Diagram.js +3 -1
  2. package/dist/LikeC4View.js +47 -55
  3. package/dist/adhoc-editor/EditorPanel.d.ts +1 -1
  4. package/dist/adhoc-editor/ElementsTree.d.ts +1 -1
  5. package/dist/adhoc-editor/ElementsTree.js +2 -6
  6. package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
  7. package/dist/adhoc-editor/components/Tree.d.ts +5 -5
  8. package/dist/adhoc-editor/state/ActorProvider.d.ts +1 -1
  9. package/dist/adhoc-editor/state/panel.d.ts +1 -1
  10. package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
  11. package/dist/base/BaseXYFlow.d.ts +1 -1
  12. package/dist/base-primitives/Markdown.d.ts +1 -1
  13. package/dist/base-primitives/NodeHandles.d.ts +1 -1
  14. package/dist/base-primitives/compound/CompoundActionButton.d.ts +1 -1
  15. package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +1 -1
  16. package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
  17. package/dist/base-primitives/compound/CompoundTitle.d.ts +1 -1
  18. package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
  19. package/dist/base-primitives/edge/EdgeActionButton.d.ts +1 -1
  20. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  21. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
  22. package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
  23. package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -1
  24. package/dist/base-primitives/element/ElementData.d.ts +2 -2
  25. package/dist/base-primitives/element/ElementDetailsButton.d.ts +1 -1
  26. package/dist/base-primitives/element/ElementShape.d.ts +1 -1
  27. package/dist/base-primitives/element/ElementTags.d.ts +1 -1
  28. package/dist/base-primitives/element/ElementTags.js +1 -3
  29. package/dist/components/ErrorFallback.d.ts +2 -2
  30. package/dist/components/NavigationPanel.d.ts +2 -2
  31. package/dist/components/PortalToContainer.d.ts +1 -1
  32. package/dist/components/RootContainer.d.ts +1 -1
  33. package/dist/components/RootContainer.js +19 -18
  34. package/dist/components/SearchControl.d.ts +2 -2
  35. package/dist/components/ViewNotFound.d.ts +2 -2
  36. package/dist/context/CurrentViewModelProvider.d.ts +1 -1
  37. package/dist/context/DefaultMantineProvider.d.ts +1 -1
  38. package/dist/context/DiagramEventHandlers.d.ts +1 -1
  39. package/dist/context/DiagramFeatures.d.ts +1 -1
  40. package/dist/context/DiagramFeatures.js +5 -0
  41. package/dist/context/EnsureMantine.d.ts +1 -1
  42. package/dist/context/FramerMotionConfig.d.ts +3 -3
  43. package/dist/context/FramerMotionConfig.js +2 -2
  44. package/dist/context/IconRenderer.d.ts +2 -2
  45. package/dist/context/IconRenderer.js +32 -12
  46. package/dist/context/LikeC4ModelContext.d.ts +1 -1
  47. package/dist/context/RootContainerContext.d.ts +10 -17
  48. package/dist/context/RootContainerContext.js +1 -13
  49. package/dist/context/ShadowRootContext.d.ts +3 -0
  50. package/dist/context/ShadowRootContext.js +5 -0
  51. package/dist/context/TagStylesContext.d.ts +2 -1
  52. package/dist/context/TagStylesContext.js +5 -7
  53. package/dist/custom/index.d.ts +1 -1
  54. package/dist/custom/index.js +1 -2
  55. package/dist/editor/LikeC4EditorCallbacks.d.ts +5 -0
  56. package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
  57. package/dist/editor/actor/actions.d.ts +174 -0
  58. package/dist/editor/actor/actions.js +188 -0
  59. package/dist/editor/{hotkeyActor.d.ts → actor/hotkey.d.ts} +2 -2
  60. package/dist/editor/{hotkeyActor.js → actor/hotkey.js} +11 -4
  61. package/dist/editor/{editorActor.states.d.ts → actor/machine.d.ts} +5 -3
  62. package/dist/editor/actor/machine.js +23 -0
  63. package/dist/editor/actor/setup.d.ts +55 -0
  64. package/dist/editor/{editorActor.setup.js → actor/setup.js} +14 -10
  65. package/dist/editor/actor/state.editor.d.ts +147 -0
  66. package/dist/editor/actor/state.editor.js +56 -0
  67. package/dist/editor/actor/state.sync-queue.d.ts +612 -0
  68. package/dist/editor/actor/state.sync-queue.js +272 -0
  69. package/dist/editor/actor/types.d.ts +64 -0
  70. package/dist/editor/actor/types.js +5 -0
  71. package/dist/editor/applyChangesToManualLayout.js +1 -1
  72. package/dist/editor/index.d.ts +2 -1
  73. package/dist/editor/useEditorActorLogic.d.ts +8 -2
  74. package/dist/editor/useEditorActorLogic.js +39 -7
  75. package/dist/hooks/useDiagram.js +6 -1
  76. package/dist/hooks/useDiagramCompareLayout.js +1 -1
  77. package/dist/hooks/useEditorActor.d.ts +9 -0
  78. package/dist/hooks/useEditorActor.js +27 -0
  79. package/dist/hooks/useLikeC4ElementsTree.d.ts +3 -2
  80. package/dist/hooks/useLikeC4ElementsTree.js +3 -1
  81. package/dist/index.d.ts +2 -0
  82. package/dist/index.js +3 -1
  83. package/dist/likec4diagram/DiagramUI.d.ts +1 -1
  84. package/dist/likec4diagram/DiagramUI.js +8 -4
  85. package/dist/likec4diagram/DiagramXYFlow.js +26 -14
  86. package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
  87. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +127 -14
  88. package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
  89. package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
  90. package/dist/likec4diagram/custom/edges/edges.css.js +5 -1
  91. package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
  92. package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
  93. package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
  94. package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
  95. package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
  96. package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
  97. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
  98. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
  99. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
  100. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
  101. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
  102. package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
  103. package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
  104. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
  105. package/dist/likec4diagram/state/aligners.js +3 -0
  106. package/dist/likec4diagram/state/assign.js +1 -1
  107. package/dist/likec4diagram/state/createViewChange.js +1 -0
  108. package/dist/likec4diagram/state/diagram-api.d.ts +16 -0
  109. package/dist/likec4diagram/state/diagram-api.js +13 -7
  110. package/dist/likec4diagram/state/machine.actions.js +10 -10
  111. package/dist/likec4diagram/state/machine.d.ts +1 -1
  112. package/dist/likec4diagram/state/machine.setup.js +1 -1
  113. package/dist/likec4diagram/state/types.d.ts +1 -1
  114. package/dist/likec4diagram/state/utils.d.ts +1 -1
  115. package/dist/likec4diagram/types.d.ts +2 -0
  116. package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
  117. package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
  118. package/dist/likec4diagram/useLayoutConstraints.js +2 -0
  119. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +4 -2
  120. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +1 -0
  121. package/dist/navigationpanel/NavigationPanel.d.ts +1 -1
  122. package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
  123. package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
  124. package/dist/navigationpanel/NavigationPanelDropdown.js +2 -2
  125. package/dist/navigationpanel/_common.d.ts +2 -2
  126. package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
  127. package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
  128. package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
  129. package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
  130. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
  131. package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
  132. package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
  133. package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
  134. package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
  135. package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
  136. package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
  137. package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
  138. package/dist/navigationpanel/controls/ToggleReadonly.js +4 -2
  139. package/dist/navigationpanel/editorpanel/ApplySemanticLayout.d.ts +4 -0
  140. package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +36 -0
  141. package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
  142. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
  143. package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
  144. package/dist/navigationpanel/editorpanel/EditorPanel.js +45 -33
  145. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
  146. package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
  147. package/dist/navigationpanel/styles.css.d.ts +1 -1
  148. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
  149. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +62 -62
  150. package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
  151. package/dist/overlays/Overlays.d.ts +1 -1
  152. package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
  153. package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
  154. package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
  155. package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
  156. package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
  157. package/dist/overlays/overlay/Overlay.d.ts +16 -0
  158. package/dist/overlays/overlay/Overlay.js +50 -52
  159. package/dist/overlays/overlaysActor.js +28 -27
  160. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
  161. package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
  162. package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
  163. package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -5
  164. package/dist/overlays/relationship-details/custom/nodeTypes.js +25 -24
  165. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
  166. package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
  167. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  168. package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
  169. package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
  170. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
  171. package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
  172. package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
  173. package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
  174. package/dist/search/Search.d.ts +6 -3
  175. package/dist/search/Search.js +60 -71
  176. package/dist/search/XStateSearchAdapter.d.ts +1 -1
  177. package/dist/search/components/ElementsColumn.d.ts +1 -1
  178. package/dist/search/components/ElementsColumn.js +12 -8
  179. package/dist/search/components/PickView.d.ts +1 -1
  180. package/dist/search/components/SearchByTags.d.ts +1 -1
  181. package/dist/search/components/SearchInput.d.ts +1 -1
  182. package/dist/search/components/ViewsColum.d.ts +3 -3
  183. package/dist/search/components/_shared.css.d.ts +1 -1
  184. package/dist/search/searchActor.js +30 -26
  185. package/dist/shadowroot/ShadowRoot.d.ts +6 -6
  186. package/dist/shadowroot/ShadowRoot.js +68 -23
  187. package/dist/shadowroot/index.d.ts +1 -0
  188. package/dist/shadowroot/styles.d.ts +13 -0
  189. package/dist/shadowroot/styles.js +60 -0
  190. package/dist/styles2.js +1 -1
  191. package/package.json +33 -40
  192. package/panda.buildinfo.json +19 -22
  193. package/src/styles-font.css +114 -0
  194. package/src/styles-min.css +2 -0
  195. package/src/styles-xyflow.css +1 -0
  196. package/src/styles.css +3 -0
  197. package/styles-min.css +1 -1
  198. package/styles-xyflow.css +1 -1
  199. package/styles.css +1 -1
  200. package/dist/bundle/index.d.ts +0 -1
  201. package/dist/editor/editorActor.actions.d.ts +0 -153
  202. package/dist/editor/editorActor.actions.js +0 -133
  203. package/dist/editor/editorActor.setup.d.ts +0 -84
  204. package/dist/editor/editorActor.states.js +0 -219
  205. package/dist/hooks/useOverlaysActor.js +0 -11
  206. package/dist/hooks/useSearchActor.js +0 -11
  207. package/dist/shadowroot/styles.css.d.ts +0 -4
  208. package/dist/shadowroot/styles.css.js +0 -62
@@ -0,0 +1,612 @@
1
+ import { ActionFunction, PromiseActorLogic, EventObject, CancelAction, LogAction, GuardArgs, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, DoneActorEvent, ErrorActorEvent, ActionArgs } from 'xstate';
2
+ import { EditorActorContext, EditorActorEvent, EditorActorEmitedEvent } from './types';
3
+ import { HotkeyActorLogic } from './hotkey';
4
+ import { DiagramView, Any, ViewId, ViewChange } from '@likec4/core';
5
+ export declare const syncQueue: {
6
+ initial: string;
7
+ states: {
8
+ idle: {
9
+ always: {
10
+ target: "#queue-pending";
11
+ guard: "has pending";
12
+ };
13
+ on: {
14
+ 'delete.nodes-edges': {
15
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
16
+ src: "hotkey";
17
+ logic: HotkeyActorLogic;
18
+ id: "hotkey";
19
+ } | {
20
+ src: "applyLatest";
21
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
22
+ id: string | undefined;
23
+ } | {
24
+ src: "executeChange";
25
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
26
+ id: string | undefined;
27
+ } | {
28
+ src: "applySemanticLayout";
29
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
30
+ id: string | undefined;
31
+ }, never, {
32
+ type: "has pending";
33
+ params: unknown;
34
+ } | {
35
+ type: "can undo";
36
+ params: unknown;
37
+ } | {
38
+ type: "can redo";
39
+ params: unknown;
40
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
41
+ };
42
+ 'change.sync-snapshot': {
43
+ target: "#queue-pending";
44
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
45
+ src: "hotkey";
46
+ logic: HotkeyActorLogic;
47
+ id: "hotkey";
48
+ } | {
49
+ src: "applyLatest";
50
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
51
+ id: string | undefined;
52
+ } | {
53
+ src: "executeChange";
54
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
55
+ id: string | undefined;
56
+ } | {
57
+ src: "applySemanticLayout";
58
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
59
+ id: string | undefined;
60
+ }, never, never, never, never>;
61
+ };
62
+ 'change.*': {
63
+ target: "#queue-process";
64
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
65
+ src: "hotkey";
66
+ logic: HotkeyActorLogic;
67
+ id: "hotkey";
68
+ } | {
69
+ src: "applyLatest";
70
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
71
+ id: string | undefined;
72
+ } | {
73
+ src: "executeChange";
74
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
75
+ id: string | undefined;
76
+ } | {
77
+ src: "applySemanticLayout";
78
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
79
+ id: string | undefined;
80
+ }, never, never, never, never>;
81
+ };
82
+ undo: {
83
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
84
+ src: "hotkey";
85
+ logic: HotkeyActorLogic;
86
+ id: "hotkey";
87
+ } | {
88
+ src: "applyLatest";
89
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
90
+ id: string | undefined;
91
+ } | {
92
+ src: "executeChange";
93
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
94
+ id: string | undefined;
95
+ } | {
96
+ src: "applySemanticLayout";
97
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
98
+ id: string | undefined;
99
+ }, never, {
100
+ type: "has pending";
101
+ params: unknown;
102
+ } | {
103
+ type: "can undo";
104
+ params: unknown;
105
+ } | {
106
+ type: "can redo";
107
+ params: unknown;
108
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
109
+ };
110
+ redo: {
111
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
112
+ src: "hotkey";
113
+ logic: HotkeyActorLogic;
114
+ id: "hotkey";
115
+ } | {
116
+ src: "applyLatest";
117
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
118
+ id: string | undefined;
119
+ } | {
120
+ src: "executeChange";
121
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
122
+ id: string | undefined;
123
+ } | {
124
+ src: "applySemanticLayout";
125
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
126
+ id: string | undefined;
127
+ }, never, {
128
+ type: "has pending";
129
+ params: unknown;
130
+ } | {
131
+ type: "can undo";
132
+ params: unknown;
133
+ } | {
134
+ type: "can redo";
135
+ params: unknown;
136
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
137
+ };
138
+ cancel: {
139
+ target: "#queue-idle";
140
+ actions: CancelAction<EditorActorContext, EditorActorEvent, undefined, EditorActorEvent>;
141
+ };
142
+ 'view.synched': {
143
+ actions: LogAction<EditorActorContext, {
144
+ type: "view.synched";
145
+ }, undefined, EditorActorEvent>;
146
+ };
147
+ };
148
+ id: string;
149
+ };
150
+ pending: {
151
+ on: {
152
+ 'change.sync-snapshot': {
153
+ target: "#queue-pending";
154
+ reenter: true;
155
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
156
+ src: "hotkey";
157
+ logic: HotkeyActorLogic;
158
+ id: "hotkey";
159
+ } | {
160
+ src: "applyLatest";
161
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
162
+ id: string | undefined;
163
+ } | {
164
+ src: "executeChange";
165
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
166
+ id: string | undefined;
167
+ } | {
168
+ src: "applySemanticLayout";
169
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
170
+ id: string | undefined;
171
+ }, never, never, never, never>;
172
+ };
173
+ 'change.*': {
174
+ target: "#queue-process";
175
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
176
+ src: "hotkey";
177
+ logic: HotkeyActorLogic;
178
+ id: "hotkey";
179
+ } | {
180
+ src: "applyLatest";
181
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
182
+ id: string | undefined;
183
+ } | {
184
+ src: "executeChange";
185
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
186
+ id: string | undefined;
187
+ } | {
188
+ src: "applySemanticLayout";
189
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
190
+ id: string | undefined;
191
+ }, never, never, never, never>;
192
+ };
193
+ 'delete.nodes-edges': {
194
+ target: "#queue-pending";
195
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
196
+ src: "hotkey";
197
+ logic: HotkeyActorLogic;
198
+ id: "hotkey";
199
+ } | {
200
+ src: "applyLatest";
201
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
202
+ id: string | undefined;
203
+ } | {
204
+ src: "executeChange";
205
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
206
+ id: string | undefined;
207
+ } | {
208
+ src: "applySemanticLayout";
209
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
210
+ id: string | undefined;
211
+ }, never, {
212
+ type: "has pending";
213
+ params: unknown;
214
+ } | {
215
+ type: "can undo";
216
+ params: unknown;
217
+ } | {
218
+ type: "can redo";
219
+ params: unknown;
220
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
221
+ reenter: true;
222
+ };
223
+ 'edit.move.start': {
224
+ target: "#queue-suspended";
225
+ };
226
+ undo: {
227
+ target: "#queue-pending";
228
+ reenter: true;
229
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
230
+ src: "hotkey";
231
+ logic: HotkeyActorLogic;
232
+ id: "hotkey";
233
+ } | {
234
+ src: "applyLatest";
235
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
236
+ id: string | undefined;
237
+ } | {
238
+ src: "executeChange";
239
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
240
+ id: string | undefined;
241
+ } | {
242
+ src: "applySemanticLayout";
243
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
244
+ id: string | undefined;
245
+ }, never, {
246
+ type: "has pending";
247
+ params: unknown;
248
+ } | {
249
+ type: "can undo";
250
+ params: unknown;
251
+ } | {
252
+ type: "can redo";
253
+ params: unknown;
254
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
255
+ };
256
+ redo: {
257
+ target: "#queue-pending";
258
+ reenter: true;
259
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
260
+ src: "hotkey";
261
+ logic: HotkeyActorLogic;
262
+ id: "hotkey";
263
+ } | {
264
+ src: "applyLatest";
265
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
266
+ id: string | undefined;
267
+ } | {
268
+ src: "executeChange";
269
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
270
+ id: string | undefined;
271
+ } | {
272
+ src: "applySemanticLayout";
273
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
274
+ id: string | undefined;
275
+ }, never, {
276
+ type: "has pending";
277
+ params: unknown;
278
+ } | {
279
+ type: "can undo";
280
+ params: unknown;
281
+ } | {
282
+ type: "can redo";
283
+ params: unknown;
284
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
285
+ };
286
+ cancel: {
287
+ target: "#queue-idle";
288
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
289
+ src: "hotkey";
290
+ logic: HotkeyActorLogic;
291
+ id: "hotkey";
292
+ } | {
293
+ src: "applyLatest";
294
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
295
+ id: string | undefined;
296
+ } | {
297
+ src: "executeChange";
298
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
299
+ id: string | undefined;
300
+ } | {
301
+ src: "applySemanticLayout";
302
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
303
+ id: string | undefined;
304
+ }, never, never, never, never>;
305
+ };
306
+ 'view.synched': {
307
+ actions: LogAction<EditorActorContext, {
308
+ type: "view.synched";
309
+ }, undefined, EditorActorEvent>;
310
+ };
311
+ };
312
+ after: {
313
+ 'wait-after-edit': ({
314
+ readonly target: "#queue-idle";
315
+ } | {
316
+ target: "#queue-process";
317
+ guard: "has pending";
318
+ })[];
319
+ };
320
+ id: string;
321
+ };
322
+ suspended: {
323
+ on: {
324
+ 'edit.*': {
325
+ readonly target: "#queue-idle";
326
+ };
327
+ cancel: {
328
+ target: "#queue-idle";
329
+ actions: CancelAction<EditorActorContext, EditorActorEvent, undefined, EditorActorEvent>[];
330
+ };
331
+ };
332
+ id: string;
333
+ };
334
+ process: {
335
+ initial: string;
336
+ tags: "busy"[];
337
+ states: {
338
+ peekFromQueue: {
339
+ entry: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
340
+ src: "hotkey";
341
+ logic: HotkeyActorLogic;
342
+ id: "hotkey";
343
+ } | {
344
+ src: "applyLatest";
345
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
346
+ id: string | undefined;
347
+ } | {
348
+ src: "executeChange";
349
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
350
+ id: string | undefined;
351
+ } | {
352
+ src: "applySemanticLayout";
353
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
354
+ id: string | undefined;
355
+ }, never, never, never, never>;
356
+ always: ({
357
+ guard: ({ context: { processing } }: GuardArgs<EditorActorContext, EditorActorEvent>) => boolean;
358
+ target: string;
359
+ } | {
360
+ target: "#queue-process";
361
+ guard: "has pending";
362
+ reenter: true;
363
+ } | {
364
+ target: "#queue-idle";
365
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
366
+ src: "hotkey";
367
+ logic: HotkeyActorLogic;
368
+ id: "hotkey";
369
+ } | {
370
+ src: "applyLatest";
371
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
372
+ id: string | undefined;
373
+ } | {
374
+ src: "executeChange";
375
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
376
+ id: string | undefined;
377
+ } | {
378
+ src: "applySemanticLayout";
379
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
380
+ id: string | undefined;
381
+ }, never, never, never, never>;
382
+ guard?: never;
383
+ })[];
384
+ };
385
+ /**
386
+ * Syncing state, some edits are not yet synced
387
+ */
388
+ applyLatestToManual: {
389
+ initial: string;
390
+ entry: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
391
+ src: "hotkey";
392
+ logic: HotkeyActorLogic;
393
+ id: "hotkey";
394
+ } | {
395
+ src: "applyLatest";
396
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
397
+ id: string | undefined;
398
+ } | {
399
+ src: "executeChange";
400
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
401
+ id: string | undefined;
402
+ } | {
403
+ src: "applySemanticLayout";
404
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
405
+ id: string | undefined;
406
+ }, never, never, never, never>;
407
+ states: {
408
+ call: {
409
+ invoke: {
410
+ src: "applyLatest";
411
+ input: ({ context }: {
412
+ context: EditorActorContext;
413
+ event: EditorActorEvent;
414
+ self: ActorRef<MachineSnapshot<EditorActorContext, EditorActorEvent, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, EditorActorEvent, AnyEventObject>;
415
+ }) => {
416
+ current: DiagramView<Any>;
417
+ viewId: ViewId;
418
+ };
419
+ onDone: {
420
+ actions: ActionFunction<EditorActorContext, DoneActorEvent<import("./setup").EditorCalls.ApplyLatestToManual.Output, string>, EditorActorEvent, undefined, never, never, never, "500ms" | "wait-after-edit", never>;
421
+ target: string;
422
+ };
423
+ onError: {
424
+ target: "#queue-idle";
425
+ actions: ActionFunction<EditorActorContext, ErrorActorEvent<unknown, string>, EditorActorEvent, undefined, {
426
+ src: "hotkey";
427
+ logic: HotkeyActorLogic;
428
+ id: "hotkey";
429
+ } | {
430
+ src: "applyLatest";
431
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
432
+ id: string | undefined;
433
+ } | {
434
+ src: "executeChange";
435
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
436
+ id: string | undefined;
437
+ } | {
438
+ src: "applySemanticLayout";
439
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
440
+ id: string | undefined;
441
+ }, never, never, never, never>;
442
+ };
443
+ };
444
+ };
445
+ wait: {
446
+ on: {
447
+ '*': {
448
+ actions: LogAction<EditorActorContext, EditorActorEvent, undefined, EditorActorEvent>;
449
+ };
450
+ };
451
+ after: {
452
+ '500ms': {
453
+ target: "#queue-idle";
454
+ actions: ( ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, never, never, never, "500ms" | "wait-after-edit", never> | ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
455
+ src: "hotkey";
456
+ logic: HotkeyActorLogic;
457
+ id: "hotkey";
458
+ } | {
459
+ src: "applyLatest";
460
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
461
+ id: string | undefined;
462
+ } | {
463
+ src: "executeChange";
464
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
465
+ id: string | undefined;
466
+ } | {
467
+ src: "applySemanticLayout";
468
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
469
+ id: string | undefined;
470
+ }, never, never, never, never>)[];
471
+ };
472
+ };
473
+ };
474
+ };
475
+ };
476
+ /**
477
+ * User requested semantic layout, we will call the AI
478
+ */
479
+ applySemanticLayout: {
480
+ tags: "ai-semantic-layout"[];
481
+ invoke: {
482
+ src: "applySemanticLayout";
483
+ input: ({ context }: {
484
+ context: EditorActorContext;
485
+ event: EditorActorEvent;
486
+ self: ActorRef<MachineSnapshot<EditorActorContext, EditorActorEvent, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, EditorActorEvent, AnyEventObject>;
487
+ }) => {
488
+ viewId: ViewId;
489
+ };
490
+ onDone: {
491
+ target: string;
492
+ };
493
+ onError: {
494
+ actions: ({ event }: ActionArgs<EditorActorContext, ErrorActorEvent<unknown, string>, EditorActorEvent>) => void;
495
+ target: string;
496
+ };
497
+ };
498
+ };
499
+ /**
500
+ * Calls `executeChange` to save the snapshot
501
+ */
502
+ executeChanges: {
503
+ invoke: {
504
+ src: "executeChange";
505
+ input: ({ context: { processing, syncQueue, viewId } }: {
506
+ context: EditorActorContext;
507
+ event: EditorActorEvent;
508
+ self: ActorRef<MachineSnapshot<EditorActorContext, EditorActorEvent, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, EditorActorEvent, AnyEventObject>;
509
+ }) => {
510
+ changes: ViewChange[];
511
+ viewId: ViewId;
512
+ };
513
+ onDone: {
514
+ actions: ActionFunction<EditorActorContext, DoneActorEvent<import("./setup").EditorCalls.ExecuteChange.Output, string>, EditorActorEvent, undefined, {
515
+ src: "hotkey";
516
+ logic: HotkeyActorLogic;
517
+ id: "hotkey";
518
+ } | {
519
+ src: "applyLatest";
520
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
521
+ id: string | undefined;
522
+ } | {
523
+ src: "executeChange";
524
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
525
+ id: string | undefined;
526
+ } | {
527
+ src: "applySemanticLayout";
528
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
529
+ id: string | undefined;
530
+ }, never, {
531
+ type: "has pending";
532
+ params: unknown;
533
+ } | {
534
+ type: "can undo";
535
+ params: unknown;
536
+ } | {
537
+ type: "can redo";
538
+ params: unknown;
539
+ }, "500ms" | "wait-after-edit", EditorActorEmitedEvent>;
540
+ target: string;
541
+ };
542
+ onError: {
543
+ actions: ({ event }: ActionArgs<EditorActorContext, ErrorActorEvent<unknown, string>, EditorActorEvent>) => void;
544
+ target: string;
545
+ };
546
+ };
547
+ };
548
+ waitViewSynced: {
549
+ on: {
550
+ 'view.synched': {
551
+ target: string;
552
+ };
553
+ };
554
+ after: {
555
+ 2000: string;
556
+ };
557
+ };
558
+ decideNext: {
559
+ entry: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
560
+ src: "hotkey";
561
+ logic: HotkeyActorLogic;
562
+ id: "hotkey";
563
+ } | {
564
+ src: "applyLatest";
565
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
566
+ id: string | undefined;
567
+ } | {
568
+ src: "executeChange";
569
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
570
+ id: string | undefined;
571
+ } | {
572
+ src: "applySemanticLayout";
573
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
574
+ id: string | undefined;
575
+ }, never, never, never, never>;
576
+ always: ({
577
+ readonly target: "#queue-idle";
578
+ } | {
579
+ target: "#queue-process";
580
+ guard: "has pending";
581
+ reenter: true;
582
+ })[];
583
+ };
584
+ failure: {
585
+ always: {
586
+ target: "#queue-idle";
587
+ actions: ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, {
588
+ src: "hotkey";
589
+ logic: HotkeyActorLogic;
590
+ id: "hotkey";
591
+ } | {
592
+ src: "applyLatest";
593
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplyLatestToManual.Output, import("./setup").EditorCalls.ApplyLatestToManual.Input, EventObject>;
594
+ id: string | undefined;
595
+ } | {
596
+ src: "executeChange";
597
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ExecuteChange.Output, import("./setup").EditorCalls.ExecuteChange.Input, EventObject>;
598
+ id: string | undefined;
599
+ } | {
600
+ src: "applySemanticLayout";
601
+ logic: PromiseActorLogic<import("./setup").EditorCalls.ApplySemanticLayout.Output, import("./setup").EditorCalls.ApplySemanticLayout.Input, EventObject>;
602
+ id: string | undefined;
603
+ }, never, never, never, never>;
604
+ };
605
+ };
606
+ };
607
+ on: {};
608
+ id: string;
609
+ };
610
+ };
611
+ on: {};
612
+ };