@motionscript/core 0.3.0 → 0.4.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 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-65DNLAPH.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};
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.3.0",
3
+ "version": "0.4.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 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-65DNLAPH.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};
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
@@ -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;AAE1D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CACzB,MAAM,EAAE,IAAI,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,cAAc,KACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAA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nD;;;;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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a,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,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,EA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Content":["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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "Engine-agnostic animation library for Motion Script: scenes, nodes, props, tweens and layout.",
6
6
  "repository": {