@likec4/core 1.43.0 → 1.44.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 (67) hide show
  1. package/dist/builder/index.d.mts +7 -7
  2. package/dist/builder/index.mjs +10 -8
  3. package/dist/compute-view/index.d.mts +9 -9
  4. package/dist/compute-view/index.mjs +7 -7
  5. package/dist/compute-view/relationships-view/index.d.mts +7 -7
  6. package/dist/compute-view/relationships-view/index.mjs +1 -1
  7. package/dist/index.d.mts +7 -7
  8. package/dist/index.mjs +7 -7
  9. package/dist/model/connection/deployment/index.d.mts +9 -9
  10. package/dist/model/connection/deployment/index.mjs +2 -2
  11. package/dist/model/connection/index.d.mts +10 -10
  12. package/dist/model/connection/index.mjs +3 -3
  13. package/dist/model/connection/model/index.d.mts +9 -9
  14. package/dist/model/connection/model/index.mjs +2 -2
  15. package/dist/model/index.d.mts +26 -12
  16. package/dist/model/index.mjs +4 -4
  17. package/dist/shared/{core.CXWsKEDr.mjs → core.23WeDKcI.mjs} +269 -632
  18. package/dist/shared/{core.CwsG7hOw.d.mts → core.5ZQ-r3Oa.d.mts} +1 -1
  19. package/dist/shared/{core.727Qoh_W.mjs → core.6VsRBhGY.mjs} +2 -101
  20. package/dist/shared/{core.CT1xBp4R.d.mts → core.8mmHFn9g.d.mts} +2 -2
  21. package/dist/shared/core.B9BjmjuH.mjs +9 -0
  22. package/dist/shared/{core.CvLjw3bH.d.mts → core.BMtVqKl7.d.mts} +89 -11
  23. package/dist/shared/{core.rCeaAqgW.mjs → core.BdPcbSkN.mjs} +1 -1
  24. package/dist/shared/{core.DTdfiejA.d.mts → core.BnDbAOR2.d.mts} +2 -2
  25. package/dist/shared/{core.CDvVInBp.d.mts → core.BnOetIAR.d.mts} +2 -2
  26. package/dist/shared/core.BuQZczj6.mjs +38 -0
  27. package/dist/shared/core.Bv3cd-jC.mjs +102 -0
  28. package/dist/shared/{core.BouyJs63.mjs → core.C0Ye2OCr.mjs} +1 -1
  29. package/dist/shared/{core.hNWo20Ym.d.mts → core.CDOKQTW6.d.mts} +54 -35
  30. package/dist/shared/{core.Be05qJwN.mjs → core.CHwVhuc9.mjs} +36 -10
  31. package/dist/shared/{core.BT-9gaqQ.d.mts → core.CKNmSm2W.d.mts} +85 -89
  32. package/dist/shared/{core.DFi2dOTl.mjs → core.CR3PmPzr.mjs} +85 -1
  33. package/dist/shared/{core.C2TiyjI6.mjs → core.CbsSAn1j.mjs} +19 -19
  34. package/dist/shared/{core.QJD_fcrc.mjs → core.CmPXpJ8l.mjs} +1 -14
  35. package/dist/shared/{core.D5fzJWbF.d.mts → core.DB0Ue5Wx.d.mts} +1 -1
  36. package/dist/shared/{core.DNbUPnve.mjs → core.DEieYfbG.mjs} +27 -25
  37. package/dist/shared/{core.D0NziuvN.mjs → core.DFCHU59b.mjs} +4 -4
  38. package/dist/shared/{core.BYNkXQ8A.mjs → core.DH7TXqXf.mjs} +30 -1
  39. package/dist/shared/{core.DMMOWQqc.mjs → core.DIE3F6sw.mjs} +2 -2
  40. package/dist/shared/{core.Cq2kxOI-.d.mts → core.DTJYgLXI.d.mts} +3 -3
  41. package/dist/shared/{core.CcJ1FZ7h.d.mts → core.DjAM-S6a.d.mts} +174 -77
  42. package/dist/shared/{core.CNgZvKb8.mjs → core.DrUt0Lbi.mjs} +1 -1
  43. package/dist/shared/core.M9ayqQZa.mjs +1207 -0
  44. package/dist/shared/{core.BXs4wY7R.d.mts → core.WwMWeiFL.d.mts} +4 -4
  45. package/dist/shared/{core.2N_9BzyD.mjs → core.bKIs4oDO.mjs} +3 -3
  46. package/dist/shared/{core.DyToofsP.mjs → core.h4TqqSC0.mjs} +1360 -124
  47. package/dist/shared/core.q10OP9oJ.mjs +5 -0
  48. package/dist/shared/core.uFk_o9X6.mjs +13 -0
  49. package/dist/styles/index.d.mts +18 -8
  50. package/dist/styles/index.mjs +63 -1
  51. package/dist/types/_aux.d.mts +2 -2
  52. package/dist/types/_aux.mjs +8 -1
  53. package/dist/types/expression-model.d.mts +3 -3
  54. package/dist/types/expression.d.mts +3 -3
  55. package/dist/types/fqnRef.d.mts +7 -8
  56. package/dist/types/index.d.mts +17 -13
  57. package/dist/types/index.mjs +28 -5
  58. package/dist/utils/graphology/index.mjs +1 -1
  59. package/dist/utils/index.d.mts +3 -2
  60. package/dist/utils/index.mjs +8 -6
  61. package/dist/utils/iterable/index.d.mts +1 -1
  62. package/dist/utils/iterable/index.mjs +2 -1
  63. package/package.json +18 -17
  64. package/dist/shared/core.01VTr9qu.mjs +0 -170
  65. package/dist/shared/core.1vX5a9AY.mjs +0 -86
  66. package/dist/shared/core.BazD6cot.mjs +0 -14
  67. package/dist/shared/core.BzTakU3I.mjs +0 -67
@@ -1,170 +0,0 @@
1
- import { t as t$1 } from './core.BsSXS-_R.mjs';
2
- import { m as memoizeProp } from './core.BR4zXDH-.mjs';
3
- import { a as markdownToText, m as markdownToHtml } from './core.DFi2dOTl.mjs';
4
- import { n as nonexhaustive } from './core.D4npX2q8.mjs';
5
-
6
- function t(...t){return t$1(n,t)}function n(e,t){let n={...e};for(let[r,i]of Object.entries(n))t(i,r,e)&&delete n[r];return n}
7
-
8
- function exact(a) {
9
- return t(a, (v) => v === void 0);
10
- }
11
-
12
- const symb_text = Symbol.for("text");
13
- const symb_html = Symbol.for("html");
14
- const emptyTxt = "";
15
- class RichText {
16
- static _cache = /* @__PURE__ */ new WeakMap();
17
- /**
18
- * Creates and memoizes a RichText instance.
19
- * @see ElementModel.description
20
- * @example
21
- *
22
- * get description(): RichTextOrEmpty {
23
- * return RichText.memoize(this, this.$element.description)
24
- * }
25
- */
26
- static memoize(obj, tag, source) {
27
- return memoizeProp(obj, tag, () => RichText.from(source));
28
- }
29
- /**
30
- * Creates a RichText instance from a source.
31
- */
32
- static from(source) {
33
- if (source === null || source === void 0 || source === RichText.EMPTY) {
34
- return RichText.EMPTY;
35
- }
36
- if (source instanceof RichText) {
37
- return source;
38
- }
39
- if (typeof source === "string") {
40
- if (source.trim() === emptyTxt) {
41
- return RichText.EMPTY;
42
- }
43
- return new RichText({ txt: source });
44
- }
45
- if ("isEmpty" in source && source.isEmpty) {
46
- return RichText.EMPTY;
47
- }
48
- if ("md" in source && source.md.trim() === emptyTxt) {
49
- return RichText.EMPTY;
50
- }
51
- if ("txt" in source && source.txt.trim() === emptyTxt) {
52
- return RichText.EMPTY;
53
- }
54
- const _source = source;
55
- const cached = RichText._cache.get(_source);
56
- if (cached) {
57
- return cached;
58
- }
59
- const rt = new RichText(_source);
60
- RichText._cache.set(_source, rt);
61
- return rt;
62
- }
63
- /**
64
- * This is a workaround for the fact that we need instance of RichText for `instanceof` checks
65
- * It is invalid inheritance (returning `null` from getters), and we cast to @see RichTextEmpty
66
- */
67
- static EMPTY = new class extends RichText {
68
- isEmpty = true;
69
- nonEmpty = false;
70
- isMarkdown = false;
71
- $source = null;
72
- constructor() {
73
- super({ txt: emptyTxt });
74
- }
75
- get text() {
76
- return null;
77
- }
78
- get md() {
79
- return null;
80
- }
81
- get html() {
82
- return null;
83
- }
84
- }();
85
- $source;
86
- isEmpty;
87
- nonEmpty;
88
- isMarkdown;
89
- /**
90
- * Private constructor to prevent direct instantiation.
91
- * Use {@link RichText.from} or {@link RichText.memoize} instead.
92
- */
93
- constructor(source) {
94
- this.isMarkdown = false;
95
- if (typeof source === "string") {
96
- this.$source = { txt: source };
97
- this.isEmpty = source.trim() === emptyTxt;
98
- } else {
99
- this.$source = source;
100
- this.isEmpty = true;
101
- if ("md" in source) {
102
- this.isEmpty = source.md === emptyTxt;
103
- this.isMarkdown = true;
104
- } else {
105
- this.isEmpty = source.txt === emptyTxt;
106
- }
107
- }
108
- this.nonEmpty = !this.isEmpty;
109
- }
110
- /**
111
- * Returns the text content of the rich text.
112
- * If the source is a string, it returns the string.
113
- * If the source is a markdown, it returns the markdown.
114
- */
115
- get text() {
116
- if (this.isEmpty || this.$source === null) {
117
- return emptyTxt;
118
- }
119
- const source = this.$source;
120
- if ("txt" in source) {
121
- return source.txt;
122
- }
123
- return memoizeProp(this, symb_text, () => markdownToText(source.md));
124
- }
125
- /**
126
- * Returns the markdown content of the rich text.
127
- * If the source is a string, it returns the string.
128
- * If the source is a markdown, it returns the markdown.
129
- */
130
- get md() {
131
- if (this.isEmpty || this.$source === null) {
132
- return emptyTxt;
133
- }
134
- const source = this.$source;
135
- if ("md" in source) {
136
- return source.md;
137
- }
138
- if ("txt" in source) {
139
- return source.txt;
140
- }
141
- nonexhaustive(source);
142
- }
143
- /**
144
- * Returns the html content of the rich text.
145
- * If the source is a string, it returns the string.
146
- * If the source is a markdown, it returns the HTML.
147
- */
148
- get html() {
149
- if (this.isEmpty || this.$source === null) {
150
- return emptyTxt;
151
- }
152
- const source = this.$source;
153
- if ("txt" in source) {
154
- return source.txt;
155
- }
156
- return memoizeProp(this, symb_html, () => markdownToHtml(source.md));
157
- }
158
- equals(other) {
159
- if (this === other) return true;
160
- if (!(other instanceof RichText)) return false;
161
- if (this.isEmpty && other.isEmpty) return true;
162
- if (this.isEmpty !== other.isEmpty || this.isMarkdown !== other.isMarkdown) return false;
163
- if (this.isMarkdown) {
164
- return this.$source?.md === other.$source?.md;
165
- }
166
- return this.$source?.txt === other.$source?.txt;
167
- }
168
- }
169
-
170
- export { RichText as R, exact as e, t };
@@ -1,86 +0,0 @@
1
- import { r as requireSupport } from './core.rCeaAqgW.mjs';
2
-
3
- /**
4
- * Obliterator ForEach Function
5
- * =============================
6
- *
7
- * Helper function used to easily iterate over mixed values.
8
- */
9
-
10
- var foreach;
11
- var hasRequiredForeach;
12
-
13
- function requireForeach () {
14
- if (hasRequiredForeach) return foreach;
15
- hasRequiredForeach = 1;
16
- var support = requireSupport();
17
-
18
- var ARRAY_BUFFER_SUPPORT = support.ARRAY_BUFFER_SUPPORT;
19
- var SYMBOL_SUPPORT = support.SYMBOL_SUPPORT;
20
-
21
- /**
22
- * Function able to iterate over almost any iterable JS value.
23
- *
24
- * @param {any} iterable - Iterable value.
25
- * @param {function} callback - Callback function.
26
- */
27
- foreach = function forEach(iterable, callback) {
28
- var iterator, k, i, l, s;
29
-
30
- if (!iterable) throw new Error('obliterator/forEach: invalid iterable.');
31
-
32
- if (typeof callback !== 'function')
33
- throw new Error('obliterator/forEach: expecting a callback.');
34
-
35
- // The target is an array or a string or function arguments
36
- if (
37
- Array.isArray(iterable) ||
38
- (ARRAY_BUFFER_SUPPORT && ArrayBuffer.isView(iterable)) ||
39
- typeof iterable === 'string' ||
40
- iterable.toString() === '[object Arguments]'
41
- ) {
42
- for (i = 0, l = iterable.length; i < l; i++) callback(iterable[i], i);
43
- return;
44
- }
45
-
46
- // The target has a #.forEach method
47
- if (typeof iterable.forEach === 'function') {
48
- iterable.forEach(callback);
49
- return;
50
- }
51
-
52
- // The target is iterable
53
- if (
54
- SYMBOL_SUPPORT &&
55
- Symbol.iterator in iterable &&
56
- typeof iterable.next !== 'function'
57
- ) {
58
- iterable = iterable[Symbol.iterator]();
59
- }
60
-
61
- // The target is an iterator
62
- if (typeof iterable.next === 'function') {
63
- iterator = iterable;
64
- i = 0;
65
-
66
- while (((s = iterator.next()), s.done !== true)) {
67
- callback(s.value, i);
68
- i++;
69
- }
70
-
71
- return;
72
- }
73
-
74
- // The target is a plain object
75
- for (k in iterable) {
76
- if (iterable.hasOwnProperty(k)) {
77
- callback(iterable[k], k);
78
- }
79
- }
80
-
81
- return;
82
- };
83
- return foreach;
84
- }
85
-
86
- export { requireForeach as r };
@@ -1,14 +0,0 @@
1
- function preferSummary(a) {
2
- return a.summary ?? a.description;
3
- }
4
- function preferDescription(a) {
5
- return a.description ?? a.summary;
6
- }
7
-
8
- const _aux = {
9
- __proto__: null,
10
- preferDescription: preferDescription,
11
- preferSummary: preferSummary
12
- };
13
-
14
- export { _aux as _, preferSummary as a, preferDescription as p };
@@ -1,67 +0,0 @@
1
- import { e as e$1 } from './core.BKlholso.mjs';
2
- import { e as isStepEdgeId } from './core.C_Ni6yHl.mjs';
3
-
4
- function e(e){return Array.isArray(e)}
5
-
6
- function isViewRulePredicate(rule) {
7
- return "include" in rule || "exclude" in rule;
8
- }
9
- function isViewRuleStyle(rule) {
10
- return "targets" in rule && "style" in rule;
11
- }
12
- function isComputedView(view) {
13
- return view._stage === "computed";
14
- }
15
- function isDiagramView(view) {
16
- return view._stage === "layouted";
17
- }
18
- function isElementView(view) {
19
- return view._type === "element";
20
- }
21
- function isScopedElementView(view) {
22
- return isElementView(view) && e$1(view.viewOf);
23
- }
24
- function isExtendsElementView(view) {
25
- return isElementView(view) && e$1(view.extends);
26
- }
27
- function isDeploymentView(view) {
28
- return view._type === "deployment";
29
- }
30
- function isDynamicView(view) {
31
- return view._type === "dynamic";
32
- }
33
-
34
- function isViewRuleGlobalStyle(rule) {
35
- return "styleId" in rule;
36
- }
37
- function isViewRuleGlobalPredicateRef(rule) {
38
- return "predicateId" in rule;
39
- }
40
- function isAutoLayoutDirection(autoLayout) {
41
- return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
42
- }
43
- function isViewRuleAutoLayout(rule) {
44
- return "direction" in rule;
45
- }
46
-
47
- function getParallelStepsPrefix(id) {
48
- if (isStepEdgeId(id) && id.includes(".")) {
49
- return id.slice(0, id.indexOf(".") + 1);
50
- }
51
- return null;
52
- }
53
- function isDynamicStep(step) {
54
- return !!step && !("__series" in step || "__parallel" in step);
55
- }
56
- function isDynamicStepsParallel(step) {
57
- return !!step && "__parallel" in step && e(step.__parallel);
58
- }
59
- function isDynamicStepsSeries(step) {
60
- return !!step && "__series" in step && e(step.__series);
61
- }
62
-
63
- function isViewRuleGroup(rule) {
64
- return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
65
- }
66
-
67
- export { isViewRuleStyle as a, isComputedView as b, isDiagramView as c, isElementView as d, isScopedElementView as e, isExtendsElementView as f, isDeploymentView as g, isDynamicView as h, isViewRulePredicate as i, isViewRuleGlobalStyle as j, isViewRuleGlobalPredicateRef as k, isAutoLayoutDirection as l, isViewRuleAutoLayout as m, getParallelStepsPrefix as n, isDynamicStep as o, isDynamicStepsParallel as p, isDynamicStepsSeries as q, isViewRuleGroup as r, e as s };