Skip to main content

library

note

This design is part of the FreeSewing collection

Named exports

Constructor

To create a new library Design, import the constructur as such:

import { Library } from '@freesewing/library'

Then you can instantiate it by passing a settings object:

const pattern = new Library(settings)

Design config

You can access the design configuration without instantiating a design. It is available as the designConfig property of the design constructor:

import { Library } from '@freesewing/library'

// Access the design config from the constructor
const dConf = Library.designConfig

Pattern config

You can access the pattern configuration without instantiating a design. It is available as the patternConfig property of the design constructor:

import { Library } from '@freesewing/library'

// Access the pattern config from the constructor
const pConf = Library.patternConfig

Metadata

You can access the design's metadata through the about named export:

import { about } from '@freesewing/library'

I18n

You can access the design's internationalization data through the i18n named export:

import { i18n } from '@freesewing/library'

Parts

rectangle

The part itself

You can access this part as the rectangle named export:

import { rectangle } from '@freesewing/library'

Part translations

In addition, this part exports a subset of i18n data that is limited to the data for this part. You can access that through the rectangleI18n named export:

import { rectangle, rectangleI18n } from '@freesewing/library'

This part-specific i18n export signals that this part was specifically designed to facilitate re-use in other designs.

Part store reads

This part reads the following values from the store:

  • width
  • height
  • cutlist
  • title

This means that this part relies on these values being available in the store prior to the part being drafted.

sleeve

The part itself

You can access this part as the sleeve named export:

import { sleeve } from '@freesewing/library'

Part translations

In addition, this part exports a subset of i18n data that is limited to the data for this part. You can access that through the sleeveI18n named export:

import { sleeve, sleeveI18n } from '@freesewing/library'

This part-specific i18n export signals that this part was specifically designed to facilitate re-use in other designs.

Part store reads

This part reads the following values from the store:

  • backArmholeLength
  • backArmholeToArmholePitch
  • frontArmholeLength
  • frontArmholeToArmholePitch
  • cutlist
  • title

This means that this part relies on these values being available in the store prior to the part being drafted.

Part store writes

This part __writes the following values to the store:

  • sleevecapHeight
  • sleevecapLength
  • sleeveLength
  • sleevecapTarget
  • sleevecapEase

This means that this part makes these values available after the part is drafted.

topsleeve

The part itself

You can access this part as the topsleeve named export:

import { topsleeve } from '@freesewing/library'

twoPartSleeve

The part itself

You can access this part as the twoPartSleeve named export:

import { twoPartSleeve } from '@freesewing/library'

Part translations

In addition, this part exports a subset of i18n data that is limited to the data for this part. You can access that through the twoPartSleeveI18n named export:

import { twoPartSleeve, twoPartSleeveI18n } from '@freesewing/library'

This part-specific i18n export signals that this part was specifically designed to facilitate re-use in other designs.

Part store reads

This part reads the following values from the store:

  • frontArmholeLength
  • backArmholeLength
  • cutlist
  • title

This means that this part relies on these values being available in the store prior to the part being drafted.

Part store writes

This part __writes the following values to the store:

  • sleevecapLength
  • sleevecapTarget

This means that this part makes these values available after the part is drafted.

undersleeve

The part itself

You can access this part as the undersleeve named export:

import { undersleeve } from '@freesewing/library'