@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.
@@ -5,17 +5,15 @@ import {
5
5
  import"../cli-a4ax1vkc.js";
6
6
  import {
7
7
  VERSION2
8
- } from "../cli-nkm2j980.js";
9
- import"../cli-kzp16pt5.js";
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-eqq7a3wz.js";
13
+ } from "../cli-abzdy8pn.js";
15
14
  import {
16
15
  loadSource2
17
- } from "../cli-b4n941t8.js";
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION2
3
- } from "../cli-nkm2j980.js";
3
+ } from "../cli-z3ccx2y4.js";
4
4
  import"../cli-gh5166k6.js";
5
5
  import {
6
6
  THEME_NAMES2,
@@ -7,13 +7,11 @@ import {
7
7
  parse2,
8
8
  sniff2,
9
9
  loadSource2
10
- } from "../cli-b4n941t8.js";
11
- import"../cli-njgyf690.js";
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-nkm2j980.js";
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,
@@ -7,7 +7,7 @@ import {
7
7
  import"../cli-5v9761s9.js";
8
8
  import {
9
9
  VERSION2
10
- } from "../cli-nkm2j980.js";
10
+ } from "../cli-z3ccx2y4.js";
11
11
  export {
12
12
  VERSION2 as VERSION,
13
13
  WEBGL_THRESHOLD2 as WEBGL_THRESHOLD,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standarx/graph",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Declarative graph and diagram rendering",
@@ -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 };