Threadwick's shared TypeScript types — the Pattern content model (the canonical authoring
vocabulary). The same Pattern flows through Studio (author), Viewer (follow), and Marketplace
(list) without being re-modelled, so this is the interchange contract every surface shares.
Split out of @threadwick/core so surfaces can depend on the data contract without pulling the
design-system/token package.
npm install @threadwick/typesimport type { Pattern, Component, Material, Stitch } from '@threadwick/types';A JSON-Schema mirror ships for fail-closed validation (agents / runtime):
import schema from '@threadwick/types/pattern.schema.json';Project (a make) → references Patterns. Pattern (the authored design) → components,
materials, tutorials, stitches, notes, variations, overview. Component → artifacts
(Chart | Written | Schematic). Only authoring artifacts (the sidebar tree) are modelled here;
publishing/consumption chrome (comments, ratings, ads, PDF export) is rendered by the platform.
AGPL-3.0-or-later © Threadwick.