@likec4/core 1.9.0 → 1.10.1
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/index.cjs +311 -111
- package/dist/index.d.cts +191 -158
- package/dist/index.d.mts +191 -158
- package/dist/index.d.ts +814 -0
- package/dist/index.mjs +308 -113
- package/dist/shared/{core.9l7eW3pn.d.cts → core.Czd51Dd8.d.cts} +55 -38
- package/dist/shared/{core.9l7eW3pn.d.mts → core.Czd51Dd8.d.mts} +55 -38
- package/dist/shared/core.Czd51Dd8.d.ts +834 -0
- package/dist/shared/{core.DcPLm41i.cjs → core.Db3ntVII.cjs} +17 -3
- package/dist/shared/{core.DfUTsojZ.mjs → core.DeifT5lC.mjs} +16 -4
- package/dist/types/index.cjs +3 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.mjs +1 -1
- package/package.json +9 -7
- package/src/index.ts +1 -0
- package/src/types/_common.ts +2 -0
- package/src/types/element.ts +3 -0
- package/src/types/expression.ts +4 -0
- package/src/types/relation.ts +3 -0
- package/src/types/view.ts +37 -6
- package/src/utils/compare-natural.spec.ts +37 -0
- package/src/utils/compare-natural.ts +14 -0
- package/src/utils/fqn.spec.ts +99 -2
- package/src/utils/fqn.ts +38 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/relations.spec.ts +1 -1
- package/src/utils/relations.ts +7 -7
|
@@ -199,6 +199,7 @@ interface LikeC4Theme {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
202
|
+
type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
|
|
202
203
|
type IconUrl = Tagged<string, 'IconUrl'>;
|
|
203
204
|
type CustomColor = string;
|
|
204
205
|
type Point = readonly [x: number, y: number];
|
|
@@ -228,6 +229,7 @@ interface TagSpec {
|
|
|
228
229
|
interface Link {
|
|
229
230
|
readonly title?: string;
|
|
230
231
|
readonly url: string;
|
|
232
|
+
readonly relative?: string;
|
|
231
233
|
}
|
|
232
234
|
interface Element {
|
|
233
235
|
readonly id: Fqn;
|
|
@@ -301,40 +303,6 @@ type Filterable<FTag extends string = string, FKind extends string = string> = {
|
|
|
301
303
|
type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
|
|
302
304
|
declare function whereOperatorAsPredicate<FTag extends string = string, FKind extends string = string>(operator: WhereOperator<FTag, FKind>): OperatorPredicate<Filterable<FTag, FKind>>;
|
|
303
305
|
|
|
304
|
-
type RelationID = Tagged<string, 'RelationID'>;
|
|
305
|
-
type RelationshipKind = Tagged<string, 'RelationshipKind'>;
|
|
306
|
-
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
307
|
-
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
308
|
-
declare const DefaultLineStyle = "dashed";
|
|
309
|
-
declare const DefaultArrowType = "normal";
|
|
310
|
-
declare const DefaultRelationshipColor = "gray";
|
|
311
|
-
interface Relation {
|
|
312
|
-
readonly id: RelationID;
|
|
313
|
-
readonly source: Fqn;
|
|
314
|
-
readonly target: Fqn;
|
|
315
|
-
readonly title: string;
|
|
316
|
-
readonly description?: string;
|
|
317
|
-
readonly technology?: string;
|
|
318
|
-
readonly tags?: NonEmptyArray<Tag>;
|
|
319
|
-
readonly kind?: RelationshipKind;
|
|
320
|
-
readonly color?: Color;
|
|
321
|
-
readonly line?: RelationshipLineType;
|
|
322
|
-
readonly head?: RelationshipArrowType;
|
|
323
|
-
readonly tail?: RelationshipArrowType;
|
|
324
|
-
readonly links?: NonEmptyArray<Link>;
|
|
325
|
-
readonly metadata?: {
|
|
326
|
-
[key: string]: string;
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
interface RelationshipKindSpecification {
|
|
330
|
-
readonly technology?: string;
|
|
331
|
-
readonly notation?: string;
|
|
332
|
-
readonly color?: Color;
|
|
333
|
-
readonly line?: RelationshipLineType;
|
|
334
|
-
readonly head?: RelationshipArrowType;
|
|
335
|
-
readonly tail?: RelationshipArrowType;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
306
|
type ElementNotation = {
|
|
339
307
|
kinds: ElementKind[];
|
|
340
308
|
shape: ElementShape;
|
|
@@ -412,12 +380,19 @@ interface DynamicViewStep {
|
|
|
412
380
|
readonly description?: string;
|
|
413
381
|
readonly technology?: string;
|
|
414
382
|
readonly notation?: string;
|
|
383
|
+
readonly notes?: string;
|
|
415
384
|
readonly color?: Color;
|
|
416
385
|
readonly line?: RelationshipLineType;
|
|
417
386
|
readonly head?: RelationshipArrowType;
|
|
418
387
|
readonly tail?: RelationshipArrowType;
|
|
419
388
|
readonly isBackward?: boolean;
|
|
389
|
+
readonly navigateTo?: ViewID;
|
|
390
|
+
__parallel?: never;
|
|
420
391
|
}
|
|
392
|
+
interface DynamicViewParallelSteps {
|
|
393
|
+
readonly __parallel: DynamicViewStep[];
|
|
394
|
+
}
|
|
395
|
+
type DynamicViewStepOrParallel = DynamicViewStep | DynamicViewParallelSteps;
|
|
421
396
|
type DynamicViewIncludeRule = {
|
|
422
397
|
include: ElementPredicateExpression[];
|
|
423
398
|
};
|
|
@@ -425,9 +400,10 @@ declare function isDynamicViewIncludeRule(rule: DynamicViewRule): rule is Dynami
|
|
|
425
400
|
type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
|
|
426
401
|
interface DynamicView extends BasicView<'dynamic'> {
|
|
427
402
|
readonly __: 'dynamic';
|
|
428
|
-
readonly steps:
|
|
403
|
+
readonly steps: DynamicViewStepOrParallel[];
|
|
429
404
|
readonly rules: DynamicViewRule[];
|
|
430
405
|
}
|
|
406
|
+
declare function isDynamicViewParallelSteps(step: DynamicViewStepOrParallel): step is DynamicViewParallelSteps;
|
|
431
407
|
type CustomColorDefinitions = {
|
|
432
408
|
[key: string]: ThemeColorValues;
|
|
433
409
|
};
|
|
@@ -438,11 +414,12 @@ declare function isExtendsElementView(view: LikeC4View): view is ExtendsElementV
|
|
|
438
414
|
declare function isScopedElementView(view: LikeC4View): view is ScopedElementView;
|
|
439
415
|
type NodeId = Tagged<string, 'Fqn'>;
|
|
440
416
|
type EdgeId = Tagged<string, 'EdgeId'>;
|
|
441
|
-
type StepEdgeIdLiteral = `step-${number}`;
|
|
417
|
+
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
442
418
|
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
443
|
-
declare function StepEdgeId(step: number): StepEdgeId;
|
|
419
|
+
declare function StepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
444
420
|
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
445
421
|
declare function extractStep(id: EdgeId): number;
|
|
422
|
+
declare function getParallelStepsPrefix(id: string): string | null;
|
|
446
423
|
interface ComputedNode {
|
|
447
424
|
id: NodeId;
|
|
448
425
|
kind: ElementKind;
|
|
@@ -484,11 +461,14 @@ interface ComputedEdge {
|
|
|
484
461
|
technology?: string;
|
|
485
462
|
relations: RelationID[];
|
|
486
463
|
kind?: RelationshipKind;
|
|
464
|
+
notation?: string;
|
|
465
|
+
notes?: string;
|
|
487
466
|
color?: Color;
|
|
488
467
|
line?: RelationshipLineType;
|
|
489
468
|
head?: RelationshipArrowType;
|
|
490
469
|
tail?: RelationshipArrowType;
|
|
491
470
|
tags?: NonEmptyArray<Tag>;
|
|
471
|
+
navigateTo?: ViewID;
|
|
492
472
|
/**
|
|
493
473
|
* If this edge is derived from custom relationship predicate
|
|
494
474
|
*/
|
|
@@ -582,6 +562,41 @@ type ViewManualLayout = {
|
|
|
582
562
|
}>;
|
|
583
563
|
};
|
|
584
564
|
|
|
565
|
+
type RelationID = Tagged<string, 'RelationID'>;
|
|
566
|
+
type RelationshipKind = Tagged<string, 'RelationshipKind'>;
|
|
567
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
568
|
+
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
569
|
+
declare const DefaultLineStyle = "dashed";
|
|
570
|
+
declare const DefaultArrowType = "normal";
|
|
571
|
+
declare const DefaultRelationshipColor = "gray";
|
|
572
|
+
interface Relation {
|
|
573
|
+
readonly id: RelationID;
|
|
574
|
+
readonly source: Fqn;
|
|
575
|
+
readonly target: Fqn;
|
|
576
|
+
readonly title: string;
|
|
577
|
+
readonly description?: string;
|
|
578
|
+
readonly technology?: string;
|
|
579
|
+
readonly tags?: NonEmptyArray<Tag>;
|
|
580
|
+
readonly kind?: RelationshipKind;
|
|
581
|
+
readonly color?: Color;
|
|
582
|
+
readonly line?: RelationshipLineType;
|
|
583
|
+
readonly head?: RelationshipArrowType;
|
|
584
|
+
readonly tail?: RelationshipArrowType;
|
|
585
|
+
readonly links?: NonEmptyArray<Link>;
|
|
586
|
+
readonly navigateTo?: ViewID;
|
|
587
|
+
readonly metadata?: {
|
|
588
|
+
[key: string]: string;
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
interface RelationshipKindSpecification {
|
|
592
|
+
readonly technology?: string;
|
|
593
|
+
readonly notation?: string;
|
|
594
|
+
readonly color?: Color;
|
|
595
|
+
readonly line?: RelationshipLineType;
|
|
596
|
+
readonly head?: RelationshipArrowType;
|
|
597
|
+
readonly tail?: RelationshipArrowType;
|
|
598
|
+
}
|
|
599
|
+
|
|
585
600
|
interface BaseExpr {
|
|
586
601
|
where?: never;
|
|
587
602
|
element?: never;
|
|
@@ -683,6 +698,8 @@ interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
|
|
|
683
698
|
description?: string;
|
|
684
699
|
technology?: string;
|
|
685
700
|
notation?: string;
|
|
701
|
+
navigateTo?: ViewID;
|
|
702
|
+
notes?: string;
|
|
686
703
|
color?: Color;
|
|
687
704
|
line?: RelationshipLineType;
|
|
688
705
|
head?: RelationshipArrowType;
|
|
@@ -814,4 +831,4 @@ declare namespace ViewChange {
|
|
|
814
831
|
}
|
|
815
832
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
816
833
|
|
|
817
|
-
export { type ElementPredicateExpression as $, AsFqn as A, BorderStyles as B, type ComputedView as C, DefaultThemeColor as D, type EdgeId as E, type Fqn as F, type CustomElementExpr as G, type HexColorLiteral as H, type IconUrl as I, isCustomElement as J, isWildcard as K, type LiteralUnion as L, type ElementKindExpr as M, type NodeId as N, isElementKindExpr as O, type
|
|
834
|
+
export { type ElementPredicateExpression as $, AsFqn as A, BorderStyles as B, type ComputedView as C, DefaultThemeColor as D, type EdgeId as E, type Fqn as F, type CustomElementExpr as G, type HexColorLiteral as H, type IconUrl as I, isCustomElement as J, isWildcard as K, type LiteralUnion as L, type ElementKindExpr as M, type NodeId as N, isElementKindExpr as O, type Point as P, type ElementTagExpr as Q, type RelationID as R, isElementTagExpr as S, type ThemeColorValues as T, type ElementExpression as U, type ViewID as V, type WildcardExpr as W, type XYPoint as X, isElement as Y, type ElementWhereExpr as Z, isElementWhere as _, type Tag as a, type DynamicViewIncludeRule as a$, isElementPredicateExpr as a0, type RelationExpr as a1, isRelation as a2, type InOutExpr as a3, isInOut as a4, type IncomingExpr as a5, isIncoming as a6, type OutgoingExpr as a7, isOutgoing as a8, type RelationExpression as a9, DefaultArrowType as aA, DefaultRelationshipColor as aB, type RelationshipKindSpecification as aC, type ThemeColor as aD, type ColorLiteral as aE, isThemeColor as aF, type ElementThemeColorValues as aG, type ElementThemeColors as aH, type RelationshipThemeColorValues as aI, type RelationshipThemeColors as aJ, type LikeC4Theme as aK, type ViewRulePredicate as aL, isViewRulePredicate as aM, type ViewRuleStyle as aN, isViewRuleStyle as aO, type AutoLayoutDirection as aP, type ViewRuleAutoLayout as aQ, isViewRuleAutoLayout as aR, type ViewRule as aS, type BasicView as aT, type BasicElementView as aU, type ScopedElementView as aV, type ExtendsElementView as aW, type ElementView as aX, type DynamicViewStep as aY, type DynamicViewParallelSteps as aZ, type DynamicViewStepOrParallel as a_, isRelationExpression as aa, type RelationWhereExpr as ab, isRelationWhere as ac, type CustomRelationExpr as ad, isCustomRelationExpr as ae, type RelationPredicateExpression as af, isRelationPredicateExpr as ag, type Expression as ah, type ParsedLikeC4Model as ai, type EqualOperator as aj, type TagEqual as ak, isTagEqual as al, type KindEqual as am, isKindEqual as an, type NotOperator as ao, isNotOperator as ap, type AndOperator as aq, isAndOperator as ar, type OrOperator as as, isOrOperator as at, type WhereOperator as au, whereOperatorAsPredicate as av, OverviewGraph as aw, type RelationshipLineType as ax, type RelationshipArrowType as ay, DefaultLineStyle as az, type ComputedNode as b, isDynamicViewIncludeRule as b0, type DynamicViewRule as b1, type DynamicView as b2, isDynamicViewParallelSteps as b3, type CustomColorDefinitions as b4, type LikeC4View as b5, isDynamicView as b6, isElementView as b7, isExtendsElementView as b8, isScopedElementView as b9, type StepEdgeIdLiteral as ba, StepEdgeId as bb, isStepEdgeId as bc, extractStep as bd, getParallelStepsPrefix as be, type ViewWithHash as bf, type ViewWithNotation as bg, type ComputedElementView as bh, type ComputedDynamicView as bi, isComputedDynamicView as bj, isComputedElementView as bk, type BBox as bl, getBBoxCenter as bm, type DiagramNode as bn, type DiagramEdge as bo, type DiagramView as bp, type ViewManualLayout as bq, ViewChange as br, type ElementNotation as bs, type ElementKind as c, type ElementShape as d, type Color as e, type ComputedEdge as f, type ComputedLikeC4Model as g, type Element as h, type Relation as i, type RelationshipKind as j, type NonEmptyArray as k, expression as l, type NonEmptyReadonlyArray as m, type CustomColor as n, type BorderStyle as o, ElementShapes as p, DefaultElementShape as q, type ElementStyle as r, type TagSpec as s, type Link as t, type ElementKindSpecificationStyle as u, type ElementKindSpecification as v, type ElementRefExpr as w, isElementRef as x, type ExpandedElementExpr as y, isExpandedElementExpr as z };
|
|
@@ -199,6 +199,7 @@ interface LikeC4Theme {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
202
|
+
type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
|
|
202
203
|
type IconUrl = Tagged<string, 'IconUrl'>;
|
|
203
204
|
type CustomColor = string;
|
|
204
205
|
type Point = readonly [x: number, y: number];
|
|
@@ -228,6 +229,7 @@ interface TagSpec {
|
|
|
228
229
|
interface Link {
|
|
229
230
|
readonly title?: string;
|
|
230
231
|
readonly url: string;
|
|
232
|
+
readonly relative?: string;
|
|
231
233
|
}
|
|
232
234
|
interface Element {
|
|
233
235
|
readonly id: Fqn;
|
|
@@ -301,40 +303,6 @@ type Filterable<FTag extends string = string, FKind extends string = string> = {
|
|
|
301
303
|
type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
|
|
302
304
|
declare function whereOperatorAsPredicate<FTag extends string = string, FKind extends string = string>(operator: WhereOperator<FTag, FKind>): OperatorPredicate<Filterable<FTag, FKind>>;
|
|
303
305
|
|
|
304
|
-
type RelationID = Tagged<string, 'RelationID'>;
|
|
305
|
-
type RelationshipKind = Tagged<string, 'RelationshipKind'>;
|
|
306
|
-
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
307
|
-
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
308
|
-
declare const DefaultLineStyle = "dashed";
|
|
309
|
-
declare const DefaultArrowType = "normal";
|
|
310
|
-
declare const DefaultRelationshipColor = "gray";
|
|
311
|
-
interface Relation {
|
|
312
|
-
readonly id: RelationID;
|
|
313
|
-
readonly source: Fqn;
|
|
314
|
-
readonly target: Fqn;
|
|
315
|
-
readonly title: string;
|
|
316
|
-
readonly description?: string;
|
|
317
|
-
readonly technology?: string;
|
|
318
|
-
readonly tags?: NonEmptyArray<Tag>;
|
|
319
|
-
readonly kind?: RelationshipKind;
|
|
320
|
-
readonly color?: Color;
|
|
321
|
-
readonly line?: RelationshipLineType;
|
|
322
|
-
readonly head?: RelationshipArrowType;
|
|
323
|
-
readonly tail?: RelationshipArrowType;
|
|
324
|
-
readonly links?: NonEmptyArray<Link>;
|
|
325
|
-
readonly metadata?: {
|
|
326
|
-
[key: string]: string;
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
interface RelationshipKindSpecification {
|
|
330
|
-
readonly technology?: string;
|
|
331
|
-
readonly notation?: string;
|
|
332
|
-
readonly color?: Color;
|
|
333
|
-
readonly line?: RelationshipLineType;
|
|
334
|
-
readonly head?: RelationshipArrowType;
|
|
335
|
-
readonly tail?: RelationshipArrowType;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
306
|
type ElementNotation = {
|
|
339
307
|
kinds: ElementKind[];
|
|
340
308
|
shape: ElementShape;
|
|
@@ -412,12 +380,19 @@ interface DynamicViewStep {
|
|
|
412
380
|
readonly description?: string;
|
|
413
381
|
readonly technology?: string;
|
|
414
382
|
readonly notation?: string;
|
|
383
|
+
readonly notes?: string;
|
|
415
384
|
readonly color?: Color;
|
|
416
385
|
readonly line?: RelationshipLineType;
|
|
417
386
|
readonly head?: RelationshipArrowType;
|
|
418
387
|
readonly tail?: RelationshipArrowType;
|
|
419
388
|
readonly isBackward?: boolean;
|
|
389
|
+
readonly navigateTo?: ViewID;
|
|
390
|
+
__parallel?: never;
|
|
420
391
|
}
|
|
392
|
+
interface DynamicViewParallelSteps {
|
|
393
|
+
readonly __parallel: DynamicViewStep[];
|
|
394
|
+
}
|
|
395
|
+
type DynamicViewStepOrParallel = DynamicViewStep | DynamicViewParallelSteps;
|
|
421
396
|
type DynamicViewIncludeRule = {
|
|
422
397
|
include: ElementPredicateExpression[];
|
|
423
398
|
};
|
|
@@ -425,9 +400,10 @@ declare function isDynamicViewIncludeRule(rule: DynamicViewRule): rule is Dynami
|
|
|
425
400
|
type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
|
|
426
401
|
interface DynamicView extends BasicView<'dynamic'> {
|
|
427
402
|
readonly __: 'dynamic';
|
|
428
|
-
readonly steps:
|
|
403
|
+
readonly steps: DynamicViewStepOrParallel[];
|
|
429
404
|
readonly rules: DynamicViewRule[];
|
|
430
405
|
}
|
|
406
|
+
declare function isDynamicViewParallelSteps(step: DynamicViewStepOrParallel): step is DynamicViewParallelSteps;
|
|
431
407
|
type CustomColorDefinitions = {
|
|
432
408
|
[key: string]: ThemeColorValues;
|
|
433
409
|
};
|
|
@@ -438,11 +414,12 @@ declare function isExtendsElementView(view: LikeC4View): view is ExtendsElementV
|
|
|
438
414
|
declare function isScopedElementView(view: LikeC4View): view is ScopedElementView;
|
|
439
415
|
type NodeId = Tagged<string, 'Fqn'>;
|
|
440
416
|
type EdgeId = Tagged<string, 'EdgeId'>;
|
|
441
|
-
type StepEdgeIdLiteral = `step-${number}`;
|
|
417
|
+
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
442
418
|
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
443
|
-
declare function StepEdgeId(step: number): StepEdgeId;
|
|
419
|
+
declare function StepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
444
420
|
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
445
421
|
declare function extractStep(id: EdgeId): number;
|
|
422
|
+
declare function getParallelStepsPrefix(id: string): string | null;
|
|
446
423
|
interface ComputedNode {
|
|
447
424
|
id: NodeId;
|
|
448
425
|
kind: ElementKind;
|
|
@@ -484,11 +461,14 @@ interface ComputedEdge {
|
|
|
484
461
|
technology?: string;
|
|
485
462
|
relations: RelationID[];
|
|
486
463
|
kind?: RelationshipKind;
|
|
464
|
+
notation?: string;
|
|
465
|
+
notes?: string;
|
|
487
466
|
color?: Color;
|
|
488
467
|
line?: RelationshipLineType;
|
|
489
468
|
head?: RelationshipArrowType;
|
|
490
469
|
tail?: RelationshipArrowType;
|
|
491
470
|
tags?: NonEmptyArray<Tag>;
|
|
471
|
+
navigateTo?: ViewID;
|
|
492
472
|
/**
|
|
493
473
|
* If this edge is derived from custom relationship predicate
|
|
494
474
|
*/
|
|
@@ -582,6 +562,41 @@ type ViewManualLayout = {
|
|
|
582
562
|
}>;
|
|
583
563
|
};
|
|
584
564
|
|
|
565
|
+
type RelationID = Tagged<string, 'RelationID'>;
|
|
566
|
+
type RelationshipKind = Tagged<string, 'RelationshipKind'>;
|
|
567
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
568
|
+
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
569
|
+
declare const DefaultLineStyle = "dashed";
|
|
570
|
+
declare const DefaultArrowType = "normal";
|
|
571
|
+
declare const DefaultRelationshipColor = "gray";
|
|
572
|
+
interface Relation {
|
|
573
|
+
readonly id: RelationID;
|
|
574
|
+
readonly source: Fqn;
|
|
575
|
+
readonly target: Fqn;
|
|
576
|
+
readonly title: string;
|
|
577
|
+
readonly description?: string;
|
|
578
|
+
readonly technology?: string;
|
|
579
|
+
readonly tags?: NonEmptyArray<Tag>;
|
|
580
|
+
readonly kind?: RelationshipKind;
|
|
581
|
+
readonly color?: Color;
|
|
582
|
+
readonly line?: RelationshipLineType;
|
|
583
|
+
readonly head?: RelationshipArrowType;
|
|
584
|
+
readonly tail?: RelationshipArrowType;
|
|
585
|
+
readonly links?: NonEmptyArray<Link>;
|
|
586
|
+
readonly navigateTo?: ViewID;
|
|
587
|
+
readonly metadata?: {
|
|
588
|
+
[key: string]: string;
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
interface RelationshipKindSpecification {
|
|
592
|
+
readonly technology?: string;
|
|
593
|
+
readonly notation?: string;
|
|
594
|
+
readonly color?: Color;
|
|
595
|
+
readonly line?: RelationshipLineType;
|
|
596
|
+
readonly head?: RelationshipArrowType;
|
|
597
|
+
readonly tail?: RelationshipArrowType;
|
|
598
|
+
}
|
|
599
|
+
|
|
585
600
|
interface BaseExpr {
|
|
586
601
|
where?: never;
|
|
587
602
|
element?: never;
|
|
@@ -683,6 +698,8 @@ interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
|
|
|
683
698
|
description?: string;
|
|
684
699
|
technology?: string;
|
|
685
700
|
notation?: string;
|
|
701
|
+
navigateTo?: ViewID;
|
|
702
|
+
notes?: string;
|
|
686
703
|
color?: Color;
|
|
687
704
|
line?: RelationshipLineType;
|
|
688
705
|
head?: RelationshipArrowType;
|
|
@@ -814,4 +831,4 @@ declare namespace ViewChange {
|
|
|
814
831
|
}
|
|
815
832
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
816
833
|
|
|
817
|
-
export { type ElementPredicateExpression as $, AsFqn as A, BorderStyles as B, type ComputedView as C, DefaultThemeColor as D, type EdgeId as E, type Fqn as F, type CustomElementExpr as G, type HexColorLiteral as H, type IconUrl as I, isCustomElement as J, isWildcard as K, type LiteralUnion as L, type ElementKindExpr as M, type NodeId as N, isElementKindExpr as O, type
|
|
834
|
+
export { type ElementPredicateExpression as $, AsFqn as A, BorderStyles as B, type ComputedView as C, DefaultThemeColor as D, type EdgeId as E, type Fqn as F, type CustomElementExpr as G, type HexColorLiteral as H, type IconUrl as I, isCustomElement as J, isWildcard as K, type LiteralUnion as L, type ElementKindExpr as M, type NodeId as N, isElementKindExpr as O, type Point as P, type ElementTagExpr as Q, type RelationID as R, isElementTagExpr as S, type ThemeColorValues as T, type ElementExpression as U, type ViewID as V, type WildcardExpr as W, type XYPoint as X, isElement as Y, type ElementWhereExpr as Z, isElementWhere as _, type Tag as a, type DynamicViewIncludeRule as a$, isElementPredicateExpr as a0, type RelationExpr as a1, isRelation as a2, type InOutExpr as a3, isInOut as a4, type IncomingExpr as a5, isIncoming as a6, type OutgoingExpr as a7, isOutgoing as a8, type RelationExpression as a9, DefaultArrowType as aA, DefaultRelationshipColor as aB, type RelationshipKindSpecification as aC, type ThemeColor as aD, type ColorLiteral as aE, isThemeColor as aF, type ElementThemeColorValues as aG, type ElementThemeColors as aH, type RelationshipThemeColorValues as aI, type RelationshipThemeColors as aJ, type LikeC4Theme as aK, type ViewRulePredicate as aL, isViewRulePredicate as aM, type ViewRuleStyle as aN, isViewRuleStyle as aO, type AutoLayoutDirection as aP, type ViewRuleAutoLayout as aQ, isViewRuleAutoLayout as aR, type ViewRule as aS, type BasicView as aT, type BasicElementView as aU, type ScopedElementView as aV, type ExtendsElementView as aW, type ElementView as aX, type DynamicViewStep as aY, type DynamicViewParallelSteps as aZ, type DynamicViewStepOrParallel as a_, isRelationExpression as aa, type RelationWhereExpr as ab, isRelationWhere as ac, type CustomRelationExpr as ad, isCustomRelationExpr as ae, type RelationPredicateExpression as af, isRelationPredicateExpr as ag, type Expression as ah, type ParsedLikeC4Model as ai, type EqualOperator as aj, type TagEqual as ak, isTagEqual as al, type KindEqual as am, isKindEqual as an, type NotOperator as ao, isNotOperator as ap, type AndOperator as aq, isAndOperator as ar, type OrOperator as as, isOrOperator as at, type WhereOperator as au, whereOperatorAsPredicate as av, OverviewGraph as aw, type RelationshipLineType as ax, type RelationshipArrowType as ay, DefaultLineStyle as az, type ComputedNode as b, isDynamicViewIncludeRule as b0, type DynamicViewRule as b1, type DynamicView as b2, isDynamicViewParallelSteps as b3, type CustomColorDefinitions as b4, type LikeC4View as b5, isDynamicView as b6, isElementView as b7, isExtendsElementView as b8, isScopedElementView as b9, type StepEdgeIdLiteral as ba, StepEdgeId as bb, isStepEdgeId as bc, extractStep as bd, getParallelStepsPrefix as be, type ViewWithHash as bf, type ViewWithNotation as bg, type ComputedElementView as bh, type ComputedDynamicView as bi, isComputedDynamicView as bj, isComputedElementView as bk, type BBox as bl, getBBoxCenter as bm, type DiagramNode as bn, type DiagramEdge as bo, type DiagramView as bp, type ViewManualLayout as bq, ViewChange as br, type ElementNotation as bs, type ElementKind as c, type ElementShape as d, type Color as e, type ComputedEdge as f, type ComputedLikeC4Model as g, type Element as h, type Relation as i, type RelationshipKind as j, type NonEmptyArray as k, expression as l, type NonEmptyReadonlyArray as m, type CustomColor as n, type BorderStyle as o, ElementShapes as p, DefaultElementShape as q, type ElementStyle as r, type TagSpec as s, type Link as t, type ElementKindSpecificationStyle as u, type ElementKindSpecification as v, type ElementRefExpr as w, isElementRef as x, type ExpandedElementExpr as y, isExpandedElementExpr as z };
|