@standarx/graph 1.0.0 → 1.1.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/README.fr.md +4 -2
- package/README.md +4 -2
- package/dist/{cli-eqq7a3wz.js → cli-abzdy8pn.js} +1 -1
- package/dist/{cli-xhdxp3cj.js → cli-m29a3wgx.js} +201 -9
- package/dist/{cli-b4n941t8.js → cli-nhmh6yxk.js} +1082 -36
- package/dist/{cli-nkm2j980.js → cli-z3ccx2y4.js} +1 -1
- package/dist/cli.js +3 -5
- package/dist/core/index.js +4 -6
- package/dist/export/index.js +4 -6
- package/dist/format/index.js +4 -6
- package/dist/html/index.js +5 -7
- package/dist/html/layout-worker.generated.d.ts +1 -1
- package/dist/language/actions.d.ts +3 -0
- package/dist/language/diagnostics.d.ts +14 -0
- package/dist/language/index.d.ts +3 -1
- package/dist/language/index.js +180 -5
- package/dist/language/types.d.ts +12 -0
- package/dist/layout/index.js +3 -4
- package/dist/{layout-worker.generated-emmvgfb1.js → layout-worker.generated-xsmtzrfj.js} +1 -1
- package/dist/remark/index.js +4 -6
- package/dist/svg/index.js +1 -1
- package/dist/text/index.js +3 -5
- package/dist/webgl/index.js +1 -1
- package/package.json +1 -1
- package/dist/cli-kzp16pt5.js +0 -207
- package/dist/cli-njgyf690.js +0 -1060
package/dist/remark/index.js
CHANGED
|
@@ -5,17 +5,15 @@ import {
|
|
|
5
5
|
import"../cli-a4ax1vkc.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION2
|
|
8
|
-
} from "../cli-
|
|
9
|
-
import"../cli-
|
|
10
|
-
import"../cli-xhdxp3cj.js";
|
|
8
|
+
} from "../cli-z3ccx2y4.js";
|
|
9
|
+
import"../cli-m29a3wgx.js";
|
|
11
10
|
import"../cli-txrzzr2q.js";
|
|
12
11
|
import {
|
|
13
12
|
layout2
|
|
14
|
-
} from "../cli-
|
|
13
|
+
} from "../cli-abzdy8pn.js";
|
|
15
14
|
import {
|
|
16
15
|
loadSource2
|
|
17
|
-
} from "../cli-
|
|
18
|
-
import"../cli-njgyf690.js";
|
|
16
|
+
} from "../cli-nhmh6yxk.js";
|
|
19
17
|
import {
|
|
20
18
|
renderHtml2
|
|
21
19
|
} from "../cli-ywgtv1cg.js";
|
package/dist/svg/index.js
CHANGED
package/dist/text/index.js
CHANGED
|
@@ -7,13 +7,11 @@ import {
|
|
|
7
7
|
parse2,
|
|
8
8
|
sniff2,
|
|
9
9
|
loadSource2
|
|
10
|
-
} from "../cli-
|
|
11
|
-
import"../cli-
|
|
12
|
-
import"../cli-xhdxp3cj.js";
|
|
13
|
-
import"../cli-kzp16pt5.js";
|
|
10
|
+
} from "../cli-nhmh6yxk.js";
|
|
11
|
+
import"../cli-m29a3wgx.js";
|
|
14
12
|
import {
|
|
15
13
|
VERSION2
|
|
16
|
-
} from "../cli-
|
|
14
|
+
} from "../cli-z3ccx2y4.js";
|
|
17
15
|
export {
|
|
18
16
|
SEMANTIC_TOKEN_MODIFIERS2 as SEMANTIC_TOKEN_MODIFIERS,
|
|
19
17
|
SEMANTIC_TOKEN_TYPES2 as SEMANTIC_TOKEN_TYPES,
|
package/dist/webgl/index.js
CHANGED
package/package.json
CHANGED
package/dist/cli-kzp16pt5.js
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
// src/format/schema.ts
|
|
2
|
-
import { Type } from "@sinclair/typebox";
|
|
3
|
-
var FORMAT_VERSION2 = 1;
|
|
4
|
-
var Id = Type.String({ minLength: 1 });
|
|
5
|
-
var ProvenanceSchema2 = Type.Object({
|
|
6
|
-
source: Type.String({ minLength: 1 }),
|
|
7
|
-
confidence: Type.Optional(Type.Union([
|
|
8
|
-
Type.Literal("confirmed"),
|
|
9
|
-
Type.Literal("inferred"),
|
|
10
|
-
Type.Literal("unknown")
|
|
11
|
-
])),
|
|
12
|
-
tool: Type.Optional(Type.String())
|
|
13
|
-
}, { additionalProperties: false });
|
|
14
|
-
var MetaSchema2 = Type.Object({
|
|
15
|
-
provenance: Type.Optional(ProvenanceSchema2),
|
|
16
|
-
coverage: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })),
|
|
17
|
-
freshness: Type.Optional(Type.String({ format: "date-time" })),
|
|
18
|
-
data: Type.Optional(Type.Record(Type.String(), Type.Union([Type.String(), Type.Number(), Type.Boolean()])))
|
|
19
|
-
}, { additionalProperties: false });
|
|
20
|
-
var SHAPES2 = [
|
|
21
|
-
"box",
|
|
22
|
-
"rect",
|
|
23
|
-
"pill",
|
|
24
|
-
"diamond",
|
|
25
|
-
"circle",
|
|
26
|
-
"ellipse",
|
|
27
|
-
"hexagon",
|
|
28
|
-
"parallelogram",
|
|
29
|
-
"cylinder",
|
|
30
|
-
"document",
|
|
31
|
-
"subroutine"
|
|
32
|
-
];
|
|
33
|
-
var ShapeSchema2 = Type.Union(SHAPES2.map((shape) => Type.Literal(shape)));
|
|
34
|
-
var NodeSchema2 = Type.Object({
|
|
35
|
-
id: Id,
|
|
36
|
-
label: Type.Optional(Type.String()),
|
|
37
|
-
type: Type.Optional(Type.String()),
|
|
38
|
-
shape: Type.Optional(ShapeSchema2),
|
|
39
|
-
group: Type.Optional(Type.String()),
|
|
40
|
-
description: Type.Optional(Type.String()),
|
|
41
|
-
link: Type.Optional(Type.String()),
|
|
42
|
-
position: Type.Optional(Type.Object({ x: Type.Number(), y: Type.Number() }, { additionalProperties: false })),
|
|
43
|
-
meta: Type.Optional(MetaSchema2)
|
|
44
|
-
}, { additionalProperties: false });
|
|
45
|
-
var EdgeSchema2 = Type.Object({
|
|
46
|
-
id: Type.Optional(Id),
|
|
47
|
-
from: Type.String(),
|
|
48
|
-
to: Type.String(),
|
|
49
|
-
label: Type.Optional(Type.String()),
|
|
50
|
-
type: Type.Optional(Type.String()),
|
|
51
|
-
directed: Type.Optional(Type.Boolean()),
|
|
52
|
-
meta: Type.Optional(MetaSchema2)
|
|
53
|
-
}, { additionalProperties: false });
|
|
54
|
-
var GroupSchema2 = Type.Object({
|
|
55
|
-
id: Id,
|
|
56
|
-
label: Type.Optional(Type.String()),
|
|
57
|
-
parent: Type.Optional(Type.String()),
|
|
58
|
-
meta: Type.Optional(MetaSchema2)
|
|
59
|
-
}, { additionalProperties: false });
|
|
60
|
-
var DirectionSchema2 = Type.Union([
|
|
61
|
-
Type.Literal("down"),
|
|
62
|
-
Type.Literal("right"),
|
|
63
|
-
Type.Literal("up"),
|
|
64
|
-
Type.Literal("left")
|
|
65
|
-
]);
|
|
66
|
-
var GraphDocumentSchema2 = Type.Object({
|
|
67
|
-
$schema: Type.Optional(Type.String()),
|
|
68
|
-
version: Type.Literal(FORMAT_VERSION2),
|
|
69
|
-
kind: Type.Literal("graph"),
|
|
70
|
-
title: Type.Optional(Type.String()),
|
|
71
|
-
direction: Type.Optional(DirectionSchema2),
|
|
72
|
-
nodes: Type.Array(NodeSchema2),
|
|
73
|
-
edges: Type.Optional(Type.Array(EdgeSchema2)),
|
|
74
|
-
groups: Type.Optional(Type.Array(GroupSchema2)),
|
|
75
|
-
meta: Type.Optional(MetaSchema2)
|
|
76
|
-
}, { additionalProperties: false });
|
|
77
|
-
var ParticipantSchema2 = Type.Object({
|
|
78
|
-
id: Id,
|
|
79
|
-
label: Type.Optional(Type.String()),
|
|
80
|
-
type: Type.Optional(Type.String()),
|
|
81
|
-
meta: Type.Optional(MetaSchema2)
|
|
82
|
-
}, { additionalProperties: false });
|
|
83
|
-
var MessageSchema2 = Type.Object({
|
|
84
|
-
from: Type.String(),
|
|
85
|
-
to: Type.String(),
|
|
86
|
-
label: Type.Optional(Type.String()),
|
|
87
|
-
style: Type.Optional(Type.Union([
|
|
88
|
-
Type.Literal("sync"),
|
|
89
|
-
Type.Literal("async"),
|
|
90
|
-
Type.Literal("reply")
|
|
91
|
-
])),
|
|
92
|
-
meta: Type.Optional(MetaSchema2)
|
|
93
|
-
}, { additionalProperties: false });
|
|
94
|
-
var SequenceDocumentSchema2 = Type.Object({
|
|
95
|
-
$schema: Type.Optional(Type.String()),
|
|
96
|
-
version: Type.Literal(FORMAT_VERSION2),
|
|
97
|
-
kind: Type.Literal("sequence"),
|
|
98
|
-
title: Type.Optional(Type.String()),
|
|
99
|
-
participants: Type.Array(ParticipantSchema2, { minItems: 1 }),
|
|
100
|
-
messages: Type.Array(MessageSchema2),
|
|
101
|
-
meta: Type.Optional(MetaSchema2)
|
|
102
|
-
}, { additionalProperties: false });
|
|
103
|
-
var PSEUDO2 = ["initial", "final", "choice", "fork", "join", "history"];
|
|
104
|
-
var StateSchema2 = Type.Object({
|
|
105
|
-
id: Id,
|
|
106
|
-
label: Type.Optional(Type.String()),
|
|
107
|
-
type: Type.Optional(Type.String()),
|
|
108
|
-
pseudo: Type.Optional(Type.Union(PSEUDO2.map((pseudo) => Type.Literal(pseudo)))),
|
|
109
|
-
parent: Type.Optional(Type.String()),
|
|
110
|
-
actions: Type.Optional(Type.Array(Type.String())),
|
|
111
|
-
description: Type.Optional(Type.String()),
|
|
112
|
-
link: Type.Optional(Type.String()),
|
|
113
|
-
meta: Type.Optional(MetaSchema2)
|
|
114
|
-
}, { additionalProperties: false });
|
|
115
|
-
var TransitionSchema2 = Type.Object({
|
|
116
|
-
id: Type.Optional(Id),
|
|
117
|
-
from: Type.String(),
|
|
118
|
-
to: Type.String(),
|
|
119
|
-
event: Type.Optional(Type.String()),
|
|
120
|
-
guard: Type.Optional(Type.String()),
|
|
121
|
-
action: Type.Optional(Type.String()),
|
|
122
|
-
type: Type.Optional(Type.String()),
|
|
123
|
-
meta: Type.Optional(MetaSchema2)
|
|
124
|
-
}, { additionalProperties: false });
|
|
125
|
-
var StateDocumentSchema2 = Type.Object({
|
|
126
|
-
$schema: Type.Optional(Type.String()),
|
|
127
|
-
version: Type.Literal(FORMAT_VERSION2),
|
|
128
|
-
kind: Type.Literal("state"),
|
|
129
|
-
title: Type.Optional(Type.String()),
|
|
130
|
-
direction: Type.Optional(DirectionSchema2),
|
|
131
|
-
states: Type.Array(StateSchema2, { minItems: 1 }),
|
|
132
|
-
transitions: Type.Optional(Type.Array(TransitionSchema2)),
|
|
133
|
-
meta: Type.Optional(MetaSchema2)
|
|
134
|
-
}, { additionalProperties: false });
|
|
135
|
-
var KEYS2 = ["pk", "fk", "uk"];
|
|
136
|
-
var CARDINALITIES3 = ["one", "zero-or-one", "one-or-more", "zero-or-more"];
|
|
137
|
-
var AttributeSchema2 = Type.Object({
|
|
138
|
-
name: Type.String({ minLength: 1 }),
|
|
139
|
-
type: Type.Optional(Type.String()),
|
|
140
|
-
keys: Type.Optional(Type.Array(Type.Union(KEYS2.map((key) => Type.Literal(key))))),
|
|
141
|
-
nullable: Type.Optional(Type.Boolean()),
|
|
142
|
-
note: Type.Optional(Type.String())
|
|
143
|
-
}, { additionalProperties: false });
|
|
144
|
-
var EntitySchema2 = Type.Object({
|
|
145
|
-
id: Id,
|
|
146
|
-
label: Type.Optional(Type.String()),
|
|
147
|
-
type: Type.Optional(Type.String()),
|
|
148
|
-
description: Type.Optional(Type.String()),
|
|
149
|
-
link: Type.Optional(Type.String()),
|
|
150
|
-
attributes: Type.Optional(Type.Array(AttributeSchema2)),
|
|
151
|
-
meta: Type.Optional(MetaSchema2)
|
|
152
|
-
}, { additionalProperties: false });
|
|
153
|
-
var CardinalitySchema = Type.Union(CARDINALITIES3.map((cardinality) => Type.Literal(cardinality)));
|
|
154
|
-
var RelationSchema2 = Type.Object({
|
|
155
|
-
id: Type.Optional(Id),
|
|
156
|
-
from: Type.String(),
|
|
157
|
-
to: Type.String(),
|
|
158
|
-
fromCardinality: Type.Optional(CardinalitySchema),
|
|
159
|
-
toCardinality: Type.Optional(CardinalitySchema),
|
|
160
|
-
label: Type.Optional(Type.String()),
|
|
161
|
-
identifying: Type.Optional(Type.Boolean()),
|
|
162
|
-
type: Type.Optional(Type.String()),
|
|
163
|
-
meta: Type.Optional(MetaSchema2)
|
|
164
|
-
}, { additionalProperties: false });
|
|
165
|
-
var ErDocumentSchema2 = Type.Object({
|
|
166
|
-
$schema: Type.Optional(Type.String()),
|
|
167
|
-
version: Type.Literal(FORMAT_VERSION2),
|
|
168
|
-
kind: Type.Literal("er"),
|
|
169
|
-
title: Type.Optional(Type.String()),
|
|
170
|
-
direction: Type.Optional(DirectionSchema2),
|
|
171
|
-
entities: Type.Array(EntitySchema2, { minItems: 1 }),
|
|
172
|
-
relations: Type.Optional(Type.Array(RelationSchema2)),
|
|
173
|
-
meta: Type.Optional(MetaSchema2)
|
|
174
|
-
}, { additionalProperties: false });
|
|
175
|
-
var TREE_LAYOUTS2 = ["tree", "mindmap"];
|
|
176
|
-
var TreeNodeSchema2 = Type.Object({
|
|
177
|
-
id: Id,
|
|
178
|
-
label: Type.String(),
|
|
179
|
-
parent: Type.Optional(Type.String()),
|
|
180
|
-
type: Type.Optional(Type.String()),
|
|
181
|
-
shape: Type.Optional(ShapeSchema2),
|
|
182
|
-
description: Type.Optional(Type.String()),
|
|
183
|
-
link: Type.Optional(Type.String()),
|
|
184
|
-
meta: Type.Optional(MetaSchema2)
|
|
185
|
-
}, { additionalProperties: false });
|
|
186
|
-
var TreeDocumentSchema2 = Type.Object({
|
|
187
|
-
$schema: Type.Optional(Type.String()),
|
|
188
|
-
version: Type.Literal(FORMAT_VERSION2),
|
|
189
|
-
kind: Type.Literal("tree"),
|
|
190
|
-
title: Type.Optional(Type.String()),
|
|
191
|
-
layout: Type.Optional(Type.Union(TREE_LAYOUTS2.map((layout) => Type.Literal(layout)))),
|
|
192
|
-
direction: Type.Optional(DirectionSchema2),
|
|
193
|
-
nodes: Type.Array(TreeNodeSchema2, { minItems: 1 }),
|
|
194
|
-
meta: Type.Optional(MetaSchema2)
|
|
195
|
-
}, { additionalProperties: false });
|
|
196
|
-
var DocumentSchema2 = Type.Union([
|
|
197
|
-
GraphDocumentSchema2,
|
|
198
|
-
SequenceDocumentSchema2,
|
|
199
|
-
StateDocumentSchema2,
|
|
200
|
-
ErDocumentSchema2,
|
|
201
|
-
TreeDocumentSchema2
|
|
202
|
-
], {
|
|
203
|
-
$id: "urn:standargraph:graph-document:v1",
|
|
204
|
-
title: "Standargraph document v1"
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
export { FORMAT_VERSION2, ProvenanceSchema2, MetaSchema2, SHAPES2, ShapeSchema2, NodeSchema2, EdgeSchema2, GroupSchema2, DirectionSchema2, GraphDocumentSchema2, ParticipantSchema2, MessageSchema2, SequenceDocumentSchema2, PSEUDO2, StateSchema2, TransitionSchema2, StateDocumentSchema2, KEYS2, CARDINALITIES3, AttributeSchema2, EntitySchema2, RelationSchema2, ErDocumentSchema2, TREE_LAYOUTS2, TreeNodeSchema2, TreeDocumentSchema2, DocumentSchema2 };
|