@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.
- package/dist/LikeC4Diagram.js +3 -1
- package/dist/LikeC4View.js +47 -55
- package/dist/adhoc-editor/EditorPanel.d.ts +1 -1
- package/dist/adhoc-editor/ElementsTree.d.ts +1 -1
- package/dist/adhoc-editor/ElementsTree.js +2 -6
- package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
- package/dist/adhoc-editor/components/Tree.d.ts +5 -5
- package/dist/adhoc-editor/state/ActorProvider.d.ts +1 -1
- package/dist/adhoc-editor/state/panel.d.ts +1 -1
- package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
- package/dist/base/BaseXYFlow.d.ts +1 -1
- package/dist/base-primitives/Markdown.d.ts +1 -1
- package/dist/base-primitives/NodeHandles.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundActionButton.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
- package/dist/base-primitives/compound/CompoundTitle.d.ts +1 -1
- package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeActionButton.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
- package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
- package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -1
- package/dist/base-primitives/element/ElementData.d.ts +2 -2
- package/dist/base-primitives/element/ElementDetailsButton.d.ts +1 -1
- package/dist/base-primitives/element/ElementShape.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.d.ts +1 -1
- package/dist/base-primitives/element/ElementTags.js +1 -3
- package/dist/components/ErrorFallback.d.ts +2 -2
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/PortalToContainer.d.ts +1 -1
- package/dist/components/RootContainer.d.ts +1 -1
- package/dist/components/RootContainer.js +19 -18
- package/dist/components/SearchControl.d.ts +2 -2
- package/dist/components/ViewNotFound.d.ts +2 -2
- package/dist/context/CurrentViewModelProvider.d.ts +1 -1
- package/dist/context/DefaultMantineProvider.d.ts +1 -1
- package/dist/context/DiagramEventHandlers.d.ts +1 -1
- package/dist/context/DiagramFeatures.d.ts +1 -1
- package/dist/context/DiagramFeatures.js +5 -0
- package/dist/context/EnsureMantine.d.ts +1 -1
- package/dist/context/FramerMotionConfig.d.ts +3 -3
- package/dist/context/FramerMotionConfig.js +2 -2
- package/dist/context/IconRenderer.d.ts +2 -2
- package/dist/context/IconRenderer.js +32 -12
- package/dist/context/LikeC4ModelContext.d.ts +1 -1
- package/dist/context/RootContainerContext.d.ts +10 -17
- package/dist/context/RootContainerContext.js +1 -13
- package/dist/context/ShadowRootContext.d.ts +3 -0
- package/dist/context/ShadowRootContext.js +5 -0
- package/dist/context/TagStylesContext.d.ts +2 -1
- package/dist/context/TagStylesContext.js +5 -7
- package/dist/custom/index.d.ts +1 -1
- package/dist/custom/index.js +1 -2
- package/dist/editor/LikeC4EditorCallbacks.d.ts +5 -0
- package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
- package/dist/editor/actor/actions.d.ts +174 -0
- package/dist/editor/actor/actions.js +188 -0
- package/dist/editor/{hotkeyActor.d.ts → actor/hotkey.d.ts} +2 -2
- package/dist/editor/{hotkeyActor.js → actor/hotkey.js} +11 -4
- package/dist/editor/{editorActor.states.d.ts → actor/machine.d.ts} +5 -3
- package/dist/editor/actor/machine.js +23 -0
- package/dist/editor/actor/setup.d.ts +55 -0
- package/dist/editor/{editorActor.setup.js → actor/setup.js} +14 -10
- package/dist/editor/actor/state.editor.d.ts +147 -0
- package/dist/editor/actor/state.editor.js +56 -0
- package/dist/editor/actor/state.sync-queue.d.ts +612 -0
- package/dist/editor/actor/state.sync-queue.js +272 -0
- package/dist/editor/actor/types.d.ts +64 -0
- package/dist/editor/actor/types.js +5 -0
- package/dist/editor/applyChangesToManualLayout.js +1 -1
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/useEditorActorLogic.d.ts +8 -2
- package/dist/editor/useEditorActorLogic.js +39 -7
- package/dist/hooks/useDiagram.js +6 -1
- package/dist/hooks/useDiagramCompareLayout.js +1 -1
- package/dist/hooks/useEditorActor.d.ts +9 -0
- package/dist/hooks/useEditorActor.js +27 -0
- package/dist/hooks/useLikeC4ElementsTree.d.ts +3 -2
- package/dist/hooks/useLikeC4ElementsTree.js +3 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/likec4diagram/DiagramUI.d.ts +1 -1
- package/dist/likec4diagram/DiagramUI.js +8 -4
- package/dist/likec4diagram/DiagramXYFlow.js +26 -14
- package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/RelationshipEdge.js +127 -14
- package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
- package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
- package/dist/likec4diagram/custom/edges/edges.css.js +5 -1
- package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
- package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
- package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
- package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
- package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
- package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
- package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
- package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
- package/dist/likec4diagram/state/aligners.js +3 -0
- package/dist/likec4diagram/state/assign.js +1 -1
- package/dist/likec4diagram/state/createViewChange.js +1 -0
- package/dist/likec4diagram/state/diagram-api.d.ts +16 -0
- package/dist/likec4diagram/state/diagram-api.js +13 -7
- package/dist/likec4diagram/state/machine.actions.js +10 -10
- package/dist/likec4diagram/state/machine.d.ts +1 -1
- package/dist/likec4diagram/state/machine.setup.js +1 -1
- package/dist/likec4diagram/state/types.d.ts +1 -1
- package/dist/likec4diagram/state/utils.d.ts +1 -1
- package/dist/likec4diagram/types.d.ts +2 -0
- package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
- package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
- package/dist/likec4diagram/useLayoutConstraints.js +2 -0
- package/dist/likec4diagram/xyflow-diagram/diagram-view.js +4 -2
- package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +1 -0
- package/dist/navigationpanel/NavigationPanel.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
- package/dist/navigationpanel/NavigationPanelDropdown.js +2 -2
- package/dist/navigationpanel/_common.d.ts +2 -2
- package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
- package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
- package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
- package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
- package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
- package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
- package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
- package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/controls/ToggleReadonly.js +4 -2
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.d.ts +4 -0
- package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +36 -0
- package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/EditorPanel.js +45 -33
- package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
- package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
- package/dist/navigationpanel/styles.css.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
- package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +62 -62
- package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
- package/dist/overlays/Overlays.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
- package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
- package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
- package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
- package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
- package/dist/overlays/overlay/Overlay.d.ts +16 -0
- package/dist/overlays/overlay/Overlay.js +50 -52
- package/dist/overlays/overlaysActor.js +28 -27
- package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
- package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -5
- package/dist/overlays/relationship-details/custom/nodeTypes.js +25 -24
- package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
- package/dist/overlays/relationships-browser/SelectElement.js +2 -2
- package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
- package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
- package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
- package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
- package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
- package/dist/search/Search.d.ts +6 -3
- package/dist/search/Search.js +60 -71
- package/dist/search/XStateSearchAdapter.d.ts +1 -1
- package/dist/search/components/ElementsColumn.d.ts +1 -1
- package/dist/search/components/ElementsColumn.js +12 -8
- package/dist/search/components/PickView.d.ts +1 -1
- package/dist/search/components/SearchByTags.d.ts +1 -1
- package/dist/search/components/SearchInput.d.ts +1 -1
- package/dist/search/components/ViewsColum.d.ts +3 -3
- package/dist/search/components/_shared.css.d.ts +1 -1
- package/dist/search/searchActor.js +30 -26
- package/dist/shadowroot/ShadowRoot.d.ts +6 -6
- package/dist/shadowroot/ShadowRoot.js +68 -23
- package/dist/shadowroot/index.d.ts +1 -0
- package/dist/shadowroot/styles.d.ts +13 -0
- package/dist/shadowroot/styles.js +60 -0
- package/dist/styles2.js +1 -1
- package/package.json +33 -40
- package/panda.buildinfo.json +19 -22
- package/src/styles-font.css +114 -0
- package/src/styles-min.css +2 -0
- package/src/styles-xyflow.css +1 -0
- package/src/styles.css +3 -0
- package/styles-min.css +1 -1
- package/styles-xyflow.css +1 -1
- package/styles.css +1 -1
- package/dist/bundle/index.d.ts +0 -1
- package/dist/editor/editorActor.actions.d.ts +0 -153
- package/dist/editor/editorActor.actions.js +0 -133
- package/dist/editor/editorActor.setup.d.ts +0 -84
- package/dist/editor/editorActor.states.js +0 -219
- package/dist/hooks/useOverlaysActor.js +0 -11
- package/dist/hooks/useSearchActor.js +0 -11
- package/dist/shadowroot/styles.css.d.ts +0 -4
- package/dist/shadowroot/styles.css.js +0 -62
package/dist/LikeC4Diagram.js
CHANGED
|
@@ -36,7 +36,8 @@ function LikeC4Diagram({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, o
|
|
|
36
36
|
const optionalLikeC4Model = useOptionalLikeC4Model();
|
|
37
37
|
enableCompareWithLatest = enableCompareWithLatest && !!onLayoutTypeChange && !!optionalLikeC4Model && !isEmptyish(optionalLikeC4Model.$data.manualLayouts);
|
|
38
38
|
const hasLikeC4Model = !!optionalLikeC4Model;
|
|
39
|
-
const
|
|
39
|
+
const editor = useOptionalLikeC4Editor();
|
|
40
|
+
const hasEditor = !!editor;
|
|
40
41
|
const readonly = !hasEditor;
|
|
41
42
|
nodesSelectable ??= hasEditor || enableFocusMode || !!onNavigateTo || !!onNodeClick;
|
|
42
43
|
const bounds = pickViewBounds(view, dynamicViewVariant);
|
|
@@ -66,6 +67,7 @@ function LikeC4Diagram({ onCanvasClick, onCanvasContextMenu, onCanvasDblClick, o
|
|
|
66
67
|
features: {
|
|
67
68
|
enableFitView: fitView,
|
|
68
69
|
enableEditor: hasEditor,
|
|
70
|
+
enableAISemanticLayout: hasEditor && !!editor.applySemanticLayout,
|
|
69
71
|
enableReadOnly: readonly,
|
|
70
72
|
enableFocusMode,
|
|
71
73
|
enableNavigateTo: !!onNavigateTo,
|
package/dist/LikeC4View.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "./_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { useCallbackRef } from "./hooks/useCallbackRef.js";
|
|
3
2
|
import { stopPropagation } from "./utils/xyflow.js";
|
|
4
3
|
import { FitViewPaddings } from "./base/const.js";
|
|
5
4
|
import { useOptionalLikeC4Model } from "./context/LikeC4ModelContext.js";
|
|
@@ -10,11 +9,10 @@ import { ErrorMessage } from "./components/ViewNotFound.js";
|
|
|
10
9
|
import { ShadowRoot } from "./shadowroot/ShadowRoot.js";
|
|
11
10
|
import { css, cx } from "@likec4/styles/css";
|
|
12
11
|
import { IconX } from "@tabler/icons-react";
|
|
13
|
-
import {
|
|
12
|
+
import { useState } from "react";
|
|
14
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
import { isBoolean } from "remeda";
|
|
16
15
|
import { ActionIcon } from "@mantine/core";
|
|
17
|
-
import { AnimatePresence } from "motion/react";
|
|
18
16
|
import { Box as Box$1 } from "@likec4/styles/jsx";
|
|
19
17
|
//#region src/LikeC4View.tsx
|
|
20
18
|
var cssInteractive = css({
|
|
@@ -31,20 +29,19 @@ var cssInteractive = css({
|
|
|
31
29
|
* Component is wrapped in ShadowRoot to isolate styles.
|
|
32
30
|
*/
|
|
33
31
|
function LikeC4View({ viewId, className, pannable = false, zoomable = false, keepAspectRatio = true, colorScheme, injectFontCss = true, controls = false, layoutType: initialLayoutType = "manual", background = "transparent", browser = true, showNavigationButtons = false, enableNotations, enableFocusMode = false, enableDynamicViewWalkthrough = false, enableElementDetails = false, enableRelationshipDetails = false, enableRelationshipBrowser = enableRelationshipDetails, enableNotes = false, reduceGraphics = "auto", mantineTheme, styleNonce, style, reactFlowProps, renderNodes, children, ...props }) {
|
|
34
|
-
const rootRef = useRef(null);
|
|
35
32
|
const likec4model = useOptionalLikeC4Model();
|
|
36
33
|
const [layoutType, setLayoutType] = useState(initialLayoutType);
|
|
37
34
|
const [browserViewId, _onNavigateTo] = useState(null);
|
|
38
|
-
const onNavigateTo =
|
|
35
|
+
const onNavigateTo = (viewId) => {
|
|
39
36
|
if (viewId && viewId !== browserViewId) setLayoutType(initialLayoutType);
|
|
40
37
|
_onNavigateTo(viewId);
|
|
41
|
-
}
|
|
42
|
-
const onNavigateToThisView =
|
|
38
|
+
};
|
|
39
|
+
const onNavigateToThisView = () => {
|
|
43
40
|
onNavigateTo(viewId);
|
|
44
|
-
}
|
|
45
|
-
const closeBrowser =
|
|
41
|
+
};
|
|
42
|
+
const closeBrowser = () => {
|
|
46
43
|
onNavigateTo(null);
|
|
47
|
-
}
|
|
44
|
+
};
|
|
48
45
|
if (!likec4model) return /* @__PURE__ */ jsx(ErrorMessage, { children: "LikeC4Model not found. Make sure you have LikeC4ModelProvider in the component tree." });
|
|
49
46
|
const viewModel = likec4model.findView(viewId);
|
|
50
47
|
if (!viewModel) return /* @__PURE__ */ jsxs(ErrorMessage, { children: [
|
|
@@ -70,9 +67,7 @@ function LikeC4View({ viewId, className, pannable = false, zoomable = false, kee
|
|
|
70
67
|
const isBrowserEnabled = browser !== false;
|
|
71
68
|
const browserProps = isBoolean(browser) ? {} : browser;
|
|
72
69
|
const bounds = pickViewBounds(view, props.dynamicViewVariant);
|
|
73
|
-
const root = rootRef.current ? { root: rootRef.current } : void 0;
|
|
74
70
|
return /* @__PURE__ */ jsxs(ShadowRoot, {
|
|
75
|
-
ref: rootRef,
|
|
76
71
|
injectFontCss,
|
|
77
72
|
theme: mantineTheme,
|
|
78
73
|
colorScheme,
|
|
@@ -109,49 +104,46 @@ function LikeC4View({ viewId, className, pannable = false, zoomable = false, kee
|
|
|
109
104
|
renderNodes,
|
|
110
105
|
...props,
|
|
111
106
|
children
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
})
|
|
153
|
-
})]
|
|
154
|
-
})
|
|
107
|
+
}), browserView && /* @__PURE__ */ jsxs(Overlay, {
|
|
108
|
+
openDelay: 0,
|
|
109
|
+
onClose: closeBrowser,
|
|
110
|
+
children: [/* @__PURE__ */ jsx(LikeC4Diagram, {
|
|
111
|
+
view: browserView,
|
|
112
|
+
pannable: true,
|
|
113
|
+
zoomable: true,
|
|
114
|
+
background: "dots",
|
|
115
|
+
onNavigateTo,
|
|
116
|
+
showNavigationButtons: true,
|
|
117
|
+
enableDynamicViewWalkthrough: true,
|
|
118
|
+
enableFocusMode: true,
|
|
119
|
+
enableRelationshipBrowser: true,
|
|
120
|
+
enableElementDetails: true,
|
|
121
|
+
enableRelationshipDetails: true,
|
|
122
|
+
enableSearch: true,
|
|
123
|
+
enableElementTags: true,
|
|
124
|
+
enableNotes: true,
|
|
125
|
+
enableCompareWithLatest: true,
|
|
126
|
+
controls: true,
|
|
127
|
+
fitView: true,
|
|
128
|
+
...props,
|
|
129
|
+
fitViewPadding: FitViewPaddings.withControls,
|
|
130
|
+
...browserProps,
|
|
131
|
+
enableNotations: browserViewHasNotations && (browserProps.enableNotations ?? true),
|
|
132
|
+
renderNodes,
|
|
133
|
+
onLayoutTypeChange: setLayoutType
|
|
134
|
+
}), /* @__PURE__ */ jsx(Box$1, {
|
|
135
|
+
pos: "absolute",
|
|
136
|
+
top: "4",
|
|
137
|
+
right: "4",
|
|
138
|
+
zIndex: "999",
|
|
139
|
+
onClick: stopPropagation,
|
|
140
|
+
children: /* @__PURE__ */ jsx(ActionIcon, {
|
|
141
|
+
variant: "default",
|
|
142
|
+
color: "gray",
|
|
143
|
+
onClick: closeBrowser,
|
|
144
|
+
children: /* @__PURE__ */ jsx(IconX, {})
|
|
145
|
+
})
|
|
146
|
+
})]
|
|
155
147
|
})]
|
|
156
148
|
});
|
|
157
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const EditorPanel: () => import("react
|
|
1
|
+
export declare const EditorPanel: () => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MemoExoticComponent } from 'react';
|
|
2
|
-
export declare const ElementsTree: MemoExoticComponent<() => import("react
|
|
2
|
+
export declare const ElementsTree: MemoExoticComponent<() => import("react").JSX.Element>;
|
|
@@ -39,12 +39,8 @@ var ElementsTree = memo(() => {
|
|
|
39
39
|
}
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
|
-
case "ArrowUp":
|
|
43
|
-
|
|
44
|
-
break;
|
|
45
|
-
default:
|
|
46
|
-
console.log(e.key);
|
|
47
|
-
return;
|
|
42
|
+
case "ArrowUp": break;
|
|
43
|
+
default: return;
|
|
48
44
|
}
|
|
49
45
|
} }),
|
|
50
46
|
children: /* @__PURE__ */ jsxs(Tree$1.Root, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RecipeVariantProps } from '
|
|
1
|
+
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
2
2
|
import { MouseEventHandler, PropsWithChildren, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import { IconOrShapeRenderer } from '../../context/IconRenderer';
|
|
4
4
|
import { TreeNodeData } from '../useElementsTree';
|
|
5
|
-
import { RecipeRuntimeFn, SlotRecipeRuntimeFn } from '
|
|
6
|
-
import { StyleContextRootProvider, StyleContextConsumer } from '
|
|
7
|
-
import { IconProps } from '
|
|
5
|
+
import { RecipeRuntimeFn, SlotRecipeRuntimeFn } from '../../../styled-system';
|
|
6
|
+
import { StyleContextRootProvider, StyleContextConsumer } from '../../../styled-system/jsx';
|
|
7
|
+
import { IconProps } from '@tabler/icons-react';
|
|
8
8
|
declare const statebtn: RecipeRuntimeFn<{
|
|
9
9
|
state: {
|
|
10
10
|
"include-explicit": {
|
|
@@ -39,7 +39,7 @@ export declare const Tree: {
|
|
|
39
39
|
node: TreeNodeData;
|
|
40
40
|
className?: string;
|
|
41
41
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
42
|
-
}>) => import("react
|
|
42
|
+
}>) => import("react").JSX.Element;
|
|
43
43
|
Icon: typeof IconOrShapeRenderer;
|
|
44
44
|
Label: StyleContextConsumer<"div">;
|
|
45
45
|
Content: StyleContextConsumer<"div">;
|
|
@@ -2,4 +2,4 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { AdhocViewService } from './actor.types';
|
|
3
3
|
export declare function AdhocEditorActorProvider({ children, service }: PropsWithChildren<{
|
|
4
4
|
service: AdhocViewService;
|
|
5
|
-
}>): import("react
|
|
5
|
+
}>): import("react").JSX.Element;
|
|
@@ -30,7 +30,7 @@ declare const createEditorPanelStore: ({ initial, sideEffects, }: {
|
|
|
30
30
|
type: "inputKeyDown";
|
|
31
31
|
}>;
|
|
32
32
|
export type EditorPanelStore = ReturnType<typeof createEditorPanelStore>;
|
|
33
|
-
export declare const EditorPanelStoreProvider: (props: PropsWithChildren) => import("react
|
|
33
|
+
export declare const EditorPanelStoreProvider: (props: PropsWithChildren) => import("react").JSX.Element;
|
|
34
34
|
export declare function selectEditorPanelState<T>(selector: (state: EditorPanelState) => T): [
|
|
35
35
|
selector: (snapshot: StoreSnapshot<EditorPanelState>) => T,
|
|
36
36
|
compare: (a: NoInfer<T> | undefined, b: NoInfer<T>) => boolean
|
|
@@ -12,4 +12,4 @@ export type BaseXYFlowProps<NodeType extends BaseNode, EdgeType extends BaseEdge
|
|
|
12
12
|
fitViewPadding?: ViewPadding | undefined;
|
|
13
13
|
onViewportResize?: undefined | (() => void);
|
|
14
14
|
} & SetRequired<Omit<ReactFlowProps<NodeType, EdgeType>, 'defaultNodes' | 'defaultEdges' | 'fitViewOptions' | 'nodesSelectable' | 'nodesDraggable'>, 'nodes' | 'edges' | 'onNodesChange' | 'onEdgesChange'>>;
|
|
15
|
-
export declare function BaseXYFlow<NodeType extends BaseNode, EdgeType extends BaseEdge>({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background, children, colorMode, fitViewPadding, fitView, zoomOnDoubleClick, onViewportResize, onMoveEnd, onNodeMouseEnter, onNodeMouseLeave, onEdgeMouseEnter, onEdgeMouseLeave, ...props }: BaseXYFlowProps<NodeType, EdgeType>): import("react
|
|
15
|
+
export declare function BaseXYFlow<NodeType extends BaseNode, EdgeType extends BaseEdge>({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background, children, colorMode, fitViewPadding, fitView, zoomOnDoubleClick, onViewportResize, onMoveEnd, onNodeMouseEnter, onNodeMouseLeave, onEdgeMouseEnter, onEdgeMouseLeave, ...props }: BaseXYFlowProps<NodeType, EdgeType>): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RichTextOrEmpty as RichTextType } from '@likec4/core/types';
|
|
2
|
-
import { JsxStyleProps } from '
|
|
2
|
+
import { JsxStyleProps } from '../../styled-system/types';
|
|
3
3
|
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
4
4
|
export type MarkdownProps = Omit<ComponentPropsWithoutRef<'div'>, 'dangerouslySetInnerHTML' | 'children' | 'color'> & {
|
|
5
5
|
value: RichTextType;
|
|
@@ -5,5 +5,5 @@ type CompoundActionButtonProps = Simplify<BaseNodeProps & {
|
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
onClick: (e: ReactMouseEvent) => void;
|
|
7
7
|
}>;
|
|
8
|
-
export declare function CompoundActionButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundActionButtonProps): import("react
|
|
8
|
+
export declare function CompoundActionButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundActionButtonProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,5 +5,5 @@ type CompoundDetailsButtonProps = Simplify<BaseNodeProps & {
|
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
onClick: (e: ReactMouseEvent) => void;
|
|
7
7
|
}>;
|
|
8
|
-
export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): import("react
|
|
8
|
+
export declare function CompoundDetailsButton({ data: { hovered: isHovered, }, icon, onClick, }: CompoundDetailsButtonProps): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -11,5 +11,5 @@ type CompoundNodeContainerProps = PropsWithChildren<HTMLAttributes<HTMLDivElemen
|
|
|
11
11
|
layoutId?: string | undefined;
|
|
12
12
|
nodeProps: BaseNodeProps<BaseNode<RequiredData>>;
|
|
13
13
|
}>;
|
|
14
|
-
export declare function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered, dimmed: isDimmed, ...data }, }, className, children, style, ...rest }: CompoundNodeContainerProps): import("react
|
|
14
|
+
export declare function CompoundNodeContainer({ nodeProps: { data: { hovered: isHovered, dimmed: isDimmed, ...data }, }, className, children, style, ...rest }: CompoundNodeContainerProps): import("react").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -9,5 +9,5 @@ type RequiredData = {
|
|
|
9
9
|
type CompoundTitleProps = {
|
|
10
10
|
data: RequiredData;
|
|
11
11
|
};
|
|
12
|
-
export declare function CompoundTitle({ data }: CompoundTitleProps): import("react
|
|
12
|
+
export declare function CompoundTitle({ data }: CompoundTitleProps): import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -3,5 +3,5 @@ type EdgeActionBtnProps = {
|
|
|
3
3
|
icon?: ReactNode;
|
|
4
4
|
onClick: (e: ReactMouseEvent) => void;
|
|
5
5
|
};
|
|
6
|
-
export declare function EdgeActionButton({ icon, onClick }: EdgeActionBtnProps): import("react
|
|
6
|
+
export declare function EdgeActionButton({ icon, onClick }: EdgeActionBtnProps): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -7,5 +7,5 @@ type EdgeContainerProps = PropsWithChildren<BaseEdgePropsWithData<Data> & {
|
|
|
7
7
|
component?: 'g' | 'svg' | undefined;
|
|
8
8
|
className?: string | undefined;
|
|
9
9
|
}>;
|
|
10
|
-
export declare function EdgeContainer({ className, component, selectable, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, animated, children, style, }: EdgeContainerProps): import("react
|
|
10
|
+
export declare function EdgeContainer({ className, component, selectable, selected, data: { color, hovered: isHovered, active: isActive, dimmed: isDimmed, ...data }, animated, children, style, }: EdgeContainerProps): import("react").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -15,5 +15,5 @@ type EdgeLabelContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
15
15
|
edgeProps: BaseEdgePropsWithData<Data>;
|
|
16
16
|
};
|
|
17
17
|
export declare function EdgeLabelContainer({ edgeProps: { id, selected, data: { hovered: isHovered, active: isActive, dimmed: isDimmed, labelBBox, color, }, animated, }, labelPosition: labelXY, className, style: contentStyle, // applied to inner content div, not the positioned container
|
|
18
|
-
children, ...rest }: EdgeLabelContainerProps): import("react
|
|
18
|
+
children, ...rest }: EdgeLabelContainerProps): import("react").JSX.Element | null;
|
|
19
19
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RelationshipArrowType } from '@likec4/core/types';
|
|
2
2
|
import { SVGProps } from 'react';
|
|
3
3
|
export declare const EdgeMarkers: {
|
|
4
|
-
Arrow: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
5
|
-
Crow: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
6
|
-
OArrow: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
7
|
-
Open: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
8
|
-
Diamond: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
9
|
-
ODiamond: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
10
|
-
Dot: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
11
|
-
ODot: (props: SVGProps<SVGMarkerElement>) => import("react
|
|
4
|
+
Arrow: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
5
|
+
Crow: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
6
|
+
OArrow: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
7
|
+
Open: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
8
|
+
Diamond: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
9
|
+
ODiamond: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
10
|
+
Dot: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
11
|
+
ODot: (props: SVGProps<SVGMarkerElement>) => import("react").JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
export type EdgeMarkerType = keyof typeof EdgeMarkers;
|
|
14
14
|
export declare function arrowTypeToMarker(arrowType?: RelationshipArrowType): EdgeMarkerType | undefined;
|
|
@@ -31,7 +31,7 @@ type ElementActionButtonsProps = {
|
|
|
31
31
|
* />
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
export declare function ElementActionButtons({ selected, data: { hovered: isHovered, }, buttons, }: ElementActionButtonsProps): import("react
|
|
34
|
+
export declare function ElementActionButtons({ selected, data: { hovered: isHovered, }, buttons, }: ElementActionButtonsProps): import("react").JSX.Element | null;
|
|
35
35
|
export declare namespace ElementActionButtons {
|
|
36
36
|
type Item = {
|
|
37
37
|
key?: string;
|
|
@@ -47,10 +47,10 @@ type SlotProps = {
|
|
|
47
47
|
* </ElementData.Root>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export declare function ElementData({ data }: ElementDataProps): import("react
|
|
50
|
+
export declare function ElementData({ data }: ElementDataProps): import("react").JSX.Element;
|
|
51
51
|
export declare namespace ElementData {
|
|
52
52
|
var Root: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & ElementDataProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
|
-
var Icon: ({ data, ...props }: IconProps) => import("react
|
|
53
|
+
var Icon: ({ data, ...props }: IconProps) => import("react").JSX.Element;
|
|
54
54
|
var Content: import("react").ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
55
|
var Title: import("react").ForwardRefExoticComponent<SlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
56
56
|
var Technology: import("react").ForwardRefExoticComponent<((import("type-fest/source/merge-exclusive").Without<SlotProps, {
|
|
@@ -6,5 +6,5 @@ type ElementDetailsButtonProps = {
|
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
onClick: (e: ReactMouseEvent) => void;
|
|
8
8
|
};
|
|
9
|
-
export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, onClick, }: ElementDetailsButtonProps): import("react
|
|
9
|
+
export declare function ElementDetailsButton({ selected, data: { hovered: isHovered, }, icon, onClick, }: ElementDetailsButtonProps): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -14,5 +14,5 @@ type ElementShapeProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
showSelectionOutline?: boolean | undefined;
|
|
16
16
|
};
|
|
17
|
-
export declare function ElementShape({ data, width, height, showSelectionOutline }: ElementShapeProps): import("react
|
|
17
|
+
export declare function ElementShape({ data, width, height, showSelectionOutline }: ElementShapeProps): import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -17,5 +17,5 @@ export type ElementTagsProps = BaseNodePropsWithData<Data> & {
|
|
|
17
17
|
onTagMouseEnter?: (tag: `#${string}`) => void;
|
|
18
18
|
onTagMouseLeave?: (tag: `#${string}`) => void;
|
|
19
19
|
};
|
|
20
|
-
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered }, onTagClick, onTagMouseEnter, onTagMouseLeave }: ElementTagsProps) => import("react
|
|
20
|
+
export declare const ElementTags: MemoExoticComponent<({ id, data: { tags, width, hovered }, onTagClick, onTagMouseEnter, onTagMouseLeave }: ElementTagsProps) => import("react").JSX.Element | null>;
|
|
21
21
|
export {};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { useCurrentZoomAtLeast } from "../../hooks/useXYFlow.js";
|
|
3
3
|
import { stopPropagation } from "../../utils/xyflow.js";
|
|
4
|
-
import { useTagSpecification } from "../../context/TagStylesContext.js";
|
|
5
4
|
import { css, cx } from "@likec4/styles/css";
|
|
6
5
|
import { forwardRef, memo, useCallback, useEffect } from "react";
|
|
7
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { NodeToolbar, Position, useStore } from "@xyflow/react";
|
|
9
8
|
import { deepEqual } from "fast-equals";
|
|
10
9
|
import { hasAtLeast } from "remeda";
|
|
11
|
-
import { isTagColorSpecified } from "@likec4/core";
|
|
12
10
|
import { useDebouncedState, useHover } from "@mantine/hooks";
|
|
13
11
|
import { Box, HStack } from "@likec4/styles/jsx";
|
|
14
12
|
import { hstack } from "@likec4/styles/patterns";
|
|
@@ -18,7 +16,7 @@ var ElementTag = forwardRef(({ tag, cursor, className, style, ...props }, ref) =
|
|
|
18
16
|
return /* @__PURE__ */ jsxs(Box, {
|
|
19
17
|
ref,
|
|
20
18
|
"data-likec4-tag": tag,
|
|
21
|
-
className: cx(likec4tag(
|
|
19
|
+
className: cx(likec4tag(), className),
|
|
22
20
|
...props,
|
|
23
21
|
style: {
|
|
24
22
|
cursor,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ErrorBoundaryProps, FallbackProps } from 'react-error-boundary';
|
|
2
|
-
export declare function ErrorFallback({ error, resetErrorBoundary }: FallbackProps): import("react
|
|
3
|
-
export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): import("react
|
|
2
|
+
export declare function ErrorFallback({ error, resetErrorBoundary }: FallbackProps): import("react").JSX.Element;
|
|
3
|
+
export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardRefComponent, HTMLMotionProps } from 'motion/react';
|
|
2
2
|
import { HTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
|
-
import { StyleContextProvider, StyleContextConsumer } from '
|
|
4
|
-
import { NavigationPanelRecipe } from '
|
|
3
|
+
import { StyleContextProvider, StyleContextConsumer } from '../../styled-system/jsx';
|
|
4
|
+
import { NavigationPanelRecipe } from '../../styled-system/recipes';
|
|
5
5
|
export declare const NavigationPanel: {
|
|
6
6
|
Root: StyleContextProvider<ForwardRefComponent<"div", HTMLMotionProps<"div">>, NavigationPanelRecipe>;
|
|
7
7
|
Body: StyleContextConsumer<ForwardRefComponent<"div", HTMLMotionProps<"div">>>;
|
|
@@ -3,4 +3,4 @@ import { PropsWithChildren } from 'react';
|
|
|
3
3
|
* PortalToContainer is used to render elements outside the LikeC4DiagramXYFlow, but inside the container.
|
|
4
4
|
* It is used internally by the library.
|
|
5
5
|
*/
|
|
6
|
-
export declare function PortalToContainer({ children }: PropsWithChildren): import("react
|
|
6
|
+
export declare function PortalToContainer({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import {
|
|
2
|
+
import { RootContainerContextProvider } from "../context/RootContainerContext.js";
|
|
3
3
|
import { cx } from "@likec4/styles/css";
|
|
4
4
|
import { useMemo, useRef, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -13,23 +13,24 @@ function RootContainer({ id, className, reduceGraphics = false, children }) {
|
|
|
13
13
|
const ctx = useMemo(() => ({
|
|
14
14
|
id,
|
|
15
15
|
ref,
|
|
16
|
-
selector: `#${id}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
selector: `#${id}`,
|
|
17
|
+
reducedGraphics: reduceGraphics,
|
|
18
|
+
$panning: $isPanning
|
|
19
|
+
}), [
|
|
20
|
+
id,
|
|
21
|
+
ref,
|
|
22
|
+
reduceGraphics,
|
|
23
|
+
$isPanning
|
|
24
|
+
]);
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
id,
|
|
27
|
+
className: cx("likec4-root", className),
|
|
28
|
+
ref,
|
|
29
|
+
"data-likec4-diagram-panning": isPanning,
|
|
30
|
+
...reduceGraphics && { ["data-likec4-reduced-graphics"]: true },
|
|
31
|
+
children: /* @__PURE__ */ jsx(RootContainerContextProvider, {
|
|
32
|
+
value: ctx,
|
|
33
|
+
children
|
|
33
34
|
})
|
|
34
35
|
});
|
|
35
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementProps, UnstyledButtonProps } from '@mantine/core';
|
|
2
|
-
interface SearchControlProps extends UnstyledButtonProps, ElementProps<'button'> {
|
|
2
|
+
interface SearchControlProps extends Omit<UnstyledButtonProps, 'className'>, ElementProps<'button'> {
|
|
3
3
|
}
|
|
4
|
-
export declare function SearchControl({ className, ...others }: SearchControlProps): import("react
|
|
4
|
+
export declare function SearchControl({ className, ...others }: SearchControlProps): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare function ErrorMessage({ children }: PropsWithChildren): import("react
|
|
2
|
+
export declare function ErrorMessage({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
3
3
|
export declare function ViewNotFound({ viewId }: {
|
|
4
4
|
viewId: string;
|
|
5
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare function CurrentViewModelProvider({ children }: PropsWithChildren): import("react
|
|
2
|
+
export declare function CurrentViewModelProvider({ children }: PropsWithChildren): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MantineProviderProps } from '@mantine/core';
|
|
2
|
-
export declare function DefaultMantineProvider({ children, theme, ...props }: MantineProviderProps): import("react
|
|
2
|
+
export declare function DefaultMantineProvider({ children, theme, ...props }: MantineProviderProps): import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ export type DiagramEventHandlersContext = RequiredOrNull<LikeC4DiagramEventHandl
|
|
|
9
9
|
};
|
|
10
10
|
export declare function DiagramEventHandlers({ handlers, children, }: PropsWithChildren<{
|
|
11
11
|
handlers: Required<LikeC4DiagramEventHandlers>;
|
|
12
|
-
}>): import("react
|
|
12
|
+
}>): import("react").JSX.Element;
|
|
13
13
|
export declare function useDiagramEventHandlers(): DiagramEventHandlersContext;
|
|
14
14
|
export declare function useDiagramEventHandlersRef(): DiagramEventHandlersRef;
|
|
15
15
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExclusiveUnion } from '@likec4/core/types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { JSX } from 'react/jsx-runtime';
|
|
4
|
-
declare const FeatureNames: readonly ["Controls", "Editor", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Notes", "Vscode", "ElementTags"];
|
|
4
|
+
declare const FeatureNames: readonly ["Controls", "Editor", "AISemanticLayout", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "FitView", "CompareWithLatest", "Notes", "Vscode", "ElementTags"];
|
|
5
5
|
export type FeatureName = typeof FeatureNames[number];
|
|
6
6
|
export type TogglableFeature = ('ReadOnly' | 'CompareWithLatest') & FeatureName;
|
|
7
7
|
export type EnabledFeatures = {
|
|
@@ -6,6 +6,10 @@ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
|
6
6
|
//#region src/context/DiagramFeatures.tsx
|
|
7
7
|
var DefaultFeatures = {
|
|
8
8
|
enableEditor: false,
|
|
9
|
+
/**
|
|
10
|
+
* Enabled if editor has `applySemanticLayout` method
|
|
11
|
+
*/
|
|
12
|
+
enableAISemanticLayout: false,
|
|
9
13
|
enableReadOnly: true,
|
|
10
14
|
enableCompareWithLatest: false,
|
|
11
15
|
enableControls: false,
|
|
@@ -51,6 +55,7 @@ function DiagramFeatures({ children, features, overrides }) {
|
|
|
51
55
|
var overridesForOverlays = {
|
|
52
56
|
enableControls: false,
|
|
53
57
|
enableReadOnly: true,
|
|
58
|
+
enableAISemanticLayout: false,
|
|
54
59
|
enableCompareWithLatest: false
|
|
55
60
|
};
|
|
56
61
|
DiagramFeatures.Overlays = ({ children }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
type EnsureMantineProps = PropsWithChildren<{}>;
|
|
3
|
-
export declare function EnsureMantine({ children }: EnsureMantineProps): import("react
|
|
3
|
+
export declare function EnsureMantine({ children }: EnsureMantineProps): import("react").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function FramerMotionConfig({ reducedMotion, children, }: PropsWithChildren<{
|
|
3
3
|
/**
|
|
4
4
|
* If true, will respect the device prefersReducedMotion setting by switching
|
|
5
5
|
* transform animations off.
|
|
6
6
|
*/
|
|
7
|
-
reducedMotion?:
|
|
8
|
-
}>)
|
|
7
|
+
reducedMotion?: 'always' | 'never' | 'user' | undefined;
|
|
8
|
+
}>): import("react").JSX.Element;
|