@motionscript/core 0.2.0 → 0.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{$ as $o,$a as Ri,$b as Wa,A as io,Aa as ci,Ab as ma,Ac as pn,B as ao,Ba as gi,Bb as ca,Bc as mn,C as no,Ca as li,Cb as ga,Cc as cn,D as fo,Da as xi,Db as la,Dc as gn,E as ho,Ea as ui,Eb as xa,Ec as ln,F as po,Fa as wi,Fb as ua,Fc as w,G as mo,Ga as yi,Gb as wa,Gc as xn,H as co,Ha as _i,Hb as ya,Hc as y,I as go,Ia as Ai,Ib as _a,Ic as _,J as Fo,Ja as Fi,Jb as Aa,Jc as f,K as Lo,Ka as Li,Kb as Fa,Kc as un,L as Po,La as Pi,Lb as La,Lc as wn,M as Eo,Ma as Ei,Mb as Pa,Mc as yn,N as No,Na as Ni,Nb as Ea,Nc as _n,O as So,Oa as Si,Ob as Na,Oc as Ln,P as To,Pa as Ti,Pb as Sa,Pc as Pn,Q as bo,Qa as bi,Qb as Ta,Qc as En,R as Do,Ra as Di,Rb as x,Rc as Nn,S as Mo,Sa as Mi,Sb as u,T as Uo,Ta as Ui,Tb as ba,U as vo,Ua as vi,Ub as Da,V as Vo,Va as Vi,Vb as Ma,W as Co,Wa as Ci,Wb as Ua,X as Io,Xa as Ii,Xb as va,Y as Wo,Ya as d,Yb as Va,Z as Ko,Za as Wi,Zb as Ca,_ as Ro,_a as Ki,_b as Ia,a as Ze,aa as jo,ab as $i,ac as Ka,b as ke,ba as Yo,bb as ji,bc as Ra,c as Oe,ca as qo,cb as Yi,cc as $a,d as tr,da as zo,db as qi,dc as ja,e as er,ea as Bo,eb as zi,ec as Ya,f as rr,fa as Go,fb as Bi,fc as qa,g as sr,ga as Ho,gb as Gi,gc as za,h as or,ha as Jo,hb as Hi,hc as Ba,i as ir,ia as Qo,ib as Ji,ic as Ga,j as br,ja as Xo,jb as Qi,jc as Ha,k as Dr,ka as Zo,kb as Xi,kc as Ja,l as Mr,la as ko,lb as Zi,lc as Qa,m as Ur,ma as Oo,mb as ki,mc as Xa,n as gs,na as ti,nb as Oi,nc as Za,o as ls,oa as ei,ob as ta,oc as ka,p as xs,pa as ri,pb as ea,pc as Oa,q as us,qa as si,qb as ra,qc as tn,r as Ls,ra as oi,rb as sa,rc as en,s as Zs,sa as ii,sb as oa,sc as rn,t as ks,ta as ai,tb as ia,tc as sn,u as Os,ua as ni,ub as aa,uc as on,v as to,va as di,vb as na,vc as an,w as eo,wa as fi,wb as da,wc as nn,x as ro,xa as hi,xb as fa,xc as dn,y as so,ya as pi,yb as ha,yc as fn,z as oo,za as mi,zb as pa,zc as hn}from"./chunks/chunk-FPYU47XX.js";import{$ as St,$a as Te,$c as cs,A as et,Aa as kt,Ab as fr,Ac as Zr,Ad as Bs,B as rt,Ba as Ot,Bb as hr,Bd as Gs,C as st,Ca as te,Cb as pr,Cc as kr,Cd as Hs,D as ot,Da as ee,Db as mr,Dc as o,E as it,Ea as re,Eb as cr,Ec as Or,Ed as Js,Fa as se,Fb as gr,Fc as ts,G as at,Gb as lr,Gc as es,H as nt,Ha as oe,Hb as xr,Hc as rs,Hd as Qs,I as dt,Ia as ie,Ib as ur,Ic as ss,Id as Xs,J as ft,Jb as wr,Jc as os,K as ht,Ka as ae,Kb as yr,Kc as is,L as pt,La as me,Lb as _r,Lc as as,M as mt,Ma as ce,Mc as ns,N as ct,Na as ge,Nc as ds,O as gt,Oa as le,Ob as Ar,Oc as fs,P as lt,Pa as xe,Pb as Fr,Q as xt,Qa as ue,Qb as Lr,R as ut,Ra as we,Rb as Pr,S as wt,Sa as ye,Sb as Er,T as yt,Ta as _e,Tb as Nr,Tc as hs,U as _t,Ua as Ae,Ub as Sr,V as At,Va as Fe,Vb as Tr,W as Ft,Wa as Le,X as Lt,Xa as Pe,Y as Pt,Ya as Ee,Z as Et,Za as Ne,Zb as g,Zc as ps,_ as Nt,_a as Se,_c as ms,a as F,aa as Tt,ab as be,ad as ws,b as L,ba as bt,bb as De,bd as ys,c as P,ca as Dt,cb as Me,cd as _s,d as S,da as Mt,db as Ue,dd as As,e as T,ed as Fs,f as b,fa as Ut,fb as ve,fc as vr,fd as Ps,g as C,ga as vt,gb as Ve,gc as Vr,gd as Es,h as I,ha as Vt,hb as Ce,hc as Cr,hd as Ns,i as W,ia as Ct,ib as Ie,ic as Ir,id as Ss,j as K,ja as It,jb as We,jc as Wr,jd as Ts,je as lo,k as R,ka as Wt,kb as Ke,kc as Kr,kd as bs,ke as xo,l as $,la as Kt,lb as Re,lc as Rr,ld as Ds,le as uo,m as j,ma as Rt,mb as $e,mc as $r,md as Ms,n as Y,na as $t,nb as je,nc as jr,nd as Us,o as q,ob as Ye,oc as Yr,od as vs,p as z,pa as jt,pb as qe,pc as qr,pd as Vs,q as B,qa as Yt,qb as ze,qc as zr,qd as Cs,r as G,ra as qt,rb as Be,rc as Br,rd as Is,s as H,sa as zt,sb as Ge,sc as Gr,sd as Ws,t as J,ta as Bt,tb as He,tc as Hr,td as Ks,u as Q,ua as Gt,ub as Je,uc as Jr,ud as Rs,ue as wo,v as X,va as Ht,vb as Qe,vc as Qr,vd as $s,ve as yo,w as Z,wa as Jt,wb as Xe,wc as l,wd as js,we as _o,x as k,xa as Qt,xb as ar,xd as Ys,xe as Ao,y as O,ya as Xt,yb as nr,yd as qs,z as tt,za as Zt,zb as dr,zc as Xr,zd as zs}from"./chunks/chunk-XCGYJHZR.js";import{g as An,h as Fn}from"./chunks/chunk-GEJEQQER.js";import{b as E,c as N,d as D,e as M,f as U,g as v,h as V,i as ne,j as de,k as fe,l as he,m as pe}from"./chunks/chunk-5TDMGUXQ.js";var p={width:1920,height:1080},m=60,bn={viewport:p,fps:m},A={image:{},video:{},audio:{},font:{}},h=class{platform;viewport;fps;constructor(t,e={}){this.platform=t,this._registry=new d({nodes:e.nodes,shaders:e.shaders,lerps:e.lerps,dynamicNodes:e.dynamicNodes,strict:e.strict}),this.viewport=e.viewport??p,this.fps=e.fps??m,this._manifest=e.manifest??A,this._exporter=t.createExporter()}get manifest(){return this._manifest}get exporter(){return this._exporter}setManifest(t){this._manifest=t;for(let e of this._manifestListeners)e(t)}open(t){return new f(this,t)}knows(t){return this._registry.hasNode(t)}get registry(){return this._registry}async registerNode(t,e){return typeof t=="string"?this._registry.addNodeFromSource(t,e):(this._registry.addNode(t,e),t)}registerShader(t,e,r){return this._registry.addShader(t,e,r)}dispose(){this._manifestListeners.clear(),this.platform.dispose?.()}_registry;_manifest;_exporter;_manifestListeners=new Set;_onManifestChange(t){return this._manifestListeners.add(t),()=>this._manifestListeners.delete(t)}};var i=class{get schedulesAudio(){return!0}setMuted(t){}setVolume(t){}dispose(){this.stop()}};var a=class{catalog;viewport;constructor(t,e){this.catalog=t,this.viewport=e}setCatalog(t){this.catalog=t}inFlightLoads=new Map;cachedAssets=new Set;isLoaded(t){return this.cachedAssets.has(t)}async loadAsset(t,e){let r=this.inFlightLoads.get(t);if(r)return r;if(this.cachedAssets.has(t))return;let s=this.runLoad(t,e);this.inFlightLoads.set(t,s);try{await s}finally{this.inFlightLoads.delete(t)}}async runLoad(t,e){let r=!0;switch(e.type){case"image":await this.loadImage(t);break;case"video":await this.loadVideo(t,e.startFrame,e.endFrame,e.trimStart,e.trimEnd);break;case"font":{let{fontFamily:s,fontWeight:c}=this.parseFontKey(t);if(r=await this.loadFont(t,s,c),!r&&this.getDecodePolicy()==="exact")throw new o("font",s,`The manifest has no font entry for "${s}", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`);break}case"audio":break;case"loader":throw new Error("Loader records must not be routed through StorageAdapter.loadAsset");default:{let s=e;throw new Error(`Unsupported asset type: ${s.type}`)}}r&&this.cachedAssets.add(t)}parseFontKey(t){let[e,r]=t.split("@"),s=r?parseInt(r,10):400;return{fontFamily:e||t,fontWeight:isNaN(s)?400:s}}async warmPendingVideo(){return!1}setDecodePolicy(t){}getDecodePolicy(){return"interactive"}hasPendingDecodes(){return!1}async warmPendingDecodes(){return this.warmPendingVideo()}hasPendingUpgrades(){return!1}async warmPendingUpgrades(){return!1}setPlaying(t){}dispose(){this.inFlightLoads.clear(),this.cachedAssets.clear()}};export{z as ASCII_CHARSETS,ji as AUDIO_ROOT_ID,lo as AUTOFIT_PROBE_SIZE,Pt as AdjustmentChain,Nt as Adjustments,ei as AmbientLight3D,ai as AreaLight3D,u as AssetDeclaration,x as AssetManager,o as AssetNotLoadedError,Ja as AssetTimeline,bo as AudioBus,Je as AudioEffectChain,ar as AudioEffectRegistry,Qe as AudioEffects,i as AudioSink,G as BLEND_MODES_LIST,ho as BooleanGroup,Co as Box3D,Xr as COMMAND_META,mo as Camera,ni as Camera3D,Ls as Canvas2D,hi as Canvas3D,Qs as CanvasRenderContext2D,zo as Capsule3D,Yo as Circle3D,hs as Clip,ja as ClipInstance,qa as ClipStore,Bi as ClipTimeline,Ro as Cone3D,Qr as ContextMap,Ko as Cylinder3D,le as DEFAULT_CAP_SCALE,Pe as DEFAULT_EASE,m as DEFAULT_FPS,bn as DEFAULT_OUTPUT,Ya as DEFAULT_PRECOMP_BUDGET_MS,p as DEFAULT_VIEWPORT,Ei as DOCUMENT_FORMAT_VERSION,Si as DOCUMENT_MIGRATIONS,jt as DRAWABLE_KINDS,_o as DataToken,Eo as DefaultTextStyle,si as DirectionalLight3D,Ni as DocumentTooNewError,R as EFFECT_OPTION_KEYS,A as EMPTY_MANIFEST,ne as EMPTY_PATH_DATA,Nr as EMPTY_TEXT_STYLE,dt as EffectChain,ft as Effects,ks as Ellipse,h as Engine,fi as Environment3D,Gs as ExpressionError,Go as Extrude3D,lt as FillChain,xt as Fills,di as Fog3D,ta as Geo,vt as Graphics2D,qt as Graphics3D,vo as Group3D,ri as HemisphereLight3D,ao as Hexagon,is as IDENTITY_QUATERNION,Qo as Instances3D,Ho as Lathe3D,Zo as Line3D,Dr as MAX_SHADER_PROPERTIES,Mr as MAX_SHADER_SOURCE,wt as MINOR_WIDTH_RATIO,Sa as MUTABLE_MATERIAL_KEYS,w as ManifestAssetCatalog,po as MaskGroup,ea as Mat,Vo as Mesh3D,Oo as Model3D,ti as ModelView3D,Ns as NODE_META,xr as NO_PROJECTION_3D,kr as Node,ps as Node2D,Es as Node3D,ws as NodeAudio,H as NodeBlendModes,Xs as NullRenderContext,Lo as NumberNode,no as Octagon,co as OrbitCamera,de as PATH_UNIT_EXTENT,fe as PATH_UNIT_HALF,ro as Path,Ut as PathBuilder,eo as PathShape,io as Pentagon,Wo as Plane3D,xn as Playback,ln as PlaybackController,oi as PointLight3D,Xo as Points3D,Os as Polygon,to as Polygram,Bo as Polyhedron3D,g as PropSlot,No as Provider,li as ROOT_NODE_ID,Ce as RampChain,En as Random,Zs as Rect,d as Registry,ki as RenderBackendError,zt as RenderContext3D,Po as RichText,oo as RightTriangle,qo as Ring3D,go as RotatedBox,Ba as SETTLE_PASSES,bs as SHAPE_ALIGNMENT_KEYS,Ta as STRUCTURAL_MATERIAL_KEYS,Gt as Scene3D,Pn as SeedGenerator,Ao as SeedToken,f as Session,tr as Sound,To as SoundNode,Io as Sphere3D,ii as SpotLight3D,ko as Sprite3D,fo as Star,za as StateEvaluator,_ as SteppedClock,a as StorageAdapter,te as TEXTURE_KEYS,Er as TEXT_SHAPING_KEYS,Pr as TEXT_STYLE_KEYS,ra as Tex,Fo as Text,wo as TextStyleToken,So as ThemeProvider,yo as ThemeToken,y as Ticker,$o as Torus3D,jo as TorusKnot3D,so as Triangle,Jo as Tube3D,he as UNIT_PATH_BOX,Do as Video,Et as VideoAdjustmentChain,St as VideoAdjustments,et as WGSL_CONTRACT,Ma as __resetSchedulerForTests,bt as alignmentOps,us as applyEditorStates,ga as applyMatrix4,mr as applyToPoint,Pi as asProjectDocument,vi as assertValidDocument,Ui as assertValidProjectDocument,nr as audioEffectsOps,Be as audioParamOps,ct as backdropEffects,ys as busPathOf,_s as busPathTo,ir as busStopKey,gr as cameraMatrix,oe as canLerpFill,Ht as canvas3DResourceKey,kt as canvas3DResourceLoader,Qi as caretCount,cn as caretOffsetAt,gn as caretRangeQuads,Fa as centeredBox3,en as childPlanePointAt,Fe as clamp,Le as clamp01,zi as clipDocument,Oe as clipDurationOf,Ua as clipFrameToTime,Ze as clipTimeAtSource,va as clipTimeToFrame,pn as collectBoxes,Xa as collectBoxes3D,Y as colorOps,Br as commandParallel,zr as commandSequence,Ai as commandSpan,la as compose4,Rs as containsClip,$s as containsOps,S as cornerRadiusOps,T as cornerStyleOps,Pa as corners3,Ha as createAssetTimelineProfile,Jr as createContext,Ln as createRef,Ue as curveEase,De as curveSegmentT,be as curveSegments,da as cylinderRadii,st as describeEffect,Bs as distanceToSegment,Fi as documentDuration,Ti as documentFormatVersion,Yr as driveCommand,Ne as easeIn,Te as easeInOut,ve as easeOfSpec,Se as easeOut,ot as effectDescriptors,it as effectSurface,ui as effectiveSpan,yi as effectiveSpanIn,wi as effectiveSpans,er as effectsKey,pt as effectsOps,Fn as enterBudget,ze as equalsParam,os as euler3Ops,ha as evaluateParametric,oa as evaluateRoundedBox,Hs as expressionOps,wr as facesAway,ae as fillOps,Ft as filterSurface,As as findBusById,ms as findNode2D,Or as flowOps,re as forEachTexture3D,gt as foregroundShaderEffects,cs as frameIn,Va as frameSpecAtTime,Ra as frameTime,_n as generateList,Na as geometryBounds3D,J as getBlendModeHash,Zr as getCommandMeta,Ss as getNodeDescriptor,l as getPropSlot,Tr as getPropertyMeta,v as getTypographyPreset,on as handleValueAt,Ot as hasCanvas3DBackend,_t as hasFilter,ur as hasProjection3D,gi as hasTimeline,We as hold,fr as identity,pa as identity4,Dt as insetsOps,Ge as integrateSpeedToClipTime,cr as invert,ca as invert4,ci as isAudioDocument,mt as isBackdropEffect,$r as isCommand,mi as isCompositionDocument,Ct as isDataTexture3D,Me as isEaseCurve,Oi as isFatalRenderIssue,br as isKnownShaderProperty,Mo as isOrbitCamera3D,yt as isPixelFilter,Li as isProjectDocument,dr as isProjective,Ke as isRamp,Nn as isSteppable,pi as isStillDocument,xe as isStrokeMarker,It as isSurfaceTexture3D,ee as isTextureLike,P as isUniformCorners,Qa as isViewport3D,tt as isWgslShader,j as lerpColor,b as lerpCornerScalarStyle,L as lerpCorners,at as lerpEffect,ss as lerpEuler3,ie as lerpFill,At as lerpFilter,Lt as lerpFilterArray,_r as lerpLookAt,E as lerpNumber,qe as lerpParam,N as lerpPerspective,k as lerpUniformRecord,X as lerpUniformValue,D as lerpVector2,es as lerpVector3,Ee as linear,xa as lookAtRotation4,Rt as looksLikeAssetPath,qr as loopCommand,Vr as loopPasses,Wr as loopPhase,Cr as loopRepeats,Ir as loopSpan,Yi as loweredAudioDocument,jr as makeCommand,bi as migrateDocument,Js as migrateNodeProps,Vi as missingNodeOf,pr as multiply,ma as multiply4,zs as nearPolyline,An as niceStep,dn as nodeAt,an as nodeBox,nn as nodeBoxAt,sn as nodeHandlesAt,lr as nodeLocalMatrix,gs as nodePath,yr as nodeProjectedMatrix,xi as nodeSpan,mn as nodeTextLayout,Wi as nodeTypeIsA,ns as normalizeQuaternion,Ur as normalizeShaderPack,Q as normalizeUniforms,ba as now,Aa as orthographic4,Ye as paramKey,Ki as parentIssue,tn as parentPlanePointAt,Ps as parentSpaceOf,wn as parseCSV,Jt as parseCanvas3DResourceKey,V as parseColor,yn as parseData,pe as pathOps,_a as perspective4,hn as pickNode,ka as pickNode3D,Ia as placeTracks,$i as placementIssues,qs as pointInPolygon,js as polygonVertices,Ys as polygramVertices,Hr as prepareNumericCellTween,Gr as prepareNumericTween,xs as primeMotionTree,Za as projectNode3D,fn as projectNode3DAt,ds as quaternionFromEuler,fs as quaternionOps,Ie as ramp,Xt as registerCanvas3DResourceLoader,Qt as registerCanvas3DWarmup,Ci as registryVocabulary,Zi as renderIssueKey,Oa as renderMatrix,Ga as renderSettled,rn as reparentPlacementAt,xo as requireFontFamily,B as resolveAsciiCharset,Xe as resolveAudioEffects,fa as resolveBevel3D,Uo as resolveCameraPlacement,Tt as resolveChainAdjustments,ht as resolveChainEffects,ut as resolveChainFill,F as resolveCorners,C as resolveEffectAxis,W as resolveEffectColor,se as resolveFill,$t as resolveFill3D,Yt as resolveMaterialShorthand3D,q as resolveMotionBlurAlignment,vs as resolvePivotPosition,un as resolveProjectDocument,Re as resolveRamp,nt as resolveShaderProperties,me as resolveShadow,na as resolveShadowOptions3D,Bt as resolveShadows3D,Us as resolveShapeAlignment,Ts as resolveShapePivot,_e as resolveStroke,ge as resolveStrokeAlign,ue as resolveStrokeCap,we as resolveStrokeEnd,ye as resolveStrokeJoin,Vt as resolveSurfaceSource,Wt as resolveTexture3D,ts as resolveVector3,Mt as resolveVideoTimestamp,ya as rotationOf4,I as sameEffectAxis,K as sameEffectColor,$e as sampleRamp,ls as sampleTree,sa as segmentsOf,U as setTheme,Rr as settles,Kr as settling,rt as shaderContractOf,ia as shadowCasts,ce as shadowOps,aa as shadowReceives,Ri as siblingIssue,Fr as size2DOps,Lr as sizeInputOps,as as slerpQuaternion,ke as sourceTimeAtClip,He as sourceTimeAtClipElapsed,Ar as space3dOps,$a as spanFrames,Ka as spansCovering,Ve as specOfEase,je as staticValue,Ms as stripShapeAlignmentKeys,Ae as strokeOps,Fs as structuralPathOf,Sr as textOps,Kt as texture3DSource,vr as toCommand,Hi as toPathString,Xi as toRenderIssue,Wa as totalFramesOf,Ca as trackFrameCount,Ea as transformBox3,ua as transformMatrix4,sr as transitionGainAt,or as transitionKey,rr as transitionSpans,hr as translation,wa as translation4,O as uniformRecordsEqual,Z as uniformValuesEqual,La as unionBox3,_i as untimed,Di as validateDocument,Mi as validateProjectDocument,Ds as validateShapeAlignmentProps,M as vector2Ops,rs as vector3Ops,Ii as vocabularyBreaks,Zt as warmCanvas3D,$ as withEffectOptions,Cs as withEllipseDescriptor,Ks as withLineDescriptor,Ji as withPathDescriptor,qi as withPlayedSounds,Is as withPolygonDescriptor,Ws as withPolygramDescriptor,Vs as withRectDescriptor,Gi as withRichTextDescriptor,uo as withTextDescriptor,Da as yieldToScheduler};
1
+ import{$ as $o,$a as Ri,$b as Wa,A as io,Aa as ci,Ab as ma,Ac as pn,B as ao,Ba as gi,Bb as ca,Bc as mn,C as no,Ca as li,Cb as ga,Cc as cn,D as fo,Da as xi,Db as la,Dc as gn,E as ho,Ea as ui,Eb as xa,Ec as ln,F as po,Fa as wi,Fb as ua,Fc as w,G as mo,Ga as yi,Gb as wa,Gc as xn,H as co,Ha as _i,Hb as ya,Hc as y,I as go,Ia as Ai,Ib as _a,Ic as _,J as Fo,Ja as Fi,Jb as Aa,Jc as f,K as Lo,Ka as Li,Kb as Fa,Kc as un,L as Po,La as Pi,Lb as La,Lc as wn,M as Eo,Ma as Ei,Mb as Pa,Mc as yn,N as No,Na as Ni,Nb as Ea,Nc as _n,O as So,Oa as Si,Ob as Na,Oc as An,P as To,Pa as Ti,Pb as Sa,Pc as Fn,Q as bo,Qa as bi,Qb as Ta,Qc as Ln,R as Do,Ra as Di,Rb as x,Rc as Nn,S as Mo,Sa as Mi,Sb as u,Sc as Sn,T as Uo,Ta as Ui,Tb as ba,Tc as Tn,U as vo,Ua as vi,Ub as Da,Uc as bn,V as Vo,Va as Vi,Vb as Ma,W as Co,Wa as Ci,Wb as Ua,X as Io,Xa as Ii,Xb as va,Y as Wo,Ya as d,Yb as Va,Z as Ko,Za as Wi,Zb as Ca,_ as Ro,_a as Ki,_b as Ia,a as Ze,aa as jo,ab as $i,ac as Ka,b as ke,ba as Yo,bb as ji,bc as Ra,c as Oe,ca as qo,cb as Yi,cc as $a,d as tr,da as zo,db as qi,dc as ja,e as er,ea as Bo,eb as zi,ec as Ya,f as rr,fa as Go,fb as Bi,fc as qa,g as sr,ga as Ho,gb as Gi,gc as za,h as or,ha as Jo,hb as Hi,hc as Ba,i as ir,ia as Qo,ib as Ji,ic as Ga,j as br,ja as Xo,jb as Qi,jc as Ha,k as Dr,ka as Zo,kb as Xi,kc as Ja,l as Mr,la as ko,lb as Zi,lc as Qa,m as Ur,ma as Oo,mb as ki,mc as Xa,n as gs,na as ti,nb as Oi,nc as Za,o as ls,oa as ei,ob as ta,oc as ka,p as xs,pa as ri,pb as ea,pc as Oa,q as us,qa as si,qb as ra,qc as tn,r as Ls,ra as oi,rb as sa,rc as en,s as Zs,sa as ii,sb as oa,sc as rn,t as ks,ta as ai,tb as ia,tc as sn,u as Os,ua as ni,ub as aa,uc as on,v as to,va as di,vb as na,vc as an,w as eo,wa as fi,wb as da,wc as nn,x as ro,xa as hi,xb as fa,xc as dn,y as so,ya as pi,yb as ha,yc as fn,z as oo,za as mi,zb as pa,zc as hn}from"./chunks/chunk-LJSYPGYX.js";import{$ as St,$a as Te,$c as cs,A as et,Aa as kt,Ab as fr,Ac as Zr,Ad as Bs,B as rt,Ba as Ot,Bb as hr,Bd as Gs,C as st,Ca as te,Cb as pr,Cc as kr,Cd as Hs,D as ot,Da as ee,Db as mr,Dc as o,E as it,Ea as re,Eb as cr,Ec as Or,Ed as Js,Fa as se,Fb as gr,Fc as ts,G as at,Gb as lr,Gc as es,H as nt,Ha as oe,Hb as xr,Hc as rs,Hd as Qs,I as dt,Ia as ie,Ib as ur,Ic as ss,Id as Xs,J as ft,Jb as wr,Jc as os,K as ht,Ka as ae,Kb as yr,Kc as is,L as pt,La as me,Lb as _r,Lc as as,M as mt,Ma as ce,Mc as ns,N as ct,Na as ge,Nc as ds,O as gt,Oa as le,Ob as Ar,Oc as fs,P as lt,Pa as xe,Pb as Fr,Q as xt,Qa as ue,Qb as Lr,R as ut,Ra as we,Rb as Pr,S as wt,Sa as ye,Sb as Er,T as yt,Ta as _e,Tb as Nr,Tc as hs,U as _t,Ua as Ae,Ub as Sr,V as At,Va as Fe,Vb as Tr,W as Ft,Wa as Le,X as Lt,Xa as Pe,Y as Pt,Ya as Ee,Z as Et,Za as Ne,Zb as g,Zc as ps,_ as Nt,_a as Se,_c as ms,a as F,aa as Tt,ab as be,ad as ws,b as L,ba as bt,bb as De,bd as ys,c as P,ca as Dt,cb as Me,cd as _s,d as S,da as Mt,db as Ue,dd as As,e as T,ed as Fs,f as b,fa as Ut,fb as ve,fc as vr,fd as Ps,g as C,ga as vt,gb as Ve,gc as Vr,gd as Es,h as I,ha as Vt,hb as Ce,hc as Cr,hd as Ns,i as W,ia as Ct,ib as Ie,ic as Ir,id as Ss,j as K,ja as It,jb as We,jc as Wr,jd as Ts,je as lo,k as R,ka as Wt,kb as Ke,kc as Kr,kd as bs,ke as xo,l as $,la as Kt,lb as Re,lc as Rr,ld as Ds,le as uo,m as j,ma as Rt,mb as $e,mc as $r,md as Ms,n as Y,na as $t,nb as je,nc as jr,nd as Us,o as q,ob as Ye,oc as Yr,od as vs,p as z,pa as jt,pb as qe,pc as qr,pd as Vs,q as B,qa as Yt,qb as ze,qc as zr,qd as Cs,r as G,ra as qt,rb as Be,rc as Br,rd as Is,s as H,sa as zt,sb as Ge,sc as Gr,sd as Ws,t as J,ta as Bt,tb as He,tc as Hr,td as Ks,u as Q,ua as Gt,ub as Je,uc as Jr,ud as Rs,ue as wo,v as X,va as Ht,vb as Qe,vc as Qr,vd as $s,ve as yo,w as Z,wa as Jt,wb as Xe,wc as l,wd as js,we as _o,x as k,xa as Qt,xb as ar,xd as Ys,xe as Ao,y as O,ya as Xt,yb as nr,yd as qs,z as tt,za as Zt,zb as dr,zc as Xr,zd as zs}from"./chunks/chunk-XCGYJHZR.js";import{g as Pn,h as En}from"./chunks/chunk-GEJEQQER.js";import{b as E,c as N,d as D,e as M,f as U,g as v,h as V,i as ne,j as de,k as fe,l as he,m as pe}from"./chunks/chunk-5TDMGUXQ.js";var p={width:1920,height:1080},m=60,Un={viewport:p,fps:m},A={image:{},video:{},audio:{},font:{}},h=class{platform;viewport;fps;constructor(t,e={}){this.platform=t,this._registry=new d({nodes:e.nodes,shaders:e.shaders,lerps:e.lerps,dynamicNodes:e.dynamicNodes,strict:e.strict}),this.viewport=e.viewport??p,this.fps=e.fps??m,this._manifest=e.manifest??A,this._exporter=t.createExporter()}get manifest(){return this._manifest}get exporter(){return this._exporter}setManifest(t){this._manifest=t;for(let e of this._manifestListeners)e(t)}open(t){return new f(this,t)}knows(t){return this._registry.hasNode(t)}get registry(){return this._registry}async registerNode(t,e){return typeof t=="string"?this._registry.addNodeFromSource(t,e):(this._registry.addNode(t,e),t)}registerShader(t,e,r){return this._registry.addShader(t,e,r)}dispose(){this._manifestListeners.clear(),this.platform.dispose?.()}_registry;_manifest;_exporter;_manifestListeners=new Set;_onManifestChange(t){return this._manifestListeners.add(t),()=>this._manifestListeners.delete(t)}};var i=class{get schedulesAudio(){return!0}setMuted(t){}setVolume(t){}dispose(){this.stop()}};var a=class{catalog;viewport;constructor(t,e){this.catalog=t,this.viewport=e}setCatalog(t){this.catalog=t}inFlightLoads=new Map;cachedAssets=new Set;isLoaded(t){return this.cachedAssets.has(t)}async loadAsset(t,e){let r=this.inFlightLoads.get(t);if(r)return r;if(this.cachedAssets.has(t))return;let s=this.runLoad(t,e);this.inFlightLoads.set(t,s);try{await s}finally{this.inFlightLoads.delete(t)}}async runLoad(t,e){let r=!0;switch(e.type){case"image":await this.loadImage(t);break;case"video":await this.loadVideo(t,e.startFrame,e.endFrame,e.trimStart,e.trimEnd);break;case"font":{let{fontFamily:s,fontWeight:c}=this.parseFontKey(t);if(r=await this.loadFont(t,s,c),!r&&this.getDecodePolicy()==="exact")throw new o("font",s,`The manifest has no font entry for "${s}", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`);break}case"audio":break;case"loader":throw new Error("Loader records must not be routed through StorageAdapter.loadAsset");default:{let s=e;throw new Error(`Unsupported asset type: ${s.type}`)}}r&&this.cachedAssets.add(t)}parseFontKey(t){let[e,r]=t.split("@"),s=r?parseInt(r,10):400;return{fontFamily:e||t,fontWeight:isNaN(s)?400:s}}async warmPendingVideo(){return!1}setDecodePolicy(t){}getDecodePolicy(){return"interactive"}hasPendingDecodes(){return!1}async warmPendingDecodes(){return this.warmPendingVideo()}hasPendingUpgrades(){return!1}async warmPendingUpgrades(){return!1}setPlaying(t){}dispose(){this.inFlightLoads.clear(),this.cachedAssets.clear()}};export{z as ASCII_CHARSETS,ji as AUDIO_ROOT_ID,lo as AUTOFIT_PROBE_SIZE,Pt as AdjustmentChain,Nt as Adjustments,ei as AmbientLight3D,ai as AreaLight3D,u as AssetDeclaration,x as AssetManager,o as AssetNotLoadedError,Ja as AssetTimeline,bo as AudioBus,Je as AudioEffectChain,ar as AudioEffectRegistry,Qe as AudioEffects,i as AudioSink,G as BLEND_MODES_LIST,ho as BooleanGroup,Co as Box3D,Xr as COMMAND_META,mo as Camera,ni as Camera3D,Ls as Canvas2D,hi as Canvas3D,Qs as CanvasRenderContext2D,zo as Capsule3D,Yo as Circle3D,hs as Clip,ja as ClipInstance,qa as ClipStore,Bi as ClipTimeline,Ro as Cone3D,Qr as ContextMap,Ko as Cylinder3D,le as DEFAULT_CAP_SCALE,Pe as DEFAULT_EASE,m as DEFAULT_FPS,Un as DEFAULT_OUTPUT,Ya as DEFAULT_PRECOMP_BUDGET_MS,p as DEFAULT_VIEWPORT,Ei as DOCUMENT_FORMAT_VERSION,Si as DOCUMENT_MIGRATIONS,jt as DRAWABLE_KINDS,_o as DataToken,Eo as DefaultTextStyle,si as DirectionalLight3D,Ni as DocumentTooNewError,R as EFFECT_OPTION_KEYS,A as EMPTY_MANIFEST,ne as EMPTY_PATH_DATA,Nr as EMPTY_TEXT_STYLE,dt as EffectChain,ft as Effects,ks as Ellipse,h as Engine,fi as Environment3D,Gs as ExpressionError,Go as Extrude3D,lt as FillChain,xt as Fills,di as Fog3D,ta as Geo,vt as Graphics2D,qt as Graphics3D,vo as Group3D,ri as HemisphereLight3D,ao as Hexagon,is as IDENTITY_QUATERNION,Qo as Instances3D,Ho as Lathe3D,Zo as Line3D,Dr as MAX_SHADER_PROPERTIES,Mr as MAX_SHADER_SOURCE,wt as MINOR_WIDTH_RATIO,Sa as MUTABLE_MATERIAL_KEYS,w as ManifestAssetCatalog,po as MaskGroup,ea as Mat,Vo as Mesh3D,Oo as Model3D,ti as ModelView3D,Ns as NODE_META,xr as NO_PROJECTION_3D,kr as Node,ps as Node2D,Es as Node3D,ws as NodeAudio,H as NodeBlendModes,Xs as NullRenderContext,Lo as NumberNode,no as Octagon,co as OrbitCamera,de as PATH_UNIT_EXTENT,fe as PATH_UNIT_HALF,ro as Path,Ut as PathBuilder,eo as PathShape,io as Pentagon,Wo as Plane3D,xn as Playback,ln as PlaybackController,oi as PointLight3D,Xo as Points3D,Os as Polygon,to as Polygram,Bo as Polyhedron3D,g as PropSlot,No as Provider,li as ROOT_NODE_ID,Ce as RampChain,Tn as Random,Zs as Rect,d as Registry,ki as RenderBackendError,zt as RenderContext3D,Po as RichText,oo as RightTriangle,qo as Ring3D,go as RotatedBox,Ba as SETTLE_PASSES,bs as SHAPE_ALIGNMENT_KEYS,Ta as STRUCTURAL_MATERIAL_KEYS,Gt as Scene3D,Sn as SeedGenerator,Ao as SeedToken,f as Session,tr as Sound,To as SoundNode,Io as Sphere3D,ii as SpotLight3D,ko as Sprite3D,fo as Star,za as StateEvaluator,_ as SteppedClock,a as StorageAdapter,te as TEXTURE_KEYS,Er as TEXT_SHAPING_KEYS,Pr as TEXT_STYLE_KEYS,ra as Tex,Fo as Text,wo as TextStyleToken,So as ThemeProvider,yo as ThemeToken,y as Ticker,$o as Torus3D,jo as TorusKnot3D,so as Triangle,Jo as Tube3D,he as UNIT_PATH_BOX,Do as Video,Et as VideoAdjustmentChain,St as VideoAdjustments,et as WGSL_CONTRACT,Ma as __resetSchedulerForTests,bt as alignmentOps,us as applyEditorStates,ga as applyMatrix4,mr as applyToPoint,Pi as asProjectDocument,vi as assertValidDocument,Ui as assertValidProjectDocument,nr as audioEffectsOps,Be as audioParamOps,ct as backdropEffects,ys as busPathOf,_s as busPathTo,ir as busStopKey,gr as cameraMatrix,oe as canLerpFill,Ht as canvas3DResourceKey,kt as canvas3DResourceLoader,Qi as caretCount,cn as caretOffsetAt,gn as caretRangeQuads,Fa as centeredBox3,en as childPlanePointAt,Fe as clamp,Le as clamp01,zi as clipDocument,Oe as clipDurationOf,Ua as clipFrameToTime,Ze as clipTimeAtSource,va as clipTimeToFrame,pn as collectBoxes,Xa as collectBoxes3D,Y as colorOps,Br as commandParallel,zr as commandSequence,Ai as commandSpan,la as compose4,Rs as containsClip,$s as containsOps,S as cornerRadiusOps,T as cornerStyleOps,Pa as corners3,Ha as createAssetTimelineProfile,Jr as createContext,Nn as createRef,Ue as curveEase,De as curveSegmentT,be as curveSegments,da as cylinderRadii,Fn as deprecate,_n as deprecationMessage,st as describeEffect,Bs as distanceToSegment,Fi as documentDuration,Ti as documentFormatVersion,Yr as driveCommand,Ne as easeIn,Te as easeInOut,ve as easeOfSpec,Se as easeOut,ot as effectDescriptors,it as effectSurface,ui as effectiveSpan,yi as effectiveSpanIn,wi as effectiveSpans,er as effectsKey,pt as effectsOps,En as enterBudget,ze as equalsParam,os as euler3Ops,ha as evaluateParametric,oa as evaluateRoundedBox,Hs as expressionOps,wr as facesAway,ae as fillOps,Ft as filterSurface,As as findBusById,ms as findNode2D,Or as flowOps,re as forEachTexture3D,gt as foregroundShaderEffects,cs as frameIn,Va as frameSpecAtTime,Ra as frameTime,Ln as generateList,Na as geometryBounds3D,J as getBlendModeHash,Zr as getCommandMeta,Ss as getNodeDescriptor,l as getPropSlot,Tr as getPropertyMeta,v as getTypographyPreset,on as handleValueAt,Ot as hasCanvas3DBackend,_t as hasFilter,ur as hasProjection3D,gi as hasTimeline,We as hold,fr as identity,pa as identity4,Dt as insetsOps,Ge as integrateSpeedToClipTime,cr as invert,ca as invert4,ci as isAudioDocument,mt as isBackdropEffect,$r as isCommand,mi as isCompositionDocument,Ct as isDataTexture3D,Me as isEaseCurve,Oi as isFatalRenderIssue,br as isKnownShaderProperty,Mo as isOrbitCamera3D,yt as isPixelFilter,Li as isProjectDocument,dr as isProjective,Ke as isRamp,bn as isSteppable,pi as isStillDocument,xe as isStrokeMarker,It as isSurfaceTexture3D,ee as isTextureLike,P as isUniformCorners,Qa as isViewport3D,tt as isWgslShader,j as lerpColor,b as lerpCornerScalarStyle,L as lerpCorners,at as lerpEffect,ss as lerpEuler3,ie as lerpFill,At as lerpFilter,Lt as lerpFilterArray,_r as lerpLookAt,E as lerpNumber,qe as lerpParam,N as lerpPerspective,k as lerpUniformRecord,X as lerpUniformValue,D as lerpVector2,es as lerpVector3,Ee as linear,xa as lookAtRotation4,Rt as looksLikeAssetPath,qr as loopCommand,Vr as loopPasses,Wr as loopPhase,Cr as loopRepeats,Ir as loopSpan,Yi as loweredAudioDocument,jr as makeCommand,bi as migrateDocument,Js as migrateNodeProps,Vi as missingNodeOf,pr as multiply,ma as multiply4,zs as nearPolyline,Pn as niceStep,dn as nodeAt,an as nodeBox,nn as nodeBoxAt,sn as nodeHandlesAt,lr as nodeLocalMatrix,gs as nodePath,yr as nodeProjectedMatrix,xi as nodeSpan,mn as nodeTextLayout,Wi as nodeTypeIsA,ns as normalizeQuaternion,Ur as normalizeShaderPack,Q as normalizeUniforms,ba as now,Aa as orthographic4,Ye as paramKey,Ki as parentIssue,tn as parentPlanePointAt,Ps as parentSpaceOf,wn as parseCSV,Jt as parseCanvas3DResourceKey,V as parseColor,yn as parseData,pe as pathOps,_a as perspective4,hn as pickNode,ka as pickNode3D,Ia as placeTracks,$i as placementIssues,qs as pointInPolygon,js as polygonVertices,Ys as polygramVertices,Hr as prepareNumericCellTween,Gr as prepareNumericTween,xs as primeMotionTree,Za as projectNode3D,fn as projectNode3DAt,ds as quaternionFromEuler,fs as quaternionOps,Ie as ramp,Xt as registerCanvas3DResourceLoader,Qt as registerCanvas3DWarmup,Ci as registryVocabulary,Zi as renderIssueKey,Oa as renderMatrix,Ga as renderSettled,rn as reparentPlacementAt,xo as requireFontFamily,B as resolveAsciiCharset,Xe as resolveAudioEffects,fa as resolveBevel3D,Uo as resolveCameraPlacement,Tt as resolveChainAdjustments,ht as resolveChainEffects,ut as resolveChainFill,F as resolveCorners,C as resolveEffectAxis,W as resolveEffectColor,se as resolveFill,$t as resolveFill3D,Yt as resolveMaterialShorthand3D,q as resolveMotionBlurAlignment,vs as resolvePivotPosition,un as resolveProjectDocument,Re as resolveRamp,nt as resolveShaderProperties,me as resolveShadow,na as resolveShadowOptions3D,Bt as resolveShadows3D,Us as resolveShapeAlignment,Ts as resolveShapePivot,_e as resolveStroke,ge as resolveStrokeAlign,ue as resolveStrokeCap,we as resolveStrokeEnd,ye as resolveStrokeJoin,Vt as resolveSurfaceSource,Wt as resolveTexture3D,ts as resolveVector3,Mt as resolveVideoTimestamp,ya as rotationOf4,I as sameEffectAxis,K as sameEffectColor,$e as sampleRamp,ls as sampleTree,sa as segmentsOf,U as setTheme,Rr as settles,Kr as settling,rt as shaderContractOf,ia as shadowCasts,ce as shadowOps,aa as shadowReceives,Ri as siblingIssue,Fr as size2DOps,Lr as sizeInputOps,as as slerpQuaternion,ke as sourceTimeAtClip,He as sourceTimeAtClipElapsed,Ar as space3dOps,$a as spanFrames,Ka as spansCovering,Ve as specOfEase,je as staticValue,Ms as stripShapeAlignmentKeys,Ae as strokeOps,Fs as structuralPathOf,Sr as textOps,Kt as texture3DSource,vr as toCommand,Hi as toPathString,Xi as toRenderIssue,Wa as totalFramesOf,Ca as trackFrameCount,Ea as transformBox3,ua as transformMatrix4,sr as transitionGainAt,or as transitionKey,rr as transitionSpans,hr as translation,wa as translation4,O as uniformRecordsEqual,Z as uniformValuesEqual,La as unionBox3,_i as untimed,Di as validateDocument,Mi as validateProjectDocument,Ds as validateShapeAlignmentProps,M as vector2Ops,rs as vector3Ops,Ii as vocabularyBreaks,Zt as warmCanvas3D,An as warnDeprecated,$ as withEffectOptions,Cs as withEllipseDescriptor,Ks as withLineDescriptor,Ji as withPathDescriptor,qi as withPlayedSounds,Is as withPolygonDescriptor,Ws as withPolygramDescriptor,Vs as withRectDescriptor,Gi as withRichTextDescriptor,uo as withTextDescriptor,Da as yieldToScheduler};
2
2
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/runtime/engine.ts", "../../src/platform/audio-sink.ts", "../../src/platform/storage-adapter.ts"],
4
4
  "sourcesContent": ["import { Size2D } from \"@/attributes/layout/size\";\nimport type { Shader } from \"@/attributes/shape/shaders/pack\";\nimport { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetManifest } from \"@/assets/manifest\";\nimport { Registry, type NodeConstructor, type RegistryOptions } from \"@/document/registry\";\nimport { AudioSink } from \"@/platform/audio-sink\";\nimport { Exporter } from \"@/platform/exporter\";\nimport { Ticker } from \"@/platform/ticker\";\nimport { StorageAdapter } from \"@/platform/storage-adapter\";\nimport { CanvasRenderContext2D } from \"@/render/canvas-render-context2d\";\nimport { MeasureContext2D } from \"@/render/measure-context\";\nimport { RenderSurface } from \"@/render/surface\";\nimport { OpenOptions, Session } from \"./session\";\n\nexport type EngineRenderContext = CanvasRenderContext2D & RenderSurface;\n\nexport interface PlatformDeps {\n catalog: AssetCatalog;\n viewport: Size2D;\n fps: number;\n}\n\n/**\n * Each seam is a factory, not an instance: a storage adapter is per-viewport (it clamps decode resolution, so\n * a decode cached for one viewport is wrong at a larger one) while the engine outlives any session.\n *\n * The type parameter lets a platform hand its factories a richer storage adapter without `core` naming that\n * type; core stores and forwards these, never inspects them.\n */\nexport interface EnginePlatform<TStorage extends StorageAdapter = StorageAdapter> {\n createStorageAdapter(deps: PlatformDeps): TStorage;\n createRenderContext(storage: TStorage): EngineRenderContext;\n createMeasureContext(storage: TStorage): MeasureContext2D;\n createAudioSink(): AudioSink;\n /**\n * `null` when this environment has no realtime playback (a headless export has no wall clock): the session\n * reports `playback === null` rather than faking one.\n *\n * This seam separates preview from export, not browser from server: an export is frame-stepped in either,\n * because a wall-clock export drifts. Handed `audioDevice` because a clock that drives sound must share its\n * timebase (the browser's runs on the device's `AudioContext`).\n */\n createTicker(fps: number, audioDevice: AudioSink): Ticker | null;\n createExporter(): Exporter;\n /** Torn down with the engine. For a platform holding a device or a process. */\n dispose?(): void;\n}\n\n/** What to render is passed to `open()`. */\nexport interface EngineOptions {\n /** Components as an array, or a record naming each key outright. */\n nodes?: RegistryOptions[\"nodes\"];\n shaders?: RegistryOptions[\"shaders\"];\n lerps?: RegistryOptions[\"lerps\"];\n /** Enables `Engine.registerNode` with a source string; see `DynamicNodeConfig`. */\n dynamicNodes?: RegistryOptions[\"dynamicNodes\"];\n /** See `RegistryOptions.strict`. */\n strict?: boolean;\n /**\n * Asset metadata the renderer needs before it loads a file (an image's size, a clip's duration). Reconciled\n * with {@link Engine.setManifest} rather than rebuilt, so a change keeps every decode already cached.\n */\n manifest?: AssetManifest;\n /** Viewport used when a source carries none. Defaults to 1920×1080. */\n viewport?: Size2D;\n /** Frame rate used when a source carries none. Defaults to 60. */\n fps?: number;\n}\n\nexport const DEFAULT_VIEWPORT: Size2D = { width: 1920, height: 1080 };\nexport const DEFAULT_FPS = 60;\n/** What a document renders at when neither the caller nor the document says. */\nexport const DEFAULT_OUTPUT: { viewport: Size2D; fps: number } = { viewport: DEFAULT_VIEWPORT, fps: DEFAULT_FPS };\nexport const EMPTY_MANIFEST: AssetManifest = { image: {}, video: {}, audio: {}, font: {} };\n\n/**\n * Expensive and meant to be shared, one per app: the caches underneath it (registered fonts, decoded images,\n * shaped paragraphs) are why a warm engine beats a cold one, and live here so a preview, a filmstrip and an\n * export share them.\n *\n * What belongs here rather than on a `Session`: if two open documents could disagree about it, it is session\n * state. They can disagree about a theme; they cannot disagree about whether `\"pulseRing\"` is a registered\n * type, since one of them is simply invalid.\n */\nexport class Engine<TStorage extends StorageAdapter = StorageAdapter> {\n readonly viewport: Size2D;\n readonly fps: number;\n\n constructor(\n readonly platform: EnginePlatform<TStorage>,\n options: EngineOptions = {},\n ) {\n this._registry = new Registry({\n nodes: options.nodes,\n shaders: options.shaders,\n lerps: options.lerps,\n dynamicNodes: options.dynamicNodes,\n strict: options.strict,\n });\n this.viewport = options.viewport ?? DEFAULT_VIEWPORT;\n this.fps = options.fps ?? DEFAULT_FPS;\n this._manifest = options.manifest ?? EMPTY_MANIFEST;\n this._exporter = platform.createExporter();\n }\n\n get manifest(): AssetManifest {\n return this._manifest;\n }\n\n get exporter(): Exporter {\n return this._exporter;\n }\n\n /** Replaces what the catalog reports, not the bytes behind it, so existing sessions keep every decode. */\n setManifest(manifest: AssetManifest): void {\n this._manifest = manifest;\n for (const notify of this._manifestListeners) notify(manifest);\n }\n\n /**\n * Cheap: the renderer, fonts, decoded images and shaped paragraphs belong to the engine and are shared across\n * every session.\n */\n open(options: OpenOptions): Session {\n return new Session(this as Engine, options);\n }\n\n knows(key: string): boolean {\n return this._registry.hasNode(key);\n }\n\n /** Read-only: register or replace through `registerNode`/`registerShader`. */\n get registry(): Registry {\n return this._registry;\n }\n\n /**\n * Always `async`: one calling convention whether the argument resolves immediately (a class) or needs\n * compiling (a string).\n */\n async registerNode(\n nodeOrSource: NodeConstructor | string,\n options?: { replace?: boolean },\n ): Promise<NodeConstructor> {\n if (typeof nodeOrSource === \"string\") {\n return this._registry.addNodeFromSource(nodeOrSource, options);\n }\n this._registry.addNode(nodeOrSource, options);\n return nodeOrSource;\n }\n\n /** See `Registry.addShader` for why the key is never inferred from the pack. */\n registerShader(key: string, pack: unknown, options?: { replace?: boolean }): Shader {\n return this._registry.addShader(key, pack, options);\n }\n\n dispose(): void {\n this._manifestListeners.clear();\n this.platform.dispose?.();\n }\n\n /**\n * Not public surface; reach it through `registerNode`/`registerShader`/`knows`. A `Session` (same package)\n * reads it directly; nothing enforces that, as with `_onManifestChange`.\n */\n readonly _registry: Registry;\n private _manifest: AssetManifest;\n private readonly _exporter: Exporter;\n private readonly _manifestListeners = new Set<(m: AssetManifest) => void>();\n\n /** @internal A `Session` registers here for the life of its catalog. */\n _onManifestChange(notify: (m: AssetManifest) => void): () => void {\n this._manifestListeners.add(notify);\n return () => this._manifestListeners.delete(notify);\n }\n}\n", "import type { AudioRequest } from \"@/attributes/audio/request\";\n\n\n/** Stackable audio player driven by the AssetManager: it pushes decoded data in via {@link append}, the device schedules {@link AudioRequest}s via {@link schedule} and plays through {@link syncTo} each tick. */\nexport abstract class AudioSink {\n /** Whether pushing the audio working set does anything. False for a sink that discards everything (an export mixes offline at the end): `AssetManager.syncAudio` rebuilds a `Set`, id strings and a sorted signature every frame, so the work is skipped rather than done and thrown away. */\n get schedulesAudio(): boolean {\n return true;\n }\n\n abstract has(src: string): boolean;\n\n /** Decodes and stacks `data` under `src`; idempotent for a cached `src`. */\n abstract append(src: string, data: ArrayBuffer): Promise<void>;\n\n /** Drop cached audio data (and any active sources) for srcs not in `keep`. */\n abstract retain(keep: ReadonlySet<string>): void;\n\n /** Sets the working set for the current look-ahead window: requests no longer present stop; new ones become eligible via {@link syncTo} once their data is appended. */\n abstract schedule(requests: readonly AudioRequest[]): void;\n\n /** Starts/stops scheduled sources to match `clipTime`, every tick; sources whose data isn't appended yet are skipped. */\n abstract syncTo(clipTime: number): void;\n\n abstract play(time: number, speed: number, reverse: boolean): void | Promise<void>;\n abstract stop(): void;\n\n /** Mutes or unmutes all output. No-op by default (devices that produce no sound). */\n setMuted(muted: boolean): void {}\n\n /** Linear gain on all output, on top of each request's `volume`. Independent of {@link setMuted} (unmuting restores this level) so a host can hold a slider and a mute button. No-op by default. */\n setVolume(volume: number): void {}\n\n dispose(): void {\n this.stop();\n }\n}\n", "import { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetNotLoadedError } from \"@/assets/errors\";\nimport { AssetRecord } from \"@/assets/record\";\nimport { Size2D } from \"@/attributes/layout/size\";\n\n/** How an adapter picks the decode resolution and how strict it is about what it cannot load. `\"exact\"` (export, stills): the level follows the current draw alone, so a frame is the same whatever was drawn before on a reused adapter, and an undescribed font family is refused. `\"interactive\"` (preview): reuse any resident level that is good enough, upgrade in the background, and draw an undescribed family in the fallback face. */\nexport type DecodePolicy = \"exact\" | \"interactive\";\n\nexport abstract class StorageAdapter {\n protected catalog: AssetCatalog;\n protected viewport: Size2D;\n constructor(catalog: AssetCatalog, viewport: Size2D) {\n this.catalog = catalog;\n this.viewport = viewport;\n }\n\n /** Points the adapter at a different catalog, keeping its caches. Safe because the catalog supplies only *metadata* and caches are keyed by source URL: a dropped src leaves an orphaned decode, an added one isn't cached yet. The viewport has no such setter; changing output size rebuilds the adapter. */\n setCatalog(catalog: AssetCatalog): void {\n this.catalog = catalog;\n }\n /** Every asset src whose load is in flight, with its promise; the render path awaits these so no draw happens mid-load. */\n protected inFlightLoads = new Map<string, Promise<void>>();\n /** Keys of assets that have been fully loaded and are ready to use. */\n protected cachedAssets = new Set<string>();\n\n /** Whether `key` has finished loading and is usable now. */\n isLoaded(key: string): boolean {\n return this.cachedAssets.has(key);\n }\n\n async loadAsset(key: string, value: AssetRecord): Promise<void> {\n const existing = this.inFlightLoads.get(key);\n if (existing) return existing;\n if (this.cachedAssets.has(key)) return;\n\n const job = this.runLoad(key, value);\n this.inFlightLoads.set(key, job);\n try {\n await job;\n } finally {\n this.inFlightLoads.delete(key);\n }\n }\n\n private async runLoad(key: string, value: AssetRecord): Promise<void> {\n let loaded = true;\n switch (value.type) {\n case 'image':\n await this.loadImage(key);\n break;\n case 'video':\n await this.loadVideo(key, value.startFrame, value.endFrame, value.trimStart, value.trimEnd);\n break;\n case 'font': {\n const { fontFamily, fontWeight } = this.parseFontKey(key);\n loaded = await this.loadFont(key, fontFamily, fontWeight);\n if (!loaded && this.getDecodePolicy() === \"exact\") {\n throw new AssetNotLoadedError(\n \"font\",\n fontFamily,\n `The manifest has no font entry for \"${fontFamily}\", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`,\n );\n }\n break;\n }\n case 'audio':\n // Audio files load on demand via fetchAudioData / syncAudio, not loadAsset.\n break;\n case 'loader':\n // Loaders are opaque callbacks run directly by the AssetManager and\n // never dispatched through the storage adapter.\n throw new Error(\"Loader records must not be routed through StorageAdapter.loadAsset\");\n default: {\n const _exhaustive: never = value;\n throw new Error(`Unsupported asset type: ${(_exhaustive as AssetRecord).type}`);\n }\n }\n\n // Only a load that happened is cached: caching an undescribable font family marked it handled for this adapter's life, so a manifest that later described it (installing a typeface) could never load it.\n if (loaded) this.cachedAssets.add(key);\n }\n\n protected parseFontKey(key: string): { fontFamily: string; fontWeight: number } {\n const [fontFamily, weightStr] = key.split('@');\n const fontWeight = weightStr ? parseInt(weightStr, 10) : 400;\n return {\n fontFamily: fontFamily || key,\n fontWeight: isNaN(fontWeight) ? 400 : fontWeight,\n };\n }\n\n /** Decode resolution follows the draw, so a load names only the source. */\n abstract loadImage(src: string): Promise<void>;\n abstract loadVideo(\n src: string,\n startFrame: number,\n endFrame: number,\n trimStart: number,\n trimEnd?: number,\n ): Promise<void>;\n abstract loadAudio(\n src: string,\n startFrame: number,\n endFrame: number,\n trimStart: number,\n trimEnd?: number,\n ): Promise<void>;\n abstract fetchAudioData(src: string): Promise<ArrayBuffer>;\n /** Registers every face of `fontFamily` the catalog describes; `false` means the manifest has no entry. Not an error while previewing (the platform fallback shapes it), but a blocking caller refuses it (see {@link DecodePolicy}), and it must not be remembered as handled either way (see {@link runLoad}). */\n abstract loadFont(src: string, fontFamily: string, fontWeight: number): Promise<boolean>;\n\n /** Decodes any exact media frames the last render needed but couldn't satisfy synchronously (a video frame at a freshly-seeked time) and reports whether there were any. A blocking caller renders, awaits this, and re-renders while it returns true. No-op by default. */\n async warmPendingVideo(): Promise<boolean> {\n return false;\n }\n\n setDecodePolicy(policy: DecodePolicy): void {\n }\n\n /** Read back so a caller that borrows the adapter can restore it. */\n getDecodePolicy(): DecodePolicy {\n return \"interactive\";\n }\n\n /** Whether the most recent render left decodes that {@link warmPendingDecodes} would settle. */\n hasPendingDecodes(): boolean {\n return false;\n }\n\n /** Settles what the last render could not draw acceptably under the current policy (video frames, every exact image level under `\"exact\"`, a source drawn with nothing resident under `\"interactive\"`); reports whether there was any. Defaults to {@link warmPendingVideo} so older adapters keep working. See `renderSettled`. */\n async warmPendingDecodes(): Promise<boolean> {\n return this.warmPendingVideo();\n }\n\n /** Whether an `\"interactive\"` decode is on its way that would draw the last render sharper. A paint doesn't wait for it; a preview repaints when {@link warmPendingUpgrades} reports a landing. */\n hasPendingUpgrades(): boolean {\n return false;\n }\n\n async warmPendingUpgrades(): Promise<boolean> {\n return false;\n }\n\n /** Whether playback is live: video prefetches ahead only while playing and quiesces on pause. No-op by default. */\n setPlaying(playing: boolean): void {\n }\n\n dispose(): void {\n this.inFlightLoads.clear();\n this.cachedAssets.clear();\n }\n}\n"],
5
- "mappings": "k6HAqEO,IAAMA,EAA2B,CAAE,MAAO,KAAM,OAAQ,IAAI,EACtDC,EAAc,GAEdC,GAAoD,CAAE,SAAUF,EAAkB,IAAKC,CAAW,EAClGE,EAAgC,CAAE,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,KAAM,CAAA,CAAE,EAW3EC,EAAP,KAAa,CAKF,SAJJ,SACA,IAET,YACaC,EACTC,EAAyB,CAAA,EAAE,CADlB,KAAA,SAAAD,EAGT,KAAK,UAAY,IAAIE,EAAS,CAC1B,MAAOD,EAAQ,MACf,QAASA,EAAQ,QACjB,MAAOA,EAAQ,MACf,aAAcA,EAAQ,aACtB,OAAQA,EAAQ,OACnB,EACD,KAAK,SAAWA,EAAQ,UAAYN,EACpC,KAAK,IAAMM,EAAQ,KAAOL,EAC1B,KAAK,UAAYK,EAAQ,UAAYH,EACrC,KAAK,UAAYE,EAAS,eAAc,CAC5C,CAEA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAEA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAGA,YAAYG,EAAuB,CAC/B,KAAK,UAAYA,EACjB,QAAWC,KAAU,KAAK,mBAAoBA,EAAOD,CAAQ,CACjE,CAMA,KAAKF,EAAoB,CACrB,OAAO,IAAII,EAAQ,KAAgBJ,CAAO,CAC9C,CAEA,MAAMK,EAAW,CACb,OAAO,KAAK,UAAU,QAAQA,CAAG,CACrC,CAGA,IAAI,UAAQ,CACR,OAAO,KAAK,SAChB,CAMA,MAAM,aACFC,EACAN,EAA+B,C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OACAF,EACA,uCAAuCA,CAAU,8JAA8J,EAGvN,KACJ,CACA,IAAK,QAED,MACJ,IAAK,SAGD,MAAM,IAAI,MAAM,oEAAoE,EACxF,QAAS,CACL,IAAMG,EAAqBP,EAC3B,MAAM,IAAI,MAAM,2BAA4BO,EAA4B,IAAI,EAAE,CAClF,CACJ,CAGIJ,GAAQ,KAAK,aAAa,IAAIJ,CAAG,CACzC,CAEU,aAAaA,EAAW,CAC9B,GAAM,CAACK,EAAYI,CAAS,EAAIT,EAAI,MAAM,GAAG,EACvCM,EAAaG,EAAY,SAASA,EAAW,EAAE,EAAI,IACzD,MAAO,CACH,WAAYJ,GAAcL,EAC1B,WAAY,MAAMM,CAAU,EAAI,IAAMA,EAE9C,CAuBA,MAAM,kBAAgB,CAClB,MAAO,EACX,CAEA,gBAAgBI,EAAoB,CACpC,CAGA,iBAAe,CACX,MAAO,aACX,CAGA,mBAAiB,CACb,MAAO,EACX,CAGA,MAAM,oBAAkB,CACpB,OAAO,KAAK,iBAAgB,CAChC,CAGA,oBAAkB,CACd,MAAO,EACX,CAEA,MAAM,qBAAmB,CACrB,MAAO,EACX,CAGA,WAAWC,EAAgB,CAC3B,CAEA,SAAO,CACH,KAAK,cAAc,MAAK,EACxB,KAAK,aAAa,MAAK,CAC3B",
6
6
  "names": ["DEFAULT_VIEWPORT", "DEFAULT_FPS", "DEFAULT_OUTPUT", "EMPTY_MANIFEST", "Engine", "platform", "options", "Registry", "manifest", "notify", "Session", "key", "nodeOrSource", "pack", "AudioSink", "muted", "volume", "StorageAdapter", "catalog", "viewport", "key", "value", "existing", "job", "loaded", "fontFamily", "fontWeight", "AssetNotLoadedError", "_exhaustive", "weightStr", "policy", "playing"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.2.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "exports": {
5
5
  ".": "dist/browser/index.js",
6
6
  "./experimental": "dist/browser/experimental.js",
@@ -1,2 +1,2 @@
1
- import{$ as Fo,$a as vt,A as oo,Ac as Ht,B as to,Ba as at,C as ro,Ca as it,D as no,Da as pt,E as so,Ea as ct,F as ao,G as po,H as co,Ha as lt,I as lo,Ia as mt,J as xo,Ja as ft,K as ho,Ka as ut,Kc as Kt,L as Do,La as dt,Lc as Qt,M as go,Ma as xt,Mc as Ut,N as Po,Na as ht,Nc as Wt,O as Oo,Oc as Jt,P as To,Pa as Dt,Pc as Xt,Q as yo,Qa as gt,Qc as Yt,R as Co,Ra as Pt,T as vo,U as Ro,Ua as Ot,V as wo,Va as St,W as Eo,X as Mo,Y as No,Ya as Tt,Z as Io,Za as yt,_ as Vo,_a as Ct,_b as kt,aa as ko,ab as bt,ba as Lo,ca as Bo,d as xe,da as jo,ea as zo,fa as Go,ga as _o,ha as qo,hb as At,ia as Ho,j as Pe,ja as Ko,ka as Qo,la as Uo,m as Oe,ma as Wo,oa as Jo,ob as Rt,pa as Xo,pb as wt,qa as Yo,qb as Et,qc as Lt,r as je,ra as Zo,rb as Mt,rc as Bt,s as Ue,sa as $o,sb as Nt,sc as jt,t as We,ta as et,tb as It,tc as zt,u as Je,ua as ot,ub as Vt,uc as Gt,v as Xe,va as tt,vc as _t,w as Ye,wa as rt,x as Ze,xa as st,y as $e,yb as Ft,z as eo,zc as qt}from"./chunks/chunk-FPYU47XX.js";import{$ as q,$a as le,$c as Be,Ac as Re,Bd as ze,C as V,Cd as Ge,D as F,Ec as we,Ed as _e,Ee as uo,Fa as $,Fc as Ee,Fe as So,Gc as Me,Ge as bo,H as k,I as L,Ic as Ne,J as B,Ka as ee,Kd as qe,La as te,Lc as Ie,Ld as u,Ma as re,Mc as Ve,Nc as Fe,Ob as he,Q as j,Qb as De,Re as Ao,Sd as He,Ta as ne,Tc as ke,Td as Ke,Ua as se,Ub as ge,Va as ae,Vd as g,We as nt,Y as z,Ya as ie,Yd as S,Z as G,Za as pe,_,_a as ce,_c as Le,a as A,ba as H,ca as K,d as w,e as E,ee as Qe,fa as Q,ga as U,ha as W,ib as me,ie as io,jb as fe,kb as ue,mc as Se,n as I,na as D,nc as Te,pc as ye,qc as Ce,ra as J,rc as ve,sa as X,ta as Y,te as mo,ua as Z,uc as be,vb as de,vc as Ae,ye as fo}from"./chunks/chunk-XCGYJHZR.js";import"./chunks/chunk-GEJEQQER.js";import{a as b,b as R,d as M,h as N,m as oe}from"./chunks/chunk-5TDMGUXQ.js";var v={};b(v,{BAR:()=>y,STROKE_UNIT:()=>d,bar:()=>P,commands:()=>$t,dashes:()=>C,lines:()=>sr,material:()=>er,state:()=>Zt});var Zt={fill:u.fill,stroke:u.stroke},$t={fillTo:g.fillTo,strokeTo:g.strokeTo},d=.001;function T(e){if(e===void 0||e.type!=="solid"||e.blend!==void 0)return null;let t=e.color;return{color:t,alpha:(t[3]??1)*(e.opacity??1)}}function er(e,t={}){let{type:o="basic",opacity:r,...n}=t,s=r??1;if(e.length===0)return{type:o,...n,visible:!1};let a=e.length===1?T(e[0]):null;if(a!==null){let[c,l,p]=a.color;return{type:o,color:[c,l,p,1],opacity:a.alpha*s,...n}}let i=D(e);return{type:o,...i.color!==void 0?{color:i.color}:{},...i.map!==void 0?{map:i.map}:{},...r!==void 0?{opacity:r}:{},...n}}var y={type:"box",width:1,height:1,depth:1};function or(e,t,o){if(e<=-.9999)return{x:0,y:1,z:0,w:0};let r=-o,n=t,s=1+e,a=Math.hypot(r,n,s);return{x:0,y:r/a,z:n/a,w:s/a}}function P(e,t,o,r=0){let n=t[0]-e[0],s=t[1]-e[1],a=t[2]-e[2],i=Math.hypot(n,s,a)||1e-9;return{position:[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2],quaternion:or(n/i,s/i,a/i),scale:[i+r*2,o,o]}}function tr(e){if(e===void 0||e.length===0)return null;let t=e.map(r=>Math.max(0,r)*d),o=t.length%2===1?[...t,...t]:t;return o.reduce((r,n)=>r+n,0)>1e-9?o:null}function C(e,t,o=0){let r=t.reduce((c,l)=>c+l,0),n=[];if(r<=0||e<=0)return n;let s=-((o%r+r)%r),a=0,i=e-1e-9;for(;s<i;){let c=t[a%t.length];if(a%2===0&&c>0){let l=Math.max(0,s),p=Math.min(e,s+c);p-l>1e-9&&n.push([l,p])}s+=c,a++}return n}function rr(e,t,o){let r=e.weight*d,n=e.cap==="square"?r/2:0,s=tr(e.dash),a=e.dashOffset*d,i=[];for(let[c,l]of t){let p=o?[c[0]+o[0],c[1]+o[1],c[2]+o[2]]:c,m=o?[l[0]+o[0],l[1]+o[1],l[2]+o[2]]:l,x=Math.hypot(m[0]-p[0],m[1]-p[1],m[2]-p[2]);if(x<=1e-9)continue;if(s===null){i.push(P(p,m,r,n));continue}let O=h=>{let f=h/x;return[p[0]+(m[0]-p[0])*f,p[1]+(m[1]-p[1])*f,p[2]+(m[2]-p[2])*f]};for(let[h,f]of C(x,s,a))i.push(P(O(h),O(f),r,n))}return i}function nr(e,t){let o=e.fill.map(T).find(i=>i!==null)??null;if(o===null||o.alpha<=0)return null;let[r,n,s]=o.color,a=o.alpha<1||t;return{type:"basic",color:[r,n,s,1],opacity:o.alpha,...a?{transparent:!0,depthWrite:!1}:{},...t?{depthTest:!1}:{}}}function sr(e,t,o,r={}){let n=r.through??!1;for(let s of t){if(!(s.weight>0))continue;let a=nr(s,n);if(a===null)continue;let i=rr(s,o,r.lift);i.length!==0&&e.instances(y,a,i,r.transform?{transform:r.transform}:void 0)}return e}export{z as AdjustmentChain,_ as Adjustments,io as Aim,Jo as AmbientLight3D,et as AreaLight3D,yo as AudioBus,de as AudioEffects,so as BooleanGroup,Eo as Box3D,po as Camera,ot as Camera3D,je as Canvas2D,st as Canvas3D,jo as Capsule3D,Lo as Circle3D,ke as Clip,Vo as Cone3D,Ae as ContextMap,Io as Cylinder3D,xt as DOCUMENT_FORMAT_VERSION,go as DefaultTextStyle,Yo as DirectionalLight3D,ht as DocumentTooNewError,L as EffectChain,B as Effects,We as Ellipse,rt as Environment3D,ze as ExpressionError,Go as Extrude3D,j as Fills,He as Flow,tt as Fog3D,Rt as Geo,U as Graphics2D,J as Graphics3D,Ro as Group3D,Xo as HemisphereLight3D,to as Hexagon,Ho as Instances3D,_o as Lathe3D,Qo as Line3D,ao as MaskGroup,wt as Mat,Ao as Material,wo as Mesh3D,Wo as Model3D,ho as NumberNode,ro as Octagon,co as OrbitCamera,S as Paint,v as Paint3D,Ze as Path,Q as PathBuilder,Ye as PathShape,oo as Pentagon,No as Plane3D,Zo as PointLight3D,Ko as Points3D,Je as Polygon,Xe as Polygram,zo as Polyhedron3D,Po as Provider,it as ROOT_NODE_ID,Yt as Random,Ue as Rect,Tt as Registry,X as RenderContext3D,Do as RichText,eo as RightTriangle,Bo as Ring3D,lo as RotatedBox,Z as Scene3D,Xt as SeedGenerator,Qe as Shapes,xe as Sound,To as SoundNode,Mo as Sphere3D,$o as SpotLight3D,Uo as Sprite3D,no as Star,Et as Tex,xo as Text,mo as TextLayout,Oo as ThemeProvider,Fo as Torus3D,ko as TorusKnot3D,$e as Triangle,qo as Tube3D,uo as Typeface,u as Types,Co as Video,G as VideoAdjustmentChain,q as VideoAdjustments,nt as View3D,H as alignmentOps,dt as asProjectDocument,Ot as assertValidDocument,Bt as childPlanePointAt,ae as clamp,Ht as collectBoxes,I as colorOps,ve as commandParallel,Ce as commandSequence,mt as commandSpan,Ke as commandsFor,qe as component2d,bo as component3d,So as componentAudio,w as cornerRadiusOps,E as cornerStyleOps,be as createContext,Jt as createRef,V as describeEffect,ft as documentDuration,Dt as documentFormatVersion,pe as easeIn,le as easeInOut,ce as easeOut,F as effectDescriptors,ct as effectiveSpan,Ft as evaluateParametric,Nt as evaluateRoundedBox,Ge as expressionOps,ee as fillOps,Le as findNode2D,we as flowOps,Be as frameIn,Wt as generateList,Re as getCommandMeta,Gt as handleValueAt,at as hasTimeline,fe as hold,K as insetsOps,Se as isCommand,Pe as isKnownShaderProperty,ut as isProjectDocument,ue as isRamp,Ne as lerpEuler3,R as lerpNumber,M as lerpVector2,Me as lerpVector3,ie as linear,ye as loopCommand,Te as makeCommand,gt as migrateDocument,_e as migrateNodeProps,St as missingNodeOf,_t as nodeBox,zt as nodeHandlesAt,pt as nodeSpan,yt as nodeTypeIsA,Ve as normalizeQuaternion,Oe as normalizeShaderPack,Ct as parentIssue,Lt as parentPlanePointAt,Qt as parseCSV,N as parseColor,Ut as parseData,oe as pathOps,qt as pickNode,kt as placeTracks,bt as placementIssues,fo as provides,Fe as quaternionFromEuler,me as ramp,jt as reparentPlacementAt,vo as resolveCameraPlacement,A as resolveCorners,$ as resolveFill,D as resolveFill3D,Kt as resolveProjectDocument,k as resolveShaderProperties,te as resolveShadow,Y as resolveShadows3D,ne as resolveStroke,W as resolveSurfaceSource,Ee as resolveVector3,Mt as segmentsOf,It as shadowCasts,re as shadowOps,Vt as shadowReceives,vt as siblingIssue,De as sizeInputOps,Ie as slerpQuaternion,he as space3dOps,se as strokeOps,ge as textOps,At as toPathString,lt as untimed,Pt as validateDocument};
1
+ import{$ as Fo,$a as vt,A as oo,Ac as Ht,B as to,Ba as st,C as ro,Ca as it,D as no,Da as pt,E as ao,Ea as ct,F as so,G as po,H as co,Ha as lt,I as lo,Ia as mt,J as xo,Ja as ft,K as ho,Ka as ut,Kc as Kt,L as Do,La as dt,Lc as Qt,M as go,Ma as xt,Mc as Ut,N as Po,Na as ht,O as Oo,Oc as Wt,P as To,Pa as Dt,Pc as Jt,Q as yo,Qa as gt,Qc as Xt,R as Co,Ra as Pt,Rc as Yt,Sc as Zt,T as vo,Tc as $t,U as Ao,Ua as Ot,V as Ro,Va as St,W as Eo,X as Mo,Y as No,Ya as Tt,Z as Io,Za as yt,_ as Vo,_a as Ct,_b as kt,aa as ko,ab as bt,ba as Lo,ca as Bo,d as xe,da as jo,ea as zo,fa as Go,ga as _o,ha as qo,hb as wt,ia as Ho,j as Pe,ja as Ko,ka as Qo,la as Uo,m as Oe,ma as Wo,oa as Jo,ob as At,pa as Xo,pb as Rt,qa as Yo,qb as Et,qc as Lt,r as je,ra as Zo,rb as Mt,rc as Bt,s as Ue,sa as $o,sb as Nt,sc as jt,t as We,ta as et,tb as It,tc as zt,u as Je,ua as ot,ub as Vt,uc as Gt,v as Xe,va as tt,vc as _t,w as Ye,wa as rt,x as Ze,xa as at,y as $e,yb as Ft,z as eo,zc as qt}from"./chunks/chunk-LJSYPGYX.js";import{$ as q,$a as le,$c as Be,Ac as Ae,Bd as ze,C as V,Cd as Ge,D as F,Ec as Re,Ed as _e,Ee as uo,Fa as $,Fc as Ee,Fe as So,Gc as Me,Ge as bo,H as k,I as L,Ic as Ne,J as B,Ka as ee,Kd as qe,La as te,Lc as Ie,Ld as u,Ma as re,Mc as Ve,Nc as Fe,Ob as he,Q as j,Qb as De,Re as wo,Sd as He,Ta as ne,Tc as ke,Td as Ke,Ua as ae,Ub as ge,Va as se,Vd as g,We as nt,Y as z,Ya as ie,Yd as S,Z as G,Za as pe,_,_a as ce,_c as Le,a as w,ba as H,ca as K,d as R,e as E,ee as Qe,fa as Q,ga as U,ha as W,ib as me,ie as io,jb as fe,kb as ue,mc as Se,n as I,na as D,nc as Te,pc as ye,qc as Ce,ra as J,rc as ve,sa as X,ta as Y,te as mo,ua as Z,uc as be,vb as de,vc as we,ye as fo}from"./chunks/chunk-XCGYJHZR.js";import"./chunks/chunk-GEJEQQER.js";import{a as b,b as A,d as M,h as N,m as oe}from"./chunks/chunk-5TDMGUXQ.js";var v={};b(v,{BAR:()=>y,STROKE_UNIT:()=>d,bar:()=>P,commands:()=>or,dashes:()=>C,lines:()=>ir,material:()=>tr,state:()=>er});var er={fill:u.fill,stroke:u.stroke},or={fillTo:g.fillTo,strokeTo:g.strokeTo},d=.001;function T(e){if(e===void 0||e.type!=="solid"||e.blend!==void 0)return null;let t=e.color;return{color:t,alpha:(t[3]??1)*(e.opacity??1)}}function tr(e,t={}){let{type:o="basic",opacity:r,...n}=t,a=r??1;if(e.length===0)return{type:o,...n,visible:!1};let s=e.length===1?T(e[0]):null;if(s!==null){let[c,l,p]=s.color;return{type:o,color:[c,l,p,1],opacity:s.alpha*a,...n}}let i=D(e);return{type:o,...i.color!==void 0?{color:i.color}:{},...i.map!==void 0?{map:i.map}:{},...r!==void 0?{opacity:r}:{},...n}}var y={type:"box",width:1,height:1,depth:1};function rr(e,t,o){if(e<=-.9999)return{x:0,y:1,z:0,w:0};let r=-o,n=t,a=1+e,s=Math.hypot(r,n,a);return{x:0,y:r/s,z:n/s,w:a/s}}function P(e,t,o,r=0){let n=t[0]-e[0],a=t[1]-e[1],s=t[2]-e[2],i=Math.hypot(n,a,s)||1e-9;return{position:[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2],quaternion:rr(n/i,a/i,s/i),scale:[i+r*2,o,o]}}function nr(e){if(e===void 0||e.length===0)return null;let t=e.map(r=>Math.max(0,r)*d),o=t.length%2===1?[...t,...t]:t;return o.reduce((r,n)=>r+n,0)>1e-9?o:null}function C(e,t,o=0){let r=t.reduce((c,l)=>c+l,0),n=[];if(r<=0||e<=0)return n;let a=-((o%r+r)%r),s=0,i=e-1e-9;for(;a<i;){let c=t[s%t.length];if(s%2===0&&c>0){let l=Math.max(0,a),p=Math.min(e,a+c);p-l>1e-9&&n.push([l,p])}a+=c,s++}return n}function ar(e,t,o){let r=e.weight*d,n=e.cap==="square"?r/2:0,a=nr(e.dash),s=e.dashOffset*d,i=[];for(let[c,l]of t){let p=o?[c[0]+o[0],c[1]+o[1],c[2]+o[2]]:c,m=o?[l[0]+o[0],l[1]+o[1],l[2]+o[2]]:l,x=Math.hypot(m[0]-p[0],m[1]-p[1],m[2]-p[2]);if(x<=1e-9)continue;if(a===null){i.push(P(p,m,r,n));continue}let O=h=>{let f=h/x;return[p[0]+(m[0]-p[0])*f,p[1]+(m[1]-p[1])*f,p[2]+(m[2]-p[2])*f]};for(let[h,f]of C(x,a,s))i.push(P(O(h),O(f),r,n))}return i}function sr(e,t){let o=e.fill.map(T).find(i=>i!==null)??null;if(o===null||o.alpha<=0)return null;let[r,n,a]=o.color,s=o.alpha<1||t;return{type:"basic",color:[r,n,a,1],opacity:o.alpha,...s?{transparent:!0,depthWrite:!1}:{},...t?{depthTest:!1}:{}}}function ir(e,t,o,r={}){let n=r.through??!1;for(let a of t){if(!(a.weight>0))continue;let s=sr(a,n);if(s===null)continue;let i=ar(a,o,r.lift);i.length!==0&&e.instances(y,s,i,r.transform?{transform:r.transform}:void 0)}return e}export{z as AdjustmentChain,_ as Adjustments,io as Aim,Jo as AmbientLight3D,et as AreaLight3D,yo as AudioBus,de as AudioEffects,ao as BooleanGroup,Eo as Box3D,po as Camera,ot as Camera3D,je as Canvas2D,at as Canvas3D,jo as Capsule3D,Lo as Circle3D,ke as Clip,Vo as Cone3D,we as ContextMap,Io as Cylinder3D,xt as DOCUMENT_FORMAT_VERSION,go as DefaultTextStyle,Yo as DirectionalLight3D,ht as DocumentTooNewError,L as EffectChain,B as Effects,We as Ellipse,rt as Environment3D,ze as ExpressionError,Go as Extrude3D,j as Fills,He as Flow,tt as Fog3D,At as Geo,U as Graphics2D,J as Graphics3D,Ao as Group3D,Xo as HemisphereLight3D,to as Hexagon,Ho as Instances3D,_o as Lathe3D,Qo as Line3D,so as MaskGroup,Rt as Mat,wo as Material,Ro as Mesh3D,Wo as Model3D,ho as NumberNode,ro as Octagon,co as OrbitCamera,S as Paint,v as Paint3D,Ze as Path,Q as PathBuilder,Ye as PathShape,oo as Pentagon,No as Plane3D,Zo as PointLight3D,Ko as Points3D,Je as Polygon,Xe as Polygram,zo as Polyhedron3D,Po as Provider,it as ROOT_NODE_ID,$t as Random,Ue as Rect,Tt as Registry,X as RenderContext3D,Do as RichText,eo as RightTriangle,Bo as Ring3D,lo as RotatedBox,Z as Scene3D,Zt as SeedGenerator,Qe as Shapes,xe as Sound,To as SoundNode,Mo as Sphere3D,$o as SpotLight3D,Uo as Sprite3D,no as Star,Et as Tex,xo as Text,mo as TextLayout,Oo as ThemeProvider,Fo as Torus3D,ko as TorusKnot3D,$e as Triangle,qo as Tube3D,uo as Typeface,u as Types,Co as Video,G as VideoAdjustmentChain,q as VideoAdjustments,nt as View3D,H as alignmentOps,dt as asProjectDocument,Ot as assertValidDocument,Bt as childPlanePointAt,se as clamp,Ht as collectBoxes,I as colorOps,ve as commandParallel,Ce as commandSequence,mt as commandSpan,Ke as commandsFor,qe as component2d,bo as component3d,So as componentAudio,R as cornerRadiusOps,E as cornerStyleOps,be as createContext,Yt as createRef,Jt as deprecate,V as describeEffect,ft as documentDuration,Dt as documentFormatVersion,pe as easeIn,le as easeInOut,ce as easeOut,F as effectDescriptors,ct as effectiveSpan,Ft as evaluateParametric,Nt as evaluateRoundedBox,Ge as expressionOps,ee as fillOps,Le as findNode2D,Re as flowOps,Be as frameIn,Xt as generateList,Ae as getCommandMeta,Gt as handleValueAt,st as hasTimeline,fe as hold,K as insetsOps,Se as isCommand,Pe as isKnownShaderProperty,ut as isProjectDocument,ue as isRamp,Ne as lerpEuler3,A as lerpNumber,M as lerpVector2,Me as lerpVector3,ie as linear,ye as loopCommand,Te as makeCommand,gt as migrateDocument,_e as migrateNodeProps,St as missingNodeOf,_t as nodeBox,zt as nodeHandlesAt,pt as nodeSpan,yt as nodeTypeIsA,Ve as normalizeQuaternion,Oe as normalizeShaderPack,Ct as parentIssue,Lt as parentPlanePointAt,Qt as parseCSV,N as parseColor,Ut as parseData,oe as pathOps,qt as pickNode,kt as placeTracks,bt as placementIssues,fo as provides,Fe as quaternionFromEuler,me as ramp,jt as reparentPlacementAt,vo as resolveCameraPlacement,w as resolveCorners,$ as resolveFill,D as resolveFill3D,Kt as resolveProjectDocument,k as resolveShaderProperties,te as resolveShadow,Y as resolveShadows3D,ne as resolveStroke,W as resolveSurfaceSource,Ee as resolveVector3,Mt as segmentsOf,It as shadowCasts,re as shadowOps,Vt as shadowReceives,vt as siblingIssue,De as sizeInputOps,Ie as slerpQuaternion,he as space3dOps,ae as strokeOps,ge as textOps,wt as toPathString,lt as untimed,Pt as validateDocument,Wt as warnDeprecated};
2
2
  //# sourceMappingURL=sdk.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/components/modules/paint3d.ts"],
4
4
  "sourcesContent": ["import type { NormalizedColor } from \"@/attributes/shape/fill/color/parser\";\nimport type { FillResolved } from \"@/attributes/shape/fill/union\";\nimport type { StrokeResolved } from \"@/attributes/shape/stroke/stroke\";\nimport { resolveFill3D, type Fill3D } from \"@/render3d/fill3d\";\nimport type { Geometry3D } from \"@/render3d/geometry\";\nimport type { Graphics3D } from \"@/render3d/graphics3d\";\nimport type { BasicMaterial3D, Material3D, StandardMaterial3D } from \"@/render3d/material\";\nimport type { Transform3D } from \"@/render3d/transform\";\nimport type { Quaternion } from \"@/render3d/vector3\";\nimport { Types } from \"@/components/factory/types\";\nimport * as Paint from \"@/components/modules/paint\";\n\n/**\n * A custom 3D node's paint: the same `fill` and `stroke` entries a 2D shape takes, so a 3D component never invents\n * `color`, `lineColor` or `lineWidth`. Spread `...Paint3D.state` and `...Paint3D.commands`, then draw the surface with\n * {@link material} and the lines with {@link lines}. Built-in meshes keep `Material.state`.\n */\nexport const state = {\n fill: Types.fill,\n stroke: Types.stroke,\n};\n\n/** `fillTo` and `strokeTo`, the same commands `Paint` has. */\nexport const commands = {\n fillTo: Paint.commands.fillTo,\n strokeTo: Paint.commands.strokeTo,\n};\n\n/** A point in a node's own 3D space. */\nexport type Vec3 = readonly [number, number, number];\n\n/** A line segment from one point to another. */\nexport type Segment3D = readonly [Vec3, Vec3];\n\n/** A stroke `weight`, `dash` or `dashOffset` of 1 is this many scene units: weights are thousandths of a unit. */\nexport const STROKE_UNIT = 0.001;\n\n/** The surface options {@link material} takes: `type` picks the shading, and every other field is laid over the result. */\nexport type MaterialOptions =\n | ({ readonly type?: \"basic\" } & Partial<Omit<BasicMaterial3D, \"type\">>)\n | ({ readonly type: \"standard\" } & Partial<Omit<StandardMaterial3D, \"type\">>);\n\n/** The colour a fill layer is when it is one flat colour with no blend; `null` for anything else. */\nfunction solidOf(layer: FillResolved | undefined): { color: NormalizedColor; alpha: number } | null {\n if (layer === undefined || layer.type !== \"solid\") return null;\n if (layer.blend !== undefined) return null;\n const color = layer.color;\n return { color, alpha: (color[3] ?? 1) * (layer.opacity ?? 1) };\n}\n\n/**\n * The material a surface painted with `fill` wears. Unlit (`basic`) by default; `{ type: \"standard\" }` lights it.\n *\n * - **One solid layer** becomes `color` with its alpha as `opacity`, so `fillTo` between colours tweens the uniforms\n * and allocates nothing.\n * - **Anything else** (a gradient, an image, a stack of layers) goes through `resolveFill3D` and becomes a `map`.\n * - **An empty fill** gives an invisible material (`visible: false`), as an empty 2D fill paints nothing.\n *\n * Fields in `extra` are laid over the result; its `opacity` multiplies the fill's.\n */\nexport function material(fill: readonly FillResolved[], extra: MaterialOptions = {}): Material3D {\n const { type = \"basic\", opacity: extraOpacity, ...rest } = extra as MaterialOptions & { opacity?: number };\n const scale = extraOpacity ?? 1;\n if (fill.length === 0) return { type, ...rest, visible: false } as Material3D;\n const solid = fill.length === 1 ? solidOf(fill[0]) : null;\n if (solid !== null) {\n const [r, g, b] = solid.color;\n return { type, color: [r, g, b, 1], opacity: solid.alpha * scale, ...rest } as Material3D;\n }\n const resolved = resolveFill3D(fill as unknown as Fill3D);\n return {\n type,\n ...(resolved.color !== undefined ? { color: resolved.color } : {}),\n ...(resolved.map !== undefined ? { map: resolved.map } : {}),\n ...(extraOpacity !== undefined ? { opacity: extraOpacity } : {}),\n ...rest,\n } as Material3D;\n}\n\n/** What {@link lines} takes besides the strokes and segments. */\nexport interface LinesOptions {\n /**\n * Draw through solids: `depthTest: false, depthWrite: false`, and blended so it draws after every opaque mesh. For\n * the hidden lines a CAD view shows dashed through the body.\n */\n readonly through?: boolean;\n /**\n * Added to both ends of every segment: a surface's normal times the gap. A line laid on a face needs a gap of at\n * least the camera distance ÷ 2000 (`docs/3d.md`, Depth rule 2); a bar centred on a solid's edge needs none. Leave\n * it out to place the segments yourself.\n */\n readonly lift?: Vec3;\n /** A transform for the whole draw, as `Graphics3D.instances` takes one. */\n readonly transform?: Transform3D;\n}\n\n/** The unit box each bar scales: 1 long on x, 1 by 1 across. */\nexport const BAR: Geometry3D = { type: \"box\", width: 1, height: 1, depth: 1 };\n\n/** The turn that carries +x onto the unit direction `d`. */\nfunction turnOnto(dx: number, dy: number, dz: number): Quaternion {\n // About +x cross d, by the angle between them; straight back along -x turns half way round y.\n if (dx <= -0.9999) return { x: 0, y: 1, z: 0, w: 0 };\n const qy = -dz;\n const qz = dy;\n const qw = 1 + dx;\n const l = Math.hypot(qy, qz, qw);\n return { x: 0, y: qy / l, z: qz / l, w: qw / l };\n}\n\n/** A square bar from `p` to `q`, `w` across, running `extend` past each end. */\nexport function bar(p: Vec3, q: Vec3, w: number, extend = 0): Transform3D {\n const dx = q[0] - p[0];\n const dy = q[1] - p[1];\n const dz = q[2] - p[2];\n const len = Math.hypot(dx, dy, dz) || 1e-9;\n return {\n position: [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2, (p[2] + q[2]) / 2],\n quaternion: turnOnto(dx / len, dy / len, dz / len),\n scale: [len + extend * 2, w, w],\n };\n}\n\n/** The pattern a `dash` repeats, in scene units: an odd list runs twice, as in SVG; `null` for a solid line. */\nfunction dashPattern(dash: readonly number[] | undefined): number[] | null {\n if (dash === undefined || dash.length === 0) return null;\n const units = dash.map((d) => Math.max(0, d) * STROKE_UNIT);\n const pattern = units.length % 2 === 1 ? [...units, ...units] : units;\n return pattern.reduce((sum, d) => sum + d, 0) > 1e-9 ? pattern : null;\n}\n\n/** The stretches `[from, to]` along a segment `length` long that a dash pattern draws, starting `offset` into it. */\nexport function dashes(length: number, pattern: readonly number[], offset = 0): [number, number][] {\n const period = pattern.reduce((sum, d) => sum + d, 0);\n const out: [number, number][] = [];\n if (period <= 0 || length <= 0) return out;\n // Start at the beginning of the period the offset falls in, before the segment.\n let at = -(((offset % period) + period) % period);\n let i = 0;\n const end = length - 1e-9;\n while (at < end) {\n const d = pattern[i % pattern.length]!;\n if (i % 2 === 0 && d > 0) {\n const from = Math.max(0, at);\n const to = Math.min(length, at + d);\n if (to - from > 1e-9) out.push([from, to]);\n }\n at += d;\n i++;\n }\n return out;\n}\n\n/** The bars one stroke layer draws along `segments`. */\nfunction barsFor(stroke: StrokeResolved, segments: readonly Segment3D[], lift: Vec3 | undefined): Transform3D[] {\n const w = stroke.weight * STROKE_UNIT;\n // `round` has no round end to draw on a box, so it ends flush, as `butt` does.\n const extend = stroke.cap === \"square\" ? w / 2 : 0;\n const pattern = dashPattern(stroke.dash);\n const offset = stroke.dashOffset * STROKE_UNIT;\n const out: Transform3D[] = [];\n for (const [a, b] of segments) {\n const p: Vec3 = lift ? [a[0] + lift[0], a[1] + lift[1], a[2] + lift[2]] : a;\n const q: Vec3 = lift ? [b[0] + lift[0], b[1] + lift[1], b[2] + lift[2]] : b;\n const length = Math.hypot(q[0] - p[0], q[1] - p[1], q[2] - p[2]);\n if (length <= 1e-9) continue;\n if (pattern === null) {\n out.push(bar(p, q, w, extend));\n continue;\n }\n const at = (s: number): Vec3 => {\n const t = s / length;\n return [p[0] + (q[0] - p[0]) * t, p[1] + (q[1] - p[1]) * t, p[2] + (q[2] - p[2]) * t];\n };\n for (const [from, to] of dashes(length, pattern, offset)) out.push(bar(at(from), at(to), w, extend));\n }\n return out;\n}\n\n/** The unlit material one stroke layer draws with, or `null` when it would draw nothing. */\nfunction strokeMaterial(stroke: StrokeResolved, through: boolean): Material3D | null {\n const solid = stroke.fill.map(solidOf).find((s) => s !== null) ?? null;\n if (solid === null || solid.alpha <= 0) return null;\n const [r, g, b] = solid.color;\n const blended = solid.alpha < 1 || through;\n return {\n type: \"basic\",\n color: [r, g, b, 1],\n opacity: solid.alpha,\n ...(blended ? { transparent: true, depthWrite: false } : {}),\n ...(through ? { depthTest: false } : {}),\n } as Material3D;\n}\n\n/**\n * Draws `segments` with each layer of `stroke`, one `g3.instances` call of unit boxes per layer, bottom to top.\n *\n * - **`weight`, `dash` and `dashOffset` are thousandths of a scene unit**: weight 5.5 is a 0.0055-wide bar, a CAD\n * hairline on a model a few units across.\n * - **Caps**: `square` runs each bar (and each dash) half the weight past its ends, so outline corners close; `butt`\n * ends flush. `round` ends flush too, as `butt` does: a box has no round end.\n * - **Colour** is the layer's first solid fill, its alpha the bar's `opacity` (below 1 the bars blend and stop writing\n * depth). A layer with no solid fill, or nothing opaque in it, draws nothing; so does an empty `stroke`.\n * - `align`, `join`, markers and the shape of `startCap`/`endCap` are 2D path ideas and are ignored.\n */\nexport function lines(g3: Graphics3D, stroke: readonly StrokeResolved[], segments: readonly Segment3D[], options: LinesOptions = {}): Graphics3D {\n const through = options.through ?? false;\n for (const layer of stroke) {\n if (!(layer.weight > 0)) continue;\n const ink = strokeMaterial(layer, through);\n if (ink === null) continue;\n const bars = barsFor(layer, segments, options.lift);\n if (bars.length === 0) continue;\n g3.instances(BAR, ink, bars, options.transform ? { transform: options.transform } : undefined);\n }\n return g3;\n}\n"],
5
- "mappings": "mvDAGA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,SAAAE,EAAA,gBAAAC,EAAA,QAAAC,EAAA,aAAAC,GAAA,WAAAC,EAAA,UAAAC,GAAA,aAAAC,GAAA,UAAAC,KAcO,IAAMC,GAAQ,CACjB,KAAMC,EAAM,KACZ,OAAQA,EAAM,QAILC,GAAW,CACpB,OAAcA,EAAS,OACvB,SAAgBA,EAAS,UAUhBC,EAAc,KAQ3B,SAASC,EAAQC,EAA+B,CAE5C,GADIA,IAAU,QAAaA,EAAM,OAAS,SACtCA,EAAM,QAAU,OAAW,OAAO,KACtC,IAAMC,EAAQD,EAAM,MACpB,MAAO,CAAE,MAAAC,EAAO,OAAQA,EAAM,CAAC,GAAK,IAAMD,EAAM,SAAW,EAAE,CACjE,CAYM,SAAUE,GAASC,EAA+BC,EAAyB,CAAA,EAAE,CAC/E,GAAM,CAAE,KAAAC,EAAO,QAAS,QAASC,EAAc,GAAGC,CAAI,EAAKH,EACrDI,EAAQF,GAAgB,EAC9B,GAAIH,EAAK,SAAW,EAAG,MA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K4C,EAAKC,EAAMF,EAAQ,UAAY,CAAE,UAAWA,EAAQ,SAAS,EAAK,MAAS,CACjG,CACA,OAAOD,CACX",
6
6
  "names": ["paint3d_exports", "__export", "BAR", "STROKE_UNIT", "bar", "commands", "dashes", "lines", "material", "state", "state", "Types", "commands", "STROKE_UNIT", "solidOf", "layer", "color", "material", "fill", "extra", "type", "extraOpacity", "rest", "scale", "solid", "r", "g", "b", "resolved", "resolveFill3D", "BAR", "turnOnto", "dx", "dy", "dz", "qy", "qz", "qw", "l", "bar", "p", "q", "w", "extend", "len", "dashPattern", "dash", "units", "d", "pattern", "sum", "dashes", "length", "offset", "period", "out", "at", "i", "end", "from", "to", "barsFor", "stroke", "segments", "lift", "a", "s", "t", "strokeMaterial", "through", "blended", "lines", "g3", "options", "ink", "bars"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/document/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAkB,KAAK,UAAU,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAEH,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,MAAM,EACd,MAAM,iCAAiC,CAAC;AAKzC,OAAO,KAAK,EAA0B,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQxC,MAAM,MAAM,eAAe,GAAG,KAAK,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAE5E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;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AAM,EAAE;IAItB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuC;IACjE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IACtD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAoB;IAEnD;;;;OAIG;IACH,OAAO,CAAC,eAAe;IA6BvB,mCAAmC;IACnC,OAAO,CAAC,QAAQ;IAShB,gGAAgG;IAChG,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,kBAAkB;IAW1B,2GAA2G;IAC3G,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,cAAc;IAKtB;;;OAGG;IACH,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,aAAa;CAIxB"}
@@ -6,10 +6,11 @@ import { DENIED_GLOBALS } from "./deny-globals.js";
6
6
  import { getNodeDescriptor } from "./node-decorator.js";
7
7
  import { applyPropEvolution, propEvolutionOf } from "./prop-evolution.js";
8
8
  /**
9
- * Resolve to the host's sdk barrel. The published name comes first; the two after it are earlier unscoped
10
- * names, kept so older scripts still compile.
9
+ * Resolve to the host's sdk barrel. `/v1` is what a custom component imports; the bare name means the latest API,
10
+ * which is v1 too. The last two are earlier unscoped names, kept so older scripts still compile.
11
+ * `@motionscript/sdk/v1/component` is not here: like `/component`, it links only through `modules`.
11
12
  */
12
- const SDK_SPECIFIERS = ["@motionscript/sdk", "motionscript", "motion-script"];
13
+ const SDK_SPECIFIERS = ["@motionscript/sdk/v1", "@motionscript/sdk", "motionscript", "motion-script"];
13
14
  /**
14
15
  * An instance, not module-scope tables: what a document can name is a property of the engine opening it, so
15
16
  * two engines in one process disagree freely.
@@ -313,7 +314,7 @@ export class Registry {
313
314
  return sdk;
314
315
  if (modules && Object.hasOwn(modules, specifier))
315
316
  return modules[specifier];
316
- const available = ["@motionscript/sdk", ...Object.keys(modules ?? {})];
317
+ const available = ["@motionscript/sdk/v1", ...Object.keys(modules ?? {})];
317
318
  throw new Error(`"${specifier}" isn't available to a custom node. It can require ` +
318
319
  `${available.map((s) => `"${s}"`).join(", ")}; a host supplies more through \`dynamicNodes.modules\`.`);
319
320
  };
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/document/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAuB,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,cAAc,EAA8C,MAAM,2BAA2B,CAAC;AACvG,OAAO,EACH,mBAAmB,GAItB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIvE;;;GAGG;AACH,MAAM,cAAc,GAAsB,CAAC,mBAAmB,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;AAuIjG;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IACjB,8EAA8E;IAC9E,MAAM,CAAU,WAAW,GAAG,GAAG,CAAC;IAEzB,MAAM,CAAU;IAEzB,YAAY,UAA2B,EAAE;QACrC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC;QACtC,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK;YAAE,eAAe,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/B,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK;gBAAE,IAA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BAAE,OAAO,SAAS,CAAC;gBACrC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;oBAClE,CAAC,CAAC,QAAQ;oBACV,CAAC,CAAC,QAAQ,CAAC;YACnB,OAAO,CAAC,CAAC,OAAO,SAAS,CAAC;QAC9B,CAAC;IACL,CAAC;IAEO,aAAa,CAAC,IAAuC;QACzD,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5B,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;IAC/F,CAAC","sourcesContent":["import type { Node, NodeDimension } from \"@/components/trees/node/node\";\nimport type { Command, CommandArgs } from \"@/tween/command\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport { getPropertyMeta, type PropertyEditor } from \"@/attributes/properties/decorator\";\nimport { getCommandMeta, type CommandArg, type CommandArgDescriptor } from \"@/tween/command-decorator\";\nimport {\n normalizeShaderPack,\n type EffectShader,\n type FillShader,\n type Shader,\n} from \"@/attributes/shape/shaders/pack\";\nimport { installBuiltins } from \"./builtins\";\nimport { DENIED_GLOBALS } from \"./deny-globals\";\nimport { getNodeDescriptor } from \"./node-decorator\";\nimport { applyPropEvolution, propEvolutionOf } from \"./prop-evolution\";\nimport type { NodePropertyDescriptor, NodeTypeDescriptor } from \"./node-descriptor\";\nimport type { NodeSpec } from \"./types\";\n\n/**\n * Resolve to the host's sdk barrel. The published name comes first; the two after it are earlier unscoped\n * names, kept so older scripts still compile.\n */\nconst SDK_SPECIFIERS: readonly string[] = [\"@motionscript/sdk\", \"motionscript\", \"motion-script\"];\n\nexport type NodeConstructor = new (props?: Record<string, unknown>) => Node;\n\nexport type NodeTypeMap = Record<string, NodeConstructor>;\n\nexport type ShaderPackMap = Record<string, unknown>;\n\n/**\n * Called once per compile, in timeline order, with `target` already in the state the previous command left:\n * that fixes the command's `from` and makes `Command.at(t)` pure thereafter.\n */\nexport type CommandFactory = (\n target: Node,\n args: Record<string, unknown>,\n duration: number,\n easing?: EasingFunction,\n) => Command<Record<string, unknown>>;\n\n/**\n * A handle, not the cell, so a command cannot subscribe to it, rebind it or hold it past the build: each would\n * stop it being a pure function of `t`.\n */\nexport interface VariableTarget {\n readonly id: string;\n get(): unknown;\n set(value: unknown): void;\n /** A command may use a different lerp when its args ask (`variableTo` does). */\n readonly lerp: VariableLerp;\n}\n\n/** Same contract as {@link CommandFactory}, against a variable instead of a node. */\nexport type VariableCommandFactory = (\n target: VariableTarget,\n args: Record<string, unknown>,\n duration: number,\n easing?: EasingFunction,\n) => Command<Record<string, unknown>>;\n\n/** Widened to `unknown`: a variable's type is a fact of the document, not of a class. */\nexport type VariableLerp = (from: unknown, to: unknown, t: number) => unknown;\n\n/**\n * `scope` picks the table `CommandSpec.targetId` is looked up in, so a variable command reuses the field a\n * node command uses.\n */\nexport type CommandTypeEntry =\n | {\n key: string;\n scope: \"node\";\n factory: CommandFactory;\n /**\n * Declared by the paint commands, one key each. Absent for `to`/`set`, whose args are the props diff.\n */\n args?: readonly CommandArgDescriptor[];\n /**\n * Args are a props diff that reaches `set()`, so an expression compiles to a binding. A flag, not a name\n * check: `to` tweens towards a value, and binding a formula there would interpolate towards `NaN`.\n */\n binds?: boolean;\n /**\n * The method it runs on its target (the paint commands call the node's own `fillTo`). A type without it, or\n * one that withdrew it, does not take the command ({@link Registry.takesCommand}).\n */\n method?: string;\n }\n | {\n key: string;\n scope: \"variable\";\n factory: VariableCommandFactory;\n };\n\n/**\n * Built from the whole prototype chain, so a `Card` extending `Rect` answers to `fadeTo` as it does to\n * `.fadeTo()`. Inherited entries are copied into each type, so nothing collides.\n */\nexport interface NodeTypeRecord {\n key: string;\n ctor: NodeConstructor;\n commands: ReadonlyMap<string, NodeCommandEntry>;\n /** Always present, however the type was registered. */\n descriptor: NodeTypeDescriptor;\n}\n\nexport interface NodeCommandEntry {\n method: string;\n /** A bare name normalises to `{ key, kind: \"unknown\" }`. */\n args: readonly CommandArgDescriptor[];\n /**\n * Present and true for an entrance (`CommandMeta.entrance`), so a host can offer one when the node is added.\n */\n entrance?: true;\n}\n\n/**\n * Host-supplied: `core` has no compiler dependency and cannot import the `@motionscript/sdk` barrel (that\n * package depends on `core`).\n */\nexport interface DynamicNodeConfig {\n /**\n * Must be the host's already-loaded sdk instance, or `instanceof` silently fails against it. The earlier\n * unscoped specifiers resolve to the same object.\n */\n sdk: Record<string, unknown>;\n /**\n * Consulted after the sdk specifiers, so they cannot be shadowed. Each must be the host's loaded instance, for\n * the same `instanceof` reason.\n */\n modules?: Readonly<Record<string, unknown>>;\n /** Host-injected, never bundled. */\n compile: (source: string) => Promise<string>;\n}\n\nexport interface RegistryOptions {\n /**\n * A record names the key outright, which asserts the class agrees: a rename on either side throws here rather\n * than surfacing as an unknown type at render.\n */\n nodes?: NodeTypeMap | readonly NodeConstructor[];\n shaders?: ShaderPackMap;\n lerps?: Record<string, VariableLerp>;\n eases?: Record<string, EasingFunction>;\n dynamicNodes?: DynamicNodeConfig;\n /**\n * Fail the build on an unknown node type or command, instead of standing in a placeholder and recording it in\n * `buildErrors`.\n */\n strict?: boolean;\n /**\n * Only for a test asserting on the seeding, or a deliberately tiny vocabulary: a document naming `\"rect\"` will\n * not compile without it.\n */\n builtins?: boolean;\n}\n\n/**\n * An instance, not module-scope tables: what a document can name is a property of the engine opening it, so\n * two engines in one process disagree freely.\n *\n * Commands are per node type (a method on a class); only those that must resolve without a node\n * (variable-scoped, generic prop writers) sit in a table of their own.\n */\nexport class Registry {\n /** Ceiling, so an import cannot evict a workspace's own shaders by volume. */\n static readonly MAX_SHADERS = 512;\n\n readonly strict: boolean;\n\n constructor(options: RegistryOptions = {}) {\n this._dynamicNodes = options.dynamicNodes;\n this.strict = options.strict === true;\n if (options.builtins !== false) installBuiltins(this);\n if (Array.isArray(options.nodes)) {\n for (const ctor of options.nodes) this.addNode(ctor);\n } else {\n for (const [key, ctor] of Object.entries(options.nodes ?? {})) this.addNode(key, ctor);\n }\n for (const [key, lerp] of Object.entries(options.lerps ?? {})) this.addLerp(key, lerp);\n for (const [key, ease] of Object.entries(options.eases ?? {})) this.addEase(key, ease);\n for (const [key, pack] of Object.entries(options.shaders ?? {})) this.addShader(key, pack);\n }\n\n /**\n * Register a node class with its commands and descriptor. Commands come off the class's `command()` methods,\n * read through an object over the prototype so no constructor runs (it may expect props, build children or\n * touch a clock).\n *\n * Re-registering the same class under a key is a no-op (hot reload, a duplicated dependency); a different\n * class throws, since a document would render differently by registration order. `replace: true` opts out, for\n * a recompiled node (see {@link addNodeFromSource}).\n */\n addNode(ctor: NodeConstructor, options?: { replace?: boolean }): this;\n addNode(type: string | NodeTypeDescriptor, ctor: NodeConstructor, options?: { replace?: boolean }): this;\n addNode(\n type: string | NodeTypeDescriptor | NodeConstructor,\n ctorOrOptions?: NodeConstructor | { replace?: boolean },\n maybeOptions?: { replace?: boolean },\n ): this {\n const isTwoArgForm = typeof ctorOrOptions === \"function\";\n // A component (`component2d(...)`) registers as the node class it generated.\n const given = (isTwoArgForm ? ctorOrOptions : type) as NodeConstructor & { node?: NodeConstructor };\n const cls = typeof given.node === \"function\" ? given.node : given;\n const options = isTwoArgForm ? maybeOptions : ctorOrOptions as { replace?: boolean } | undefined;\n const declared = isTwoArgForm ? type as string | NodeTypeDescriptor : getNodeDescriptor(cls);\n if (declared === undefined) {\n throw new Error(\n `${cls.name || \"The class\"} is no component, so it has no document key. ` +\n `Make it with component2d({ key }), or register it explicitly: addNode(\"myKey\", TheClass).`,\n );\n }\n const descriptor: NodeTypeDescriptor = typeof declared === \"string\" ? { key: declared } : declared;\n const key = descriptor.key;\n\n const existing = this._nodes.get(key);\n if (existing) {\n if (existing.ctor === cls) return this;\n if (!options?.replace) {\n throw new Error(\n `Node type \"${key}\" is already registered to a different class ` +\n `(${existing.ctor.name} vs ${cls.name}). Keys must be unique — a document ` +\n `naming this type would otherwise resolve differently depending on registration order.`,\n );\n }\n }\n\n const commands = new Map<string, NodeCommandEntry>();\n for (const meta of getCommandMeta(Object.create(cls.prototype) as object)) {\n commands.set(meta.key, {\n method: meta.method,\n args: this._describeArgs(meta.args),\n ...(meta.entrance ? { entrance: true as const } : {}),\n });\n }\n\n this._nodes.set(key, {\n key,\n ctor: cls,\n commands,\n // Derived, never declared: see `NodeTypeDescriptor.properties`.\n descriptor: this._describeEvolution(cls, {\n ...descriptor,\n dimension: this._describeDimension(cls),\n holds: this._describeHolds(cls),\n properties: this._describeProperties(cls),\n }),\n });\n return this;\n }\n\n /**\n * The script must `export default` a component whose `key` supplies the registry key, as {@link addNode} reads\n * it: one way to name a dynamic node's key. Requires `dynamicNodes`; `core` only calls the host-supplied\n * `compile` and links the result.\n */\n async addNodeFromSource(source: string, options?: { replace?: boolean }): Promise<NodeConstructor> {\n if (!this._dynamicNodes) {\n throw new Error(\n \"addNodeFromSource needs `dynamicNodes: { sdk, compile }` on the Registry constructor.\",\n );\n }\n const js = await this._dynamicNodes.compile(source);\n const ctor = this._evalNodeModule(js);\n this.addNode(ctor, options);\n return ctor;\n }\n\n node(key: string): NodeTypeRecord | undefined {\n return this._nodes.get(key);\n }\n\n hasNode(key: string): boolean {\n return this._nodes.has(key);\n }\n\n nodeKeys(): string[] {\n return [...this._nodes.keys()].sort();\n }\n\n describe(key: string): NodeTypeDescriptor | undefined {\n return this._nodes.get(key)?.descriptor;\n }\n\n /**\n * The props pass through the type's evolution first (`migrateNodeProps`).\n *\n * `props` overrides the spec's own so the timeline can leave expression-bound props out of the constructor,\n * which reads raw props for defaults like size, and `set()` them after. The spec's `id` outranks both, so\n * {@link Node.id} is the document's identity. `key` rides along only when the row has one: `applyEditorStates`\n * keys on {@link Node.key}, and an absent row key must not overwrite one passed in `props`.\n */\n instantiate(spec: NodeSpec, props?: Record<string, unknown>): Node {\n const record = this._nodes.get(spec.type);\n if (!record) {\n throw new Error(\n `Unknown node type \"${spec.type}\" (node ${spec.id}). ` +\n `This registry knows: ${this.nodeKeys().join(\", \") || \"nothing\"}.`,\n );\n }\n const evolution = propEvolutionOf(record.ctor);\n const given = props ?? spec.props;\n return new record.ctor({\n ...(evolution ? applyPropEvolution(evolution, given).props : given),\n id: spec.id,\n ...(spec.key !== undefined && { key: spec.key }),\n });\n }\n\n /** Same uniqueness rule as {@link addNode}. */\n addCommand(\n key: string,\n factory: CommandFactory,\n options?: { binds?: boolean; args?: readonly CommandArg[]; method?: string },\n ): this {\n if (this._claimed(key, factory)) return this;\n this._commands.set(key, {\n key,\n scope: \"node\",\n factory,\n ...(options?.args ? { args: this._describeArgs(options.args) } : {}),\n binds: options?.binds,\n ...(options?.method ? { method: options.method } : {}),\n });\n return this;\n }\n\n /**\n * A host's seam for its own variable commands (a spring, a wiggle); the returned {@link Command} must be a\n * pure function of `t`.\n */\n addVariableCommand(key: string, factory: VariableCommandFactory): this {\n if (this._claimed(key, factory)) return this;\n this._commands.set(key, { key, scope: \"variable\", factory });\n return this;\n }\n\n command(key: string): CommandTypeEntry | undefined {\n return this._commands.get(key);\n }\n\n /**\n * Dispatches by calling the named method, never by testing against a class: a forked component is a different\n * class carrying the same source, so `instanceof` against the original is false.\n */\n nodeCommand(nodeTypeKey: string, commandKey: string): CommandFactory | undefined {\n const record = this._nodes.get(nodeTypeKey);\n const entry = record?.commands.get(commandKey);\n if (!entry) return undefined;\n return (target, args, duration, easing) => {\n const fn = (target as unknown as Record<string, unknown>)[entry.method];\n if (typeof fn !== \"function\") {\n throw new Error(\n `Command \"${commandKey}\" needs a \"${entry.method}\" method on ` +\n `${target.constructor.name}, which has none.`,\n );\n }\n const data: Record<string, unknown> = {};\n for (const arg of entry.args) data[arg.key] = args[arg.key];\n return (fn as (args: CommandArgs) => Command<Record<string, unknown>>)\n .call(target, { data, duration, easing });\n };\n }\n\n /**\n * A node takes what its own table publishes, plus node-less commands that act on a node (`to`, `fillTo`)\n * unless the method they run is one the type lacks.\n */\n takesCommand(nodeTypeKey: string, commandKey: string): boolean {\n const record = this._nodes.get(nodeTypeKey);\n if (!record) return false;\n if (record.commands.has(commandKey)) return true;\n const global = this._commands.get(commandKey);\n if (global?.scope !== \"node\") return false;\n if (global.method === undefined) return true;\n return typeof (record.ctor.prototype as Record<string, unknown>)[global.method] === \"function\";\n }\n\n commandKeys(nodeTypeKey?: string): string[] {\n const keys = nodeTypeKey === undefined\n ? this._commands.keys()\n : this._nodes.get(nodeTypeKey)?.commands.keys() ?? [];\n return [...keys].sort();\n }\n\n /** Same uniqueness rule as {@link addNode}. */\n addLerp(key: string, lerp: VariableLerp): this {\n const existing = this._lerps.get(key);\n if (existing && existing !== lerp) {\n throw new Error(\n `Variable lerp \"${key}\" is already registered to a different function. Keys must be unique.`,\n );\n }\n this._lerps.set(key, lerp);\n return this;\n }\n\n lerp(key: string): VariableLerp | undefined {\n return this._lerps.get(key);\n }\n\n lerpKeys(): string[] {\n return [...this._lerps.keys()].sort();\n }\n\n /**\n * A numeric variable with no declared lerp interpolates; anything else snaps at the end. Guessing a structural\n * lerp off one sample would blend objects that merely share an `x` key.\n */\n requireLerp(key: string | undefined, value: unknown, where: string): VariableLerp {\n const resolved = key ?? (typeof value === \"number\" ? \"number\" : \"step\");\n const lerp = this._lerps.get(resolved);\n if (!lerp) {\n throw new Error(\n `Unknown variable lerp \"${resolved}\" (${where}). ` +\n `Registered: ${this.lerpKeys().join(\", \") || \"none\"}.`,\n );\n }\n return lerp;\n }\n\n /** Referenced as `{ kind: \"custom\", args: key }`. Same uniqueness rule as {@link addNode}. */\n addEase(key: string, ease: EasingFunction): this {\n const existing = this._eases.get(key);\n if (existing && existing !== ease) {\n throw new Error(\n `Ease \"${key}\" is already registered to a different function. Keys must be unique.`,\n );\n }\n this._eases.set(key, ease);\n return this;\n }\n\n ease(key: string): EasingFunction | undefined {\n return this._eases.get(key);\n }\n\n easeKeys(): string[] {\n return [...this._eases.keys()].sort();\n }\n\n /**\n * The key is an argument, not a pack field (as in {@link addNode}), so a file stays portable between projects;\n * a pack's own `id` is provenance. The pack is normalised on the way in.\n *\n * Re-registering an equal pack is a no-op: the same file imported twice yields two equal objects, and throwing\n * there would defeat the uniqueness rule. `replace: true` overwrites with a different pack, for a live-edited\n * shader.\n */\n addShader(key: string, pack: unknown, options?: { replace?: boolean }): Shader {\n const normalized = normalizeShaderPack(pack);\n const existing = this._shaders.get(key);\n if (existing) {\n if (\n existing.scope === normalized.scope\n && existing.source === normalized.source\n && existing.name === normalized.name\n ) return existing;\n if (!options?.replace) {\n throw new Error(\n `Shader \"${key}\" is already registered to a different pack ` +\n `(\"${existing.name}\" vs \"${normalized.name}\"). Keys must be unique — a document ` +\n `naming this shader would otherwise resolve differently depending on registration order.`,\n );\n }\n } else if (this._shaders.size >= Registry.MAX_SHADERS) {\n throw new Error(\n `Cannot register shader \"${key}\": the ${Registry.MAX_SHADERS}-shader ceiling is reached.`,\n );\n }\n this._shaders.set(key, normalized);\n return normalized;\n }\n\n shader(key: string): Shader | undefined {\n return this._shaders.get(key);\n }\n\n /**\n * The typed accessors deliver the compile error the union promises: {@link shader} returns `Shader`, and an\n * unnarrowed call site could pass an effect pack to `Fills.shader`.\n */\n fillShader(key: string): FillShader | undefined {\n const pack = this._shaders.get(key);\n return pack?.scope === \"fill\" ? pack : undefined;\n }\n\n effectShader(key: string): EffectShader | undefined {\n const pack = this._shaders.get(key);\n return pack?.scope === \"effect\" ? pack : undefined;\n }\n\n shaderKeys(): string[] {\n return [...this._shaders.keys()].sort();\n }\n\n private readonly _nodes = new Map<string, NodeTypeRecord>();\n private readonly _commands = new Map<string, CommandTypeEntry>();\n private readonly _lerps = new Map<string, VariableLerp>();\n private readonly _eases = new Map<string, EasingFunction>();\n private readonly _shaders = new Map<string, Shader>();\n private readonly _dynamicNodes?: DynamicNodeConfig;\n\n /**\n * `new Function` in-realm, never a blob module or a worker (see {@link DynamicNodeConfig} and\n * `deny-globals.ts`). `require()` is locked to the sdk specifiers and the host's `modules`, own keys only so\n * `require(\"constructor\")` cannot reach `Object`. No relative imports: a dynamic node is one script.\n */\n private _evalNodeModule(js: string): NodeConstructor {\n const { sdk, modules } = this._dynamicNodes!;\n const require = (specifier: string): unknown => {\n if (SDK_SPECIFIERS.includes(specifier)) return sdk;\n if (modules && Object.hasOwn(modules, specifier)) return modules[specifier];\n const available = [\"@motionscript/sdk\", ...Object.keys(modules ?? {})];\n throw new Error(\n `\"${specifier}\" isn't available to a custom node. It can require ` +\n `${available.map((s) => `\"${s}\"`).join(\", \")}; a host supplies more through \\`dynamicNodes.modules\\`.`,\n );\n };\n const mod = { exports: {} as Record<string, unknown> };\n // The script runs one function in from the parameters that deny the\n // globals, so its own top-level `const frames` shadows a denied name\n // instead of redeclaring a parameter. A body that closes that function\n // early is still inside the outer one, which denies the same names.\n const factory = new Function(\n \"exports\", \"require\", \"module\", ...DENIED_GLOBALS,\n `\"use strict\";\\nreturn function () {\\n${js}\\n};`,\n );\n factory(mod.exports, require, mod)();\n\n const ctor = mod.exports.default as (NodeConstructor & { node?: NodeConstructor }) | undefined;\n if (typeof ctor !== \"function\" || getNodeDescriptor(typeof ctor.node === \"function\" ? ctor.node : ctor) === undefined) {\n throw new Error(\"This script must `export default` a component: `component2d({ key: \\\"…\\\", … })`.\");\n }\n return ctor;\n }\n\n /** See {@link addNode} for why. */\n private _claimed(key: string, factory: CommandFactory | VariableCommandFactory): boolean {\n const existing = this._commands.get(key);\n if (!existing) return false;\n if (existing.factory === factory) return true;\n throw new Error(\n `Command type \"${key}\" is already registered to a different factory. Keys must be unique.`,\n );\n }\n\n /** The whole prototype chain, so a component publishes the box its tree's base declares too. */\n private _describeProperties(ctor: NodeConstructor): Record<string, NodePropertyDescriptor> {\n const out: Record<string, NodePropertyDescriptor> = {};\n for (const meta of getPropertyMeta(Object.create(ctor.prototype) as object)) {\n const editor: PropertyEditor = meta.editor ?? {};\n out[meta.key] = {\n ...editor,\n kind: editor.kind ?? this._inferKind(meta.default),\n ...(meta.default !== undefined ? { default: meta.default } : {}),\n };\n }\n return out;\n }\n\n private _describeEvolution(ctor: NodeConstructor, descriptor: NodeTypeDescriptor): NodeTypeDescriptor {\n const evolution = propEvolutionOf(ctor);\n if (!evolution) return descriptor;\n const properties = { ...descriptor.properties };\n for (const [key, message] of Object.entries(evolution.deprecated)) {\n if (properties[key]) properties[key] = { ...properties[key], deprecated: message };\n }\n const renamed = Object.keys(evolution.renamed).length > 0 ? { renamed: { ...evolution.renamed } } : {};\n return { ...descriptor, ...renamed, properties };\n }\n\n /** `Node.dimension` is a getter so it answers from the prototype, before any field initializer has run. */\n private _describeDimension(ctor: NodeConstructor): NodeDimension | undefined {\n const dimension = (Object.create(ctor.prototype) as Node).dimension;\n return typeof dimension === \"string\" ? dimension : undefined;\n }\n\n private _describeHolds(ctor: NodeConstructor): readonly NodeDimension[] | undefined {\n const trees = (Object.create(ctor.prototype) as Partial<Node>)._childTrees;\n return Array.isArray(trees) ? [...trees] : undefined;\n }\n\n /**\n * A function default is a reactive binding, not a value, so it says nothing about the control; those declare a\n * kind or take \"unknown\", which a host draws read-only.\n */\n private _inferKind(value: unknown): string {\n switch (typeof value) {\n case \"number\": return \"number\";\n case \"string\": return \"text\";\n case \"boolean\": return \"boolean\";\n case \"object\":\n if (value === null) return \"unknown\";\n return Array.isArray(value) && value.every(v => typeof v === \"number\")\n ? \"vector\"\n : \"object\";\n default: return \"unknown\";\n }\n }\n\n private _describeArgs(args: readonly CommandArg[] | undefined): CommandArgDescriptor[] {\n return (args ?? []).map((arg) =>\n typeof arg === \"string\" ? { key: arg, kind: \"unknown\" } : { kind: \"unknown\", ...arg });\n }\n}\n"]}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/document/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAuB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IAAuC;QACzD,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5B,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC;IAC/F,CAAC","sourcesContent":["import type { Node, NodeDimension } from \"@/components/trees/node/node\";\nimport type { Command, CommandArgs } from \"@/tween/command\";\nimport type { EasingFunction } from \"@/tween/ease/type\";\nimport { getPropertyMeta, type PropertyEditor } from \"@/attributes/properties/decorator\";\nimport { getCommandMeta, type CommandArg, type CommandArgDescriptor } from \"@/tween/command-decorator\";\nimport {\n normalizeShaderPack,\n type EffectShader,\n type FillShader,\n type Shader,\n} from \"@/attributes/shape/shaders/pack\";\nimport { installBuiltins } from \"./builtins\";\nimport { DENIED_GLOBALS } from \"./deny-globals\";\nimport { getNodeDescriptor } from \"./node-decorator\";\nimport { applyPropEvolution, propEvolutionOf } from \"./prop-evolution\";\nimport type { NodePropertyDescriptor, NodeTypeDescriptor } from \"./node-descriptor\";\nimport type { NodeSpec } from \"./types\";\n\n/**\n * Resolve to the host's sdk barrel. `/v1` is what a custom component imports; the bare name means the latest API,\n * which is v1 too. The last two are earlier unscoped names, kept so older scripts still compile.\n * `@motionscript/sdk/v1/component` is not here: like `/component`, it links only through `modules`.\n */\nconst SDK_SPECIFIERS: readonly string[] = [\"@motionscript/sdk/v1\", \"@motionscript/sdk\", \"motionscript\", \"motion-script\"];\n\nexport type NodeConstructor = new (props?: Record<string, unknown>) => Node;\n\nexport type NodeTypeMap = Record<string, NodeConstructor>;\n\nexport type ShaderPackMap = Record<string, unknown>;\n\n/**\n * Called once per compile, in timeline order, with `target` already in the state the previous command left:\n * that fixes the command's `from` and makes `Command.at(t)` pure thereafter.\n */\nexport type CommandFactory = (\n target: Node,\n args: Record<string, unknown>,\n duration: number,\n easing?: EasingFunction,\n) => Command<Record<string, unknown>>;\n\n/**\n * A handle, not the cell, so a command cannot subscribe to it, rebind it or hold it past the build: each would\n * stop it being a pure function of `t`.\n */\nexport interface VariableTarget {\n readonly id: string;\n get(): unknown;\n set(value: unknown): void;\n /** A command may use a different lerp when its args ask (`variableTo` does). */\n readonly lerp: VariableLerp;\n}\n\n/** Same contract as {@link CommandFactory}, against a variable instead of a node. */\nexport type VariableCommandFactory = (\n target: VariableTarget,\n args: Record<string, unknown>,\n duration: number,\n easing?: EasingFunction,\n) => Command<Record<string, unknown>>;\n\n/** Widened to `unknown`: a variable's type is a fact of the document, not of a class. */\nexport type VariableLerp = (from: unknown, to: unknown, t: number) => unknown;\n\n/**\n * `scope` picks the table `CommandSpec.targetId` is looked up in, so a variable command reuses the field a\n * node command uses.\n */\nexport type CommandTypeEntry =\n | {\n key: string;\n scope: \"node\";\n factory: CommandFactory;\n /**\n * Declared by the paint commands, one key each. Absent for `to`/`set`, whose args are the props diff.\n */\n args?: readonly CommandArgDescriptor[];\n /**\n * Args are a props diff that reaches `set()`, so an expression compiles to a binding. A flag, not a name\n * check: `to` tweens towards a value, and binding a formula there would interpolate towards `NaN`.\n */\n binds?: boolean;\n /**\n * The method it runs on its target (the paint commands call the node's own `fillTo`). A type without it, or\n * one that withdrew it, does not take the command ({@link Registry.takesCommand}).\n */\n method?: string;\n }\n | {\n key: string;\n scope: \"variable\";\n factory: VariableCommandFactory;\n };\n\n/**\n * Built from the whole prototype chain, so a `Card` extending `Rect` answers to `fadeTo` as it does to\n * `.fadeTo()`. Inherited entries are copied into each type, so nothing collides.\n */\nexport interface NodeTypeRecord {\n key: string;\n ctor: NodeConstructor;\n commands: ReadonlyMap<string, NodeCommandEntry>;\n /** Always present, however the type was registered. */\n descriptor: NodeTypeDescriptor;\n}\n\nexport interface NodeCommandEntry {\n method: string;\n /** A bare name normalises to `{ key, kind: \"unknown\" }`. */\n args: readonly CommandArgDescriptor[];\n /**\n * Present and true for an entrance (`CommandMeta.entrance`), so a host can offer one when the node is added.\n */\n entrance?: true;\n}\n\n/**\n * Host-supplied: `core` has no compiler dependency and cannot import the `@motionscript/sdk` barrel (that\n * package depends on `core`).\n */\nexport interface DynamicNodeConfig {\n /**\n * Must be the host's already-loaded sdk instance, or `instanceof` silently fails against it. The earlier\n * unscoped specifiers resolve to the same object.\n */\n sdk: Record<string, unknown>;\n /**\n * Consulted after the sdk specifiers, so they cannot be shadowed. Each must be the host's loaded instance, for\n * the same `instanceof` reason.\n */\n modules?: Readonly<Record<string, unknown>>;\n /** Host-injected, never bundled. */\n compile: (source: string) => Promise<string>;\n}\n\nexport interface RegistryOptions {\n /**\n * A record names the key outright, which asserts the class agrees: a rename on either side throws here rather\n * than surfacing as an unknown type at render.\n */\n nodes?: NodeTypeMap | readonly NodeConstructor[];\n shaders?: ShaderPackMap;\n lerps?: Record<string, VariableLerp>;\n eases?: Record<string, EasingFunction>;\n dynamicNodes?: DynamicNodeConfig;\n /**\n * Fail the build on an unknown node type or command, instead of standing in a placeholder and recording it in\n * `buildErrors`.\n */\n strict?: boolean;\n /**\n * Only for a test asserting on the seeding, or a deliberately tiny vocabulary: a document naming `\"rect\"` will\n * not compile without it.\n */\n builtins?: boolean;\n}\n\n/**\n * An instance, not module-scope tables: what a document can name is a property of the engine opening it, so\n * two engines in one process disagree freely.\n *\n * Commands are per node type (a method on a class); only those that must resolve without a node\n * (variable-scoped, generic prop writers) sit in a table of their own.\n */\nexport class Registry {\n /** Ceiling, so an import cannot evict a workspace's own shaders by volume. */\n static readonly MAX_SHADERS = 512;\n\n readonly strict: boolean;\n\n constructor(options: RegistryOptions = {}) {\n this._dynamicNodes = options.dynamicNodes;\n this.strict = options.strict === true;\n if (options.builtins !== false) installBuiltins(this);\n if (Array.isArray(options.nodes)) {\n for (const ctor of options.nodes) this.addNode(ctor);\n } else {\n for (const [key, ctor] of Object.entries(options.nodes ?? {})) this.addNode(key, ctor);\n }\n for (const [key, lerp] of Object.entries(options.lerps ?? {})) this.addLerp(key, lerp);\n for (const [key, ease] of Object.entries(options.eases ?? {})) this.addEase(key, ease);\n for (const [key, pack] of Object.entries(options.shaders ?? {})) this.addShader(key, pack);\n }\n\n /**\n * Register a node class with its commands and descriptor. Commands come off the class's `command()` methods,\n * read through an object over the prototype so no constructor runs (it may expect props, build children or\n * touch a clock).\n *\n * Re-registering the same class under a key is a no-op (hot reload, a duplicated dependency); a different\n * class throws, since a document would render differently by registration order. `replace: true` opts out, for\n * a recompiled node (see {@link addNodeFromSource}).\n */\n addNode(ctor: NodeConstructor, options?: { replace?: boolean }): this;\n addNode(type: string | NodeTypeDescriptor, ctor: NodeConstructor, options?: { replace?: boolean }): this;\n addNode(\n type: string | NodeTypeDescriptor | NodeConstructor,\n ctorOrOptions?: NodeConstructor | { replace?: boolean },\n maybeOptions?: { replace?: boolean },\n ): this {\n const isTwoArgForm = typeof ctorOrOptions === \"function\";\n // A component (`component2d(...)`) registers as the node class it generated.\n const given = (isTwoArgForm ? ctorOrOptions : type) as NodeConstructor & { node?: NodeConstructor };\n const cls = typeof given.node === \"function\" ? given.node : given;\n const options = isTwoArgForm ? maybeOptions : ctorOrOptions as { replace?: boolean } | undefined;\n const declared = isTwoArgForm ? type as string | NodeTypeDescriptor : getNodeDescriptor(cls);\n if (declared === undefined) {\n throw new Error(\n `${cls.name || \"The class\"} is no component, so it has no document key. ` +\n `Make it with component2d({ key }), or register it explicitly: addNode(\"myKey\", TheClass).`,\n );\n }\n const descriptor: NodeTypeDescriptor = typeof declared === \"string\" ? { key: declared } : declared;\n const key = descriptor.key;\n\n const existing = this._nodes.get(key);\n if (existing) {\n if (existing.ctor === cls) return this;\n if (!options?.replace) {\n throw new Error(\n `Node type \"${key}\" is already registered to a different class ` +\n `(${existing.ctor.name} vs ${cls.name}). Keys must be unique — a document ` +\n `naming this type would otherwise resolve differently depending on registration order.`,\n );\n }\n }\n\n const commands = new Map<string, NodeCommandEntry>();\n for (const meta of getCommandMeta(Object.create(cls.prototype) as object)) {\n commands.set(meta.key, {\n method: meta.method,\n args: this._describeArgs(meta.args),\n ...(meta.entrance ? { entrance: true as const } : {}),\n });\n }\n\n this._nodes.set(key, {\n key,\n ctor: cls,\n commands,\n // Derived, never declared: see `NodeTypeDescriptor.properties`.\n descriptor: this._describeEvolution(cls, {\n ...descriptor,\n dimension: this._describeDimension(cls),\n holds: this._describeHolds(cls),\n properties: this._describeProperties(cls),\n }),\n });\n return this;\n }\n\n /**\n * The script must `export default` a component whose `key` supplies the registry key, as {@link addNode} reads\n * it: one way to name a dynamic node's key. Requires `dynamicNodes`; `core` only calls the host-supplied\n * `compile` and links the result.\n */\n async addNodeFromSource(source: string, options?: { replace?: boolean }): Promise<NodeConstructor> {\n if (!this._dynamicNodes) {\n throw new Error(\n \"addNodeFromSource needs `dynamicNodes: { sdk, compile }` on the Registry constructor.\",\n );\n }\n const js = await this._dynamicNodes.compile(source);\n const ctor = this._evalNodeModule(js);\n this.addNode(ctor, options);\n return ctor;\n }\n\n node(key: string): NodeTypeRecord | undefined {\n return this._nodes.get(key);\n }\n\n hasNode(key: string): boolean {\n return this._nodes.has(key);\n }\n\n nodeKeys(): string[] {\n return [...this._nodes.keys()].sort();\n }\n\n describe(key: string): NodeTypeDescriptor | undefined {\n return this._nodes.get(key)?.descriptor;\n }\n\n /**\n * The props pass through the type's evolution first (`migrateNodeProps`).\n *\n * `props` overrides the spec's own so the timeline can leave expression-bound props out of the constructor,\n * which reads raw props for defaults like size, and `set()` them after. The spec's `id` outranks both, so\n * {@link Node.id} is the document's identity. `key` rides along only when the row has one: `applyEditorStates`\n * keys on {@link Node.key}, and an absent row key must not overwrite one passed in `props`.\n */\n instantiate(spec: NodeSpec, props?: Record<string, unknown>): Node {\n const record = this._nodes.get(spec.type);\n if (!record) {\n throw new Error(\n `Unknown node type \"${spec.type}\" (node ${spec.id}). ` +\n `This registry knows: ${this.nodeKeys().join(\", \") || \"nothing\"}.`,\n );\n }\n const evolution = propEvolutionOf(record.ctor);\n const given = props ?? spec.props;\n return new record.ctor({\n ...(evolution ? applyPropEvolution(evolution, given).props : given),\n id: spec.id,\n ...(spec.key !== undefined && { key: spec.key }),\n });\n }\n\n /** Same uniqueness rule as {@link addNode}. */\n addCommand(\n key: string,\n factory: CommandFactory,\n options?: { binds?: boolean; args?: readonly CommandArg[]; method?: string },\n ): this {\n if (this._claimed(key, factory)) return this;\n this._commands.set(key, {\n key,\n scope: \"node\",\n factory,\n ...(options?.args ? { args: this._describeArgs(options.args) } : {}),\n binds: options?.binds,\n ...(options?.method ? { method: options.method } : {}),\n });\n return this;\n }\n\n /**\n * A host's seam for its own variable commands (a spring, a wiggle); the returned {@link Command} must be a\n * pure function of `t`.\n */\n addVariableCommand(key: string, factory: VariableCommandFactory): this {\n if (this._claimed(key, factory)) return this;\n this._commands.set(key, { key, scope: \"variable\", factory });\n return this;\n }\n\n command(key: string): CommandTypeEntry | undefined {\n return this._commands.get(key);\n }\n\n /**\n * Dispatches by calling the named method, never by testing against a class: a forked component is a different\n * class carrying the same source, so `instanceof` against the original is false.\n */\n nodeCommand(nodeTypeKey: string, commandKey: string): CommandFactory | undefined {\n const record = this._nodes.get(nodeTypeKey);\n const entry = record?.commands.get(commandKey);\n if (!entry) return undefined;\n return (target, args, duration, easing) => {\n const fn = (target as unknown as Record<string, unknown>)[entry.method];\n if (typeof fn !== \"function\") {\n throw new Error(\n `Command \"${commandKey}\" needs a \"${entry.method}\" method on ` +\n `${target.constructor.name}, which has none.`,\n );\n }\n const data: Record<string, unknown> = {};\n for (const arg of entry.args) data[arg.key] = args[arg.key];\n return (fn as (args: CommandArgs) => Command<Record<string, unknown>>)\n .call(target, { data, duration, easing });\n };\n }\n\n /**\n * A node takes what its own table publishes, plus node-less commands that act on a node (`to`, `fillTo`)\n * unless the method they run is one the type lacks.\n */\n takesCommand(nodeTypeKey: string, commandKey: string): boolean {\n const record = this._nodes.get(nodeTypeKey);\n if (!record) return false;\n if (record.commands.has(commandKey)) return true;\n const global = this._commands.get(commandKey);\n if (global?.scope !== \"node\") return false;\n if (global.method === undefined) return true;\n return typeof (record.ctor.prototype as Record<string, unknown>)[global.method] === \"function\";\n }\n\n commandKeys(nodeTypeKey?: string): string[] {\n const keys = nodeTypeKey === undefined\n ? this._commands.keys()\n : this._nodes.get(nodeTypeKey)?.commands.keys() ?? [];\n return [...keys].sort();\n }\n\n /** Same uniqueness rule as {@link addNode}. */\n addLerp(key: string, lerp: VariableLerp): this {\n const existing = this._lerps.get(key);\n if (existing && existing !== lerp) {\n throw new Error(\n `Variable lerp \"${key}\" is already registered to a different function. Keys must be unique.`,\n );\n }\n this._lerps.set(key, lerp);\n return this;\n }\n\n lerp(key: string): VariableLerp | undefined {\n return this._lerps.get(key);\n }\n\n lerpKeys(): string[] {\n return [...this._lerps.keys()].sort();\n }\n\n /**\n * A numeric variable with no declared lerp interpolates; anything else snaps at the end. Guessing a structural\n * lerp off one sample would blend objects that merely share an `x` key.\n */\n requireLerp(key: string | undefined, value: unknown, where: string): VariableLerp {\n const resolved = key ?? (typeof value === \"number\" ? \"number\" : \"step\");\n const lerp = this._lerps.get(resolved);\n if (!lerp) {\n throw new Error(\n `Unknown variable lerp \"${resolved}\" (${where}). ` +\n `Registered: ${this.lerpKeys().join(\", \") || \"none\"}.`,\n );\n }\n return lerp;\n }\n\n /** Referenced as `{ kind: \"custom\", args: key }`. Same uniqueness rule as {@link addNode}. */\n addEase(key: string, ease: EasingFunction): this {\n const existing = this._eases.get(key);\n if (existing && existing !== ease) {\n throw new Error(\n `Ease \"${key}\" is already registered to a different function. Keys must be unique.`,\n );\n }\n this._eases.set(key, ease);\n return this;\n }\n\n ease(key: string): EasingFunction | undefined {\n return this._eases.get(key);\n }\n\n easeKeys(): string[] {\n return [...this._eases.keys()].sort();\n }\n\n /**\n * The key is an argument, not a pack field (as in {@link addNode}), so a file stays portable between projects;\n * a pack's own `id` is provenance. The pack is normalised on the way in.\n *\n * Re-registering an equal pack is a no-op: the same file imported twice yields two equal objects, and throwing\n * there would defeat the uniqueness rule. `replace: true` overwrites with a different pack, for a live-edited\n * shader.\n */\n addShader(key: string, pack: unknown, options?: { replace?: boolean }): Shader {\n const normalized = normalizeShaderPack(pack);\n const existing = this._shaders.get(key);\n if (existing) {\n if (\n existing.scope === normalized.scope\n && existing.source === normalized.source\n && existing.name === normalized.name\n ) return existing;\n if (!options?.replace) {\n throw new Error(\n `Shader \"${key}\" is already registered to a different pack ` +\n `(\"${existing.name}\" vs \"${normalized.name}\"). Keys must be unique — a document ` +\n `naming this shader would otherwise resolve differently depending on registration order.`,\n );\n }\n } else if (this._shaders.size >= Registry.MAX_SHADERS) {\n throw new Error(\n `Cannot register shader \"${key}\": the ${Registry.MAX_SHADERS}-shader ceiling is reached.`,\n );\n }\n this._shaders.set(key, normalized);\n return normalized;\n }\n\n shader(key: string): Shader | undefined {\n return this._shaders.get(key);\n }\n\n /**\n * The typed accessors deliver the compile error the union promises: {@link shader} returns `Shader`, and an\n * unnarrowed call site could pass an effect pack to `Fills.shader`.\n */\n fillShader(key: string): FillShader | undefined {\n const pack = this._shaders.get(key);\n return pack?.scope === \"fill\" ? pack : undefined;\n }\n\n effectShader(key: string): EffectShader | undefined {\n const pack = this._shaders.get(key);\n return pack?.scope === \"effect\" ? pack : undefined;\n }\n\n shaderKeys(): string[] {\n return [...this._shaders.keys()].sort();\n }\n\n private readonly _nodes = new Map<string, NodeTypeRecord>();\n private readonly _commands = new Map<string, CommandTypeEntry>();\n private readonly _lerps = new Map<string, VariableLerp>();\n private readonly _eases = new Map<string, EasingFunction>();\n private readonly _shaders = new Map<string, Shader>();\n private readonly _dynamicNodes?: DynamicNodeConfig;\n\n /**\n * `new Function` in-realm, never a blob module or a worker (see {@link DynamicNodeConfig} and\n * `deny-globals.ts`). `require()` is locked to the sdk specifiers and the host's `modules`, own keys only so\n * `require(\"constructor\")` cannot reach `Object`. No relative imports: a dynamic node is one script.\n */\n private _evalNodeModule(js: string): NodeConstructor {\n const { sdk, modules } = this._dynamicNodes!;\n const require = (specifier: string): unknown => {\n if (SDK_SPECIFIERS.includes(specifier)) return sdk;\n if (modules && Object.hasOwn(modules, specifier)) return modules[specifier];\n const available = [\"@motionscript/sdk/v1\", ...Object.keys(modules ?? {})];\n throw new Error(\n `\"${specifier}\" isn't available to a custom node. It can require ` +\n `${available.map((s) => `\"${s}\"`).join(\", \")}; a host supplies more through \\`dynamicNodes.modules\\`.`,\n );\n };\n const mod = { exports: {} as Record<string, unknown> };\n // The script runs one function in from the parameters that deny the\n // globals, so its own top-level `const frames` shadows a denied name\n // instead of redeclaring a parameter. A body that closes that function\n // early is still inside the outer one, which denies the same names.\n const factory = new Function(\n \"exports\", \"require\", \"module\", ...DENIED_GLOBALS,\n `\"use strict\";\\nreturn function () {\\n${js}\\n};`,\n );\n factory(mod.exports, require, mod)();\n\n const ctor = mod.exports.default as (NodeConstructor & { node?: NodeConstructor }) | undefined;\n if (typeof ctor !== \"function\" || getNodeDescriptor(typeof ctor.node === \"function\" ? ctor.node : ctor) === undefined) {\n throw new Error(\"This script must `export default` a component: `component2d({ key: \\\"…\\\", … })`.\");\n }\n return ctor;\n }\n\n /** See {@link addNode} for why. */\n private _claimed(key: string, factory: CommandFactory | VariableCommandFactory): boolean {\n const existing = this._commands.get(key);\n if (!existing) return false;\n if (existing.factory === factory) return true;\n throw new Error(\n `Command type \"${key}\" is already registered to a different factory. Keys must be unique.`,\n );\n }\n\n /** The whole prototype chain, so a component publishes the box its tree's base declares too. */\n private _describeProperties(ctor: NodeConstructor): Record<string, NodePropertyDescriptor> {\n const out: Record<string, NodePropertyDescriptor> = {};\n for (const meta of getPropertyMeta(Object.create(ctor.prototype) as object)) {\n const editor: PropertyEditor = meta.editor ?? {};\n out[meta.key] = {\n ...editor,\n kind: editor.kind ?? this._inferKind(meta.default),\n ...(meta.default !== undefined ? { default: meta.default } : {}),\n };\n }\n return out;\n }\n\n private _describeEvolution(ctor: NodeConstructor, descriptor: NodeTypeDescriptor): NodeTypeDescriptor {\n const evolution = propEvolutionOf(ctor);\n if (!evolution) return descriptor;\n const properties = { ...descriptor.properties };\n for (const [key, message] of Object.entries(evolution.deprecated)) {\n if (properties[key]) properties[key] = { ...properties[key], deprecated: message };\n }\n const renamed = Object.keys(evolution.renamed).length > 0 ? { renamed: { ...evolution.renamed } } : {};\n return { ...descriptor, ...renamed, properties };\n }\n\n /** `Node.dimension` is a getter so it answers from the prototype, before any field initializer has run. */\n private _describeDimension(ctor: NodeConstructor): NodeDimension | undefined {\n const dimension = (Object.create(ctor.prototype) as Node).dimension;\n return typeof dimension === \"string\" ? dimension : undefined;\n }\n\n private _describeHolds(ctor: NodeConstructor): readonly NodeDimension[] | undefined {\n const trees = (Object.create(ctor.prototype) as Partial<Node>)._childTrees;\n return Array.isArray(trees) ? [...trees] : undefined;\n }\n\n /**\n * A function default is a reactive binding, not a value, so it says nothing about the control; those declare a\n * kind or take \"unknown\", which a host draws read-only.\n */\n private _inferKind(value: unknown): string {\n switch (typeof value) {\n case \"number\": return \"number\";\n case \"string\": return \"text\";\n case \"boolean\": return \"boolean\";\n case \"object\":\n if (value === null) return \"unknown\";\n return Array.isArray(value) && value.every(v => typeof v === \"number\")\n ? \"vector\"\n : \"object\";\n default: return \"unknown\";\n }\n }\n\n private _describeArgs(args: readonly CommandArg[] | undefined): CommandArgDescriptor[] {\n return (args ?? []).map((arg) =>\n typeof arg === \"string\" ? { key: arg, kind: \"unknown\" } : { kind: \"unknown\", ...arg });\n }\n}\n"]}
@@ -106,8 +106,8 @@ export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParalle
106
106
  export type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween/index.js';
107
107
  export { linear, easeIn, easeOut, easeInOut } from '../tween/index.js';
108
108
  export type { EasingFunction, EaseParams, StandardEase } from '../tween/index.js';
109
- export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, } from '../util/index.js';
110
- export type { Reference, RefTarget, Context, DataRecord, ParseCSVOptions, } from '../util/index.js';
109
+ export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, deprecate, warnDeprecated, } from '../util/index.js';
110
+ export type { Reference, RefTarget, Context, DataRecord, ParseCSVOptions, Deprecation, } from '../util/index.js';
111
111
  export { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement.js';
112
112
  export type { PlacementIssue, PlacementOptions } from '../document/placement.js';
113
113
  export { nodeBox, pickNode, collectBoxes, parentPlanePointAt, childPlanePointAt, reparentPlacementAt, nodeHandlesAt, handleValueAt, } from '../runtime/node-picking.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACR,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpD,YAAY,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EAGnB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf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EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAElF,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAClB,YAAY,EACR,cAAc,EACd,UAAU,EACV,YAAY,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,eAAe,GAClB,MAAM,SAAS,CAAC;AAKjB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChG,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,O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Aa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC"}
package/dist/sdk/index.js CHANGED
@@ -91,7 +91,7 @@ export { lerpNumber, } from '../tween/index.js';
91
91
  // 1)` is a single command, not a builder; sequencing is by timeline placement.
92
92
  export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParallel, loopCommand, } from '../tween/index.js';
93
93
  export { linear, easeIn, easeOut, easeInOut } from '../tween/index.js';
94
- export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, } from '../util/index.js';
94
+ export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, deprecate, warnDeprecated, } from '../util/index.js';
95
95
  // Pure functions over a scene's node tree, in viewport space (origin at the viewport centre, y-up); a player
96
96
  // embedding reaches the same through `useMotionPlayer`. They live in `../runtime` but are deep-imported from
97
97
  // their files, never the runtime barrel.