@likec4/core 1.9.0 → 1.10.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/index.cjs +107 -8
- package/dist/index.d.cts +18 -6
- package/dist/index.d.mts +18 -6
- package/dist/index.d.ts +793 -0
- package/dist/index.mjs +104 -10
- package/dist/shared/{core.9l7eW3pn.d.cts → core.CpR2fq5B.d.cts} +54 -38
- package/dist/shared/{core.9l7eW3pn.d.mts → core.CpR2fq5B.d.mts} +54 -38
- package/dist/shared/core.CpR2fq5B.d.ts +833 -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 +4 -2
- package/src/index.ts +1 -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
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u, e, n as nonNullable, D as DefaultElementShape, a as DefaultThemeColor } from './shared/core.
|
|
2
|
-
export { A as AsFqn, B as BorderStyles, J as DefaultArrowType, I as DefaultLineStyle, K as DefaultRelationshipColor, E as ElementShapes, c as Expr,
|
|
1
|
+
import { u, e, n as nonNullable, D as DefaultElementShape, a as DefaultThemeColor } from './shared/core.DeifT5lC.mjs';
|
|
2
|
+
export { A as AsFqn, B as BorderStyles, J as DefaultArrowType, I as DefaultLineStyle, K as DefaultRelationshipColor, E as ElementShapes, c as Expr, V as StepEdgeId, X as extractStep, $ as getBBoxCenter, Y as getParallelStepsPrefix, i as invariant, F as isAndOperator, Z as isComputedDynamicView, _ as isComputedElementView, g as isCustomElement, w as isCustomRelationExpr, R as isDynamicView, P as isDynamicViewIncludeRule, Q as isDynamicViewParallelSteps, l as isElement, j as isElementKindExpr, o as isElementPredicateExpr, d as isElementRef, k as isElementTagExpr, S as isElementView, m as isElementWhere, f as isExpandedElementExpr, T as isExtendsElementView, q as isInOut, r as isIncoming, z as isKindEqual, C as isNotOperator, G as isOrOperator, s as isOutgoing, p as isRelation, t as isRelationExpression, x as isRelationPredicateExpr, v as isRelationWhere, U as isScopedElementView, W as isStepEdgeId, y as isTagEqual, L as isThemeColor, O as isViewRuleAutoLayout, M as isViewRulePredicate, N as isViewRuleStyle, h as isWildcard, b as nonexhaustive, H as whereOperatorAsPredicate } from './shared/core.DeifT5lC.mjs';
|
|
3
3
|
|
|
4
4
|
const limit = (x, low = 0, high = 1) => {
|
|
5
5
|
return min$3(max$3(low, x), high);
|
|
@@ -3562,6 +3562,81 @@ function t(r){return typeof r=="string"}
|
|
|
3562
3562
|
|
|
3563
3563
|
function n(e){return !!e}
|
|
3564
3564
|
|
|
3565
|
+
function getDefaultExportFromCjs (x) {
|
|
3566
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
var naturalCompareLite = {exports: {}};
|
|
3570
|
+
|
|
3571
|
+
/*
|
|
3572
|
+
* @version 1.4.0
|
|
3573
|
+
* @date 2015-10-26
|
|
3574
|
+
* @stability 3 - Stable
|
|
3575
|
+
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
3576
|
+
* @license MIT License
|
|
3577
|
+
*/
|
|
3578
|
+
|
|
3579
|
+
|
|
3580
|
+
var naturalCompare = function(a, b) {
|
|
3581
|
+
var i, codeA
|
|
3582
|
+
, codeB = 1
|
|
3583
|
+
, posA = 0
|
|
3584
|
+
, posB = 0
|
|
3585
|
+
, alphabet = String.alphabet;
|
|
3586
|
+
|
|
3587
|
+
function getCode(str, pos, code) {
|
|
3588
|
+
if (code) {
|
|
3589
|
+
for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
|
|
3590
|
+
return +str.slice(pos - 1, i)
|
|
3591
|
+
}
|
|
3592
|
+
code = alphabet && alphabet.indexOf(str.charAt(pos));
|
|
3593
|
+
return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
|
|
3594
|
+
: code < 46 ? 65 // -
|
|
3595
|
+
: code < 48 ? code - 1
|
|
3596
|
+
: code < 58 ? code + 18 // 0-9
|
|
3597
|
+
: code < 65 ? code - 11
|
|
3598
|
+
: code < 91 ? code + 11 // A-Z
|
|
3599
|
+
: code < 97 ? code - 37
|
|
3600
|
+
: code < 123 ? code + 5 // a-z
|
|
3601
|
+
: code - 63
|
|
3602
|
+
}
|
|
3603
|
+
|
|
3604
|
+
|
|
3605
|
+
if ((a+="") != (b+="")) for (;codeB;) {
|
|
3606
|
+
codeA = getCode(a, posA++);
|
|
3607
|
+
codeB = getCode(b, posB++);
|
|
3608
|
+
|
|
3609
|
+
if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
|
|
3610
|
+
codeA = getCode(a, posA, posA);
|
|
3611
|
+
codeB = getCode(b, posB, posA = i);
|
|
3612
|
+
posB = i;
|
|
3613
|
+
}
|
|
3614
|
+
|
|
3615
|
+
if (codeA != codeB) return (codeA < codeB) ? -1 : 1
|
|
3616
|
+
}
|
|
3617
|
+
return 0
|
|
3618
|
+
};
|
|
3619
|
+
|
|
3620
|
+
try {
|
|
3621
|
+
naturalCompareLite.exports = naturalCompare;
|
|
3622
|
+
} catch (e) {
|
|
3623
|
+
String.naturalCompare = naturalCompare;
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3626
|
+
var naturalCompareLiteExports = naturalCompareLite.exports;
|
|
3627
|
+
const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
|
|
3628
|
+
|
|
3629
|
+
function compareNatural(a, b) {
|
|
3630
|
+
if (a === b) return 0;
|
|
3631
|
+
if (t(a)) {
|
|
3632
|
+
if (t(b)) {
|
|
3633
|
+
return compare(a, b);
|
|
3634
|
+
}
|
|
3635
|
+
return 1;
|
|
3636
|
+
}
|
|
3637
|
+
return t(b) ? -1 : 0;
|
|
3638
|
+
}
|
|
3639
|
+
|
|
3565
3640
|
function isString(value) {
|
|
3566
3641
|
return value != null && typeof value === "string";
|
|
3567
3642
|
}
|
|
@@ -3658,6 +3733,25 @@ function compareFqnHierarchically(a, b) {
|
|
|
3658
3733
|
function compareByFqnHierarchically(a, b) {
|
|
3659
3734
|
return compareFqnHierarchically(a.id, b.id);
|
|
3660
3735
|
}
|
|
3736
|
+
function sortByFqnHierarchically(array) {
|
|
3737
|
+
return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
|
|
3738
|
+
return a.fqn.length - b.fqn.length;
|
|
3739
|
+
}).map(({ item }) => item);
|
|
3740
|
+
}
|
|
3741
|
+
function sortNaturalByFqn(array) {
|
|
3742
|
+
return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
|
|
3743
|
+
if (a.fqn.length !== b.fqn.length) {
|
|
3744
|
+
return a.fqn.length - b.fqn.length;
|
|
3745
|
+
}
|
|
3746
|
+
for (let i = 0; i < a.fqn.length; i++) {
|
|
3747
|
+
const compare = compareNatural(a.fqn[i], b.fqn[i]);
|
|
3748
|
+
if (compare !== 0) {
|
|
3749
|
+
return compare;
|
|
3750
|
+
}
|
|
3751
|
+
}
|
|
3752
|
+
return 0;
|
|
3753
|
+
}).map(({ item }) => item);
|
|
3754
|
+
}
|
|
3661
3755
|
|
|
3662
3756
|
class LikeC4ViewModel {
|
|
3663
3757
|
constructor(view, model) {
|
|
@@ -4283,14 +4377,14 @@ const compareRelations = (a, b) => {
|
|
|
4283
4377
|
return -1;
|
|
4284
4378
|
}
|
|
4285
4379
|
const compareParents = parentA && parentB ? compareFqnHierarchically(parentA, parentB) : 0;
|
|
4286
|
-
if (compareParents
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
return
|
|
4380
|
+
if (compareParents !== 0) {
|
|
4381
|
+
return compareParents;
|
|
4382
|
+
}
|
|
4383
|
+
const compareSource = compareFqnHierarchically(a.source, b.source);
|
|
4384
|
+
if (compareSource !== 0) {
|
|
4385
|
+
return compareSource;
|
|
4292
4386
|
}
|
|
4293
|
-
return
|
|
4387
|
+
return compareFqnHierarchically(a.target, b.target);
|
|
4294
4388
|
};
|
|
4295
4389
|
|
|
4296
|
-
export { DefaultElementShape, DefaultThemeColor, ElementColors, LikeC4Model, LikeC4ViewModel, RelationshipColors, ancestorsFqn, commonAncestor, compareByFqnHierarchically, compareFqnHierarchically, compareRelations, computeColorValues, defaultTheme, delay, i as hasAtLeast, isAncestor, isDescendantOf, isNonEmptyArray, isSameHierarchy, isString, nameFromFqn, nonNullable, notDescendantOf, parentFqn, parentFqnPredicate };
|
|
4390
|
+
export { DefaultElementShape, DefaultThemeColor, ElementColors, LikeC4Model, LikeC4ViewModel, RelationshipColors, ancestorsFqn, commonAncestor, compareByFqnHierarchically, compareFqnHierarchically, compareNatural, compareRelations, computeColorValues, defaultTheme, delay, i as hasAtLeast, isAncestor, isDescendantOf, isNonEmptyArray, isSameHierarchy, isString, nameFromFqn, nonNullable, notDescendantOf, parentFqn, parentFqnPredicate, sortByFqnHierarchically, sortNaturalByFqn };
|
|
@@ -228,6 +228,7 @@ interface TagSpec {
|
|
|
228
228
|
interface Link {
|
|
229
229
|
readonly title?: string;
|
|
230
230
|
readonly url: string;
|
|
231
|
+
readonly relative?: string;
|
|
231
232
|
}
|
|
232
233
|
interface Element {
|
|
233
234
|
readonly id: Fqn;
|
|
@@ -301,40 +302,6 @@ type Filterable<FTag extends string = string, FKind extends string = string> = {
|
|
|
301
302
|
type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
|
|
302
303
|
declare function whereOperatorAsPredicate<FTag extends string = string, FKind extends string = string>(operator: WhereOperator<FTag, FKind>): OperatorPredicate<Filterable<FTag, FKind>>;
|
|
303
304
|
|
|
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
305
|
type ElementNotation = {
|
|
339
306
|
kinds: ElementKind[];
|
|
340
307
|
shape: ElementShape;
|
|
@@ -412,12 +379,19 @@ interface DynamicViewStep {
|
|
|
412
379
|
readonly description?: string;
|
|
413
380
|
readonly technology?: string;
|
|
414
381
|
readonly notation?: string;
|
|
382
|
+
readonly notes?: string;
|
|
415
383
|
readonly color?: Color;
|
|
416
384
|
readonly line?: RelationshipLineType;
|
|
417
385
|
readonly head?: RelationshipArrowType;
|
|
418
386
|
readonly tail?: RelationshipArrowType;
|
|
419
387
|
readonly isBackward?: boolean;
|
|
388
|
+
readonly navigateTo?: ViewID;
|
|
389
|
+
__parallel?: never;
|
|
420
390
|
}
|
|
391
|
+
interface DynamicViewParallelSteps {
|
|
392
|
+
readonly __parallel: DynamicViewStep[];
|
|
393
|
+
}
|
|
394
|
+
type DynamicViewStepOrParallel = DynamicViewStep | DynamicViewParallelSteps;
|
|
421
395
|
type DynamicViewIncludeRule = {
|
|
422
396
|
include: ElementPredicateExpression[];
|
|
423
397
|
};
|
|
@@ -425,9 +399,10 @@ declare function isDynamicViewIncludeRule(rule: DynamicViewRule): rule is Dynami
|
|
|
425
399
|
type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
|
|
426
400
|
interface DynamicView extends BasicView<'dynamic'> {
|
|
427
401
|
readonly __: 'dynamic';
|
|
428
|
-
readonly steps:
|
|
402
|
+
readonly steps: DynamicViewStepOrParallel[];
|
|
429
403
|
readonly rules: DynamicViewRule[];
|
|
430
404
|
}
|
|
405
|
+
declare function isDynamicViewParallelSteps(step: DynamicViewStepOrParallel): step is DynamicViewParallelSteps;
|
|
431
406
|
type CustomColorDefinitions = {
|
|
432
407
|
[key: string]: ThemeColorValues;
|
|
433
408
|
};
|
|
@@ -438,11 +413,12 @@ declare function isExtendsElementView(view: LikeC4View): view is ExtendsElementV
|
|
|
438
413
|
declare function isScopedElementView(view: LikeC4View): view is ScopedElementView;
|
|
439
414
|
type NodeId = Tagged<string, 'Fqn'>;
|
|
440
415
|
type EdgeId = Tagged<string, 'EdgeId'>;
|
|
441
|
-
type StepEdgeIdLiteral = `step-${number}`;
|
|
416
|
+
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
442
417
|
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
443
|
-
declare function StepEdgeId(step: number): StepEdgeId;
|
|
418
|
+
declare function StepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
444
419
|
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
445
420
|
declare function extractStep(id: EdgeId): number;
|
|
421
|
+
declare function getParallelStepsPrefix(id: string): string | null;
|
|
446
422
|
interface ComputedNode {
|
|
447
423
|
id: NodeId;
|
|
448
424
|
kind: ElementKind;
|
|
@@ -484,11 +460,14 @@ interface ComputedEdge {
|
|
|
484
460
|
technology?: string;
|
|
485
461
|
relations: RelationID[];
|
|
486
462
|
kind?: RelationshipKind;
|
|
463
|
+
notation?: string;
|
|
464
|
+
notes?: string;
|
|
487
465
|
color?: Color;
|
|
488
466
|
line?: RelationshipLineType;
|
|
489
467
|
head?: RelationshipArrowType;
|
|
490
468
|
tail?: RelationshipArrowType;
|
|
491
469
|
tags?: NonEmptyArray<Tag>;
|
|
470
|
+
navigateTo?: ViewID;
|
|
492
471
|
/**
|
|
493
472
|
* If this edge is derived from custom relationship predicate
|
|
494
473
|
*/
|
|
@@ -582,6 +561,41 @@ type ViewManualLayout = {
|
|
|
582
561
|
}>;
|
|
583
562
|
};
|
|
584
563
|
|
|
564
|
+
type RelationID = Tagged<string, 'RelationID'>;
|
|
565
|
+
type RelationshipKind = Tagged<string, 'RelationshipKind'>;
|
|
566
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
567
|
+
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
568
|
+
declare const DefaultLineStyle = "dashed";
|
|
569
|
+
declare const DefaultArrowType = "normal";
|
|
570
|
+
declare const DefaultRelationshipColor = "gray";
|
|
571
|
+
interface Relation {
|
|
572
|
+
readonly id: RelationID;
|
|
573
|
+
readonly source: Fqn;
|
|
574
|
+
readonly target: Fqn;
|
|
575
|
+
readonly title: string;
|
|
576
|
+
readonly description?: string;
|
|
577
|
+
readonly technology?: string;
|
|
578
|
+
readonly tags?: NonEmptyArray<Tag>;
|
|
579
|
+
readonly kind?: RelationshipKind;
|
|
580
|
+
readonly color?: Color;
|
|
581
|
+
readonly line?: RelationshipLineType;
|
|
582
|
+
readonly head?: RelationshipArrowType;
|
|
583
|
+
readonly tail?: RelationshipArrowType;
|
|
584
|
+
readonly links?: NonEmptyArray<Link>;
|
|
585
|
+
readonly navigateTo?: ViewID;
|
|
586
|
+
readonly metadata?: {
|
|
587
|
+
[key: string]: string;
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
interface RelationshipKindSpecification {
|
|
591
|
+
readonly technology?: string;
|
|
592
|
+
readonly notation?: string;
|
|
593
|
+
readonly color?: Color;
|
|
594
|
+
readonly line?: RelationshipLineType;
|
|
595
|
+
readonly head?: RelationshipArrowType;
|
|
596
|
+
readonly tail?: RelationshipArrowType;
|
|
597
|
+
}
|
|
598
|
+
|
|
585
599
|
interface BaseExpr {
|
|
586
600
|
where?: never;
|
|
587
601
|
element?: never;
|
|
@@ -683,6 +697,8 @@ interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
|
|
|
683
697
|
description?: string;
|
|
684
698
|
technology?: string;
|
|
685
699
|
notation?: string;
|
|
700
|
+
navigateTo?: ViewID;
|
|
701
|
+
notes?: string;
|
|
686
702
|
color?: Color;
|
|
687
703
|
line?: RelationshipLineType;
|
|
688
704
|
head?: RelationshipArrowType;
|
|
@@ -814,4 +830,4 @@ declare namespace ViewChange {
|
|
|
814
830
|
}
|
|
815
831
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
816
832
|
|
|
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 Primitive 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
|
|
833
|
+
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 Primitive 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 CustomColor as m, type Point 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 };
|
|
@@ -228,6 +228,7 @@ interface TagSpec {
|
|
|
228
228
|
interface Link {
|
|
229
229
|
readonly title?: string;
|
|
230
230
|
readonly url: string;
|
|
231
|
+
readonly relative?: string;
|
|
231
232
|
}
|
|
232
233
|
interface Element {
|
|
233
234
|
readonly id: Fqn;
|
|
@@ -301,40 +302,6 @@ type Filterable<FTag extends string = string, FKind extends string = string> = {
|
|
|
301
302
|
type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
|
|
302
303
|
declare function whereOperatorAsPredicate<FTag extends string = string, FKind extends string = string>(operator: WhereOperator<FTag, FKind>): OperatorPredicate<Filterable<FTag, FKind>>;
|
|
303
304
|
|
|
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
305
|
type ElementNotation = {
|
|
339
306
|
kinds: ElementKind[];
|
|
340
307
|
shape: ElementShape;
|
|
@@ -412,12 +379,19 @@ interface DynamicViewStep {
|
|
|
412
379
|
readonly description?: string;
|
|
413
380
|
readonly technology?: string;
|
|
414
381
|
readonly notation?: string;
|
|
382
|
+
readonly notes?: string;
|
|
415
383
|
readonly color?: Color;
|
|
416
384
|
readonly line?: RelationshipLineType;
|
|
417
385
|
readonly head?: RelationshipArrowType;
|
|
418
386
|
readonly tail?: RelationshipArrowType;
|
|
419
387
|
readonly isBackward?: boolean;
|
|
388
|
+
readonly navigateTo?: ViewID;
|
|
389
|
+
__parallel?: never;
|
|
420
390
|
}
|
|
391
|
+
interface DynamicViewParallelSteps {
|
|
392
|
+
readonly __parallel: DynamicViewStep[];
|
|
393
|
+
}
|
|
394
|
+
type DynamicViewStepOrParallel = DynamicViewStep | DynamicViewParallelSteps;
|
|
421
395
|
type DynamicViewIncludeRule = {
|
|
422
396
|
include: ElementPredicateExpression[];
|
|
423
397
|
};
|
|
@@ -425,9 +399,10 @@ declare function isDynamicViewIncludeRule(rule: DynamicViewRule): rule is Dynami
|
|
|
425
399
|
type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
|
|
426
400
|
interface DynamicView extends BasicView<'dynamic'> {
|
|
427
401
|
readonly __: 'dynamic';
|
|
428
|
-
readonly steps:
|
|
402
|
+
readonly steps: DynamicViewStepOrParallel[];
|
|
429
403
|
readonly rules: DynamicViewRule[];
|
|
430
404
|
}
|
|
405
|
+
declare function isDynamicViewParallelSteps(step: DynamicViewStepOrParallel): step is DynamicViewParallelSteps;
|
|
431
406
|
type CustomColorDefinitions = {
|
|
432
407
|
[key: string]: ThemeColorValues;
|
|
433
408
|
};
|
|
@@ -438,11 +413,12 @@ declare function isExtendsElementView(view: LikeC4View): view is ExtendsElementV
|
|
|
438
413
|
declare function isScopedElementView(view: LikeC4View): view is ScopedElementView;
|
|
439
414
|
type NodeId = Tagged<string, 'Fqn'>;
|
|
440
415
|
type EdgeId = Tagged<string, 'EdgeId'>;
|
|
441
|
-
type StepEdgeIdLiteral = `step-${number}`;
|
|
416
|
+
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
442
417
|
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
443
|
-
declare function StepEdgeId(step: number): StepEdgeId;
|
|
418
|
+
declare function StepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
444
419
|
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
445
420
|
declare function extractStep(id: EdgeId): number;
|
|
421
|
+
declare function getParallelStepsPrefix(id: string): string | null;
|
|
446
422
|
interface ComputedNode {
|
|
447
423
|
id: NodeId;
|
|
448
424
|
kind: ElementKind;
|
|
@@ -484,11 +460,14 @@ interface ComputedEdge {
|
|
|
484
460
|
technology?: string;
|
|
485
461
|
relations: RelationID[];
|
|
486
462
|
kind?: RelationshipKind;
|
|
463
|
+
notation?: string;
|
|
464
|
+
notes?: string;
|
|
487
465
|
color?: Color;
|
|
488
466
|
line?: RelationshipLineType;
|
|
489
467
|
head?: RelationshipArrowType;
|
|
490
468
|
tail?: RelationshipArrowType;
|
|
491
469
|
tags?: NonEmptyArray<Tag>;
|
|
470
|
+
navigateTo?: ViewID;
|
|
492
471
|
/**
|
|
493
472
|
* If this edge is derived from custom relationship predicate
|
|
494
473
|
*/
|
|
@@ -582,6 +561,41 @@ type ViewManualLayout = {
|
|
|
582
561
|
}>;
|
|
583
562
|
};
|
|
584
563
|
|
|
564
|
+
type RelationID = Tagged<string, 'RelationID'>;
|
|
565
|
+
type RelationshipKind = Tagged<string, 'RelationshipKind'>;
|
|
566
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
567
|
+
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
568
|
+
declare const DefaultLineStyle = "dashed";
|
|
569
|
+
declare const DefaultArrowType = "normal";
|
|
570
|
+
declare const DefaultRelationshipColor = "gray";
|
|
571
|
+
interface Relation {
|
|
572
|
+
readonly id: RelationID;
|
|
573
|
+
readonly source: Fqn;
|
|
574
|
+
readonly target: Fqn;
|
|
575
|
+
readonly title: string;
|
|
576
|
+
readonly description?: string;
|
|
577
|
+
readonly technology?: string;
|
|
578
|
+
readonly tags?: NonEmptyArray<Tag>;
|
|
579
|
+
readonly kind?: RelationshipKind;
|
|
580
|
+
readonly color?: Color;
|
|
581
|
+
readonly line?: RelationshipLineType;
|
|
582
|
+
readonly head?: RelationshipArrowType;
|
|
583
|
+
readonly tail?: RelationshipArrowType;
|
|
584
|
+
readonly links?: NonEmptyArray<Link>;
|
|
585
|
+
readonly navigateTo?: ViewID;
|
|
586
|
+
readonly metadata?: {
|
|
587
|
+
[key: string]: string;
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
interface RelationshipKindSpecification {
|
|
591
|
+
readonly technology?: string;
|
|
592
|
+
readonly notation?: string;
|
|
593
|
+
readonly color?: Color;
|
|
594
|
+
readonly line?: RelationshipLineType;
|
|
595
|
+
readonly head?: RelationshipArrowType;
|
|
596
|
+
readonly tail?: RelationshipArrowType;
|
|
597
|
+
}
|
|
598
|
+
|
|
585
599
|
interface BaseExpr {
|
|
586
600
|
where?: never;
|
|
587
601
|
element?: never;
|
|
@@ -683,6 +697,8 @@ interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
|
|
|
683
697
|
description?: string;
|
|
684
698
|
technology?: string;
|
|
685
699
|
notation?: string;
|
|
700
|
+
navigateTo?: ViewID;
|
|
701
|
+
notes?: string;
|
|
686
702
|
color?: Color;
|
|
687
703
|
line?: RelationshipLineType;
|
|
688
704
|
head?: RelationshipArrowType;
|
|
@@ -814,4 +830,4 @@ declare namespace ViewChange {
|
|
|
814
830
|
}
|
|
815
831
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
816
832
|
|
|
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 Primitive 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
|
|
833
|
+
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 Primitive 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 CustomColor as m, type Point 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 };
|