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.
- package/README.md +11 -1
- package/__app__/src/likec4.js +5941 -4496
- package/__app__/src/routes/index.js +3 -153
- package/__app__/src/routes/projects.js +21 -1087
- package/__app__/src/routes/single.js +1228 -16
- package/__app__/src/style.css +1 -1
- package/__app__/src/vendors.js +4649 -1897
- package/__app__/src/webcomponent.js +1 -1
- package/config/schema.json +169 -141
- package/dist/THIRD-PARTY-LICENSES.md +1769 -0
- package/dist/_chunks/LikeC4.mjs +1154 -202
- package/dist/_chunks/binary.mjs +72 -0
- package/dist/_chunks/index.d.mts +234 -140
- package/dist/_chunks/index2.d.mts +2043 -1828
- package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +30 -0
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -785
- package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -37
- package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
- package/dist/_chunks/libs/@hono/node-server.mjs +1 -436
- package/dist/_chunks/libs/@logtape/logtape.d.mts +741 -0
- package/dist/_chunks/libs/@logtape/logtape.mjs +6 -1354
- package/dist/_chunks/libs/@lume/kiwi.mjs +1 -1355
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +114 -14
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -25105
- package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -1503
- package/dist/_chunks/libs/@nanostores/react.d.mts +61 -1
- package/dist/_chunks/libs/@nanostores/react.mjs +1 -30
- package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +1 -10
- package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -100
- package/dist/_chunks/libs/ajv.mjs +1 -777
- package/dist/_chunks/libs/atomically.mjs +1 -362
- package/dist/_chunks/libs/birpc.mjs +1 -201
- package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -850
- package/dist/_chunks/libs/chevrotain.mjs +55 -6229
- package/dist/_chunks/libs/conf.mjs +1 -2258
- package/dist/_chunks/libs/defu.mjs +1 -42
- package/dist/_chunks/libs/esm-env.mjs +1 -5
- package/dist/_chunks/libs/eventemitter3.mjs +1 -243
- package/dist/_chunks/libs/fast-equals.mjs +1 -446
- package/dist/_chunks/libs/find-up-simple.mjs +1 -24
- package/dist/_chunks/libs/get-port.mjs +1 -107
- package/dist/_chunks/libs/is-docker.mjs +1 -26
- package/dist/_chunks/libs/is-error-instance.mjs +1 -26
- package/dist/_chunks/libs/is-inside-container.mjs +1 -20
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
- package/dist/_chunks/libs/isexe.mjs +1 -127
- package/dist/_chunks/libs/json5.mjs +14 -959
- package/dist/_chunks/libs/khroma.mjs +1 -605
- package/dist/_chunks/libs/ky.mjs +2 -807
- package/dist/_chunks/libs/langium.d.mts +2913 -2876
- package/dist/_chunks/libs/langium.mjs +33 -20351
- package/dist/_chunks/libs/merge-error-cause.mjs +2 -746
- package/dist/_chunks/libs/p-limit.mjs +1 -120
- package/dist/_chunks/libs/p-queue.mjs +1 -449
- package/dist/_chunks/libs/package-manager-detector.mjs +1 -559
- package/dist/_chunks/libs/package-up.mjs +1 -10
- package/dist/_chunks/libs/pako.mjs +1 -0
- package/dist/_chunks/libs/parse-ms.mjs +1 -36
- package/dist/_chunks/libs/pathe.mjs +1 -0
- package/dist/_chunks/libs/picomatch.mjs +1 -1673
- package/dist/_chunks/libs/pretty-ms.mjs +1 -80
- package/dist/_chunks/libs/remeda.mjs +2 -690
- package/dist/_chunks/libs/safe-stringify.mjs +1 -21
- package/dist/_chunks/libs/strip-indent.mjs +1 -15
- package/dist/_chunks/libs/tinyrainbow.mjs +1 -88
- package/dist/_chunks/libs/ts-graphviz.mjs +4 -725
- package/dist/_chunks/libs/ufo.mjs +1 -240
- package/dist/_chunks/libs/which.mjs +1 -84
- package/dist/_chunks/libs/word-wrap.mjs +12 -43
- package/dist/_chunks/rolldown-runtime.mjs +1 -48
- package/dist/_chunks/sequence.mjs +1 -0
- package/dist/_chunks/src.mjs +15 -0
- package/dist/_chunks/src2.mjs +499 -0
- package/dist/cli/index.mjs +77 -1952
- package/dist/config/index.d.mts +2 -2
- package/dist/config/index.mjs +1 -6
- package/dist/index.d.mts +150 -7
- package/dist/index.mjs +1 -21
- package/dist/model/builder.mjs +1 -3
- package/dist/model/index.d.mts +57 -3
- package/dist/model/index.mjs +1 -5
- package/dist/vite-plugin/index.d.mts +7 -3
- package/dist/vite-plugin/index.mjs +1 -22
- package/dist/vite-plugin/internal.d.mts +6 -7
- package/dist/vite-plugin/internal.mjs +1 -68
- package/package.json +64 -45
- package/react/{index.d.ts → index.d.mts} +114 -72
- package/react/{index.js → index.mjs} +21320 -22041
- package/react/package.json +2 -5
- package/vite-plugin-modules.d.ts +10 -5
- package/dist/_chunks/LikeC4.d.mts +0 -121
- package/dist/_chunks/config-app.prod.d.mts +0 -18
- package/dist/_chunks/config-app.prod.mjs +0 -188
- package/dist/_chunks/config-webcomponent.prod.mjs +0 -71
- package/dist/_chunks/define-config.mjs +0 -409
- package/dist/_chunks/index3.d.mts +0 -60
- package/dist/_chunks/libs/@chevrotain/gast.mjs +0 -3969
- package/dist/_chunks/libs/hono.mjs +0 -1829
- package/dist/_chunks/libs/nanoid.mjs +0 -29
- package/dist/_chunks/libs/nanostores.d.mts +0 -63
- package/dist/_chunks/libs/nanostores.mjs +0 -198
- package/dist/_chunks/model.mjs +0 -12
- package/dist/_chunks/module.d.mts +0 -71
- package/dist/_chunks/module.mjs +0 -18657
- package/dist/_chunks/plugin.mjs +0 -996
- package/dist/_chunks/sequence-view.mjs +0 -575
- package/dist/_chunks/vite-build.mjs +0 -69
- package/dist/_chunks/vite-dev.mjs +0 -79
- package/dist/_chunks/vite-preview.mjs +0 -27
- package/dist/language/module.d.mts +0 -5
- package/dist/language/module.mjs +0 -20
- package/dist/vite/vite-build.d.mts +0 -26
- package/dist/vite/vite-build.mjs +0 -27
- package/dist/vite/vite-dev.d.mts +0 -34
- package/dist/vite/vite-dev.mjs +0 -29
- package/dist/vite/vite-preview.d.mts +0 -20
- package/dist/vite/vite-preview.mjs +0 -26
- /package/dist/_chunks/{index4.d.mts → libs/@chevrotain/types.d.mts} +0 -0
|
@@ -1,80 +1 @@
|
|
|
1
|
-
import
|
|
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};
|