likec4 1.59.1 → 1.59.3
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__/src/chunks/AIChat.mjs +21 -26
- package/__app__/src/chunks/LikeC4Styles.mjs +257 -263
- package/__app__/src/chunks/ProjectsOverview.mjs +58 -58
- package/__app__/src/chunks/hooks.mjs +106 -80
- package/__app__/src/chunks/libs/@floating-ui.mjs +646 -332
- package/__app__/src/chunks/libs/@mantine.mjs +1911 -1734
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +26 -26
- package/__app__/src/chunks/libs/@tanstack.mjs +42 -41
- package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
- package/__app__/src/chunks/libs/@xyflow/react.mjs +532 -445
- package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
- package/__app__/src/chunks/libs/d3.mjs +16 -36
- package/__app__/src/chunks/libs/fast-equals.mjs +12 -11
- package/__app__/src/chunks/libs/framer.mjs +294 -273
- package/__app__/src/chunks/libs/zod.mjs +17 -14
- package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
- package/__app__/src/chunks/styled-system.mjs +9 -15
- package/__app__/src/main.mjs +15994 -15936
- package/__app__/src/style.css +1 -1
- package/config/schema.json +35 -0
- package/dist/app/render-view-client.css +1 -0
- package/dist/app/render-view-client.js +745 -0
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +7 -6
- package/dist/chunks/index.d.mts +11 -0
- package/dist/chunks/index2.d.mts +47 -7
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
- package/dist/chunks/libs/@logtape/logtape.mjs +1 -1
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
- package/dist/chunks/libs/birpc.mjs +1 -1
- package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
- package/dist/chunks/libs/chevrotain.mjs +16 -16
- package/dist/chunks/libs/json5.mjs +3 -3
- package/dist/chunks/libs/langium.mjs +11 -11
- package/dist/chunks/libs/merge-error-cause.mjs +2 -2
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +1 -1
- package/dist/chunks/libs/picomatch.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/zod.mjs +4 -4
- package/dist/chunks/node.mjs +69 -57
- package/dist/chunks/rolldown-runtime.mjs +1 -1
- package/dist/chunks/sequence-view.mjs +1 -1
- package/dist/chunks/vite-plugin.mjs +161 -50
- package/dist/cli/index.mjs +272 -162
- package/dist/config/index.d.mts +7 -1
- package/dist/config/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/vite-plugin/internal/index.d.mts +64 -27
- package/dist/vite-plugin/internal/index.mjs +76 -39
- package/package.json +41 -41
- package/react/index.d.mts +76 -1
- package/react/index.mjs +7310 -6785
- package/vite-plugin-modules.d.ts +18 -0
- package/dist/chunks/dist.mjs +0 -10
- package/dist/chunks/logger.mjs +0 -1
|
@@ -12,7 +12,7 @@ import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
|
12
12
|
import { RichText as ge, nonNullable as z, nonexhaustive as _e } from "@likec4/core";
|
|
13
13
|
import { ElementShapes as ve } from "@likec4/core/styles";
|
|
14
14
|
import { AIAdapter as ye } from "likec4:rpc";
|
|
15
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
15
|
+
//#region ../../node_modules/.pnpm/nanostores@1.5.2/node_modules/nanostores/computed/index.js
|
|
16
16
|
var computedStore = (e, t, n) => {
|
|
17
17
|
Array.isArray(e) || (e = [e]);
|
|
18
18
|
let r, i, set = () => {
|
|
@@ -219,16 +219,16 @@ var U = A({
|
|
|
219
219
|
nodes: D(U).nullish(),
|
|
220
220
|
selectedNode: U.nullish()
|
|
221
221
|
})
|
|
222
|
-
}), Se =
|
|
222
|
+
}), Se = A({
|
|
223
|
+
type: T("focus"),
|
|
224
|
+
elementId: E().meta({ description: "Element ID (FQN)" })
|
|
225
|
+
}).meta({ description: "Focus UI on an element by its FQN" }), Ce = A({ type: T("fitview") }).meta({ description: "Zoom out to fit all elements in the viewport, and clear any selection/focus" }), we = M({
|
|
223
226
|
name: "update_ui",
|
|
224
227
|
description: "Update UI state by executing a command.",
|
|
225
228
|
needsApproval: !1,
|
|
226
|
-
inputSchema: A({ command: ce("type", [
|
|
227
|
-
type: T("focus"),
|
|
228
|
-
elementId: E().meta({ description: "Element ID (FQN)" })
|
|
229
|
-
}).meta({ description: "Focus UI on an element by its FQN" }), A({ type: T("fitview") }).meta({ description: "Zoom out to fit all elements in the viewport, and clear any selection/focus" })]) }),
|
|
229
|
+
inputSchema: A({ command: ce("type", [Se, Ce]) }),
|
|
230
230
|
outputSchema: A({})
|
|
231
|
-
}),
|
|
231
|
+
}), Te = M({
|
|
232
232
|
name: "navigate_to",
|
|
233
233
|
description: "Navigates UI to another view",
|
|
234
234
|
needsApproval: !1,
|
|
@@ -321,7 +321,7 @@ var CustomTransformerRegistry = class {
|
|
|
321
321
|
findByName(e) {
|
|
322
322
|
return this.transfomers[e];
|
|
323
323
|
}
|
|
324
|
-
},
|
|
324
|
+
}, Ee = /* @__PURE__ */ e((e) => Object.prototype.toString.call(e).slice(8, -1), "getType"), isUndefined = (e) => e === void 0, isNull = (e) => e === null, W = /* @__PURE__ */ e((e) => typeof e != "object" || !e || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null || Object.getPrototypeOf(e) === Object.prototype, "isPlainObject"), isEmptyObject = (e) => W(e) && Object.keys(e).length === 0, G = /* @__PURE__ */ e((e) => Array.isArray(e), "isArray"), isString = (e) => typeof e == "string", isNumber = (e) => typeof e == "number" && !isNaN(e), isBoolean = (e) => typeof e == "boolean", isRegExp = (e) => e instanceof RegExp, isMap = (e) => e instanceof Map, isSet = (e) => e instanceof Set, isSymbol = (e) => Ee(e) === "Symbol", isDate = (e) => e instanceof Date && !isNaN(e.valueOf()), isError = (e) => e instanceof Error, isNaNValue = (e) => typeof e == "number" && isNaN(e), isPrimitive = (e) => isBoolean(e) || isNull(e) || isUndefined(e) || isNumber(e) || isString(e) || isSymbol(e), isBigint = (e) => typeof e == "bigint", isInfinite = (e) => e === Infinity || e === -Infinity, isTypedArray = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), isURL = (e) => e instanceof URL, escapeKey = (e) => e.replace(/\\/g, "\\\\").replace(/\./g, "\\."), stringifyPath = (e) => e.map(String).map(escapeKey).join("."), parsePath = (e, t) => {
|
|
325
325
|
let n = [], r = "";
|
|
326
326
|
for (let i = 0; i < e.length; i++) {
|
|
327
327
|
let a = e.charAt(i);
|
|
@@ -330,7 +330,8 @@ var CustomTransformerRegistry = class {
|
|
|
330
330
|
if (t === "\\") {
|
|
331
331
|
r += "\\", i++;
|
|
332
332
|
continue;
|
|
333
|
-
}
|
|
333
|
+
}
|
|
334
|
+
if (t !== ".") throw Error("invalid path");
|
|
334
335
|
}
|
|
335
336
|
if (a === "\\" && e.charAt(i + 1) === ".") {
|
|
336
337
|
r += ".", i++;
|
|
@@ -395,7 +396,7 @@ var q = compositeTransformation((e, t) => isSymbol(e) ? !!t.symbolRegistry.getId
|
|
|
395
396
|
let r = n.symbolRegistry.getValue(t[1]);
|
|
396
397
|
if (!r) throw Error("Trying to deserialize unknown symbol");
|
|
397
398
|
return r;
|
|
398
|
-
}),
|
|
399
|
+
}), De = [
|
|
399
400
|
Int8Array,
|
|
400
401
|
Uint8Array,
|
|
401
402
|
Int16Array,
|
|
@@ -406,7 +407,7 @@ var q = compositeTransformation((e, t) => isSymbol(e) ? !!t.symbolRegistry.getId
|
|
|
406
407
|
Float64Array,
|
|
407
408
|
Uint8ClampedArray
|
|
408
409
|
].reduce((e, t) => (e[t.name] = t, e), {}), J = compositeTransformation(isTypedArray, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
409
|
-
let n =
|
|
410
|
+
let n = De[t[1]];
|
|
410
411
|
if (!n) throw Error("Trying to deserialize unknown typed array");
|
|
411
412
|
return new n(e);
|
|
412
413
|
});
|
|
@@ -428,13 +429,13 @@ var Y = compositeTransformation(isInstanceOfRegisteredClass, (e, t) => ["class",
|
|
|
428
429
|
let r = n.customTransformerRegistry.findByName(t[1]);
|
|
429
430
|
if (!r) throw Error("Trying to deserialize unknown custom value");
|
|
430
431
|
return r.deserialize(e);
|
|
431
|
-
}),
|
|
432
|
+
}), Oe = [
|
|
432
433
|
Y,
|
|
433
434
|
q,
|
|
434
435
|
X,
|
|
435
436
|
J
|
|
436
437
|
], transformValue = (e, t) => {
|
|
437
|
-
let n = findArr(
|
|
438
|
+
let n = findArr(Oe, (n) => n.isApplicable(e, t));
|
|
438
439
|
if (n) return {
|
|
439
440
|
value: n.transform(e, t),
|
|
440
441
|
type: n.annotation(e, t)
|
|
@@ -483,9 +484,7 @@ var getDeep = (e, t) => {
|
|
|
483
484
|
case "key":
|
|
484
485
|
e = o;
|
|
485
486
|
break;
|
|
486
|
-
case "value":
|
|
487
|
-
e = e.get(o);
|
|
488
|
-
break;
|
|
487
|
+
case "value": e = e.get(o);
|
|
489
488
|
}
|
|
490
489
|
} else e = e[r];
|
|
491
490
|
}
|
|
@@ -509,9 +508,7 @@ var getDeep = (e, t) => {
|
|
|
509
508
|
case "key":
|
|
510
509
|
r = o;
|
|
511
510
|
break;
|
|
512
|
-
case "value":
|
|
513
|
-
r = r.get(o);
|
|
514
|
-
break;
|
|
511
|
+
case "value": r = r.get(o);
|
|
515
512
|
}
|
|
516
513
|
}
|
|
517
514
|
}
|
|
@@ -528,9 +525,7 @@ var getDeep = (e, t) => {
|
|
|
528
525
|
r.set(e, r.get(a)), e !== a && r.delete(a);
|
|
529
526
|
break;
|
|
530
527
|
}
|
|
531
|
-
case "value":
|
|
532
|
-
r.set(a, n(r.get(a)));
|
|
533
|
-
break;
|
|
528
|
+
case "value": r.set(a, n(r.get(a)));
|
|
534
529
|
}
|
|
535
530
|
}
|
|
536
531
|
return e;
|
|
@@ -697,7 +692,7 @@ var SuperJSON = class {
|
|
|
697
692
|
}
|
|
698
693
|
};
|
|
699
694
|
SuperJSON.defaultInstance = new SuperJSON(), SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance), SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance), SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance), SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance), SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance), SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance), SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance), SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance), SuperJSON.serialize, SuperJSON.deserialize;
|
|
700
|
-
var
|
|
695
|
+
var ke = SuperJSON.stringify, Ae = SuperJSON.parse;
|
|
701
696
|
SuperJSON.registerClass, SuperJSON.registerCustom, SuperJSON.registerSymbol, SuperJSON.allowErrorProps;
|
|
702
697
|
//#endregion
|
|
703
698
|
//#region src/aichat/useChat.tsx
|
|
@@ -764,7 +759,7 @@ function useChatTools() {
|
|
|
764
759
|
default: _e(t);
|
|
765
760
|
}
|
|
766
761
|
return {};
|
|
767
|
-
}, e[9] = o, e[10] = t3), s = de(
|
|
762
|
+
}, e[9] = o, e[10] = t3), s = de(Te.client(t1), xe.client(t2), we.client(t3)), e[0] = o, e[1] = a, e[2] = n, e[3] = s;
|
|
768
763
|
} else s = e[3];
|
|
769
764
|
return s;
|
|
770
765
|
}
|
|
@@ -773,7 +768,7 @@ var Q = {
|
|
|
773
768
|
read() {
|
|
774
769
|
try {
|
|
775
770
|
let e = sessionStorage.getItem(this.key);
|
|
776
|
-
return e ?
|
|
771
|
+
return e ? Ae(e) : [];
|
|
777
772
|
} catch {
|
|
778
773
|
return [];
|
|
779
774
|
}
|
|
@@ -784,7 +779,7 @@ var Q = {
|
|
|
784
779
|
sessionStorage.removeItem(this.key);
|
|
785
780
|
return;
|
|
786
781
|
}
|
|
787
|
-
sessionStorage.setItem(this.key,
|
|
782
|
+
sessionStorage.setItem(this.key, ke(e));
|
|
788
783
|
} catch {}
|
|
789
784
|
}
|
|
790
785
|
};
|