feat: Added package documentation (wip)
This commit is contained in:
parent
f734707163
commit
02da928f04
82 changed files with 2248 additions and 466 deletions
|
@ -1,15 +1,33 @@
|
|||
---
|
||||
title: snapseries
|
||||
title: '@freesewing/snapseries'
|
||||
---
|
||||
|
||||
Published as [@freesewing/snapseries][1], this package provides series
|
||||
of common sizes for elastics and zippers and series of common intervals
|
||||
to be used with snapped percentage options.
|
||||
import * as all from '@freesewing/snapseries'
|
||||
|
||||
## Exports
|
||||
FreeSewing's **snapseries** package provides data for FreeSewing's [snapped
|
||||
percentage options](reference/api/part/config/options/pct/snap/).
|
||||
|
||||
It is published on NPM as [@freesewing/snapseries
|
||||
](https://www.npmjs.com/package/@freesewing/snapseries).\
|
||||
The source code for this package is available in [our monorepo on Codeberg
|
||||
](https://codeberg.org/freesewing/freesewing) under [packages/snapseries
|
||||
](https://codeberg.org/freesewing/freesewing/src/branch/develop/packages/snapseries).
|
||||
|
||||
:::note
|
||||
This package does not provide a default export.
|
||||
:::
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install --save @freesewing/snapseries
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
All exports are plain objects with `metric` and `imperial` properties
|
||||
that can be used as the `snap` property for snapped percentage options.
|
||||
All measurements are in mm.
|
||||
|
||||
Some exports have `metric` and `imperial` properties that are
|
||||
arrays of numbers.
|
||||
|
@ -26,36 +44,54 @@ These exports and properties are:
|
|||
- `steps`: Intervals of 5 mm or 1/8 inch
|
||||
- `bigSteps`: Intervals of 10 mm or 1/2 inch
|
||||
|
||||
## Installation
|
||||
## Named Exports
|
||||
|
||||
```sh
|
||||
npm install @freesewing/snapseries
|
||||
```
|
||||
### bigSteps
|
||||
|
||||
## Example
|
||||
Holds configuration for snapped percentage options in big steps, which is 1cm or 1/2 inch.
|
||||
|
||||
In NodeJS:
|
||||
```js
|
||||
import { elastics } from @freesewing/snapseries
|
||||
|
||||
myOption: {
|
||||
pct: 10,
|
||||
min: 5
|
||||
max: 35,
|
||||
snap: elasitcs,
|
||||
}
|
||||
import { bigSteps } from '@freesewing/snapseries'
|
||||
```
|
||||
|
||||
## Units
|
||||
<ConsoleButton data={all.bigSteps} />
|
||||
|
||||
All measurements are in mm.
|
||||
### elastics
|
||||
|
||||
:::note RELATED
|
||||
Holds configuration for snapped percentage options for commons sizes of elastic widths.
|
||||
|
||||
Please see
|
||||
[Snapped percentage options](/reference/api/part/config/options/pct/snap)
|
||||
to learn more about how snapped percentage options are used.
|
||||
```js
|
||||
import { elastics } from '@freesewing/snapseries'
|
||||
```
|
||||
|
||||
:::
|
||||
<ConsoleButton data={all.elastics} />
|
||||
|
||||
[1]: https://www.npmjs.com/package/@freesewing/snapseries
|
||||
### smallSteps
|
||||
|
||||
Holds configuration for snapped percentage options in small steps, which is 5mm or 1/8 inch.
|
||||
|
||||
```js
|
||||
import { smallSteps } from '@freesewing/snapseries'
|
||||
```
|
||||
|
||||
<ConsoleButton data={all.smallSteps} />
|
||||
|
||||
### steps
|
||||
|
||||
Holds configuration for snapped percentage options in default steps, which is 1cm or 1/2 inch.
|
||||
|
||||
```js
|
||||
import { bigSteps } from '@freesewing/snapseries'
|
||||
```
|
||||
|
||||
<ConsoleButton data={all.steps} />
|
||||
|
||||
### zippers
|
||||
|
||||
Holds configuration for snapped percentage options for commons sizes of zipper widths.
|
||||
|
||||
```js
|
||||
import { zippers } from '@freesewing/snapseries'
|
||||
```
|
||||
|
||||
<ConsoleButton data={all.zippers} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue