@willcgage/module-schematic 0.19.0 → 0.20.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.d.cts CHANGED
@@ -92,6 +92,8 @@ interface SchematicTurnout {
92
92
  kind?: TurnoutKind;
93
93
  name?: string | null;
94
94
  address?: string | null;
95
+ /** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
96
+ size?: number | null;
95
97
  }
96
98
  interface SchematicSignal {
97
99
  id: string;
@@ -340,6 +342,8 @@ interface EditorTurnout {
340
342
  onTrack: string;
341
343
  divergeTrack: string;
342
344
  kind: TurnoutKind;
345
+ /** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
346
+ size?: number;
343
347
  }
344
348
  interface EditorCpSignal {
345
349
  id: string;
package/dist/index.d.ts CHANGED
@@ -92,6 +92,8 @@ interface SchematicTurnout {
92
92
  kind?: TurnoutKind;
93
93
  name?: string | null;
94
94
  address?: string | null;
95
+ /** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
96
+ size?: number | null;
95
97
  }
96
98
  interface SchematicSignal {
97
99
  id: string;
@@ -340,6 +342,8 @@ interface EditorTurnout {
340
342
  onTrack: string;
341
343
  divergeTrack: string;
342
344
  kind: TurnoutKind;
345
+ /** Frog number ("size") — #4, #6, #8, etc. Governs the diverging angle. */
346
+ size?: number;
343
347
  }
344
348
  interface EditorCpSignal {
345
349
  id: string;
package/dist/index.js CHANGED
@@ -363,7 +363,8 @@ function stateToDoc(state, recordNumber) {
363
363
  onTrack: t.onTrack,
364
364
  divergeTrack: t.divergeTrack,
365
365
  kind: t.kind,
366
- name: t.name || void 0
366
+ name: t.name || void 0,
367
+ ...t.size ? { size: t.size } : {}
367
368
  })),
368
369
  ...state.crossings.length > 0 ? {
369
370
  crossings: state.crossings.map((x) => ({
@@ -519,7 +520,8 @@ function docToState(doc, fallbackLength, moduleTracks = []) {
519
520
  pos: sc(t.pos),
520
521
  onTrack: t.onTrack,
521
522
  divergeTrack: t.divergeTrack,
522
- kind: t.kind ?? "right"
523
+ kind: t.kind ?? "right",
524
+ ...t.size ? { size: t.size } : {}
523
525
  })),
524
526
  controlPoints: readControlPoints(d, sc),
525
527
  industries: (d.industries ?? []).map((ind) => ({