structured-context-map-views 0.6.2 → 0.7.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.md +1 -1
- package/dist/{ParameterControls-A1HJWyt9.js → ParameterControls-Be05VST0.js} +505 -188
- package/dist/ParameterControls-Be05VST0.js.map +1 -0
- package/dist/artifact.html +70 -1
- package/dist/artifact.js +2 -2
- package/dist/artifact.js.map +1 -1
- package/dist/cli.js +8 -6
- package/dist/cli.js.map +1 -1
- package/dist/{definition-Cp1CCigh.js → definition-SjmROmJC.js} +308 -188
- package/dist/definition-SjmROmJC.js.map +1 -0
- package/dist/html.js +1 -1
- package/dist/html.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{node-B0VWZju6.js → node-ctbuxC-s.js} +5 -9
- package/dist/node-ctbuxC-s.js.map +1 -0
- package/dist/node.js +1 -1
- package/dist/page.html +94 -25
- package/dist/{projection-C-dATsdO.js → projection-DKNLziP0.js} +282 -124
- package/dist/projection-DKNLziP0.js.map +1 -0
- package/dist/read-definitions-DFcOXatz.js +51 -0
- package/dist/read-definitions-DFcOXatz.js.map +1 -0
- package/dist/styles.css +69 -0
- package/dist/types/artifact/load.d.ts +1 -1
- package/dist/types/{layouts/EdgeOverlay.d.ts → components/ConnectorOverlay.d.ts} +6 -15
- package/dist/types/components/GraphLayout.d.ts +8 -0
- package/dist/types/components/LandscapeLayout.d.ts +9 -0
- package/dist/types/{layouts → components}/MapView.d.ts +4 -1
- package/dist/types/components/NeighbourhoodLayout.d.ts +7 -0
- package/dist/types/{layouts/NodeCard.d.ts → components/NodeComponent.d.ts} +1 -1
- package/dist/types/components/TreeLayout.d.ts +6 -0
- package/dist/types/{layouts → components}/XYLayout.d.ts +3 -3
- package/dist/types/{layouts → components}/annotations-context.d.ts +1 -1
- package/dist/types/components/layout.d.ts +22 -0
- package/dist/types/core/annotations.d.ts +2 -3
- package/dist/types/core/definition.d.ts +664 -30
- package/dist/types/core/layouts/graph/schema.d.ts +24 -0
- package/dist/types/core/layouts/helpers.d.ts +42 -0
- package/dist/types/core/layouts/landscape/projection.d.ts +75 -0
- package/dist/types/core/layouts/landscape/schema.d.ts +223 -0
- package/dist/types/core/layouts/neighbourhood/projection.d.ts +26 -0
- package/dist/types/core/layouts/neighbourhood/schema.d.ts +51 -0
- package/dist/types/core/layouts/schemas.d.ts +427 -0
- package/dist/types/core/{tree.d.ts → layouts/tree/projection.d.ts} +9 -11
- package/dist/types/core/layouts/xy/projection.d.ts +32 -0
- package/dist/types/core/{format/xy-layout.d.ts → layouts/xy/schema.d.ts} +2 -0
- package/dist/types/core/{format → schema}/definition-schema.d.ts +22 -12
- package/dist/types/core/{snapshot.d.ts → space-snapshot.d.ts} +1 -4
- package/dist/types/index.d.ts +6 -9
- package/dist/types/node/index.d.ts +6 -12
- package/dist/types/node/page.d.ts +1 -1
- package/dist/types/node/snapshot.d.ts +1 -1
- package/dist/types/viewer/Viewer.d.ts +5 -5
- package/package.json +6 -4
- package/dist/ParameterControls-A1HJWyt9.js.map +0 -1
- package/dist/definition-Cp1CCigh.js.map +0 -1
- package/dist/node-B0VWZju6.js.map +0 -1
- package/dist/projection-C-dATsdO.js.map +0 -1
- package/dist/read-definitions-DNcsxgXM.js +0 -46
- package/dist/read-definitions-DNcsxgXM.js.map +0 -1
- package/dist/types/core/format/index.d.ts +0 -450
- package/dist/types/core/format/landscape-layout.d.ts +0 -102
- package/dist/types/core/graph.d.ts +0 -16
- package/dist/types/core/landscape.d.ts +0 -44
- package/dist/types/core/occurrence.d.ts +0 -11
- package/dist/types/core/xy.d.ts +0 -43
- package/dist/types/layouts/LandscapeLayout.d.ts +0 -8
- package/dist/types/layouts/TreeLayout.d.ts +0 -16
- /package/dist/types/{layouts → components}/ParameterControls.d.ts +0 -0
- /package/dist/types/{layouts → components}/ParameterInputs.d.ts +0 -0
- /package/dist/types/{layouts → components}/useParameterControls.d.ts +0 -0
- /package/dist/types/core/{format/tree-layout.d.ts → layouts/tree/schema.d.ts} +0 -0
- /package/dist/types/core/{format → schema}/param-ref.d.ts +0 -0
- /package/dist/types/core/{format → schema}/schema-url.d.ts +0 -0
- /package/dist/types/core/{format → schema}/settings.d.ts +0 -0
|
@@ -1,450 +0,0 @@
|
|
|
1
|
-
import { definitionSchema } from './definition-schema';
|
|
2
|
-
import { landscapeLayoutSchema } from './landscape-layout';
|
|
3
|
-
import { settingsSchema } from './settings';
|
|
4
|
-
import { treeLayoutSchema } from './tree-layout';
|
|
5
|
-
import { xyLayoutSchema } from './xy-layout';
|
|
6
|
-
export { PARAM_REF } from './param-ref';
|
|
7
|
-
export { definitionSchema, landscapeLayoutSchema, settingsSchema, treeLayoutSchema, xyLayoutSchema };
|
|
8
|
-
/** The bundled schemas describing the map view definition format. */
|
|
9
|
-
export declare const MAP_VIEW_SCHEMAS: readonly [{
|
|
10
|
-
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
11
|
-
readonly $id: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json";
|
|
12
|
-
readonly title: 'Map view definition';
|
|
13
|
-
readonly description: 'Declares how spaces of one schema are projected into a map view: shared parameters, and the regions the map view is composed of.';
|
|
14
|
-
readonly type: 'object';
|
|
15
|
-
readonly required: readonly ['$id', 'schema', 'regions'];
|
|
16
|
-
readonly additionalProperties: false;
|
|
17
|
-
readonly properties: {
|
|
18
|
-
readonly $schema: {
|
|
19
|
-
readonly type: 'string';
|
|
20
|
-
};
|
|
21
|
-
readonly $id: {
|
|
22
|
-
readonly type: 'string';
|
|
23
|
-
readonly pattern: '^sctx-map-view://[^/]+(/[^/]+)?$';
|
|
24
|
-
readonly description: 'Identifier, namespaced by where the definition is found: "sctx-map-view://core/<name>" (bundled), "sctx-map-view://<plugin>/<name>" (a plugin) or "sctx-map-view://<name>" (the config folder).';
|
|
25
|
-
};
|
|
26
|
-
readonly title: {
|
|
27
|
-
readonly type: 'string';
|
|
28
|
-
readonly minLength: 1;
|
|
29
|
-
readonly description: 'Display name. Defaults to the last segment of the `$id`.';
|
|
30
|
-
};
|
|
31
|
-
readonly description: {
|
|
32
|
-
readonly type: 'string';
|
|
33
|
-
};
|
|
34
|
-
readonly schema: {
|
|
35
|
-
readonly type: 'string';
|
|
36
|
-
readonly minLength: 1;
|
|
37
|
-
readonly description: '`$id` of the structured-context schema whose spaces this map view applies to.';
|
|
38
|
-
};
|
|
39
|
-
readonly parameters: {
|
|
40
|
-
readonly type: 'object';
|
|
41
|
-
readonly description: 'Settings the reader can change. Each is a JSON Schema with a default, bound to settings anywhere in the definition with { "$param": "<name>" }.';
|
|
42
|
-
readonly additionalProperties: {
|
|
43
|
-
readonly $ref: '#/$defs/parameter';
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
readonly regions: {
|
|
47
|
-
readonly type: 'array';
|
|
48
|
-
readonly minItems: 1;
|
|
49
|
-
readonly description: 'Parts of the map view, each with its own layout, nodes and edges. Only the first region is rendered for now.';
|
|
50
|
-
readonly items: {
|
|
51
|
-
readonly $ref: '#/$defs/region';
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
readonly $defs: {
|
|
56
|
-
readonly parameter: {
|
|
57
|
-
readonly type: 'object';
|
|
58
|
-
readonly description: "A JSON Schema for the parameter's values (it can $ref, narrow or extend the bundled setting definitions), plus a title for its control.";
|
|
59
|
-
readonly required: readonly ['default'];
|
|
60
|
-
readonly properties: {
|
|
61
|
-
readonly title: {
|
|
62
|
-
readonly type: 'string';
|
|
63
|
-
};
|
|
64
|
-
readonly description: {
|
|
65
|
-
readonly type: 'string';
|
|
66
|
-
};
|
|
67
|
-
readonly default: {};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
readonly paramRef: {
|
|
71
|
-
readonly type: 'object';
|
|
72
|
-
readonly description: "Takes this setting's value from a declared parameter.";
|
|
73
|
-
readonly required: readonly ['$param'];
|
|
74
|
-
readonly additionalProperties: false;
|
|
75
|
-
readonly properties: {
|
|
76
|
-
readonly $param: {
|
|
77
|
-
readonly type: 'string';
|
|
78
|
-
readonly minLength: 1;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
readonly region: {
|
|
83
|
-
readonly type: 'object';
|
|
84
|
-
readonly required: readonly ['id', 'layout'];
|
|
85
|
-
readonly additionalProperties: false;
|
|
86
|
-
readonly properties: {
|
|
87
|
-
readonly id: {
|
|
88
|
-
readonly type: 'string';
|
|
89
|
-
readonly minLength: 1;
|
|
90
|
-
readonly description: 'Unique within the map view; part of every occurrence id in the region.';
|
|
91
|
-
};
|
|
92
|
-
readonly select: {
|
|
93
|
-
readonly type: 'object';
|
|
94
|
-
readonly description: 'Which nodes of the space the region shows. By default, all of them.';
|
|
95
|
-
readonly additionalProperties: false;
|
|
96
|
-
readonly properties: {
|
|
97
|
-
readonly filter: {
|
|
98
|
-
readonly type: 'string';
|
|
99
|
-
readonly minLength: 1;
|
|
100
|
-
readonly description: "A structured-context filter: a view name from the space's config, or an expression such as `WHERE …` or `SELECT … WHERE …`.";
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
readonly layout: {
|
|
105
|
-
readonly description: 'How the region is arranged, chosen by `type`.';
|
|
106
|
-
readonly type: 'object';
|
|
107
|
-
readonly required: readonly ['type'];
|
|
108
|
-
readonly discriminator: {
|
|
109
|
-
readonly propertyName: 'type';
|
|
110
|
-
};
|
|
111
|
-
readonly oneOf: readonly [{
|
|
112
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/tree.json";
|
|
113
|
-
}, {
|
|
114
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/landscape.json";
|
|
115
|
-
}, {
|
|
116
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/xy.json";
|
|
117
|
-
}];
|
|
118
|
-
};
|
|
119
|
-
readonly nodes: {
|
|
120
|
-
readonly type: 'object';
|
|
121
|
-
readonly additionalProperties: false;
|
|
122
|
-
readonly default: {};
|
|
123
|
-
readonly properties: {
|
|
124
|
-
readonly style: {
|
|
125
|
-
readonly description: string;
|
|
126
|
-
readonly default: "card";
|
|
127
|
-
readonly anyOf: readonly [{
|
|
128
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/nodeStyle";
|
|
129
|
-
}, {
|
|
130
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
131
|
-
}];
|
|
132
|
-
};
|
|
133
|
-
readonly fields: {
|
|
134
|
-
readonly description: string;
|
|
135
|
-
readonly default: readonly [];
|
|
136
|
-
readonly anyOf: readonly [{
|
|
137
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/fieldList";
|
|
138
|
-
}, {
|
|
139
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
140
|
-
}];
|
|
141
|
-
};
|
|
142
|
-
readonly validation: {
|
|
143
|
-
readonly description: string;
|
|
144
|
-
readonly default: "off";
|
|
145
|
-
readonly anyOf: readonly [{
|
|
146
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/validationLevel";
|
|
147
|
-
}, {
|
|
148
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
149
|
-
}];
|
|
150
|
-
};
|
|
151
|
-
readonly validationSources: {
|
|
152
|
-
readonly description: string;
|
|
153
|
-
readonly default: readonly ["parse", "schema", "duplicate", "broken-link", "hierarchy", "rule", "gated", "content-link"];
|
|
154
|
-
readonly anyOf: readonly [{
|
|
155
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/validationSources";
|
|
156
|
-
}, {
|
|
157
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
158
|
-
}];
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
readonly edges: {
|
|
163
|
-
readonly type: 'object';
|
|
164
|
-
readonly additionalProperties: false;
|
|
165
|
-
readonly default: {};
|
|
166
|
-
readonly properties: {
|
|
167
|
-
readonly show: {
|
|
168
|
-
readonly description: string;
|
|
169
|
-
readonly default: true;
|
|
170
|
-
readonly anyOf: readonly [{
|
|
171
|
-
readonly type: "boolean";
|
|
172
|
-
}, {
|
|
173
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
174
|
-
}];
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
}, {
|
|
182
|
-
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
183
|
-
readonly $id: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json";
|
|
184
|
-
readonly title: 'Shared map view settings';
|
|
185
|
-
readonly description: 'Reusable setting definitions. Parameters can $ref these and narrow them, e.g. with allOf and enum.';
|
|
186
|
-
readonly $defs: {
|
|
187
|
-
readonly orientation: {
|
|
188
|
-
readonly title: 'Orientation';
|
|
189
|
-
readonly enum: readonly ['vertical', 'horizontal'];
|
|
190
|
-
};
|
|
191
|
-
readonly nodeStyle: {
|
|
192
|
-
readonly title: 'Node style';
|
|
193
|
-
readonly description: 'card: a box with the title and selected fields. shape: a compact marker with a tooltip.';
|
|
194
|
-
readonly enum: readonly ['card', 'shape'];
|
|
195
|
-
};
|
|
196
|
-
readonly validationLevel: {
|
|
197
|
-
readonly title: 'Validation overlay';
|
|
198
|
-
readonly description: 'The lowest severity of validation result shown on nodes, or off. error: only errors. warning: errors and warnings. info: everything.';
|
|
199
|
-
readonly enum: readonly ['off', 'error', 'warning', 'info'];
|
|
200
|
-
};
|
|
201
|
-
readonly validationSources: {
|
|
202
|
-
readonly title: 'Validation sources';
|
|
203
|
-
readonly description: 'Which kinds of validation result are shown. schema: a node failing its schema. duplicate: an id more than one node uses. broken-link: a relationship to a node that does not exist. hierarchy: a node under a parent type it is not allowed under. rule: a schema rule violation. gated: a note that rules were not checked because an ancestor failed. content-link: a link in the body that resolves to no node.';
|
|
204
|
-
readonly type: 'array';
|
|
205
|
-
readonly items: {
|
|
206
|
-
readonly enum: readonly ["parse", "schema", "duplicate", "broken-link", "hierarchy", "rule", "gated", "content-link"];
|
|
207
|
-
};
|
|
208
|
-
readonly uniqueItems: true;
|
|
209
|
-
};
|
|
210
|
-
readonly fieldList: {
|
|
211
|
-
readonly title: 'Fields';
|
|
212
|
-
readonly type: 'array';
|
|
213
|
-
readonly items: {
|
|
214
|
-
readonly type: 'string';
|
|
215
|
-
readonly minLength: 1;
|
|
216
|
-
};
|
|
217
|
-
readonly uniqueItems: true;
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
}, {
|
|
221
|
-
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
222
|
-
readonly $id: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/tree.json";
|
|
223
|
-
readonly title: 'Tree layout';
|
|
224
|
-
readonly description: "A tree over the schema's hierarchy: root-type nodes at the top, children via hierarchy edges.";
|
|
225
|
-
readonly type: 'object';
|
|
226
|
-
readonly required: readonly ['type'];
|
|
227
|
-
readonly additionalProperties: false;
|
|
228
|
-
readonly properties: {
|
|
229
|
-
readonly type: {
|
|
230
|
-
readonly const: 'tree';
|
|
231
|
-
};
|
|
232
|
-
readonly orientation: {
|
|
233
|
-
readonly description: string;
|
|
234
|
-
readonly default: "vertical";
|
|
235
|
-
readonly anyOf: readonly [{
|
|
236
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/orientation";
|
|
237
|
-
}, {
|
|
238
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
239
|
-
}];
|
|
240
|
-
};
|
|
241
|
-
readonly dag: {
|
|
242
|
-
readonly description: string;
|
|
243
|
-
readonly default: "repeat";
|
|
244
|
-
readonly anyOf: readonly [{
|
|
245
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/tree.json#/$defs/dag";
|
|
246
|
-
}, {
|
|
247
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
248
|
-
}];
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
readonly $defs: {
|
|
252
|
-
readonly dag: {
|
|
253
|
-
readonly title: 'Nodes with several parents';
|
|
254
|
-
readonly description: 'repeat: the node appears under each parent, its subtree shown once. cross-edge: the node appears under its first parent, with extra connectors from the others.';
|
|
255
|
-
readonly enum: readonly ['repeat', 'cross-edge'];
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
}, {
|
|
259
|
-
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
260
|
-
readonly $id: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/landscape.json";
|
|
261
|
-
readonly title: 'Landscape layout';
|
|
262
|
-
readonly description: 'Nested containers: each grouping level becomes containers inside the level above, and the last level is drawn as nodes.';
|
|
263
|
-
readonly type: 'object';
|
|
264
|
-
readonly required: readonly ['type', 'group'];
|
|
265
|
-
readonly additionalProperties: false;
|
|
266
|
-
readonly properties: {
|
|
267
|
-
readonly type: {
|
|
268
|
-
readonly const: 'landscape';
|
|
269
|
-
};
|
|
270
|
-
readonly orientation: {
|
|
271
|
-
readonly description: string;
|
|
272
|
-
readonly default: "horizontal";
|
|
273
|
-
readonly anyOf: readonly [{
|
|
274
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/orientation";
|
|
275
|
-
}, {
|
|
276
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
277
|
-
}];
|
|
278
|
-
};
|
|
279
|
-
readonly group: {
|
|
280
|
-
readonly type: 'array';
|
|
281
|
-
readonly minItems: 1;
|
|
282
|
-
readonly description: 'Grouping levels, outermost first. The last level is drawn as nodes; the others as containers. Adjacent node levels are joined by any edge between their types, in either direction.';
|
|
283
|
-
readonly items: {
|
|
284
|
-
readonly type: 'object';
|
|
285
|
-
readonly if: {
|
|
286
|
-
readonly type: 'object';
|
|
287
|
-
readonly required: readonly ['field'];
|
|
288
|
-
};
|
|
289
|
-
readonly then: {
|
|
290
|
-
readonly type: 'object';
|
|
291
|
-
readonly description: "Containers labelled by the values of a field of the next node level's nodes. A node with several values appears under each.";
|
|
292
|
-
readonly required: readonly ['field'];
|
|
293
|
-
readonly additionalProperties: false;
|
|
294
|
-
readonly properties: {
|
|
295
|
-
readonly field: {
|
|
296
|
-
readonly type: 'string';
|
|
297
|
-
readonly minLength: 1;
|
|
298
|
-
};
|
|
299
|
-
};
|
|
300
|
-
};
|
|
301
|
-
readonly else: {
|
|
302
|
-
readonly type: 'object';
|
|
303
|
-
readonly description: 'A level of nodes of one type.';
|
|
304
|
-
readonly required: readonly ['type'];
|
|
305
|
-
readonly additionalProperties: false;
|
|
306
|
-
readonly properties: {
|
|
307
|
-
readonly type: {
|
|
308
|
-
readonly description: 'Node type at this level.';
|
|
309
|
-
readonly anyOf: readonly [{
|
|
310
|
-
readonly type: 'string';
|
|
311
|
-
readonly minLength: 1;
|
|
312
|
-
}, {
|
|
313
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
314
|
-
}];
|
|
315
|
-
};
|
|
316
|
-
readonly edge: {
|
|
317
|
-
readonly type: 'object';
|
|
318
|
-
readonly description: 'Which edges join this level to the node level above (or to the last `via` type). By default, any edge between the two types.';
|
|
319
|
-
readonly required: readonly ['field'];
|
|
320
|
-
readonly additionalProperties: false;
|
|
321
|
-
readonly properties: {
|
|
322
|
-
readonly field: {
|
|
323
|
-
readonly type: 'string';
|
|
324
|
-
readonly minLength: 1;
|
|
325
|
-
};
|
|
326
|
-
};
|
|
327
|
-
};
|
|
328
|
-
readonly via: {
|
|
329
|
-
readonly type: 'array';
|
|
330
|
-
readonly minItems: 1;
|
|
331
|
-
readonly description: 'Types skipped between the node level above and this one, in order. Nodes are joined through a chain of edges across them. Ignored on the first level, which has no level above.';
|
|
332
|
-
readonly items: {
|
|
333
|
-
readonly type: 'string';
|
|
334
|
-
readonly minLength: 1;
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
readonly intermediate: {
|
|
338
|
-
readonly description: string;
|
|
339
|
-
readonly default: "hidden";
|
|
340
|
-
readonly anyOf: readonly [{
|
|
341
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/landscape.json#/$defs/intermediate";
|
|
342
|
-
}, {
|
|
343
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
344
|
-
}];
|
|
345
|
-
};
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
|
-
};
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
readonly $defs: {
|
|
352
|
-
readonly intermediate: {
|
|
353
|
-
readonly title: 'Skipped levels';
|
|
354
|
-
readonly description: 'hidden: not shown. breadcrumb: listed on each node reached through them.';
|
|
355
|
-
readonly enum: readonly ['hidden', 'breadcrumb'];
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
}, {
|
|
359
|
-
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
360
|
-
readonly $id: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/xy.json";
|
|
361
|
-
readonly title: 'XY layout';
|
|
362
|
-
readonly description: 'Nodes positioned on two axes by numeric fields. Nodes of the plotted types without a usable value on both axes are listed beside the plot, not dropped.';
|
|
363
|
-
readonly type: 'object';
|
|
364
|
-
readonly required: readonly ['type', 'x', 'y'];
|
|
365
|
-
readonly additionalProperties: false;
|
|
366
|
-
readonly properties: {
|
|
367
|
-
readonly type: {
|
|
368
|
-
readonly const: 'xy';
|
|
369
|
-
};
|
|
370
|
-
readonly x: {
|
|
371
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/xy.json#/$defs/axis";
|
|
372
|
-
};
|
|
373
|
-
readonly y: {
|
|
374
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/xy.json#/$defs/axis";
|
|
375
|
-
};
|
|
376
|
-
readonly types: {
|
|
377
|
-
readonly description: string;
|
|
378
|
-
readonly default: readonly [];
|
|
379
|
-
readonly anyOf: readonly [{
|
|
380
|
-
readonly type: "array";
|
|
381
|
-
readonly items: {
|
|
382
|
-
readonly type: "string";
|
|
383
|
-
readonly minLength: 1;
|
|
384
|
-
};
|
|
385
|
-
readonly uniqueItems: true;
|
|
386
|
-
}, {
|
|
387
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
388
|
-
}];
|
|
389
|
-
};
|
|
390
|
-
readonly edgeFields: {
|
|
391
|
-
readonly description: string;
|
|
392
|
-
readonly default: readonly [];
|
|
393
|
-
readonly anyOf: readonly [{
|
|
394
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/fieldList";
|
|
395
|
-
}, {
|
|
396
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
397
|
-
}];
|
|
398
|
-
};
|
|
399
|
-
};
|
|
400
|
-
readonly $defs: {
|
|
401
|
-
readonly axis: {
|
|
402
|
-
readonly title: 'Axis';
|
|
403
|
-
readonly type: 'object';
|
|
404
|
-
readonly required: readonly ['field'];
|
|
405
|
-
readonly additionalProperties: false;
|
|
406
|
-
readonly properties: {
|
|
407
|
-
readonly field: {
|
|
408
|
-
readonly description: 'Numeric field giving the position.';
|
|
409
|
-
readonly anyOf: readonly [{
|
|
410
|
-
readonly type: 'string';
|
|
411
|
-
readonly minLength: 1;
|
|
412
|
-
}, {
|
|
413
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
414
|
-
}];
|
|
415
|
-
};
|
|
416
|
-
readonly domain: {
|
|
417
|
-
readonly description: 'Values at the two ends of the axis: [min, max], or "data" for the smallest and largest plotted values. Nodes outside a fixed domain are listed as unplaced.';
|
|
418
|
-
readonly default: 'data';
|
|
419
|
-
readonly anyOf: readonly [{
|
|
420
|
-
readonly const: 'data';
|
|
421
|
-
}, {
|
|
422
|
-
readonly type: 'array';
|
|
423
|
-
readonly items: {
|
|
424
|
-
readonly type: 'number';
|
|
425
|
-
};
|
|
426
|
-
readonly minItems: 2;
|
|
427
|
-
readonly maxItems: 2;
|
|
428
|
-
}];
|
|
429
|
-
};
|
|
430
|
-
readonly direction: {
|
|
431
|
-
readonly description: string;
|
|
432
|
-
readonly default: "ascending";
|
|
433
|
-
readonly anyOf: readonly [{
|
|
434
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/xy.json#/$defs/direction";
|
|
435
|
-
}, {
|
|
436
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
437
|
-
}];
|
|
438
|
-
};
|
|
439
|
-
readonly label: {
|
|
440
|
-
readonly type: 'string';
|
|
441
|
-
readonly description: 'Axis title. Defaults to the field name.';
|
|
442
|
-
};
|
|
443
|
-
};
|
|
444
|
-
};
|
|
445
|
-
readonly direction: {
|
|
446
|
-
readonly title: 'Axis direction';
|
|
447
|
-
readonly enum: readonly ['ascending', 'descending'];
|
|
448
|
-
};
|
|
449
|
-
};
|
|
450
|
-
}];
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/** Settings of the landscape layout: nested containers following an authored grouping. */
|
|
2
|
-
export declare const landscapeLayoutSchema: {
|
|
3
|
-
readonly $schema: 'https://json-schema.org/draft/2020-12/schema';
|
|
4
|
-
readonly $id: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/landscape.json";
|
|
5
|
-
readonly title: 'Landscape layout';
|
|
6
|
-
readonly description: 'Nested containers: each grouping level becomes containers inside the level above, and the last level is drawn as nodes.';
|
|
7
|
-
readonly type: 'object';
|
|
8
|
-
readonly required: readonly ['type', 'group'];
|
|
9
|
-
readonly additionalProperties: false;
|
|
10
|
-
readonly properties: {
|
|
11
|
-
readonly type: {
|
|
12
|
-
readonly const: 'landscape';
|
|
13
|
-
};
|
|
14
|
-
readonly orientation: {
|
|
15
|
-
readonly description: string;
|
|
16
|
-
readonly default: "horizontal";
|
|
17
|
-
readonly anyOf: readonly [{
|
|
18
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/settings.json#/$defs/orientation";
|
|
19
|
-
}, {
|
|
20
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
21
|
-
}];
|
|
22
|
-
};
|
|
23
|
-
readonly group: {
|
|
24
|
-
readonly type: 'array';
|
|
25
|
-
readonly minItems: 1;
|
|
26
|
-
readonly description: 'Grouping levels, outermost first. The last level is drawn as nodes; the others as containers. Adjacent node levels are joined by any edge between their types, in either direction.';
|
|
27
|
-
readonly items: {
|
|
28
|
-
readonly type: 'object';
|
|
29
|
-
readonly if: {
|
|
30
|
-
readonly type: 'object';
|
|
31
|
-
readonly required: readonly ['field'];
|
|
32
|
-
};
|
|
33
|
-
readonly then: {
|
|
34
|
-
readonly type: 'object';
|
|
35
|
-
readonly description: "Containers labelled by the values of a field of the next node level's nodes. A node with several values appears under each.";
|
|
36
|
-
readonly required: readonly ['field'];
|
|
37
|
-
readonly additionalProperties: false;
|
|
38
|
-
readonly properties: {
|
|
39
|
-
readonly field: {
|
|
40
|
-
readonly type: 'string';
|
|
41
|
-
readonly minLength: 1;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
readonly else: {
|
|
46
|
-
readonly type: 'object';
|
|
47
|
-
readonly description: 'A level of nodes of one type.';
|
|
48
|
-
readonly required: readonly ['type'];
|
|
49
|
-
readonly additionalProperties: false;
|
|
50
|
-
readonly properties: {
|
|
51
|
-
readonly type: {
|
|
52
|
-
readonly description: 'Node type at this level.';
|
|
53
|
-
readonly anyOf: readonly [{
|
|
54
|
-
readonly type: 'string';
|
|
55
|
-
readonly minLength: 1;
|
|
56
|
-
}, {
|
|
57
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
58
|
-
}];
|
|
59
|
-
};
|
|
60
|
-
readonly edge: {
|
|
61
|
-
readonly type: 'object';
|
|
62
|
-
readonly description: 'Which edges join this level to the node level above (or to the last `via` type). By default, any edge between the two types.';
|
|
63
|
-
readonly required: readonly ['field'];
|
|
64
|
-
readonly additionalProperties: false;
|
|
65
|
-
readonly properties: {
|
|
66
|
-
readonly field: {
|
|
67
|
-
readonly type: 'string';
|
|
68
|
-
readonly minLength: 1;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
readonly via: {
|
|
73
|
-
readonly type: 'array';
|
|
74
|
-
readonly minItems: 1;
|
|
75
|
-
readonly description: 'Types skipped between the node level above and this one, in order. Nodes are joined through a chain of edges across them. Ignored on the first level, which has no level above.';
|
|
76
|
-
readonly items: {
|
|
77
|
-
readonly type: 'string';
|
|
78
|
-
readonly minLength: 1;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
readonly intermediate: {
|
|
82
|
-
readonly description: string;
|
|
83
|
-
readonly default: "hidden";
|
|
84
|
-
readonly anyOf: readonly [{
|
|
85
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/layouts/landscape.json#/$defs/intermediate";
|
|
86
|
-
}, {
|
|
87
|
-
readonly $ref: "https://raw.githubusercontent.com/mindsocket/structured-context-map-views/main/schemas/generated/latest/definition.json#/$defs/paramRef";
|
|
88
|
-
}];
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
readonly $defs: {
|
|
96
|
-
readonly intermediate: {
|
|
97
|
-
readonly title: 'Skipped levels';
|
|
98
|
-
readonly description: 'hidden: not shown. breadcrumb: listed on each node reached through them.';
|
|
99
|
-
readonly enum: readonly ['hidden', 'breadcrumb'];
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Hierarchy, SpaceGraph, SpaceNode } from 'structured-context/api';
|
|
2
|
-
type NodeId = SpaceNode['id'];
|
|
3
|
-
/** A directed parent → child edge of a space graph, carrying the metadata of the reference it came from. */
|
|
4
|
-
export type Edge = SpaceGraph['parentEdges'] extends ReadonlyMap<string, readonly (infer E)[]> ? E : never;
|
|
5
|
-
/**
|
|
6
|
-
* Edges to a node's parents, in the order the node declares them. A graph narrowed by a filter keeps
|
|
7
|
-
* edges to parents outside it; those are left out.
|
|
8
|
-
*/
|
|
9
|
-
export declare function parentEdges(graph: SpaceGraph, id: NodeId): readonly Edge[];
|
|
10
|
-
/** Edges to a node's children, in graph order of the children. */
|
|
11
|
-
export declare function childEdges(graph: SpaceGraph, id: NodeId): readonly Edge[];
|
|
12
|
-
/** Every edge whose parent and child are both in the graph. */
|
|
13
|
-
export declare function edgesWithin(graph: SpaceGraph): Edge[];
|
|
14
|
-
/** Whether an edge belongs to the given hierarchy (as opposed to a relationship or another hierarchy). */
|
|
15
|
-
export declare function isHierarchyEdge(edge: Edge, hierarchy: Hierarchy | undefined): boolean;
|
|
16
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { SpaceGraph, SpaceNode } from 'structured-context/api';
|
|
2
|
-
import type { LandscapeLayoutConfig } from './definition';
|
|
3
|
-
/** One rendered container or node in a landscape. */
|
|
4
|
-
export type LandscapeOccurrence = {
|
|
5
|
-
/** Path-based key, unique within the map view (see {@link occurrenceKey}). */
|
|
6
|
-
key: string;
|
|
7
|
-
/** Index of the grouping level this occurrence belongs to. */
|
|
8
|
-
level: number;
|
|
9
|
-
/** A node, or a field value shared by the nodes inside (`null`: the field is empty). */
|
|
10
|
-
item: {
|
|
11
|
-
kind: 'node';
|
|
12
|
-
node: SpaceNode;
|
|
13
|
-
} | {
|
|
14
|
-
kind: 'value';
|
|
15
|
-
field: string;
|
|
16
|
-
value: string | null;
|
|
17
|
-
};
|
|
18
|
-
/** Nodes on the `via` chain that joined this node to the node level above, one entry per skipped type. */
|
|
19
|
-
via: ViaStep[];
|
|
20
|
-
/** Key of the node's first occurrence when this is a repeat. Repeats are rendered in full. */
|
|
21
|
-
repeatOf?: string;
|
|
22
|
-
children: LandscapeOccurrence[];
|
|
23
|
-
};
|
|
24
|
-
export type ViaStep = {
|
|
25
|
-
type: string;
|
|
26
|
-
nodes: SpaceNode[];
|
|
27
|
-
};
|
|
28
|
-
export type Landscape = {
|
|
29
|
-
groups: LandscapeOccurrence[];
|
|
30
|
-
/**
|
|
31
|
-
* Nodes of a grouped level that no container above reaches (e.g. an Activity with no
|
|
32
|
-
* Outcome when grouping by Outcomes), each with its own contents.
|
|
33
|
-
*/
|
|
34
|
-
ungrouped: LandscapeOccurrence[];
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Lay a space out as nested containers following the layout's grouping levels.
|
|
38
|
-
*
|
|
39
|
-
* Adjacent node levels are joined by any edge between their types, in either direction, or only
|
|
40
|
-
* edges from `edge.field`. A `via` chain joins them through the skipped types. A field level
|
|
41
|
-
* splits the next node level by that field's values. A node reached from several containers
|
|
42
|
-
* appears in each, in full: the levels are finite, so repeating contents can't recurse.
|
|
43
|
-
*/
|
|
44
|
-
export declare function buildLandscape(graph: SpaceGraph, regionId: string, layout: LandscapeLayoutConfig): Landscape;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* One step of an occurrence path: a node title, a `[field, value]` group, or `null` for the
|
|
3
|
-
* ungrouped area. Encoded distinctly, so a field group can't collide with a node of the same name.
|
|
4
|
-
*/
|
|
5
|
-
export type PathSegment = string | readonly [field: string, value: string | null] | null;
|
|
6
|
-
/**
|
|
7
|
-
* Path-based key for one occurrence of a node: region, then the steps from the outermost
|
|
8
|
-
* container down to the node. Unique within a map view even when a node appears several times.
|
|
9
|
-
* Hosts can render several map views at once, so layouts scope keys to the map view instance.
|
|
10
|
-
*/
|
|
11
|
-
export declare function occurrenceKey(regionId: string, path: readonly PathSegment[]): string;
|