likec4 1.48.0 → 1.50.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 (118) hide show
  1. package/README.md +11 -1
  2. package/__app__/src/likec4.js +5941 -4496
  3. package/__app__/src/routes/index.js +3 -153
  4. package/__app__/src/routes/projects.js +21 -1087
  5. package/__app__/src/routes/single.js +1228 -16
  6. package/__app__/src/style.css +1 -1
  7. package/__app__/src/vendors.js +4649 -1897
  8. package/__app__/src/webcomponent.js +1 -1
  9. package/config/schema.json +169 -141
  10. package/dist/THIRD-PARTY-LICENSES.md +1769 -0
  11. package/dist/_chunks/LikeC4.mjs +1154 -202
  12. package/dist/_chunks/binary.mjs +72 -0
  13. package/dist/_chunks/index.d.mts +234 -140
  14. package/dist/_chunks/index2.d.mts +2043 -1828
  15. package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +30 -0
  16. package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -785
  17. package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -37
  18. package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
  19. package/dist/_chunks/libs/@hono/node-server.mjs +1 -436
  20. package/dist/_chunks/libs/@logtape/logtape.d.mts +741 -0
  21. package/dist/_chunks/libs/@logtape/logtape.mjs +6 -1354
  22. package/dist/_chunks/libs/@lume/kiwi.mjs +1 -1355
  23. package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +114 -14
  24. package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -25105
  25. package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -1503
  26. package/dist/_chunks/libs/@nanostores/react.d.mts +61 -1
  27. package/dist/_chunks/libs/@nanostores/react.mjs +1 -30
  28. package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +1 -10
  29. package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -100
  30. package/dist/_chunks/libs/ajv.mjs +1 -777
  31. package/dist/_chunks/libs/atomically.mjs +1 -362
  32. package/dist/_chunks/libs/birpc.mjs +1 -201
  33. package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -850
  34. package/dist/_chunks/libs/chevrotain.mjs +55 -6229
  35. package/dist/_chunks/libs/conf.mjs +1 -2258
  36. package/dist/_chunks/libs/defu.mjs +1 -42
  37. package/dist/_chunks/libs/esm-env.mjs +1 -5
  38. package/dist/_chunks/libs/eventemitter3.mjs +1 -243
  39. package/dist/_chunks/libs/fast-equals.mjs +1 -446
  40. package/dist/_chunks/libs/find-up-simple.mjs +1 -24
  41. package/dist/_chunks/libs/get-port.mjs +1 -107
  42. package/dist/_chunks/libs/is-docker.mjs +1 -26
  43. package/dist/_chunks/libs/is-error-instance.mjs +1 -26
  44. package/dist/_chunks/libs/is-inside-container.mjs +1 -20
  45. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  46. package/dist/_chunks/libs/isexe.mjs +1 -127
  47. package/dist/_chunks/libs/json5.mjs +14 -959
  48. package/dist/_chunks/libs/khroma.mjs +1 -605
  49. package/dist/_chunks/libs/ky.mjs +2 -807
  50. package/dist/_chunks/libs/langium.d.mts +2913 -2876
  51. package/dist/_chunks/libs/langium.mjs +33 -20351
  52. package/dist/_chunks/libs/merge-error-cause.mjs +2 -746
  53. package/dist/_chunks/libs/p-limit.mjs +1 -120
  54. package/dist/_chunks/libs/p-queue.mjs +1 -449
  55. package/dist/_chunks/libs/package-manager-detector.mjs +1 -559
  56. package/dist/_chunks/libs/package-up.mjs +1 -10
  57. package/dist/_chunks/libs/pako.mjs +1 -0
  58. package/dist/_chunks/libs/parse-ms.mjs +1 -36
  59. package/dist/_chunks/libs/pathe.mjs +1 -0
  60. package/dist/_chunks/libs/picomatch.mjs +1 -1673
  61. package/dist/_chunks/libs/pretty-ms.mjs +1 -80
  62. package/dist/_chunks/libs/remeda.mjs +2 -690
  63. package/dist/_chunks/libs/safe-stringify.mjs +1 -21
  64. package/dist/_chunks/libs/strip-indent.mjs +1 -15
  65. package/dist/_chunks/libs/tinyrainbow.mjs +1 -88
  66. package/dist/_chunks/libs/ts-graphviz.mjs +4 -725
  67. package/dist/_chunks/libs/ufo.mjs +1 -240
  68. package/dist/_chunks/libs/which.mjs +1 -84
  69. package/dist/_chunks/libs/word-wrap.mjs +12 -43
  70. package/dist/_chunks/rolldown-runtime.mjs +1 -48
  71. package/dist/_chunks/sequence.mjs +1 -0
  72. package/dist/_chunks/src.mjs +15 -0
  73. package/dist/_chunks/src2.mjs +499 -0
  74. package/dist/cli/index.mjs +77 -1952
  75. package/dist/config/index.d.mts +2 -2
  76. package/dist/config/index.mjs +1 -6
  77. package/dist/index.d.mts +150 -7
  78. package/dist/index.mjs +1 -21
  79. package/dist/model/builder.mjs +1 -3
  80. package/dist/model/index.d.mts +57 -3
  81. package/dist/model/index.mjs +1 -5
  82. package/dist/vite-plugin/index.d.mts +7 -3
  83. package/dist/vite-plugin/index.mjs +1 -22
  84. package/dist/vite-plugin/internal.d.mts +6 -7
  85. package/dist/vite-plugin/internal.mjs +1 -68
  86. package/package.json +64 -45
  87. package/react/{index.d.ts → index.d.mts} +114 -72
  88. package/react/{index.js → index.mjs} +21320 -22041
  89. package/react/package.json +2 -5
  90. package/vite-plugin-modules.d.ts +10 -5
  91. package/dist/_chunks/LikeC4.d.mts +0 -121
  92. package/dist/_chunks/config-app.prod.d.mts +0 -18
  93. package/dist/_chunks/config-app.prod.mjs +0 -188
  94. package/dist/_chunks/config-webcomponent.prod.mjs +0 -71
  95. package/dist/_chunks/define-config.mjs +0 -409
  96. package/dist/_chunks/index3.d.mts +0 -60
  97. package/dist/_chunks/libs/@chevrotain/gast.mjs +0 -3969
  98. package/dist/_chunks/libs/hono.mjs +0 -1829
  99. package/dist/_chunks/libs/nanoid.mjs +0 -29
  100. package/dist/_chunks/libs/nanostores.d.mts +0 -63
  101. package/dist/_chunks/libs/nanostores.mjs +0 -198
  102. package/dist/_chunks/model.mjs +0 -12
  103. package/dist/_chunks/module.d.mts +0 -71
  104. package/dist/_chunks/module.mjs +0 -18657
  105. package/dist/_chunks/plugin.mjs +0 -996
  106. package/dist/_chunks/sequence-view.mjs +0 -575
  107. package/dist/_chunks/vite-build.mjs +0 -69
  108. package/dist/_chunks/vite-dev.mjs +0 -79
  109. package/dist/_chunks/vite-preview.mjs +0 -27
  110. package/dist/language/module.d.mts +0 -5
  111. package/dist/language/module.mjs +0 -20
  112. package/dist/vite/vite-build.d.mts +0 -26
  113. package/dist/vite/vite-build.mjs +0 -27
  114. package/dist/vite/vite-dev.d.mts +0 -34
  115. package/dist/vite/vite-dev.mjs +0 -29
  116. package/dist/vite/vite-preview.d.mts +0 -20
  117. package/dist/vite/vite-preview.mjs +0 -26
  118. /package/dist/_chunks/{index4.d.mts → libs/@chevrotain/types.d.mts} +0 -0
@@ -1,80 +1 @@
1
- import { t as parseMilliseconds } from "./parse-ms.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/pretty-ms@9.3.0/node_modules/pretty-ms/index.js
4
- const isZero = (value) => value === 0 || value === 0n;
5
- const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
6
- const SECOND_ROUNDING_EPSILON = 1e-7;
7
- const ONE_DAY_IN_MILLISECONDS = 24n * 60n * 60n * 1000n;
8
- function prettyMilliseconds(milliseconds, options) {
9
- const isBigInt = typeof milliseconds === "bigint";
10
- if (!isBigInt && !Number.isFinite(milliseconds)) throw new TypeError("Expected a finite number or bigint");
11
- options = { ...options };
12
- const sign = milliseconds < 0 ? "-" : "";
13
- milliseconds = milliseconds < 0 ? -milliseconds : milliseconds;
14
- if (options.colonNotation) {
15
- options.compact = false;
16
- options.formatSubMilliseconds = false;
17
- options.separateMilliseconds = false;
18
- options.verbose = false;
19
- }
20
- if (options.compact) {
21
- options.unitCount = 1;
22
- options.secondsDecimalDigits = 0;
23
- options.millisecondsDecimalDigits = 0;
24
- }
25
- let result = [];
26
- const floorDecimals = (value, decimalDigits) => {
27
- const flooredInterimValue = Math.floor(value * 10 ** decimalDigits + SECOND_ROUNDING_EPSILON);
28
- return (Math.round(flooredInterimValue) / 10 ** decimalDigits).toFixed(decimalDigits);
29
- };
30
- const add = (value, long, short, valueString) => {
31
- if ((result.length === 0 || !options.colonNotation) && isZero(value) && !(options.colonNotation && short === "m")) return;
32
- valueString ??= String(value);
33
- if (options.colonNotation) {
34
- const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length;
35
- const minLength = result.length > 0 ? 2 : 1;
36
- valueString = "0".repeat(Math.max(0, minLength - wholeDigits)) + valueString;
37
- } else valueString += options.verbose ? " " + pluralize(long, value) : short;
38
- result.push(valueString);
39
- };
40
- const parsed = parseMilliseconds(milliseconds);
41
- const days = BigInt(parsed.days);
42
- if (options.hideYearAndDays) add(BigInt(days) * 24n + BigInt(parsed.hours), "hour", "h");
43
- else {
44
- if (options.hideYear) add(days, "day", "d");
45
- else {
46
- add(days / 365n, "year", "y");
47
- add(days % 365n, "day", "d");
48
- }
49
- add(Number(parsed.hours), "hour", "h");
50
- }
51
- add(Number(parsed.minutes), "minute", "m");
52
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
53
- const seconds = Number(parsed.seconds);
54
- const milliseconds = Number(parsed.milliseconds);
55
- const microseconds = Number(parsed.microseconds);
56
- const nanoseconds = Number(parsed.nanoseconds);
57
- add(seconds, "second", "s");
58
- if (options.formatSubMilliseconds) {
59
- add(milliseconds, "millisecond", "ms");
60
- add(microseconds, "microsecond", "µs");
61
- add(nanoseconds, "nanosecond", "ns");
62
- } else {
63
- const millisecondsAndBelow = milliseconds + microseconds / 1e3 + nanoseconds / 1e6;
64
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
65
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
66
- add(Number.parseFloat(millisecondsString), "millisecond", "ms", millisecondsString);
67
- }
68
- } else {
69
- const secondsFixed = floorDecimals((isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60, typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1);
70
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
71
- add(Number.parseFloat(secondsString), "second", "s", secondsString);
72
- }
73
- if (result.length === 0) return sign + "0" + (options.verbose ? " milliseconds" : "ms");
74
- const separator = options.colonNotation ? ":" : " ";
75
- if (typeof options.unitCount === "number") result = result.slice(0, Math.max(options.unitCount, 1));
76
- return sign + result.join(separator);
77
- }
78
-
79
- //#endregion
80
- export { prettyMilliseconds as t };
1
+ import{t as e}from"./parse-ms.mjs";const t=e=>e===0||e===0n,n=(e,t)=>t===1||t===1n?e:`${e}s`,r=24n*60n*60n*1000n;function i(i,a){let o=typeof i==`bigint`;if(!o&&!Number.isFinite(i))throw TypeError(`Expected a finite number or bigint`);a={...a};let s=i<0?`-`:``;i=i<0?-i:i,a.colonNotation&&(a.compact=!1,a.formatSubMilliseconds=!1,a.separateMilliseconds=!1,a.verbose=!1),a.compact&&(a.unitCount=1,a.secondsDecimalDigits=0,a.millisecondsDecimalDigits=0);let c=[],l=(e,t)=>{let n=Math.floor(e*10**t+1e-7);return(Math.round(n)/10**t).toFixed(t)},u=(e,r,i,o)=>{if(!((c.length===0||!a.colonNotation)&&t(e)&&!(a.colonNotation&&i===`m`))){if(o??=String(e),a.colonNotation){let e=o.includes(`.`)?o.split(`.`)[0].length:o.length,t=c.length>0?2:1;o=`0`.repeat(Math.max(0,t-e))+o}else o+=a.verbose?` `+n(r,e):i;c.push(o)}},d=e(i),f=BigInt(d.days);if(a.hideYearAndDays?u(BigInt(f)*24n+BigInt(d.hours),`hour`,`h`):(a.hideYear?u(f,`day`,`d`):(u(f/365n,`year`,`y`),u(f%365n,`day`,`d`)),u(Number(d.hours),`hour`,`h`)),u(Number(d.minutes),`minute`,`m`),!a.hideSeconds)if(a.separateMilliseconds||a.formatSubMilliseconds||!a.colonNotation&&i<1e3&&!a.subSecondsAsDecimals){let e=Number(d.seconds),t=Number(d.milliseconds),n=Number(d.microseconds),r=Number(d.nanoseconds);if(u(e,`second`,`s`),a.formatSubMilliseconds)u(t,`millisecond`,`ms`),u(n,`microsecond`,`µs`),u(r,`nanosecond`,`ns`);else{let e=t+n/1e3+r/1e6,i=typeof a.millisecondsDecimalDigits==`number`?a.millisecondsDecimalDigits:0,o=i?e.toFixed(i):e>=1?Math.round(e):Math.ceil(e);u(Number.parseFloat(o),`millisecond`,`ms`,o)}}else{let e=l((o?Number(i%r):i)/1e3%60,typeof a.secondsDecimalDigits==`number`?a.secondsDecimalDigits:1),t=a.keepDecimalsOnWholeSeconds?e:e.replace(/\.0+$/,``);u(Number.parseFloat(t),`second`,`s`,t)}if(c.length===0)return s+`0`+(a.verbose?` milliseconds`:`ms`);let p=a.colonNotation?`:`:` `;return typeof a.unitCount==`number`&&(c=c.slice(0,Math.max(a.unitCount,1))),s+c.join(p)}export{i as t};