likec4 1.15.1 → 1.17.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/__app__/react/likec4.tsx +9 -6
- package/dist/__app__/src/chunks/{-index-overview-3cvoLqZL.js → -index-overview-DNT3FQkn.js} +5 -13
- package/dist/__app__/src/chunks/{likec4-zEZHE7gJ.js → likec4-CLNXvKhh.js} +8 -4
- package/dist/__app__/src/chunks/{main-CDPsQgdJ.js → main-Beyl8kQ7.js} +7230 -6268
- package/dist/__app__/src/chunks/{mantine-3sBuUgD1.js → mantine-CdYQpHSU.js} +566 -458
- package/dist/__app__/src/chunks/{tanstack-router-CfO1HFS2.js → tanstack-router-DJI32bwX.js} +1 -1
- package/dist/__app__/src/main.js +1 -1
- package/dist/__app__/src/style.css +1 -1
- package/dist/__app__/webcomponent/webcomponent.js +18556 -17398
- package/dist/chunks/prompt.mjs +1 -1
- package/dist/cli/index.mjs +3 -3
- package/dist/index.d.mts +63 -25
- package/dist/index.d.ts +63 -25
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.D5WUQlNc.mjs +1824 -0
- package/package.json +17 -16
- package/react/index.d.ts +66 -46
- package/react/index.mjs +19753 -18089
- package/react/style.css +1 -1
- package/dist/shared/likec4.bLQ78LNz.mjs +0 -1824
|
@@ -78,13 +78,13 @@ const LikeC4ViewMemo = /* @__PURE__ */ memo<LikeC4ViewProps>(function LikeC4View
|
|
|
78
78
|
background = 'transparent',
|
|
79
79
|
browserBackground = 'dots',
|
|
80
80
|
where,
|
|
81
|
-
showElementLinks = true,
|
|
82
81
|
showDiagramTitle = false,
|
|
83
82
|
showNavigationButtons = false,
|
|
84
83
|
showNotations = false,
|
|
85
84
|
enableFocusMode = false,
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
enableElementDetails = false,
|
|
86
|
+
enableRelationshipDetails = false,
|
|
87
|
+
enableRelationshipBrowser = enableRelationshipDetails,
|
|
88
88
|
browserClassName,
|
|
89
89
|
browserStyle,
|
|
90
90
|
mantineTheme,
|
|
@@ -124,12 +124,13 @@ const LikeC4ViewMemo = /* @__PURE__ */ memo<LikeC4ViewProps>(function LikeC4View
|
|
|
124
124
|
onNavigateTo={interactive ? onNavigateTo : undefined}
|
|
125
125
|
background={background}
|
|
126
126
|
renderIcon={RenderIcon}
|
|
127
|
-
showElementLinks={showElementLinks}
|
|
128
127
|
showDiagramTitle={showDiagramTitle}
|
|
129
128
|
showNavigationButtons={showNavigationButtons}
|
|
130
129
|
showNotations={showNotations}
|
|
131
130
|
enableFocusMode={enableFocusMode}
|
|
132
|
-
|
|
131
|
+
enableElementDetails={enableElementDetails}
|
|
132
|
+
enableRelationshipBrowser={enableRelationshipBrowser}
|
|
133
|
+
enableRelationshipDetails={enableRelationshipDetails}
|
|
133
134
|
where={where}
|
|
134
135
|
mantineTheme={mantineTheme}
|
|
135
136
|
styleNonce={styleNonce}
|
|
@@ -149,7 +150,9 @@ const LikeC4ViewMemo = /* @__PURE__ */ memo<LikeC4ViewProps>(function LikeC4View
|
|
|
149
150
|
style={browserStyle}
|
|
150
151
|
mantineTheme={mantineTheme}
|
|
151
152
|
styleNonce={styleNonce}
|
|
152
|
-
|
|
153
|
+
enableElementDetails
|
|
154
|
+
enableRelationshipBrowser
|
|
155
|
+
enableRelationshipDetails
|
|
153
156
|
/>
|
|
154
157
|
)}
|
|
155
158
|
</LikeC4ModelProvider>
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useOverviewGraph } from "virtual:likec4/overview-graph";
|
|
3
|
-
import {
|
|
4
|
-
import { u as useRouter } from "./tanstack-router-
|
|
5
|
-
import { B as BaseEdge, H as Handle, P as Position, u as useNodesState, a as useEdgesState, i as index, b as Background, c as BackgroundVariant } from "./likec4-
|
|
3
|
+
import { c as createReactComponent, I as IconFolderFilled, e, u as useUpdateEffect, i, n as nonexhaustive } from "./main-Beyl8kQ7.js";
|
|
4
|
+
import { u as useRouter } from "./tanstack-router-DJI32bwX.js";
|
|
5
|
+
import { B as BaseEdge, H as Handle, P as Position, u as useNodesState, a as useEdgesState, i as index, b as Background, c as BackgroundVariant } from "./likec4-CLNXvKhh.js";
|
|
6
6
|
import { memo, useRef, useMemo } from "react";
|
|
7
|
-
import { P as Paper, c as clsx, G as Group, T as ThemeIcon, a as Text, C as Card, b as CardSection, d as Center, I as Image, B as Box, u as useMantineColorScheme } from "./mantine-
|
|
7
|
+
import { P as Paper, c as clsx, G as Group, T as ThemeIcon, a as Text, C as Card, b as CardSection, d as Center, I as Image, B as Box, u as useMantineColorScheme } from "./mantine-CdYQpHSU.js";
|
|
8
8
|
import { usePreviewUrl } from "virtual:likec4/previews";
|
|
9
|
-
function i(...e2) {
|
|
10
|
-
return u(y, e2);
|
|
11
|
-
}
|
|
12
|
-
function y(e2, r) {
|
|
13
|
-
let o = {};
|
|
14
|
-
for (let n of r) n in e2 && (o[n] = e2[n]);
|
|
15
|
-
return o;
|
|
16
|
-
}
|
|
17
9
|
/**
|
|
18
10
|
* @license @tabler/icons-react v3.17.0 - MIT
|
|
19
11
|
*
|
|
@@ -29,7 +21,7 @@ var IconLoader = createReactComponent("outline", "loader", "IconLoader", [["path
|
|
|
29
21
|
*/
|
|
30
22
|
var IconFileFilled = createReactComponent("filled", "file-filled", "IconFileFilled", [["path", { d: "M12 2l.117 .007a1 1 0 0 1 .876 .876l.007 .117v4l.005 .15a2 2 0 0 0 1.838 1.844l.157 .006h4l.117 .007a1 1 0 0 1 .876 .876l.007 .117v9a3 3 0 0 1 -2.824 2.995l-.176 .005h-10a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-14a3 3 0 0 1 2.824 -2.995l.176 -.005h5z", key: "svg-0" }], ["path", { d: "M19 7h-4l-.001 -4.001z", key: "svg-1" }]]), root = "mxt2a80";
|
|
31
23
|
function edgePath(points) {
|
|
32
|
-
return points.reduce((acc, [x,
|
|
24
|
+
return points.reduce((acc, [x, y], i2) => acc + `${i2 === 0 ? "M" : " L"} ${x},${y}`, "");
|
|
33
25
|
}
|
|
34
26
|
function LinkEdge({
|
|
35
27
|
id,
|
|
@@ -3054,13 +3054,13 @@ function getEventHandlerParams({ nodeId, dragItems, nodeLookup, dragging = !0 })
|
|
|
3054
3054
|
}
|
|
3055
3055
|
if (!nodeId)
|
|
3056
3056
|
return [nodesFromDragItems[0], nodesFromDragItems];
|
|
3057
|
-
const node = nodeLookup.get(nodeId)
|
|
3057
|
+
const node = nodeLookup.get(nodeId)?.internals.userNode;
|
|
3058
3058
|
return [
|
|
3059
|
-
{
|
|
3059
|
+
node ? {
|
|
3060
3060
|
...node,
|
|
3061
3061
|
position: dragItems.get(nodeId)?.position || node.position,
|
|
3062
3062
|
dragging
|
|
3063
|
-
},
|
|
3063
|
+
} : nodesFromDragItems[0],
|
|
3064
3064
|
nodesFromDragItems
|
|
3065
3065
|
];
|
|
3066
3066
|
}
|
|
@@ -5710,6 +5710,9 @@ function useNodesData(nodeIds) {
|
|
|
5710
5710
|
return isArrayOfIds ? data : data[0] ?? null;
|
|
5711
5711
|
}, [nodeIds]), shallowNodeData);
|
|
5712
5712
|
}
|
|
5713
|
+
function useInternalNode(id2) {
|
|
5714
|
+
return useStore(useCallback((s) => s.nodeLookup.get(id2), [id2]), shallow$1);
|
|
5715
|
+
}
|
|
5713
5716
|
function LinePattern({ dimensions, lineWidth, variant, className }) {
|
|
5714
5717
|
return jsx("path", { strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`, className: cc(["react-flow__background-pattern", variant, className]) });
|
|
5715
5718
|
}
|
|
@@ -6092,5 +6095,6 @@ export {
|
|
|
6092
6095
|
Panel as t,
|
|
6093
6096
|
useNodesState as u,
|
|
6094
6097
|
useOnViewportChange as v,
|
|
6095
|
-
withSelectorExports as w
|
|
6098
|
+
withSelectorExports as w,
|
|
6099
|
+
useInternalNode as x
|
|
6096
6100
|
};
|