diff --git a/CHANGELOG.md b/CHANGELOG.md index 0604719320e..78aff4e5438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -140,11 +140,11 @@ ## 2.22.0 (2022-08-23) -### octoplushy +### aaron #### Added - - Octoplushy is a new design for an octopus or squid plushy + - Support drafting for high bust ### bent @@ -168,18 +168,6 @@ - Make s3 options sticky to zero below 10% to avoid path split issues. Fixes [#2249](https://github.com/freesewing/freesewing/issues/2249) -### titan - -#### Added - - - Added additional notches to aid alignment - -### aaron - -#### Added - - - Support drafting for high bust - ### carlton #### Added @@ -216,6 +204,12 @@ - Support drafting for high bust Closes [#802](https://github.com/freesewing/freesewing/issues/802) +### octoplushy + +#### Added + + - Octoplushy is a new design for an octopus or squid plushy + ### paco #### Changed @@ -267,6 +261,12 @@ - Support drafting for high bust +### titan + +#### Added + + - Added additional notches to aid alignment + ### wahid #### Added @@ -333,65 +333,19 @@ ## 2.21.0 (2022-06-27) +### aaron + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + ### albert #### Changed - Migrated from Rollup to Esbuild for all builds -### benjamin - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### bob - -#### Added - - - Bob is a pattern for a bib, the same one that's used in our design tutorial - -### florence - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### florent - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### hi - -#### Added - - - Hi is a new desing for a shark plushy - -### holmes - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### hortensia - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### lucy - -#### Added - - - Lucy is a pattern for a historical tie-on pocket - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### trayvon +### bee #### Changed @@ -399,6 +353,12 @@ ### bella +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### benjamin + #### Changed - Migrated from Rollup to Esbuild for all builds @@ -409,6 +369,12 @@ - Migrated from Rollup to Esbuild for all builds +### bob + +#### Added + + - Bob is a pattern for a bib, the same one that's used in our design tutorial + ### breanna #### Changed @@ -422,30 +388,6 @@ - Migrated from Rollup to Esbuild for all builds - Slightly increased the default neck ease -### noble - -#### Added - - - Noble is a body block with prince(ss) seams - -### titan - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### aaron - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### bee - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - ### bruce #### Changed @@ -484,6 +426,42 @@ ### diana +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### examples + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### florence + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### florent + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### hi + +#### Added + + - Hi is a new desing for a shark plushy + +### holmes + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### hortensia + #### Changed - Migrated from Rollup to Esbuild for all builds @@ -506,6 +484,22 @@ ### jaeger +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### legend + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### lucy + +#### Added + + - Lucy is a pattern for a historical tie-on pocket + #### Changed - Migrated from Rollup to Esbuild for all builds @@ -516,6 +510,12 @@ - Migrated from Rollup to Esbuild for all builds +### noble + +#### Added + + - Noble is a body block with prince(ss) seams + ### paco #### Changed @@ -524,6 +524,18 @@ ### penelope +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### plugintest + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### rendertest + #### Changed - Migrated from Rollup to Esbuild for all builds @@ -588,6 +600,24 @@ ### tiberius +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### titan + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### trayvon + +#### Changed + + - Migrated from Rollup to Esbuild for all builds + +### tutorial + #### Changed - Migrated from Rollup to Esbuild for all builds @@ -628,36 +658,6 @@ ### yuri -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### examples - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### legend - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### plugintest - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### rendertest - -#### Changed - - - Migrated from Rollup to Esbuild for all builds - -### tutorial - #### Changed - Migrated from Rollup to Esbuild for all builds @@ -920,46 +920,25 @@ ## 2.20.0 (2022-01-24) +### aaron + +#### Changed + + - Switched to default import for version from package.json + ### albert #### Changed - Switched to default import for version from package.json -### benjamin - -#### Changed - - - Switched to default import for version from package.json - -### florence - -#### Changed - - - Switched to default import for version from package.json - -### florent - -#### Changed - - - Switched to default import for version from package.json - -### holmes - -#### Changed - - - Switched to default import for version from package.json - -### hortensia - -#### Changed - - - Switched to default import for version from package.json - -### trayvon +### bee #### Changed + - Re-structured option groups + - Expose all options to the user that should be configurable + - Hide/lock options that should be fixed (inherited from Bella) - Switched to default import for version from package.json ### bella @@ -970,6 +949,12 @@ - Expose the `frontArmholeCurvature` option to the user via option groups - Switched to default import for version from package.json +### benjamin + +#### Changed + + - Switched to default import for version from package.json + ### bent #### Changed @@ -988,27 +973,6 @@ - Switched to default import for version from package.json -### titan - -#### Changed - - - Switched to default import for version from package.json - -### aaron - -#### Changed - - - Switched to default import for version from package.json - -### bee - -#### Changed - - - Re-structured option groups - - Expose all options to the user that should be configurable - - Hide/lock options that should be fixed (inherited from Bella) - - Switched to default import for version from package.json - ### bruce #### Changed @@ -1053,6 +1017,40 @@ - Expose the `cuffEase` option to the user via option groups - Switched to default import for version from package.json +### examples + +#### Added + + - Added plugin_gore example + +#### Changed + + - Switched to default import for version from package.json + +### florence + +#### Changed + + - Switched to default import for version from package.json + +### florent + +#### Changed + + - Switched to default import for version from package.json + +### holmes + +#### Changed + + - Switched to default import for version from package.json + +### hortensia + +#### Changed + + - Switched to default import for version from package.json + ### huey #### Changed @@ -1067,6 +1065,12 @@ ### jaeger +#### Changed + + - Switched to default import for version from package.json + +### legend + #### Changed - Switched to default import for version from package.json @@ -1090,6 +1094,23 @@ - Switched to default import for version from package.json +### plugintest + +#### Added + + - Added the plugintest pattern which is used for testing plugins + +#### Changed + + - Switched to default import for version from package.json + +### rendertest + +#### Changed + + - Restructured the pattern to allow inclusion of individual parts in Example component + - Switched to default import for version from package.json + ### sandy #### Changed @@ -1137,6 +1158,24 @@ ### tiberius +#### Changed + + - Switched to default import for version from package.json + +### titan + +#### Changed + + - Switched to default import for version from package.json + +### trayvon + +#### Changed + + - Switched to default import for version from package.json + +### tutorial + #### Changed - Switched to default import for version from package.json @@ -1167,45 +1206,6 @@ ### yuri -#### Changed - - - Switched to default import for version from package.json - -### examples - -#### Added - - - Added plugin_gore example - -#### Changed - - - Switched to default import for version from package.json - -### legend - -#### Changed - - - Switched to default import for version from package.json - -### plugintest - -#### Added - - - Added the plugintest pattern which is used for testing plugins - -#### Changed - - - Switched to default import for version from package.json - -### rendertest - -#### Changed - - - Restructured the pattern to allow inclusion of individual parts in Example component - - Switched to default import for version from package.json - -### tutorial - #### Changed - Switched to default import for version from package.json @@ -1424,12 +1424,6 @@ ## 2.19.4 (2021-11-09) -### titan - -#### Fixed - - - Fixed a regression that caused the `waistHeight` option to be ignored. Closes [#1467](https://github.com/freesewing/freesewing/issues/1467) - ### paco #### Fixed @@ -1449,6 +1443,12 @@ - Fix dependencies when only drafting a front Closes [#1445](https://github.com/freesewing/freesewing/issues/1445) +### titan + +#### Fixed + + - Fixed a regression that caused the `waistHeight` option to be ignored. Closes [#1467](https://github.com/freesewing/freesewing/issues/1467) + ## 2.19.3 (2021-11-05) @@ -1465,30 +1465,18 @@ ## 2.19.2 (2021-11-02) -### holmes - -#### Fixed - - - Fixed SA to use twice the SA value on hem allowance - -### trayvon - -#### Changed - - - Migrated the `knotWidth` and `tipWidth` options from mm to snapped pct - -### titan - -#### Changed - - - Migrated the `waistbandWidth` option from mm to snapped pct - ### cornelius #### Fixed - Removed lingering console.log statements +### holmes + +#### Fixed + + - Fixed SA to use twice the SA value on hem allowance + ### sandy #### Changed @@ -1507,15 +1495,21 @@ - Fixed missing store object in button(hole)placket part +### titan + +#### Changed + + - Migrated the `waistbandWidth` option from mm to snapped pct + +### trayvon + +#### Changed + + - Migrated the `knotWidth` and `tipWidth` options from mm to snapped pct + ## 2.19.1 (2021-10-23) -### hortensia - -#### Fixed - - - Fixed issue with the handle width not drafting correctly Closes [#1403](https://github.com/freesewing/freesewing/issues/1403) - ### cornelius #### Added @@ -1526,6 +1520,12 @@ - Fixed issue where the cuff style is not drafted in certain configurations Closes [#1325](https://github.com/freesewing/freesewing/issues/1325) +### hortensia + +#### Fixed + + - Fixed issue with the handle width not drafting correctly Closes [#1403](https://github.com/freesewing/freesewing/issues/1403) + ### simon #### Fixed @@ -1541,6 +1541,23 @@ ## 2.19.0 (2021-10-17) +### bee + +#### Added + + - Bee is a bikini + - Initial release + +### charlie + +#### Changed + + - Changed the `waistbandWidth` option type from `mm` to `pct` + +#### Fixed + + - Support drafting of non-human measurements (dolls & giants) Closes [#1313](https://github.com/freesewing/freesewing/issues/1313) + ### holmes #### Added @@ -1565,23 +1582,6 @@ - Changed the `handleWidth` option type from `mm` to `pct` -### bee - -#### Added - - - Bee is a bikini - - Initial release - -### charlie - -#### Changed - - - Changed the `waistbandWidth` option type from `mm` to `pct` - -#### Fixed - - - Support drafting of non-human measurements (dolls & giants) Closes [#1313](https://github.com/freesewing/freesewing/issues/1313) - ### jaeger #### Changed @@ -1898,18 +1898,18 @@ - The `s3collar and `s3armhole` options now allow shifting the shoulder seam (`s3` is short for *Shift Shoulder Seam*) -### ursula - -#### Added - - - Initial release of Ursula, a basic, highly-customizable underwear pattern - ### tutorial #### Fixed - Set department in the config to one of the newly accepted values +### ursula + +#### Added + + - Initial release of Ursula, a basic, highly-customizable underwear pattern + ### plugin-bundle #### Changed @@ -1947,50 +1947,26 @@ ## 2.16.1 (2021-05-30) +### aaron + +#### Changed + + - Changed `department` setting in config in line with new grouping + ### albert -#### Changed - - - Changed `department` setting in config in line with new grouping - -### benjamin - -#### Changed - - - Changed `department` setting in config in line with new grouping - -### florence - -#### Changed - - - Changed `department` setting in config in line with new grouping - -### florent - -#### Changed - - - Changed `department` setting in config in line with new grouping - -### holmes - -#### Changed - - - Changed `department` setting in config in line with new grouping - -### hortensia - -#### Changed - - - Changed `department` setting in config in line with new grouping - -### trayvon - #### Changed - Changed `department` setting in config in line with new grouping ### bella +#### Changed + + - Changed `department` setting in config in line with new grouping + +### benjamin + #### Changed - Changed `department` setting in config in line with new grouping @@ -2009,18 +1985,6 @@ ### brian -#### Changed - - - Changed `department` setting in config in line with new grouping - -### titan - -#### Changed - - - Changed `department` setting in config in line with new grouping - -### aaron - #### Changed - Changed `department` setting in config in line with new grouping @@ -2063,6 +2027,30 @@ ### diana +#### Changed + + - Changed `department` setting in config in line with new grouping + +### florence + +#### Changed + + - Changed `department` setting in config in line with new grouping + +### florent + +#### Changed + + - Changed `department` setting in config in line with new grouping + +### holmes + +#### Changed + + - Changed `department` setting in config in line with new grouping + +### hortensia + #### Changed - Changed `department` setting in config in line with new grouping @@ -2135,6 +2123,18 @@ ### teagan +#### Changed + + - Changed `department` setting in config in line with new grouping + +### titan + +#### Changed + + - Changed `department` setting in config in line with new grouping + +### trayvon + #### Changed - Changed `department` setting in config in line with new grouping @@ -2160,6 +2160,12 @@ ## 2.16.0 (2021-05-24) +### brian + +#### Fixed + + - Paperless dimensions don't extend to hem See [#1030](https://github.com/freesewing/freesewing/issues/1030) + ### florent #### Fixed @@ -2167,12 +2173,6 @@ - Add missing notches See [#1015](https://github.com/freesewing/freesewing/issues/1015) - Removed inherited miniscale points -### brian - -#### Fixed - - - Paperless dimensions don't extend to hem See [#1030](https://github.com/freesewing/freesewing/issues/1030) - ### huey #### Fixed @@ -2258,6 +2258,33 @@ - Shoulder point control point fix for doll-sized clothes +### charlie + +#### Added + + - Inital release of the Charlie Chinos pattern + +### cornelius + +#### Fixed + + - Handle edge-case where splitting a path on and endpoint causes things to break + +### examples + +#### Added + + - Added examples for bartack plugin + - Added examples for new buttonhole-start/end snippets + +### paco + +#### Changed + + - Extended range and inreased default of the healEase option + - Added the (disabled) waistbandHeight option from Titan + - Changed to Titan's waistbandWidth option + ### titan #### Added @@ -2279,33 +2306,6 @@ - Always keep seat control point vertically between styled waist and seat - Adapt the outseam to the dropped waist in all circumstances -### charlie - -#### Added - - - Inital release of the Charlie Chinos pattern - -### cornelius - -#### Fixed - - - Handle edge-case where splitting a path on and endpoint causes things to break - -### paco - -#### Changed - - - Extended range and inreased default of the healEase option - - Added the (disabled) waistbandHeight option from Titan - - Changed to Titan's waistbandWidth option - -### examples - -#### Added - - - Added examples for bartack plugin - - Added examples for new buttonhole-start/end snippets - ### plugin-theme #### Added @@ -2359,12 +2359,6 @@ - Fixed issue with out-of-order execution -### titan - -#### Fixed - - - Always ensure point waistIn is created in back part - ### paco #### Fixed @@ -2383,6 +2377,12 @@ - Fixed type in bustsidecode finder code +### titan + +#### Fixed + + - Always ensure point waistIn is created in back part + ## 2.13.1 (2021-02-14) @@ -2401,12 +2401,6 @@ ## 2.13.0 (2021-02-13) -### hortensia - -#### Added - - - Initial release of Hortensia, a handbag pattern - ### bella #### Fixed @@ -2420,18 +2414,18 @@ - Try harder to find the intersection point for the scyedart - Define missing y variable in paperless branch -### titan - -#### Fixed - - - Always balance the waist - ### bruce #### Fixed - Added notches to facilitate seam matching +### hortensia + +#### Added + + - Initial release of Hortensia, a handbag pattern + ### hugo #### Fixed @@ -2445,6 +2439,12 @@ - Force bust dart intersection if not found initially +### titan + +#### Fixed + + - Always balance the waist + ### wahid #### Fixed @@ -2474,6 +2474,18 @@ ### albert +#### Fixed + + - Added missing scalebox + +### bent + +#### Fixed + + - Added missing scalebox + +### bruce + #### Fixed - Added missing scalebox @@ -2492,18 +2504,6 @@ ### holmes -#### Fixed - - - Added missing scalebox - -### bent - -#### Fixed - - - Added missing scalebox - -### bruce - #### Fixed - Added missing scalebox @@ -2799,37 +2799,26 @@ ## 2.7.0 (2020-07-12) +### aaron + +#### Changed + + - Updated side seam shaping and tweaked options for better defaults + - Better handling of `armholeDrop` option + - Ported aaron to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) + - Removed `Circumference` suffix from measurement names + - Report armhole and neck opening length through raised events + +#### Fixed + + - Fixed incorrect instruction for neck binding (the indicated length was only half) + ### benjamin #### Changed - Removed `Circumference` suffix from measurement names -### florence - -#### Changed - - - Removed `Circumference` suffix from measurement names - -### florent - -#### Changed - - - Removed `Circumference` suffix from measurement names - -### holmes - -#### Changed - - - Removed `Circumference` suffix from measurement names - -### trayvon - -#### Changed - - - Ported trayvon to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) - - Removed `Circumference` suffix from measurement names - ### bent #### Changed @@ -2860,27 +2849,6 @@ - Removed `Circumference` suffix from measurement names - Removed deprecated `debug()` statements -### titan - -#### Added - - - A FreeSewing block for pants/trousers - - Initial release - -### aaron - -#### Changed - - - Updated side seam shaping and tweaked options for better defaults - - Better handling of `armholeDrop` option - - Ported aaron to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) - - Removed `Circumference` suffix from measurement names - - Report armhole and neck opening length through raised events - -#### Fixed - - - Fixed incorrect instruction for neck binding (the indicated length was only half) - ### bruce #### Changed @@ -2932,6 +2900,24 @@ - Ported diana to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) - Removed `Circumference` suffix from measurement names +### florence + +#### Changed + + - Removed `Circumference` suffix from measurement names + +### florent + +#### Changed + + - Removed `Circumference` suffix from measurement names + +### holmes + +#### Changed + + - Removed `Circumference` suffix from measurement names + ### huey #### Changed @@ -2968,6 +2954,13 @@ - Ported jaeger to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) - Removed `Circumference` suffix from measurement names +### legend + +#### Added + + - A pattern to document the markings on our patterns + - Initial release + ### penelope #### Changed @@ -3020,6 +3013,26 @@ - Ported tamiko to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) - Removed `Circumference` suffix from measurement names +### titan + +#### Added + + - A FreeSewing block for pants/trousers + - Initial release + +### trayvon + +#### Changed + + - Ported trayvon to the new (names for) measurements. See [#416](https://github.com/freesewing/freesewing/issues/416) + - Removed `Circumference` suffix from measurement names + +### tutorial + +#### Changed + + - Removed `Circumference` suffix from measurement names + ### wahid #### Changed @@ -3035,19 +3048,6 @@ - Ported waralee to the crotchDepth measurement. See [#425](https://github.com/freesewing/freesewing/issues/425) - Removed `Circumference` suffix from measurement names -### legend - -#### Added - - - A pattern to document the markings on our patterns - - Initial release - -### tutorial - -#### Changed - - - Removed `Circumference` suffix from measurement names - ### plugin-bust #### Changed @@ -3097,6 +3097,12 @@ ## 2.6.0 (2020-05-01) +### brian + +#### Fixed + + - The `saBase` path is no longer being rendered + ### florence #### Added @@ -3107,12 +3113,6 @@ - @freesewing/fu has been renamed to @freesewing/florence -### brian - -#### Fixed - - - The `saBase` path is no longer being rendered - ### hugo #### Fixed @@ -3267,13 +3267,7 @@ ## 2.2.0 (2020-02-22) -### florent - -#### Fixed - - - Fixed an SA issue in brim top and removed SA from interfacing - -### trayvon +### aaron #### Changed @@ -3303,12 +3297,6 @@ - Removed deprecated `centerBackNeckToWaist` measurement - The `neck` point has been renamed to `hps` -### aaron - -#### Changed - - - Removed deprecated `centerBackNeckToWaist` measurement - ### carlita #### Changed @@ -3322,6 +3310,12 @@ - Removed deprecated `centerBackNeckToWaist` measurement +### florent + +#### Fixed + + - Fixed an SA issue in brim top and removed SA from interfacing + ### huey #### Changed @@ -3377,6 +3371,12 @@ ### tamiko +#### Changed + + - Removed deprecated `centerBackNeckToWaist` measurement + +### trayvon + #### Changed - Removed deprecated `centerBackNeckToWaist` measurement @@ -3605,20 +3605,14 @@ ## 2.0.0 (2019-08-25) +### aaron + +#### Added + + - Initial release + ### benjamin -#### Added - - - Initial release - -### florent - -#### Added - - - Initial release - -### trayvon - #### Added - Initial release @@ -3631,12 +3625,6 @@ ### brian -#### Added - - - Initial release - -### aaron - #### Added - Initial release @@ -3661,6 +3649,18 @@ ### cathrin +#### Added + + - Initial release + +### examples + +#### Added + + - Initial release + +### florent + #### Added - Initial release @@ -3679,6 +3679,12 @@ ### jaeger +#### Added + + - Initial release + +### rendertest + #### Added - Initial release @@ -3713,19 +3719,7 @@ - Initial release -### wahid - -#### Added - - - Initial release - -### examples - -#### Added - - - Initial release - -### rendertest +### trayvon #### Added @@ -3733,6 +3727,12 @@ ### tutorial +#### Added + + - Initial release + +### wahid + #### Added - Initial release diff --git a/config/dependencies.yaml b/config/dependencies.yaml index 497e8386ee5..51153fb75bc 100644 --- a/config/dependencies.yaml +++ b/config/dependencies.yaml @@ -378,6 +378,8 @@ shared: 'file-saver': '2.0.5' 'front-matter': '4.0.2' 'highlight.js': '11.7.0' + 'jotai': '2.1.0' + 'jotai-location': '0.5.1' 'lodash.clonedeep': '4.5.0' 'lodash.orderby': *_orderby 'lodash.unset': *_unset diff --git a/config/software/index.mjs b/config/software/index.mjs index 23447c3f06a..512d03a7771 100644 --- a/config/software/index.mjs +++ b/config/software/index.mjs @@ -1,4 +1,4 @@ -import designsByType from './designs.json' assert { type: 'json' } +import designs from './designs.json' assert { type: 'json' } import packages from './packages.json' assert { type: 'json' } import plugins from './plugins.json' assert { type: 'json' } import sites from './sites.json' assert { type: 'json' } @@ -21,15 +21,8 @@ const unpackDesigns = (obj, folder) => ]) ) -const designs = { - ...designsByType.accessories, - ...designsByType.blocks, - ...designsByType.garments, - ...designsByType.utilities, -} - // Re-Export imported JSON -export { designs, designsByType, packages, plugins, sites } +export { designs, packages, plugins, sites } // All software export const software = { diff --git a/scripts/reconfigure.mjs b/scripts/reconfigure.mjs index b877c3696c8..63be87d2041 100644 --- a/scripts/reconfigure.mjs +++ b/scripts/reconfigure.mjs @@ -6,12 +6,7 @@ import chalk from 'chalk' import mustache from 'mustache' import conf from '../lerna.json' assert { type: 'json' } const { version } = conf -import { - software as software, - publishedTypes as types, - designs, - plugins, -} from '../config/software/index.mjs' +import { software, publishedTypes as types, designs, plugins } from '../config/software/index.mjs' import { buildOrder } from '../config/build-order.mjs' import rootPackageJson from '../package.json' assert { type: 'json' } import { capitalize } from '../packages/core/src/index.mjs' @@ -466,7 +461,7 @@ function formatDate(date) { function validate() { for (const type in repo.dirs) { for (const dir of repo.dirs[type]) { - if (typeof software[dir] === 'undefined' || typeof software[dir].description !== 'string') { + if (typeof software?.[dir]?.description !== 'string') { log.write(chalk.redBright(` No description for package ${type}/${dir}` + '\n')) return false } diff --git a/sites/backend/scripts/import-sizing-table.mjs b/sites/backend/scripts/import-sizing-table.mjs index 1f263a4b48e..67807beeb2c 100644 --- a/sites/backend/scripts/import-sizing-table.mjs +++ b/sites/backend/scripts/import-sizing-table.mjs @@ -142,11 +142,11 @@ sets.push( nameEs: `Cis-Hombre Gigante - ${size}%`, nameFr: `Cis-Homme Géant - ${size}%`, nameNl: `Cis-Heer Reus - ${size}%`, - tagsEn: ['cis-female', 'giants'], - tagsDe: ['cis-weiblich', 'riesen'], - tagsEs: ['cis-mujer', 'gigantes'], - tagsFr: ['cis-femme', 'géants'], - tagsNl: ['cis-dame', 'reuzen'], + tagsEn: ['cis-male', 'giants'], + tagsDe: ['cis-männlich', 'riesen'], + tagsEs: ['cis-hombre', 'gigantes'], + tagsFr: ['cis-homme', 'géants'], + tagsNl: ['cis-heer', 'reuzen'], measies: cisMaleGiant[size], }) ) diff --git a/sites/org/components/header/index.mjs b/sites/org/components/header/index.mjs index 6b7c998c0c9..01794849c34 100644 --- a/sites/org/components/header/index.mjs +++ b/sites/org/components/header/index.mjs @@ -25,65 +25,27 @@ import { ModalThemePicker, ns as themeNs } from 'shared/components/modal/theme-p import { ModalLocalePicker, ns as localeNs } from 'shared/components/modal/locale-picker.mjs' import { ModalMenu } from 'site/components/navigation/modal-menu.mjs' +import { NavButton, NavSpacer, colors } from 'shared/components/workbench/header.mjs' + export const ns = ['header', 'sections', ...themeNs, ...localeNs] -const NavButton = ({ href, label, color, children, onClick = false, extraClasses = '' }) => { - const className = - 'border-0 px-1 lg:px-4 text-base py-3 lg:py-4 text-center flex flex-col items-center 2xl:w-36 ' + - `hover:bg-${color}-400 text-${color}-400 hover:text-neutral grow lg:grow-0 ${extraClasses}` - const span = {label} - - return onClick ? ( - - ) : ( - - {children} - {span} - - ) -} - -const NavSpacer = () => ( -
{t('fsmtm')}
-{t('fsmtm')}
+{t('fsmtm')}
-view is {view}
+ + + > + ) +} + +const views = { + measurements: WorkbenchMeasurements, + //draft: LabDraft, + test: LabSample, + printingLayout: PrintLayout, + cuttingLayout: CutLayout, + export: ExportDraft, + logs: DraftLogs, + yaml: GistAsYaml, + json: GistAsJson, + edit: EditYaml, + welcome: () =>TODO
, +} + +const hasRequiredMeasurementsMethod = (design, gist) => { + if (design.patternConfig?.measurements?.length > 0 && !gist.measurements) return false + + for (const m of design.patternConfig?.measurements || []) { + if (!gist.measurements[m]) return false + } + + return true +} + +const doPreload = async (preload, from, design, gist, setGist, setPreloaded) => { + const g = await preloaders[from](preload, design) + setPreloaded(preload) + setGist({ ...gist, ...g.settings }) +} + +/* + * This component wraps the workbench and is in charge of + * keeping the gist state, which will trickle down + * to all workbench subcomponents + */ +export const WorkbenchWrapper = ({ + app, + design, + preload = false, + from = false, + layout = false, +}) => { + // State for gist + const { gist, setGist, unsetGist, updateGist, gistReady, undoGist, resetGist } = useGist( + design.designConfig?.data?.name, + app.locale + ) + const [messages, setMessages] = useState([]) + const [popup, setPopup] = useState(false) + const [preloaded, setPreloaded] = useState(false) + // we'll only use this if the renderer is svg, but we can't call hooks conditionally + const { t } = useTranslation(['plugin']) + + // We'll use this in more than one location + const hasRequiredMeasurements = hasRequiredMeasurementsMethod(design, gist) + + // If we don't have the required measurements, + // force view to measurements + useEffect(() => { + if (!gistReady) return + if (!['measurements', 'edit'].includes(gist._state?.view) && !hasRequiredMeasurements) + updateGist(['_state', 'view'], 'measurements') + }, [gistReady, gist._state?.view, hasRequiredMeasurements, updateGist]) + + // If we need to preload the gist, do so + useEffect(() => { + if (preload && preload !== preloaded && from && preloaders[from]) { + doPreload(preload, from, design, gist, setGist, setPreloaded) + } + }, [preload, preloaded, from, design, gist, setGist]) + + // Helper methods to manage the gist state + const updateWBGist = useMemo( + () => + (path, value, closeNav = false, addToHistory = true) => { + updateGist(path, value, addToHistory) + // Force close of menu on mobile if it is open + if (closeNav && app.primaryMenu) app.setPrimaryMenu(false) + }, + [app, updateGist] + ) + + // Helper methods to handle messages + const feedback = { + add: (msg) => { + const newMsgs = [...messages] + if (Array.isArray(msg)) newMsgs.push(...msg) + else newMsgs.push(msg) + setMessages(newMsgs) + }, + set: setMessages, + clear: () => setMessages([]), + } + + // don't do anything until the gist is ready + if (!gistReady) { + return null + } + + // Generate the draft here so we can pass it down to both the view and the options menu + let draft = false + if (['draft', 'logs', 'test', 'printingLayout'].indexOf(gist._state?.view) !== -1) { + gist.embed = true + // get the appropriate layout for the view + const layout = gist.layouts?.[gist._state.view] || gist.layout || true + // hand it separately to the design + draft = new design({ ...gist, layout }) + //draft.__init() + + // add theme to svg renderer + if (gist.renderer === 'svg') { + draft.use(pluginI18n, { t }) + draft.use(pluginTheme, { skipGrid: ['pages'] }) + } + + // draft it for draft and event views. Other views may add plugins, etc and we don't want to draft twice + try { + if (['draft', 'logs'].indexOf(gist._state.view) > -1) draft.draft() + } catch (error) { + return