@willcgage/module-schematic 0.21.0 → 0.22.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 CHANGED
@@ -216,6 +216,7 @@ function emptyEditorState(lengthInches) {
216
216
  poseOverrides: {},
217
217
  endplateWidths: {},
218
218
  outline: [],
219
+ sectionBreaks: [],
219
220
  controlPoints: [],
220
221
  industries: [],
221
222
  mainPath: []
@@ -409,6 +410,8 @@ function stateToDoc(state, recordNumber) {
409
410
  // Benchwork footprint outline (module-local inches); only when it's a real
410
411
  // ring (≥ 3 vertices).
411
412
  ...state.outline.length >= 3 ? { outline: state.outline } : {},
413
+ // Internal section joints (inches from A), when the module has more than one.
414
+ ...state.sectionBreaks.length ? { sectionBreaks: state.sectionBreaks } : {},
412
415
  // Authored mainline path (module-local inches); only when it's a real path.
413
416
  ...state.mainPath.length >= 2 ? { mainPath: state.mainPath } : {}
414
417
  };
@@ -508,6 +511,7 @@ function docToState(doc, fallbackLength, moduleTracks = []) {
508
511
  poseOverrides,
509
512
  endplateWidths,
510
513
  outline,
514
+ sectionBreaks: (d.sectionBreaks ?? []).filter((n) => Number.isFinite(n)).map((n) => sc(n)),
511
515
  mainPath,
512
516
  crossings: (d.crossings ?? []).map((x) => ({
513
517
  id: x.id,