2023-05-25 22:13:17 -07:00
|
|
|
---
|
2025-04-18 19:19:20 +02:00
|
|
|
title: '@freesewing/snapseries'
|
2023-05-25 22:13:17 -07:00
|
|
|
---
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
import * as all from '@freesewing/snapseries'
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
FreeSewing's **snapseries** package provides data for FreeSewing's [snapped
|
2025-05-04 18:55:10 +02:00
|
|
|
percentage options](/reference/api/part/config/options/pct/snap/).
|
2025-04-18 19:19:20 +02:00
|
|
|
|
|
|
|
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
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
All exports are plain objects with `metric` and `imperial` properties
|
|
|
|
that can be used as the `snap` property for snapped percentage options.
|
2025-04-18 19:19:20 +02:00
|
|
|
All measurements are in mm.
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
Some exports have `metric` and `imperial` properties that are
|
|
|
|
arrays of numbers.
|
|
|
|
These exports and their properties are:
|
|
|
|
|
|
|
|
- `elastics`: Arrays of common elastic widths
|
|
|
|
- `zippers`: Arrays of common zipper lengths
|
|
|
|
|
|
|
|
Other exports have `metric` and `imperial` properties that are
|
|
|
|
numbers to allow options to be _snapped_ to multiples of the value.
|
|
|
|
These exports and properties are:
|
|
|
|
|
|
|
|
- `smallSteps`: Intervals of 1 mm or 1/32 inch
|
|
|
|
- `steps`: Intervals of 5 mm or 1/8 inch
|
|
|
|
- `bigSteps`: Intervals of 10 mm or 1/2 inch
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
## Named Exports
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
### bigSteps
|
|
|
|
|
|
|
|
Holds configuration for snapped percentage options in big steps, which is 1cm or 1/2 inch.
|
|
|
|
|
|
|
|
```js
|
|
|
|
import { bigSteps } from '@freesewing/snapseries'
|
|
|
|
```
|
|
|
|
|
|
|
|
<ConsoleButton data={all.bigSteps} />
|
|
|
|
|
|
|
|
### elastics
|
|
|
|
|
|
|
|
Holds configuration for snapped percentage options for commons sizes of elastic widths.
|
|
|
|
|
|
|
|
```js
|
|
|
|
import { elastics } from '@freesewing/snapseries'
|
2023-05-25 22:13:17 -07:00
|
|
|
```
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
<ConsoleButton data={all.elastics} />
|
|
|
|
|
|
|
|
### smallSteps
|
|
|
|
|
|
|
|
Holds configuration for snapped percentage options in small steps, which is 5mm or 1/8 inch.
|
2023-05-25 22:13:17 -07:00
|
|
|
|
|
|
|
```js
|
2025-04-18 19:19:20 +02:00
|
|
|
import { smallSteps } from '@freesewing/snapseries'
|
2023-05-25 22:13:17 -07:00
|
|
|
```
|
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
<ConsoleButton data={all.smallSteps} />
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
### steps
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
Holds configuration for snapped percentage options in default steps, which is 1cm or 1/2 inch.
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
```js
|
|
|
|
import { bigSteps } from '@freesewing/snapseries'
|
|
|
|
```
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
<ConsoleButton data={all.steps} />
|
|
|
|
|
|
|
|
### zippers
|
|
|
|
|
|
|
|
Holds configuration for snapped percentage options for commons sizes of zipper widths.
|
|
|
|
|
|
|
|
```js
|
|
|
|
import { zippers } from '@freesewing/snapseries'
|
|
|
|
```
|
2023-05-25 22:13:17 -07:00
|
|
|
|
2025-04-18 19:19:20 +02:00
|
|
|
<ConsoleButton data={all.zippers} />
|