@likec4/core 1.48.0 → 1.49.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 (134) hide show
  1. package/dist/THIRD-PARTY-LICENSES.md +1012 -0
  2. package/dist/_chunks/Builder.view-element.mjs +2 -3284
  3. package/dist/_chunks/LikeC4Model.d.mts +21 -25
  4. package/dist/_chunks/RichText.mjs +1 -148
  5. package/dist/_chunks/_types.d.mts +1 -5
  6. package/dist/_chunks/_types2.d.mts +2 -4
  7. package/dist/_chunks/assignTagColors.mjs +1 -24
  8. package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -379
  9. package/dist/_chunks/guards.d.mts +2026 -0
  10. package/dist/_chunks/guards.mjs +4 -0
  11. package/dist/_chunks/index.d.mts +255 -136
  12. package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -3403
  13. package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
  14. package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -213
  15. package/dist/_chunks/libs/bail.mjs +1 -14
  16. package/dist/_chunks/libs/ccount.mjs +1 -25
  17. package/dist/_chunks/libs/character-entities-html4.mjs +1 -263
  18. package/dist/_chunks/libs/character-entities-legacy.mjs +1 -117
  19. package/dist/_chunks/libs/character-entities.mjs +2 -2136
  20. package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -18
  21. package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -21
  22. package/dist/_chunks/libs/defu.mjs +1 -42
  23. package/dist/_chunks/libs/devlop.mjs +1 -5
  24. package/dist/_chunks/libs/escape-string-regexp.mjs +1 -8
  25. package/dist/_chunks/libs/extend.mjs +1 -77
  26. package/dist/_chunks/libs/graphology-dag.mjs +1 -703
  27. package/dist/_chunks/libs/graphology.mjs +1 -4565
  28. package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -863
  29. package/dist/_chunks/libs/hast-util-to-html.mjs +9 -2696
  30. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  31. package/dist/_chunks/libs/longest-streak.mjs +1 -30
  32. package/dist/_chunks/libs/markdown-table.mjs +2 -290
  33. package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -653
  34. package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -8522
  35. package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -2393
  36. package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -1803
  37. package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -2243
  38. package/dist/_chunks/libs/mnemonist.d.mts +1 -91
  39. package/dist/_chunks/libs/mnemonist.mjs +1 -1978
  40. package/dist/_chunks/libs/natural-compare-lite.mjs +9 -42
  41. package/dist/_chunks/libs/ohash.mjs +1 -0
  42. package/dist/_chunks/libs/rehype-sanitize.mjs +1 -29
  43. package/dist/_chunks/libs/rehype-stringify.mjs +1 -34
  44. package/dist/_chunks/libs/remark-gfm.mjs +1 -36
  45. package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -100
  46. package/dist/_chunks/libs/remark-parse.mjs +1 -39
  47. package/dist/_chunks/libs/remark-rehype.mjs +1 -171
  48. package/dist/_chunks/libs/remeda.mjs +1 -702
  49. package/dist/_chunks/libs/trough.mjs +1 -158
  50. package/dist/_chunks/libs/unified.mjs +1 -2212
  51. package/dist/_chunks/rolldown-runtime.mjs +1 -42
  52. package/dist/_chunks/{index3.d.mts → theme.d.mts} +15 -13
  53. package/dist/_chunks/{index7.d.mts → to-text.d.mts} +165 -29
  54. package/dist/_chunks/to-text.mjs +1 -0
  55. package/dist/_chunks/vector.d.mts +198 -0
  56. package/dist/_chunks/vector.mjs +1 -0
  57. package/dist/builder/index.d.mts +2 -8
  58. package/dist/builder/index.mjs +1 -662
  59. package/dist/compute-view/index.d.mts +86 -15
  60. package/dist/compute-view/index.mjs +2 -262
  61. package/dist/geometry/index.d.mts +2 -2
  62. package/dist/geometry/index.mjs +1 -3
  63. package/dist/index.d.mts +9 -13
  64. package/dist/index.mjs +1 -27
  65. package/dist/model/index.d.mts +4 -14
  66. package/dist/model/index.mjs +1 -11
  67. package/dist/styles/index.d.mts +2 -8
  68. package/dist/styles/index.mjs +1 -30
  69. package/dist/types/index.d.mts +3 -9
  70. package/dist/types/index.mjs +1 -15
  71. package/dist/utils/graphology/index.d.mts +1 -1
  72. package/dist/utils/graphology/index.mjs +1 -3
  73. package/dist/utils/index.d.mts +4 -11
  74. package/dist/utils/index.mjs +1 -17
  75. package/package.json +13 -12
  76. package/dist/_chunks/LikeC4Styles.mjs +0 -691
  77. package/dist/_chunks/RichText.d.mts +0 -84
  78. package/dist/_chunks/_aux.d.mts +0 -289
  79. package/dist/_chunks/_aux.mjs +0 -18
  80. package/dist/_chunks/connection.mjs +0 -0
  81. package/dist/_chunks/const.d.mts +0 -43
  82. package/dist/_chunks/const.mjs +0 -33
  83. package/dist/_chunks/expression-model.d.mts +0 -192
  84. package/dist/_chunks/expression-model.mjs +0 -103
  85. package/dist/_chunks/expression.d.mts +0 -347
  86. package/dist/_chunks/expression.mjs +0 -107
  87. package/dist/_chunks/find.d.mts +0 -82
  88. package/dist/_chunks/find.mjs +0 -646
  89. package/dist/_chunks/find2.d.mts +0 -78
  90. package/dist/_chunks/find2.mjs +0 -287
  91. package/dist/_chunks/fqnRef.d.mts +0 -58
  92. package/dist/_chunks/fqnRef.mjs +0 -41
  93. package/dist/_chunks/geometry.mjs +0 -335
  94. package/dist/_chunks/index2.d.mts +0 -937
  95. package/dist/_chunks/index4.d.mts +0 -62
  96. package/dist/_chunks/index5.d.mts +0 -42
  97. package/dist/_chunks/index6.d.mts +0 -43
  98. package/dist/_chunks/index8.d.mts +0 -144
  99. package/dist/_chunks/invariant.mjs +0 -18
  100. package/dist/_chunks/iterable.mjs +0 -146
  101. package/dist/_chunks/libs/graphology-types.d.mts +0 -601
  102. package/dist/_chunks/libs/graphology.d.mts +0 -6
  103. package/dist/_chunks/mnemonist.d.mts +0 -1
  104. package/dist/_chunks/mnemonist.mjs +0 -0
  105. package/dist/_chunks/model.mjs +0 -1898
  106. package/dist/_chunks/model2.mjs +0 -0
  107. package/dist/_chunks/relationships-view.mjs +0 -132
  108. package/dist/_chunks/scalar.d.mts +0 -109
  109. package/dist/_chunks/scalar.mjs +0 -84
  110. package/dist/_chunks/utils.mjs +0 -483
  111. package/dist/compute-view/relationships-view/index.d.mts +0 -16
  112. package/dist/compute-view/relationships-view/index.mjs +0 -7
  113. package/dist/model/connection/deployment/index.d.mts +0 -12
  114. package/dist/model/connection/deployment/index.mjs +0 -9
  115. package/dist/model/connection/index.d.mts +0 -14
  116. package/dist/model/connection/index.mjs +0 -10
  117. package/dist/model/connection/model/index.d.mts +0 -12
  118. package/dist/model/connection/model/index.mjs +0 -8
  119. package/dist/types/RichText.d.mts +0 -3
  120. package/dist/types/RichText.mjs +0 -7
  121. package/dist/types/_aux.d.mts +0 -3
  122. package/dist/types/_aux.mjs +0 -3
  123. package/dist/types/expression-model.d.mts +0 -6
  124. package/dist/types/expression-model.mjs +0 -7
  125. package/dist/types/expression.d.mts +0 -5
  126. package/dist/types/expression.mjs +0 -7
  127. package/dist/types/fqnRef.d.mts +0 -4
  128. package/dist/types/fqnRef.mjs +0 -7
  129. package/dist/types/scalar.d.mts +0 -2
  130. package/dist/types/scalar.mjs +0 -7
  131. package/dist/utils/iterable/index.d.mts +0 -9
  132. package/dist/utils/iterable/index.mjs +0 -3
  133. package/dist/utils/mnemonist.d.mts +0 -2
  134. package/dist/utils/mnemonist.mjs +0 -12
@@ -1,158 +1 @@
1
- //#region ../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.js
2
- /**
3
- * @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback
4
- * Callback.
5
- *
6
- * @typedef {(...input: Array<any>) => any} Middleware
7
- * Ware.
8
- *
9
- * @typedef Pipeline
10
- * Pipeline.
11
- * @property {Run} run
12
- * Run the pipeline.
13
- * @property {Use} use
14
- * Add middleware.
15
- *
16
- * @typedef {(...input: Array<any>) => void} Run
17
- * Call all middleware.
18
- *
19
- * Calls `done` on completion with either an error or the output of the
20
- * last middleware.
21
- *
22
- * > 👉 **Note**: as the length of input defines whether async functions get a
23
- * > `next` function,
24
- * > it’s recommended to keep `input` at one value normally.
25
-
26
- *
27
- * @typedef {(fn: Middleware) => Pipeline} Use
28
- * Add middleware.
29
- */
30
- /**
31
- * Create new middleware.
32
- *
33
- * @returns {Pipeline}
34
- * Pipeline.
35
- */
36
- function trough() {
37
- /** @type {Array<Middleware>} */
38
- const fns = [];
39
- /** @type {Pipeline} */
40
- const pipeline = {
41
- run,
42
- use
43
- };
44
- return pipeline;
45
- /** @type {Run} */
46
- function run(...values) {
47
- let middlewareIndex = -1;
48
- /** @type {Callback} */
49
- const callback = values.pop();
50
- if (typeof callback !== "function") throw new TypeError("Expected function as last argument, not " + callback);
51
- next(null, ...values);
52
- /**
53
- * Run the next `fn`, or we’re done.
54
- *
55
- * @param {Error | null | undefined} error
56
- * @param {Array<any>} output
57
- */
58
- function next(error, ...output) {
59
- const fn = fns[++middlewareIndex];
60
- let index = -1;
61
- if (error) {
62
- callback(error);
63
- return;
64
- }
65
- while (++index < values.length) if (output[index] === null || output[index] === void 0) output[index] = values[index];
66
- values = output;
67
- if (fn) wrap(fn, next)(...output);
68
- else callback(null, ...output);
69
- }
70
- }
71
- /** @type {Use} */
72
- function use(middelware) {
73
- if (typeof middelware !== "function") throw new TypeError("Expected `middelware` to be a function, not " + middelware);
74
- fns.push(middelware);
75
- return pipeline;
76
- }
77
- }
78
- /**
79
- * Wrap `middleware` into a uniform interface.
80
- *
81
- * You can pass all input to the resulting function.
82
- * `callback` is then called with the output of `middleware`.
83
- *
84
- * If `middleware` accepts more arguments than the later given in input,
85
- * an extra `done` function is passed to it after that input,
86
- * which must be called by `middleware`.
87
- *
88
- * The first value in `input` is the main input value.
89
- * All other input values are the rest input values.
90
- * The values given to `callback` are the input values,
91
- * merged with every non-nullish output value.
92
- *
93
- * * if `middleware` throws an error,
94
- * returns a promise that is rejected,
95
- * or calls the given `done` function with an error,
96
- * `callback` is called with that error
97
- * * if `middleware` returns a value or returns a promise that is resolved,
98
- * that value is the main output value
99
- * * if `middleware` calls `done`,
100
- * all non-nullish values except for the first one (the error) overwrite the
101
- * output values
102
- *
103
- * @param {Middleware} middleware
104
- * Function to wrap.
105
- * @param {Callback} callback
106
- * Callback called with the output of `middleware`.
107
- * @returns {Run}
108
- * Wrapped middleware.
109
- */
110
- function wrap(middleware, callback) {
111
- /** @type {boolean} */
112
- let called;
113
- return wrapped;
114
- /**
115
- * Call `middleware`.
116
- * @this {any}
117
- * @param {Array<any>} parameters
118
- * @returns {void}
119
- */
120
- function wrapped(...parameters) {
121
- const fnExpectsCallback = middleware.length > parameters.length;
122
- /** @type {any} */
123
- let result;
124
- if (fnExpectsCallback) parameters.push(done);
125
- try {
126
- result = middleware.apply(this, parameters);
127
- } catch (error) {
128
- const exception = error;
129
- if (fnExpectsCallback && called) throw exception;
130
- return done(exception);
131
- }
132
- if (!fnExpectsCallback) if (result && result.then && typeof result.then === "function") result.then(then, done);
133
- else if (result instanceof Error) done(result);
134
- else then(result);
135
- }
136
- /**
137
- * Call `callback`, only once.
138
- *
139
- * @type {Callback}
140
- */
141
- function done(error, ...output) {
142
- if (!called) {
143
- called = true;
144
- callback(error, ...output);
145
- }
146
- }
147
- /**
148
- * Call `done` with one value.
149
- *
150
- * @param {any} [value]
151
- */
152
- function then(value) {
153
- done(null, value);
154
- }
155
- }
156
-
157
- //#endregion
158
- export { trough as t };
1
+ function trough(){let e=[],n={run:r,use:i};return n;function r(...n){let r=-1,i=n.pop();if(typeof i!=`function`)throw TypeError(`Expected function as last argument, not `+i);a(null,...n);function a(o,...s){let c=e[++r],l=-1;if(o){i(o);return}for(;++l<n.length;)(s[l]===null||s[l]===void 0)&&(s[l]=n[l]);n=s,c?wrap(c,a)(...s):i(null,...s)}}function i(t){if(typeof t!=`function`)throw TypeError("Expected `middelware` to be a function, not "+t);return e.push(t),n}}function wrap(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}export{trough as t};