@likec4/core 1.32.2 → 1.33.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/dist/builder/index.d.mts +6 -4
- package/dist/builder/index.mjs +45 -13
- package/dist/compute-view/index.d.mts +6 -4
- package/dist/compute-view/index.mjs +33 -10
- package/dist/compute-view/relationships-view/index.d.mts +6 -4
- package/dist/compute-view/relationships-view/index.mjs +6 -3
- package/dist/index.d.mts +9 -138
- package/dist/index.mjs +31 -3712
- package/dist/model/connection/deployment/index.d.mts +10 -0
- package/dist/model/connection/deployment/index.mjs +18 -0
- package/dist/model/connection/index.d.mts +70 -0
- package/dist/model/connection/index.mjs +23 -0
- package/dist/model/connection/model/index.d.mts +10 -0
- package/dist/model/connection/model/index.mjs +11 -0
- package/dist/model/index.d.mts +14 -256
- package/dist/model/index.mjs +27 -5
- package/dist/shared/{core.Bdz6fBF1.d.mts → core.1pNeDdRk.d.mts} +92 -81
- package/dist/shared/{core.BuO4ncfY.d.mts → core.668kXpZq.d.mts} +42 -52
- package/dist/shared/core.8KM0D6va.mjs +33 -0
- package/dist/shared/core.B0oEIXqd.mjs +47 -0
- package/dist/shared/core.BH9nN-_I.mjs +22 -0
- package/dist/shared/core.BMCb0wJI.mjs +177 -0
- package/dist/shared/core.BTnf14gD.mjs +331 -0
- package/dist/shared/core.BgvIuGGU.mjs +3 -0
- package/dist/shared/core.BoyJPEen.mjs +21 -0
- package/dist/shared/{core.CUYDgv2-.mjs → core.Br7Fab9l.mjs} +12 -15
- package/dist/shared/{core.BrCnZFTn.mjs → core.Btl47GOn.mjs} +3 -3
- package/dist/shared/core.ByrmCl9I.mjs +5 -0
- package/dist/shared/core.C80Z37Eu.mjs +29 -0
- package/dist/shared/{core.Pf5I9o0e.d.mts → core.CF82MWyh.d.mts} +1 -1
- package/dist/shared/{core.rmvsy0n3.mjs → core.C_C-3c1S.mjs} +5 -198
- package/dist/shared/core.CeQbbp7K.d.mts +41 -0
- package/dist/shared/{core.DoK86JEe.mjs → core.CpwrZi3D.mjs} +2 -73
- package/dist/shared/{core.CpXlRyE5.mjs → core.CtKXPqN_.mjs} +5 -36
- package/dist/shared/core.CxGKeL-L.mjs +144 -0
- package/dist/shared/core.CzdwsPmY.d.mts +69 -0
- package/dist/shared/{core.Cy9smucx.mjs → core.D4npX2q8.mjs} +1 -3
- package/dist/shared/core.D56nCp7e.mjs +168 -0
- package/dist/shared/core.D5qVzkws.mjs +724 -0
- package/dist/shared/core.DDAPzd3T.d.mts +87 -0
- package/dist/shared/{core.CBpKAlhj.mjs → core.DDynPqbh.mjs} +96 -56
- package/dist/shared/{core.Bk7wEZFG.mjs → core.DXRAwwDB.mjs} +3 -2
- package/dist/shared/core.DcS-0zys.mjs +10 -0
- package/dist/shared/{core.CBxTtXMi.d.mts → core.De___iBS.d.mts} +3 -2
- package/dist/shared/core.DsMrjY2q.mjs +34 -0
- package/dist/shared/core.DuSLYTG6.d.mts +57 -0
- package/dist/shared/core.Dy-F3xRP.d.mts +83 -0
- package/dist/shared/{core.DaAyklhe.d.mts → core.OLInHaJx.d.mts} +30 -22
- package/dist/shared/core.XptQjhMA.mjs +1295 -0
- package/dist/shared/{core.cbA9VZ02.mjs → core.hoq9W4rW.mjs} +28 -1073
- package/dist/shared/core.zLlww-07.mjs +3 -0
- package/dist/theme/index.d.mts +134 -0
- package/dist/theme/index.mjs +3709 -0
- package/dist/types/aux.d.mts +3 -2
- package/dist/types/index.d.mts +9 -5
- package/dist/types/index.mjs +17 -146
- package/dist/utils/index.d.mts +15 -100
- package/dist/utils/index.mjs +25 -1315
- package/dist/utils/iterable/index.d.mts +100 -0
- package/dist/utils/iterable/index.mjs +24 -0
- package/package.json +23 -7
- package/src/builder/Builder.ts +13 -4
- package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -13
- package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +2 -6
- package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -7
- package/src/compute-view/deployment-view/__test__/fixture.ts +15 -5
- package/src/compute-view/deployment-view/utils.ts +13 -13
- package/src/compute-view/dynamic-view/compute.ts +2 -1
- package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +2 -2
- package/src/compute-view/relationships-view/layout.ts +1 -1
- package/src/compute-view/utils/applyCustomElementProperties.ts +8 -0
- package/src/compute-view/utils/applyCustomRelationProperties.ts +2 -0
- package/src/compute-view/utils/buildComputedNodes.ts +4 -3
- package/src/compute-view/utils/merge-props-from-relationships.ts +6 -5
- package/src/compute-view/utils/view-hash.ts +24 -3
- package/src/model/DeploymentElementModel.ts +20 -16
- package/src/model/ElementModel.ts +9 -3
- package/src/model/RelationModel.ts +19 -16
- package/src/model/index.ts +2 -0
- package/src/model/types.ts +1 -0
- package/src/model/view/EdgeModel.ts +4 -3
- package/src/model/view/LikeC4ViewModel.ts +5 -0
- package/src/model/view/NodeModel.ts +4 -2
- package/src/theme/index.ts +12 -5
- package/src/types/RichText.ts +200 -0
- package/src/types/index.ts +2 -0
- package/src/types/model-deployment.ts +4 -3
- package/src/types/model-logical.ts +3 -3
- package/src/types/scalar.ts +47 -2
- package/src/types/view-common.ts +1 -1
- package/src/types/view-computed.ts +2 -4
- package/src/types/view-layouted.ts +9 -0
- package/src/utils/index.ts +4 -9
- package/src/utils/markdown/index.ts +2 -0
- package/src/utils/markdown/to-html.ts +32 -0
- package/src/utils/markdown/to-text.ts +14 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { A as Any, U as Unknown, g as ElementId, P as ProjectId, F as Fqn,
|
|
1
|
+
import { Simplify, MergeExclusive, Tagged, NonEmptyTuple, IsNever, IsAny } from 'type-fest';
|
|
2
|
+
import { E as ExclusiveUnion, N as NonEmptyArray, L as Link, K as KeysOf } from './core.DuSLYTG6.mjs';
|
|
3
|
+
import { A as Any, U as Unknown, g as ElementId, P as ProjectId, F as Fqn, s as DeploymentId, u as Tag, x as AllKinds, T as Tags, m as StrictViewId, k as ElementKind, W as WithOptionalTags, y as WithOptionalLinks, _ as _stage, f as _type, z as WithMetadata, h as Metadata, R as RelationKind, V as ViewId, p as DeploymentFqn, D as DeploymentKind, j as MetadataKey, E as ExtractOnStage, M as ModelStage, e as UnknownParsed, c as UnknownComputed, d as UnknownLayouted, S as SpecAux, b as Aux, N as Never } from './core.De___iBS.mjs';
|
|
4
|
+
import { I as Icon, M as MarkdownOrString, d as RelationId, T as Tag$1, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.668kXpZq.mjs';
|
|
5
|
+
import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize, S as SpacingSize, T as TextSize, h as ThemeColor, C as ColorLiteral, e as CustomColorDefinitions } from './core.CzdwsPmY.mjs';
|
|
4
6
|
|
|
5
7
|
declare namespace FqnRef {
|
|
6
8
|
/**
|
|
@@ -107,72 +109,6 @@ type Filterable<A extends Any> = {
|
|
|
107
109
|
type OperatorPredicate<A extends Any> = (value: Filterable<A>) => boolean;
|
|
108
110
|
declare function whereOperatorAsPredicate<A extends Any>(operator: WhereOperator<A>): OperatorPredicate<A>;
|
|
109
111
|
|
|
110
|
-
/**
|
|
111
|
-
* For padding, margin, etc.
|
|
112
|
-
*/
|
|
113
|
-
type SpacingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
114
|
-
type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
115
|
-
type ShapeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
116
|
-
declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
|
|
117
|
-
type BorderStyle = TupleToUnion<typeof BorderStyles>;
|
|
118
|
-
declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
|
|
119
|
-
type ElementShape = TupleToUnion<typeof ElementShapes>;
|
|
120
|
-
type HexColor = `#${string}`;
|
|
121
|
-
type ColorLiteral = HexColor | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})`;
|
|
122
|
-
type CustomColor<T = string> = Tagged<T, 'CustomColor'>;
|
|
123
|
-
type CustomColorDefinitions = {
|
|
124
|
-
[key: string]: ThemeColorValues;
|
|
125
|
-
};
|
|
126
|
-
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
127
|
-
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
128
|
-
declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
|
|
129
|
-
type ThemeColor = typeof ThemeColors[number];
|
|
130
|
-
/**
|
|
131
|
-
* Backward compatibility alias
|
|
132
|
-
* @deprecated Use {@link ThemeColor} instead
|
|
133
|
-
*/
|
|
134
|
-
type Color = ThemeColor | ColorLiteral;
|
|
135
|
-
declare function isThemeColor(color: string): color is ThemeColor;
|
|
136
|
-
interface ElementThemeColorValues {
|
|
137
|
-
fill: ColorLiteral;
|
|
138
|
-
stroke: ColorLiteral;
|
|
139
|
-
hiContrast: ColorLiteral;
|
|
140
|
-
loContrast: ColorLiteral;
|
|
141
|
-
}
|
|
142
|
-
type ElementThemeColors = {
|
|
143
|
-
[key in ThemeColor]: ElementThemeColorValues;
|
|
144
|
-
};
|
|
145
|
-
interface RelationshipThemeColorValues {
|
|
146
|
-
lineColor: ColorLiteral;
|
|
147
|
-
labelBgColor: ColorLiteral;
|
|
148
|
-
labelColor: ColorLiteral;
|
|
149
|
-
}
|
|
150
|
-
interface ThemeColorValues {
|
|
151
|
-
elements: ElementThemeColorValues;
|
|
152
|
-
relationships: RelationshipThemeColorValues;
|
|
153
|
-
}
|
|
154
|
-
type RelationshipThemeColors = {
|
|
155
|
-
[key in ThemeColor]: RelationshipThemeColorValues;
|
|
156
|
-
};
|
|
157
|
-
interface LikeC4Theme {
|
|
158
|
-
font: 'Arial';
|
|
159
|
-
shadow: ColorLiteral;
|
|
160
|
-
relationships: RelationshipThemeColors;
|
|
161
|
-
elements: ElementThemeColors;
|
|
162
|
-
sizes: {
|
|
163
|
-
[key in ShapeSize]: {
|
|
164
|
-
width: number;
|
|
165
|
-
height: number;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
spacing: {
|
|
169
|
-
[key in SpacingSize]: number;
|
|
170
|
-
};
|
|
171
|
-
textSizes: {
|
|
172
|
-
[key in TextSize]: number;
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
112
|
type PredicateSelector = 'children' | 'expanded' | 'descendants';
|
|
177
113
|
declare namespace FqnExpr {
|
|
178
114
|
type Wildcard = {
|
|
@@ -646,7 +582,7 @@ type ViewType = 'element' | 'dynamic' | 'deployment';
|
|
|
646
582
|
interface BaseViewProperties<A extends Any> extends WithOptionalTags<A>, WithOptionalLinks {
|
|
647
583
|
readonly id: StrictViewId<A>;
|
|
648
584
|
readonly title: string | null;
|
|
649
|
-
readonly description:
|
|
585
|
+
readonly description: MarkdownOrString | null;
|
|
650
586
|
/**
|
|
651
587
|
* For all views we find common ancestor path.
|
|
652
588
|
* This is used to generate relative paths, i.e.:
|
|
@@ -809,7 +745,7 @@ interface Element<A extends Any = Any> extends WithOptionalTags<A>, WithOptional
|
|
|
809
745
|
readonly id: Fqn<A>;
|
|
810
746
|
readonly kind: ElementKind<A>;
|
|
811
747
|
readonly title: string;
|
|
812
|
-
readonly description?:
|
|
748
|
+
readonly description?: MarkdownOrString | null;
|
|
813
749
|
readonly technology?: string | null;
|
|
814
750
|
readonly tags?: Tags<A> | null;
|
|
815
751
|
readonly links?: readonly Link[] | null;
|
|
@@ -817,7 +753,7 @@ interface Element<A extends Any = Any> extends WithOptionalTags<A>, WithOptional
|
|
|
817
753
|
readonly shape?: ElementShape;
|
|
818
754
|
readonly color?: Color;
|
|
819
755
|
readonly style?: ElementStyle;
|
|
820
|
-
readonly notation?: string;
|
|
756
|
+
readonly notation?: string | null;
|
|
821
757
|
readonly metadata?: Metadata<A>;
|
|
822
758
|
}
|
|
823
759
|
declare const DefaultLineStyle: RelationshipLineType;
|
|
@@ -826,7 +762,7 @@ declare const DefaultRelationshipColor: ThemeColor;
|
|
|
826
762
|
interface AbstractRelationship<A extends Any> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
|
|
827
763
|
readonly id: RelationId;
|
|
828
764
|
readonly title?: string | null;
|
|
829
|
-
readonly description?:
|
|
765
|
+
readonly description?: MarkdownOrString | null;
|
|
830
766
|
readonly technology?: string | null;
|
|
831
767
|
readonly kind?: RelationKind<A>;
|
|
832
768
|
readonly color?: Color;
|
|
@@ -861,12 +797,12 @@ interface DeploymentNode<A extends Any = Unknown> extends WithOptionalTags<A>, W
|
|
|
861
797
|
readonly id: DeploymentFqn<A>;
|
|
862
798
|
readonly kind: DeploymentKind<A>;
|
|
863
799
|
readonly title: string;
|
|
864
|
-
readonly description?:
|
|
800
|
+
readonly description?: MarkdownOrString | null;
|
|
865
801
|
readonly technology?: string | null;
|
|
866
802
|
readonly tags?: Tags<A> | null;
|
|
867
803
|
readonly links?: readonly Link[] | null;
|
|
868
804
|
readonly style: DeploymentElementStyle;
|
|
869
|
-
readonly notation?: string;
|
|
805
|
+
readonly notation?: string | null;
|
|
870
806
|
readonly metadata?: Metadata<A>;
|
|
871
807
|
}
|
|
872
808
|
interface DeployedInstance<A extends Any = Unknown> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
|
|
@@ -878,7 +814,7 @@ interface DeployedInstance<A extends Any = Unknown> extends WithOptionalTags<A>,
|
|
|
878
814
|
readonly id: DeploymentFqn<A>;
|
|
879
815
|
readonly element: Fqn<A>;
|
|
880
816
|
readonly title?: string;
|
|
881
|
-
readonly description?:
|
|
817
|
+
readonly description?: MarkdownOrString | null;
|
|
882
818
|
readonly technology?: string | null;
|
|
883
819
|
readonly tags?: Tags<A> | null;
|
|
884
820
|
readonly links?: readonly Link[] | null;
|
|
@@ -966,16 +902,14 @@ interface ComputedNode<A extends Any = Any> extends WithOptionalLinks {
|
|
|
966
902
|
parent: NodeId | null;
|
|
967
903
|
/**
|
|
968
904
|
* Reference to model element
|
|
969
|
-
* If 1 - node id is a reference
|
|
970
905
|
*/
|
|
971
906
|
modelRef?: Fqn<A> | undefined;
|
|
972
907
|
/**
|
|
973
908
|
* Reference to deployment element
|
|
974
|
-
* If 1 - node id is a reference
|
|
975
909
|
*/
|
|
976
910
|
deploymentRef?: DeploymentFqn<A> | undefined;
|
|
977
911
|
title: string;
|
|
978
|
-
description?:
|
|
912
|
+
description?: MarkdownOrString | null;
|
|
979
913
|
technology?: string | null;
|
|
980
914
|
notation?: string;
|
|
981
915
|
children: NodeId[];
|
|
@@ -1000,7 +934,7 @@ interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
|
|
|
1000
934
|
source: NodeId;
|
|
1001
935
|
target: NodeId;
|
|
1002
936
|
label: string | null;
|
|
1003
|
-
description?:
|
|
937
|
+
description?: MarkdownOrString | null;
|
|
1004
938
|
technology?: string;
|
|
1005
939
|
relations: RelationId[];
|
|
1006
940
|
kind?: RelationKind<A> | typeof StepEdgeKind;
|
|
@@ -1261,4 +1195,81 @@ type LikeC4ModelDump = {
|
|
|
1261
1195
|
};
|
|
1262
1196
|
type AuxFromDump<D> = D extends LikeC4ModelDump ? Aux<D[_stage] extends infer S extends string & 'computed' | 'layouted' ? S : 'computed' | 'layouted' | 'parsed', KeysOf<D['elements']>, KeysOf<D['deployments']['elements']>, KeysOf<D['views']>, D['projectId'] extends infer P extends string ? P : never, SpecTypesFromDump<D['specification']>> : Never;
|
|
1263
1197
|
|
|
1264
|
-
|
|
1198
|
+
interface RichTextEmpty {
|
|
1199
|
+
readonly isEmpty: true;
|
|
1200
|
+
readonly isMarkdown: false;
|
|
1201
|
+
readonly nonEmpty: false;
|
|
1202
|
+
readonly $source: null;
|
|
1203
|
+
readonly text: null;
|
|
1204
|
+
readonly md: null;
|
|
1205
|
+
readonly html: null;
|
|
1206
|
+
equals(other: unknown): boolean;
|
|
1207
|
+
}
|
|
1208
|
+
interface RichTextNonEmpty {
|
|
1209
|
+
readonly isEmpty: false;
|
|
1210
|
+
readonly nonEmpty: true;
|
|
1211
|
+
readonly isMarkdown: boolean;
|
|
1212
|
+
readonly $source: MarkdownOrString;
|
|
1213
|
+
readonly text: string;
|
|
1214
|
+
readonly md: string;
|
|
1215
|
+
readonly html: string;
|
|
1216
|
+
equals(other: unknown): boolean;
|
|
1217
|
+
}
|
|
1218
|
+
type RichTextOrEmpty = RichTextNonEmpty | RichTextEmpty;
|
|
1219
|
+
/**
|
|
1220
|
+
* RichText is a class that represents a potentially markdown string.
|
|
1221
|
+
* It can be either a plain text or a markdown.
|
|
1222
|
+
* It is used to represent the content of a node or a link.
|
|
1223
|
+
*/
|
|
1224
|
+
declare class RichText {
|
|
1225
|
+
private static _cache;
|
|
1226
|
+
/**
|
|
1227
|
+
* Creates and memoizes a RichText instance.
|
|
1228
|
+
* @see ElementModel.description
|
|
1229
|
+
* @example
|
|
1230
|
+
*
|
|
1231
|
+
* get description(): RichTextOrEmpty {
|
|
1232
|
+
* return RichText.memoize(this, this.$element.description)
|
|
1233
|
+
* }
|
|
1234
|
+
*/
|
|
1235
|
+
static memoize(obj: object, source: MarkdownOrString | null | undefined): RichTextOrEmpty;
|
|
1236
|
+
/**
|
|
1237
|
+
* Creates a RichText instance from a source.
|
|
1238
|
+
*/
|
|
1239
|
+
static from(source: RichTextOrEmpty | MarkdownOrString | string | null | undefined): RichTextOrEmpty;
|
|
1240
|
+
/**
|
|
1241
|
+
* This is a workaround for the fact that we need instance of RichText for `instanceof` checks
|
|
1242
|
+
* It is invalid inheritance (returning `null` from getters), and we cast to @see RichTextEmpty
|
|
1243
|
+
*/
|
|
1244
|
+
static EMPTY: RichTextEmpty;
|
|
1245
|
+
readonly $source: Readonly<MarkdownOrString> | null;
|
|
1246
|
+
readonly isEmpty: boolean;
|
|
1247
|
+
readonly nonEmpty: boolean;
|
|
1248
|
+
readonly isMarkdown: boolean;
|
|
1249
|
+
/**
|
|
1250
|
+
* Private constructor to prevent direct instantiation.
|
|
1251
|
+
* Use {@link RichText.from} or {@link RichText.memoize} instead.
|
|
1252
|
+
*/
|
|
1253
|
+
private constructor();
|
|
1254
|
+
/**
|
|
1255
|
+
* Returns the text content of the rich text.
|
|
1256
|
+
* If the source is a string, it returns the string.
|
|
1257
|
+
* If the source is a markdown, it returns the markdown.
|
|
1258
|
+
*/
|
|
1259
|
+
get text(): string;
|
|
1260
|
+
/**
|
|
1261
|
+
* Returns the markdown content of the rich text.
|
|
1262
|
+
* If the source is a string, it returns the string.
|
|
1263
|
+
* If the source is a markdown, it returns the markdown.
|
|
1264
|
+
*/
|
|
1265
|
+
get md(): string;
|
|
1266
|
+
/**
|
|
1267
|
+
* Returns the html content of the rich text.
|
|
1268
|
+
* If the source is a string, it returns the string.
|
|
1269
|
+
* If the source is a markdown, it returns the HTML.
|
|
1270
|
+
*/
|
|
1271
|
+
get html(): string;
|
|
1272
|
+
equals(other: unknown): boolean;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
export { type TagSpecification as $, type AuxFromLikeC4ModelData as A, BBox as B, type ComputedLikeC4ModelData as C, type DeploymentElementStyle as D, Expression as E, FqnExpr as F, type GlobalPredicateId as G, DefaultThemeColor as H, DefaultElementShape as I, DefaultShapeSize as J, DefaultPaddingSize as K, type LayoutedLikeC4ModelData as L, ModelFqnExpr as M, DefaultTextSize as N, type ElementStyle as O, type PredicateSelector as P, type Element as Q, RichText as R, type SpecificationDump as S, DefaultLineStyle as T, DefaultArrowType as U, DefaultRelationshipColor as V, type AbstractRelationship as W, type XYPoint as X, type Relationship as Y, type ModelRelation as Z, type ElementSpecification as _, type RichTextEmpty as a, type DiagramNode as a$, isTagColorSpecified as a0, type RelationshipSpecification as a1, type Specification as a2, type EqualOperator as a3, type TagEqual as a4, isTagEqual as a5, type KindEqual as a6, isKindEqual as a7, type Participant as a8, type ParticipantOperator as a9, isExtendsElementView as aA, isDeploymentView as aB, isDynamicView as aC, type AnyIncludePredicate as aD, type AnyExcludePredicate as aE, type AnyViewRuleStyle as aF, type ViewRuleGlobalStyle as aG, isViewRuleGlobalStyle as aH, type ViewRuleGlobalPredicateRef as aI, isViewRuleGlobalPredicateRef as aJ, type AutoLayoutDirection as aK, isAutoLayoutDirection as aL, type ViewRuleAutoLayout as aM, isViewRuleAutoLayout as aN, type ViewAutoLayout as aO, type ViewManualLayout as aP, type ViewType as aQ, type BaseViewProperties as aR, type BaseParsedViewProperties as aS, type NodeNotation as aT, type ViewWithNotation as aU, type ViewWithHash as aV, type ComputedNode as aW, type ComputedEdge as aX, type ComputedElementView as aY, type ComputedDeploymentView as aZ, type ComputedDynamicView as a_, isParticipantOperator as aa, type NotOperator as ab, isNotOperator as ac, type AndOperator as ad, isAndOperator as ae, type OrOperator as af, isOrOperator as ag, type WhereOperator as ah, type Filterable as ai, type OperatorPredicate as aj, whereOperatorAsPredicate as ak, type ParsedView as al, type LayoutedView as am, isDiagramView as an, type ComputedView as ao, type ProcessedView as ap, type AnyView as aq, type ViewOnStage as ar, type ViewWithType as as, type ViewRule as at, type ViewRulePredicate as au, isViewRulePredicate as av, isViewRuleStyle as aw, isComputedView as ax, isElementView as ay, isScopedElementView as az, type RichTextOrEmpty as b, type DiagramEdge as b0, type LayoutedElementView as b1, type LayoutedDeploymentView as b2, type LayoutedDynamicView as b3, type DeploymentViewIncludePredicate as b4, type DeploymentViewExcludePredicate as b5, type DeploymentViewPredicate as b6, type DeploymentViewRuleStyle as b7, type DeploymentViewRule as b8, type ParsedDeploymentView as b9, type DynamicViewStep as ba, type DynamicViewParallelSteps as bb, getParallelStepsPrefix as bc, type DynamicViewStepOrParallel as bd, type DynamicViewIncludeRule as be, type DynamicViewRule as bf, type ParsedDynamicView as bg, isDynamicViewParallelSteps as bh, type ElementViewIncludePredicate as bi, type ElementViewExcludePredicate as bj, type ElementViewPredicate as bk, type ElementViewRuleGroup as bl, isViewRuleGroup as bm, type ElementViewRuleStyle as bn, type ElementViewRule as bo, type ParsedElementView as bp, RelationExpr as c, ModelRelationExpr as d, ModelExpression as e, FqnRef as f, type Point as g, RectBox as h, type GlobalPredicates as i, type GlobalDynamicPredicates as j, type GlobalStyleID as k, type GlobalStyles as l, type ModelGlobals as m, type ParsedLikeC4ModelData as n, type LikeC4ModelData as o, type DeploymentNode as p, type DeployedInstance as q, type DeploymentElement as r, type DeploymentElementRef as s, isDeploymentNode as t, isDeployedInstance as u, type DeploymentRelationship as v, type DeploymentRelation as w, type SpecTypesFromDump as x, type LikeC4ModelDump as y, type AuxFromDump as z };
|
|
@@ -1,60 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Tagged } from 'type-fest';
|
|
2
2
|
|
|
3
|
-
type
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
3
|
+
type ProjectId<T = string> = Tagged<T, 'ProjectID'>;
|
|
4
|
+
type MarkdownOrString = {
|
|
5
|
+
txt: string;
|
|
6
|
+
md?: never;
|
|
7
|
+
} | {
|
|
8
|
+
md: string;
|
|
9
|
+
txt?: never;
|
|
10
|
+
};
|
|
11
11
|
/**
|
|
12
|
+
* Converts a MarkdownOrString object or a plain string into a simple string representation.
|
|
13
|
+
* This utility function handles different types of text content and normalizes them to a string format.
|
|
14
|
+
*
|
|
15
|
+
* @param value - The content to be flattened.
|
|
16
|
+
* Can be one of:
|
|
17
|
+
* - A plain string
|
|
18
|
+
* - A MarkdownOrString object with either txt or md property
|
|
19
|
+
* - undefined or null
|
|
20
|
+
*
|
|
21
|
+
* @returns The string content contained within the input value.
|
|
22
|
+
* - Returns the input directly if it's already a string
|
|
23
|
+
* - Returns the txt property if available in a MarkdownOrString object
|
|
24
|
+
* - Falls back to the md property if txt is not available
|
|
25
|
+
* - Returns null if:
|
|
26
|
+
* - The input is null or undefined
|
|
27
|
+
* - The resulting string value is empty, whitespace, or null
|
|
28
|
+
*
|
|
12
29
|
* @example
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* }
|
|
17
|
-
* type Variant2 = {
|
|
18
|
-
* b: number
|
|
19
|
-
* }
|
|
30
|
+
* // String input
|
|
31
|
+
* flattenMarkdownOrString("Hello world") // Returns: "Hello world"
|
|
32
|
+
* flattenMarkdownOrString(" ") // Returns: null
|
|
20
33
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* }>
|
|
34
|
+
* // MarkdownOrString with txt property
|
|
35
|
+
* flattenMarkdownOrString({ txt: "Plain text" }) // Returns: "Plain text"
|
|
36
|
+
* flattenMarkdownOrString({ txt: " " }) // Returns: null
|
|
25
37
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* a: 'one',
|
|
29
|
-
* b: 1
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
type ExclusiveUnion<Expressions, All = AllNever<Expressions>> = Expressions extends object ? {
|
|
34
|
-
[Name in keyof Expressions]: Simplify<Omit<All, keyof Expressions[Name]> & Expressions[Name]>;
|
|
35
|
-
}[keyof Expressions] : never;
|
|
36
|
-
/**
|
|
37
|
-
* Copy from https://github.com/remeda/remeda/blob/main/src/internal/types/NTuple.ts
|
|
38
|
-
* An array with *exactly* N elements in it.
|
|
38
|
+
* // MarkdownOrString with md property
|
|
39
|
+
* flattenMarkdownOrString({ md: "**Bold markdown**" }) // Returns: "**Bold markdown**"
|
|
39
40
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* recursion. None of these have protections because this is an internal type!
|
|
41
|
+
* // Null input
|
|
42
|
+
* flattenMarkdownOrString(null) // Returns: null
|
|
43
43
|
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
type Predicate<T> = (x: T) => boolean;
|
|
47
|
-
interface Link {
|
|
48
|
-
title?: string;
|
|
49
|
-
url: string;
|
|
50
|
-
relative?: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Coalesce `V` to a string if it is `any`
|
|
54
|
-
*/
|
|
55
|
-
type Coalesce<V extends string, OrIfAny = string> = IsAny<V> extends true ? OrIfAny : V;
|
|
56
|
-
|
|
57
|
-
type ProjectId<T = string> = Tagged<T, 'ProjectID'>;
|
|
44
|
+
declare function flattenMarkdownOrString(value: MarkdownOrString | string): string;
|
|
45
|
+
declare function flattenMarkdownOrString(value: MarkdownOrString | string | undefined | null): string | null;
|
|
58
46
|
type BuiltInIcon = 'none' | `${'aws' | 'azure' | 'gcp' | 'tech'}:${string}`;
|
|
59
47
|
type Icon = Tagged<string, 'Icon'> | BuiltInIcon;
|
|
60
48
|
type IconUrl = Icon;
|
|
@@ -123,6 +111,7 @@ declare const scalar_GlobalFqn: typeof GlobalFqn;
|
|
|
123
111
|
type scalar_GroupElementKind = GroupElementKind;
|
|
124
112
|
type scalar_Icon = Icon;
|
|
125
113
|
type scalar_IconUrl = IconUrl;
|
|
114
|
+
type scalar_MarkdownOrString = MarkdownOrString;
|
|
126
115
|
declare const scalar_NodeId: typeof NodeId;
|
|
127
116
|
type scalar_ProjectId<T = string> = ProjectId<T>;
|
|
128
117
|
declare const scalar_RelationId: typeof RelationId;
|
|
@@ -134,13 +123,14 @@ declare const scalar_StepEdgeKind: typeof StepEdgeKind;
|
|
|
134
123
|
type scalar_Tag<T = string> = Tag<T>;
|
|
135
124
|
declare const scalar_ViewId: typeof ViewId;
|
|
136
125
|
declare const scalar_extractStep: typeof extractStep;
|
|
126
|
+
declare const scalar_flattenMarkdownOrString: typeof flattenMarkdownOrString;
|
|
137
127
|
declare const scalar_isGlobalFqn: typeof isGlobalFqn;
|
|
138
128
|
declare const scalar_isGroupElementKind: typeof isGroupElementKind;
|
|
139
129
|
declare const scalar_isStepEdgeId: typeof isStepEdgeId;
|
|
140
130
|
declare const scalar_splitGlobalFqn: typeof splitGlobalFqn;
|
|
141
131
|
declare const scalar_stepEdgeId: typeof stepEdgeId;
|
|
142
132
|
declare namespace scalar {
|
|
143
|
-
export { type scalar_AnyFqn as AnyFqn, type scalar_BuiltInIcon as BuiltInIcon, scalar_DeploymentFqn as DeploymentFqn, type scalar_DeploymentKind as DeploymentKind, scalar_EdgeId as EdgeId, type scalar_ElementKind as ElementKind, scalar_Fqn as Fqn, scalar_GlobalFqn as GlobalFqn, type scalar_GroupElementKind as GroupElementKind, type scalar_Icon as Icon, type scalar_IconUrl as IconUrl, scalar_NodeId as NodeId, type scalar_ProjectId as ProjectId, scalar_RelationId as RelationId, type scalar_RelationKind as RelationKind, type scalar_RelationshipKind as RelationshipKind, type scalar_StepEdgeId as StepEdgeId, type scalar_StepEdgeIdLiteral as StepEdgeIdLiteral, scalar_StepEdgeKind as StepEdgeKind, type scalar_Tag as Tag, scalar_ViewId as ViewId, scalar_extractStep as extractStep, scalar_isGlobalFqn as isGlobalFqn, scalar_isGroupElementKind as isGroupElementKind, scalar_isStepEdgeId as isStepEdgeId, scalar_splitGlobalFqn as splitGlobalFqn, scalar_stepEdgeId as stepEdgeId };
|
|
133
|
+
export { type scalar_AnyFqn as AnyFqn, type scalar_BuiltInIcon as BuiltInIcon, scalar_DeploymentFqn as DeploymentFqn, type scalar_DeploymentKind as DeploymentKind, scalar_EdgeId as EdgeId, type scalar_ElementKind as ElementKind, scalar_Fqn as Fqn, scalar_GlobalFqn as GlobalFqn, type scalar_GroupElementKind as GroupElementKind, type scalar_Icon as Icon, type scalar_IconUrl as IconUrl, type scalar_MarkdownOrString as MarkdownOrString, scalar_NodeId as NodeId, type scalar_ProjectId as ProjectId, scalar_RelationId as RelationId, type scalar_RelationKind as RelationKind, type scalar_RelationshipKind as RelationshipKind, type scalar_StepEdgeId as StepEdgeId, type scalar_StepEdgeIdLiteral as StepEdgeIdLiteral, scalar_StepEdgeKind as StepEdgeKind, type scalar_Tag as Tag, scalar_ViewId as ViewId, scalar_extractStep as extractStep, scalar_flattenMarkdownOrString as flattenMarkdownOrString, scalar_isGlobalFqn as isGlobalFqn, scalar_isGroupElementKind as isGroupElementKind, scalar_isStepEdgeId as isStepEdgeId, scalar_splitGlobalFqn as splitGlobalFqn, scalar_stepEdgeId as stepEdgeId };
|
|
144
134
|
}
|
|
145
135
|
|
|
146
|
-
export { type AnyFqn as A, type BuiltInIcon as B,
|
|
136
|
+
export { type AnyFqn as A, type BuiltInIcon as B, DeploymentFqn as D, type ElementKind as E, Fqn as F, GroupElementKind as G, type Icon as I, type MarkdownOrString as M, NodeId as N, type ProjectId as P, type RelationKind as R, type StepEdgeIdLiteral as S, type Tag as T, ViewId as V, type IconUrl as a, type DeploymentKind as b, type RelationshipKind as c, RelationId as d, GlobalFqn as e, flattenMarkdownOrString as f, isGlobalFqn as g, splitGlobalFqn as h, isGroupElementKind as i, EdgeId as j, type StepEdgeId as k, stepEdgeId as l, StepEdgeKind as m, isStepEdgeId as n, extractStep as o, scalar as s };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
function n(e){return e!==void 0}
|
|
2
|
+
|
|
3
|
+
function l(n){return n!=null}
|
|
4
|
+
|
|
5
|
+
function isIterable(something) {
|
|
6
|
+
return l(something) && typeof something === "object" && Symbol.iterator in something;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function iflat(iterable) {
|
|
10
|
+
return iterable ? _iflat(iterable) : _iflat;
|
|
11
|
+
}
|
|
12
|
+
function* _iflat(iterable) {
|
|
13
|
+
for (const inner of iterable) {
|
|
14
|
+
yield* inner;
|
|
15
|
+
}
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function iunique(iterable) {
|
|
20
|
+
return iterable ? _iunique(iterable) : _iunique;
|
|
21
|
+
}
|
|
22
|
+
function* _iunique(iterable) {
|
|
23
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24
|
+
for (const item of iterable) {
|
|
25
|
+
if (!seen.has(item)) {
|
|
26
|
+
seen.add(item);
|
|
27
|
+
yield item;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { isIterable as a, iunique as b, iflat as i, l, n };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import rehypeRaw from 'rehype-raw';
|
|
2
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
3
|
+
import rehypeStringify from 'rehype-stringify';
|
|
4
|
+
import remarkGfm from 'remark-gfm';
|
|
5
|
+
import remarkParse from 'remark-parse';
|
|
6
|
+
import remarkRehype from 'remark-rehype';
|
|
7
|
+
import { unified } from 'unified';
|
|
8
|
+
import { fromMarkdown } from 'mdast-util-from-markdown';
|
|
9
|
+
import { toString } from 'mdast-util-to-string';
|
|
10
|
+
|
|
11
|
+
function memoizeProp(obj, tag, fn) {
|
|
12
|
+
const tagSymbol = typeof tag === "symbol" ? tag : Symbol.for(tag);
|
|
13
|
+
if (!obj.hasOwnProperty(tagSymbol)) {
|
|
14
|
+
Object.defineProperty(obj, tagSymbol, {
|
|
15
|
+
enumerable: false,
|
|
16
|
+
writable: false,
|
|
17
|
+
value: fn()
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return obj[tagSymbol];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function remark() {
|
|
24
|
+
return unified().use(remarkParse).use(remarkGfm).use(remarkRehype, {
|
|
25
|
+
// Tight paragraphs prevent extra newlines
|
|
26
|
+
allowDangerousHtml: true,
|
|
27
|
+
clobberPrefix: "",
|
|
28
|
+
tableCellPadding: false,
|
|
29
|
+
tight: true
|
|
30
|
+
}).use(rehypeRaw).use(rehypeSanitize).use(rehypeStringify, {
|
|
31
|
+
// Prevent extra closing newlines
|
|
32
|
+
closeSelfClosing: true,
|
|
33
|
+
tightSelfClosing: true
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function markdownToHtml(markdown) {
|
|
37
|
+
return String(remark().processSync(markdown.trim())).trim();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function markdownToText(markdown) {
|
|
41
|
+
return toString(fromMarkdown(markdown), {
|
|
42
|
+
includeHtml: false,
|
|
43
|
+
includeImageAlt: false
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { markdownToHtml as a, markdownToText as b, memoizeProp as m };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
2
|
+
|
|
3
|
+
function t(n){return typeof n=="function"}
|
|
4
|
+
|
|
5
|
+
function ifilter(arg1, arg2) {
|
|
6
|
+
const pred = arg2 ?? arg1;
|
|
7
|
+
invariant(t(pred));
|
|
8
|
+
function* _filter(iter) {
|
|
9
|
+
for (const value of iter) {
|
|
10
|
+
if (pred(value)) {
|
|
11
|
+
yield value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!arg2) {
|
|
17
|
+
return _filter;
|
|
18
|
+
}
|
|
19
|
+
return _filter(arg1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { ifilter as i, t };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { r as getDefaultExportFromCjs } from './core.C_C-3c1S.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Mnemonist DefaultMap
|
|
5
|
+
* =====================
|
|
6
|
+
*
|
|
7
|
+
* JavaScript implementation of a default map that will return a constructed
|
|
8
|
+
* value any time one tries to access an inexisting key. It's quite similar
|
|
9
|
+
* to python's defaultdict.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var defaultMap;
|
|
13
|
+
var hasRequiredDefaultMap;
|
|
14
|
+
|
|
15
|
+
function requireDefaultMap () {
|
|
16
|
+
if (hasRequiredDefaultMap) return defaultMap;
|
|
17
|
+
hasRequiredDefaultMap = 1;
|
|
18
|
+
/**
|
|
19
|
+
* DefaultMap.
|
|
20
|
+
*
|
|
21
|
+
* @constructor
|
|
22
|
+
*/
|
|
23
|
+
function DefaultMap(factory) {
|
|
24
|
+
if (typeof factory !== 'function')
|
|
25
|
+
throw new Error('mnemonist/DefaultMap.constructor: expecting a function.');
|
|
26
|
+
|
|
27
|
+
this.items = new Map();
|
|
28
|
+
this.factory = factory;
|
|
29
|
+
this.size = 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Method used to clear the structure.
|
|
34
|
+
*
|
|
35
|
+
* @return {undefined}
|
|
36
|
+
*/
|
|
37
|
+
DefaultMap.prototype.clear = function() {
|
|
38
|
+
|
|
39
|
+
// Properties
|
|
40
|
+
this.items.clear();
|
|
41
|
+
this.size = 0;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Method used to get the value set for given key. If the key does not exist,
|
|
46
|
+
* the value will be created using the provided factory.
|
|
47
|
+
*
|
|
48
|
+
* @param {any} key - Target key.
|
|
49
|
+
* @return {any}
|
|
50
|
+
*/
|
|
51
|
+
DefaultMap.prototype.get = function(key) {
|
|
52
|
+
var value = this.items.get(key);
|
|
53
|
+
|
|
54
|
+
if (typeof value === 'undefined') {
|
|
55
|
+
value = this.factory(key, this.size);
|
|
56
|
+
this.items.set(key, value);
|
|
57
|
+
this.size++;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return value;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Method used to get the value set for given key. If the key does not exist,
|
|
65
|
+
* a value won't be created.
|
|
66
|
+
*
|
|
67
|
+
* @param {any} key - Target key.
|
|
68
|
+
* @return {any}
|
|
69
|
+
*/
|
|
70
|
+
DefaultMap.prototype.peek = function(key) {
|
|
71
|
+
return this.items.get(key);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Method used to set a value for given key.
|
|
76
|
+
*
|
|
77
|
+
* @param {any} key - Target key.
|
|
78
|
+
* @param {any} value - Value.
|
|
79
|
+
* @return {DefaultMap}
|
|
80
|
+
*/
|
|
81
|
+
DefaultMap.prototype.set = function(key, value) {
|
|
82
|
+
this.items.set(key, value);
|
|
83
|
+
this.size = this.items.size;
|
|
84
|
+
|
|
85
|
+
return this;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Method used to test the existence of a key in the map.
|
|
90
|
+
*
|
|
91
|
+
* @param {any} key - Target key.
|
|
92
|
+
* @return {boolean}
|
|
93
|
+
*/
|
|
94
|
+
DefaultMap.prototype.has = function(key) {
|
|
95
|
+
return this.items.has(key);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Method used to delete target key.
|
|
100
|
+
*
|
|
101
|
+
* @param {any} key - Target key.
|
|
102
|
+
* @return {boolean}
|
|
103
|
+
*/
|
|
104
|
+
DefaultMap.prototype.delete = function(key) {
|
|
105
|
+
var deleted = this.items.delete(key);
|
|
106
|
+
|
|
107
|
+
this.size = this.items.size;
|
|
108
|
+
|
|
109
|
+
return deleted;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Method used to iterate over each of the key/value pairs.
|
|
114
|
+
*
|
|
115
|
+
* @param {function} callback - Function to call for each item.
|
|
116
|
+
* @param {object} scope - Optional scope.
|
|
117
|
+
* @return {undefined}
|
|
118
|
+
*/
|
|
119
|
+
DefaultMap.prototype.forEach = function(callback, scope) {
|
|
120
|
+
scope = arguments.length > 1 ? scope : this;
|
|
121
|
+
|
|
122
|
+
this.items.forEach(callback, scope);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Iterators.
|
|
127
|
+
*/
|
|
128
|
+
DefaultMap.prototype.entries = function() {
|
|
129
|
+
return this.items.entries();
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
DefaultMap.prototype.keys = function() {
|
|
133
|
+
return this.items.keys();
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
DefaultMap.prototype.values = function() {
|
|
137
|
+
return this.items.values();
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Attaching the #.entries method to Symbol.iterator if possible.
|
|
142
|
+
*/
|
|
143
|
+
if (typeof Symbol !== 'undefined')
|
|
144
|
+
DefaultMap.prototype[Symbol.iterator] = DefaultMap.prototype.entries;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Convenience known methods.
|
|
148
|
+
*/
|
|
149
|
+
DefaultMap.prototype.inspect = function() {
|
|
150
|
+
return this.items;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
if (typeof Symbol !== 'undefined')
|
|
154
|
+
DefaultMap.prototype[Symbol.for('nodejs.util.inspect.custom')] = DefaultMap.prototype.inspect;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Typical factories.
|
|
158
|
+
*/
|
|
159
|
+
DefaultMap.autoIncrement = function() {
|
|
160
|
+
var i = 0;
|
|
161
|
+
|
|
162
|
+
return function() {
|
|
163
|
+
return i++;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Exporting.
|
|
169
|
+
*/
|
|
170
|
+
defaultMap = DefaultMap;
|
|
171
|
+
return defaultMap;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
var defaultMapExports = /*@__PURE__*/ requireDefaultMap();
|
|
175
|
+
const DefaultMap = /*@__PURE__*/getDefaultExportFromCjs(defaultMapExports);
|
|
176
|
+
|
|
177
|
+
export { DefaultMap as D };
|