@sakibcoolz/core 0.1.2 → 0.2.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.
Files changed (142) hide show
  1. package/README.md +67 -7
  2. package/dist/acquisition.d.ts +29 -0
  3. package/dist/acquisition.d.ts.map +1 -0
  4. package/dist/acquisition.js +30 -0
  5. package/dist/acquisition.js.map +1 -0
  6. package/dist/assembly.d.ts +5 -2
  7. package/dist/assembly.d.ts.map +1 -1
  8. package/dist/assembly.js +7 -4
  9. package/dist/assembly.js.map +1 -1
  10. package/dist/attach.d.ts +4 -2
  11. package/dist/attach.d.ts.map +1 -1
  12. package/dist/attach.js +5 -3
  13. package/dist/attach.js.map +1 -1
  14. package/dist/clipboard.d.ts +6 -4
  15. package/dist/clipboard.d.ts.map +1 -1
  16. package/dist/clipboard.js +25 -4
  17. package/dist/clipboard.js.map +1 -1
  18. package/dist/collision.d.ts +2 -2
  19. package/dist/collision.js.map +1 -1
  20. package/dist/digest.d.ts +9 -0
  21. package/dist/digest.d.ts.map +1 -0
  22. package/dist/digest.js +68 -0
  23. package/dist/digest.js.map +1 -0
  24. package/dist/flow.d.ts +3 -2
  25. package/dist/flow.d.ts.map +1 -1
  26. package/dist/flow.js.map +1 -1
  27. package/dist/graph.d.ts +67 -7
  28. package/dist/graph.d.ts.map +1 -1
  29. package/dist/graph.js +195 -10
  30. package/dist/graph.js.map +1 -1
  31. package/dist/index.d.ts +13 -6
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +7 -3
  34. package/dist/index.js.map +1 -1
  35. package/dist/observation.d.ts +1 -1
  36. package/dist/observation.d.ts.map +1 -1
  37. package/dist/observation.js +4 -1
  38. package/dist/observation.js.map +1 -1
  39. package/dist/routing.d.ts +6 -3
  40. package/dist/routing.d.ts.map +1 -1
  41. package/dist/routing.js +12 -2
  42. package/dist/routing.js.map +1 -1
  43. package/dist/scene.d.ts +245 -5
  44. package/dist/scene.d.ts.map +1 -1
  45. package/dist/scene.js +94 -3
  46. package/dist/scene.js.map +1 -1
  47. package/dist/serialization.d.ts +7 -7
  48. package/dist/serialization.d.ts.map +1 -1
  49. package/dist/serialization.js +120 -8
  50. package/dist/serialization.js.map +1 -1
  51. package/dist/snapping.d.ts +2 -2
  52. package/dist/snapping.d.ts.map +1 -1
  53. package/dist/snapping.js +10 -7
  54. package/dist/snapping.js.map +1 -1
  55. package/dist/status.d.ts +56 -0
  56. package/dist/status.d.ts.map +1 -0
  57. package/dist/status.js +114 -0
  58. package/dist/status.js.map +1 -0
  59. package/dist/tags.d.ts +52 -0
  60. package/dist/tags.d.ts.map +1 -0
  61. package/dist/tags.js +103 -0
  62. package/dist/tags.js.map +1 -0
  63. package/dist/telemetry.d.ts +42 -4
  64. package/dist/telemetry.d.ts.map +1 -1
  65. package/dist/telemetry.js +84 -8
  66. package/dist/telemetry.js.map +1 -1
  67. package/dist/touching.d.ts +2 -2
  68. package/dist/touching.d.ts.map +1 -1
  69. package/dist/touching.js +7 -4
  70. package/dist/touching.js.map +1 -1
  71. package/dist/units.js +1 -1
  72. package/dist/units.js.map +1 -1
  73. package/dist/upgrade.d.ts +2 -2
  74. package/dist/upgrade.js.map +1 -1
  75. package/dist/validation.d.ts +33 -6
  76. package/dist/validation.d.ts.map +1 -1
  77. package/dist/validation.js +806 -39
  78. package/dist/validation.js.map +1 -1
  79. package/package.json +4 -2
  80. package/schema/fixtures/invalid/association-without-relationship.scene.json +69 -0
  81. package/schema/fixtures/invalid/binding-kind.scene.json +14 -0
  82. package/schema/fixtures/invalid/command-zero-step.scene.json +105 -0
  83. package/schema/fixtures/invalid/empty-name.scene.json +30 -0
  84. package/schema/fixtures/invalid/expected.json +70 -0
  85. package/schema/fixtures/invalid/extension-not-namespaced.scene.json +10 -0
  86. package/schema/fixtures/invalid/extension-prototype-key.scene.json +12 -0
  87. package/schema/fixtures/invalid/missing-document-type.scene.json +6 -0
  88. package/schema/fixtures/invalid/non-string-label.scene.json +32 -0
  89. package/schema/fixtures/invalid/underlay-opacity.scene.json +17 -0
  90. package/schema/fixtures/invalid/unknown-component-kind.scene.json +29 -0
  91. package/schema/fixtures/invalid/unknown-relationship.scene.json +63 -0
  92. package/schema/fixtures/invalid/unknown-root-field.scene.json +8 -0
  93. package/schema/fixtures/invalid/unsupported-version.scene.json +7 -0
  94. package/schema/fixtures/invalid/view-rotation.scene.json +139 -0
  95. package/schema/fixtures/invalid/writable-string.scene.json +93 -0
  96. package/schema/fixtures/invalid/writable-without-limits.scene.json +100 -0
  97. package/schema/fixtures/invalid/zero-scale.scene.json +29 -0
  98. package/schema/fixtures/migration/README.md +18 -0
  99. package/schema/fixtures/migration/v1-demo.scene.json +160 -0
  100. package/schema/fixtures/migration/v1-demo.v4.json +198 -0
  101. package/schema/fixtures/migration/v2-demo.scene.json +244 -0
  102. package/schema/fixtures/migration/v2-demo.v4.json +245 -0
  103. package/schema/fixtures/migration/v2-generated-12.scene.json +473 -0
  104. package/schema/fixtures/migration/v2-generated-12.v4.json +474 -0
  105. package/schema/fixtures/migration/v3-demo.scene.json +244 -0
  106. package/schema/fixtures/migration/v3-demo.v4.json +245 -0
  107. package/schema/fixtures/migration/v3-generated-12.scene.json +473 -0
  108. package/schema/fixtures/migration/v3-generated-12.v4.json +474 -0
  109. package/schema/fixtures/migration/v3-mostly-connected-plant.scene.json +386 -0
  110. package/schema/fixtures/migration/v3-mostly-connected-plant.v4.json +387 -0
  111. package/schema/fixtures/migration/v3-open-joints-plant.scene.json +288 -0
  112. package/schema/fixtures/migration/v3-open-joints-plant.v4.json +289 -0
  113. package/schema/fixtures/migration/v3-unconnected-plant.scene.json +14 -0
  114. package/schema/fixtures/migration/v3-unconnected-plant.v4.json +276 -0
  115. package/schema/fixtures/projection/acquisition.plan.json +50 -0
  116. package/schema/fixtures/projection/control-line.plan.json +86 -0
  117. package/schema/fixtures/valid/acquisition.scene.json +117 -0
  118. package/schema/fixtures/valid/associations.scene.json +79 -0
  119. package/schema/fixtures/valid/commands.scene.json +155 -0
  120. package/schema/fixtures/valid/control-line.scene.json +210 -0
  121. package/schema/fixtures/valid/empty.scene.json +7 -0
  122. package/schema/fixtures/valid/identity-and-extensions.scene.json +96 -0
  123. package/schema/fixtures/valid/tank-valve-line.scene.json +89 -0
  124. package/schema/fixtures/valid/views.scene.json +139 -0
  125. package/schema/fixtures/validator-only/association-id-reuses-connection.scene.json +70 -0
  126. package/schema/fixtures/validator-only/association-unknown-component.scene.json +70 -0
  127. package/schema/fixtures/validator-only/command-max-below-min.scene.json +104 -0
  128. package/schema/fixtures/validator-only/command-out-of-type-range.scene.json +97 -0
  129. package/schema/fixtures/validator-only/connection-domain-mismatch.scene.json +63 -0
  130. package/schema/fixtures/validator-only/credential-in-connection.scene.json +66 -0
  131. package/schema/fixtures/validator-only/credential-in-extension.scene.json +14 -0
  132. package/schema/fixtures/validator-only/credential-label.scene.json +32 -0
  133. package/schema/fixtures/validator-only/duplicate-component-id.scene.json +50 -0
  134. package/schema/fixtures/validator-only/endpoint-with-credentials.scene.json +74 -0
  135. package/schema/fixtures/validator-only/expected.json +66 -0
  136. package/schema/fixtures/validator-only/modbus-coil-float.scene.json +100 -0
  137. package/schema/fixtures/validator-only/non-unit-rotation.scene.json +29 -0
  138. package/schema/fixtures/validator-only/unknown-data-source.scene.json +100 -0
  139. package/schema/fixtures/validator-only/unknown-port.scene.json +62 -0
  140. package/schema/fixtures/validator-only/unregistered-host-type.scene.json +29 -0
  141. package/schema/fixtures/validator-only/view-unknown-component.scene.json +143 -0
  142. package/schema/industrial-scene.v4.schema.json +365 -0
package/dist/scene.d.ts CHANGED
@@ -15,27 +15,85 @@ export interface QuaternionLike {
15
15
  z: number;
16
16
  w: number;
17
17
  }
18
- export type PortKind = 'fluid' | 'electrical' | 'signal' | 'mechanical';
18
+ /**
19
+ * A port's domain (ADR-0023). `electrical` is deprecated: it keeps its old behaviour (compatible
20
+ * only with `electrical`); use `power` or `signal` instead.
21
+ */
22
+ export type PortKind = 'fluid' | 'mechanical' | 'power' | 'signal' | 'network' | 'electrical';
23
+ export declare const portKinds: readonly ["fluid", "mechanical", "power", "signal", "network", "electrical"];
24
+ export type SignalType = 'DI' | 'DO' | 'AI' | 'AO';
25
+ export declare const signalTypes: readonly ["DI", "DO", "AI", "AO"];
26
+ export type PowerKind = 'AC' | 'DC' | 'PE';
27
+ export declare const powerKinds: readonly ["AC", "DC", "PE"];
28
+ /** Signal or energy direction; not the 3D normal (`direction`). */
29
+ export type PortFlow = 'in' | 'out' | 'bidirectional';
19
30
  export interface ConnectionPort {
20
31
  id: string;
32
+ /** The port's domain (ADR-0023). */
21
33
  kind: PortKind;
22
34
  position: Vector3Tuple;
23
35
  direction: Vector3Tuple;
24
36
  nominalSize?: number;
37
+ /** Display name, e.g. "Run command". */
38
+ name?: string;
39
+ /** Terminal or channel label, e.g. "X1:3", "DI0.3". */
40
+ terminal?: string;
41
+ /** Signal or energy direction; for signal ports it follows from `signal.type` when absent. */
42
+ flow?: PortFlow;
43
+ signal?: {
44
+ type: SignalType;
45
+ range?: [number, number];
46
+ unit?: string;
47
+ };
48
+ power?: {
49
+ kind: PowerKind;
50
+ voltage?: number;
51
+ phases?: 1 | 3;
52
+ };
53
+ /** `medium` such as 'ethernet' or 'rs485'; `protocols` such as 'modbus-tcp'. */
54
+ network?: {
55
+ medium: string;
56
+ protocols?: string[];
57
+ };
58
+ /** How many connections the port takes; default 1. Fluid ports always take 1. */
59
+ maxConnections?: number;
25
60
  }
26
61
  export declare const componentKinds: readonly ["tank", "conicalTank", "horizontalTank", "sphericalTank", "pool", "pipe", "elbow", "tee", "valve", "reducer", "coupler", "pump", "sensor", "motor"];
27
62
  export type ComponentKind = (typeof componentKinds)[number];
63
+ /**
64
+ * A component's type (ADR-0022): a built-in kind, or a namespaced type such as `com.acme.press-200`
65
+ * that a host registers. Bare names (no dot) are reserved for the built-ins.
66
+ */
67
+ export type ComponentType = ComponentKind | (string & {});
68
+ /** True for one of the SDK's built-in kinds. */
69
+ export declare function isBuiltInKind(type: unknown): type is ComponentKind;
70
+ /** True for a namespaced type id: at least two dot-separated segments of letters, digits and inner hyphens. */
71
+ export declare function isNamespacedType(type: unknown): type is string;
28
72
  export interface ComponentDefinition {
29
- type: ComponentKind;
73
+ type: ComponentType;
30
74
  label: string;
31
75
  ports: ConnectionPort[];
32
76
  defaultSize: Vector3Tuple;
33
77
  /** Properties a host tag may drive, with the physical quantity of each. */
34
78
  bindable?: Readonly<Record<string, Quantity>>;
79
+ /** Variables an instance usually exposes, for `suggestVariables` (ADR-0024). */
80
+ variables?: readonly VariableTemplate[];
81
+ /** The 2D views it appears in (ADR-0026). When absent, its ports decide. */
82
+ views?: readonly ViewKind[];
83
+ }
84
+ /**
85
+ * A variable a component type usually exposes (ADR-0024), e.g. a drive's `ACTUAL_SPEED`. Instances
86
+ * get the suggested tag id `<componentId>.<name>`; `property` names a bindable property it drives.
87
+ */
88
+ export interface VariableTemplate {
89
+ name: string;
90
+ dataType: DataType;
91
+ unit?: string;
92
+ property?: string;
35
93
  }
36
94
  export interface ComponentInstance {
37
95
  id: string;
38
- type: ComponentKind;
96
+ type: ComponentType;
39
97
  /**
40
98
  * Optional assembly parent (ADR-0008). Positions stay in world space; the link only makes
41
99
  * editing rigid: moving any member of an assembly moves all of it.
@@ -48,9 +106,40 @@ export interface ComponentInstance {
48
106
  /** Positive per-axis scale. Components with ports must keep { x: 1, y: 1, z: 1 } (see ADR-0004). */
49
107
  scale: Vector3Like;
50
108
  properties: Record<string, number | boolean | string>;
109
+ /** Display name; `id` stays the stable key (ADR-0021). */
110
+ name?: string;
111
+ /** Version of the component definition this instance was authored against. */
112
+ typeVersion?: string;
113
+ manufacturer?: string;
114
+ model?: string;
115
+ /** Identification and metadata tags, such as an asset number or area. Never runtime values. */
116
+ labels?: Record<string, string>;
117
+ /** Host or library data, keyed by reverse-DNS namespace; preserved, never interpreted by core. */
118
+ extensions?: SceneExtensions;
51
119
  }
120
+ /** Plain JSON value kept in `extensions`. */
121
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
122
+ [key: string]: JsonValue;
123
+ };
124
+ /** Custom data keyed by reverse-DNS namespace (`com.example.app`), preserved on round trip (ADR-0021). */
125
+ export type SceneExtensions = Record<string, JsonValue>;
126
+ /** Project identity of a scene document (ADR-0021). */
127
+ export interface SceneProject {
128
+ id?: string;
129
+ name?: string;
130
+ revision?: string;
131
+ description?: string;
132
+ }
133
+ /** Built-in relationship kinds (ADR-0023); hosts add namespaced ones such as `com.example.supervises`. */
134
+ export declare const relationshipKinds: readonly ["controls", "drives", "measures", "feeds", "communicates", "wired", "associated"];
135
+ export type Relationship = (typeof relationshipKinds)[number] | (string & {});
136
+ /** True for a built-in relationship or a namespaced host relationship. */
137
+ export declare function isRelationship(value: unknown): value is Relationship;
52
138
  export interface SceneConnection {
53
139
  id: string;
140
+ /** The ports' domain (ADR-0023); when present it must match them. Derived from the ports when absent. */
141
+ domain?: PortKind;
142
+ relationship?: Relationship;
54
143
  from: {
55
144
  instanceId: string;
56
145
  portId: string;
@@ -59,6 +148,98 @@ export interface SceneConnection {
59
148
  instanceId: string;
60
149
  portId: string;
61
150
  };
151
+ /** Edge data such as cable type, cross-section or length; same value rules as component properties. */
152
+ properties?: Record<string, number | boolean | string>;
153
+ }
154
+ /**
155
+ * A logical fact between two components, such as "PLC-01 controls VFD-101" (ADR-0023): directed,
156
+ * with no ports and no geometry. Never drawn as wiring, never routed or simulated.
157
+ */
158
+ export interface SceneAssociation {
159
+ id: string;
160
+ relationship: Relationship;
161
+ /** Component ids. */
162
+ from: string;
163
+ to: string;
164
+ properties?: Record<string, number | boolean | string>;
165
+ }
166
+ /** Data types of runtime variables (ADR-0024). */
167
+ export declare const dataTypes: readonly ["bool", "int16", "uint16", "int32", "uint32", "float32", "float64", "string"];
168
+ export type DataType = (typeof dataTypes)[number];
169
+ /** Built-in acquisition protocols; hosts add namespaced ones such as `com.vendor.bus` (ADR-0024). */
170
+ export declare const protocols: readonly ["opcua", "modbus-tcp", "modbus-rtu", "host"];
171
+ export type Protocol = (typeof protocols)[number] | (string & {});
172
+ /**
173
+ * Where values come from (ADR-0024): a PLC, drive or gateway the host reaches. Never holds
174
+ * credentials or opens a connection; `endpointRef` is an opaque reference the host resolves.
175
+ */
176
+ export interface SceneDataSource {
177
+ id: string;
178
+ name?: string;
179
+ protocol: Protocol;
180
+ /** The component that is this source, e.g. the PLC. */
181
+ deviceId?: string;
182
+ endpointRef?: string;
183
+ properties?: Record<string, number | boolean | string>;
184
+ }
185
+ export declare const modbusAreas: readonly ["coil", "discrete", "input", "holding"];
186
+ export interface ModbusAddress {
187
+ area: (typeof modbusAreas)[number];
188
+ /** Zero-based register or coil number, 0–65535. */
189
+ address: number;
190
+ unitId: number;
191
+ byteOrder?: 'big' | 'little';
192
+ wordOrder?: 'high-first' | 'low-first';
193
+ /** Bit 0–15 of a holding or input register, for a `bool`. */
194
+ bit?: number;
195
+ }
196
+ export interface OpcUaAddress {
197
+ nodeId: string;
198
+ namespaceUri?: string;
199
+ }
200
+ /** Typed by the data source's protocol; a custom protocol's address is plain JSON checked by the host. */
201
+ export type VariableAddress = ModbusAddress | OpcUaAddress | {
202
+ [key: string]: JsonValue;
203
+ };
204
+ /**
205
+ * A runtime variable (ADR-0024): what a tag is and where it comes from. `id` is the tag id that
206
+ * observations and bindings carry. A `readWrite` variable may be the subject of a command *request*
207
+ * to the host (ADR-0029); the SDK itself never writes.
208
+ */
209
+ export interface RuntimeVariable {
210
+ id: string;
211
+ name?: string;
212
+ componentId?: string;
213
+ dataType: DataType;
214
+ unit?: string;
215
+ access: 'read' | 'readWrite';
216
+ source?: {
217
+ dataSourceId: string;
218
+ variable?: string;
219
+ address?: VariableAddress;
220
+ };
221
+ /** How the host converts raw values; descriptive only, the SDK does not apply it. */
222
+ scaling?: {
223
+ kind: 'linear';
224
+ rawMin: number;
225
+ rawMax: number;
226
+ min: number;
227
+ max: number;
228
+ };
229
+ /** Required on, and only on, a `readWrite` variable (ADR-0029). */
230
+ command?: CommandLimits;
231
+ }
232
+ /**
233
+ * What a command request may ask for (ADR-0029). Numeric types need `min` and `max`; `bool` takes
234
+ * neither. The host's gateway must enforce these itself: the SDK's check is a convenience.
235
+ */
236
+ export interface CommandLimits {
237
+ min?: number;
238
+ max?: number;
239
+ /** Granularity of requested values, counted from `min`. */
240
+ step?: number;
241
+ /** Extra plain text shown in the confirmation. */
242
+ confirm?: string;
62
243
  }
63
244
  /** Physical quantity of a bindable value; fixes its canonical unit (see `canonicalUnits`). */
64
245
  export type Quantity = 'percent' | 'temperature' | 'boolean' | 'flow';
@@ -80,7 +261,9 @@ export type TagBinding = {
80
261
  connectionId: string;
81
262
  unit?: string;
82
263
  };
83
- export declare const SCENE_SCHEMA_VERSION = 3;
264
+ export declare const SCENE_SCHEMA_VERSION = 4;
265
+ /** Identifies a scene file as an industrial scene document (ADR-0021). */
266
+ export declare const SCENE_DOCUMENT_TYPE = "industrial.scene";
84
267
  /**
85
268
  * A drawing shown flat on the ground as a tracing reference (ADR-0012). Display only: it never
86
269
  * takes part in snapping, connections, collisions or simulation.
@@ -101,15 +284,72 @@ export interface SceneUnderlay {
101
284
  opacity: number;
102
285
  }
103
286
  export interface ScadaScene {
104
- schemaVersion: 3;
287
+ schemaVersion: 4;
288
+ documentType: typeof SCENE_DOCUMENT_TYPE;
105
289
  units: 'm';
290
+ /** Optional project identity (ADR-0021). */
291
+ project?: SceneProject;
106
292
  components: ComponentInstance[];
107
293
  connections: SceneConnection[];
294
+ /** Optional port-less logical links (ADR-0023); absent when there are none. */
295
+ associations?: SceneAssociation[];
296
+ /** Optional acquisition sources (ADR-0024). */
297
+ dataSources?: SceneDataSource[];
298
+ /** Optional typed tags (ADR-0024). */
299
+ runtimeVariables?: RuntimeVariable[];
108
300
  /** Optional; absent when the scene has no bindings. */
109
301
  tagBindings?: TagBinding[];
110
302
  /** Optional reference drawing (ADR-0012); absent when there is none. */
111
303
  underlay?: SceneUnderlay;
304
+ /** Optional 2D layouts per view (ADR-0026); absent when nothing has been placed. */
305
+ views?: SceneViews;
306
+ /** Host or library data, keyed by reverse-DNS namespace (ADR-0021). */
307
+ extensions?: SceneExtensions;
112
308
  }
309
+ /** The 2D views a scene can lay out (ADR-0026). Host views go in `extensions`. */
310
+ export declare const viewKinds: readonly ["process", "electrical"];
311
+ export type ViewKind = (typeof viewKinds)[number];
312
+ /** Where a component's symbol sits in one view, in drawing units (1 mm), x right and y down. */
313
+ export interface SymbolPlacement {
314
+ x: number;
315
+ y: number;
316
+ rotation?: 0 | 90 | 180 | 270;
317
+ /** Hidden in this view only. */
318
+ hidden?: true;
319
+ }
320
+ /** A connection's or association's drawn line in one view: at least two points. */
321
+ export interface ViewRoute {
322
+ points: [number, number][];
323
+ }
324
+ /** Layout only: equipment, ports and wiring stay in the model (ADR-0026). */
325
+ export interface ViewLayout {
326
+ /** By component id. */
327
+ symbols?: Record<string, SymbolPlacement>;
328
+ /** By connection or association id. */
329
+ routes?: Record<string, ViewRoute>;
330
+ }
331
+ export type SceneViews = Partial<Record<ViewKind, ViewLayout>>;
113
332
  export declare function createEmptyScene(): ScadaScene;
333
+ export type PortCheck = {
334
+ ok: true;
335
+ } | {
336
+ ok: false;
337
+ reason: string;
338
+ };
339
+ /**
340
+ * Whether two ports may be connected, per domain (ADR-0023), and why not. Metadata missing on
341
+ * either side never fails a check. These are engineering-aid checks on the described model: they
342
+ * never verify physical wiring, protective earth or functional safety.
343
+ */
344
+ export declare function checkPorts(a: ConnectionPort, b: ConnectionPort): PortCheck;
114
345
  export declare function portsCompatible(a: ConnectionPort, b: ConnectionPort): boolean;
346
+ /** Ports joined by placing parts against each other (snapping, touching, attach). Power, signal and network ports are wired instead. */
347
+ export declare function matesPhysically(port: ConnectionPort): boolean;
348
+ /** How many connections a port takes (ADR-0023): `maxConnections`, default 1. */
349
+ export declare function portCapacity(port: ConnectionPort): number;
350
+ /**
351
+ * `record[key]` for an own key only. Keys from documents and hosts are untrusted: a plain lookup of
352
+ * "constructor", "toString" or "__proto__" finds inherited values (T-096). Internal; not exported by the package.
353
+ */
354
+ export declare function ownValue<T>(record: Readonly<Record<string, T>> | undefined, key: string): T | undefined;
115
355
  //# sourceMappingURL=scene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scene.d.ts","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACpD,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/D,kGAAkG;AAClG,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AACD,2GAA2G;AAC3G,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AACD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,CAAC;AACxE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,YAAY,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,eAAO,MAAM,cAAc,+JAAgK,CAAC;AAC5L,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;IAC1B,2EAA2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,EAAE,eAAe,CAAC,CAAC;IAC1C,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACpC;AACD,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAE/D,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C;AACD,MAAM,MAAM,SAAS,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAMrE;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,GAAG,SAAS,CA2B1E;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,GAAG,OAAO,CAE7E;AAED,wIAAwI;AACxI,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAE7D;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAEvG"}
package/dist/scene.js CHANGED
@@ -1,9 +1,100 @@
1
+ export const portKinds = ['fluid', 'mechanical', 'power', 'signal', 'network', 'electrical'];
2
+ export const signalTypes = ['DI', 'DO', 'AI', 'AO'];
3
+ export const powerKinds = ['AC', 'DC', 'PE'];
1
4
  export const componentKinds = ['tank', 'conicalTank', 'horizontalTank', 'sphericalTank', 'pool', 'pipe', 'elbow', 'tee', 'valve', 'reducer', 'coupler', 'pump', 'sensor', 'motor'];
2
- export const SCENE_SCHEMA_VERSION = 3;
5
+ /** True for one of the SDK's built-in kinds. */
6
+ export function isBuiltInKind(type) {
7
+ return componentKinds.includes(type);
8
+ }
9
+ /** True for a namespaced type id: at least two dot-separated segments of letters, digits and inner hyphens. */
10
+ export function isNamespacedType(type) {
11
+ return typeof type === 'string' && type.length <= 128 && /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i.test(type);
12
+ }
13
+ /** Built-in relationship kinds (ADR-0023); hosts add namespaced ones such as `com.example.supervises`. */
14
+ export const relationshipKinds = ['controls', 'drives', 'measures', 'feeds', 'communicates', 'wired', 'associated'];
15
+ /** True for a built-in relationship or a namespaced host relationship. */
16
+ export function isRelationship(value) {
17
+ return relationshipKinds.includes(value) || isNamespacedType(value);
18
+ }
19
+ /** Data types of runtime variables (ADR-0024). */
20
+ export const dataTypes = ['bool', 'int16', 'uint16', 'int32', 'uint32', 'float32', 'float64', 'string'];
21
+ /** Built-in acquisition protocols; hosts add namespaced ones such as `com.vendor.bus` (ADR-0024). */
22
+ export const protocols = ['opcua', 'modbus-tcp', 'modbus-rtu', 'host'];
23
+ export const modbusAreas = ['coil', 'discrete', 'input', 'holding'];
24
+ export const SCENE_SCHEMA_VERSION = 4;
25
+ /** Identifies a scene file as an industrial scene document (ADR-0021). */
26
+ export const SCENE_DOCUMENT_TYPE = 'industrial.scene';
27
+ /** The 2D views a scene can lay out (ADR-0026). Host views go in `extensions`. */
28
+ export const viewKinds = ['process', 'electrical'];
3
29
  export function createEmptyScene() {
4
- return { schemaVersion: 3, units: 'm', components: [], connections: [] };
30
+ return { schemaVersion: 4, documentType: SCENE_DOCUMENT_TYPE, units: 'm', components: [], connections: [] };
31
+ }
32
+ const signalFlow = (p) => p.flow ?? (p.signal ? (p.signal.type === 'DO' || p.signal.type === 'AO' ? 'out' : 'in') : undefined);
33
+ const isAnalog = (t) => t === 'AI' || t === 'AO';
34
+ const describeRange = (s) => `${s.range ? `${s.range[0]}–${s.range[1]}` : 'a signal'}${s.unit ? ` ${s.unit}` : ''}`;
35
+ /**
36
+ * Whether two ports may be connected, per domain (ADR-0023), and why not. Metadata missing on
37
+ * either side never fails a check. These are engineering-aid checks on the described model: they
38
+ * never verify physical wiring, protective earth or functional safety.
39
+ */
40
+ export function checkPorts(a, b) {
41
+ const no = (reason) => ({ ok: false, reason });
42
+ if (a.kind !== b.kind)
43
+ return no(`a ${a.kind} port cannot connect to a ${b.kind} port`);
44
+ if (a.nominalSize !== undefined && b.nominalSize !== undefined && Math.abs(a.nominalSize - b.nominalSize) >= 0.0001)
45
+ return no('the nominal sizes differ');
46
+ if (a.kind === 'signal') {
47
+ if (a.signal && b.signal && isAnalog(a.signal.type) !== isAnalog(b.signal.type))
48
+ return no('a digital signal cannot connect to an analog one');
49
+ const fa = signalFlow(a), fb = signalFlow(b);
50
+ if (fa === 'out' && fb === 'out')
51
+ return no('an output cannot connect to an output');
52
+ if (fa === 'in' && fb === 'in')
53
+ return no('an input cannot connect to an input');
54
+ if (a.signal && b.signal) {
55
+ const sameRange = !a.signal.range || !b.signal.range || a.signal.range.every((v, i) => v === b.signal.range[i]);
56
+ const sameUnit = !a.signal.unit || !b.signal.unit || a.signal.unit === b.signal.unit;
57
+ if (!sameRange || !sameUnit)
58
+ return no(`${describeRange(a.signal)} cannot connect to ${describeRange(b.signal)}`);
59
+ }
60
+ }
61
+ else if (a.kind === 'power') {
62
+ if (a.power && b.power) {
63
+ if (a.power.kind !== b.power.kind)
64
+ return no(a.power.kind === 'PE' || b.power.kind === 'PE' ? 'protective earth connects only to protective earth' : `${a.power.kind} cannot connect to ${b.power.kind}`);
65
+ if (a.power.voltage !== undefined && b.power.voltage !== undefined && a.power.voltage !== b.power.voltage)
66
+ return no(`${a.power.voltage} V cannot connect to ${b.power.voltage} V`);
67
+ if (a.power.phases !== undefined && b.power.phases !== undefined && a.power.phases !== b.power.phases)
68
+ return no(`${a.power.phases}-phase cannot connect to ${b.power.phases}-phase`);
69
+ }
70
+ if (a.flow === 'out' && b.flow === 'out')
71
+ return no('two power sources cannot connect to each other');
72
+ }
73
+ else if (a.kind === 'network' && a.network && b.network) {
74
+ if (a.network.medium !== b.network.medium)
75
+ return no(`${a.network.medium} cannot connect to ${b.network.medium}`);
76
+ const pa = a.network.protocols, pb = b.network.protocols;
77
+ if (pa?.length && pb?.length && !pa.some((p) => pb.includes(p)))
78
+ return no('the ports share no protocol');
79
+ }
80
+ return { ok: true };
5
81
  }
6
82
  export function portsCompatible(a, b) {
7
- return a.kind === b.kind && (a.nominalSize === undefined || b.nominalSize === undefined || Math.abs(a.nominalSize - b.nominalSize) < 0.0001);
83
+ return checkPorts(a, b).ok;
84
+ }
85
+ /** Ports joined by placing parts against each other (snapping, touching, attach). Power, signal and network ports are wired instead. */
86
+ export function matesPhysically(port) {
87
+ return port.kind === 'fluid' || port.kind === 'mechanical' || port.kind === 'electrical';
88
+ }
89
+ /** How many connections a port takes (ADR-0023): `maxConnections`, default 1. */
90
+ export function portCapacity(port) {
91
+ return port.maxConnections ?? 1;
92
+ }
93
+ /**
94
+ * `record[key]` for an own key only. Keys from documents and hosts are untrusted: a plain lookup of
95
+ * "constructor", "toString" or "__proto__" finds inherited values (T-096). Internal; not exported by the package.
96
+ */
97
+ export function ownValue(record, key) {
98
+ return record !== undefined && record !== null && typeof key === 'string' && Object.hasOwn(record, key) ? record[key] : undefined;
8
99
  }
9
100
  //# sourceMappingURL=scene.js.map
package/dist/scene.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"scene.js","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AA0C5L,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AA4BtC,MAAM,UAAU,gBAAgB;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;AAC3E,CAAC;AACD,MAAM,UAAU,eAAe,CAAC,CAAiB,EAAE,CAAiB;IAClE,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,CAAC;AAC/I,CAAC","sourcesContent":["/** Tuple form, used by catalog geometry and derived (never saved) data such as ports and routes. */\nexport type Vector3Tuple = [number, number, number];\n/** Unit quaternion [x, y, z, w] in tuple form, for derived data. */\nexport type QuaternionTuple = [number, number, number, number];\n/** Named 3D vector used by the scene model and files (ADR-0007). A THREE.Vector3 satisfies it. */\nexport interface Vector3Like {\n x: number;\n y: number;\n z: number;\n}\n/** Named unit quaternion used by the scene model and files (ADR-0007). A THREE.Quaternion satisfies it. */\nexport interface QuaternionLike {\n x: number;\n y: number;\n z: number;\n w: number;\n}\nexport type PortKind = 'fluid' | 'electrical' | 'signal' | 'mechanical';\nexport interface ConnectionPort {\n id: string;\n kind: PortKind;\n position: Vector3Tuple; // local to component, metres\n direction: Vector3Tuple; // outward unit normal\n nominalSize?: number; // metres\n}\nexport const componentKinds = ['tank', 'conicalTank', 'horizontalTank', 'sphericalTank', 'pool', 'pipe', 'elbow', 'tee', 'valve', 'reducer', 'coupler', 'pump', 'sensor', 'motor'] as const;\nexport type ComponentKind = (typeof componentKinds)[number];\nexport interface ComponentDefinition {\n type: ComponentKind;\n label: string;\n ports: ConnectionPort[];\n defaultSize: Vector3Tuple;\n /** Properties a host tag may drive, with the physical quantity of each. */\n bindable?: Readonly<Record<string, Quantity>>;\n}\nexport interface ComponentInstance {\n id: string;\n type: ComponentKind;\n /**\n * Optional assembly parent (ADR-0008). Positions stay in world space; the link only makes\n * editing rigid: moving any member of an assembly moves all of it.\n */\n parentId?: string;\n /** Metres, world space. */\n position: Vector3Like;\n /** Unit quaternion. */\n rotation: QuaternionLike;\n /** Positive per-axis scale. Components with ports must keep { x: 1, y: 1, z: 1 } (see ADR-0004). */\n scale: Vector3Like;\n properties: Record<string, number | boolean | string>;\n}\nexport interface SceneConnection {\n id: string;\n from: { instanceId: string; portId: string };\n to: { instanceId: string; portId: string };\n}\n/** Physical quantity of a bindable value; fixes its canonical unit (see `canonicalUnits`). */\nexport type Quantity = 'percent' | 'temperature' | 'boolean' | 'flow';\n\n/**\n * Authored link from a host tag to what it drives (ADR-0006). `unit` is the unit the tag's values\n * arrive in when an observation does not say; values are converted to the canonical unit.\n */\nexport type TagBinding =\n | { id: string; tagId: string; kind: 'property'; instanceId: string; property: string; unit?: string }\n | { id: string; tagId: string; kind: 'flow'; connectionId: string; unit?: string };\n\nexport const SCENE_SCHEMA_VERSION = 3;\n/**\n * A drawing shown flat on the ground as a tracing reference (ADR-0012). Display only: it never\n * takes part in snapping, connections, collisions or simulation.\n */\nexport interface SceneUnderlay {\n /** Sanitized SVG markup (written by the SDK's sanitizer), at most `maxUnderlayBytes`. */\n svg: string;\n /** Centre of the drawing on the ground plane, metres. */\n position: { x: number; z: number };\n /** Width of the drawing in metres; its height follows the viewBox aspect. */\n width: number;\n /** Degrees about +Y. */\n rotation: number;\n /** 0–1. */\n opacity: number;\n}\n\nexport interface ScadaScene {\n schemaVersion: 3;\n units: 'm';\n components: ComponentInstance[];\n connections: SceneConnection[];\n /** Optional; absent when the scene has no bindings. */\n tagBindings?: TagBinding[];\n /** Optional reference drawing (ADR-0012); absent when there is none. */\n underlay?: SceneUnderlay;\n}\nexport function createEmptyScene(): ScadaScene {\n return { schemaVersion: 3, units: 'm', components: [], connections: [] };\n}\nexport function portsCompatible(a: ConnectionPort, b: ConnectionPort): boolean {\n return a.kind === b.kind && (a.nominalSize === undefined || b.nominalSize === undefined || Math.abs(a.nominalSize - b.nominalSize) < 0.0001);\n}\n"]}
1
+ {"version":3,"file":"scene.js","sourceRoot":"","sources":["../src/scene.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAwC,CAAC;AAEpI,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAA0C,CAAC;AAE7F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAyC,CAAC;AAuBrF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAO5L,gDAAgD;AAChD,MAAM,UAAU,aAAa,CAAC,IAAa;IACzC,OAAQ,cAAqC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AACD,+GAA+G;AAC/G,MAAM,UAAU,gBAAgB,CAAC,IAAa;IAC5C,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,oEAAoE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3I,CAAC;AA4DD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,CAAU,CAAC;AAE7H,0EAA0E;AAC1E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AAE,CAAC,CAAC;QAClH,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QACzD,IAAI,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,EAAE,CAAC,6BAA6B,CAAC,CAAC;IAC5G,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAiB,EAAE,CAAiB;IAClE,OAAO,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7B,CAAC;AAED,wIAAwI;AACxI,MAAM,UAAU,eAAe,CAAC,IAAoB;IAClD,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC;AAC3F,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,YAAY,CAAC,IAAoB;IAC/C,OAAO,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAI,MAA+C,EAAE,GAAW;IACtF,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACpI,CAAC","sourcesContent":["/** Tuple form, used by catalog geometry and derived (never saved) data such as ports and routes. */\nexport type Vector3Tuple = [number, number, number];\n/** Unit quaternion [x, y, z, w] in tuple form, for derived data. */\nexport type QuaternionTuple = [number, number, number, number];\n/** Named 3D vector used by the scene model and files (ADR-0007). A THREE.Vector3 satisfies it. */\nexport interface Vector3Like {\n x: number;\n y: number;\n z: number;\n}\n/** Named unit quaternion used by the scene model and files (ADR-0007). A THREE.Quaternion satisfies it. */\nexport interface QuaternionLike {\n x: number;\n y: number;\n z: number;\n w: number;\n}\n/**\n * A port's domain (ADR-0023). `electrical` is deprecated: it keeps its old behaviour (compatible\n * only with `electrical`); use `power` or `signal` instead.\n */\nexport type PortKind = 'fluid' | 'mechanical' | 'power' | 'signal' | 'network' | 'electrical';\nexport const portKinds = ['fluid', 'mechanical', 'power', 'signal', 'network', 'electrical'] as const satisfies readonly PortKind[];\nexport type SignalType = 'DI' | 'DO' | 'AI' | 'AO';\nexport const signalTypes = ['DI', 'DO', 'AI', 'AO'] as const satisfies readonly SignalType[];\nexport type PowerKind = 'AC' | 'DC' | 'PE';\nexport const powerKinds = ['AC', 'DC', 'PE'] as const satisfies readonly PowerKind[];\n/** Signal or energy direction; not the 3D normal (`direction`). */\nexport type PortFlow = 'in' | 'out' | 'bidirectional';\nexport interface ConnectionPort {\n id: string;\n /** The port's domain (ADR-0023). */\n kind: PortKind;\n position: Vector3Tuple; // local to component, metres; for power/signal/network, the terminal\n direction: Vector3Tuple; // outward unit normal\n nominalSize?: number; // metres\n /** Display name, e.g. \"Run command\". */\n name?: string;\n /** Terminal or channel label, e.g. \"X1:3\", \"DI0.3\". */\n terminal?: string;\n /** Signal or energy direction; for signal ports it follows from `signal.type` when absent. */\n flow?: PortFlow;\n signal?: { type: SignalType; range?: [number, number]; unit?: string };\n power?: { kind: PowerKind; voltage?: number; phases?: 1 | 3 };\n /** `medium` such as 'ethernet' or 'rs485'; `protocols` such as 'modbus-tcp'. */\n network?: { medium: string; protocols?: string[] };\n /** How many connections the port takes; default 1. Fluid ports always take 1. */\n maxConnections?: number;\n}\nexport const componentKinds = ['tank', 'conicalTank', 'horizontalTank', 'sphericalTank', 'pool', 'pipe', 'elbow', 'tee', 'valve', 'reducer', 'coupler', 'pump', 'sensor', 'motor'] as const;\nexport type ComponentKind = (typeof componentKinds)[number];\n/**\n * A component's type (ADR-0022): a built-in kind, or a namespaced type such as `com.acme.press-200`\n * that a host registers. Bare names (no dot) are reserved for the built-ins.\n */\nexport type ComponentType = ComponentKind | (string & {});\n/** True for one of the SDK's built-in kinds. */\nexport function isBuiltInKind(type: unknown): type is ComponentKind {\n return (componentKinds as readonly unknown[]).includes(type);\n}\n/** True for a namespaced type id: at least two dot-separated segments of letters, digits and inner hyphens. */\nexport function isNamespacedType(type: unknown): type is string {\n return typeof type === 'string' && type.length <= 128 && /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i.test(type);\n}\nexport interface ComponentDefinition {\n type: ComponentType;\n label: string;\n ports: ConnectionPort[];\n defaultSize: Vector3Tuple;\n /** Properties a host tag may drive, with the physical quantity of each. */\n bindable?: Readonly<Record<string, Quantity>>;\n /** Variables an instance usually exposes, for `suggestVariables` (ADR-0024). */\n variables?: readonly VariableTemplate[];\n /** The 2D views it appears in (ADR-0026). When absent, its ports decide. */\n views?: readonly ViewKind[];\n}\n/**\n * A variable a component type usually exposes (ADR-0024), e.g. a drive's `ACTUAL_SPEED`. Instances\n * get the suggested tag id `<componentId>.<name>`; `property` names a bindable property it drives.\n */\nexport interface VariableTemplate {\n name: string;\n dataType: DataType;\n unit?: string;\n property?: string;\n}\nexport interface ComponentInstance {\n id: string;\n type: ComponentType;\n /**\n * Optional assembly parent (ADR-0008). Positions stay in world space; the link only makes\n * editing rigid: moving any member of an assembly moves all of it.\n */\n parentId?: string;\n /** Metres, world space. */\n position: Vector3Like;\n /** Unit quaternion. */\n rotation: QuaternionLike;\n /** Positive per-axis scale. Components with ports must keep { x: 1, y: 1, z: 1 } (see ADR-0004). */\n scale: Vector3Like;\n properties: Record<string, number | boolean | string>;\n /** Display name; `id` stays the stable key (ADR-0021). */\n name?: string;\n /** Version of the component definition this instance was authored against. */\n typeVersion?: string;\n manufacturer?: string;\n model?: string;\n /** Identification and metadata tags, such as an asset number or area. Never runtime values. */\n labels?: Record<string, string>;\n /** Host or library data, keyed by reverse-DNS namespace; preserved, never interpreted by core. */\n extensions?: SceneExtensions;\n}\n/** Plain JSON value kept in `extensions`. */\nexport type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue };\n/** Custom data keyed by reverse-DNS namespace (`com.example.app`), preserved on round trip (ADR-0021). */\nexport type SceneExtensions = Record<string, JsonValue>;\n/** Project identity of a scene document (ADR-0021). */\nexport interface SceneProject {\n id?: string;\n name?: string;\n revision?: string;\n description?: string;\n}\n/** Built-in relationship kinds (ADR-0023); hosts add namespaced ones such as `com.example.supervises`. */\nexport const relationshipKinds = ['controls', 'drives', 'measures', 'feeds', 'communicates', 'wired', 'associated'] as const;\nexport type Relationship = (typeof relationshipKinds)[number] | (string & {});\n/** True for a built-in relationship or a namespaced host relationship. */\nexport function isRelationship(value: unknown): value is Relationship {\n return (relationshipKinds as readonly unknown[]).includes(value) || isNamespacedType(value);\n}\nexport interface SceneConnection {\n id: string;\n /** The ports' domain (ADR-0023); when present it must match them. Derived from the ports when absent. */\n domain?: PortKind;\n relationship?: Relationship;\n from: { instanceId: string; portId: string };\n to: { instanceId: string; portId: string };\n /** Edge data such as cable type, cross-section or length; same value rules as component properties. */\n properties?: Record<string, number | boolean | string>;\n}\n/**\n * A logical fact between two components, such as \"PLC-01 controls VFD-101\" (ADR-0023): directed,\n * with no ports and no geometry. Never drawn as wiring, never routed or simulated.\n */\nexport interface SceneAssociation {\n id: string;\n relationship: Relationship;\n /** Component ids. */\n from: string;\n to: string;\n properties?: Record<string, number | boolean | string>;\n}\n/** Data types of runtime variables (ADR-0024). */\nexport const dataTypes = ['bool', 'int16', 'uint16', 'int32', 'uint32', 'float32', 'float64', 'string'] as const;\nexport type DataType = (typeof dataTypes)[number];\n/** Built-in acquisition protocols; hosts add namespaced ones such as `com.vendor.bus` (ADR-0024). */\nexport const protocols = ['opcua', 'modbus-tcp', 'modbus-rtu', 'host'] as const;\nexport type Protocol = (typeof protocols)[number] | (string & {});\n/**\n * Where values come from (ADR-0024): a PLC, drive or gateway the host reaches. Never holds\n * credentials or opens a connection; `endpointRef` is an opaque reference the host resolves.\n */\nexport interface SceneDataSource {\n id: string;\n name?: string;\n protocol: Protocol;\n /** The component that is this source, e.g. the PLC. */\n deviceId?: string;\n endpointRef?: string;\n properties?: Record<string, number | boolean | string>;\n}\nexport const modbusAreas = ['coil', 'discrete', 'input', 'holding'] as const;\nexport interface ModbusAddress {\n area: (typeof modbusAreas)[number];\n /** Zero-based register or coil number, 0–65535. */\n address: number;\n unitId: number;\n byteOrder?: 'big' | 'little';\n wordOrder?: 'high-first' | 'low-first';\n /** Bit 0–15 of a holding or input register, for a `bool`. */\n bit?: number;\n}\nexport interface OpcUaAddress {\n nodeId: string;\n namespaceUri?: string;\n}\n/** Typed by the data source's protocol; a custom protocol's address is plain JSON checked by the host. */\nexport type VariableAddress = ModbusAddress | OpcUaAddress | { [key: string]: JsonValue };\n/**\n * A runtime variable (ADR-0024): what a tag is and where it comes from. `id` is the tag id that\n * observations and bindings carry. A `readWrite` variable may be the subject of a command *request*\n * to the host (ADR-0029); the SDK itself never writes.\n */\nexport interface RuntimeVariable {\n id: string;\n name?: string;\n componentId?: string;\n dataType: DataType;\n unit?: string;\n access: 'read' | 'readWrite';\n source?: { dataSourceId: string; variable?: string; address?: VariableAddress };\n /** How the host converts raw values; descriptive only, the SDK does not apply it. */\n scaling?: { kind: 'linear'; rawMin: number; rawMax: number; min: number; max: number };\n /** Required on, and only on, a `readWrite` variable (ADR-0029). */\n command?: CommandLimits;\n}\n\n/**\n * What a command request may ask for (ADR-0029). Numeric types need `min` and `max`; `bool` takes\n * neither. The host's gateway must enforce these itself: the SDK's check is a convenience.\n */\nexport interface CommandLimits {\n min?: number;\n max?: number;\n /** Granularity of requested values, counted from `min`. */\n step?: number;\n /** Extra plain text shown in the confirmation. */\n confirm?: string;\n}\n/** Physical quantity of a bindable value; fixes its canonical unit (see `canonicalUnits`). */\nexport type Quantity = 'percent' | 'temperature' | 'boolean' | 'flow';\n\n/**\n * Authored link from a host tag to what it drives (ADR-0006). `unit` is the unit the tag's values\n * arrive in when an observation does not say; values are converted to the canonical unit.\n */\nexport type TagBinding =\n | { id: string; tagId: string; kind: 'property'; instanceId: string; property: string; unit?: string }\n | { id: string; tagId: string; kind: 'flow'; connectionId: string; unit?: string };\n\nexport const SCENE_SCHEMA_VERSION = 4;\n/** Identifies a scene file as an industrial scene document (ADR-0021). */\nexport const SCENE_DOCUMENT_TYPE = 'industrial.scene';\n/**\n * A drawing shown flat on the ground as a tracing reference (ADR-0012). Display only: it never\n * takes part in snapping, connections, collisions or simulation.\n */\nexport interface SceneUnderlay {\n /** Sanitized SVG markup (written by the SDK's sanitizer), at most `maxUnderlayBytes`. */\n svg: string;\n /** Centre of the drawing on the ground plane, metres. */\n position: { x: number; z: number };\n /** Width of the drawing in metres; its height follows the viewBox aspect. */\n width: number;\n /** Degrees about +Y. */\n rotation: number;\n /** 0–1. */\n opacity: number;\n}\n\nexport interface ScadaScene {\n schemaVersion: 4;\n documentType: typeof SCENE_DOCUMENT_TYPE;\n units: 'm';\n /** Optional project identity (ADR-0021). */\n project?: SceneProject;\n components: ComponentInstance[];\n connections: SceneConnection[];\n /** Optional port-less logical links (ADR-0023); absent when there are none. */\n associations?: SceneAssociation[];\n /** Optional acquisition sources (ADR-0024). */\n dataSources?: SceneDataSource[];\n /** Optional typed tags (ADR-0024). */\n runtimeVariables?: RuntimeVariable[];\n /** Optional; absent when the scene has no bindings. */\n tagBindings?: TagBinding[];\n /** Optional reference drawing (ADR-0012); absent when there is none. */\n underlay?: SceneUnderlay;\n /** Optional 2D layouts per view (ADR-0026); absent when nothing has been placed. */\n views?: SceneViews;\n /** Host or library data, keyed by reverse-DNS namespace (ADR-0021). */\n extensions?: SceneExtensions;\n}\n/** The 2D views a scene can lay out (ADR-0026). Host views go in `extensions`. */\nexport const viewKinds = ['process', 'electrical'] as const;\nexport type ViewKind = (typeof viewKinds)[number];\n/** Where a component's symbol sits in one view, in drawing units (1 mm), x right and y down. */\nexport interface SymbolPlacement {\n x: number;\n y: number;\n rotation?: 0 | 90 | 180 | 270;\n /** Hidden in this view only. */\n hidden?: true;\n}\n/** A connection's or association's drawn line in one view: at least two points. */\nexport interface ViewRoute {\n points: [number, number][];\n}\n/** Layout only: equipment, ports and wiring stay in the model (ADR-0026). */\nexport interface ViewLayout {\n /** By component id. */\n symbols?: Record<string, SymbolPlacement>;\n /** By connection or association id. */\n routes?: Record<string, ViewRoute>;\n}\nexport type SceneViews = Partial<Record<ViewKind, ViewLayout>>;\n\nexport function createEmptyScene(): ScadaScene {\n return { schemaVersion: 4, documentType: SCENE_DOCUMENT_TYPE, units: 'm', components: [], connections: [] };\n}\nexport type PortCheck = { ok: true } | { ok: false; reason: string };\n\nconst signalFlow = (p: ConnectionPort): PortFlow | undefined => p.flow ?? (p.signal ? (p.signal.type === 'DO' || p.signal.type === 'AO' ? 'out' : 'in') : undefined);\nconst isAnalog = (t: SignalType) => t === 'AI' || t === 'AO';\nconst describeRange = (s: NonNullable<ConnectionPort['signal']>) => `${s.range ? `${s.range[0]}–${s.range[1]}` : 'a signal'}${s.unit ? ` ${s.unit}` : ''}`;\n\n/**\n * Whether two ports may be connected, per domain (ADR-0023), and why not. Metadata missing on\n * either side never fails a check. These are engineering-aid checks on the described model: they\n * never verify physical wiring, protective earth or functional safety.\n */\nexport function checkPorts(a: ConnectionPort, b: ConnectionPort): PortCheck {\n const no = (reason: string): PortCheck => ({ ok: false, reason });\n if (a.kind !== b.kind) return no(`a ${a.kind} port cannot connect to a ${b.kind} port`);\n if (a.nominalSize !== undefined && b.nominalSize !== undefined && Math.abs(a.nominalSize - b.nominalSize) >= 0.0001) return no('the nominal sizes differ');\n if (a.kind === 'signal') {\n if (a.signal && b.signal && isAnalog(a.signal.type) !== isAnalog(b.signal.type)) return no('a digital signal cannot connect to an analog one');\n const fa = signalFlow(a), fb = signalFlow(b);\n if (fa === 'out' && fb === 'out') return no('an output cannot connect to an output');\n if (fa === 'in' && fb === 'in') return no('an input cannot connect to an input');\n if (a.signal && b.signal) {\n const sameRange = !a.signal.range || !b.signal.range || a.signal.range.every((v, i) => v === b.signal!.range![i]);\n const sameUnit = !a.signal.unit || !b.signal.unit || a.signal.unit === b.signal.unit;\n if (!sameRange || !sameUnit) return no(`${describeRange(a.signal)} cannot connect to ${describeRange(b.signal)}`);\n }\n } else if (a.kind === 'power') {\n if (a.power && b.power) {\n if (a.power.kind !== b.power.kind) return no(a.power.kind === 'PE' || b.power.kind === 'PE' ? 'protective earth connects only to protective earth' : `${a.power.kind} cannot connect to ${b.power.kind}`);\n if (a.power.voltage !== undefined && b.power.voltage !== undefined && a.power.voltage !== b.power.voltage) return no(`${a.power.voltage} V cannot connect to ${b.power.voltage} V`);\n if (a.power.phases !== undefined && b.power.phases !== undefined && a.power.phases !== b.power.phases) return no(`${a.power.phases}-phase cannot connect to ${b.power.phases}-phase`);\n }\n if (a.flow === 'out' && b.flow === 'out') return no('two power sources cannot connect to each other');\n } else if (a.kind === 'network' && a.network && b.network) {\n if (a.network.medium !== b.network.medium) return no(`${a.network.medium} cannot connect to ${b.network.medium}`);\n const pa = a.network.protocols, pb = b.network.protocols;\n if (pa?.length && pb?.length && !pa.some((p) => pb.includes(p))) return no('the ports share no protocol');\n }\n return { ok: true };\n}\n\nexport function portsCompatible(a: ConnectionPort, b: ConnectionPort): boolean {\n return checkPorts(a, b).ok;\n}\n\n/** Ports joined by placing parts against each other (snapping, touching, attach). Power, signal and network ports are wired instead. */\nexport function matesPhysically(port: ConnectionPort): boolean {\n return port.kind === 'fluid' || port.kind === 'mechanical' || port.kind === 'electrical';\n}\n\n/** How many connections a port takes (ADR-0023): `maxConnections`, default 1. */\nexport function portCapacity(port: ConnectionPort): number {\n return port.maxConnections ?? 1;\n}\n\n/**\n * `record[key]` for an own key only. Keys from documents and hosts are untrusted: a plain lookup of\n * \"constructor\", \"toString\" or \"__proto__\" finds inherited values (T-096). Internal; not exported by the package.\n */\nexport function ownValue<T>(record: Readonly<Record<string, T>> | undefined, key: string): T | undefined {\n return record !== undefined && record !== null && typeof key === 'string' && Object.hasOwn(record, key) ? record[key] : undefined;\n}\n"]}
@@ -1,16 +1,16 @@
1
- import type { ScadaScene } from './scene.js';
1
+ import { type ScadaScene } from './scene.js';
2
2
  import { type SceneValidationOptions, type SceneValidationResult } from './validation.js';
3
3
  export interface ParseSceneOptions extends SceneValidationOptions {
4
- /** Largest accepted text length in characters, checked before parsing. Default 10,000,000. */
4
+ /** Largest accepted text length in characters, checked before parsing. Default 32,000,000: a document at every default count limit is about 16 MB (T-095). */
5
5
  maxLength?: number;
6
6
  }
7
7
  /**
8
- * Canonical JSON for a scene: current schema version (3), vectors as named objects in x, y, z(, w)
9
- * order, fixed key order, property keys sorted,
10
- * two-space indent and a trailing newline. Only authored fields are written, so the same scene
11
- * always produces the same bytes. Array order (components, connections) is preserved.
8
+ * Canonical JSON for a scene: current schema version (4, ADR-0021), vectors as named objects in
9
+ * x, y, z(, w) order, fixed key order, keys of properties, labels, extensions and view entries sorted, two-space
10
+ * indent and a trailing newline. Only authored fields are written, so the same scene always
11
+ * produces the same bytes. Array order (components, connections) is preserved.
12
12
  */
13
13
  export declare function serializeScene(scene: ScadaScene): string;
14
- /** Parses scene JSON text: size check, JSON parse, then `validateScene` (which migrates version 1). */
14
+ /** Parses scene JSON text: size check, JSON parse, then `validateScene` (which migrates versions 1–3). */
15
15
  export declare function parseScene(text: string, options: ParseSceneOptions): SceneValidationResult;
16
16
  //# sourceMappingURL=serialization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../src/serialization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAiB,KAAK,sBAAsB,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEzG,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CA2CxD;AAED,uGAAuG;AACvG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,qBAAqB,CAY1F"}
1
+ {"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../src/serialization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,KAAK,UAAU,EAAmB,MAAM,YAAY,CAAC;AAC9G,OAAO,EAAiB,KAAK,sBAAsB,EAAE,KAAK,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEzG,MAAM,WAAW,iBAAkB,SAAQ,sBAAsB;IAC/D,8JAA8J;IAC9J,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkCD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAyHxD;AAED,0GAA0G;AAC1G,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,qBAAqB,CAY1F"}