likec4 1.59.2 → 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.
Files changed (58) hide show
  1. package/__app__/src/chunks/AIChat.mjs +21 -26
  2. package/__app__/src/chunks/LikeC4Styles.mjs +257 -263
  3. package/__app__/src/chunks/ProjectsOverview.mjs +58 -58
  4. package/__app__/src/chunks/hooks.mjs +106 -80
  5. package/__app__/src/chunks/libs/@floating-ui.mjs +646 -332
  6. package/__app__/src/chunks/libs/@mantine.mjs +1911 -1734
  7. package/__app__/src/chunks/libs/@tanstack-ai.mjs +26 -26
  8. package/__app__/src/chunks/libs/@tanstack.mjs +42 -41
  9. package/__app__/src/chunks/libs/@xstate/react.mjs +59 -40
  10. package/__app__/src/chunks/libs/@xyflow/react.mjs +532 -445
  11. package/__app__/src/chunks/libs/bezier-js.mjs +10 -9
  12. package/__app__/src/chunks/libs/d3.mjs +16 -36
  13. package/__app__/src/chunks/libs/fast-equals.mjs +1 -1
  14. package/__app__/src/chunks/libs/framer.mjs +294 -273
  15. package/__app__/src/chunks/libs/zod.mjs +17 -14
  16. package/__app__/src/chunks/rolldown-runtime.mjs +2 -2
  17. package/__app__/src/chunks/styled-system.mjs +9 -15
  18. package/__app__/src/main.mjs +15994 -15936
  19. package/__app__/src/style.css +1 -1
  20. package/config/schema.json +35 -0
  21. package/dist/app/render-view-client.css +1 -0
  22. package/dist/app/render-view-client.js +745 -0
  23. package/dist/chunks/enableServer.mjs +1 -1
  24. package/dist/chunks/filenames.mjs +7 -6
  25. package/dist/chunks/index.d.mts +11 -0
  26. package/dist/chunks/index2.d.mts +41 -5
  27. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  28. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +5 -5
  29. package/dist/chunks/libs/@logtape/logtape.mjs +1 -1
  30. package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
  31. package/dist/chunks/libs/birpc.mjs +1 -1
  32. package/dist/chunks/libs/chevrotain-allstar.mjs +1 -1
  33. package/dist/chunks/libs/chevrotain.mjs +16 -16
  34. package/dist/chunks/libs/json5.mjs +3 -3
  35. package/dist/chunks/libs/langium.mjs +11 -11
  36. package/dist/chunks/libs/merge-error-cause.mjs +2 -2
  37. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  38. package/dist/chunks/libs/pako.mjs +1 -1
  39. package/dist/chunks/libs/picomatch.mjs +1 -1
  40. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  41. package/dist/chunks/libs/remeda.mjs +1 -1
  42. package/dist/chunks/libs/zod.mjs +4 -4
  43. package/dist/chunks/node.mjs +69 -57
  44. package/dist/chunks/rolldown-runtime.mjs +1 -1
  45. package/dist/chunks/sequence-view.mjs +1 -1
  46. package/dist/chunks/vite-plugin.mjs +161 -50
  47. package/dist/cli/index.mjs +272 -162
  48. package/dist/config/index.d.mts +7 -1
  49. package/dist/config/index.mjs +1 -1
  50. package/dist/index.mjs +1 -1
  51. package/dist/vite-plugin/internal/index.d.mts +64 -27
  52. package/dist/vite-plugin/internal/index.mjs +65 -29
  53. package/package.json +39 -39
  54. package/react/index.d.mts +76 -1
  55. package/react/index.mjs +7302 -6778
  56. package/vite-plugin-modules.d.ts +18 -0
  57. package/dist/chunks/dist.mjs +0 -10
  58. 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.3.0/node_modules/nanostores/computed/index.js
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 = M({
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", [A({
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
- }), Ce = M({
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
- }, we = /* @__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 ? !0 : 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) => we(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) => {
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
- } else if (t !== ".") throw Error("invalid path");
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
- }), Te = [
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 = Te[t[1]];
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
- }), Ee = [
432
+ }), Oe = [
432
433
  Y,
433
434
  q,
434
435
  X,
435
436
  J
436
437
  ], transformValue = (e, t) => {
437
- let n = findArr(Ee, (n) => n.isApplicable(e, t));
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 De = SuperJSON.stringify, Oe = SuperJSON.parse;
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(Ce.client(t1), xe.client(t2), Se.client(t3)), e[0] = o, e[1] = a, e[2] = n, e[3] = s;
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 ? Oe(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, De(e));
782
+ sessionStorage.setItem(this.key, ke(e));
788
783
  } catch {}
789
784
  }
790
785
  };