@likec4/core 0.46.0 → 0.47.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/cjs/types/expression.d.ts +17 -2
- package/dist/cjs/types/expression.js +4 -0
- package/dist/cjs/utils/relations.d.ts +4 -0
- package/dist/esm/types/expression.d.ts +17 -2
- package/dist/esm/types/expression.js +3 -0
- package/dist/esm/utils/relations.d.ts +4 -0
- package/dist/types/types/expression.d.ts +17 -2
- package/dist/types/utils/relations.d.ts +4 -0
- package/package.json +2 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { ElementKind, Fqn, Tag } from './element';
|
|
1
|
+
import type { ElementKind, ElementShape, Fqn, Tag } from './element';
|
|
2
|
+
import type { ThemeColor } from './theme';
|
|
3
|
+
import type { ViewID } from './view';
|
|
2
4
|
interface BaseExpr {
|
|
3
5
|
element?: never;
|
|
6
|
+
custom?: never;
|
|
4
7
|
elementKind?: never;
|
|
5
8
|
elementTag?: never;
|
|
6
9
|
isEqual?: never;
|
|
@@ -17,6 +20,18 @@ export interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isDescedants
|
|
|
17
20
|
isDescedants?: boolean;
|
|
18
21
|
}
|
|
19
22
|
export declare function isElementRef(expr: Expression): expr is ElementRefExpr;
|
|
23
|
+
export interface CustomElementExpr extends Omit<BaseExpr, 'custom'> {
|
|
24
|
+
custom: {
|
|
25
|
+
element: Fqn;
|
|
26
|
+
title?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
technology?: string;
|
|
29
|
+
shape?: ElementShape;
|
|
30
|
+
color?: ThemeColor;
|
|
31
|
+
navigateTo?: ViewID;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare function isCustomElement(expr: Expression): expr is CustomElementExpr;
|
|
20
35
|
export interface WildcardExpr extends Omit<BaseExpr, 'wildcard'> {
|
|
21
36
|
wildcard: true;
|
|
22
37
|
}
|
|
@@ -52,5 +67,5 @@ export interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
|
|
|
52
67
|
export declare function isOutgoing(expr: Expression): expr is OutgoingExpr;
|
|
53
68
|
export type AnyRelationExpression = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
|
|
54
69
|
export declare function isAnyRelation(expr: Expression): expr is AnyRelationExpression;
|
|
55
|
-
export type Expression = ElementExpression | AnyRelationExpression;
|
|
70
|
+
export type Expression = ElementExpression | CustomElementExpr | AnyRelationExpression;
|
|
56
71
|
export {};
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isAnyRelation = isAnyRelation;
|
|
7
|
+
exports.isCustomElement = isCustomElement;
|
|
7
8
|
exports.isElement = isElement;
|
|
8
9
|
exports.isElementKindExpr = isElementKindExpr;
|
|
9
10
|
exports.isElementRef = isElementRef;
|
|
@@ -16,6 +17,9 @@ exports.isWildcard = isWildcard;
|
|
|
16
17
|
function isElementRef(expr) {
|
|
17
18
|
return "element" in expr;
|
|
18
19
|
}
|
|
20
|
+
function isCustomElement(expr) {
|
|
21
|
+
return "custom" in expr;
|
|
22
|
+
}
|
|
19
23
|
function isWildcard(expr) {
|
|
20
24
|
return "wildcard" in expr;
|
|
21
25
|
}
|
|
@@ -4,6 +4,10 @@ type Relation = {
|
|
|
4
4
|
target: string;
|
|
5
5
|
};
|
|
6
6
|
type RelationPredicate = (rel: Relation) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Compares two relations hierarchically.
|
|
9
|
+
* From the most general (implicit) to the most specific.
|
|
10
|
+
*/
|
|
7
11
|
export declare const compareRelations: <T extends {
|
|
8
12
|
source: string;
|
|
9
13
|
target: string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { ElementKind, Fqn, Tag } from './element';
|
|
1
|
+
import type { ElementKind, ElementShape, Fqn, Tag } from './element';
|
|
2
|
+
import type { ThemeColor } from './theme';
|
|
3
|
+
import type { ViewID } from './view';
|
|
2
4
|
interface BaseExpr {
|
|
3
5
|
element?: never;
|
|
6
|
+
custom?: never;
|
|
4
7
|
elementKind?: never;
|
|
5
8
|
elementTag?: never;
|
|
6
9
|
isEqual?: never;
|
|
@@ -17,6 +20,18 @@ export interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isDescedants
|
|
|
17
20
|
isDescedants?: boolean;
|
|
18
21
|
}
|
|
19
22
|
export declare function isElementRef(expr: Expression): expr is ElementRefExpr;
|
|
23
|
+
export interface CustomElementExpr extends Omit<BaseExpr, 'custom'> {
|
|
24
|
+
custom: {
|
|
25
|
+
element: Fqn;
|
|
26
|
+
title?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
technology?: string;
|
|
29
|
+
shape?: ElementShape;
|
|
30
|
+
color?: ThemeColor;
|
|
31
|
+
navigateTo?: ViewID;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare function isCustomElement(expr: Expression): expr is CustomElementExpr;
|
|
20
35
|
export interface WildcardExpr extends Omit<BaseExpr, 'wildcard'> {
|
|
21
36
|
wildcard: true;
|
|
22
37
|
}
|
|
@@ -52,5 +67,5 @@ export interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
|
|
|
52
67
|
export declare function isOutgoing(expr: Expression): expr is OutgoingExpr;
|
|
53
68
|
export type AnyRelationExpression = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
|
|
54
69
|
export declare function isAnyRelation(expr: Expression): expr is AnyRelationExpression;
|
|
55
|
-
export type Expression = ElementExpression | AnyRelationExpression;
|
|
70
|
+
export type Expression = ElementExpression | CustomElementExpr | AnyRelationExpression;
|
|
56
71
|
export {};
|
|
@@ -4,6 +4,10 @@ type Relation = {
|
|
|
4
4
|
target: string;
|
|
5
5
|
};
|
|
6
6
|
type RelationPredicate = (rel: Relation) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Compares two relations hierarchically.
|
|
9
|
+
* From the most general (implicit) to the most specific.
|
|
10
|
+
*/
|
|
7
11
|
export declare const compareRelations: <T extends {
|
|
8
12
|
source: string;
|
|
9
13
|
target: string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { ElementKind, Fqn, Tag } from './element';
|
|
1
|
+
import type { ElementKind, ElementShape, Fqn, Tag } from './element';
|
|
2
|
+
import type { ThemeColor } from './theme';
|
|
3
|
+
import type { ViewID } from './view';
|
|
2
4
|
interface BaseExpr {
|
|
3
5
|
element?: never;
|
|
6
|
+
custom?: never;
|
|
4
7
|
elementKind?: never;
|
|
5
8
|
elementTag?: never;
|
|
6
9
|
isEqual?: never;
|
|
@@ -17,6 +20,18 @@ export interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isDescedants
|
|
|
17
20
|
isDescedants?: boolean;
|
|
18
21
|
}
|
|
19
22
|
export declare function isElementRef(expr: Expression): expr is ElementRefExpr;
|
|
23
|
+
export interface CustomElementExpr extends Omit<BaseExpr, 'custom'> {
|
|
24
|
+
custom: {
|
|
25
|
+
element: Fqn;
|
|
26
|
+
title?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
technology?: string;
|
|
29
|
+
shape?: ElementShape;
|
|
30
|
+
color?: ThemeColor;
|
|
31
|
+
navigateTo?: ViewID;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare function isCustomElement(expr: Expression): expr is CustomElementExpr;
|
|
20
35
|
export interface WildcardExpr extends Omit<BaseExpr, 'wildcard'> {
|
|
21
36
|
wildcard: true;
|
|
22
37
|
}
|
|
@@ -52,6 +67,6 @@ export interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
|
|
|
52
67
|
export declare function isOutgoing(expr: Expression): expr is OutgoingExpr;
|
|
53
68
|
export type AnyRelationExpression = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
|
|
54
69
|
export declare function isAnyRelation(expr: Expression): expr is AnyRelationExpression;
|
|
55
|
-
export type Expression = ElementExpression | AnyRelationExpression;
|
|
70
|
+
export type Expression = ElementExpression | CustomElementExpr | AnyRelationExpression;
|
|
56
71
|
export {};
|
|
57
72
|
//# sourceMappingURL=expression.d.ts.map
|
|
@@ -4,6 +4,10 @@ type Relation = {
|
|
|
4
4
|
target: string;
|
|
5
5
|
};
|
|
6
6
|
type RelationPredicate = (rel: Relation) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Compares two relations hierarchically.
|
|
9
|
+
* From the most general (implicit) to the most specific.
|
|
10
|
+
*/
|
|
7
11
|
export declare const compareRelations: <T extends {
|
|
8
12
|
source: string;
|
|
9
13
|
target: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://likec4.dev",
|
|
6
6
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"unbuild": "^2.0.0",
|
|
89
89
|
"vitest": "^0.34.6"
|
|
90
90
|
},
|
|
91
|
-
"packageManager": "yarn@4.0.
|
|
91
|
+
"packageManager": "yarn@4.0.2",
|
|
92
92
|
"volta": {
|
|
93
93
|
"extends": "../../package.json"
|
|
94
94
|
},
|