diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index babcee61a92..1ff019dc2d6 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -9,7 +9,7 @@ const nodeFiles = [
`**/prebuild.${jsSuffixes}`,
`**/prebuild/**/*.${jsSuffixes}`,
`**/scripts/**/*.${jsSuffixes}`,
- `packages/new-design/lib/**/*.${jsSuffixes}`,
+ `packages/studio/lib/*.${jsSuffixes}`,
`sites/backend/**/*.${jsSuffixes}`,
`sites/*/mdx/**/*.${jsSuffixes}`,
`sites/*/themes/**/*.${jsSuffixes}`,
@@ -60,16 +60,6 @@ module.exports = {
'no-console': 'off',
},
},
- {
- files: frontendFiles,
- excludedFiles: nodeFiles,
- extends: ['next'],
- settings: {
- next: {
- rootDir: 'sites/dev/',
- },
- },
- },
{
files: [`**/*.${jsSuffixes}{,.mustache}`],
excludedFiles: [].concat(mongoFiles, nodeFiles, frontendFiles),
diff --git a/.github/workflows/dependabot-sync.yml b/.github/workflows/dependabot-sync.yml
deleted file mode 100644
index fb5c444ab17..00000000000
--- a/.github/workflows/dependabot-sync.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-name: Sync Dependabot Bump
-on:
- pull_request:
- types: [opened, synchronize]
-
-permissions:
- contents: write
-
-jobs:
- sync:
- if: ${{ github.actor == 'dependabot[bot]' }}
- name: Sync dependency files
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v3
- with:
- ref: ${{ github.head_ref }}
- - name: Setup Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- - name: Install dependencies
- run: |
- cd packages/core
- npm i --workspaces=false --no-save
- cd ../../scripts
- npm i --workspaces=false --no-save
- cd ../
- env:
- CI: true
- - name: Run Sync Script
- run: node ./scripts/sync-dependencies.mjs ${{ github.head_ref }}
- - name: Reconfigure
- run: node --experimental-json-modules --no-warnings ./scripts/reconfigure.mjs
- - name: Bootstrap
- run: yarn install
- - name: Commit Changes
- run: |
- git add .
- git status
- git config user.name github-actions
- git config user.email github-actions@github.com
- git commit -m "[dependabot skip] chore(deps): bumped ${{ github.head_ref }} changes in config/dependencies.yaml"
- git push
diff --git a/.gitignore b/.gitignore
index 985b39ac1a0..424bde05ef3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,12 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
dump
production.sqlite
+.husky
# .env
.env
*.key
+*.env
# Plugins
plugins/plugin-theme/src/bundle.css.js
@@ -14,16 +16,17 @@ plugins/plugin-theme/css
packages/core/coverage
packages/*/report
-# Any NPM or Yarn lock files
+# Any Yarn lock files
designs/*/package-lock.json
designs/*/yarn.lock
packages/*/package-lock.json
packages/*/yarn.lock
plugins/*/package-lock.json
plugins/*/yarn.lock
+yarn.lock
-# NPM lock files for sites (we use yarn)
-sites/*/package-lock.json
+# Yarn lock files for sites (we use npm)
+sites/*/yarn.lock
# Nx cache
.nx/cache
@@ -42,26 +45,16 @@ packages/new-design/shared/.gitignore
packages/new-design/lib/banner.mjs
sites/*/public/img/og/*
-# Orgdocs prebuild artifacts
-sites/orgdocs/src/lib/designs.mjs
-sites/orgdocs/src/lib/designinfo.mjs
-sites/orgdocs/src/lib/i18n.mjs
-sites/orgdocs/docs/designs/*/options/readme.mdx
-sites/orgdocs/authors.json
-sites/orgdocs/showcase-tags.mjs
-
-# Lab auto-generated content
-sites/lab/lib
-sites/lab/public/android-chrome-192x192.png
-sites/lab/public/android-chrome-384x384.png
-sites/lab/public/apple-touch-icon.png
-sites/lab/public/browserconfig.xml
-sites/lab/public/favicon-16x16.png
-sites/lab/public/favicon-32x32.png
-sites/lab/public/favicon.ico
-sites/lab/public/mstile-150x150.png
-sites/lab/public/safari-pinned-tab.svg
-sites/lab/public/site.webmanifest
+# Org prebuild artifacts
+sites/org/src/lib/designs.mjs
+sites/org/src/lib/designinfo.mjs
+sites/org/src/lib/i18n.mjs
+sites/org/docs/designs/*/options/readme.mdx
+sites/org/authors.json
+sites/org/showcase-tags.mjs
+sites/org/design-examples.mjs
+sites/org/docs/designs/*.mdx
+sites/org/recent-blog-posts.mjs
# sde auto-generated content
sites/sde/public/android-chrome-192x192.png
@@ -87,25 +80,15 @@ sites/dev/public/mstile-150x150.png
sites/dev/public/safari-pinned-tab.svg
sites/dev/public/site.webmanifest
-# org auto-generated content
-sites/org/public/android-chrome-192x192.png
-sites/org/public/android-chrome-384x384.png
-sites/org/public/apple-touch-icon.png
-sites/org/public/browserconfig.xml
-sites/org/public/favicon-16x16.png
-sites/org/public/favicon-32x32.png
-sites/org/public/favicon.ico
-sites/org/public/mstile-150x150.png
-sites/org/public/safari-pinned-tab.svg
-sites/org/public/site.webmanifest
-
# Node dependencies
node_modules
# Build folders
dist
build
-export
+
+# But don't ignore point/dist reference
+!/sites/dev/docs/reference/api/point/dist/
# Prebuild files
prebuild/*.json
@@ -147,3 +130,6 @@ scripts/verdaccio.sh
# e2e test results
sites/*/playwright-report
+
+# Local Netlify folder
+.netlify
diff --git a/.husky/pre-commit b/.husky/pre-commit
index 37236231717..2312dc587f6 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1 +1 @@
-yarn lint-staged
+npx lint-staged
diff --git a/.prettierignore b/.prettierignore
index d289ffa1006..10c6479679b 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -27,4 +27,5 @@ yarn.lock
.all-contributorsrc
.nvmrc
ansible.cfg
-sites/shared/prebuild/data/*.mjs
+sites/org/docs/docs/designs/*/options/readme.mdx
+/.nx/workspace-data
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88c99f5f595..f1020ad4953 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,9 @@
## Unreleased
+
+## 4.0.0 (2024-04-01)
+
### bibi
#### Changed
@@ -133,8 +136,25 @@
- The `withCondition` named export is deprecated and will always return true.
+### collection
+
+#### Added
+
+ - Added a new `@freesewing/collection` package that bundles all our designs
+
+### config
+
+#### Added
+
+ - Added a new `@freesewing/config` package for shared configuration
+
### core
+#### Breaking
+
+ - FreeSewing new requires NodeJS 20 (or more recent)
+ - We removed all but English translations. We still support i18n in our core library and designs, but no longer provide translations
+
#### Added
- The `Path.rotate()` method was added to the core API.
@@ -144,6 +164,30 @@
- Fix an issue when splitting path on start or end point. Fixes
+### i18n
+
+#### Added
+
+ - The `@freesewing/i18n` package holds translations in English for where they are needed
+
+### studio
+
+#### Added
+
+ - Added `@freesewing/studio`, our new development environment
+
+### react
+
+#### Added
+
+ - The `@freesewing/react` package holds shared components, hooks, and context for our React-based frontends
+
+### utils
+
+#### Added
+
+ - Added a new `@freesewing/utils` package for shared utils
+
## 3.2.0 (2024-02-11)
@@ -225,12 +269,6 @@
- Calling `Path.join` with a second parameter to indicate that the resulting paths most be closed is now deprecated and will be removed in FreeSewing v4.
-### react-components
-
-#### Added
-
- - This Pattern component now supports translation of nested arrays of strings, giving you more flexibility to concatenate translated parts of strings
-
## 3.1.0 (2023-12-26)
@@ -424,12 +462,6 @@
- Make Path.split() more robust when handling edge-case. Fixes
- Prevent utils.circlesIntersect() from running sqrt on a negative number. Fixes
-### new-design
-
-#### Fixed
-
- - Removed unwanted debug output
-
## 3.0.0 (2023-09-30)
@@ -675,16 +707,6 @@
- Make generatePartTransform a named export
-### new-design
-
-#### Changed
-
- - We're now loading content from the main branch by default
-
-#### Fixed
-
- - Add bin entry to package.json
-
## 2.21.2 (2022-06-30)
@@ -1092,8 +1114,24 @@
- Migrated from Rollup to Esbuild for all builds
- The `pctBasedOn()` helper method for pattern config was moved to config-helpers We did not make this a breaking change since it's only used internally.
+### i18n
+
+#### Changed
+
+ - Migrated from Rollup to Esbuild for all builds
+
+#### Fixed
+
+ - Added missing lab namespace for English
+
### models
+#### Changed
+
+ - Migrated from Rollup to Esbuild for all builds
+
+### utils
+
#### Changed
- Migrated from Rollup to Esbuild for all builds
@@ -1202,12 +1240,6 @@
- Fix bug in Svg.escapeText() that only escaped the first quote
-### backend
-
-#### Fixed
-
- - Mitigate risk of denial-of-service attacks in catch-all route
-
## 2.20.4 (2022-01-28)
@@ -1231,6 +1263,12 @@
## 2.20.2 (2022-01-27)
+### i18n
+
+#### Fixed
+
+ - Patterns options were always in English due to symlinks being used
+
## 2.20.1 (2022-01-27)
@@ -1559,6 +1597,12 @@
- Added support for `settings.scale`
+### i18n
+
+#### Fixed
+
+ - Fixed issue that was causing plugin translations to always be in English
+
## 2.19.9 (2022-01-09)
@@ -1991,6 +2035,13 @@
- Pattern.on() is now chainable as it returns the Pattern object
+### i18n
+
+#### Fixed
+
+ - Fixed bug in resolving of shared pattern options
+ - Removed optional chaining which broke node v12 support
+
### snapseries
#### Added
@@ -2037,6 +2088,16 @@
- Handle path.offset() of very short curves with control points on the start or end point Closes [#1257](https://github.com/freesewing/freesewing/issues/1257)
+### i18n
+
+#### Added
+
+ - Added translations for Yuri
+
+#### Fixed
+
+ - Added optional chaining so missing options always lead to clear error message
+
## 2.17.4 (2021-08-20)
@@ -2049,6 +2110,18 @@
## 2.17.3 (2021-08-16)
+### i18n
+
+#### Added
+
+ - New translations
+
+### utils
+
+#### Fixed
+
+ - Added missing `bustPointToUnderbust` measurement to `neckstimate`
+
## 2.17.2 (2021-08-15)
@@ -2064,6 +2137,12 @@
- Added new ffsa option to let the user control the extra SA for flat-felled seams Closes [#1251](https://github.com/freesewing/freesewing/issues/1251)
+### i18n
+
+#### Added
+
+ - Added new ffsa option for simon & simone
+
### models
#### Added
@@ -2185,9 +2264,21 @@
- Fix a bug in `path.shiftAlong` where no point is returned if the distance to shift is a fraction of one step (1/25mm) into a new path segment See [#1140](https://github.com/freesewing/freesewing/issues/1140)
+### i18n
+
+#### Changed
+
+ - Changed antman references to antperson
+
## 2.16.2 (2021-05-05)
+### i18n
+
+#### Changed
+
+ - String updates
+
## 2.16.1 (2021-05-30)
@@ -2395,6 +2486,19 @@
- Changed `department` setting in config in line with new grouping
+### i18n
+
+#### Added
+
+ - New translations for pattern filter
+
+### utils
+
+#### Changed
+
+ - neckstimate now takes an extra `noRound` parameter to return the unrounded value
+ - measurementDiffers takes an extra `absolute` value that can be set to false to get the non-absolute and non-rounded value
+
## 2.16.0 (2021-05-24)
@@ -2423,6 +2527,12 @@
- Fixed third button not showing up See [#973](https://github.com/freesewing/freesewing/issues/973)
+### i18n
+
+#### Changed
+
+ - Changes to cfp strings
+
## 2.15.4 (2021-05-08)
@@ -2554,6 +2664,13 @@
- Don't round coordinates internally to avoid path.split misses
+### i18n
+
+#### Added
+
+ - Added translation for new Titan options
+ - Added translations for Charlie
+
## 2.14.0 (2021-03-07)
@@ -2569,6 +2686,12 @@
- Replaced grainline indicator on pocket with cut-on-fold indicator
+### i18n
+
+#### Added
+
+ - Added translations for Cornelius
+
## 2.13.2 (2021-02-21)
@@ -2617,6 +2740,12 @@
- Added missing sleeve notch on yoke
+### utils
+
+#### Added
+
+ - Pass pattern handle to tiler
+
## 2.13.0 (2021-02-13)
@@ -2670,6 +2799,12 @@
- Make sure roudEnd and roundStart points are always available
+### i18n
+
+#### Added
+
+ - Translation for Hortensia
+
## 2.12.1 (2021-01-27)
@@ -2794,6 +2929,16 @@
- Removed unused lengthBonus option
+### i18n
+
+#### Changed
+
+ - New strings for new features
+
+#### Fixed
+
+ - Type in Simon title
+
## 2.10.7 (2020-11-18)
@@ -2809,6 +2954,12 @@
## 2.10.5 (2020-11-14)
+### i18n
+
+#### Fixed
+
+ - Added missing `cty.` translations to non-English language files
+
## 2.10.4 (2020-11-13)
@@ -2871,6 +3022,18 @@
- Added the `info` type to raised events
- Added support for conditional loading of plugins
+### i18n
+
+#### Added
+
+ - Added translations for plugin-title
+ - Added translations for teagan
+ - Added some translations for the UI
+
+#### Fixed
+
+ - Replaced a few identical files with symlinks
+
## 2.8.1 (2020-08-16)
@@ -2981,6 +3144,12 @@
- Added a new `debug` setting
- Shorthand now proxies objects to allow debug and raise
+### utils
+
+#### Added
+
+ - Added backend calls for creating gists/issues on Github
+
## 2.7.0 (2020-07-12)
@@ -3258,6 +3427,13 @@
- [Properly escape quotes in imperial units](https://github.com/freesewing/freesewing/issues/437)
+### i18n
+
+#### Changed
+
+ - Added translations for Titan
+ - Removed `Circumference` suffix from measurement names
+
### models
#### Changed
@@ -3266,6 +3442,21 @@
- Ported models to the crotchDepth measurement. See [#425](https://github.com/freesewing/freesewing/issues/425)
- Removed `Circumference` suffix from measurement names
+### utils
+
+#### Added
+
+ - Added new `isDegMeasurement` method. See [#358](https://github.com/freesewing/freesewing/issues/358)
+ - `neckStimate` now supports all new measurements. See [#416](https://github.com/freesewing/freesewing/issues/416)
+
+#### Changed
+
+ - Changed `neckstimate` to handle new `shoulderSlope` degree measurement. See [#358](https://github.com/freesewing/freesewing/issues/358)
+ - Changed `neckstimate` to support all new measurements. See [#416](https://github.com/freesewing/freesewing/issues/416)
+ - Ported `neckstimate` to the crotchDepth measurement. See [#425](https://github.com/freesewing/freesewing/issues/425)
+ - Removed `Circumference` suffix from measurement names
+ - Added the `isDegMeasurement` method
+
## 2.6.0 (2020-05-01)
@@ -3310,6 +3501,12 @@
- utils now includes `Bezier` which holds the bezier-js library so you don't need to re-import it
- We no longer set the plugin configuration/data object to fall in `pattern.use()`
+### i18n
+
+#### Changed
+
+ - Changes to support the renaming of @freesewing/fu to @freesewing/florence
+
## 2.5.0 (2020-04-05)
@@ -3319,9 +3516,21 @@
- Diana is a top with a draped neck
+### i18n
+
+#### Added
+
+ - title, description, and options for Dianna
+
## 2.4.6 (2020-03-23)
+### i18n
+
+#### Fixed
+
+ - Fixed an bug in the i18n package
+
## 2.4.5 (2020-03-19)
@@ -3337,6 +3546,12 @@
- Check whether frontScyeDart option is zero prior to implementing it
+### utils
+
+#### Changed
+
+ - neckstimate() now returns values rounded to nearest mm
+
## 2.4.4 (2020-03-15)
@@ -3373,12 +3588,30 @@
## 2.4.3 (2020-03-12)
+### i18n
+
+#### Added
+
+ - Added more translations
+
## 2.4.2 (2020-03-08)
+### i18n
+
+#### Added
+
+ - Added more strings
+
## 2.4.1 (2020-03-04)
+### utils
+
+#### Fixed
+
+ - [#542](https://github.com/freesewing/freesewing.org/issues/542): Prevent neckstimate from throwing when getting an unexpected measurement
+
## 2.4.0 (2020-02-29)
@@ -3542,12 +3775,34 @@
- Added the `Path.noop()` method
- Added the `Path.insop()` methods
+### i18n
+
+#### Added
+
+ - Added translations for Breanna
+
+#### Changed
+
+ - Added/Updated strings for the 2.2 frontend changes
+ - Changed `Joost De Cock` to `Joost` because spam filters don't like cock
+
+#### Removed
+
+ - Removed the files for homepage translation, and moved that content to markdown
+ - Removed the files for editor translation, as it is no longer used
+
### models
#### Changed
- Extended the menswear size range to have 10 different sizes, just like womenswear
+### utils
+
+#### Changed
+
+ - Neckstimate now uses proportions only
+
## 2.1.9 (2020-01-18)
@@ -3585,6 +3840,12 @@
## 2.1.6 (2019-11-24)
+### utils
+
+#### Fixed
+
+ - [#317](https://github.com/freesewing/freesewing.org/issues/317): Fixed bug where format was not passed to formatImperial
+
## 2.1.5 (2019-11-19)
@@ -3594,12 +3855,40 @@
## 2.1.3 (2019-10-18)
+### i18n
+
+#### Added
+
+ - More translated strings
+
+### utils
+
+#### Changed
+
+ - Adjusted slope of the shoulderToShoulder measurement in neckstimate data
+
+#### Fixed
+
+ - [#250](https://github.com/freesewing/freesewing.org/issues/250): Model page stays empty with pre 2.0 model data: Error: 'neckstimate() requires a valid measurement name as second parameter. (received underBust)'
+
## 2.1.2 (2019-10-14)
+### i18n
+
+#### Fixed
+
+ - Fixed issue where symlinks were causing all languages to export English strings
+
## 2.1.1 (2019-10-13)
+### utils
+
+#### Fixed
+
+ - Fixed an issue with the formatMm method not adding units
+
## 2.1.0 (2019-10-06)
@@ -3645,6 +3934,23 @@
- The pattern super constructor now sets a `config` property that holds the pattern configuration. This means that unlike before, there is no need to instantiate a pattern to access its config. You can just import the pattern, and it's config property will contain the pattern config.
+### i18n
+
+#### Added
+
+ - Added translations for Penelope, Waralee, and Simone
+
+### utils
+
+#### Added
+
+ - Added backend methods for administration
+ - Added the resendActivationEmail method to backend
+
+#### Fixed
+
+ - Fixed an issue where optionDefault was not handling list options correctly
+
## 2.0.4 (2019-09-27)
@@ -3663,6 +3969,12 @@
- [#106](https://github.com/freesewing/freesewing/issues/106): Fix incorrect hem allowance
+### utils
+
+#### Fixed
+
+ - Fix measurementDiffers to pass breasts parameter to neckstimate
+
## 2.0.2 (2019-09-06)
@@ -3686,6 +3998,18 @@
- [#102](https://github.com/freesewing/freesewing.org/issues/102): Fixed 'Snippets not defined' error when drafting a seperate button placket
- [#103](https://github.com/freesewing/freesewing.org/issues/103): Fixed 'hemSa not defined' when drafting paperless Simon without seam allowance
+### i18n
+
+#### Added
+
+ - [#90](https://github.com/freesewing/freesewing/issues/90): Added missing option translations for Benjamin, Florent, Sandy, Shin, and Theo
+
+### utils
+
+#### Fixed
+
+ - Removed lingering debug statement in formatImperial
+
## 2.0.1 (2019-09-01)
@@ -3704,6 +4028,12 @@
- [#86](https://github.com/freesewing/freesewing/issues/86): The `seatCircumference` measurement was missing, thus making it unavailable on the website
+### utils
+
+#### Added
+
+ - The `measurementDiffers` method is new.
+
## 2.0.0 (2019-08-25)
@@ -3877,6 +4207,12 @@
### core
+#### Added
+
+ - Initial release
+
+### i18n
+
#### Added
- Initial release
@@ -3893,4 +4229,10 @@
- Initial release
+### utils
+
+#### Added
+
+ - Initial release
+
diff --git a/README.md b/README.md
index 9a66568ba1f..ebc625818f6 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,6 @@
>
{error}
-{t('pe:membersOnly')}
-{t('accountInactiveMsg')}
-{t('signupAgain')}
-{t('accountDisabledMsg')}
-{t('accountProhibitedMsg')}
-{t('statusUnknownMsg')}
-FIXME: Handle content form
- {/*FIXME: Something went wrong
-{JSON.stringify(state, null, 2)}-
{desc}-
{notes}-
- {Object.keys(flagList).length > 1 ? t('pe:flagMenuMany.d') : t('pe:flagMenuOne.d')} -
- > - ) -} - -export const FlagsAccordionEntries = ({ flags, update, Swizzled }) => { - const flagList = Swizzled.methods.flattenFlags(flags) - const { t } = Swizzled.methods - - if (Object.keys(flagList).length < 1) return null - - const handleUpdate = (config) => { - if (config.settings) update.settings(...config.settings) - if (config.ui) update.ui(...config.settings) - } - - return ( -{text}
-({Swizzled.methods.t('account:none')})
- ) : ( -({Swizzled.methods.t('account:none')})
- ) : ( - Design.patternConfig.optionalMeasurements.map((m) => ( -{t('pe:chooseFromOwnSetsDesc')}
-{t('pe:chooseFromBookmarkedSetsDesc')}
-{t('pe:chooseFromCuratedSetsDesc')}
-{t('pe:editMeasurementsDesc')}
-- ({missingMeasurements.length} {t('pe:missingMeasurements')}) -
-{t(`pe:${section.name}.d`)}
- >, - section.menu, - section.name, - ]) - ) - - const flags = pattern.setStores?.[0]?.plugins?.['plugin-annotations']?.flags - - if (flags) - items.push([ -This design option type does not have a component to handle manual input.
- - return ( -{props.children}
}
- To access your saved patterns, go to:{' '}
-
-
{t('pe:noOwnSetsMsg')}
- {config.hrefNewSet ? ( - - {t('pe:newSet')} - - ) : null} -{t('pe:pleaseMtm')}
-{Swizzled.methods.t('pe:view.undos.d')}
- - Tip: Click on any change to undo all changes up to, and including, that change. - - {steps.length < 1 ? ( -When you make changes to your pattern, they will show up here.
-For example, you can click the button below to change the pattern rotation:
- -As soon as you do, the change will show up here, and you can undo it.
-{JSON.stringify(step, null, 2)}//null - if (data === null) return
Unsupported
- - if (compact) - return ( -
-
{Swizzled.methods.t('pe:measurementsFreeViewsOnly.d')}
-+ + | + {Object.keys(fields).map((field) => ( ++ + | + ))} +|||
---|---|---|---|---|
+ toggle(apikey.id)} + /> + | +
+ |
+ {Object.keys(fields)
+ .slice(1, 4)
+ .map((field) => (
+ + + | + ))} +{shortDate(apikey.createdAt)} | +{shortDate(apikey.expiresAt)} | +
{apikey.key}+
{apikey.secret}+
+ +
+ > + )} ++ +
+ + {welcome ? ( + <> ++ +
+ {bookmarks.length > 0 ? ( + + ) : null} + {Object.entries(types).map(([type, title]) => + perType[type].length > 0 ? ( ++ + | +Title | +Location | +
---|---|---|
+ toggleSelect(bookmark.id)} + /> + | +{bookmark.title} | +
+ |
+
+ + FreeSewing Privacy Notice + +
++ FreeSewing respects your privacy and your rights. We adhere to the toughest privacy and + security law in the world: the{' '} + + General Data Protection Regulation + {' '} + (GDPR) of the European Union (EU). +
++ Under the GDPR, processing of your personal data requires granular consent — in other words,{' '} + we need your permission for the various ways we handle your data. +
+ > + ), + account: ( ++ Your email address, username, and password, and any measurements{' '} + you add to your account. +
++ To authenticate you, contact you when needed, and generate bespoke{' '} + sewing patterns. +
++ 12 months after the last time your connected to our backend, or until you{' '} + remove your account or revoke this consent. +
++ No, never. +
++ Note: Freesewing publishes anonymized measurements as open data for scientific research. You + have the right to object to this. +
++ We have sent an E-mail to your new address to confirm this change. Please click the link + in that message to finalize this change. +
++ +
+ > + )} +This error is unexpected. Please report this.
+ + // If we do not (yet) have the data, show a loader + if (!id || !check) + return ( + <> +One moment please
+} diff --git a/packages/react/components/Account/Export.mjs b/packages/react/components/Account/Export.mjs new file mode 100644 index 00000000000..a5c24b9d41e --- /dev/null +++ b/packages/react/components/Account/Export.mjs @@ -0,0 +1,53 @@ +// Context +import { LoadingStatusContext } from '@freesewing/react/context/LoadingStatus' + +// Hooks +import React, { useState, useContext } from 'react' +import { useAccount } from '@freesewing/react/hooks/useAccount' +import { useBackend } from '@freesewing/react/hooks/useBackend' + +// Components +import { Link as WebLink } from '@freesewing/react/components/Link' +import { DownloadIcon } from '@freesewing/react/components/Icon' +import { Popout } from '@freesewing/react/components/Popout' +import { IconButton } from '@freesewing/react/components/Button' + +/* + * Component for the account/actions/export page + */ +export const Export = () => { + // Hooks + const backend = useBackend() + const { setLoadingStatus } = useContext(LoadingStatusContext) + + // State + const [link, setLink] = useState() + + // Helper method to export account + const exportData = async () => { + setLoadingStatus([true, 'Contacting backend']) + const [status, body] = await backend.exportAccount() + if (status === 200) { + setLink(body.data) + setLoadingStatus([true, 'All done', true, true]) + } else setLoadingStatus([true, 'Something went wrong, please report this', true, false]) + } + + return ( +
+
Click below to export your personal FreeSewing data
++ +
++ To import a measurement set, you should have a JSON or YAML file that has the following + structure: +
++ Your file can either contain a single measurements set, or an array/list of multiple + measurements sets. +
++ +
+{enable.secret}
++ You can use any of these scratch codes as a one-time MFA code when you do not have + access to your code-generating app (for example, when you have lost your phone. +
++ You can use each of these codes only once. Write them down, because this is the only + time you will get to see them. +
++ {scratchCodes.map((code) => code + '\n')} ++
+ We do not enforce a password policy, but we do recommend you enable Multi-Factor + Authentication to keep your FreeSewing account safe. +
++ This unsubscribe link will also be included at the bottom of every newsletter we send + you, so you do not need to bookmark it, but you can if you want to. +
++ + Unsubscribe link + +
++ This link is to unsubscribe you specifically, do not share it with other subscribers. +
++ We do not enforce a password policy, but we do recommend you enable Two-Factor + Authentication to keep your FreeSewing account safe. +
+
+
+ Two-Factor Authentication
+ Everyone can access the public view since this is a public pattern.
+
+ But only you can access this private view.
+
+
+
+ + | + {Object.keys(fields).map((field) => ( ++ + | + ))} +|||||
---|---|---|---|---|---|---|
+ toggle(pattern.id)} + /> + | +{pattern.id} | +
+ |
+ + + {pattern.name} + + | ++ + {capitalize(pattern.design)} + + | +{shortDate(pattern.createdAt)} | +
+ {pattern.public ? |
+
Not a supported platform
+ + // Helper method to save changes + const save = async () => { + setLoadingStatus([true, 'Saving linked identity']) + const data = { data: {} } + data.data[platform] = platformId + const [status, body] = await backend.updateAccount(data) + if (status === 200 && body.result === 'success') { + setAccount(body.account) + setLoadingStatus([true, `Saved your ${labels[platform]} info`, true, true]) + } else setLoadingStatus([true, 'Something went wrong. Please report this', true, true]) + } + + return ( ++ +
++ The data stored in your browser can sometimes get out of sync with the data stored in our + backend. +
++ This lets you reload your account data from the backend. It has the same effect as signing + out, and then signing in again. +
+This button is red for a reason.
+If this is what you want, then go ahead.
+This button is red for a reason.
++ The GDPR guarantees{' '} + + your right to restrict processing + {' '} + of your personal data. +
+This will disable your account, but not remove any data.
++ While no data will be removed, this will disable your account. Furthermore, you + can not undo this on your own, but will have to contact support when you want to + restore access to your account. +
+Your submission has been registered and will be processed by one of our curators.
++ It is available at: {url} +
+ > + ) + } + + return ( + <> ++ To ensure curated measurements sets work for all designs, you need to provide a full set + of measurements. +
+Your measurements set is missing the following measurements:
+All measurements are available.
+ )} +Each curated set has a name. You can suggest your own name or a pseudonym.
++ To allow organizing and presenting our curated sets in a structured way, we organize them by + height. +
++ Finally, we need a picture. Please refer to the documentation to see what makes a good + picture for a curated measurements set. + Documentation +
+If you would like to add any notes, you can do so here.
+To validate and preview a measurement set, all measurements need to be entered.
+Your measurements set is missing the following measurements:
++ Based on your measurements, we estimate your body to be about{' '} + {formatMm(pattern.parts[0].front.points.head.y * -1, imperial)} high. +
+Here is what the automated analysis found:
+ {Object.entries(flattenFlags(flags)).map(([key, flag], i) => { + const desc = strings[flag.desc] || flag.desc + + return ( +This feature creates a visual preview of your body based on your measurements.
++ It’s meant to help you spot possible mistakes and better understand how the software + sees your measurements, but keep in mind: +
+Give this set of measurements a name. That will help tell them apart.
+
+
+
+ +
+ + {welcome ? ( + <> +Language | +Unsubscribe | +|
---|---|---|
+ {hit.email} + | +{hit.lang.toUpperCase()} | ++ + | +
+ Please use the{' '}
+
+ #FreeSewing{capitalize(design)}
+ {' '}
+ hashtag when discussing FreeSewing's {capitalize(design)} pattern online.
+
+ Doing so can help others discover your post, which really is a win-win.
+
If you like, you can copy the hashtag below:
+ > +) + +/* +// __SDEFILE__ - This file is a dependency for the stand-alone environment +// Dependencies +import { + nsMerge, + capitalize, + optionsMenuStructure, + optionType, + cloudflareImageUrl, + horFlexClasses, +} from 'shared/utils.mjs' +import { designs } from 'shared/config/designs.mjs' +import { examples } from 'site/components/design-examples.mjs' +// Hooks +import { useTranslation } from 'next-i18next' +import { useDesign } from 'site/hooks/use-design.mjs' +import { useContext, Fragment } from 'react' +// Context +import { ModalContext } from 'shared/context/modal-context.mjs' +// Components +import { ModalWrapper } from 'shared/components/wrappers/modal.mjs' +import { lineDrawings } from 'shared/components/designs/linedrawings/index.mjs' +import { Difficulty } from 'shared/components/designs/difficulty.mjs' +import { PageLink, AnchorLink, Link } from 'shared/components/link.mjs' +import { DocsLink, DocsTitle } from 'shared/components/mdx/docs-helpers.mjs' +import { Popout } from 'shared/components/popout/index.mjs' +import { NewPatternIcon, DocsIcon } from 'shared/components/icons.mjs' +import { DynamicMdx } from 'shared/components/mdx/dynamic.mjs' + +// Translation namespaces used on this page +export const ns = nsMerge( + 'account', + 'tags', + 'techniques', + 'measurements', + 'workbench', + 'designs', + 'tags' +) + +const Option = ({ id, option, design }) => + optionType(option) === 'constant' ? null : ( +{t(`designs:${design}.d`)}
+{t('account:noExamplesMsg')}
++ + {t('account:showcaseNew')} + +
+You need to pass in the DocusaurusLayout component
+ ) +} + +/* + * This component should be the top level of any Docusaurus content that's not + * a full page where you want access to context (typically account pages and so on) + * + * This sets up the various context providers before + * passing all props down to the InnerPageWrapper. + * This is required because the context providers need to + * be setup for the modal and loading state work we do in the InnerPageWrapper + */ +export const DocusaurusDoc = (props) => ( ++ {Object.keys(flagList).length > 1 + ? 'Some issues about your current pattern need your attention.' + : 'A specific issue about your current pattern needs your attention.'} +
+ > + ) +} + +export const FlagsAccordionEntries = ({ flags, update, pattern, strings }) => { + const flagList = flattenFlags(flags) + + if (Object.keys(flagList).length < 1) return null + + const handleUpdate = (config) => { + if (config.settings) update.settings(...config.settings) + if (config.ui) update.ui(...config.settings) + } + + return ( +This design does not require any measurements.
+ ) : ( +This design does not use any optional measurements.
+ ) : ( + Design.patternConfig.optionalMeasurements.map((m) => ( ++ You can store your measurements as a measurements set, after which you can generate as + many patterns as you want for them. +
+ {config.hrefNewSet ? ( + + Create a new measurements set + + ) : null} ++ Because our patterns are bespoke, we strongly suggest you take accurate measurements. +
+{section.d}
+ >, + section.menu, + section.name, + ]) + ) + + const flags = pattern.setStores?.[0]?.plugins?.['plugin-annotations']?.flags + + if (flags) + items.push([ +This design option type does not have a component to handle manual input.
+ + return ( +{'workbench:resetPrintLayoutDesc'}
+