Skip to content
Shapemetry

@huukhanhnguyen/model / schema/share

schema/share

LanePlan

LanePlan<T> = { additions: T[]; renames: Map<string, string>; }

Type Parameters

T

T

additions

additions: T[]

renames

renames: Map<string, string>


ShareArgCarrier

ShareArgCarrier = ArgCarrier & { method?: string; }

The arg carrier plus the method share walks dispatch on (share.ts only visits carriers that have one). args is stated once, in nodeArgs.ts.


ShareBundle

ShareBundle = { components: Component[]; id: string; layers: (Operation | Group)[]; materials: (Operation | Group)[]; patterns: (Operation | Group)[]; textures: Chain[]; type: ShareType | "component"; }

components

components: Component[]

id

id: string

The root record's id (name/key by lane) in the SOURCE doc.

layers

layers: (Operation | Group)[]

Layer nodes (method "layer") — identity is the evaluated/literal name.

materials

materials: (Operation | Group)[]

Material nodes (method "material") — identity is the evaluated/literal name.

patterns

patterns: (Operation | Group)[]

Pattern nodes (method "pattern") — identity is the evaluated/literal name, and a hatch's pattern arg is the reference a rename rewrites.

textures

textures: Chain[]

type

type: ShareType | "component"

Lane of the bundle's ROOT record. The public share types never include a bare component — a single component is not a share unit (building blocks move as a WHOLE model); "component" appears only on installModel's internal whole-model bundle below.


ShareLanes

ShareLanes = { components: Component[]; layers: (Operation | Group)[]; materials: (Operation | Group)[]; patterns: (Operation | Group)[]; textures: Chain[]; }

The target document's shareable lanes (a ModelScope satisfies this).

components

components: Component[]

layers

layers: (Operation | Group)[]

materials

materials: (Operation | Group)[]

patterns

patterns: (Operation | Group)[]

textures

textures: Chain[]


ShareType

ShareType = typeof SHARE_TYPES[number]


SHARE_TYPES

const SHARE_TYPES: readonly ["material", "texture", "layer", "pattern"]

Shareable lane kinds — SSOT lives in schema (SPEC §5.3).

Last updated: 📖 2 min readEdit on GitHub