@likec4/diagram 1.39.2 → 1.39.4
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/bundle/{chunk-CaxOLfbm.js → chunk-CW_KClZe.js} +762 -770
- package/bundle/custom.js +20 -20
- package/bundle/index.js +660 -630
- package/dist/LikeC4Diagram.js +2 -2
- package/dist/LikeC4Styles.js +0 -10
- package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -7
- package/dist/bundle/ShadowRoot.js +1 -7
- package/dist/bundle/styles.css.js +6 -5
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useId.d.ts +1 -0
- package/dist/hooks/useId.js +7 -0
- package/dist/likec4diagram/DiagramXYFlow.js +2 -4
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +1 -1
- package/dist/navigationpanel/NavigationPanel.js +2 -3
- package/dist/navigationpanel/NavigationPanelDropdown.js +7 -0
- package/dist/state/DiagramActorProvider.js +12 -19
- package/dist/state/diagram-machine.d.ts +111 -91
- package/dist/state/diagram-machine.js +57 -19
- package/dist/styles-min.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css2.js +1 -1
- package/package.json +8 -8
- package/panda.buildinfo.json +5 -5
- package/src/LikeC4Diagram.tsx +2 -2
- package/src/LikeC4Styles.tsx +0 -6
- package/src/base/primitives/edge/EdgeLabelContainer.tsx +0 -6
- package/src/bundle/ShadowRoot.tsx +1 -7
- package/src/bundle/styles.css.ts +5 -6
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useId.ts +5 -0
- package/src/likec4diagram/DiagramXYFlow.tsx +2 -4
- package/src/likec4diagram/relationship-popover/RelationshipPopover.tsx +1 -1
- package/src/navigationpanel/NavigationPanel.tsx +2 -3
- package/src/navigationpanel/NavigationPanelDropdown.tsx +9 -0
- package/src/state/DiagramActorProvider.tsx +12 -24
- package/src/state/diagram-machine.ts +69 -28
- package/dist/globals.css.js +0 -3
- package/src/globals.css +0 -124
package/dist/LikeC4Diagram.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { useId } from '@mantine/hooks';
|
|
3
2
|
import { ReactFlowProvider } from '@xyflow/react';
|
|
4
3
|
import { useRef } from 'react';
|
|
5
4
|
import { ControlsCustomLayoutProvider } from './context/ControlsCustomLayout.js';
|
|
6
5
|
import { ReduceGraphicsContext } from './context/ReduceGraphics.js';
|
|
6
|
+
import { useId } from './hooks/useId.js';
|
|
7
7
|
import { LikeC4DiagramXYFlow } from './likec4diagram/DiagramXYFlow.js';
|
|
8
8
|
import { LikeC4Styles } from './LikeC4Styles.js';
|
|
9
9
|
import { DiagramActorProvider } from './state/DiagramActorProvider.js';
|
|
@@ -58,7 +58,7 @@ function LikeC4Diagram({
|
|
|
58
58
|
renderNodes,
|
|
59
59
|
children
|
|
60
60
|
}) {
|
|
61
|
-
const id = useId()
|
|
61
|
+
const id = useId();
|
|
62
62
|
const initialRef = useRef(null);
|
|
63
63
|
if (initialRef.current == null) {
|
|
64
64
|
initialRef.current = {
|
package/dist/LikeC4Styles.js
CHANGED
|
@@ -4,7 +4,6 @@ import { useMantineStyleNonce } from '@mantine/core';
|
|
|
4
4
|
import { toRgba, mix, toHex, scale } from 'khroma';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { pipe, entries, map, join, range } from 'remeda';
|
|
7
|
-
import globalsCss from './globals.css.js';
|
|
8
7
|
import { useLikeC4Specification } from './likec4model/useLikeC4Model.js';
|
|
9
8
|
|
|
10
9
|
const scheme = (scheme2) => `[data-mantine-color-scheme="${scheme2}"]`;
|
|
@@ -96,15 +95,6 @@ function LikeC4Styles({ id }) {
|
|
|
96
95
|
);
|
|
97
96
|
}
|
|
98
97
|
const MemoizedStyles = memo(({ id, nonce, customColorsStyles, builtInColors }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
99
|
-
/* @__PURE__ */ jsx(
|
|
100
|
-
"style",
|
|
101
|
-
{
|
|
102
|
-
type: "text/css",
|
|
103
|
-
"data-likec4-global": id,
|
|
104
|
-
dangerouslySetInnerHTML: { __html: globalsCss.replaceAll(".likec4-root", `#${id}.likec4-root`) },
|
|
105
|
-
nonce
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
98
|
/* @__PURE__ */ jsx(
|
|
109
99
|
"style",
|
|
110
100
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cx
|
|
2
|
+
import { cx } from '@likec4/styles/css';
|
|
3
3
|
import { EdgeLabelRenderer } from '@xyflow/react';
|
|
4
4
|
import { isNumber } from 'remeda';
|
|
5
5
|
import { ZIndexes } from '../../const.js';
|
|
@@ -38,12 +38,6 @@ function EdgeLabelContainer({
|
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
className: cx(
|
|
41
|
-
css({
|
|
42
|
-
display: {
|
|
43
|
-
_reduceGraphicsOnPan: "none",
|
|
44
|
-
_smallZoom: "none"
|
|
45
|
-
}
|
|
46
|
-
}),
|
|
47
41
|
"nodrag nopan",
|
|
48
42
|
"likec4-edge-label-container",
|
|
49
43
|
className
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cx, css } from '@likec4/styles/css';
|
|
3
2
|
import { MantineProvider } from '@mantine/core';
|
|
4
3
|
import { useRef, useCallback } from 'react';
|
|
5
4
|
import root from 'react-shadow';
|
|
@@ -27,12 +26,7 @@ function ShadowRoot({
|
|
|
27
26
|
{
|
|
28
27
|
ref: rootRef,
|
|
29
28
|
...colorScheme && { "data-mantine-color-scheme": colorScheme },
|
|
30
|
-
className:
|
|
31
|
-
"likec4-shadow-root",
|
|
32
|
-
css({
|
|
33
|
-
display: "contents"
|
|
34
|
-
})
|
|
35
|
-
),
|
|
29
|
+
className: "likec4-shadow-root",
|
|
36
30
|
children: /* @__PURE__ */ jsx(
|
|
37
31
|
MantineProvider,
|
|
38
32
|
{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { css } from '@likec4/styles/css';
|
|
2
2
|
import { createTheme, Portal } from '@mantine/core';
|
|
3
|
-
import { useColorScheme as useColorScheme$1, useMutationObserver, useDebouncedCallback
|
|
3
|
+
import { useColorScheme as useColorScheme$1, useMutationObserver, useDebouncedCallback } from '@mantine/hooks';
|
|
4
4
|
import { useIsomorphicLayoutEffect } from '@react-hookz/web';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { first, isString, isFunction } from 'remeda';
|
|
7
|
+
import { useId } from '../hooks/useId.js';
|
|
7
8
|
import fontsCss from '../styles-font.css2.js';
|
|
8
9
|
import inlinedStyles from '../styles.css2.js';
|
|
9
10
|
|
|
@@ -61,7 +62,7 @@ function useBundledStyleSheet(injectFontCss, styleNonce) {
|
|
|
61
62
|
useIsomorphicLayoutEffect(() => {
|
|
62
63
|
const css2 = new CSSStyleSheet();
|
|
63
64
|
css2.replaceSync(
|
|
64
|
-
inlinedStyles.replaceAll(":where(:root
|
|
65
|
+
inlinedStyles.replaceAll(":where(:root,:host)", `.likec4-shadow-root`).replaceAll(":root", `.likec4-shadow-root`).replaceAll("body {", `.likec4-shadow-root{`).replaceAll("body{", `.likec4-shadow-root{`)
|
|
65
66
|
);
|
|
66
67
|
setStyleSheets([css2]);
|
|
67
68
|
return () => {
|
|
@@ -128,15 +129,15 @@ function useShadowRootStyle(keepAspectRatio, view) {
|
|
|
128
129
|
background: transparent;
|
|
129
130
|
padding: 0;
|
|
130
131
|
overflow: hidden;
|
|
132
|
+
aspect-ratio: ${Math.ceil(view.bounds.width)} / ${Math.ceil(view.bounds.height)};
|
|
131
133
|
${isLandscape ? "" : `
|
|
132
|
-
max-width: var(--likec4-view-max-width, ${Math.ceil(view.bounds.width)}px);
|
|
134
|
+
max-width: min(100%, var(--likec4-view-max-width, ${Math.ceil(view.bounds.width)}px));
|
|
133
135
|
margin-left: auto;
|
|
134
136
|
margin-right: auto;`}
|
|
135
137
|
width: ${isLandscape ? "100%" : "auto"};
|
|
136
138
|
height: ${isLandscape ? "auto" : "100%"};
|
|
137
139
|
${isLandscape ? `min-width: 80px;` : `min-height: 80px;`}
|
|
138
|
-
|
|
139
|
-
max-height: var(--likec4-view-max-height, ${Math.ceil(view.bounds.height)}px);
|
|
140
|
+
max-height: min(100%, var(--likec4-view-max-height, ${Math.ceil(view.bounds.height)}px));
|
|
140
141
|
}
|
|
141
142
|
`.trim()
|
|
142
143
|
];
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useId(): string;
|
|
@@ -59,7 +59,7 @@ function LikeC4DiagramXYFlow({
|
|
|
59
59
|
} = useDiagramEventHandlers();
|
|
60
60
|
const notReadOnly = !enableReadOnly, isReducedGraphics = useIsReducedGraphics(), layoutConstraints = useLayoutConstraints(), $isPanning = usePanningAtom(), isPanning = useTimeout(() => {
|
|
61
61
|
$isPanning.set(true);
|
|
62
|
-
}, isReducedGraphics ? 120 :
|
|
62
|
+
}, isReducedGraphics ? 120 : 400), notPanning = useDebouncedCallback(() => {
|
|
63
63
|
isPanning.clear();
|
|
64
64
|
if ($isPanning.get()) {
|
|
65
65
|
$isPanning.set(false);
|
|
@@ -73,9 +73,7 @@ function LikeC4DiagramXYFlow({
|
|
|
73
73
|
}
|
|
74
74
|
notPanning();
|
|
75
75
|
}), onMoveEnd = useCallbackRef((event, viewport) => {
|
|
76
|
-
|
|
77
|
-
notPanning.flush();
|
|
78
|
-
}
|
|
76
|
+
isPanning.clear();
|
|
79
77
|
diagram.send({ type: "xyflow.viewportMoved", viewport, manually: !!event });
|
|
80
78
|
}), onViewportResize = useCallbackRef(() => {
|
|
81
79
|
diagram.send({ type: "xyflow.resized" });
|
|
@@ -45,7 +45,7 @@ const RelationshipPopover = memo(() => {
|
|
|
45
45
|
const diagram = useDiagram();
|
|
46
46
|
const { viewId, selected } = useDiagramContext(selectDiagramContext);
|
|
47
47
|
const openedEdgeId = useSelector(actorRef, (s) => s.hasTag("opened") ? s.context.edgeId : null);
|
|
48
|
-
useOnDiagramEvent("
|
|
48
|
+
useOnDiagramEvent("navigateTo", () => {
|
|
49
49
|
actorRef.send({ type: "close" });
|
|
50
50
|
});
|
|
51
51
|
useOnDiagramEvent("edgeMouseEnter", ({ edge }) => {
|
|
@@ -84,9 +84,8 @@ const NavigationPanelImpl = ({ actor }) => {
|
|
|
84
84
|
Popover,
|
|
85
85
|
{
|
|
86
86
|
offset: {
|
|
87
|
-
mainAxis:
|
|
87
|
+
mainAxis: 4
|
|
88
88
|
},
|
|
89
|
-
middlewares: { flip: false },
|
|
90
89
|
opened,
|
|
91
90
|
position: "bottom-start",
|
|
92
91
|
trapFocus: true,
|
|
@@ -95,7 +94,7 @@ const NavigationPanelImpl = ({ actor }) => {
|
|
|
95
94
|
onDismiss: () => actor.send({ type: "dropdown.dismiss" }),
|
|
96
95
|
children: [
|
|
97
96
|
/* @__PURE__ */ jsx(NavigationPanelPopoverTarget, { actor }),
|
|
98
|
-
/* @__PURE__ */ jsx(NavigationPanelDropdown, {})
|
|
97
|
+
opened && /* @__PURE__ */ jsx(NavigationPanelDropdown, {})
|
|
99
98
|
]
|
|
100
99
|
}
|
|
101
100
|
);
|
|
@@ -14,6 +14,7 @@ import { useLikeC4Model } from '../likec4model/useLikeC4Model.js';
|
|
|
14
14
|
import { ProjectsMenu } from './dropdown/ProjectsMenu.js';
|
|
15
15
|
import { useNavigationActor, useNavigationActorContext, useNavigationActorRef } from './hooks.js';
|
|
16
16
|
import { breadcrumbTitle } from './styles.css.js';
|
|
17
|
+
import { useOnDiagramEvent } from '../hooks/useDiagram.js';
|
|
17
18
|
import IconSearch from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
|
|
18
19
|
import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
|
|
19
20
|
import IconStack2 from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
|
|
@@ -31,6 +32,12 @@ const scopedKeydownHandler = createScopedKeydownHandler({
|
|
|
31
32
|
function NavigationPanelDropdown() {
|
|
32
33
|
const actor = useNavigationActor();
|
|
33
34
|
const searchQuery = useSelector(actor.actorRef, (s) => s.context.searchQuery);
|
|
35
|
+
useOnDiagramEvent("paneClick", () => {
|
|
36
|
+
actor.closeDropdown();
|
|
37
|
+
});
|
|
38
|
+
useOnDiagramEvent("nodeClick", () => {
|
|
39
|
+
actor.closeDropdown();
|
|
40
|
+
});
|
|
34
41
|
const setSearchQuery = useThrottledCallback((value) => {
|
|
35
42
|
actor.send({ type: "searchQuery.change", value });
|
|
36
43
|
}, 250);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useCustomCompareEffect } from '@react-hookz/web';
|
|
3
3
|
import { useActorRef, useSelector } from '@xstate/react';
|
|
4
4
|
import { useStoreApi } from '@xyflow/react';
|
|
@@ -8,11 +8,13 @@ import { ErrorBoundary } from '../components/ErrorFallback.js';
|
|
|
8
8
|
import { useDiagramEventHandlers } from '../context/DiagramEventHandlers.js';
|
|
9
9
|
import { useEnabledFeatures, DiagramFeatures } from '../context/DiagramFeatures.js';
|
|
10
10
|
import { DiagramActorContextProvider } from '../hooks/safeContext.js';
|
|
11
|
+
import { useCurrentViewId } from '../hooks/useCurrentViewId.js';
|
|
11
12
|
import { useViewToNodesEdges } from '../likec4diagram/useViewToNodesEdges.js';
|
|
12
13
|
import { CurrentViewModelContext } from '../likec4model/LikeC4ModelContext.js';
|
|
13
14
|
import { useLikeC4Model } from '../likec4model/useLikeC4Model.js';
|
|
14
15
|
import { diagramMachine } from './diagram-machine.js';
|
|
15
16
|
import { syncManualLayoutActorLogic } from './syncManualLayoutActor.js';
|
|
17
|
+
import { useOnDiagramEvent } from '../hooks/useDiagram.js';
|
|
16
18
|
|
|
17
19
|
const selectToggledFeatures = (state) => {
|
|
18
20
|
if (state.context.features.enableReadOnly || state.context.activeWalkthrough) {
|
|
@@ -64,7 +66,6 @@ function DiagramActorProvider({
|
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
);
|
|
67
|
-
useActorEventHandlers(actorRef);
|
|
68
69
|
const features = useEnabledFeatures();
|
|
69
70
|
useCustomCompareEffect(
|
|
70
71
|
() => {
|
|
@@ -89,27 +90,23 @@ function DiagramActorProvider({
|
|
|
89
90
|
actorRef.send({ type: "update.view", view, xyedges, xynodes });
|
|
90
91
|
}, [view, xyedges, xynodes]);
|
|
91
92
|
const toggledFeatures = useSelector(actorRef, selectToggledFeatures, shallowEqual);
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ jsxs(DiagramActorContextProvider, { value: actorRef, children: [
|
|
94
|
+
/* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(CurrentViewModelProvider, { children }) }) }),
|
|
95
|
+
/* @__PURE__ */ jsx(DiagramActorEventListener, { actorRef })
|
|
96
|
+
] });
|
|
93
97
|
}
|
|
94
|
-
function CurrentViewModelProvider({
|
|
95
|
-
|
|
96
|
-
viewId
|
|
97
|
-
}) {
|
|
98
|
+
function CurrentViewModelProvider({ children }) {
|
|
99
|
+
const viewId = useCurrentViewId();
|
|
98
100
|
const likec4model = useLikeC4Model();
|
|
99
101
|
const viewmodel = likec4model.findView(viewId);
|
|
100
102
|
return /* @__PURE__ */ jsx(CurrentViewModelContext.Provider, { value: viewmodel, children });
|
|
101
103
|
}
|
|
102
|
-
function
|
|
104
|
+
function DiagramActorEventListener({ actorRef }) {
|
|
103
105
|
const {
|
|
104
|
-
onChange,
|
|
105
106
|
onNavigateTo,
|
|
106
107
|
onOpenSource
|
|
107
108
|
} = useDiagramEventHandlers();
|
|
108
|
-
|
|
109
|
-
if (!onChange) return;
|
|
110
|
-
const subscription = actorRef.on("viewChange", ({ change }) => onChange({ change }));
|
|
111
|
-
return () => subscription.unsubscribe();
|
|
112
|
-
}, [actorRef, onChange]);
|
|
109
|
+
useOnDiagramEvent("openSource", ({ params }) => onOpenSource?.(params));
|
|
113
110
|
useEffect(() => {
|
|
114
111
|
if (!onNavigateTo) return;
|
|
115
112
|
let frame;
|
|
@@ -124,11 +121,7 @@ function useActorEventHandlers(actorRef) {
|
|
|
124
121
|
subscription.unsubscribe();
|
|
125
122
|
};
|
|
126
123
|
}, [actorRef, onNavigateTo]);
|
|
127
|
-
|
|
128
|
-
if (!onOpenSource) return;
|
|
129
|
-
const subscription = actorRef.on("openSource", ({ params }) => onOpenSource(params));
|
|
130
|
-
return () => subscription.unsubscribe();
|
|
131
|
-
}, [actorRef, onOpenSource]);
|
|
124
|
+
return null;
|
|
132
125
|
}
|
|
133
126
|
|
|
134
127
|
export { DiagramActorProvider };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BBox } from '@likec4/core';
|
|
2
|
+
import { DiagramEdge, DiagramNode, DiagramView, EdgeId, Fqn, NodeId, NodeNotation as ElementNotation, StepEdgeId, ViewId, XYPoint } from '@likec4/core/types';
|
|
2
3
|
import { ReactFlowInstance, useStoreApi } from '@xyflow/react';
|
|
3
4
|
import { EdgeChange, NodeChange, Rect, Viewport } from '@xyflow/system';
|
|
4
5
|
import { MouseEvent } from 'react';
|
|
@@ -199,12 +200,19 @@ export type Events = HotKeyEvent | {
|
|
|
199
200
|
export type EmittedEvents = {
|
|
200
201
|
type: 'navigateTo';
|
|
201
202
|
viewId: ViewId;
|
|
202
|
-
} | {
|
|
203
|
-
type: 'viewChange';
|
|
204
|
-
change: ViewChange;
|
|
205
203
|
} | {
|
|
206
204
|
type: 'openSource';
|
|
207
205
|
params: OpenSourceParams;
|
|
206
|
+
} | {
|
|
207
|
+
type: 'paneClick';
|
|
208
|
+
} | {
|
|
209
|
+
type: 'nodeClick';
|
|
210
|
+
node: DiagramNode;
|
|
211
|
+
xynode: Types.Node;
|
|
212
|
+
} | {
|
|
213
|
+
type: 'edgeClick';
|
|
214
|
+
edge: DiagramEdge;
|
|
215
|
+
xyedge: Types.Edge;
|
|
208
216
|
} | {
|
|
209
217
|
type: 'edgeMouseEnter';
|
|
210
218
|
edge: Types.Edge;
|
|
@@ -276,12 +284,6 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
276
284
|
type: "onEdgeMouseLeave";
|
|
277
285
|
params: NonReducibleUnknown;
|
|
278
286
|
};
|
|
279
|
-
"trigger:OnChange": {
|
|
280
|
-
type: "trigger:OnChange";
|
|
281
|
-
params: {
|
|
282
|
-
change: ViewChange;
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
287
|
"layout.align": {
|
|
286
288
|
type: "layout.align";
|
|
287
289
|
params: {
|
|
@@ -322,6 +324,10 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
322
324
|
type: "assign lastClickedNode";
|
|
323
325
|
params: NonReducibleUnknown;
|
|
324
326
|
};
|
|
327
|
+
"reset lastClickedNode": {
|
|
328
|
+
type: "reset lastClickedNode";
|
|
329
|
+
params: NonReducibleUnknown;
|
|
330
|
+
};
|
|
325
331
|
"open source of focused or last clicked node": {
|
|
326
332
|
type: "open source of focused or last clicked node";
|
|
327
333
|
params: NonReducibleUnknown;
|
|
@@ -407,6 +413,18 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
407
413
|
type: "emit: edgeEditingStarted";
|
|
408
414
|
params: NonReducibleUnknown;
|
|
409
415
|
};
|
|
416
|
+
"emit: paneClick": {
|
|
417
|
+
type: "emit: paneClick";
|
|
418
|
+
params: NonReducibleUnknown;
|
|
419
|
+
};
|
|
420
|
+
"emit: nodeClick": {
|
|
421
|
+
type: "emit: nodeClick";
|
|
422
|
+
params: NonReducibleUnknown;
|
|
423
|
+
};
|
|
424
|
+
"emit: edgeClick": {
|
|
425
|
+
type: "emit: edgeClick";
|
|
426
|
+
params: NonReducibleUnknown;
|
|
427
|
+
};
|
|
410
428
|
}>, Values<{
|
|
411
429
|
isReady: {
|
|
412
430
|
type: "isReady";
|
|
@@ -978,41 +996,16 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
978
996
|
logic: SearchActorLogic;
|
|
979
997
|
id: "search";
|
|
980
998
|
};
|
|
981
|
-
}>, never, never, never, never
|
|
999
|
+
}>, never, never, never, never>, "emit: nodeClick"];
|
|
982
1000
|
readonly target: "focused";
|
|
983
1001
|
}, {
|
|
984
|
-
readonly actions: readonly ["assign lastClickedNode", "open source of focused or last clicked node"];
|
|
1002
|
+
readonly actions: readonly ["assign lastClickedNode", "open source of focused or last clicked node", "emit: nodeClick"];
|
|
985
1003
|
}];
|
|
986
1004
|
readonly 'xyflow.paneClick': {
|
|
987
|
-
readonly actions: readonly [
|
|
988
|
-
type: "xyflow.paneClick";
|
|
989
|
-
}, Events, undefined, Values<{
|
|
990
|
-
syncManualLayoutActorLogic: {
|
|
991
|
-
src: "syncManualLayoutActorLogic";
|
|
992
|
-
logic: SyncLayoutActorLogic;
|
|
993
|
-
id: "syncLayout";
|
|
994
|
-
};
|
|
995
|
-
hotkeyActorLogic: {
|
|
996
|
-
src: "hotkeyActorLogic";
|
|
997
|
-
logic: HotkeyActorLogic;
|
|
998
|
-
id: "hotkey";
|
|
999
|
-
};
|
|
1000
|
-
overlaysActorLogic: {
|
|
1001
|
-
src: "overlaysActorLogic";
|
|
1002
|
-
logic: OverlaysActorLogic;
|
|
1003
|
-
id: "overlays";
|
|
1004
|
-
};
|
|
1005
|
-
searchActorLogic: {
|
|
1006
|
-
src: "searchActorLogic";
|
|
1007
|
-
logic: SearchActorLogic;
|
|
1008
|
-
id: "search";
|
|
1009
|
-
};
|
|
1010
|
-
}>, never, never, never, never>];
|
|
1005
|
+
readonly actions: readonly ["reset lastClickedNode", "emit: paneClick"];
|
|
1011
1006
|
};
|
|
1012
1007
|
readonly 'xyflow.paneDblClick': {
|
|
1013
|
-
readonly actions: readonly [{
|
|
1014
|
-
readonly type: "xyflow:fitDiagram";
|
|
1015
|
-
}, {
|
|
1008
|
+
readonly actions: readonly ["reset lastClickedNode", "xyflow:fitDiagram", {
|
|
1016
1009
|
readonly type: "trigger:OpenSource";
|
|
1017
1010
|
readonly params: ({ context }: {
|
|
1018
1011
|
context: Context;
|
|
@@ -1055,10 +1048,10 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1055
1048
|
};
|
|
1056
1049
|
readonly 'xyflow.edgeClick': {
|
|
1057
1050
|
readonly guard: any;
|
|
1058
|
-
readonly actions: ActionFunction<Context, {
|
|
1051
|
+
readonly actions: readonly [ ActionFunction<Context, {
|
|
1059
1052
|
type: "xyflow.edgeClick";
|
|
1060
1053
|
edge: Types.Edge;
|
|
1061
|
-
}, Events, undefined, never, never, never, never, never
|
|
1054
|
+
}, Events, undefined, never, never, never, never, never>, "emit: edgeClick"];
|
|
1062
1055
|
};
|
|
1063
1056
|
};
|
|
1064
1057
|
};
|
|
@@ -1148,12 +1141,6 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1148
1141
|
type: "onEdgeMouseLeave";
|
|
1149
1142
|
params: NonReducibleUnknown;
|
|
1150
1143
|
};
|
|
1151
|
-
"trigger:OnChange": {
|
|
1152
|
-
type: "trigger:OnChange";
|
|
1153
|
-
params: {
|
|
1154
|
-
change: ViewChange;
|
|
1155
|
-
};
|
|
1156
|
-
};
|
|
1157
1144
|
"layout.align": {
|
|
1158
1145
|
type: "layout.align";
|
|
1159
1146
|
params: {
|
|
@@ -1194,6 +1181,10 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1194
1181
|
type: "assign lastClickedNode";
|
|
1195
1182
|
params: NonReducibleUnknown;
|
|
1196
1183
|
};
|
|
1184
|
+
"reset lastClickedNode": {
|
|
1185
|
+
type: "reset lastClickedNode";
|
|
1186
|
+
params: NonReducibleUnknown;
|
|
1187
|
+
};
|
|
1197
1188
|
"open source of focused or last clicked node": {
|
|
1198
1189
|
type: "open source of focused or last clicked node";
|
|
1199
1190
|
params: NonReducibleUnknown;
|
|
@@ -1279,6 +1270,18 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1279
1270
|
type: "emit: edgeEditingStarted";
|
|
1280
1271
|
params: NonReducibleUnknown;
|
|
1281
1272
|
};
|
|
1273
|
+
"emit: paneClick": {
|
|
1274
|
+
type: "emit: paneClick";
|
|
1275
|
+
params: NonReducibleUnknown;
|
|
1276
|
+
};
|
|
1277
|
+
"emit: nodeClick": {
|
|
1278
|
+
type: "emit: nodeClick";
|
|
1279
|
+
params: NonReducibleUnknown;
|
|
1280
|
+
};
|
|
1281
|
+
"emit: edgeClick": {
|
|
1282
|
+
type: "emit: edgeClick";
|
|
1283
|
+
params: NonReducibleUnknown;
|
|
1284
|
+
};
|
|
1282
1285
|
}>, Values<{
|
|
1283
1286
|
isReady: {
|
|
1284
1287
|
type: "isReady";
|
|
@@ -1340,6 +1343,7 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1340
1343
|
readonly on: {
|
|
1341
1344
|
readonly 'xyflow.nodeClick': readonly [{
|
|
1342
1345
|
readonly guard: "click: focused node";
|
|
1346
|
+
readonly actions: "emit: nodeClick";
|
|
1343
1347
|
readonly target: "#idle";
|
|
1344
1348
|
}, {
|
|
1345
1349
|
readonly actions: readonly [ ActionFunction<Context, {
|
|
@@ -1369,7 +1373,7 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1369
1373
|
}>, never, never, never, never>, ActionFunction<Context, {
|
|
1370
1374
|
type: "xyflow.nodeClick";
|
|
1371
1375
|
node: Types.Node;
|
|
1372
|
-
}, Events, undefined, never, never, never, never, never
|
|
1376
|
+
}, Events, undefined, never, never, never, never, never>, "emit: nodeClick"];
|
|
1373
1377
|
}];
|
|
1374
1378
|
readonly 'focus.node': {
|
|
1375
1379
|
readonly actions: readonly [ ActionFunction<Context, {
|
|
@@ -1402,30 +1406,7 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1402
1406
|
readonly target: "idle";
|
|
1403
1407
|
};
|
|
1404
1408
|
readonly 'xyflow.paneClick': {
|
|
1405
|
-
readonly actions:
|
|
1406
|
-
type: "xyflow.paneClick";
|
|
1407
|
-
}, Events, undefined, Values<{
|
|
1408
|
-
syncManualLayoutActorLogic: {
|
|
1409
|
-
src: "syncManualLayoutActorLogic";
|
|
1410
|
-
logic: SyncLayoutActorLogic;
|
|
1411
|
-
id: "syncLayout";
|
|
1412
|
-
};
|
|
1413
|
-
hotkeyActorLogic: {
|
|
1414
|
-
src: "hotkeyActorLogic";
|
|
1415
|
-
logic: HotkeyActorLogic;
|
|
1416
|
-
id: "hotkey";
|
|
1417
|
-
};
|
|
1418
|
-
overlaysActorLogic: {
|
|
1419
|
-
src: "overlaysActorLogic";
|
|
1420
|
-
logic: OverlaysActorLogic;
|
|
1421
|
-
id: "overlays";
|
|
1422
|
-
};
|
|
1423
|
-
searchActorLogic: {
|
|
1424
|
-
src: "searchActorLogic";
|
|
1425
|
-
logic: SearchActorLogic;
|
|
1426
|
-
id: "search";
|
|
1427
|
-
};
|
|
1428
|
-
}>, never, never, never, never>;
|
|
1409
|
+
readonly actions: readonly ["reset lastClickedNode", "emit: paneClick"];
|
|
1429
1410
|
readonly target: "idle";
|
|
1430
1411
|
};
|
|
1431
1412
|
readonly 'notations.unhighlight': {
|
|
@@ -1542,7 +1523,7 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1542
1523
|
logic: SearchActorLogic;
|
|
1543
1524
|
id: "search";
|
|
1544
1525
|
};
|
|
1545
|
-
}>, never, never, never, never>, "update active walkthrough", "xyflow:fitFocusedBounds", "emit: walkthroughStep"];
|
|
1526
|
+
}>, never, never, never, never>, "update active walkthrough", "xyflow:fitFocusedBounds", "emit: edgeClick", "emit: walkthroughStep"];
|
|
1546
1527
|
};
|
|
1547
1528
|
readonly 'notations.unhighlight': {
|
|
1548
1529
|
readonly actions: "update active walkthrough";
|
|
@@ -1609,12 +1590,6 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1609
1590
|
type: "onEdgeMouseLeave";
|
|
1610
1591
|
params: NonReducibleUnknown;
|
|
1611
1592
|
};
|
|
1612
|
-
"trigger:OnChange": {
|
|
1613
|
-
type: "trigger:OnChange";
|
|
1614
|
-
params: {
|
|
1615
|
-
change: ViewChange;
|
|
1616
|
-
};
|
|
1617
|
-
};
|
|
1618
1593
|
"layout.align": {
|
|
1619
1594
|
type: "layout.align";
|
|
1620
1595
|
params: {
|
|
@@ -1655,6 +1630,10 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1655
1630
|
type: "assign lastClickedNode";
|
|
1656
1631
|
params: NonReducibleUnknown;
|
|
1657
1632
|
};
|
|
1633
|
+
"reset lastClickedNode": {
|
|
1634
|
+
type: "reset lastClickedNode";
|
|
1635
|
+
params: NonReducibleUnknown;
|
|
1636
|
+
};
|
|
1658
1637
|
"open source of focused or last clicked node": {
|
|
1659
1638
|
type: "open source of focused or last clicked node";
|
|
1660
1639
|
params: NonReducibleUnknown;
|
|
@@ -1740,6 +1719,18 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1740
1719
|
type: "emit: edgeEditingStarted";
|
|
1741
1720
|
params: NonReducibleUnknown;
|
|
1742
1721
|
};
|
|
1722
|
+
"emit: paneClick": {
|
|
1723
|
+
type: "emit: paneClick";
|
|
1724
|
+
params: NonReducibleUnknown;
|
|
1725
|
+
};
|
|
1726
|
+
"emit: nodeClick": {
|
|
1727
|
+
type: "emit: nodeClick";
|
|
1728
|
+
params: NonReducibleUnknown;
|
|
1729
|
+
};
|
|
1730
|
+
"emit: edgeClick": {
|
|
1731
|
+
type: "emit: edgeClick";
|
|
1732
|
+
params: NonReducibleUnknown;
|
|
1733
|
+
};
|
|
1743
1734
|
}>, Values<{
|
|
1744
1735
|
isReady: {
|
|
1745
1736
|
type: "isReady";
|
|
@@ -1853,12 +1844,6 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1853
1844
|
type: "onEdgeMouseLeave";
|
|
1854
1845
|
params: NonReducibleUnknown;
|
|
1855
1846
|
};
|
|
1856
|
-
"trigger:OnChange": {
|
|
1857
|
-
type: "trigger:OnChange";
|
|
1858
|
-
params: {
|
|
1859
|
-
change: ViewChange;
|
|
1860
|
-
};
|
|
1861
|
-
};
|
|
1862
1847
|
"layout.align": {
|
|
1863
1848
|
type: "layout.align";
|
|
1864
1849
|
params: {
|
|
@@ -1899,6 +1884,10 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1899
1884
|
type: "assign lastClickedNode";
|
|
1900
1885
|
params: NonReducibleUnknown;
|
|
1901
1886
|
};
|
|
1887
|
+
"reset lastClickedNode": {
|
|
1888
|
+
type: "reset lastClickedNode";
|
|
1889
|
+
params: NonReducibleUnknown;
|
|
1890
|
+
};
|
|
1902
1891
|
"open source of focused or last clicked node": {
|
|
1903
1892
|
type: "open source of focused or last clicked node";
|
|
1904
1893
|
params: NonReducibleUnknown;
|
|
@@ -1984,6 +1973,18 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
1984
1973
|
type: "emit: edgeEditingStarted";
|
|
1985
1974
|
params: NonReducibleUnknown;
|
|
1986
1975
|
};
|
|
1976
|
+
"emit: paneClick": {
|
|
1977
|
+
type: "emit: paneClick";
|
|
1978
|
+
params: NonReducibleUnknown;
|
|
1979
|
+
};
|
|
1980
|
+
"emit: nodeClick": {
|
|
1981
|
+
type: "emit: nodeClick";
|
|
1982
|
+
params: NonReducibleUnknown;
|
|
1983
|
+
};
|
|
1984
|
+
"emit: edgeClick": {
|
|
1985
|
+
type: "emit: edgeClick";
|
|
1986
|
+
params: NonReducibleUnknown;
|
|
1987
|
+
};
|
|
1987
1988
|
}>, Values<{
|
|
1988
1989
|
isReady: {
|
|
1989
1990
|
type: "isReady";
|
|
@@ -2048,6 +2049,15 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
2048
2049
|
};
|
|
2049
2050
|
};
|
|
2050
2051
|
readonly on: {
|
|
2052
|
+
readonly 'xyflow.paneClick': {
|
|
2053
|
+
readonly actions: "emit: paneClick";
|
|
2054
|
+
};
|
|
2055
|
+
readonly 'xyflow.nodeClick': {
|
|
2056
|
+
readonly actions: "emit: nodeClick";
|
|
2057
|
+
};
|
|
2058
|
+
readonly 'xyflow.edgeClick': {
|
|
2059
|
+
readonly actions: "emit: edgeClick";
|
|
2060
|
+
};
|
|
2051
2061
|
readonly 'xyflow.applyNodeChanges': {
|
|
2052
2062
|
readonly actions: ActionFunction<Context, {
|
|
2053
2063
|
type: "xyflow.applyNodeChanges";
|
|
@@ -2268,12 +2278,6 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
2268
2278
|
type: "onEdgeMouseLeave";
|
|
2269
2279
|
params: NonReducibleUnknown;
|
|
2270
2280
|
};
|
|
2271
|
-
"trigger:OnChange": {
|
|
2272
|
-
type: "trigger:OnChange";
|
|
2273
|
-
params: {
|
|
2274
|
-
change: ViewChange;
|
|
2275
|
-
};
|
|
2276
|
-
};
|
|
2277
2281
|
"layout.align": {
|
|
2278
2282
|
type: "layout.align";
|
|
2279
2283
|
params: {
|
|
@@ -2314,6 +2318,10 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
2314
2318
|
type: "assign lastClickedNode";
|
|
2315
2319
|
params: NonReducibleUnknown;
|
|
2316
2320
|
};
|
|
2321
|
+
"reset lastClickedNode": {
|
|
2322
|
+
type: "reset lastClickedNode";
|
|
2323
|
+
params: NonReducibleUnknown;
|
|
2324
|
+
};
|
|
2317
2325
|
"open source of focused or last clicked node": {
|
|
2318
2326
|
type: "open source of focused or last clicked node";
|
|
2319
2327
|
params: NonReducibleUnknown;
|
|
@@ -2399,6 +2407,18 @@ declare const _diagramMachine: StateMachine<Context, Events, {
|
|
|
2399
2407
|
type: "emit: edgeEditingStarted";
|
|
2400
2408
|
params: NonReducibleUnknown;
|
|
2401
2409
|
};
|
|
2410
|
+
"emit: paneClick": {
|
|
2411
|
+
type: "emit: paneClick";
|
|
2412
|
+
params: NonReducibleUnknown;
|
|
2413
|
+
};
|
|
2414
|
+
"emit: nodeClick": {
|
|
2415
|
+
type: "emit: nodeClick";
|
|
2416
|
+
params: NonReducibleUnknown;
|
|
2417
|
+
};
|
|
2418
|
+
"emit: edgeClick": {
|
|
2419
|
+
type: "emit: edgeClick";
|
|
2420
|
+
params: NonReducibleUnknown;
|
|
2421
|
+
};
|
|
2402
2422
|
}>, Values<{
|
|
2403
2423
|
isReady: {
|
|
2404
2424
|
type: "isReady";
|