@likec4/core 1.32.2 → 1.34.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.cbA9VZ02.mjs → core.4SpVCM9m.mjs} +31 -1073
- 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.CJSFKrYf.d.mts +83 -0
- package/dist/shared/{core.rmvsy0n3.mjs → core.C_C-3c1S.mjs} +5 -198
- 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.D3xEWj5B.d.mts +41 -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.CBxTtXMi.d.mts → core.DAj3LuFH.d.mts} +58 -57
- package/dist/shared/{core.Bk7wEZFG.mjs → core.DXRAwwDB.mjs} +3 -2
- package/dist/shared/core.DcS-0zys.mjs +10 -0
- package/dist/shared/core.Di7__sMg.d.mts +87 -0
- package/dist/shared/{core.DaAyklhe.d.mts → core.DrS4Bf4y.d.mts} +31 -22
- package/dist/shared/core.DsMrjY2q.mjs +34 -0
- package/dist/shared/core.DuSLYTG6.d.mts +57 -0
- package/dist/shared/{core.Bdz6fBF1.d.mts → core.IWLie-Ma.d.mts} +92 -81
- package/dist/shared/{core.CBpKAlhj.mjs → core.PqNe5WxQ.mjs} +96 -56
- package/dist/shared/core.XptQjhMA.mjs +1295 -0
- 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 +4 -0
- 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 +29 -13
- 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 +21 -17
- package/src/model/DeploymentModel.ts +1 -1
- package/src/model/ElementModel.ts +15 -5
- package/src/model/LikeC4Model.ts +1 -1
- package/src/model/RelationModel.ts +20 -17
- package/src/model/index.ts +2 -0
- package/src/model/types.ts +2 -1
- package/src/model/view/EdgeModel.ts +4 -3
- package/src/model/view/LikeC4ViewModel.ts +6 -1
- package/src/model/view/NodeModel.ts +5 -3
- package/src/theme/index.ts +12 -5
- package/src/types/RichText.ts +200 -0
- package/src/types/expression-model.ts +2 -2
- package/src/types/expression.ts +2 -2
- package/src/types/fqnRef.ts +2 -2
- package/src/types/global.ts +1 -1
- package/src/types/index.ts +4 -2
- package/src/types/model-data.ts +2 -2
- package/src/types/model-deployment.ts +6 -5
- package/src/types/model-dump.ts +1 -1
- package/src/types/model-logical.ts +5 -5
- package/src/types/model-spec.ts +2 -2
- package/src/types/operators.ts +2 -2
- package/src/types/scalar.ts +47 -2
- package/src/types/view-common.ts +3 -3
- package/src/types/view-computed.ts +4 -6
- package/src/types/view-layouted.ts +11 -2
- package/src/types/view-parsed.deployment.ts +1 -1
- package/src/types/view-parsed.dynamic.ts +2 -2
- package/src/types/view-parsed.element.ts +2 -2
- package/src/types/view.ts +2 -2
- 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
- package/dist/types/aux.d.mts +0 -3
- /package/dist/types/{aux.mjs → _aux.mjs} +0 -0
- /package/src/types/{aux.ts → _aux.ts} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import 'type-fest';
|
|
2
|
+
import '../shared/core.DuSLYTG6.mjs';
|
|
3
|
+
export { x as AllKinds, A as Any, A as AnyAux, C as AnySpec, a as Aux, p as DeploymentFqn, s as DeploymentId, D as DeploymentKind, B as EdgeId, g as ElementId, k as ElementKind, F as Fqn, o as LooseDeploymentId, a3 as LooseDeploymentKind, n as LooseElementId, a2 as LooseElementKind, a4 as LooseRelationKind, L as LooseTag, a1 as LooseTags, w as LooseViewId, h as Metadata, j as MetadataKey, N as Never, I as NodeId, a0 as OrString, G as PickByStage, P as ProjectId, l as RelationId, R as RelationKind, J as Spec, S as SpecAux, r as Stage, p as StrictDeploymentFqn, X as StrictDeploymentKind, Q as StrictElementKind, F as StrictFqn, K as StrictProjectId, Y as StrictRelationKind, O as StrictTag, m as StrictViewId, u as Tag, T as Tags, U as Unknown, b as UnknownComputed, c as UnknownLayouted, d as UnknownParsed, V as ViewId, $ as WithLinks, z as WithMetadata, y as WithOptionalLinks, W as WithOptionalTags, Z as WithTags, H as setStage, t as toComputed, q as toLayouted, v as toParsed } from '../shared/core.DAj3LuFH.mjs';
|
|
4
|
+
import '../shared/core.668kXpZq.mjs';
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { A as Any, A as AnyAux,
|
|
4
|
-
import {
|
|
5
|
-
export { W as AbstractRelationship, ad as AndOperator,
|
|
1
|
+
import { N as NonEmptyArray } from '../shared/core.DuSLYTG6.mjs';
|
|
2
|
+
export { C as Coalesce, E as ExclusiveUnion, I as IteratorLike, K as KeysOf, L as Link, b as NTuple, a as NonEmptyReadonlyArray, P as Predicate } from '../shared/core.DuSLYTG6.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, e as _stage, f as _type, _ as aux, i as isOnStage } from '../shared/core.DAj3LuFH.mjs';
|
|
4
|
+
import { aP as ViewManualLayout, aK as AutoLayoutDirection } from '../shared/core.IWLie-Ma.mjs';
|
|
5
|
+
export { W as AbstractRelationship, ad as AndOperator, aE as AnyExcludePredicate, aD as AnyIncludePredicate, aq as AnyView, aF as AnyViewRuleStyle, z as AuxFromDump, A as AuxFromLikeC4ModelData, B as BBox, aS as BaseParsedViewProperties, aR as BaseViewProperties, aZ as ComputedDeploymentView, a_ as ComputedDynamicView, aX as ComputedEdge, aY as ComputedElementView, C as ComputedLikeC4ModelData, aW as ComputedNode, ao as ComputedView, U as DefaultArrowType, I as DefaultElementShape, T as DefaultLineStyle, K as DefaultPaddingSize, V as DefaultRelationshipColor, J as DefaultShapeSize, N as DefaultTextSize, H as DefaultThemeColor, q as DeployedInstance, r as DeploymentElement, s as DeploymentElementRef, D as DeploymentElementStyle, p as DeploymentNode, w as DeploymentRelation, v as DeploymentRelationship, b5 as DeploymentViewExcludePredicate, b4 as DeploymentViewIncludePredicate, b6 as DeploymentViewPredicate, b8 as DeploymentViewRule, b7 as DeploymentViewRuleStyle, b0 as DiagramEdge, a$ as DiagramNode, am as DiagramView, be as DynamicViewIncludeRule, bb as DynamicViewParallelSteps, bf as DynamicViewRule, ba as DynamicViewStep, bd as DynamicViewStepOrParallel, Q as Element, _ as ElementSpecification, O as ElementStyle, bj as ElementViewExcludePredicate, bi as ElementViewIncludePredicate, bk as ElementViewPredicate, bo as ElementViewRule, bl as ElementViewRuleGroup, bn as ElementViewRuleStyle, a3 as EqualOperator, E as Expression, ai as Filterable, F as FqnExpr, f as FqnRef, j as GlobalDynamicPredicates, G as GlobalPredicateId, i as GlobalPredicates, k as GlobalStyleID, l as GlobalStyles, a6 as KindEqual, b2 as LayoutedDeploymentView, b3 as LayoutedDynamicView, b1 as LayoutedElementView, L as LayoutedLikeC4ModelData, am as LayoutedView, o as LikeC4ModelData, y as LikeC4ModelDump, al as LikeC4View, e as ModelExpression, M as ModelFqnExpr, m as ModelGlobals, Z as ModelRelation, d as ModelRelationExpr, aT as NodeNotation, ab as NotOperator, aj as OperatorPredicate, af as OrOperator, b9 as ParsedDeploymentView, bg as ParsedDynamicView, bp as ParsedElementView, n as ParsedLikeC4ModelData, al as ParsedView, a8 as Participant, a9 as ParticipantOperator, g as Point, P as PredicateSelector, ap as ProcessedView, h as RectBox, c as RelationExpr, Y as Relationship, a1 as RelationshipSpecification, R as RichText, a as RichTextEmpty, b as RichTextOrEmpty, x as SpecTypesFromDump, a2 as Specification, S as SpecificationDump, a4 as TagEqual, $ as TagSpecification, aO as ViewAutoLayout, ar as ViewOnStage, at as ViewRule, aM as ViewRuleAutoLayout, aI as ViewRuleGlobalPredicateRef, aG as ViewRuleGlobalStyle, au as ViewRulePredicate, aQ as ViewType, aV as ViewWithHash, aU as ViewWithNotation, as as ViewWithType, ah as WhereOperator, X as XYPoint, bc as getParallelStepsPrefix, ae as isAndOperator, aL as isAutoLayoutDirection, ax as isComputedView, u as isDeployedInstance, t as isDeploymentNode, aB as isDeploymentView, an as isDiagramView, aC as isDynamicView, bh as isDynamicViewParallelSteps, ay as isElementView, aA as isExtendsElementView, a7 as isKindEqual, an as isLayoutedView, ac as isNotOperator, ag as isOrOperator, aa as isParticipantOperator, az as isScopedElementView, a0 as isTagColorSpecified, a5 as isTagEqual, aN as isViewRuleAutoLayout, aJ as isViewRuleGlobalPredicateRef, aH as isViewRuleGlobalStyle, bm as isViewRuleGroup, av as isViewRulePredicate, aw as isViewRuleStyle, ak as whereOperatorAsPredicate } from '../shared/core.IWLie-Ma.mjs';
|
|
6
|
+
import { F as Fqn, D as DeploymentFqn } from '../shared/core.668kXpZq.mjs';
|
|
7
|
+
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.668kXpZq.mjs';
|
|
8
|
+
import { b as BorderStyle, c as ElementShape, h as ThemeColor } from '../shared/core.CzdwsPmY.mjs';
|
|
9
|
+
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';
|
|
6
10
|
import 'type-fest';
|
|
7
11
|
|
|
8
12
|
declare namespace ViewChange {
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,147 +1,18 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { E as Expression, F as FqnExpr,
|
|
3
|
-
|
|
1
|
+
export { D as DeploymentFqn, E as EdgeId, l as Fqn, F as FqnRef, n as GlobalFqn, G as GroupElementKind, N as NodeId, R as RelationId, S as StepEdgeKind, V as ViewId, _ as _stage, a as _type, r as extractStep, k as flattenMarkdownOrString, h as isAndOperator, c as isDeployedInstance, b as isDeploymentNode, o as isGlobalFqn, m as isGroupElementKind, e as isKindEqual, g as isNotOperator, i as isOnStage, j as isOrOperator, f as isParticipantOperator, q as isStepEdgeId, d as isTagEqual, s as splitGlobalFqn, p as stepEdgeId, w as whereOperatorAsPredicate } from '../shared/core.Br7Fab9l.mjs';
|
|
2
|
+
export { E as Expression, F as FqnExpr, b as ModelExpression, M as ModelFqnExpr, a as ModelRelationExpr, R as RelationExpr, p as getParallelStepsPrefix, n as isAutoLayoutDirection, d as isComputedView, j as isDeploymentView, e as isDiagramView, k as isDynamicView, q as isDynamicViewParallelSteps, f as isElementView, h as isExtendsElementView, e as isLayoutedView, g as isScopedElementView, o as isViewRuleAutoLayout, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, r as isViewRuleGroup, i as isViewRulePredicate, c as isViewRuleStyle } from '../shared/core.DXRAwwDB.mjs';
|
|
3
|
+
export { B as BBox, a as BorderStyles, E as ElementShapes, R as RectBox, T as ThemeColors, i as isTagColorSpecified, b as isThemeColor } from '../shared/core.CxGKeL-L.mjs';
|
|
4
|
+
export { f as DefaultArrowType, a as DefaultElementShape, e as DefaultLineStyle, c as DefaultPaddingSize, g as DefaultRelationshipColor, b as DefaultShapeSize, d as DefaultTextSize, D as DefaultThemeColor, R as RichText } from '../shared/core.D56nCp7e.mjs';
|
|
5
|
+
import '../shared/core.zLlww-07.mjs';
|
|
6
|
+
import '../shared/core.D4npX2q8.mjs';
|
|
7
|
+
import '../shared/core.BgvIuGGU.mjs';
|
|
4
8
|
import '../shared/core.DbRvwARP.mjs';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function fromPoints(points) {
|
|
16
|
-
const { x1, y1, x2, y2 } = RectBox.fromPoints(points);
|
|
17
|
-
return {
|
|
18
|
-
x: x1,
|
|
19
|
-
y: y1,
|
|
20
|
-
width: x2 - x1,
|
|
21
|
-
height: y2 - y1
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
BBox2.fromPoints = fromPoints;
|
|
25
|
-
function merge(...boxes) {
|
|
26
|
-
invariant(boxes.length > 0, "No boxes provided");
|
|
27
|
-
let minX = Infinity;
|
|
28
|
-
let minY = Infinity;
|
|
29
|
-
let maxX = -Infinity;
|
|
30
|
-
let maxY = -Infinity;
|
|
31
|
-
for (const box of boxes) {
|
|
32
|
-
minX = Math.min(minX, box.x);
|
|
33
|
-
minY = Math.min(minY, box.y);
|
|
34
|
-
maxX = Math.max(maxX, box.x + box.width);
|
|
35
|
-
maxY = Math.max(maxY, box.y + box.height);
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
x: minX,
|
|
39
|
-
y: minY,
|
|
40
|
-
width: maxX - minX,
|
|
41
|
-
height: maxY - minY
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
BBox2.merge = merge;
|
|
45
|
-
function toRectBox(box) {
|
|
46
|
-
return {
|
|
47
|
-
x1: box.x,
|
|
48
|
-
y1: box.y,
|
|
49
|
-
x2: box.x + box.width,
|
|
50
|
-
y2: box.y + box.height
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
BBox2.toRectBox = toRectBox;
|
|
54
|
-
})(BBox || (BBox = {}));
|
|
55
|
-
var RectBox;
|
|
56
|
-
((RectBox2) => {
|
|
57
|
-
function center({ x1, y1, x2, y2 }) {
|
|
58
|
-
return {
|
|
59
|
-
x: (x1 + x2) / 2,
|
|
60
|
-
y: (y1 + y2) / 2
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
RectBox2.center = center;
|
|
64
|
-
function fromPoints(points) {
|
|
65
|
-
invariant(points.length > 0, "At least one point is required");
|
|
66
|
-
let minX = Infinity;
|
|
67
|
-
let minY = Infinity;
|
|
68
|
-
let maxX = -Infinity;
|
|
69
|
-
let maxY = -Infinity;
|
|
70
|
-
for (const [x, y] of points) {
|
|
71
|
-
minX = Math.min(minX, x);
|
|
72
|
-
minY = Math.min(minY, y);
|
|
73
|
-
maxX = Math.max(maxX, x);
|
|
74
|
-
maxY = Math.max(maxY, y);
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
x1: minX,
|
|
78
|
-
y1: minY,
|
|
79
|
-
x2: maxX,
|
|
80
|
-
y2: maxY
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
RectBox2.fromPoints = fromPoints;
|
|
84
|
-
function merge(...boxes) {
|
|
85
|
-
invariant(boxes.length > 0, "No boxes provided");
|
|
86
|
-
let minX = Infinity;
|
|
87
|
-
let minY = Infinity;
|
|
88
|
-
let maxX = -Infinity;
|
|
89
|
-
let maxY = -Infinity;
|
|
90
|
-
for (const box of boxes) {
|
|
91
|
-
minX = Math.min(minX, box.x1);
|
|
92
|
-
minY = Math.min(minY, box.y1);
|
|
93
|
-
maxX = Math.max(maxX, box.x2);
|
|
94
|
-
maxY = Math.max(maxY, box.y2);
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
x1: minX,
|
|
98
|
-
y1: minY,
|
|
99
|
-
x2: maxX,
|
|
100
|
-
y2: maxY
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
RectBox2.merge = merge;
|
|
104
|
-
function toBBox(box) {
|
|
105
|
-
return {
|
|
106
|
-
x: box.x1,
|
|
107
|
-
y: box.y1,
|
|
108
|
-
width: box.x2 - box.x1,
|
|
109
|
-
height: box.y2 - box.y1
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
RectBox2.toBBox = toBBox;
|
|
113
|
-
})(RectBox || (RectBox = {}));
|
|
114
|
-
|
|
115
|
-
function isTagColorSpecified(spec) {
|
|
116
|
-
const color = typeof spec === "string" ? spec : spec.color;
|
|
117
|
-
return color.startsWith("#") || color.startsWith("rgb");
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const BorderStyles = ["solid", "dashed", "dotted", "none"];
|
|
121
|
-
const ElementShapes = [
|
|
122
|
-
"rectangle",
|
|
123
|
-
"person",
|
|
124
|
-
"browser",
|
|
125
|
-
"mobile",
|
|
126
|
-
"cylinder",
|
|
127
|
-
"storage",
|
|
128
|
-
"queue"
|
|
129
|
-
];
|
|
130
|
-
const ThemeColors = [
|
|
131
|
-
"amber",
|
|
132
|
-
"blue",
|
|
133
|
-
"gray",
|
|
134
|
-
"slate",
|
|
135
|
-
"green",
|
|
136
|
-
"indigo",
|
|
137
|
-
"muted",
|
|
138
|
-
"primary",
|
|
139
|
-
"red",
|
|
140
|
-
"secondary",
|
|
141
|
-
"sky"
|
|
142
|
-
];
|
|
143
|
-
function isThemeColor(color) {
|
|
144
|
-
return ThemeColors.includes(color);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export { BBox, BorderStyles, ElementShapes, RectBox, ThemeColors, isTagColorSpecified, isThemeColor };
|
|
9
|
+
import '../shared/core.B0oEIXqd.mjs';
|
|
10
|
+
import 'rehype-raw';
|
|
11
|
+
import 'rehype-sanitize';
|
|
12
|
+
import 'rehype-stringify';
|
|
13
|
+
import 'remark-gfm';
|
|
14
|
+
import 'remark-parse';
|
|
15
|
+
import 'remark-rehype';
|
|
16
|
+
import 'unified';
|
|
17
|
+
import 'mdast-util-from-markdown';
|
|
18
|
+
import 'mdast-util-to-string';
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { D as DefaultMap } from '../shared/core.CywrQs86.mjs';
|
|
2
|
-
export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.
|
|
3
|
-
import {
|
|
2
|
+
export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.CF82MWyh.mjs';
|
|
3
|
+
import { N as NonEmptyArray } from '../shared/core.DuSLYTG6.mjs';
|
|
4
4
|
import { Tagged, Simplify, Or, IfNever, IsLiteral, And, GreaterThan, IsNever, IsEqual, ReadonlyTuple, IsNumericLiteral } from 'type-fest';
|
|
5
|
+
export { ifilter, ifind, iflat, ihead, imap, ireduce, isIterable, isome, iunique, toArray, toSet } from './iterable/index.mjs';
|
|
6
|
+
import '../shared/core.668kXpZq.mjs';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Mnemonist DefaultWeakMap Typings
|
|
@@ -468,102 +470,6 @@ declare function hasAtLeast(minimum: number): (data: IterableContainer) => boole
|
|
|
468
470
|
declare function isString(value: unknown): value is string;
|
|
469
471
|
declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
|
|
470
472
|
|
|
471
|
-
declare function isIterable<T, I extends Iterable<T>>(something: I | unknown): something is Iterable<T>;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Filters an iterable based on a predicate.
|
|
475
|
-
* Composabel first version of `ifilter`.
|
|
476
|
-
* @signature
|
|
477
|
-
* ifilter(predicate)(data)
|
|
478
|
-
*/
|
|
479
|
-
declare function ifilter<T, S extends T>(predicate: (v: T) => v is S): (iterable: Iterable<T>) => IteratorLike<S>;
|
|
480
|
-
declare function ifilter<T>(predicate: (v: T) => boolean): (iterable: Iterable<T>) => IteratorLike<T>;
|
|
481
|
-
/**
|
|
482
|
-
* Filters an iterable based on a predicate.
|
|
483
|
-
* Data first version of `ifilter`.
|
|
484
|
-
* @signature
|
|
485
|
-
* ifilter(data, predicate)
|
|
486
|
-
* @example
|
|
487
|
-
* ifilter(new Set([1, 2, 3]), x => x % 2 === 1) // => Iterable<[1, 3]>
|
|
488
|
-
*/
|
|
489
|
-
declare function ifilter<T, S extends T>(iterable: Iterable<T>, predicate: (v: T) => v is S): IteratorLike<S>;
|
|
490
|
-
declare function ifilter<T>(iterable: Iterable<T>, predicate: (v: T) => boolean): IteratorLike<T>;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Finds the first element in the iterable that satisfies the predicate.
|
|
494
|
-
* Composable first version of `find`.
|
|
495
|
-
* @signature
|
|
496
|
-
* ifind(predicate)(data)
|
|
497
|
-
*/
|
|
498
|
-
declare function ifind<T, S extends T>(predicate: (item: T) => item is S): (iterable: Iterable<T>) => S | undefined;
|
|
499
|
-
declare function ifind<T>(predicate: (item: T) => boolean): (iterable: Iterable<T>) => T | undefined;
|
|
500
|
-
/**
|
|
501
|
-
* Finds the first element in the iterable that satisfies the predicate.
|
|
502
|
-
* Data first version of `find`.
|
|
503
|
-
* @signature
|
|
504
|
-
* ifind(data, predicate)
|
|
505
|
-
*/
|
|
506
|
-
declare function ifind<T, S extends T>(iterable: Iterable<T>, predicate: (item: T) => item is S): S | undefined;
|
|
507
|
-
declare function ifind<T>(iterable: Iterable<T>, predicate: (item: T) => boolean): T | undefined;
|
|
508
|
-
|
|
509
|
-
declare function iflat(): <T>(iterable: Iterable<IteratorLike<T>>) => IteratorLike<T>;
|
|
510
|
-
declare function iflat<T>(iterable: Iterable<IteratorLike<T>>): IteratorLike<T>;
|
|
511
|
-
|
|
512
|
-
declare function ihead<T>(): (iterable: Iterable<T>) => T | undefined;
|
|
513
|
-
/**
|
|
514
|
-
* Finds the first element in the iterable that satisfies the predicate.
|
|
515
|
-
* Data first version of `find`.
|
|
516
|
-
* @signature
|
|
517
|
-
* ifind(data, predicate)
|
|
518
|
-
*/
|
|
519
|
-
declare function ihead<T>(iterable: Iterable<T>): T | undefined;
|
|
520
|
-
|
|
521
|
-
type MapFunction<T, S> = (item: T) => S;
|
|
522
|
-
/**
|
|
523
|
-
* Maps an iterable using a mapper function.
|
|
524
|
-
* Composable first version of `imap`.
|
|
525
|
-
* @signature
|
|
526
|
-
* imap(mapper)(data)
|
|
527
|
-
*/
|
|
528
|
-
declare function imap<T, S>(mapper: MapFunction<T, S>): (iterable: Iterable<T>) => IteratorLike<S>;
|
|
529
|
-
/**
|
|
530
|
-
* Maps an iterable using a mapper function.
|
|
531
|
-
* Data first version of `imap`.
|
|
532
|
-
* @signature
|
|
533
|
-
* imap(data, mapper)
|
|
534
|
-
*/
|
|
535
|
-
declare function imap<T, S>(iterable: Iterable<T>, mapper: MapFunction<T, S>): IteratorLike<S>;
|
|
536
|
-
|
|
537
|
-
declare function ireduce<T, R>(reducer: (acc: R, item: T) => R, initialValue: R): (iterable: Iterable<T>) => R;
|
|
538
|
-
declare function ireduce<T, R>(iterable: Iterable<T>, reducer: (acc: R, item: T) => R, initialValue: R): R;
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Checks if at least one element in the iterable satisfies the predicate.
|
|
542
|
-
* Composable first version of `some`.
|
|
543
|
-
* @signature
|
|
544
|
-
* isome(predicate)(data)
|
|
545
|
-
*/
|
|
546
|
-
declare function isome<T>(predicate: (item: T) => boolean): (iterable: Iterable<T>) => boolean;
|
|
547
|
-
/**
|
|
548
|
-
* Checks if at least one element in the iterable satisfies the predicate.
|
|
549
|
-
* Data first version of `some`.
|
|
550
|
-
* @signature
|
|
551
|
-
* isome(data, predicate)
|
|
552
|
-
*/
|
|
553
|
-
declare function isome<T>(iterable: Iterable<T>, predicate: (item: T) => boolean): boolean;
|
|
554
|
-
|
|
555
|
-
declare function toArray(): <T>(iterable: Iterable<T> | ArrayLike<T>) => T[];
|
|
556
|
-
declare function toArray<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
557
|
-
declare function toSet(): <T>(iterable: Iterable<T>) => Set<T>;
|
|
558
|
-
declare function toSet<T>(iterable: Iterable<T>): Set<T>;
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Returns an iterable that yields only unique values.
|
|
562
|
-
* It uses a Set to keep track of the values.
|
|
563
|
-
*/
|
|
564
|
-
declare function iunique(): <T>(iterable: Iterable<T>) => IteratorLike<T>;
|
|
565
|
-
declare function iunique<T>(iterable: Iterable<T>): IteratorLike<T>;
|
|
566
|
-
|
|
567
473
|
/**
|
|
568
474
|
* Saves the value returned by fn() in a hidden property tag of obj object, so next time memoizeProp() is called,
|
|
569
475
|
* that value will be returned, and fn won't be called.
|
|
@@ -618,11 +524,20 @@ declare function difference<T>(a: ReadonlySet<T>, b: ReadonlySet<NoInfer<T>>): S
|
|
|
618
524
|
declare function equals<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): boolean;
|
|
619
525
|
declare function symmetricDifference<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): Set<T>;
|
|
620
526
|
|
|
527
|
+
declare function objectHash(value: any): string;
|
|
528
|
+
|
|
621
529
|
/**
|
|
622
530
|
* @see https://gist.github.com/victor-homyakov/bcb7d7911e4a388b1c810f8c3ce17bcf
|
|
623
531
|
*/
|
|
624
532
|
declare function stringHash(str: string): string;
|
|
625
533
|
|
|
626
|
-
declare function
|
|
534
|
+
declare function markdownToHtml(markdown: string): string;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Converts markdown to plain text, removing any markdown formatting.
|
|
538
|
+
* @param markdown - The markdown to convert.
|
|
539
|
+
* @returns The plain text.
|
|
540
|
+
*/
|
|
541
|
+
declare function markdownToText(markdown: string): string;
|
|
627
542
|
|
|
628
|
-
export { BiMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, commonHead, compareNatural, compareNaturalHierarchically, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast,
|
|
543
|
+
export { BiMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, commonHead, compareNatural, compareNaturalHierarchically, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, intersection, invariant, isNonEmptyArray, isString, markdownToHtml, markdownToText, memoizeProp, nonNullable, nonexhaustive, objectHash, promiseNextTick, stringHash, symmetricDifference, union };
|