@willcgage/module-schematic 0.67.0 → 0.68.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
@@ -534,7 +534,7 @@ function endplateWidthFor(widths, id) {
534
534
  return typeof w === "number" && w > 0 ? w : FREEMO_ENDPLATE_WIDTH_RECOMMENDED_INCHES;
535
535
  }
536
536
  function isLoopDoc(doc) {
537
- return doc.loop === true || doc.endplates.length === 1;
537
+ return doc.loop === true;
538
538
  }
539
539
  var MAIN_TRACK_ID = "main";
540
540
  var MAIN2_TRACK_ID = "main2";
@@ -931,8 +931,14 @@ function docToState(doc, fallbackLength, moduleTracks = []) {
931
931
  loopReturn: loop && d.loopReturn === "main2" ? "main2" : "same",
932
932
  mainsSwapped: d.mainsSwapped === true,
933
933
  configA: configOf("A"),
934
- // On a loop, a missing B means pure turnback; present = interchange loop.
935
- configB: loop && !hasB ? "none" : configOf("B"),
934
+ // NO ENDPLATE B ⇒ "none", whatever kind of module this is. On a loop that
935
+ // reads as a pure turnback (a present B makes it an interchange); on an end
936
+ // of the line or a pocket it simply means the module has one face (#184).
937
+ // ⚠️ This used to be `loop && !hasB`, so "none" only survived a round trip on
938
+ // a loop — which passed its test yesterday ONLY because a single-endplate
939
+ // module was still being misclassified as one (#191). The absence of the
940
+ // plate is the fact; why it's absent doesn't change what to read.
941
+ configB: hasB ? configOf("B") : "none",
936
942
  branches: branchEps.map((ep) => ({
937
943
  label: ep.label ?? "Branch",
938
944
  pos: sc(ep.at.pos),