@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
Layer nodes (method "layer") — identity is the evaluated/literal name.
materials
Material nodes (method "material") — identity is the evaluated/literal name.
patterns
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
materials
patterns
textures
textures:
Chain[]
ShareType
ShareType = typeof
SHARE_TYPES[number]
SHARE_TYPES
constSHARE_TYPES: readonly ["material","texture","layer","pattern"]
Shareable lane kinds — SSOT lives in schema (SPEC §5.3).