@willcgage/module-schematic 0.37.0 → 0.38.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 +0 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -22
- package/dist/index.d.ts +7 -22
- package/dist/index.js +1 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9,12 +9,6 @@ function endplateWidthInches(ep) {
|
|
|
9
9
|
const w = ep?.widthInches;
|
|
10
10
|
return typeof w === "number" && w > 0 ? w : FREEMO_ENDPLATE_WIDTH_RECOMMENDED_INCHES;
|
|
11
11
|
}
|
|
12
|
-
function endLabels(o) {
|
|
13
|
-
return o === "north-south" ? { a: "S", b: "N" } : { a: "W", b: "E" };
|
|
14
|
-
}
|
|
15
|
-
function endLabelsLong(o) {
|
|
16
|
-
return o === "north-south" ? { a: "South", b: "North" } : { a: "West", b: "East" };
|
|
17
|
-
}
|
|
18
12
|
function benchworkOutline(doc) {
|
|
19
13
|
const pts = (doc?.outline ?? []).filter((p) => p && Number.isFinite(p.x) && Number.isFinite(p.y)).map((p) => ({
|
|
20
14
|
x: p.x,
|
|
@@ -565,7 +559,6 @@ function emptyEditorState(lengthInches) {
|
|
|
565
559
|
outline: [],
|
|
566
560
|
sectionBreaks: [],
|
|
567
561
|
sections: [],
|
|
568
|
-
orientation: "east-west",
|
|
569
562
|
controlPoints: [],
|
|
570
563
|
industries: [],
|
|
571
564
|
mainPath: []
|
|
@@ -802,9 +795,6 @@ function stateToDoc(state, recordNumber) {
|
|
|
802
795
|
// Sections as objects — emitted only once the owner has some, so a module
|
|
803
796
|
// that never used them keeps exactly the doc it had before (#96 phase 2).
|
|
804
797
|
...state.sections.length ? { sections: moduleSections({ sections: state.sections }) } : {},
|
|
805
|
-
// Emitted only when it isn't the east/west default, so existing docs are
|
|
806
|
-
// byte-identical.
|
|
807
|
-
...state.orientation === "north-south" ? { orientation: state.orientation } : {},
|
|
808
798
|
// Authored mainline path (module-local inches); only when it's a real path.
|
|
809
799
|
...state.mainPath.length >= 2 ? { mainPath: state.mainPath } : {}
|
|
810
800
|
};
|
|
@@ -911,7 +901,6 @@ function docToState(doc, fallbackLength, moduleTracks = []) {
|
|
|
911
901
|
outline,
|
|
912
902
|
sectionBreaks: (d.sectionBreaks ?? []).filter((n) => Number.isFinite(n)).map((n) => sc(n)),
|
|
913
903
|
sections: moduleSections(d),
|
|
914
|
-
orientation: d.orientation === "north-south" ? "north-south" : "east-west",
|
|
915
904
|
mainPath,
|
|
916
905
|
crossings: (d.crossings ?? []).map((x) => ({
|
|
917
906
|
id: x.id,
|
|
@@ -1447,8 +1436,6 @@ exports.deriveEndplatePoses = deriveEndplatePoses;
|
|
|
1447
1436
|
exports.divergeSideForHand = divergeSideForHand;
|
|
1448
1437
|
exports.docToState = docToState;
|
|
1449
1438
|
exports.emptyEditorState = emptyEditorState;
|
|
1450
|
-
exports.endLabels = endLabels;
|
|
1451
|
-
exports.endLabelsLong = endLabelsLong;
|
|
1452
1439
|
exports.endplateFaceSegments = endplateFaceSegments;
|
|
1453
1440
|
exports.endplateTrackOffsetFor = endplateTrackOffsetFor;
|
|
1454
1441
|
exports.endplateTrackOffsetInches = endplateTrackOffsetInches;
|