@likec4/diagram 1.58.0 → 1.59.1
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.
- package/dist/LikeC4Diagram.js +1 -1
- package/dist/LikeC4Diagram.props.d.ts +1 -1
- package/dist/LikeC4Styles.js +1 -1
- package/dist/LikeC4View.js +2 -2
- package/dist/ReactLikeC4.d.ts +1 -1
- package/dist/base/Base.d.ts +3 -2
- package/dist/base/Base.js +14 -26
- package/dist/base/BaseXYFlow.d.ts +2 -1
- package/dist/base/BaseXYFlow.js +63 -4
- package/dist/base/keyboardZoom.d.ts +3 -0
- package/dist/base/keyboardZoom.js +20 -0
- package/dist/base/updateEdges.js +7 -16
- package/dist/base/updateNodes.js +3 -9
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundActionButton.js +5 -2
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +2 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.js +5 -2
- package/dist/base-primitives/compound/CompoundTitle.d.ts +7 -1
- package/dist/base-primitives/compound/CompoundTitle.js +2 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +2 -1
- package/dist/base-primitives/edge/EdgeActionButton.js +2 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.js +4 -2
- package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -0
- package/dist/base-primitives/edge/EdgeLabel.js +2 -5
- package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -0
- package/dist/base-primitives/element/ElementActionButtons.js +4 -1
- package/dist/base-primitives/element/ElementData.d.ts +3 -1
- package/dist/base-primitives/element/ElementData.js +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +2 -1
- package/dist/base-primitives/element/ElementDetailsButton.js +5 -2
- package/dist/base-primitives/element/ElementNodeContainer.js +1 -1
- package/dist/base-primitives/element/ElementShape.js +3 -0
- package/dist/components/ErrorFallback.js +3 -5
- package/dist/components/Link.js +6 -6
- package/dist/components/NavigationPanel.js +1 -1
- package/dist/components/SearchControl.css.js +11 -11
- package/dist/context/TagStylesContext.d.ts +3 -3
- package/dist/context/TagStylesContext.js +16 -16
- package/dist/custom/index.d.ts +1 -0
- package/dist/custom/index.js +3 -2
- package/dist/editor/actor/actions.js +1 -1
- package/dist/editor/actor/machine.d.ts +4 -6
- package/dist/editor/actor/setup.d.ts +16 -2
- package/dist/editor/actor/setup.js +5 -4
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/safeContext.d.ts +156 -3
- package/dist/hooks/safeContext.js +60 -12
- package/dist/hooks/useCurrentViewModel.js +1 -1
- package/dist/hooks/useDiagram.d.ts +8 -0
- package/dist/hooks/useDiagram.js +9 -2
- package/dist/hooks/useEditorActor.js +1 -1
- package/dist/hooks/useLikeC4ElementsTree.js +1 -1
- package/dist/hooks/useLikeC4Model.js +1 -1
- package/dist/hooks/useXYFlow.d.ts +1 -0
- package/dist/hooks/useXYFlow.js +5 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/likec4diagram/DiagramUI.js +19 -6
- package/dist/likec4diagram/DiagramXYFlow.js +39 -14
- package/dist/likec4diagram/convert-to-xyflow.d.ts +3 -5
- package/dist/likec4diagram/convert-to-xyflow.js +29 -10
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +13 -4
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +11 -4
- package/dist/likec4diagram/custom/edges/edges.css.js +1 -1
- package/dist/likec4diagram/custom/index.d.ts +2 -1
- package/dist/likec4diagram/custom/index.js +5 -3
- package/dist/likec4diagram/custom/nodes/CompoundActions.js +1 -0
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/ElementActions.js +13 -3
- package/dist/likec4diagram/custom/nodes/NodeNotes.js +0 -4
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +32 -19
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.d.ts +2 -0
- package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +234 -0
- package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
- package/dist/likec4diagram/custom/nodes/nodes.js +20 -5
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +1 -1
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -14
- package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
- package/dist/likec4diagram/state/DiagramActorProvider.js +11 -20
- package/dist/likec4diagram/state/aligners.js +1 -1
- package/dist/likec4diagram/state/assign.d.ts +1 -1
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +1 -1
- package/dist/likec4diagram/state/diagram-api.d.ts +18 -10
- package/dist/likec4diagram/state/diagram-api.js +333 -229
- package/dist/likec4diagram/state/machine.actions.d.ts +1026 -332
- package/dist/likec4diagram/state/machine.actions.js +115 -44
- package/dist/likec4diagram/state/machine.actions.layout.d.ts +123 -51
- package/dist/likec4diagram/state/machine.actions.layout.js +40 -33
- package/dist/likec4diagram/state/machine.d.ts +154 -16
- package/dist/likec4diagram/state/machine.js +5 -41
- package/dist/likec4diagram/state/machine.setup.d.ts +84 -19
- package/dist/likec4diagram/state/machine.setup.js +65 -12
- package/dist/likec4diagram/state/machine.state.initializing.d.ts +59 -33
- package/dist/likec4diagram/state/machine.state.navigating.js +7 -3
- package/dist/likec4diagram/state/machine.state.ready.d.ts +1540 -476
- package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +294 -53
- package/dist/likec4diagram/state/machine.state.ready.focused.js +3 -3
- package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +264 -73
- package/dist/likec4diagram/state/machine.state.ready.idle.js +31 -6
- package/dist/likec4diagram/state/machine.state.ready.js +22 -16
- package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +23 -9
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +288 -84
- package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +135 -66
- package/dist/likec4diagram/state/types.d.ts +4 -2
- package/dist/likec4diagram/state/utils.d.ts +7 -0
- package/dist/likec4diagram/state/utils.js +36 -34
- package/dist/likec4diagram/types.d.ts +47 -3
- package/dist/likec4diagram/ui/FloatingSequenceActors.d.ts +6 -0
- package/dist/likec4diagram/ui/FloatingSequenceActors.js +155 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.js +2 -2
- package/dist/likec4diagram/ui/index.d.ts +2 -0
- package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -5
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +2 -0
- package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +540 -0
- package/dist/likec4diagram/ui/sequence-outline/state.d.ts +36 -0
- package/dist/likec4diagram/ui/sequence-outline/state.js +55 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +1 -1
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +112 -60
- package/dist/likec4diagram/xyflow-sequence/_types.d.ts +55 -5
- package/dist/likec4diagram/xyflow-sequence/const.d.ts +5 -5
- package/dist/likec4diagram/xyflow-sequence/const.js +4 -4
- package/dist/likec4diagram/xyflow-sequence/layouter.d.ts +30 -6
- package/dist/likec4diagram/xyflow-sequence/layouter.js +566 -0
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.d.ts → sequence-view-to-xy.d.ts} +8 -2
- package/dist/likec4diagram/xyflow-sequence/{sequence-layout.js → sequence-view-to-xy.js} +111 -14
- package/dist/likec4diagram/xyflow-sequence/sequence-view.d.ts +2 -7
- package/dist/likec4diagram/xyflow-sequence/sequence-view.js +144 -0
- package/dist/likec4diagram/xyflow-sequence/utils.d.ts +9 -1
- package/dist/likec4diagram/xyflow-sequence/utils.js +96 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +5 -2
- package/dist/navigationpanel/NavigationPanel.js +58 -59
- package/dist/navigationpanel/NavigationPanelDropdown.js +45 -38
- package/dist/navigationpanel/_common.js +2 -2
- package/dist/navigationpanel/actor.actions.d.ts +19 -0
- package/dist/navigationpanel/actor.actions.js +45 -0
- package/dist/navigationpanel/actor.d.ts +34 -96
- package/dist/navigationpanel/actor.js +21 -84
- package/dist/navigationpanel/actor.setup.d.ts +98 -0
- package/dist/navigationpanel/actor.setup.js +31 -0
- package/dist/navigationpanel/comparepanel/DriftsSummary.js +4 -5
- package/dist/navigationpanel/controls/DetailsControls.js +7 -8
- package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
- package/dist/navigationpanel/editorpanel/styles.js +8 -8
- package/dist/navigationpanel/hooks.d.ts +20 -5
- package/dist/navigationpanel/hooks.js +4 -18
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +2 -2
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +4 -4
- package/dist/navigationpanel/walkthrough/DynamicViewControls.js +23 -25
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +5 -5
- package/dist/overlays/Overlays.d.ts +4 -2
- package/dist/overlays/Overlays.js +10 -10
- package/dist/overlays/element-details/ElementDetailsCard.css.js +17 -17
- package/dist/overlays/element-details/MetadataValue.js +15 -15
- package/dist/overlays/element-details/TabPanelDeployments.css.js +5 -5
- package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -11
- package/dist/overlays/element-details/TabPanelRelationships.js +1 -1
- package/dist/overlays/element-details/TabPanelStructure.css.js +2 -2
- package/dist/overlays/element-details/TabPanelStructure.js +1 -1
- package/dist/overlays/element-details/actor.d.ts +2 -3
- package/dist/overlays/hooks.d.ts +28 -0
- package/dist/overlays/hooks.js +5 -0
- package/dist/overlays/overlay/Overlay.js +34 -25
- package/dist/overlays/overlaysActor.js +0 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationship-details/layout.js +1 -1
- package/dist/overlays/relationships-browser/SelectElement.css.js +2 -2
- package/dist/overlays/relationships-browser/actor.js +79 -78
- package/dist/overlays/relationships-browser/custom/nodeTypes.js +1 -1
- package/dist/overlays/relationships-browser/hooks.js +1 -1
- package/dist/overlays/relationships-browser/layout.js +2 -2
- package/dist/projects-overview/actor.js +4 -4
- package/dist/search/Search.js +1 -1
- package/dist/search/components/ElementsColumn.css.js +2 -2
- package/dist/search/components/ViewsColum.js +1 -1
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/components/_shared.css.js +23 -23
- package/dist/search/components/styles.css.js +4 -4
- package/dist/shadowroot/ShadowRoot.d.ts +1 -1
- package/dist/shadowroot/ShadowRoot.js +76 -28
- package/dist/styles2.js +1 -1
- package/dist/utils/defineActors.d.ts +21 -0
- package/dist/utils/defineActors.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +5 -4
- package/dist/utils/readableText.d.ts +11 -0
- package/dist/utils/readableText.js +18 -0
- package/package.json +18 -30
- package/panda.buildinfo.json +270 -288
- package/styles-min.css +1 -1
- package/styles.css +1 -1
- package/adhoc-editor/package.json +0 -4
- package/dist/adhoc-editor/EditorPanel.d.ts +0 -1
- package/dist/adhoc-editor/EditorPanel.js +0 -106
- package/dist/adhoc-editor/ElementsTree.d.ts +0 -2
- package/dist/adhoc-editor/ElementsTree.js +0 -112
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +0 -4
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +0 -83
- package/dist/adhoc-editor/components/Tree.d.ts +0 -48
- package/dist/adhoc-editor/components/Tree.js +0 -213
- package/dist/adhoc-editor/hooks.d.ts +0 -14
- package/dist/adhoc-editor/hooks.js +0 -34
- package/dist/adhoc-editor/index.d.ts +0 -2
- package/dist/adhoc-editor/index.js +0 -2
- package/dist/adhoc-editor/state/ActorProvider.d.ts +0 -5
- package/dist/adhoc-editor/state/ActorProvider.js +0 -37
- package/dist/adhoc-editor/state/actor.d.ts +0 -13
- package/dist/adhoc-editor/state/actor.editor.d.ts +0 -56
- package/dist/adhoc-editor/state/actor.editor.js +0 -167
- package/dist/adhoc-editor/state/actor.js +0 -14
- package/dist/adhoc-editor/state/actor.layouter.d.ts +0 -51
- package/dist/adhoc-editor/state/actor.layouter.js +0 -54
- package/dist/adhoc-editor/state/actor.types.d.ts +0 -63
- package/dist/adhoc-editor/state/actor.types.js +0 -25
- package/dist/adhoc-editor/state/panel.d.ts +0 -95
- package/dist/adhoc-editor/state/panel.js +0 -124
- package/dist/adhoc-editor/state/utils.d.ts +0 -17
- package/dist/adhoc-editor/state/utils.js +0 -25
- package/dist/adhoc-editor/useElementsTree.d.ts +0 -18
- package/dist/adhoc-editor/useElementsTree.js +0 -98
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +0 -6
- package/dist/context/ShadowRootContext.d.ts +0 -3
- package/dist/context/ShadowRootContext.js +0 -5
- package/dist/shadowroot/styles.d.ts +0 -13
- package/dist/shadowroot/styles.js +0 -60
|
@@ -1,14 +1,71 @@
|
|
|
1
|
-
import { GuardPredicate,
|
|
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:
|
|
33
|
-
src: "
|
|
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: "
|
|
101
|
+
src: "overlays";
|
|
38
102
|
logic: OverlaysActorLogic;
|
|
39
103
|
id: "overlays";
|
|
40
104
|
} | {
|
|
41
|
-
src: "
|
|
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: "
|
|
109
|
+
src: "editor";
|
|
50
110
|
logic: EditorActorLogic;
|
|
51
111
|
id: "editor";
|
|
52
|
-
}
|
|
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: "
|
|
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: "
|
|
225
|
+
src: "overlays";
|
|
79
226
|
logic: OverlaysActorLogic;
|
|
80
227
|
id: "overlays";
|
|
81
228
|
} | {
|
|
82
|
-
src: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
330
|
+
src: "overlays";
|
|
170
331
|
logic: OverlaysActorLogic;
|
|
171
332
|
id: "overlays";
|
|
172
333
|
} | {
|
|
173
|
-
src: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
437
|
+
src: "overlays";
|
|
263
438
|
logic: OverlaysActorLogic;
|
|
264
439
|
id: "overlays";
|
|
265
440
|
} | {
|
|
266
|
-
src: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
464
|
+
src: "overlays";
|
|
286
465
|
logic: OverlaysActorLogic;
|
|
287
466
|
id: "overlays";
|
|
288
467
|
} | {
|
|
289
|
-
src: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
493
|
+
src: "overlays";
|
|
310
494
|
logic: OverlaysActorLogic;
|
|
311
495
|
id: "overlays";
|
|
312
496
|
} | {
|
|
313
|
-
src: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
521
|
+
src: "overlays";
|
|
334
522
|
logic: OverlaysActorLogic;
|
|
335
523
|
id: "overlays";
|
|
336
524
|
} | {
|
|
337
|
-
src: "
|
|
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: "
|
|
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: "
|
|
546
|
+
type: "enabled: DynamicViewWalkthrough";
|
|
360
547
|
params: undefined;
|
|
361
548
|
} | {
|
|
362
|
-
type: "
|
|
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: "
|
|
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: "
|
|
564
|
+
src: "overlays";
|
|
374
565
|
logic: OverlaysActorLogic;
|
|
375
566
|
id: "overlays";
|
|
376
567
|
} | {
|
|
377
|
-
src: "
|
|
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: "
|
|
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 {
|
|
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
|
-
|
|
81
|
+
...to.focused
|
|
57
82
|
}, {
|
|
58
83
|
guard: "enabled: FocusMode",
|
|
59
84
|
actions: assignFocusedNode(),
|
|
60
|
-
|
|
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
|
]
|