@likec4/diagram 1.56.0 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/LikeC4Diagram.js +3 -1
  2. package/dist/LikeC4View.js +47 -55
  3. package/dist/adhoc-editor/EditorPanel.d.ts +1 -1
  4. package/dist/adhoc-editor/ElementsTree.d.ts +1 -1
  5. package/dist/adhoc-editor/ElementsTree.js +2 -6
  6. package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +1 -1
  7. package/dist/adhoc-editor/components/Tree.d.ts +5 -5
  8. package/dist/adhoc-editor/state/ActorProvider.d.ts +1 -1
  9. package/dist/adhoc-editor/state/panel.d.ts +1 -1
  10. package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +1 -1
  11. package/dist/base/BaseXYFlow.d.ts +1 -1
  12. package/dist/base-primitives/Markdown.d.ts +1 -1
  13. package/dist/base-primitives/NodeHandles.d.ts +1 -1
  14. package/dist/base-primitives/compound/CompoundActionButton.d.ts +1 -1
  15. package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +1 -1
  16. package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +1 -1
  17. package/dist/base-primitives/compound/CompoundTitle.d.ts +1 -1
  18. package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
  19. package/dist/base-primitives/edge/EdgeActionButton.d.ts +1 -1
  20. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  21. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
  22. package/dist/base-primitives/edge/EdgeMarkers.d.ts +8 -8
  23. package/dist/base-primitives/element/ElementActionButtons.d.ts +1 -1
  24. package/dist/base-primitives/element/ElementData.d.ts +2 -2
  25. package/dist/base-primitives/element/ElementDetailsButton.d.ts +1 -1
  26. package/dist/base-primitives/element/ElementShape.d.ts +1 -1
  27. package/dist/base-primitives/element/ElementTags.d.ts +1 -1
  28. package/dist/base-primitives/element/ElementTags.js +1 -3
  29. package/dist/components/ErrorFallback.d.ts +2 -2
  30. package/dist/components/NavigationPanel.d.ts +2 -2
  31. package/dist/components/PortalToContainer.d.ts +1 -1
  32. package/dist/components/RootContainer.d.ts +1 -1
  33. package/dist/components/RootContainer.js +19 -18
  34. package/dist/components/SearchControl.d.ts +2 -2
  35. package/dist/components/ViewNotFound.d.ts +2 -2
  36. package/dist/context/CurrentViewModelProvider.d.ts +1 -1
  37. package/dist/context/DefaultMantineProvider.d.ts +1 -1
  38. package/dist/context/DiagramEventHandlers.d.ts +1 -1
  39. package/dist/context/DiagramFeatures.d.ts +1 -1
  40. package/dist/context/DiagramFeatures.js +5 -0
  41. package/dist/context/EnsureMantine.d.ts +1 -1
  42. package/dist/context/FramerMotionConfig.d.ts +3 -3
  43. package/dist/context/FramerMotionConfig.js +2 -2
  44. package/dist/context/IconRenderer.d.ts +2 -2
  45. package/dist/context/IconRenderer.js +32 -12
  46. package/dist/context/LikeC4ModelContext.d.ts +1 -1
  47. package/dist/context/RootContainerContext.d.ts +10 -17
  48. package/dist/context/RootContainerContext.js +1 -13
  49. package/dist/context/ShadowRootContext.d.ts +3 -0
  50. package/dist/context/ShadowRootContext.js +5 -0
  51. package/dist/context/TagStylesContext.d.ts +2 -1
  52. package/dist/context/TagStylesContext.js +5 -7
  53. package/dist/custom/index.d.ts +1 -1
  54. package/dist/custom/index.js +1 -2
  55. package/dist/editor/LikeC4EditorCallbacks.d.ts +5 -0
  56. package/dist/editor/LikeC4EditorProvider.d.ts +2 -2
  57. package/dist/editor/actor/actions.d.ts +174 -0
  58. package/dist/editor/actor/actions.js +188 -0
  59. package/dist/editor/{hotkeyActor.d.ts → actor/hotkey.d.ts} +2 -2
  60. package/dist/editor/{hotkeyActor.js → actor/hotkey.js} +11 -4
  61. package/dist/editor/{editorActor.states.d.ts → actor/machine.d.ts} +5 -3
  62. package/dist/editor/actor/machine.js +23 -0
  63. package/dist/editor/actor/setup.d.ts +55 -0
  64. package/dist/editor/{editorActor.setup.js → actor/setup.js} +14 -10
  65. package/dist/editor/actor/state.editor.d.ts +147 -0
  66. package/dist/editor/actor/state.editor.js +56 -0
  67. package/dist/editor/actor/state.sync-queue.d.ts +612 -0
  68. package/dist/editor/actor/state.sync-queue.js +272 -0
  69. package/dist/editor/actor/types.d.ts +64 -0
  70. package/dist/editor/actor/types.js +5 -0
  71. package/dist/editor/applyChangesToManualLayout.js +1 -1
  72. package/dist/editor/index.d.ts +2 -1
  73. package/dist/editor/useEditorActorLogic.d.ts +8 -2
  74. package/dist/editor/useEditorActorLogic.js +39 -7
  75. package/dist/hooks/useDiagram.js +6 -1
  76. package/dist/hooks/useDiagramCompareLayout.js +1 -1
  77. package/dist/hooks/useEditorActor.d.ts +9 -0
  78. package/dist/hooks/useEditorActor.js +27 -0
  79. package/dist/hooks/useLikeC4ElementsTree.d.ts +3 -2
  80. package/dist/hooks/useLikeC4ElementsTree.js +3 -1
  81. package/dist/index.d.ts +2 -0
  82. package/dist/index.js +3 -1
  83. package/dist/likec4diagram/DiagramUI.d.ts +1 -1
  84. package/dist/likec4diagram/DiagramUI.js +8 -4
  85. package/dist/likec4diagram/DiagramXYFlow.js +26 -14
  86. package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +1 -1
  87. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +127 -14
  88. package/dist/likec4diagram/custom/edges/SequenceStepEdge.d.ts +1 -1
  89. package/dist/likec4diagram/custom/edges/edges.css.d.ts +1 -0
  90. package/dist/likec4diagram/custom/edges/edges.css.js +5 -1
  91. package/dist/likec4diagram/custom/nodes/CompoundActions.d.ts +1 -1
  92. package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -2
  93. package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +1 -1
  94. package/dist/likec4diagram/custom/nodes/NodeNotes.d.ts +1 -1
  95. package/dist/likec4diagram/custom/nodes/SequenceActorNode.d.ts +2 -2
  96. package/dist/likec4diagram/custom/nodes/nodes.d.ts +7 -7
  97. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +3 -3
  98. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.d.ts +2 -2
  99. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +2 -2
  100. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.d.ts +1 -1
  101. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +3 -3
  102. package/dist/likec4diagram/relationship-popover/RelationshipPopover.d.ts +1 -1
  103. package/dist/likec4diagram/relationship-popover/components.d.ts +2 -2
  104. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +1 -1
  105. package/dist/likec4diagram/state/aligners.js +3 -0
  106. package/dist/likec4diagram/state/assign.js +1 -1
  107. package/dist/likec4diagram/state/createViewChange.js +1 -0
  108. package/dist/likec4diagram/state/diagram-api.d.ts +16 -0
  109. package/dist/likec4diagram/state/diagram-api.js +13 -7
  110. package/dist/likec4diagram/state/machine.actions.js +10 -10
  111. package/dist/likec4diagram/state/machine.d.ts +1 -1
  112. package/dist/likec4diagram/state/machine.setup.js +1 -1
  113. package/dist/likec4diagram/state/types.d.ts +1 -1
  114. package/dist/likec4diagram/state/utils.d.ts +1 -1
  115. package/dist/likec4diagram/types.d.ts +2 -0
  116. package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +1 -1
  117. package/dist/likec4diagram/ui/notation/NotationPanel.d.ts +1 -1
  118. package/dist/likec4diagram/useLayoutConstraints.js +2 -0
  119. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +4 -2
  120. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +1 -0
  121. package/dist/navigationpanel/NavigationPanel.d.ts +1 -1
  122. package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -1
  123. package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -1
  124. package/dist/navigationpanel/NavigationPanelDropdown.js +2 -2
  125. package/dist/navigationpanel/_common.d.ts +2 -2
  126. package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +1 -1
  127. package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +1 -1
  128. package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -1
  129. package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
  130. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +1 -1
  131. package/dist/navigationpanel/controls/DetailsControls.d.ts +1 -1
  132. package/dist/navigationpanel/controls/LayoutWarning.d.ts +1 -1
  133. package/dist/navigationpanel/controls/LogoButton.d.ts +1 -1
  134. package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
  135. package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
  136. package/dist/navigationpanel/controls/SearchControl.d.ts +1 -1
  137. package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
  138. package/dist/navigationpanel/controls/ToggleReadonly.js +4 -2
  139. package/dist/navigationpanel/editorpanel/ApplySemanticLayout.d.ts +4 -0
  140. package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +36 -0
  141. package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -1
  142. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
  143. package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -1
  144. package/dist/navigationpanel/editorpanel/EditorPanel.js +45 -33
  145. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +1 -1
  146. package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -1
  147. package/dist/navigationpanel/styles.css.d.ts +1 -1
  148. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +1 -1
  149. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +62 -62
  150. package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +1 -1
  151. package/dist/overlays/Overlays.d.ts +1 -1
  152. package/dist/overlays/element-details/ElementDetails.d.ts +1 -1
  153. package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
  154. package/dist/overlays/element-details/MetadataValue.d.ts +2 -2
  155. package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
  156. package/dist/overlays/element-details/TabPanelStructure.d.ts +2 -2
  157. package/dist/overlays/overlay/Overlay.d.ts +16 -0
  158. package/dist/overlays/overlay/Overlay.js +50 -52
  159. package/dist/overlays/overlaysActor.js +28 -27
  160. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
  161. package/dist/overlays/relationship-details/SelectEdge.d.ts +1 -1
  162. package/dist/overlays/relationship-details/custom/ElementActions.d.ts +1 -1
  163. package/dist/overlays/relationship-details/custom/nodeTypes.d.ts +4 -5
  164. package/dist/overlays/relationship-details/custom/nodeTypes.js +25 -24
  165. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
  166. package/dist/overlays/relationships-browser/SelectElement.d.ts +1 -1
  167. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  168. package/dist/overlays/relationships-browser/custom/ElementActions.d.ts +1 -1
  169. package/dist/overlays/relationships-browser/custom/EmptyNode.d.ts +1 -1
  170. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +4 -4
  171. package/dist/projects-overview/ProjectsOverview.d.ts +1 -1
  172. package/dist/projects-overview/custom/nodeTypes.d.ts +1 -1
  173. package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -1
  174. package/dist/search/Search.d.ts +6 -3
  175. package/dist/search/Search.js +60 -71
  176. package/dist/search/XStateSearchAdapter.d.ts +1 -1
  177. package/dist/search/components/ElementsColumn.d.ts +1 -1
  178. package/dist/search/components/ElementsColumn.js +12 -8
  179. package/dist/search/components/PickView.d.ts +1 -1
  180. package/dist/search/components/SearchByTags.d.ts +1 -1
  181. package/dist/search/components/SearchInput.d.ts +1 -1
  182. package/dist/search/components/ViewsColum.d.ts +3 -3
  183. package/dist/search/components/_shared.css.d.ts +1 -1
  184. package/dist/search/searchActor.js +30 -26
  185. package/dist/shadowroot/ShadowRoot.d.ts +6 -6
  186. package/dist/shadowroot/ShadowRoot.js +68 -23
  187. package/dist/shadowroot/index.d.ts +1 -0
  188. package/dist/shadowroot/styles.d.ts +13 -0
  189. package/dist/shadowroot/styles.js +60 -0
  190. package/dist/styles2.js +1 -1
  191. package/package.json +33 -40
  192. package/panda.buildinfo.json +19 -22
  193. package/src/styles-font.css +114 -0
  194. package/src/styles-min.css +2 -0
  195. package/src/styles-xyflow.css +1 -0
  196. package/src/styles.css +3 -0
  197. package/styles-min.css +1 -1
  198. package/styles-xyflow.css +1 -1
  199. package/styles.css +1 -1
  200. package/dist/bundle/index.d.ts +0 -1
  201. package/dist/editor/editorActor.actions.d.ts +0 -153
  202. package/dist/editor/editorActor.actions.js +0 -133
  203. package/dist/editor/editorActor.setup.d.ts +0 -84
  204. package/dist/editor/editorActor.states.js +0 -219
  205. package/dist/hooks/useOverlaysActor.js +0 -11
  206. package/dist/hooks/useSearchActor.js +0 -11
  207. package/dist/shadowroot/styles.css.d.ts +0 -4
  208. package/dist/shadowroot/styles.css.js +0 -62
@@ -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 hasEditor = !!useOptionalLikeC4Editor();
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,
@@ -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 { useRef, useState } from "react";
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 = useCallbackRef((viewId) => {
35
+ const onNavigateTo = (viewId) => {
39
36
  if (viewId && viewId !== browserViewId) setLayoutType(initialLayoutType);
40
37
  _onNavigateTo(viewId);
41
- });
42
- const onNavigateToThisView = useCallbackRef(() => {
38
+ };
39
+ const onNavigateToThisView = () => {
43
40
  onNavigateTo(viewId);
44
- });
45
- const closeBrowser = useCallbackRef(() => {
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__ */ jsx(AnimatePresence, {
113
- ...root,
114
- children: browserView && /* @__PURE__ */ jsxs(Overlay, {
115
- openDelay: 0,
116
- onClose: closeBrowser,
117
- children: [/* @__PURE__ */ jsx(LikeC4Diagram, {
118
- view: browserView,
119
- pannable: true,
120
- zoomable: true,
121
- background: "dots",
122
- onNavigateTo,
123
- showNavigationButtons: true,
124
- enableDynamicViewWalkthrough: true,
125
- enableFocusMode: true,
126
- enableRelationshipBrowser: true,
127
- enableElementDetails: true,
128
- enableRelationshipDetails: true,
129
- enableSearch: true,
130
- enableElementTags: true,
131
- enableNotes: true,
132
- enableCompareWithLatest: true,
133
- controls: true,
134
- fitView: true,
135
- ...props,
136
- fitViewPadding: FitViewPaddings.withControls,
137
- ...browserProps,
138
- enableNotations: browserViewHasNotations && (browserProps.enableNotations ?? true),
139
- renderNodes,
140
- onLayoutTypeChange: setLayoutType
141
- }), /* @__PURE__ */ jsx(Box$1, {
142
- pos: "absolute",
143
- top: "4",
144
- right: "4",
145
- zIndex: "999",
146
- onClick: stopPropagation,
147
- children: /* @__PURE__ */ jsx(ActionIcon, {
148
- variant: "default",
149
- color: "gray",
150
- onClick: closeBrowser,
151
- children: /* @__PURE__ */ jsx(IconX, {})
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element>;
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
- console.log("ArrowUp", { selected: api.selectedValue });
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,4 +1,4 @@
1
1
  import { AdhocViewService } from './state/actor.types';
2
2
  export declare function LikeC4AdHocViewEditor({ service }: {
3
3
  service: AdhocViewService;
4
- }): import("react/jsx-runtime").JSX.Element;
4
+ }): import("react").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { RecipeVariantProps } from '@likec4/styles/css';
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 '@likec4/styles';
6
- import { StyleContextRootProvider, StyleContextConsumer } from '@likec4/styles/jsx';
7
- import { IconProps } from '../../../@tabler/icons-react/dist/esm/icons/index.mjs';
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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
@@ -3,4 +3,4 @@ export declare function ViewRulesPanel({ rules, onToggle, onDelete, }: {
3
3
  rules: AdhocRule[];
4
4
  onToggle: (rule: AdhocRule) => void;
5
5
  onDelete: (rule: AdhocRule) => void;
6
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): import("react").JSX.Element;
@@ -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/jsx-runtime").JSX.Element;
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 '@likec4/styles/types';
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;
@@ -4,4 +4,4 @@ import { AutoLayoutDirection } from '@likec4/core/types';
4
4
  */
5
5
  export declare function DefaultHandles({ direction }: {
6
6
  direction?: AutoLayoutDirection | undefined;
7
- }): import("react/jsx-runtime").JSX.Element;
7
+ }): import("react").JSX.Element;
@@ -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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
12
+ export declare function CompoundTitle({ data }: CompoundTitleProps): import("react").JSX.Element;
13
13
  export {};
@@ -1,4 +1,4 @@
1
- import { RecipeRuntimeFn } from '@likec4/styles';
1
+ import { RecipeRuntimeFn } from '../../../styled-system';
2
2
  export declare const compoundActionBtn: RecipeRuntimeFn<{
3
3
  delay: {
4
4
  true: {
@@ -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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element | null;
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/jsx-runtime").JSX.Element;
5
- Crow: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
6
- OArrow: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
7
- Open: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
8
- Diamond: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
9
- ODiamond: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
10
- Dot: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
11
- ODot: (props: SVGProps<SVGMarkerElement>) => import("react/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element | null;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element | null>;
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({ autoTextColor: isTagColorSpecified(useTagSpecification(tag)) }), className),
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/jsx-runtime").JSX.Element;
3
- export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): import("react/jsx-runtime").JSX.Element;
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 '@likec4/styles/jsx';
4
- import { NavigationPanelRecipe } from '@likec4/styles/recipes';
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/jsx-runtime").JSX.Element;
6
+ export declare function PortalToContainer({ children }: PropsWithChildren): import("react").JSX.Element;
@@ -3,4 +3,4 @@ export declare function RootContainer({ id, className, reduceGraphics, children,
3
3
  id: string;
4
4
  className?: string | undefined;
5
5
  reduceGraphics?: boolean;
6
- }>): import("react/jsx-runtime").JSX.Element;
6
+ }>): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import "../_virtual/_rolldown/runtime.js";
2
- import { PanningAtomSafeCtx, ReduceGraphicsModeProvider, RootContainerContextProvider } from "../context/RootContainerContext.js";
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
- }), [id, ref]);
18
- return /* @__PURE__ */ jsx(ReduceGraphicsModeProvider, {
19
- value: reduceGraphics,
20
- children: /* @__PURE__ */ jsx(PanningAtomSafeCtx, {
21
- value: $isPanning,
22
- children: /* @__PURE__ */ jsx("div", {
23
- id,
24
- className: cx("likec4-root", className),
25
- ref,
26
- "data-likec4-diagram-panning": isPanning,
27
- ...reduceGraphics && { ["data-likec4-reduced-graphics"]: true },
28
- children: /* @__PURE__ */ jsx(RootContainerContextProvider, {
29
- value: ctx,
30
- children
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
5
+ }): import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { PropsWithChildren } from 'react';
2
- export declare function CurrentViewModelProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
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 const FramerMotionConfig: ({ reducedMotion, children, }: PropsWithChildren<{
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?: "always" | "never" | "user" | undefined;
8
- }>) => import("react/jsx-runtime").JSX.Element;
7
+ reducedMotion?: 'always' | 'never' | 'user' | undefined;
8
+ }>): import("react").JSX.Element;