likec4 1.57.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/__app__/codegen/react.mjs +7 -8
- package/__app__/codegen/webcomponent.mjs +70 -881
- package/__app__/src/aichat/index.mjs +8 -1
- package/__app__/src/chunks/AIChat.mjs +959 -0
- package/__app__/src/chunks/DiagramActorProvider.mjs +7638 -0
- package/__app__/src/chunks/LikeC4Styles.mjs +1866 -0
- package/__app__/src/chunks/Markdown.mjs +146 -0
- package/__app__/src/chunks/NavigationPanel.mjs +61 -0
- package/__app__/src/chunks/ProjectsOverview.mjs +540 -0
- package/__app__/src/chunks/adhoc-editor.mjs +3386 -0
- package/__app__/src/chunks/es.mjs +439 -0
- package/__app__/src/chunks/hooks.mjs +145 -0
- package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +1894 -0
- package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
- package/__app__/src/chunks/libs/@mantine.mjs +12070 -0
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +252 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
- package/__app__/src/chunks/libs/@tanstack.mjs +2718 -0
- package/__app__/src/chunks/libs/@xstate/react.mjs +1982 -0
- package/__app__/src/chunks/libs/@xyflow/react.mjs +5256 -0
- package/__app__/src/chunks/libs/bezier-js.mjs +1003 -0
- package/__app__/src/chunks/libs/d3.mjs +2842 -0
- package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
- package/__app__/src/chunks/libs/framer.mjs +5872 -0
- package/__app__/src/chunks/libs/remeda.mjs +642 -0
- package/__app__/src/chunks/libs/zod.mjs +3170 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +23 -0
- package/__app__/src/chunks/styled-system.mjs +1040 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +14816 -14
- package/__app__/src/style.css +1 -1
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +2 -2
- package/dist/chunks/index2.d.mts +1877 -734
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +25 -25
- package/dist/chunks/libs/langium.mjs +1 -1
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/libs/zod.mjs +65 -0
- package/dist/chunks/node.mjs +73 -62
- package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
- package/dist/cli/index.mjs +184 -144
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/index.d.mts +52 -57
- package/dist/vite-plugin/internal/index.mjs +946 -1
- package/package.json +46 -47
- package/react/index.d.mts +92 -23
- package/react/index.mjs +44551 -42605
- package/__app__/chunks/AIChat2.mjs +0 -2
- package/__app__/chunks/DiagramActorProvider.mjs +0 -10
- package/__app__/chunks/EmbedPage.mjs +0 -1
- package/__app__/chunks/ExportPage.mjs +0 -2
- package/__app__/chunks/LikeC4Diagram.mjs +0 -19
- package/__app__/chunks/LikeC4Styles.mjs +0 -48
- package/__app__/chunks/Markdown.mjs +0 -1
- package/__app__/chunks/NavigationPanel.mjs +0 -1
- package/__app__/chunks/ViewReact.mjs +0 -1
- package/__app__/chunks/adhoc-editor.mjs +0 -1
- package/__app__/chunks/aichat.mjs +0 -1
- package/__app__/chunks/box.mjs +0 -1
- package/__app__/chunks/create-style-context.mjs +0 -1
- package/__app__/chunks/css.mjs +0 -1
- package/__app__/chunks/factory.mjs +0 -1
- package/__app__/chunks/hooks.mjs +0 -1
- package/__app__/chunks/hstack.mjs +0 -1
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
- package/__app__/chunks/libs/@mantine/core.mjs +0 -41
- package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
- package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
- package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
- package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
- package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
- package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
- package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
- package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
- package/__app__/chunks/libs/@xstate/react.mjs +0 -1
- package/__app__/chunks/libs/@xstate/store.mjs +0 -1
- package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
- package/__app__/chunks/libs/bezier-js.mjs +0 -1
- package/__app__/chunks/libs/copy-anything.mjs +0 -1
- package/__app__/chunks/libs/d3-path.mjs +0 -1
- package/__app__/chunks/libs/d3-shape.mjs +0 -1
- package/__app__/chunks/libs/fast-equals.mjs +0 -1
- package/__app__/chunks/libs/framer-motion.mjs +0 -9
- package/__app__/chunks/libs/html-to-image.mjs +0 -2
- package/__app__/chunks/libs/motion-dom.mjs +0 -1
- package/__app__/chunks/libs/nanostores.mjs +0 -1
- package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
- package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
- package/__app__/chunks/libs/remeda.mjs +0 -1
- package/__app__/chunks/libs/superjson.mjs +0 -1
- package/__app__/chunks/libs/zod.mjs +0 -64
- package/__app__/chunks/rolldown-runtime.mjs +0 -1
- package/__app__/chunks/styles.css.mjs +0 -1
- package/__app__/chunks/txt.mjs +0 -1
- package/__app__/chunks/useLikeC4Project.mjs +0 -1
- package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
- package/__app__/src/pages/EmbedPage.mjs +0 -1
- package/__app__/src/pages/ExportPage.mjs +0 -1
- package/__app__/src/pages/ProjectsOverview.mjs +0 -1
- package/__app__/src/pages/ViewAsD2.mjs +0 -1
- package/__app__/src/pages/ViewAsDot.mjs +0 -1
- package/__app__/src/pages/ViewAsMmd.mjs +0 -1
- package/__app__/src/pages/ViewAsPuml.mjs +0 -1
- package/__app__/src/pages/ViewEditor.mjs +0 -1
- package/__app__/src/pages/ViewReact.mjs +0 -1
- package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/chunks/libs/@hono/mcp.mjs +0 -70
- package/dist/chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/chunks/libs/ajv.mjs +0 -1
- package/dist/chunks/libs/ansi-align.mjs +0 -2
- package/dist/chunks/libs/ansi-regex.mjs +0 -1
- package/dist/chunks/libs/ansi-styles.mjs +0 -1
- package/dist/chunks/libs/atomically.mjs +0 -1
- package/dist/chunks/libs/boxen.mjs +0 -22
- package/dist/chunks/libs/conf.mjs +0 -1
- package/dist/chunks/libs/defu.mjs +0 -1
- package/dist/chunks/libs/destr.mjs +0 -1
- package/dist/chunks/libs/find-up-simple.mjs +0 -1
- package/dist/chunks/libs/get-port.mjs +0 -1
- package/dist/chunks/libs/hono.mjs +0 -1
- package/dist/chunks/libs/is-docker.mjs +0 -1
- package/dist/chunks/libs/is-error-instance.mjs +0 -1
- package/dist/chunks/libs/is-inside-container.mjs +0 -1
- package/dist/chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/chunks/libs/isexe.mjs +0 -1
- package/dist/chunks/libs/ky.mjs +0 -3
- package/dist/chunks/libs/p-debounce.mjs +0 -1
- package/dist/chunks/libs/p-limit.mjs +0 -1
- package/dist/chunks/libs/p-timeout.mjs +0 -1
- package/dist/chunks/libs/package-up.mjs +0 -1
- package/dist/chunks/libs/parse-ms.mjs +0 -1
- package/dist/chunks/libs/safe-stringify.mjs +0 -1
- package/dist/chunks/libs/strip-indent.mjs +0 -1
- package/dist/chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/chunks/libs/ts-graphviz.mjs +0 -1
- package/dist/chunks/libs/unctx.mjs +0 -1
- package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
- package/dist/chunks/libs/word-wrap.mjs +0 -12
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { i as e } from "./rolldown-runtime.mjs";
|
|
2
|
+
import { ot as t } from "./libs/@mantine.mjs";
|
|
3
|
+
import { E as n, M as r, o as i } from "./styled-system.mjs";
|
|
4
|
+
import { n as a } from "./libs/fast-equals.mjs";
|
|
5
|
+
import { forwardRef as o, useCallback as s, useEffect as c, useMemo as l, useRef as u, useSyncExternalStore as d } from "react";
|
|
6
|
+
import { c as f } from "react/compiler-runtime";
|
|
7
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
8
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useSyncedRef/index.js
|
|
9
|
+
function useSyncedRef(e) {
|
|
10
|
+
let t = u(e);
|
|
11
|
+
return t.current = e, l(() => Object.freeze({ get current() {
|
|
12
|
+
return t.current;
|
|
13
|
+
} }), []);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/util/const.js
|
|
17
|
+
var m = /* @__PURE__ */ e(() => {}, "noop"), h = typeof globalThis < "u" && typeof navigator < "u" && typeof document < "u", basicDepsComparator = (e, t) => {
|
|
18
|
+
if (e === t) return !0;
|
|
19
|
+
if (e.length !== t.length) return !1;
|
|
20
|
+
for (let [n, r] of e.entries()) if (r !== t[n]) return !1;
|
|
21
|
+
return !0;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useCustomCompareEffect/index.js
|
|
25
|
+
function useCustomCompareEffect(e, t, n = basicDepsComparator, r = c, ...i) {
|
|
26
|
+
let a = u(void 0);
|
|
27
|
+
(a.current === void 0 || h && !n(a.current, t)) && (a.current = t), r(e, a.current, ...i);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region ../../node_modules/.pnpm/@react-hookz+web@25.2.0_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@react-hookz/web/dist/useFirstMountState/index.js
|
|
31
|
+
function useFirstMountState() {
|
|
32
|
+
let e = u(!0);
|
|
33
|
+
return c(() => {
|
|
34
|
+
e.current = !1;
|
|
35
|
+
}, []), e.current;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../diagram/src/hooks/useUpdateEffect.ts
|
|
39
|
+
var noop = () => {}, depsShallowEqual = (e, t) => {
|
|
40
|
+
if (e === t) return !0;
|
|
41
|
+
if (e.length !== t.length) return !1;
|
|
42
|
+
for (let [n, r] of e.entries()) if (!(r === t[n] || a(r, t[n]))) return !1;
|
|
43
|
+
return !0;
|
|
44
|
+
};
|
|
45
|
+
function useUpdateEffect(e, t, n, r) {
|
|
46
|
+
useCustomCompareEffect(useFirstMountState() ? noop : e, t, n ?? depsShallowEqual, r);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/atom/index.js
|
|
50
|
+
var g = [], _ = 0, v = 4, y = globalThis.nanostoresGlobal ||= { epoch: 0 }, atom = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
51
|
+
let t = [], n = {
|
|
52
|
+
get() {
|
|
53
|
+
return n.lc || n.listen(() => {})(), n.value;
|
|
54
|
+
},
|
|
55
|
+
init: e,
|
|
56
|
+
lc: 0,
|
|
57
|
+
listen(e) {
|
|
58
|
+
return n.lc = t.push(e), () => {
|
|
59
|
+
for (let t = _ + v; t < g.length;) g[t] === e ? g.splice(t, v) : t += v;
|
|
60
|
+
let r = t.indexOf(e);
|
|
61
|
+
~r && (t.splice(r, 1), --n.lc || n.off());
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
notify(e, r) {
|
|
65
|
+
y.epoch++;
|
|
66
|
+
let i = !g.length;
|
|
67
|
+
for (let i of t) g.push(i, n.value, e, r);
|
|
68
|
+
if (i) {
|
|
69
|
+
for (_ = 0; _ < g.length; _ += v) g[_](g[_ + 1], g[_ + 2], g[_ + 3]);
|
|
70
|
+
g.length = 0;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
off() {},
|
|
74
|
+
set(e) {
|
|
75
|
+
let t = n.value;
|
|
76
|
+
t !== e && (n.value = e, n.notify(t));
|
|
77
|
+
},
|
|
78
|
+
subscribe(e) {
|
|
79
|
+
let t = n.listen(e);
|
|
80
|
+
return e(n.value), t;
|
|
81
|
+
},
|
|
82
|
+
value: e
|
|
83
|
+
};
|
|
84
|
+
return n;
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region ../../node_modules/.pnpm/nanostores@1.3.0/node_modules/nanostores/listen-keys/index.js
|
|
88
|
+
function listenKeys(e, t, n) {
|
|
89
|
+
let r = new Set(t).add(void 0);
|
|
90
|
+
return e.listen((e, t, i) => {
|
|
91
|
+
r.has(i) && n(e, t, i);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region ../../node_modules/.pnpm/@nanostores+react@1.1.0_nanostores@1.3.0_react@19.2.7/node_modules/@nanostores/react/index.js
|
|
96
|
+
var emit = (e, t) => (n) => {
|
|
97
|
+
e.current !== n && (e.current = n, t());
|
|
98
|
+
};
|
|
99
|
+
function useStore(e, { keys: t, deps: n = [e, t], ssr: r } = {}) {
|
|
100
|
+
let i = u();
|
|
101
|
+
i.current = e.get();
|
|
102
|
+
let a = s((n) => (emit(i, n)(e.value), t?.length > 0 ? listenKeys(e, t, emit(i, n)) : e.listen(emit(i, n))), n), get = () => i.current, o = get;
|
|
103
|
+
return r && "init" in e && (o = r === "initial" ? () => e.init : r), d(a, get, o);
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region ../diagram/src/base-primitives/Markdown.tsx
|
|
107
|
+
var b = o((e, a) => {
|
|
108
|
+
let o = f(34), s, c, l, u, d, m, h, g, _;
|
|
109
|
+
o[0] === e ? (s = o[1], c = o[2], l = o[3], u = o[4], d = o[5], m = o[6], h = o[7], g = o[8], _ = o[9]) : ({value: _, textScale: d, uselikec4palette: m, hideIfEmpty: h, emptyText: g, className: s, style: u, fontSize: c, ...l} = e, o[0] = e, o[1] = s, o[2] = c, o[3] = l, o[4] = u, o[5] = d, o[6] = m, o[7] = h, o[8] = g, o[9] = _);
|
|
110
|
+
let v = d === void 0 ? 1 : d, y = m === void 0 ? !1 : m, b = h === void 0 ? !1 : h, x = g === void 0 ? "no content" : g;
|
|
111
|
+
if (_.isEmpty && b) return null;
|
|
112
|
+
let S;
|
|
113
|
+
o[10] !== x || o[11] !== _.html || o[12] !== _.isMarkdown || o[13] !== _.nonEmpty || o[14] !== _.text ? (S = _.nonEmpty ? _.isMarkdown ? { dangerouslySetInnerHTML: { __html: _.html } } : { children: /* @__PURE__ */ p("p", { children: _.text }) } : { children: /* @__PURE__ */ p(t, {
|
|
114
|
+
component: "span",
|
|
115
|
+
fz: "xs",
|
|
116
|
+
c: "dimmed",
|
|
117
|
+
style: { userSelect: "none" },
|
|
118
|
+
children: x
|
|
119
|
+
}) }, o[10] = x, o[11] = _.html, o[12] = _.isMarkdown, o[13] = _.nonEmpty, o[14] = _.text, o[15] = S) : S = o[15];
|
|
120
|
+
let C = S, w;
|
|
121
|
+
o[16] !== s || o[17] !== y || o[18] !== _.isMarkdown ? (w = r(i({
|
|
122
|
+
uselikec4palette: y,
|
|
123
|
+
value: _.isMarkdown ? "markdown" : "plaintext"
|
|
124
|
+
}), s), o[16] = s, o[17] = y, o[18] = _.isMarkdown, o[19] = w) : w = o[19];
|
|
125
|
+
let T;
|
|
126
|
+
o[20] === c ? T = o[21] : (T = c && { "--text-fz": `var(--font-sizes-${c}, var(--font-sizes-md))` }, o[20] = c, o[21] = T);
|
|
127
|
+
let E;
|
|
128
|
+
o[22] === v ? E = o[23] : (E = v !== 1 && { "--mantine-scale": v }, o[22] = v, o[23] = E);
|
|
129
|
+
let D;
|
|
130
|
+
o[24] !== u || o[25] !== T || o[26] !== E ? (D = {
|
|
131
|
+
...u,
|
|
132
|
+
...T,
|
|
133
|
+
...E
|
|
134
|
+
}, o[24] = u, o[25] = T, o[26] = E, o[27] = D) : D = o[27];
|
|
135
|
+
let O;
|
|
136
|
+
return o[28] !== C || o[29] !== l || o[30] !== a || o[31] !== w || o[32] !== D ? (O = /* @__PURE__ */ p(n, {
|
|
137
|
+
...l,
|
|
138
|
+
ref: a,
|
|
139
|
+
className: w,
|
|
140
|
+
style: D,
|
|
141
|
+
...C
|
|
142
|
+
}), o[28] = C, o[29] = l, o[30] = a, o[31] = w, o[32] = D, o[33] = O) : O = o[33], O;
|
|
143
|
+
});
|
|
144
|
+
b.displayName = "Markdown";
|
|
145
|
+
//#endregion
|
|
146
|
+
export { depsShallowEqual as a, h as c, y as i, m as l, useStore as n, useUpdateEffect as o, atom as r, useFirstMountState as s, b as t, useSyncedRef as u };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "./rolldown-runtime.mjs";
|
|
2
|
+
import { D as e, M as t, k as n, t as r } from "./styled-system.mjs";
|
|
3
|
+
import { C as i, n as a, r as o } from "./LikeC4Styles.mjs";
|
|
4
|
+
import { d as s, r as c } from "./libs/framer.mjs";
|
|
5
|
+
import { createContext as l, forwardRef as u, useContext as d } from "react";
|
|
6
|
+
import { c as f } from "react/compiler-runtime";
|
|
7
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
|
+
//#region ../diagram/src/context/LikeC4ProjectsContext.ts
|
|
9
|
+
var h = l(null), g = h.Provider;
|
|
10
|
+
function useOptionalProjectsContext() {
|
|
11
|
+
return d(h);
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region ../diagram/src/hooks/useLikeC4Project.ts
|
|
15
|
+
var _ = [];
|
|
16
|
+
function onProjectChange(e) {
|
|
17
|
+
console.warn(`Triggered callback to change project to ${e}, but no <LikeC4ProjectsProvider/> found`);
|
|
18
|
+
}
|
|
19
|
+
var v = {
|
|
20
|
+
projects: _,
|
|
21
|
+
onProjectChange
|
|
22
|
+
};
|
|
23
|
+
function useLikeC4ProjectsContext() {
|
|
24
|
+
return useOptionalProjectsContext() ?? v;
|
|
25
|
+
}
|
|
26
|
+
function useLikeC4Projects() {
|
|
27
|
+
return useLikeC4ProjectsContext().projects;
|
|
28
|
+
}
|
|
29
|
+
function useChangeLikeC4Project() {
|
|
30
|
+
return useLikeC4ProjectsContext().onProjectChange;
|
|
31
|
+
}
|
|
32
|
+
function useLikeC4ProjectId() {
|
|
33
|
+
let e = i();
|
|
34
|
+
if (!e) throw Error("No LikeC4ModelProvider found");
|
|
35
|
+
return e.projectId;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../diagram/src/components/NavigationPanel.tsx
|
|
39
|
+
var { withProvider: y, withContext: b } = e(r), shouldForwardProp = (e, t) => !t.includes(e) && (s(e) || !n(e)), x = u((e, n) => {
|
|
40
|
+
let r = f(11), i, s;
|
|
41
|
+
r[0] === e ? (i = r[1], s = r[2]) : ({className: i, ...s} = e, r[0] = e, r[1] = i, r[2] = s);
|
|
42
|
+
let c;
|
|
43
|
+
r[3] === i ? c = r[4] : (c = t("mantine-active", i), r[3] = i, r[4] = c);
|
|
44
|
+
let l, u;
|
|
45
|
+
r[5] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ p(o, { "data-logo-icon": !0 }), u = /* @__PURE__ */ p(a, { "data-logo-full": !0 }), r[5] = l, r[6] = u) : (l = r[5], u = r[6]);
|
|
46
|
+
let d;
|
|
47
|
+
return r[7] !== s || r[8] !== n || r[9] !== c ? (d = /* @__PURE__ */ m("button", {
|
|
48
|
+
...s,
|
|
49
|
+
ref: n,
|
|
50
|
+
className: c,
|
|
51
|
+
children: [l, u]
|
|
52
|
+
}), r[7] = s, r[8] = n, r[9] = c, r[10] = d) : d = r[10], d;
|
|
53
|
+
}), S = {
|
|
54
|
+
Root: y(c, "root", { shouldForwardProp }),
|
|
55
|
+
Body: b(c, "body", { shouldForwardProp }),
|
|
56
|
+
Logo: b(x, "logo"),
|
|
57
|
+
Label: b(c, "label", { shouldForwardProp }),
|
|
58
|
+
Dropdown: b(c, "dropdown", { shouldForwardProp })
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { useLikeC4ProjectsContext as a, useLikeC4Projects as i, useChangeLikeC4Project as n, g as o, useLikeC4ProjectId as r, useOptionalProjectsContext as s, S as t };
|