@likec4/core 1.47.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.
- package/LICENSE +1 -1
- package/dist/THIRD-PARTY-LICENSES.md +1012 -0
- package/dist/_chunks/Builder.view-element.mjs +2 -0
- package/dist/_chunks/LikeC4Model.d.mts +1283 -0
- package/dist/_chunks/RichText.mjs +1 -0
- package/dist/_chunks/_types.d.mts +777 -0
- package/dist/_chunks/_types2.d.mts +36 -0
- package/dist/_chunks/assignTagColors.mjs +1 -0
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +1 -0
- package/dist/_chunks/guards.d.mts +2026 -0
- package/dist/_chunks/guards.mjs +4 -0
- package/dist/_chunks/index.d.mts +288 -0
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +15 -0
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -0
- package/dist/_chunks/libs/bail.mjs +1 -0
- package/dist/_chunks/libs/ccount.mjs +1 -0
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -0
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -0
- package/dist/_chunks/libs/character-entities.mjs +2 -0
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -0
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -0
- package/dist/_chunks/libs/defu.mjs +1 -0
- package/dist/_chunks/libs/devlop.mjs +1 -0
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -0
- package/dist/_chunks/libs/extend.mjs +1 -0
- package/dist/_chunks/libs/graphology-dag.mjs +1 -0
- package/dist/_chunks/libs/graphology.mjs +1 -0
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -0
- package/dist/_chunks/libs/hast-util-to-html.mjs +9 -0
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/_chunks/libs/longest-streak.mjs +1 -0
- package/dist/_chunks/libs/markdown-table.mjs +2 -0
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -0
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +3 -0
- package/dist/_chunks/libs/mdast-util-gfm.mjs +15 -0
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +11 -0
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -0
- package/dist/_chunks/libs/mnemonist.d.mts +164 -0
- package/dist/_chunks/libs/mnemonist.mjs +1 -0
- package/dist/_chunks/libs/natural-compare-lite.mjs +9 -0
- package/dist/_chunks/libs/ohash.mjs +1 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -0
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -0
- package/dist/_chunks/libs/remark-gfm.mjs +1 -0
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +3 -0
- package/dist/_chunks/libs/remark-parse.mjs +1 -0
- package/dist/_chunks/libs/remark-rehype.mjs +1 -0
- package/dist/_chunks/libs/remeda.mjs +1 -0
- package/dist/_chunks/libs/trough.mjs +1 -0
- package/dist/_chunks/libs/unified.mjs +1 -0
- package/dist/_chunks/rolldown-runtime.mjs +1 -0
- package/dist/_chunks/theme.d.mts +148 -0
- package/dist/_chunks/to-text.d.mts +404 -0
- package/dist/_chunks/to-text.mjs +1 -0
- package/dist/_chunks/vector.d.mts +198 -0
- package/dist/_chunks/vector.mjs +1 -0
- package/dist/builder/index.d.mts +5 -775
- package/dist/builder/index.mjs +1 -1053
- package/dist/compute-view/index.d.mts +156 -56
- package/dist/compute-view/index.mjs +2 -229
- package/dist/geometry/index.d.mts +2 -109
- package/dist/geometry/index.mjs +1 -328
- package/dist/index.d.mts +14 -20
- package/dist/index.mjs +1 -18
- package/dist/model/index.d.mts +5 -57
- package/dist/model/index.mjs +1 -4
- package/dist/styles/index.d.mts +3 -117
- package/dist/styles/index.mjs +1 -63
- package/dist/types/index.d.mts +3 -47
- package/dist/types/index.mjs +1 -17
- package/dist/utils/graphology/index.d.mts +2 -1864
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +4 -124
- package/dist/utils/index.mjs +1 -44
- package/package.json +20 -24
- package/compute-view/relationships/package.json +0 -4
- package/dist/compute-view/relationships-view/index.d.mts +0 -51
- package/dist/compute-view/relationships-view/index.mjs +0 -185
- package/dist/model/connection/deployment/index.d.mts +0 -15
- package/dist/model/connection/deployment/index.mjs +0 -2
- package/dist/model/connection/index.d.mts +0 -75
- package/dist/model/connection/index.mjs +0 -3
- package/dist/model/connection/model/index.d.mts +0 -15
- package/dist/model/connection/model/index.mjs +0 -2
- package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
- package/dist/shared/core.78IWAHAE.mjs +0 -332
- package/dist/shared/core.B85MJLTf.mjs +0 -5
- package/dist/shared/core.BFd1lU9R.mjs +0 -29
- package/dist/shared/core.BKlholso.mjs +0 -3
- package/dist/shared/core.BNN-3vPH.mjs +0 -1255
- package/dist/shared/core.BPGOjone.d.mts +0 -46
- package/dist/shared/core.BP_QHEXs.mjs +0 -785
- package/dist/shared/core.BbE4y-yl.mjs +0 -177
- package/dist/shared/core.Bdy3hhTc.mjs +0 -28382
- package/dist/shared/core.BfCKSW-g.d.mts +0 -1266
- package/dist/shared/core.BhNcrwzK.mjs +0 -7
- package/dist/shared/core.BkVA6gjl.mjs +0 -5
- package/dist/shared/core.BoYfZOBm.mjs +0 -3
- package/dist/shared/core.BsSXS-_R.mjs +0 -7
- package/dist/shared/core.C3JowhaZ.mjs +0 -32
- package/dist/shared/core.C4x8aaWa.mjs +0 -27
- package/dist/shared/core.CAgYpDtM.d.mts +0 -98
- package/dist/shared/core.CHf8VEa3.mjs +0 -1206
- package/dist/shared/core.CLSZtnFh.mjs +0 -69
- package/dist/shared/core.C_3y3eqV.d.mts +0 -139
- package/dist/shared/core.CbT8JVYL.mjs +0 -5
- package/dist/shared/core.CdNCAwq7.mjs +0 -176
- package/dist/shared/core.CmGY9blO.mjs +0 -6717
- package/dist/shared/core.CmPXpJ8l.mjs +0 -21
- package/dist/shared/core.Coi_LOUZ.mjs +0 -7
- package/dist/shared/core.CqAJJpK_.mjs +0 -3
- package/dist/shared/core.CywrQs86.d.mts +0 -31
- package/dist/shared/core.D00YbOhQ.d.mts +0 -300
- package/dist/shared/core.D0WZutNd.mjs +0 -94
- package/dist/shared/core.D4npX2q8.mjs +0 -18
- package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
- package/dist/shared/core.DC5IAaDT.d.mts +0 -334
- package/dist/shared/core.DE9qzhn8.d.mts +0 -83
- package/dist/shared/core.DGcIbsj4.mjs +0 -3946
- package/dist/shared/core.DH7TXqXf.mjs +0 -136
- package/dist/shared/core.DKhRkHRN.d.mts +0 -41
- package/dist/shared/core.DRJma0Ol.mjs +0 -22
- package/dist/shared/core.DU5SRqNF.mjs +0 -2209
- package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
- package/dist/shared/core.DbfO90vF.mjs +0 -434
- package/dist/shared/core.DcS-0zys.mjs +0 -10
- package/dist/shared/core.Dh119QSP.mjs +0 -4995
- package/dist/shared/core.DjcWextK.mjs +0 -1371
- package/dist/shared/core.Dojz4bvg.d.mts +0 -504
- package/dist/shared/core.FZ305VYd.mjs +0 -21
- package/dist/shared/core.OtRNdMxy.d.mts +0 -352
- package/dist/shared/core.RfnaEmgA.mjs +0 -7
- package/dist/shared/core.btEq3i3f.mjs +0 -300
- package/dist/shared/core.oSV6SRfk.mjs +0 -13
- package/dist/shared/core.om36dXXW.mjs +0 -41
- package/dist/shared/core.osFs8tU7.d.mts +0 -466
- package/dist/shared/core.q10OP9oJ.mjs +0 -5
- package/dist/shared/core.tpvDGvdC.d.mts +0 -87
- package/dist/shared/core.uFk_o9X6.mjs +0 -13
- package/dist/types/_aux.d.mts +0 -4
- package/dist/types/_aux.mjs +0 -8
- package/dist/types/expression-model.d.mts +0 -190
- package/dist/types/expression-model.mjs +0 -109
- package/dist/types/expression.d.mts +0 -6
- package/dist/types/expression.mjs +0 -113
- package/dist/types/fqnRef.d.mts +0 -60
- package/dist/types/fqnRef.mjs +0 -45
- package/dist/types/scalar.d.mts +0 -2
- package/dist/types/scalar.mjs +0 -4
- package/dist/utils/iterable/index.d.mts +0 -132
- package/dist/utils/iterable/index.mjs +0 -62
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { t as t$1, a as t$2 } from './core.3ZhnKAlZ.mjs';
|
|
2
|
-
|
|
3
|
-
function t(t,n){let r=n.length-t.length;if(r===1){let[r,...i]=n;return t$1(r,{lazy:t,lazyArgs:i})}if(r===0){let r={lazy:t,lazyArgs:n};return Object.assign(t=>t$1(t,r),r)}throw Error(`Wrong number of arguments`)}
|
|
4
|
-
|
|
5
|
-
function n(...e){return t(r,e)}function r(){let t=new Set;return n=>t.has(n)?t$2:(t.add(n),{done:false,hasNext:true,next:n})}
|
|
6
|
-
|
|
7
|
-
export { n };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
function e(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}
|
|
2
|
-
|
|
3
|
-
function t$1(t,n,r){let i=t.length-n.length;if(i===0)return t(...n);if(i===1)return e(t,n,r);throw Error(`Wrong number of arguments`)}
|
|
4
|
-
|
|
5
|
-
function t(...t){return t$1(n,t)}const n=(e,t)=>e.length>=t;
|
|
6
|
-
|
|
7
|
-
export { t as a, t$1 as t };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { e } from './core.DRJma0Ol.mjs';
|
|
2
|
-
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
3
|
-
|
|
4
|
-
function imap(arg1, arg2) {
|
|
5
|
-
const mapper = arg2 ?? arg1;
|
|
6
|
-
invariant(e(mapper));
|
|
7
|
-
function* _map(iter) {
|
|
8
|
-
for (const value of iter) {
|
|
9
|
-
yield mapper(value);
|
|
10
|
-
}
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
if (!arg2) {
|
|
14
|
-
return _map;
|
|
15
|
-
}
|
|
16
|
-
return _map(arg1);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function toArray(iterable) {
|
|
20
|
-
if (iterable) {
|
|
21
|
-
return Array.from(iterable);
|
|
22
|
-
}
|
|
23
|
-
return (it) => Array.from(it);
|
|
24
|
-
}
|
|
25
|
-
function toSet(iterable) {
|
|
26
|
-
if (iterable) {
|
|
27
|
-
return new Set(iterable);
|
|
28
|
-
}
|
|
29
|
-
return (it) => new Set(it);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { toArray as a, imap as i, toSet as t };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
function e(e){return e!==void 0}
|
|
2
|
-
|
|
3
|
-
function iflat(iterable) {
|
|
4
|
-
return iterable ? _iflat(iterable) : _iflat;
|
|
5
|
-
}
|
|
6
|
-
function* _iflat(iterable) {
|
|
7
|
-
for (const inner of iterable) {
|
|
8
|
-
yield* inner;
|
|
9
|
-
}
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function iunique(iterable) {
|
|
14
|
-
return iterable ? _iunique(iterable) : _iunique;
|
|
15
|
-
}
|
|
16
|
-
function* _iunique(iterable) {
|
|
17
|
-
const seen = /* @__PURE__ */ new Set();
|
|
18
|
-
for (const item of iterable) {
|
|
19
|
-
if (!seen.has(item)) {
|
|
20
|
-
seen.add(item);
|
|
21
|
-
yield item;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { iunique as a, e, iflat as i };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { L as LikeC4StylesConfig, a as LikeC4Theme, b as LikeC4StyleDefaults, E as ElementColorValues, R as RelationshipColorValues, T as ThemeColor, c as ThemeColorValues, d as TextSize, S as SpacingSize, e as ShapeSize } from './core.DC5IAaDT.mjs';
|
|
2
|
-
import { LiteralUnion } from 'type-fest';
|
|
3
|
-
import { L as LikeC4ProjectStylesConfig, C as ComputedNodeStyle } from './core.Dojz4bvg.mjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Styles of a LikeC4 project
|
|
7
|
-
*
|
|
8
|
-
* Accepts an array of LikeC4ProjectStylesConfig objects as a parameter
|
|
9
|
-
* and constructs a LikeC4Styles merged with the default styles.
|
|
10
|
-
*
|
|
11
|
-
* The class provides methods to get the default element colors, relationship
|
|
12
|
-
* colors, group colors, font size in pixels, padding in pixels, and to compute
|
|
13
|
-
* the ThemeColorValues from a given color.
|
|
14
|
-
*/
|
|
15
|
-
declare class LikeC4Styles {
|
|
16
|
-
protected config: LikeC4StylesConfig;
|
|
17
|
-
readonly theme: LikeC4Theme;
|
|
18
|
-
readonly defaults: LikeC4StyleDefaults;
|
|
19
|
-
static readonly DEFAULT: LikeC4Styles;
|
|
20
|
-
static from(...configs: Array<LikeC4ProjectStylesConfig | undefined | null>): LikeC4Styles;
|
|
21
|
-
private constructor();
|
|
22
|
-
/**
|
|
23
|
-
* Default element colors
|
|
24
|
-
*/
|
|
25
|
-
get elementColors(): ElementColorValues;
|
|
26
|
-
/**
|
|
27
|
-
* Default relationship colors
|
|
28
|
-
*/
|
|
29
|
-
get relationshipColors(): RelationshipColorValues;
|
|
30
|
-
/**
|
|
31
|
-
* Default group colors
|
|
32
|
-
*/
|
|
33
|
-
get groupColors(): ElementColorValues;
|
|
34
|
-
isDefaultColor(color: LiteralUnion<ThemeColor, string>): color is ThemeColor;
|
|
35
|
-
/**
|
|
36
|
-
* Get color values
|
|
37
|
-
*
|
|
38
|
-
* @param color - The color to use
|
|
39
|
-
* @default color From the defaults
|
|
40
|
-
*/
|
|
41
|
-
colors(color?: LiteralUnion<ThemeColor, string>): ThemeColorValues;
|
|
42
|
-
/**
|
|
43
|
-
* Get font size in pixels
|
|
44
|
-
*
|
|
45
|
-
* @param textSize - The text size to use
|
|
46
|
-
* @default textSize From the defaults
|
|
47
|
-
*/
|
|
48
|
-
fontSize(textSize?: TextSize): number;
|
|
49
|
-
/**
|
|
50
|
-
* Get padding in pixels
|
|
51
|
-
*
|
|
52
|
-
* @param paddingSize - The padding size to use
|
|
53
|
-
* @default paddingSize From the defaults
|
|
54
|
-
*/
|
|
55
|
-
padding(paddingSize?: SpacingSize): number;
|
|
56
|
-
isThemeColor(color: string): color is ThemeColor;
|
|
57
|
-
/**
|
|
58
|
-
* Calculate sizes and values based on the node styles
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```typescript
|
|
62
|
-
* const { sizes, values } = styles.nodeSizes(node.style)
|
|
63
|
-
*
|
|
64
|
-
* // sizes
|
|
65
|
-
* sizes.size // enum Size
|
|
66
|
-
* sizes.padding // enum SpacingSize
|
|
67
|
-
* sizes.textSize // enum TextSize
|
|
68
|
-
*
|
|
69
|
-
* // values
|
|
70
|
-
* values.sizes // { width: number, height: number }
|
|
71
|
-
* values.padding // number
|
|
72
|
-
* values.textSize // number
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
nodeSizes(nodestyles: ComputedNodeStyle): {
|
|
76
|
-
sizes: Omit<ComputedNodeStyle, "size" | "padding" | "textSize"> & Required<{
|
|
77
|
-
readonly size?: ShapeSize;
|
|
78
|
-
readonly padding?: SpacingSize;
|
|
79
|
-
readonly textSize?: TextSize;
|
|
80
|
-
}>;
|
|
81
|
-
values: {
|
|
82
|
-
sizes: {
|
|
83
|
-
readonly width: number;
|
|
84
|
-
readonly height: number;
|
|
85
|
-
};
|
|
86
|
-
padding: number;
|
|
87
|
-
textSize: number;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Compute ThemeColorValues from a given color
|
|
92
|
-
* @param color - HEX, RGB, RGBA, etc.
|
|
93
|
-
*/
|
|
94
|
-
computeFrom(color: string): ThemeColorValues;
|
|
95
|
-
equals(other: LikeC4Styles): boolean;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export { LikeC4Styles as L };
|