diff --git a/.gitignore b/.gitignore index dc64b4aff5e..04e44de64de 100644 --- a/.gitignore +++ b/.gitignore @@ -133,7 +133,3 @@ scripts/verdaccio.sh !markdown/dev/reference/api/point/dist .test-failures.log -core.7268 -.gitignore -sites/lab/package.json -sites/lab/core.873 diff --git a/designs/ursula/src/back2.mjs b/designs/ursula/src/back2.mjs deleted file mode 100644 index de3bec23bd6..00000000000 --- a/designs/ursula/src/back2.mjs +++ /dev/null @@ -1,49 +0,0 @@ -export default function (part) { - const { - points, - paths, - Snippet, - snippets, - store, - } = part.shorthand() - - points.waist2 = points.backWaistBandMid - - points.leg4L = points.backLegOpeningLeft - points.leg4R = points.leg4L.flipX(points.backWaistMid) - - snippets.waist2 = new Snippet('notch', points.waist2) - snippets.leg4L = new Snippet('notch', points.leg4L) - snippets.leg4R = new Snippet('notch', points.leg4R) - - if (store.get('numWaistMarkersFront') < 3) { - // backWaistBand extends from right to left, so use (0.5 - waistMarkerFrac) - points.waist1R = paths.backWaistBand.shiftFractionAlong(0.5 - store.get('waistMarkerFrac')) - points.waist1L = points.waist1R.flipX(points.backWaistMid) - - snippets.waist1L = new Snippet('notch', points.waist1L) - snippets.waist1R = new Snippet('notch', points.waist1R) - } - - if (store.get('numLegMarkersFront') + store.get('numLegMarkersGusset') < 2) { - // draw second marker, on back - // use (1 - frac) because the path is drawn from gusset to waist - points.leg2R = paths.backLegOpening.shiftFractionAlong(1 - store.get('legMarker2Frac')) - points.leg2L = points.leg2R.flipX(points.backWaistMid) - - snippets.leg2L = new Snippet('notch', points.leg2L) - snippets.leg2R = new Snippet('notch', points.leg2R) - } - - if (store.get('numLegMarkersFront') + store.get('numLegMarkersGusset') < 3) { - // draw third marker, on back - // use (1 - frac) because the path is drawn from gusset to waist - points.leg3R = paths.backLegOpening.shiftFractionAlong(1 - store.get('legMarker3Frac')) - points.leg3L = points.leg3R.flipX(points.backWaistMid) - - snippets.leg3L = new Snippet('notch', points.leg3L) - snippets.leg3R = new Snippet('notch', points.leg3R) - } - - return part -} diff --git a/designs/ursula/src/elastic.mjs b/designs/ursula/src/elastic.mjs index 99832b8b76a..bdedf627f06 100644 --- a/designs/ursula/src/elastic.mjs +++ b/designs/ursula/src/elastic.mjs @@ -29,124 +29,5 @@ export default function (part) { }) } - // determine where the markers should be drawn - - // waist band: start at center front - if (store.get('frontWaistBandLength') >= waistBandLength / 2) { - store.set('numWaistMarkersFront', 3) - store.set('waistMarkerFrac', (0.25 * waistBandLength) / store.get('frontWaistBandLength')) - } else { - store.set('numWaistMarkersFront', 1) - store.set('waistMarkerFrac', (0.25 * waistBandLength) / store.get('backWaistBandLength')) - } - - // leg opening: start at side seam (marker 0, does not count towards total) - // leg marker 1: at 25%, on either front or gusset - // leg marker 2: at 50%, on front, gusset or back - // leg marker 3: at 75%, on gusset or back - // for any part, 'legMarker#Frac' gives the relative position along the path *on that part*, measured from front/back to gusset and from front of gusset to back of gusset - - // markers on front part - if (store.get('frontLegOpeningLength') / legOpeningLength < 0.25) { - store.set('numLegMarkersFront', 0) // side seam only (count markers per leg opening) - } else if (store.get('frontLegOpeningLength') / legOpeningLength < 0.5) { - store.set('numLegMarkersFront', 1) - store.set('legMarker1Frac', (0.25 * legOpeningLength) / store.get('frontLegOpeningLength')) - } else { - // seems unlikely: front leg opening is at least 50% of total - store.set('numLegMarkersFront', 2) - store.set('legMarker1Frac', (0.25 * legOpeningLength) / store.get('frontLegOpeningLength')) - store.set('legMarker2Frac', (0.5 * legOpeningLength) / store.get('frontLegOpeningLength')) - } - - // markers on gusset - if ( - store.get('frontLegOpeningLength') / legOpeningLength < 0.25 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength > - 0.25 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength < 0.5 - ) { - store.set('numLegMarkersGusset', 1) - store.set( - 'legMarker1Frac', - (0.25 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - } else if ( - store.get('frontLegOpeningLength') / legOpeningLength < 0.25 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= - 0.25 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength < 0.75 - ) { - store.set('numLegMarkersGusset', 2) - store.set( - 'legMarker1Frac', - (0.25 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - store.set( - 'legMarker2Frac', - (0.5 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - } else if ( - store.get('frontLegOpeningLength') / legOpeningLength < 0.25 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= - 0.25 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= 0.75 - ) { - store.set('numLegMarkersGusset', 3) - store.set( - 'legMarker1Frac', - (0.25 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - store.set( - 'legMarker2Frac', - (0.5 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - store.set( - 'legMarker3Frac', - (0.75 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - } else if ( - store.get('frontLegOpeningLength') / legOpeningLength < 0.5 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= - 0.5 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength < 0.75 - ) { - store.set('numLegMarkersGusset', 1) - store.set( - 'legMarker2Frac', - (0.5 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - } else if ( - store.get('frontLegOpeningLength') / legOpeningLength < 0.5 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= - 0.5 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= 0.75 - ) { - store.set('numLegMarkersGusset', 2) - store.set( - 'legMarker2Frac', - (0.5 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - } else if ( - store.get('frontLegOpeningLength') / legOpeningLength < 0.75 && - (store.get('frontLegOpeningLength') + store.get('gussetSideLength')) / legOpeningLength >= 0.75 - ) { - store.set('numLegMarkersGusset', 1) - store.set( - 'legMarker3Frac', - (0.75 * legOpeningLength - store.get('frontLegOpeningLength')) / store.get('gussetSideLength') - ) - } else { - store.set('numLegMarkersGusset', 0) - } - - // markers on back part - if (store.get('backLegOpeningLength') / legOpeningLength > 0.25) { - store.set('legMarker3Frac', (0.25 * legOpeningLength) / store.get('backLegOpeningLength')) - } else if (store.get('backLegOpeningLength') / legOpeningLength > 0.5) { - store.set('legMarker2Frac', (0.5 * legOpeningLength) / store.get('backLegOpeningLength')) - store.set('legMarker3Frac', (0.25 * legOpeningLength) / store.get('backLegOpeningLength')) - } - return part } diff --git a/designs/ursula/src/front2.mjs b/designs/ursula/src/front2.mjs deleted file mode 100644 index 56638d2e49d..00000000000 --- a/designs/ursula/src/front2.mjs +++ /dev/null @@ -1,48 +0,0 @@ -export default function (part) { - const { - points, - paths, - Snippet, - snippets, - store, - } = part.shorthand() - - // draw markers to indicate elastic distribution - points.waist0 = points.frontWaistBandMid - - points.leg0L = points.frontLegOpeningLeft - points.leg0R = points.leg0L.flipX(points.frontWaistMid) - - snippets.waist0 = new Snippet('notch', points.waist0) - snippets.leg0L = new Snippet('notch', points.leg0L) - snippets.leg0R = new Snippet('notch', points.leg0R) - - if (store.get('numWaistMarkersFront') > 1) { - // frontWaistBandLength extends from right to left, so use (0.5 - waistMarkerFrac) - points.waist1R = paths.frontWaistBand.shiftFractionAlong(0.5 - store.get('waistMarkerFrac')) - points.waist1L = points.waist1R.flipX(points.frontWaistMid) - - snippets.waist1L = new Snippet('notch', points.waist1L) - snippets.waist1R = new Snippet('notch', points.waist1R) - } - - if (store.get('numLegMarkersFront') > 0) { - // use (1 - frac) because the path is drawn from gusset to side seam - points.leg1L = paths.frontLegOpening.shiftFractionAlong(1 - store.get('legMarker1Frac')) - points.leg1R = points.leg1L.flipX(points.frontWaistMid) - - snippets.leg1L = new Snippet('notch', points.leg1L) - snippets.leg1R = new Snippet('notch', points.leg1R) - } - - if (store.get('numLegMarkersFront') > 1) { - // use (1 - frac) because the path is drawn from gusset to side seam - points.leg2L = paths.frontLegOpening.shiftFractionAlong(1 - store.get('legMarker2Frac')) - points.leg2R = points.leg2L.flipX(points.frontWaistMid) - - snippets.leg2L = new Snippet('notch', points.leg2L) - snippets.leg2R = new Snippet('notch', points.leg2R) - } - - return part -} diff --git a/designs/ursula/src/gusset.mjs b/designs/ursula/src/gusset.mjs index ce75849e75b..377073cdaf5 100644 --- a/designs/ursula/src/gusset.mjs +++ b/designs/ursula/src/gusset.mjs @@ -26,11 +26,13 @@ export default function (part) { points.frontMidMid = points.gussetCp1.shiftFractionTowards(points.gussetCp2, 0.5) /* Store lengths for use in elastic */ - paths.gussetLegOpening = new Path() - .move(points.backGussetRight) - .curve(points.backGussetRight, points.gussetCp2, points.frontGussetRight) - .setRender(false) - store.set('gussetSideLength', paths.gussetLegOpening.length()) + store.set( + 'gussetSideLength', + new Path() + .move(points.backGussetRight) + .curve(points.backGussetRight, points.gussetCp2, points.frontGussetRight) + .length() + ) // Draw paths paths.seam = new Path() diff --git a/designs/ursula/src/gusset2.mjs b/designs/ursula/src/gusset2.mjs deleted file mode 100644 index a95f464aecc..00000000000 --- a/designs/ursula/src/gusset2.mjs +++ /dev/null @@ -1,46 +0,0 @@ -export default function (part) { - const { - points, - paths, - Snippet, - snippets, - store, - } = part.shorthand() - - // draw markers to indicate elastic distribution - if ((store.get('numLegMarkersFront') < 1) && (store.get('numLegMarkersGusset') > 0)) { - // draw first marker, on gusset - // use (1 - frac) because the path is drawn from back to front - points.leg1L = paths.gussetLegOpening.shiftFractionAlong(1 - store.get('legMarker1Frac')) - points.leg1R = points.leg1L.flipX(store.get('frontGussetMid')) - - snippets.leg1L = new Snippet('notch', points.leg1L) - snippets.leg1R = new Snippet('notch', points.leg1R) - } - if ( - (store.get('numLegMarkersFront') < 2) && - (store.get('numLegMarkersFront') + store.get('numLegMarkersGusset') > 1) - ) { - // draw second marker, on gusset - // use (1 - frac) because the path is drawn from back to front - points.leg2L = paths.gussetLegOpening.shiftFractionAlong(1 - store.get('legMarker2Frac')) - points.leg2R = points.leg2L.flipX(store.get('frontGussetMid')) - - snippets.leg2L = new Snippet('notch', points.leg2L) - snippets.leg2R = new Snippet('notch', points.leg2R) - } - if ( - (store.get('numLegMarkersFront') < 3) && - (store.get('numLegMarkersFront') + store.get('numLegMarkersGusset') > 3) - ) { - // draw third marker, on gusset - // use (1 - frac) because the path is drawn from back to front - points.leg3L = paths.gussetLegOpening.shiftFractionAlong(1 - store.get('legMarker3Frac')) - points.leg3R = points.leg3L.flipX(store.get('frontGussetMid')) - - snippets.leg3L = new Snippet('notch', points.leg3L) - snippets.leg3R = new Snippet('notch', points.leg3R) - } - - return part -} diff --git a/package.json b/package.json index 26c6cfa61c2..3c2bc562957 100644 --- a/package.json +++ b/package.json @@ -97,5 +97,18 @@ "plugins/*", "sites/*" ], - "version": "0.0.0" + "version": "0.0.0", + "dependencies": { + "autoprefixer": "^10.4.0", + "handlebars": "^4.7.7", + "jsonfile": "^6.1.0", + "postcss": "^8.4.5", + "remark-cli": "^10.0.1", + "remark-frontmatter": "^4.0.1", + "remark-lint-emphasis-marker": "^3.1.1", + "remark-lint-list-item-indent": "^3.1.1", + "remark-preset-lint-consistent": "^5.1.1", + "remark-preset-lint-recommended": "^6.1.2", + "tailwindcss": "^3.0.7" + } }