@likec4/core 1.40.0 → 1.42.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/builder/package.json +4 -0
- package/compute-view/package.json +4 -0
- package/compute-view/relationships/package.json +4 -0
- package/dist/builder/index.d.mts +83 -20
- package/dist/builder/index.mjs +210 -126
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +14 -11
- package/dist/compute-view/relationships-view/index.d.mts +9 -8
- package/dist/compute-view/relationships-view/index.mjs +6 -6
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +12 -12
- package/dist/model/connection/deployment/index.d.mts +11 -10
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +12 -11
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +11 -10
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +14 -14
- package/dist/model/index.mjs +4 -5
- package/dist/shared/{core.DHQ32OHa.mjs → core.01VTr9qu.mjs} +10 -29
- package/dist/shared/core.1vX5a9AY.mjs +86 -0
- package/dist/shared/{core.BVNaR17u.mjs → core.B7KhhkRY.mjs} +1 -1
- package/dist/shared/core.B85MJLTf.mjs +5 -0
- package/dist/shared/{core.BIAlzwKc.mjs → core.BIqHjQiH.mjs} +85 -45
- package/dist/shared/core.BKlholso.mjs +3 -0
- package/dist/shared/core.BR4zXDH-.mjs +13 -0
- package/dist/shared/{core.yHe79zEl.mjs → core.BYNkXQ8A.mjs} +21 -12
- package/dist/shared/core.BazD6cot.mjs +14 -0
- package/dist/shared/{core.BuoXfSMj.mjs → core.BbE4y-yl.mjs} +1 -1
- package/dist/shared/core.BoYfZOBm.mjs +3 -0
- package/dist/shared/core.BsSXS-_R.mjs +7 -0
- package/dist/shared/{core.T-eLZTW_.mjs → core.BzTakU3I.mjs} +15 -7
- package/dist/shared/{core.4u1dVmfX.mjs → core.C2TiyjI6.mjs} +2 -2
- package/dist/shared/{core.DLpidoWc.mjs → core.C3JowhaZ.mjs} +3 -3
- package/dist/shared/{core.CNGyqkJh.mjs → core.C4x8aaWa.mjs} +3 -1
- package/dist/shared/{core.BB6zA-UU.mjs → core.C8YY6Uub.mjs} +38 -9
- package/dist/shared/{core.FPITT8Vx.mjs → core.C8sl5Y8Z.mjs} +144 -61
- package/dist/shared/{core.DuR3R-xJ.mjs → core.CNgZvKb8.mjs} +3 -5176
- package/dist/shared/{core.BbThmf6M.d.mts → core.CQngdcuj.d.mts} +85 -4
- package/dist/shared/{core.Be1n9a0i.mjs → core.C_Ni6yHl.mjs} +5 -4
- package/dist/shared/core.CbT8JVYL.mjs +5 -0
- package/dist/shared/core.CqAJJpK_.mjs +3 -0
- package/dist/shared/{core.CySf-2gP.d.mts → core.D0PjZzIS.d.mts} +52 -15
- package/dist/shared/{core.DrvfVXkh.d.mts → core.D5fzJWbF.d.mts} +11 -2
- package/dist/shared/{core.DrVOJuxX.d.mts → core.DACpKp35.d.mts} +5 -5
- package/dist/shared/core.DFi2dOTl.mjs +39548 -0
- package/dist/shared/{core.D704WZES.d.mts → core.DIol3syK.d.mts} +2 -2
- package/dist/shared/{core.DlG1xWt2.mjs → core.DMMOWQqc.mjs} +3 -2
- package/dist/shared/core.DNbUPnve.mjs +3990 -0
- package/dist/shared/{core.CCD1ID81.mjs → core.DRJma0Ol.mjs} +4 -3
- package/dist/shared/{core.DgttqsJc.mjs → core.DRhg-gVU.mjs} +9 -9
- package/dist/shared/core.DSO_rTC2.mjs +5322 -0
- package/dist/shared/{core.vWJTxpLV.d.mts → core.D_vkffV4.d.mts} +4 -2
- package/dist/shared/core.DdMJk7nx.d.mts +476 -0
- package/dist/shared/{core.D_fI5Lf6.d.mts → core.Dgs6-nuz.d.mts} +24 -4
- package/dist/shared/{core.Be4Jy9Qx.mjs → core.FZ305VYd.mjs} +2 -2
- package/dist/shared/core.OHD4KXm9.mjs +5 -0
- package/dist/shared/{core.GTgsmXS_.mjs → core.QJD_fcrc.mjs} +2 -2
- package/dist/shared/core.RfnaEmgA.mjs +7 -0
- package/dist/shared/core.fHR_8Tnq.d.mts +450 -0
- package/dist/shared/{core.D0EgVMQK.mjs → core.lRvxPoao.mjs} +14 -12
- package/dist/shared/{core.CaT0SUUK.mjs → core.rCeaAqgW.mjs} +1 -84
- package/dist/shared/{core.kxeJe0OY.d.mts → core.s9uwOt60.d.mts} +4 -4
- package/dist/shared/core.yna0OdV5.d.mts +98 -0
- package/dist/styles/index.d.mts +106 -0
- package/dist/styles/index.mjs +1 -0
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/_aux.mjs +1 -5
- package/dist/types/expression-model.d.mts +3 -4
- package/dist/types/expression.d.mts +3 -4
- package/dist/types/fqnRef.d.mts +2 -2
- package/dist/types/fqnRef.mjs +3 -3
- package/dist/types/index.d.mts +8 -8
- package/dist/types/index.mjs +151 -6
- package/dist/types/scalar.mjs +3 -2
- package/dist/utils/graphology/index.d.mts +1864 -0
- package/dist/utils/graphology/index.mjs +1 -0
- package/dist/utils/index.d.mts +11 -6
- package/dist/utils/index.mjs +21 -37
- package/dist/utils/iterable/index.d.mts +1 -1
- package/dist/utils/iterable/index.mjs +45 -7
- package/model/package.json +4 -0
- package/package.json +42 -24
- package/styles/package.json +4 -0
- package/types/package.json +4 -0
- package/utils/graphology/package.json +4 -0
- package/utils/package.json +4 -0
- package/dist/shared/core.6_Vp2iiN.mjs +0 -172
- package/dist/shared/core.Bpou6c2f.d.mts +0 -850
- package/dist/shared/core.CUw_2J9j.mjs +0 -47
- package/dist/shared/core.CzdwsPmY.d.mts +0 -69
- package/dist/shared/core.DoM6aM9N.mjs +0 -7
- package/dist/shared/core.ILwny7BV.mjs +0 -38
- package/dist/theme/index.d.mts +0 -11
- package/dist/theme/index.mjs +0 -232
- package/src/builder/Builder.deployment.ts +0 -224
- package/src/builder/Builder.deploymentModel.ts +0 -449
- package/src/builder/Builder.element.ts +0 -241
- package/src/builder/Builder.model.ts +0 -494
- package/src/builder/Builder.ts +0 -870
- package/src/builder/Builder.view-common.ts +0 -273
- package/src/builder/Builder.view-deployment.ts +0 -135
- package/src/builder/Builder.view-element.ts +0 -202
- package/src/builder/Builder.views.ts +0 -399
- package/src/builder/Builder.with.ts +0 -156
- package/src/builder/_types.ts +0 -320
- package/src/builder/index.ts +0 -11
- package/src/compute-view/compute-view.ts +0 -80
- package/src/compute-view/deployment-view/_types.ts +0 -38
- package/src/compute-view/deployment-view/clean-connections.ts +0 -236
- package/src/compute-view/deployment-view/compute.ts +0 -94
- package/src/compute-view/deployment-view/memory/index.ts +0 -9
- package/src/compute-view/deployment-view/memory/memory.ts +0 -96
- package/src/compute-view/deployment-view/predicates/deploymentRefs-where.ts +0 -18
- package/src/compute-view/deployment-view/predicates/deploymentRefs.ts +0 -154
- package/src/compute-view/deployment-view/predicates/index.ts +0 -8
- package/src/compute-view/deployment-view/predicates/relation-direct.ts +0 -243
- package/src/compute-view/deployment-view/predicates/relation-in-out.ts +0 -70
- package/src/compute-view/deployment-view/predicates/relation-incoming.ts +0 -101
- package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +0 -95
- package/src/compute-view/deployment-view/predicates/relation-where.ts +0 -18
- package/src/compute-view/deployment-view/predicates/utils.ts +0 -282
- package/src/compute-view/deployment-view/predicates/wildcard.ts +0 -41
- package/src/compute-view/deployment-view/stages/stage-exclude.ts +0 -5
- package/src/compute-view/deployment-view/stages/stage-final.ts +0 -245
- package/src/compute-view/deployment-view/stages/stage-include.ts +0 -95
- package/src/compute-view/deployment-view/utils.ts +0 -286
- package/src/compute-view/dynamic-view/compute.ts +0 -312
- package/src/compute-view/element-view/_types.ts +0 -47
- package/src/compute-view/element-view/clean-connections.ts +0 -117
- package/src/compute-view/element-view/compute.ts +0 -324
- package/src/compute-view/element-view/memory/NodeGroup.ts +0 -31
- package/src/compute-view/element-view/memory/index.ts +0 -10
- package/src/compute-view/element-view/memory/memory.ts +0 -178
- package/src/compute-view/element-view/memory/stage-exclude.ts +0 -59
- package/src/compute-view/element-view/memory/stage-final.ts +0 -129
- package/src/compute-view/element-view/memory/stage-include.ts +0 -130
- package/src/compute-view/element-view/predicates/_utils.ts +0 -91
- package/src/compute-view/element-view/predicates/element-expand.ts +0 -29
- package/src/compute-view/element-view/predicates/element-kind-tag.ts +0 -27
- package/src/compute-view/element-view/predicates/element-ref.ts +0 -24
- package/src/compute-view/element-view/predicates/relation-direct.ts +0 -321
- package/src/compute-view/element-view/predicates/relation-in-out.ts +0 -64
- package/src/compute-view/element-view/predicates/relation-in.ts +0 -115
- package/src/compute-view/element-view/predicates/relation-out.ts +0 -119
- package/src/compute-view/element-view/predicates/wildcard.ts +0 -88
- package/src/compute-view/element-view/utils.ts +0 -65
- package/src/compute-view/index.ts +0 -4
- package/src/compute-view/memory/AbstractMemory.ts +0 -45
- package/src/compute-view/memory/AbstractStageExclude.ts +0 -215
- package/src/compute-view/memory/AbstractStageInclude.ts +0 -200
- package/src/compute-view/memory/_types.ts +0 -148
- package/src/compute-view/memory/index.ts +0 -5
- package/src/compute-view/memory/ops.ts +0 -43
- package/src/compute-view/relationships-view/_types.ts +0 -16
- package/src/compute-view/relationships-view/compute.ts +0 -159
- package/src/compute-view/relationships-view/index.ts +0 -3
- package/src/compute-view/relationships-view/layout.ts +0 -357
- package/src/compute-view/relationships-view/utils.ts +0 -73
- package/src/compute-view/utils/ancestorsOfNode.ts +0 -19
- package/src/compute-view/utils/applyCustomElementProperties.ts +0 -107
- package/src/compute-view/utils/applyCustomRelationProperties.ts +0 -58
- package/src/compute-view/utils/applyViewRuleStyles.ts +0 -73
- package/src/compute-view/utils/buildComputedNodes.ts +0 -153
- package/src/compute-view/utils/buildElementNotations.ts +0 -63
- package/src/compute-view/utils/elementExpressionToPredicate.ts +0 -50
- package/src/compute-view/utils/link-nodes-with-edges.ts +0 -56
- package/src/compute-view/utils/merge-props-from-relationships.ts +0 -161
- package/src/compute-view/utils/relationExpressionToPredicates.ts +0 -55
- package/src/compute-view/utils/resolve-extended-views.ts +0 -85
- package/src/compute-view/utils/resolve-global-rules.ts +0 -88
- package/src/compute-view/utils/topological-sort.ts +0 -256
- package/src/compute-view/utils/view-hash.ts +0 -45
- package/src/compute-view/utils/with-readable-edges.ts +0 -40
- package/src/index.ts +0 -32
- package/src/model/DeploymentElementModel.ts +0 -682
- package/src/model/DeploymentModel.ts +0 -393
- package/src/model/ElementModel.ts +0 -293
- package/src/model/LikeC4Model.ts +0 -882
- package/src/model/RelationModel.ts +0 -152
- package/src/model/connection/Connection.ts +0 -72
- package/src/model/connection/deployment/DeploymentConnectionModel.ts +0 -185
- package/src/model/connection/deployment/find.ts +0 -120
- package/src/model/connection/deployment/index.ts +0 -8
- package/src/model/connection/index.ts +0 -22
- package/src/model/connection/model/ConnectionModel.ts +0 -158
- package/src/model/connection/model/find.ts +0 -117
- package/src/model/connection/model/index.ts +0 -8
- package/src/model/connection/ops.ts +0 -276
- package/src/model/guards.ts +0 -77
- package/src/model/index.ts +0 -72
- package/src/model/types.ts +0 -67
- package/src/model/utils.ts +0 -66
- package/src/model/view/EdgeModel.ts +0 -120
- package/src/model/view/LikeC4ViewModel.ts +0 -361
- package/src/model/view/LikeC4ViewsFolder.ts +0 -151
- package/src/model/view/NodeModel.ts +0 -247
- package/src/theme/element.ts +0 -61
- package/src/theme/index.ts +0 -127
- package/src/theme/relationships.ts +0 -54
- package/src/types/RichText.ts +0 -206
- package/src/types/_aux.ts +0 -291
- package/src/types/_common.ts +0 -80
- package/src/types/const.ts +0 -34
- package/src/types/expression-model.ts +0 -294
- package/src/types/expression.ts +0 -313
- package/src/types/fqnRef.ts +0 -91
- package/src/types/geometry.ts +0 -159
- package/src/types/global.ts +0 -21
- package/src/types/index.ts +0 -42
- package/src/types/model-data.ts +0 -77
- package/src/types/model-deployment.ts +0 -88
- package/src/types/model-dump.ts +0 -79
- package/src/types/model-logical.ts +0 -135
- package/src/types/model-spec.ts +0 -85
- package/src/types/operators.ts +0 -156
- package/src/types/project.ts +0 -14
- package/src/types/scalar.ts +0 -162
- package/src/types/styles.ts +0 -122
- package/src/types/view-changes.ts +0 -32
- package/src/types/view-common.ts +0 -157
- package/src/types/view-computed.ts +0 -118
- package/src/types/view-layouted.ts +0 -98
- package/src/types/view-parsed.deployment.ts +0 -39
- package/src/types/view-parsed.dynamic.ts +0 -89
- package/src/types/view-parsed.element.ts +0 -65
- package/src/types/view.ts +0 -113
- package/src/utils/common-head.ts +0 -22
- package/src/utils/compare-natural.ts +0 -60
- package/src/utils/const.ts +0 -1
- package/src/utils/fqn.ts +0 -302
- package/src/utils/getOrCreate.ts +0 -8
- package/src/utils/guards.ts +0 -9
- package/src/utils/index.ts +0 -68
- package/src/utils/invariant.ts +0 -29
- package/src/utils/iterable/_types.ts +0 -5
- package/src/utils/iterable/filter.ts +0 -55
- package/src/utils/iterable/find.ts +0 -38
- package/src/utils/iterable/first.ts +0 -48
- package/src/utils/iterable/flat.ts +0 -17
- package/src/utils/iterable/head.ts +0 -22
- package/src/utils/iterable/index.ts +0 -15
- package/src/utils/iterable/map.ts +0 -40
- package/src/utils/iterable/reduce.ts +0 -24
- package/src/utils/iterable/some.ts +0 -36
- package/src/utils/iterable/to.ts +0 -19
- package/src/utils/iterable/unique.ts +0 -23
- package/src/utils/markdown/index.ts +0 -2
- package/src/utils/markdown/to-html.ts +0 -32
- package/src/utils/markdown/to-text.ts +0 -14
- package/src/utils/memoize-prop.ts +0 -30
- package/src/utils/mnemonist.ts +0 -9
- package/src/utils/object-hash.ts +0 -14
- package/src/utils/promises.ts +0 -24
- package/src/utils/relations.ts +0 -36
- package/src/utils/set.ts +0 -83
- package/src/utils/string-hash.ts +0 -16
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { a as LikeC4StylesConfig, b as LikeC4Theme, L as LikeC4StyleDefaults, U as ElementColorValues, V as RelationshipColorValues, D as ThemeColor, T as ThemeColorValues, p as TextSize, r as SpacingSize, q as ShapeSize } from './core.CQngdcuj.mjs';
|
|
2
|
+
import { LiteralUnion } from 'type-fest';
|
|
3
|
+
import { j as LikeC4ProjectStylesConfig, F as ComputedNodeStyle } from './core.fHR_8Tnq.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 };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { C as ColorLiteral, T as ThemeColorValues, U as ElementColorValues, V as RelationshipColorValues } from '../shared/core.CQngdcuj.mjs';
|
|
2
|
+
export { s as BorderStyle, B as BorderStyles, Q as Color, J as CustomColor, I as CustomColorDefinitions, u as ElementShape, t as ElementShapes, H as HexColor, L as LikeC4StyleDefaults, a as LikeC4StylesConfig, b as LikeC4Theme, y as RelationshipArrowType, x as RelationshipArrowTypes, v as RelationshipLineType, q as ShapeSize, o as Size, S as Sizes, r as SpacingSize, p as TextSize, D as ThemeColor, z as ThemeColors, M as isCustomColor, G as isThemeColor } from '../shared/core.CQngdcuj.mjs';
|
|
3
|
+
export { L as LikeC4Styles } from '../shared/core.yna0OdV5.mjs';
|
|
4
|
+
import 'type-fest';
|
|
5
|
+
import '../shared/core.Dgs6-nuz.mjs';
|
|
6
|
+
import '../shared/core.D5fzJWbF.mjs';
|
|
7
|
+
import '../shared/core.DX-WYEPA.mjs';
|
|
8
|
+
import '../types/fqnRef.mjs';
|
|
9
|
+
import '../shared/core.fHR_8Tnq.mjs';
|
|
10
|
+
import '../types/expression-model.mjs';
|
|
11
|
+
|
|
12
|
+
declare function computeColorValues(color: ColorLiteral): ThemeColorValues;
|
|
13
|
+
|
|
14
|
+
declare const defaultTheme: {
|
|
15
|
+
colors: {
|
|
16
|
+
amber: {
|
|
17
|
+
elements: ElementColorValues;
|
|
18
|
+
relationships: RelationshipColorValues;
|
|
19
|
+
};
|
|
20
|
+
blue: {
|
|
21
|
+
elements: ElementColorValues;
|
|
22
|
+
relationships: RelationshipColorValues;
|
|
23
|
+
};
|
|
24
|
+
gray: {
|
|
25
|
+
elements: ElementColorValues;
|
|
26
|
+
relationships: RelationshipColorValues;
|
|
27
|
+
};
|
|
28
|
+
slate: {
|
|
29
|
+
elements: ElementColorValues;
|
|
30
|
+
relationships: RelationshipColorValues;
|
|
31
|
+
};
|
|
32
|
+
green: {
|
|
33
|
+
elements: ElementColorValues;
|
|
34
|
+
relationships: RelationshipColorValues;
|
|
35
|
+
};
|
|
36
|
+
indigo: {
|
|
37
|
+
elements: ElementColorValues;
|
|
38
|
+
relationships: RelationshipColorValues;
|
|
39
|
+
};
|
|
40
|
+
muted: {
|
|
41
|
+
elements: ElementColorValues;
|
|
42
|
+
relationships: RelationshipColorValues;
|
|
43
|
+
};
|
|
44
|
+
primary: {
|
|
45
|
+
elements: ElementColorValues;
|
|
46
|
+
relationships: RelationshipColorValues;
|
|
47
|
+
};
|
|
48
|
+
red: {
|
|
49
|
+
elements: ElementColorValues;
|
|
50
|
+
relationships: RelationshipColorValues;
|
|
51
|
+
};
|
|
52
|
+
secondary: {
|
|
53
|
+
elements: ElementColorValues;
|
|
54
|
+
relationships: RelationshipColorValues;
|
|
55
|
+
};
|
|
56
|
+
sky: {
|
|
57
|
+
elements: ElementColorValues;
|
|
58
|
+
relationships: RelationshipColorValues;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
sizes: {
|
|
62
|
+
xs: {
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
};
|
|
66
|
+
sm: {
|
|
67
|
+
width: number;
|
|
68
|
+
height: number;
|
|
69
|
+
};
|
|
70
|
+
md: {
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
};
|
|
74
|
+
lg: {
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
};
|
|
78
|
+
xl: {
|
|
79
|
+
width: number;
|
|
80
|
+
height: number;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
spacing: {
|
|
84
|
+
xs: number;
|
|
85
|
+
sm: number;
|
|
86
|
+
md: number;
|
|
87
|
+
lg: number;
|
|
88
|
+
xl: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Text sizes for titles
|
|
92
|
+
* https://typescale.com/
|
|
93
|
+
*
|
|
94
|
+
* Scale: 1.2
|
|
95
|
+
* Base: 16px
|
|
96
|
+
*/
|
|
97
|
+
textSizes: {
|
|
98
|
+
xs: number;
|
|
99
|
+
sm: number;
|
|
100
|
+
md: number;
|
|
101
|
+
lg: number;
|
|
102
|
+
xl: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export { ColorLiteral, ElementColorValues, RelationshipColorValues, ThemeColorValues, computeColorValues, defaultTheme };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { B as BorderStyles, E as ElementShapes, L as LikeC4Styles, R as RelationshipArrowTypes, S as Sizes, T as ThemeColors, c as computeColorValues, b as defaultTheme, f as isCustomColor, i as isThemeColor } from '../shared/core.DNbUPnve.mjs';
|
package/dist/types/_aux.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'type-fest';
|
|
2
|
-
import '../shared/core.
|
|
3
|
-
export {
|
|
2
|
+
import '../shared/core.D5fzJWbF.mjs';
|
|
3
|
+
export { l as AllKinds, A as Any, A as AnyAux, Q as AnySpec, a as Aux, s as DeploymentFqn, D as DeploymentId, t as DeploymentKind, v as EdgeId, k as ElementId, j as ElementKind, F as Fqn, C as LooseDeploymentId, a8 as LooseDeploymentKind, B as LooseElementId, a7 as LooseElementKind, a9 as LooseRelationKind, L as LooseTag, a6 as LooseTags, K as LooseViewId, y as Metadata, u as MetadataKey, w as Never, N as NodeId, a5 as OrString, X as PickByStage, P as ProjectId, z as RelationId, R as RelationKind, Z as Spec, S as SpecAux, I as Stage, s as StrictDeploymentFqn, a2 as StrictDeploymentKind, a1 as StrictElementKind, F as StrictFqn, $ as StrictProjectId, a3 as StrictRelationKind, a0 as StrictTag, h as StrictViewId, T as Tag, m as Tags, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, V as ViewId, W as WithDescriptionAndTech, a4 as WithLinks, q as WithMetadata, r as WithNotation, o as WithOptionalLinks, n as WithOptionalTags, x as WithTags, p as preferDescription, e as preferSummary, O as setProject, Y as setStage, G as toComputed, H as toLayouted, J as toParsed } from '../shared/core.Dgs6-nuz.mjs';
|
|
4
4
|
import '../shared/core.DX-WYEPA.mjs';
|
package/dist/types/_aux.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { W as WhereOperator, Q as Color, v as RelationshipLineType, y as RelationshipArrowType, P as PredicateSelector, u as ElementShape, s as BorderStyle, q as ShapeSize } from '../shared/core.CQngdcuj.mjs';
|
|
2
|
+
import { A as Any, h as StrictViewId, j as ElementKind, T as Tag } from '../shared/core.Dgs6-nuz.mjs';
|
|
3
|
+
import { E as ExclusiveUnion } from '../shared/core.D5fzJWbF.mjs';
|
|
4
4
|
import { FqnRef } from './fqnRef.mjs';
|
|
5
5
|
import { M as MarkdownOrString, I as Icon } from '../shared/core.DX-WYEPA.mjs';
|
|
6
|
-
import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize } from '../shared/core.CzdwsPmY.mjs';
|
|
7
6
|
import 'type-fest';
|
|
8
7
|
|
|
9
8
|
type AnyAux = Any;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import '../shared/core.
|
|
1
|
+
export { E as Expression, F as FqnExpr, P as PredicateSelector, R as RelationExpr } from '../shared/core.CQngdcuj.mjs';
|
|
2
|
+
import '../shared/core.Dgs6-nuz.mjs';
|
|
3
|
+
import '../shared/core.D5fzJWbF.mjs';
|
|
3
4
|
import './fqnRef.mjs';
|
|
4
|
-
export { E as Expression, F as FqnExpr, P as PredicateSelector, R as RelationExpr } from '../shared/core.BbThmf6M.mjs';
|
|
5
5
|
import '../shared/core.DX-WYEPA.mjs';
|
|
6
|
-
import '../shared/core.CzdwsPmY.mjs';
|
|
7
6
|
import 'type-fest';
|
package/dist/types/fqnRef.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Any, U as Unknown$1,
|
|
2
|
-
import { E as ExclusiveUnion } from '../shared/core.
|
|
1
|
+
import { A as Any, U as Unknown$1, k as ElementId, P as ProjectId, F as Fqn, D as DeploymentId } from '../shared/core.Dgs6-nuz.mjs';
|
|
2
|
+
import { E as ExclusiveUnion } from '../shared/core.D5fzJWbF.mjs';
|
|
3
3
|
import 'type-fest';
|
|
4
4
|
import '../shared/core.DX-WYEPA.mjs';
|
|
5
5
|
|
package/dist/types/fqnRef.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GlobalFqn } from '../shared/core.
|
|
1
|
+
import { e } from '../shared/core.CqAJJpK_.mjs';
|
|
2
|
+
import { a as GlobalFqn } from '../shared/core.C_Ni6yHl.mjs';
|
|
3
3
|
|
|
4
4
|
var FqnRef;
|
|
5
5
|
((FqnRef2) => {
|
|
@@ -12,7 +12,7 @@ var FqnRef;
|
|
|
12
12
|
}
|
|
13
13
|
FqnRef2.isImportRef = isImportRef;
|
|
14
14
|
function flatten(ref) {
|
|
15
|
-
if (
|
|
15
|
+
if (e(ref)) {
|
|
16
16
|
throw new Error(`Expected FqnRef, got: "${ref}"`);
|
|
17
17
|
}
|
|
18
18
|
if (isImportRef(ref)) {
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { N as NonEmptyArray } from '../shared/core.
|
|
2
|
-
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray } from '../shared/core.
|
|
3
|
-
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed,
|
|
4
|
-
|
|
1
|
+
import { N as NonEmptyArray } from '../shared/core.D5fzJWbF.mjs';
|
|
2
|
+
export { C as Coalesce, E as ExclusiveUnion, I as IterableContainer, c as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate, R as ReorderedArray, e as exact } from '../shared/core.D5fzJWbF.mjs';
|
|
3
|
+
export { A as Any, A as AnyAux, a as Aux, E as ExtractOnStage, M as ModelStage, S as SpecAux, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, f as _stage, g as _type, _ as aux, i as isOnStage, p as preferDescription, e as preferSummary } from '../shared/core.Dgs6-nuz.mjs';
|
|
4
|
+
import { s as BorderStyle, u as ElementShape, D as ThemeColor } from '../shared/core.CQngdcuj.mjs';
|
|
5
|
+
export { A as AndOperator, B as BorderStyles, Q as Color, C as ColorLiteral, J as CustomColor, I as CustomColorDefinitions, U as ElementColorValues, t as ElementShapes, c as EqualOperator, E as Expression, m as Filterable, F as FqnExpr, H as HexColor, K as KindEqual, L as LikeC4StyleDefaults, a as LikeC4StylesConfig, b as LikeC4Theme, N as NotOperator, n as OperatorPredicate, O as OrOperator, f as Participant, g as ParticipantOperator, P as PredicateSelector, R as RelationExpr, y as RelationshipArrowType, x as RelationshipArrowTypes, V as RelationshipColorValues, v as RelationshipLineType, q as ShapeSize, o as Size, S as Sizes, r as SpacingSize, d as TagEqual, p as TextSize, T as ThemeColorValues, z as ThemeColors, W as WhereOperator, k as isAndOperator, M as isCustomColor, e as isKindEqual, j as isNotOperator, l as isOrOperator, h as isParticipantOperator, i as isTagEqual, G as isThemeColor, w as whereOperatorAsPredicate } from '../shared/core.CQngdcuj.mjs';
|
|
5
6
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './expression-model.mjs';
|
|
6
7
|
export { FqnRef } from './fqnRef.mjs';
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
8
|
+
import { w as ViewManualLayout, r as AutoLayoutDirection } from '../shared/core.fHR_8Tnq.mjs';
|
|
9
|
+
export { A as AbstractRelationship, m as AnyExcludePredicate, l as AnyIncludePredicate, n as AnyViewRuleStyle, B as BBox, z as BaseParsedViewProperties, y as BaseViewProperties, K as ComputedDeploymentView, O as ComputedDynamicView, I as ComputedEdge, J as ComputedElementView, H as ComputedNode, F as ComputedNodeStyle, Q as DynamicStep, T as DynamicStepsParallel, S as DynamicStepsSeries, a1 as DynamicViewDisplayVariant, $ as DynamicViewIncludeRule, a0 as DynamicViewRule, W as DynamicViewStep, f as Element, E as ElementStyle, a4 as ElementViewExcludePredicate, a3 as ElementViewIncludePredicate, a5 as ElementViewPredicate, a9 as ElementViewRule, a6 as ElementViewRuleGroup, a8 as ElementViewRuleStyle, b as GlobalDynamicPredicates, G as GlobalPredicateId, a as GlobalPredicates, c as GlobalStyleID, d as GlobalStyles, k as LikeC4Project, i as LikeC4ProjectStyleDefaults, j as LikeC4ProjectStylesConfig, L as LikeC4ProjectTheme, M as ModelGlobals, h as ModelRelation, N as NodeNotation, a2 as ParsedDynamicView, aa as ParsedElementView, P as Point, R as RectBox, g as Relationship, v as ViewAutoLayout, t as ViewRuleAutoLayout, p as ViewRuleGlobalPredicateRef, V as ViewRuleGlobalStyle, x as ViewType, D as ViewWithHash, C as ViewWithNotation, X as XYPoint, e as ensureSizes, U as getParallelStepsPrefix, s as isAutoLayoutDirection, Y as isDynamicStep, Z as isDynamicStepsParallel, _ as isDynamicStepsSeries, u as isViewRuleAutoLayout, q as isViewRuleGlobalPredicateRef, o as isViewRuleGlobalStyle, a7 as isViewRuleGroup } from '../shared/core.fHR_8Tnq.mjs';
|
|
10
|
+
export { w as AnyView, n as AuxFromDump, A as AuxFromLikeC4ModelData, C as ComputedLikeC4ModelData, u as ComputedView, d as DeployedInstance, e as DeploymentElement, f as DeploymentElementRef, D as DeploymentNode, j as DeploymentRelation, h as DeploymentRelationship, Y as DeploymentViewExcludePredicate, X as DeploymentViewIncludePredicate, Z as DeploymentViewPredicate, $ as DeploymentViewRule, _ as DeploymentViewRuleStyle, O as DiagramEdge, N as DiagramNode, s as DiagramView, E as ElementSpecification, U as LayoutedDeploymentView, W as LayoutedDynamicView, Q as LayoutedElementView, L as LayoutedLikeC4ModelData, s as LayoutedView, c as LikeC4ModelData, l as LikeC4ModelDump, r as LikeC4View, a0 as ParsedDeploymentView, P as ParsedLikeC4ModelData, r as ParsedView, v as ProcessedView, m as ProjectDump, p as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, k as SpecTypesFromDump, q as Specification, S as SpecificationDump, T as TagSpecification, V as ViewOnStage, y as ViewRule, z as ViewRulePredicate, x as ViewWithType, G as isComputedView, g as isDeployedInstance, i as isDeploymentNode, K as isDeploymentView, t as isDiagramView, M as isDynamicView, H as isElementView, J as isExtendsElementView, t as isLayoutedView, I as isScopedElementView, o as isTagColorSpecified, B as isViewRulePredicate, F as isViewRuleStyle } from '../shared/core.DdMJk7nx.mjs';
|
|
9
11
|
import { F as Fqn, D as DeploymentFqn } from '../shared/core.DX-WYEPA.mjs';
|
|
10
12
|
export { A as AnyFqn, B as BuiltInIcon, b as DeploymentKind, j as EdgeId, E as ElementKind, e as GlobalFqn, G as GroupElementKind, I as Icon, a as IconUrl, M as MarkdownOrString, N as NodeId, P as ProjectId, d as RelationId, R as RelationKind, c as RelationshipKind, k as StepEdgeId, S as StepEdgeIdLiteral, m as StepEdgeKind, T as Tag, V as ViewId, o as extractStep, f as flattenMarkdownOrString, g as isGlobalFqn, i as isGroupElementKind, n as isStepEdgeId, s as scalar, h as splitGlobalFqn, l as stepEdgeId } from '../shared/core.DX-WYEPA.mjs';
|
|
11
|
-
import { b as BorderStyle, c as ElementShape, h as ThemeColor } from '../shared/core.CzdwsPmY.mjs';
|
|
12
|
-
export { B as BorderStyles, i as Color, C as ColorLiteral, d as CustomColor, e as CustomColorDefinitions, E as ElementShapes, k as ElementThemeColorValues, l as ElementThemeColors, H as HexColor, L as LikeC4Theme, f as RelationshipArrowType, R as RelationshipLineType, m as RelationshipThemeColorValues, o as RelationshipThemeColors, a as ShapeSize, S as SpacingSize, T as TextSize, n as ThemeColorValues, g as ThemeColors, j as isThemeColor } from '../shared/core.CzdwsPmY.mjs';
|
|
13
13
|
import 'type-fest';
|
|
14
14
|
|
|
15
15
|
declare namespace ViewChange {
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,9 +1,154 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { _ as
|
|
1
|
+
export { R as RichText, e as exact } from '../shared/core.01VTr9qu.mjs';
|
|
2
|
+
export { _ as aux, p as preferDescription, a as preferSummary } from '../shared/core.BazD6cot.mjs';
|
|
3
|
+
export { _ as _stage, a as _type, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, d as isTagEqual, w as whereOperatorAsPredicate } from '../shared/core.BYNkXQ8A.mjs';
|
|
3
4
|
export { Expression, FqnExpr, RelationExpr } from './expression.mjs';
|
|
4
5
|
export { ModelExpression, ModelFqnExpr, ModelRelationExpr } from './expression-model.mjs';
|
|
5
6
|
export { FqnRef } from './fqnRef.mjs';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
7
|
+
import { a as t } from '../shared/core.BsSXS-_R.mjs';
|
|
8
|
+
import { i as invariant } from '../shared/core.D4npX2q8.mjs';
|
|
9
|
+
export { e as ensureSizes } from '../shared/core.DNbUPnve.mjs';
|
|
10
|
+
export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, s as scalar, c as splitGlobalFqn, d as stepEdgeId } from '../shared/core.C_Ni6yHl.mjs';
|
|
11
|
+
export { n as getParallelStepsPrefix, l as isAutoLayoutDirection, b as isComputedView, g as isDeploymentView, c as isDiagramView, o as isDynamicStep, p as isDynamicStepsParallel, q as isDynamicStepsSeries, h as isDynamicView, d as isElementView, f as isExtendsElementView, c as isLayoutedView, e as isScopedElementView, m as isViewRuleAutoLayout, k as isViewRuleGlobalPredicateRef, j as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, a as isViewRuleStyle } from '../shared/core.BzTakU3I.mjs';
|
|
12
|
+
|
|
13
|
+
var BBox;
|
|
14
|
+
((BBox2) => {
|
|
15
|
+
function center({ x, y, width, height }) {
|
|
16
|
+
return {
|
|
17
|
+
x: x + width / 2,
|
|
18
|
+
y: y + height / 2
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
BBox2.center = center;
|
|
22
|
+
function fromPoints(points) {
|
|
23
|
+
const { x1, y1, x2, y2 } = RectBox.fromPoints(points);
|
|
24
|
+
return {
|
|
25
|
+
x: x1,
|
|
26
|
+
y: y1,
|
|
27
|
+
width: x2 - x1,
|
|
28
|
+
height: y2 - y1
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
BBox2.fromPoints = fromPoints;
|
|
32
|
+
function merge(...boxes) {
|
|
33
|
+
invariant(t(boxes, 1), "No boxes provided");
|
|
34
|
+
if (boxes.length === 1) {
|
|
35
|
+
return boxes[0];
|
|
36
|
+
}
|
|
37
|
+
let minX = Infinity;
|
|
38
|
+
let minY = Infinity;
|
|
39
|
+
let maxX = -Infinity;
|
|
40
|
+
let maxY = -Infinity;
|
|
41
|
+
for (const box of boxes) {
|
|
42
|
+
minX = Math.min(minX, box.x);
|
|
43
|
+
minY = Math.min(minY, box.y);
|
|
44
|
+
maxX = Math.max(maxX, box.x + box.width);
|
|
45
|
+
maxY = Math.max(maxY, box.y + box.height);
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
x: minX,
|
|
49
|
+
y: minY,
|
|
50
|
+
width: maxX - minX,
|
|
51
|
+
height: maxY - minY
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
BBox2.merge = merge;
|
|
55
|
+
function toRectBox(box) {
|
|
56
|
+
return {
|
|
57
|
+
x1: box.x,
|
|
58
|
+
y1: box.y,
|
|
59
|
+
x2: box.x + box.width,
|
|
60
|
+
y2: box.y + box.height
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
BBox2.toRectBox = toRectBox;
|
|
64
|
+
function expand(box, plus) {
|
|
65
|
+
if (plus === 0) {
|
|
66
|
+
return box;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
x: box.x - plus,
|
|
70
|
+
y: box.y - plus,
|
|
71
|
+
width: box.width + plus * 2,
|
|
72
|
+
height: box.height + plus * 2
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
BBox2.expand = expand;
|
|
76
|
+
function shrink(box, minus) {
|
|
77
|
+
if (minus === 0) {
|
|
78
|
+
return box;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
x: box.x + minus,
|
|
82
|
+
y: box.y + minus,
|
|
83
|
+
width: box.width - minus * 2,
|
|
84
|
+
height: box.height - minus * 2
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
BBox2.shrink = shrink;
|
|
88
|
+
})(BBox || (BBox = {}));
|
|
89
|
+
var RectBox;
|
|
90
|
+
((RectBox2) => {
|
|
91
|
+
function center({ x1, y1, x2, y2 }) {
|
|
92
|
+
return {
|
|
93
|
+
x: (x1 + x2) / 2,
|
|
94
|
+
y: (y1 + y2) / 2
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
RectBox2.center = center;
|
|
98
|
+
function fromPoints(points) {
|
|
99
|
+
invariant(points.length > 0, "At least one point is required");
|
|
100
|
+
let minX = Infinity;
|
|
101
|
+
let minY = Infinity;
|
|
102
|
+
let maxX = -Infinity;
|
|
103
|
+
let maxY = -Infinity;
|
|
104
|
+
for (const [x, y] of points) {
|
|
105
|
+
minX = Math.min(minX, x);
|
|
106
|
+
minY = Math.min(minY, y);
|
|
107
|
+
maxX = Math.max(maxX, x);
|
|
108
|
+
maxY = Math.max(maxY, y);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
x1: minX,
|
|
112
|
+
y1: minY,
|
|
113
|
+
x2: maxX,
|
|
114
|
+
y2: maxY
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
RectBox2.fromPoints = fromPoints;
|
|
118
|
+
function merge(...boxes) {
|
|
119
|
+
invariant(boxes.length > 0, "No boxes provided");
|
|
120
|
+
let minX = Infinity;
|
|
121
|
+
let minY = Infinity;
|
|
122
|
+
let maxX = -Infinity;
|
|
123
|
+
let maxY = -Infinity;
|
|
124
|
+
for (const box of boxes) {
|
|
125
|
+
minX = Math.min(minX, box.x1);
|
|
126
|
+
minY = Math.min(minY, box.y1);
|
|
127
|
+
maxX = Math.max(maxX, box.x2);
|
|
128
|
+
maxY = Math.max(maxY, box.y2);
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
x1: minX,
|
|
132
|
+
y1: minY,
|
|
133
|
+
x2: maxX,
|
|
134
|
+
y2: maxY
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
RectBox2.merge = merge;
|
|
138
|
+
function toBBox(box) {
|
|
139
|
+
return {
|
|
140
|
+
x: box.x1,
|
|
141
|
+
y: box.y1,
|
|
142
|
+
width: box.x2 - box.x1,
|
|
143
|
+
height: box.y2 - box.y1
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
RectBox2.toBBox = toBBox;
|
|
147
|
+
})(RectBox || (RectBox = {}));
|
|
148
|
+
|
|
149
|
+
function isTagColorSpecified(spec) {
|
|
150
|
+
const color = typeof spec === "string" ? spec : spec.color;
|
|
151
|
+
return color.startsWith("#") || color.startsWith("rgb");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export { BBox, RectBox, isTagColorSpecified };
|
package/dist/types/scalar.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import '../shared/core.CqAJJpK_.mjs';
|
|
2
|
+
import '../shared/core.BKlholso.mjs';
|
|
2
3
|
import '../shared/core.D4npX2q8.mjs';
|
|
3
|
-
export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, c as splitGlobalFqn, d as stepEdgeId } from '../shared/core.
|
|
4
|
+
export { D as DeploymentFqn, E as EdgeId, F as Fqn, a as GlobalFqn, G as GroupElementKind, N as NodeId, P as ProjectId, R as RelationId, S as StepEdgeKind, V as ViewId, g as extractStep, f as flattenMarkdownOrString, b as isGlobalFqn, i as isGroupElementKind, e as isStepEdgeId, c as splitGlobalFqn, d as stepEdgeId } from '../shared/core.C_Ni6yHl.mjs';
|