likec4 1.58.0 → 1.59.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 (63) hide show
  1. package/__app__/codegen/webcomponent.mjs +14 -14
  2. package/__app__/src/chunks/AIChat.mjs +153 -156
  3. package/__app__/src/chunks/LikeC4Styles.mjs +1553 -1255
  4. package/__app__/src/chunks/ProjectsOverview.mjs +127 -130
  5. package/__app__/src/chunks/hooks.mjs +419 -106
  6. package/__app__/src/chunks/libs/@floating-ui.mjs +8 -8
  7. package/__app__/src/chunks/libs/@mantine.mjs +3039 -2135
  8. package/__app__/src/chunks/libs/@tanstack-ai.mjs +4 -4
  9. package/__app__/src/chunks/libs/@tanstack.mjs +93 -118
  10. package/__app__/src/chunks/libs/@xstate/react.mjs +30 -16
  11. package/__app__/src/chunks/libs/@xyflow/react.mjs +50 -26
  12. package/__app__/src/chunks/libs/bezier-js.mjs +11 -8
  13. package/__app__/src/chunks/libs/framer.mjs +1188 -1155
  14. package/__app__/src/chunks/libs/zod.mjs +191 -188
  15. package/__app__/src/chunks/rolldown-runtime.mjs +8 -1
  16. package/__app__/src/chunks/styled-system.mjs +23 -16
  17. package/__app__/src/main.mjs +22275 -9432
  18. package/__app__/src/style.css +1 -1
  19. package/dist/chunks/dist.mjs +10 -0
  20. package/dist/chunks/enableServer.mjs +1 -1
  21. package/dist/chunks/index.d.mts +9 -9
  22. package/dist/chunks/index2.d.mts +386 -229
  23. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  24. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
  25. package/dist/chunks/libs/@logtape/logtape.mjs +3 -3
  26. package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
  27. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  28. package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
  29. package/dist/chunks/libs/chevrotain.mjs +4 -4
  30. package/dist/chunks/libs/json5.mjs +1 -1
  31. package/dist/chunks/libs/langium.d.mts +2940 -2914
  32. package/dist/chunks/libs/langium.mjs +9 -9
  33. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  34. package/dist/chunks/libs/p-queue.mjs +1 -1
  35. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  36. package/dist/chunks/libs/pako.mjs +1 -1
  37. package/dist/chunks/libs/picomatch.mjs +1 -1
  38. package/dist/chunks/libs/remeda.mjs +1 -1
  39. package/dist/chunks/libs/unstorage.d.mts +1 -0
  40. package/dist/chunks/libs/which.mjs +1 -1
  41. package/dist/chunks/libs/zod.d.mts +48 -36
  42. package/dist/chunks/libs/zod.mjs +4 -4
  43. package/dist/chunks/logger.mjs +1 -0
  44. package/dist/chunks/node.mjs +57 -66
  45. package/dist/chunks/rolldown-runtime.mjs +1 -1
  46. package/dist/chunks/sequence-view.mjs +1 -1
  47. package/dist/chunks/vite-plugin.mjs +43 -43
  48. package/dist/cli/index.mjs +159 -157
  49. package/dist/index.d.mts +2 -3
  50. package/dist/index.mjs +1 -1
  51. package/dist/model/index.d.mts +5 -4
  52. package/dist/vite-plugin/index.d.mts +6 -9
  53. package/dist/vite-plugin/internal/index.d.mts +15 -10
  54. package/package.json +37 -37
  55. package/react/index.d.mts +761 -111
  56. package/react/index.mjs +13974 -10232
  57. package/__app__/src/chunks/DiagramActorProvider.mjs +0 -7638
  58. package/__app__/src/chunks/Markdown.mjs +0 -146
  59. package/__app__/src/chunks/NavigationPanel.mjs +0 -61
  60. package/__app__/src/chunks/adhoc-editor.mjs +0 -3386
  61. package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +0 -1894
  62. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +0 -252
  63. package/__app__/src/chunks/libs/remeda.mjs +0 -642
@@ -1,146 +0,0 @@
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 };
@@ -1,61 +0,0 @@
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 };