@willcgage/module-schematic 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -94,6 +94,10 @@ interface SchematicTurnout {
|
|
|
94
94
|
address?: string | null;
|
|
95
95
|
/** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
|
|
96
96
|
size?: number | null;
|
|
97
|
+
/** A curved turnout — the diverging route bows into an arc (both routes curve
|
|
98
|
+
* the same way) instead of leaving as a straight diagonal. Physical-render
|
|
99
|
+
* only; the operations view stays topological. */
|
|
100
|
+
curved?: boolean | null;
|
|
97
101
|
}
|
|
98
102
|
interface SchematicSignal {
|
|
99
103
|
id: string;
|
|
@@ -359,6 +363,9 @@ interface EditorTurnout {
|
|
|
359
363
|
kind: TurnoutKind;
|
|
360
364
|
/** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
|
|
361
365
|
size?: number;
|
|
366
|
+
/** A curved turnout — the diverging route bows into an arc rather than a
|
|
367
|
+
* straight diagonal. Physical-render only (the operations view is topological). */
|
|
368
|
+
curved?: boolean;
|
|
362
369
|
}
|
|
363
370
|
interface EditorCpSignal {
|
|
364
371
|
id: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -94,6 +94,10 @@ interface SchematicTurnout {
|
|
|
94
94
|
address?: string | null;
|
|
95
95
|
/** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
|
|
96
96
|
size?: number | null;
|
|
97
|
+
/** A curved turnout — the diverging route bows into an arc (both routes curve
|
|
98
|
+
* the same way) instead of leaving as a straight diagonal. Physical-render
|
|
99
|
+
* only; the operations view stays topological. */
|
|
100
|
+
curved?: boolean | null;
|
|
97
101
|
}
|
|
98
102
|
interface SchematicSignal {
|
|
99
103
|
id: string;
|
|
@@ -359,6 +363,9 @@ interface EditorTurnout {
|
|
|
359
363
|
kind: TurnoutKind;
|
|
360
364
|
/** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
|
|
361
365
|
size?: number;
|
|
366
|
+
/** A curved turnout — the diverging route bows into an arc rather than a
|
|
367
|
+
* straight diagonal. Physical-render only (the operations view is topological). */
|
|
368
|
+
curved?: boolean;
|
|
362
369
|
}
|
|
363
370
|
interface EditorCpSignal {
|
|
364
371
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -366,7 +366,8 @@ function stateToDoc(state, recordNumber) {
|
|
|
366
366
|
divergeTrack: t.divergeTrack,
|
|
367
367
|
kind: t.kind,
|
|
368
368
|
name: t.name || void 0,
|
|
369
|
-
...t.size ? { size: t.size } : {}
|
|
369
|
+
...t.size ? { size: t.size } : {},
|
|
370
|
+
...t.curved ? { curved: true } : {}
|
|
370
371
|
})),
|
|
371
372
|
...state.crossings.length > 0 ? {
|
|
372
373
|
crossings: state.crossings.map((x) => ({
|
|
@@ -527,7 +528,8 @@ function docToState(doc, fallbackLength, moduleTracks = []) {
|
|
|
527
528
|
onTrack: t.onTrack,
|
|
528
529
|
divergeTrack: t.divergeTrack,
|
|
529
530
|
kind: t.kind ?? "right",
|
|
530
|
-
...t.size ? { size: t.size } : {}
|
|
531
|
+
...t.size ? { size: t.size } : {},
|
|
532
|
+
...t.curved ? { curved: true } : {}
|
|
531
533
|
})),
|
|
532
534
|
controlPoints: readControlPoints(d, sc),
|
|
533
535
|
industries: (d.industries ?? []).map((ind) => ({
|