@motionscript/core 0.1.1-alpha.5 → 0.3.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.
- package/CHANGELOG.md +35 -0
- package/dist/browser/chunks/chunk-65DNLAPH.js +13 -0
- package/dist/browser/chunks/{chunk-FPYU47XX.js.map → chunk-65DNLAPH.js.map} +4 -4
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/manifest.json +1 -1
- package/dist/browser/sdk.js +1 -1
- package/dist/browser/sdk.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/util/deprecate.d.ts +29 -0
- package/dist/util/deprecate.d.ts.map +1 -0
- package/dist/util/deprecate.js +42 -0
- package/dist/util/deprecate.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +1 -0
- package/dist/util/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/chunks/chunk-FPYU47XX.js +0 -13
package/dist/browser/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as $o,$a as Ri,$b as Wa,A as io,Aa as ci,Ab as ma,Ac as pn,B as ao,Ba as gi,Bb as ca,Bc as mn,C as no,Ca as li,Cb as ga,Cc as cn,D as fo,Da as xi,Db as la,Dc as gn,E as ho,Ea as ui,Eb as xa,Ec as ln,F as po,Fa as wi,Fb as ua,Fc as w,G as mo,Ga as yi,Gb as wa,Gc as xn,H as co,Ha as _i,Hb as ya,Hc as y,I as go,Ia as Ai,Ib as _a,Ic as _,J as Fo,Ja as Fi,Jb as Aa,Jc as f,K as Lo,Ka as Li,Kb as Fa,Kc as un,L as Po,La as Pi,Lb as La,Lc as wn,M as Eo,Ma as Ei,Mb as Pa,Mc as yn,N as No,Na as Ni,Nb as Ea,Nc as _n,O as So,Oa as Si,Ob as Na,Oc as Ln,P as To,Pa as Ti,Pb as Sa,Pc as Pn,Q as bo,Qa as bi,Qb as Ta,Qc as En,R as Do,Ra as Di,Rb as x,Rc as Nn,S as Mo,Sa as Mi,Sb as u,T as Uo,Ta as Ui,Tb as ba,U as vo,Ua as vi,Ub as Da,V as Vo,Va as Vi,Vb as Ma,W as Co,Wa as Ci,Wb as Ua,X as Io,Xa as Ii,Xb as va,Y as Wo,Ya as d,Yb as Va,Z as Ko,Za as Wi,Zb as Ca,_ as Ro,_a as Ki,_b as Ia,a as Ze,aa as jo,ab as $i,ac as Ka,b as ke,ba as Yo,bb as ji,bc as Ra,c as Oe,ca as qo,cb as Yi,cc as $a,d as tr,da as zo,db as qi,dc as ja,e as er,ea as Bo,eb as zi,ec as Ya,f as rr,fa as Go,fb as Bi,fc as qa,g as sr,ga as Ho,gb as Gi,gc as za,h as or,ha as Jo,hb as Hi,hc as Ba,i as ir,ia as Qo,ib as Ji,ic as Ga,j as br,ja as Xo,jb as Qi,jc as Ha,k as Dr,ka as Zo,kb as Xi,kc as Ja,l as Mr,la as ko,lb as Zi,lc as Qa,m as Ur,ma as Oo,mb as ki,mc as Xa,n as gs,na as ti,nb as Oi,nc as Za,o as ls,oa as ei,ob as ta,oc as ka,p as xs,pa as ri,pb as ea,pc as Oa,q as us,qa as si,qb as ra,qc as tn,r as Ls,ra as oi,rb as sa,rc as en,s as Zs,sa as ii,sb as oa,sc as rn,t as ks,ta as ai,tb as ia,tc as sn,u as Os,ua as ni,ub as aa,uc as on,v as to,va as di,vb as na,vc as an,w as eo,wa as fi,wb as da,wc as nn,x as ro,xa as hi,xb as fa,xc as dn,y as so,ya as pi,yb as ha,yc as fn,z as oo,za as mi,zb as pa,zc as hn}from"./chunks/chunk-FPYU47XX.js";import{$ as St,$a as Te,$c as cs,A as et,Aa as kt,Ab as fr,Ac as Zr,Ad as Bs,B as rt,Ba as Ot,Bb as hr,Bd as Gs,C as st,Ca as te,Cb as pr,Cc as kr,Cd as Hs,D as ot,Da as ee,Db as mr,Dc as o,E as it,Ea as re,Eb as cr,Ec as Or,Ed as Js,Fa as se,Fb as gr,Fc as ts,G as at,Gb as lr,Gc as es,H as nt,Ha as oe,Hb as xr,Hc as rs,Hd as Qs,I as dt,Ia as ie,Ib as ur,Ic as ss,Id as Xs,J as ft,Jb as wr,Jc as os,K as ht,Ka as ae,Kb as yr,Kc as is,L as pt,La as me,Lb as _r,Lc as as,M as mt,Ma as ce,Mc as ns,N as ct,Na as ge,Nc as ds,O as gt,Oa as le,Ob as Ar,Oc as fs,P as lt,Pa as xe,Pb as Fr,Q as xt,Qa as ue,Qb as Lr,R as ut,Ra as we,Rb as Pr,S as wt,Sa as ye,Sb as Er,T as yt,Ta as _e,Tb as Nr,Tc as hs,U as _t,Ua as Ae,Ub as Sr,V as At,Va as Fe,Vb as Tr,W as Ft,Wa as Le,X as Lt,Xa as Pe,Y as Pt,Ya as Ee,Z as Et,Za as Ne,Zb as g,Zc as ps,_ as Nt,_a as Se,_c as ms,a as F,aa as Tt,ab as be,ad as ws,b as L,ba as bt,bb as De,bd as ys,c as P,ca as Dt,cb as Me,cd as _s,d as S,da as Mt,db as Ue,dd as As,e as T,ed as Fs,f as b,fa as Ut,fb as ve,fc as vr,fd as Ps,g as C,ga as vt,gb as Ve,gc as Vr,gd as Es,h as I,ha as Vt,hb as Ce,hc as Cr,hd as Ns,i as W,ia as Ct,ib as Ie,ic as Ir,id as Ss,j as K,ja as It,jb as We,jc as Wr,jd as Ts,je as lo,k as R,ka as Wt,kb as Ke,kc as Kr,kd as bs,ke as xo,l as $,la as Kt,lb as Re,lc as Rr,ld as Ds,le as uo,m as j,ma as Rt,mb as $e,mc as $r,md as Ms,n as Y,na as $t,nb as je,nc as jr,nd as Us,o as q,ob as Ye,oc as Yr,od as vs,p as z,pa as jt,pb as qe,pc as qr,pd as Vs,q as B,qa as Yt,qb as ze,qc as zr,qd as Cs,r as G,ra as qt,rb as Be,rc as Br,rd as Is,s as H,sa as zt,sb as Ge,sc as Gr,sd as Ws,t as J,ta as Bt,tb as He,tc as Hr,td as Ks,u as Q,ua as Gt,ub as Je,uc as Jr,ud as Rs,ue as wo,v as X,va as Ht,vb as Qe,vc as Qr,vd as $s,ve as yo,w as Z,wa as Jt,wb as Xe,wc as l,wd as js,we as _o,x as k,xa as Qt,xb as ar,xd as Ys,xe as Ao,y as O,ya as Xt,yb as nr,yd as qs,z as tt,za as Zt,zb as dr,zc as Xr,zd as zs}from"./chunks/chunk-XCGYJHZR.js";import{g as An,h as Fn}from"./chunks/chunk-GEJEQQER.js";import{b as E,c as N,d as D,e as M,f as U,g as v,h as V,i as ne,j as de,k as fe,l as he,m as pe}from"./chunks/chunk-5TDMGUXQ.js";var p={width:1920,height:1080},m=60,bn={viewport:p,fps:m},A={image:{},video:{},audio:{},font:{}},h=class{platform;viewport;fps;constructor(t,e={}){this.platform=t,this._registry=new d({nodes:e.nodes,shaders:e.shaders,lerps:e.lerps,dynamicNodes:e.dynamicNodes,strict:e.strict}),this.viewport=e.viewport??p,this.fps=e.fps??m,this._manifest=e.manifest??A,this._exporter=t.createExporter()}get manifest(){return this._manifest}get exporter(){return this._exporter}setManifest(t){this._manifest=t;for(let e of this._manifestListeners)e(t)}open(t){return new f(this,t)}knows(t){return this._registry.hasNode(t)}get registry(){return this._registry}async registerNode(t,e){return typeof t=="string"?this._registry.addNodeFromSource(t,e):(this._registry.addNode(t,e),t)}registerShader(t,e,r){return this._registry.addShader(t,e,r)}dispose(){this._manifestListeners.clear(),this.platform.dispose?.()}_registry;_manifest;_exporter;_manifestListeners=new Set;_onManifestChange(t){return this._manifestListeners.add(t),()=>this._manifestListeners.delete(t)}};var i=class{get schedulesAudio(){return!0}setMuted(t){}setVolume(t){}dispose(){this.stop()}};var a=class{catalog;viewport;constructor(t,e){this.catalog=t,this.viewport=e}setCatalog(t){this.catalog=t}inFlightLoads=new Map;cachedAssets=new Set;isLoaded(t){return this.cachedAssets.has(t)}async loadAsset(t,e){let r=this.inFlightLoads.get(t);if(r)return r;if(this.cachedAssets.has(t))return;let s=this.runLoad(t,e);this.inFlightLoads.set(t,s);try{await s}finally{this.inFlightLoads.delete(t)}}async runLoad(t,e){let r=!0;switch(e.type){case"image":await this.loadImage(t);break;case"video":await this.loadVideo(t,e.startFrame,e.endFrame,e.trimStart,e.trimEnd);break;case"font":{let{fontFamily:s,fontWeight:c}=this.parseFontKey(t);if(r=await this.loadFont(t,s,c),!r&&this.getDecodePolicy()==="exact")throw new o("font",s,`The manifest has no font entry for "${s}", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`);break}case"audio":break;case"loader":throw new Error("Loader records must not be routed through StorageAdapter.loadAsset");default:{let s=e;throw new Error(`Unsupported asset type: ${s.type}`)}}r&&this.cachedAssets.add(t)}parseFontKey(t){let[e,r]=t.split("@"),s=r?parseInt(r,10):400;return{fontFamily:e||t,fontWeight:isNaN(s)?400:s}}async warmPendingVideo(){return!1}setDecodePolicy(t){}getDecodePolicy(){return"interactive"}hasPendingDecodes(){return!1}async warmPendingDecodes(){return this.warmPendingVideo()}hasPendingUpgrades(){return!1}async warmPendingUpgrades(){return!1}setPlaying(t){}dispose(){this.inFlightLoads.clear(),this.cachedAssets.clear()}};export{z as ASCII_CHARSETS,ji as AUDIO_ROOT_ID,lo as AUTOFIT_PROBE_SIZE,Pt as AdjustmentChain,Nt as Adjustments,ei as AmbientLight3D,ai as AreaLight3D,u as AssetDeclaration,x as AssetManager,o as AssetNotLoadedError,Ja as AssetTimeline,bo as AudioBus,Je as AudioEffectChain,ar as AudioEffectRegistry,Qe as AudioEffects,i as AudioSink,G as BLEND_MODES_LIST,ho as BooleanGroup,Co as Box3D,Xr as COMMAND_META,mo as Camera,ni as Camera3D,Ls as Canvas2D,hi as Canvas3D,Qs as CanvasRenderContext2D,zo as Capsule3D,Yo as Circle3D,hs as Clip,ja as ClipInstance,qa as ClipStore,Bi as ClipTimeline,Ro as Cone3D,Qr as ContextMap,Ko as Cylinder3D,le as DEFAULT_CAP_SCALE,Pe as DEFAULT_EASE,m as DEFAULT_FPS,bn as DEFAULT_OUTPUT,Ya as DEFAULT_PRECOMP_BUDGET_MS,p as DEFAULT_VIEWPORT,Ei as DOCUMENT_FORMAT_VERSION,Si as DOCUMENT_MIGRATIONS,jt as DRAWABLE_KINDS,_o as DataToken,Eo as DefaultTextStyle,si as DirectionalLight3D,Ni as DocumentTooNewError,R as EFFECT_OPTION_KEYS,A as EMPTY_MANIFEST,ne as EMPTY_PATH_DATA,Nr as EMPTY_TEXT_STYLE,dt as EffectChain,ft as Effects,ks as Ellipse,h as Engine,fi as Environment3D,Gs as ExpressionError,Go as Extrude3D,lt as FillChain,xt as Fills,di as Fog3D,ta as Geo,vt as Graphics2D,qt as Graphics3D,vo as Group3D,ri as HemisphereLight3D,ao as Hexagon,is as IDENTITY_QUATERNION,Qo as Instances3D,Ho as Lathe3D,Zo as Line3D,Dr as MAX_SHADER_PROPERTIES,Mr as MAX_SHADER_SOURCE,wt as MINOR_WIDTH_RATIO,Sa as MUTABLE_MATERIAL_KEYS,w as ManifestAssetCatalog,po as MaskGroup,ea as Mat,Vo as Mesh3D,Oo as Model3D,ti as ModelView3D,Ns as NODE_META,xr as NO_PROJECTION_3D,kr as Node,ps as Node2D,Es as Node3D,ws as NodeAudio,H as NodeBlendModes,Xs as NullRenderContext,Lo as NumberNode,no as Octagon,co as OrbitCamera,de as PATH_UNIT_EXTENT,fe as PATH_UNIT_HALF,ro as Path,Ut as PathBuilder,eo as PathShape,io as Pentagon,Wo as Plane3D,xn as Playback,ln as PlaybackController,oi as PointLight3D,Xo as Points3D,Os as Polygon,to as Polygram,Bo as Polyhedron3D,g as PropSlot,No as Provider,li as ROOT_NODE_ID,Ce as RampChain,En as Random,Zs as Rect,d as Registry,ki as RenderBackendError,zt as RenderContext3D,Po as RichText,oo as RightTriangle,qo as Ring3D,go as RotatedBox,Ba as SETTLE_PASSES,bs as SHAPE_ALIGNMENT_KEYS,Ta as STRUCTURAL_MATERIAL_KEYS,Gt as Scene3D,Pn as SeedGenerator,Ao as SeedToken,f as Session,tr as Sound,To as SoundNode,Io as Sphere3D,ii as SpotLight3D,ko as Sprite3D,fo as Star,za as StateEvaluator,_ as SteppedClock,a as StorageAdapter,te as TEXTURE_KEYS,Er as TEXT_SHAPING_KEYS,Pr as TEXT_STYLE_KEYS,ra as Tex,Fo as Text,wo as TextStyleToken,So as ThemeProvider,yo as ThemeToken,y as Ticker,$o as Torus3D,jo as TorusKnot3D,so as Triangle,Jo as Tube3D,he as UNIT_PATH_BOX,Do as Video,Et as VideoAdjustmentChain,St as VideoAdjustments,et as WGSL_CONTRACT,Ma as __resetSchedulerForTests,bt as alignmentOps,us as applyEditorStates,ga as applyMatrix4,mr as applyToPoint,Pi as asProjectDocument,vi as assertValidDocument,Ui as assertValidProjectDocument,nr as audioEffectsOps,Be as audioParamOps,ct as backdropEffects,ys as busPathOf,_s as busPathTo,ir as busStopKey,gr as cameraMatrix,oe as canLerpFill,Ht as canvas3DResourceKey,kt as canvas3DResourceLoader,Qi as caretCount,cn as caretOffsetAt,gn as caretRangeQuads,Fa as centeredBox3,en as childPlanePointAt,Fe as clamp,Le as clamp01,zi as clipDocument,Oe as clipDurationOf,Ua as clipFrameToTime,Ze as clipTimeAtSource,va as clipTimeToFrame,pn as collectBoxes,Xa as collectBoxes3D,Y as colorOps,Br as commandParallel,zr as commandSequence,Ai as commandSpan,la as compose4,Rs as containsClip,$s as containsOps,S as cornerRadiusOps,T as cornerStyleOps,Pa as corners3,Ha as createAssetTimelineProfile,Jr as createContext,Ln as createRef,Ue as curveEase,De as curveSegmentT,be as curveSegments,da as cylinderRadii,st as describeEffect,Bs as distanceToSegment,Fi as documentDuration,Ti as documentFormatVersion,Yr as driveCommand,Ne as easeIn,Te as easeInOut,ve as easeOfSpec,Se as easeOut,ot as effectDescriptors,it as effectSurface,ui as effectiveSpan,yi as effectiveSpanIn,wi as effectiveSpans,er as effectsKey,pt as effectsOps,Fn as enterBudget,ze as equalsParam,os as euler3Ops,ha as evaluateParametric,oa as evaluateRoundedBox,Hs as expressionOps,wr as facesAway,ae as fillOps,Ft as filterSurface,As as findBusById,ms as findNode2D,Or as flowOps,re as forEachTexture3D,gt as foregroundShaderEffects,cs as frameIn,Va as frameSpecAtTime,Ra as frameTime,_n as generateList,Na as geometryBounds3D,J as getBlendModeHash,Zr as getCommandMeta,Ss as getNodeDescriptor,l as getPropSlot,Tr as getPropertyMeta,v as getTypographyPreset,on as handleValueAt,Ot as hasCanvas3DBackend,_t as hasFilter,ur as hasProjection3D,gi as hasTimeline,We as hold,fr as identity,pa as identity4,Dt as insetsOps,Ge as integrateSpeedToClipTime,cr as invert,ca as invert4,ci as isAudioDocument,mt as isBackdropEffect,$r as isCommand,mi as isCompositionDocument,Ct as isDataTexture3D,Me as isEaseCurve,Oi as isFatalRenderIssue,br as isKnownShaderProperty,Mo as isOrbitCamera3D,yt as isPixelFilter,Li as isProjectDocument,dr as isProjective,Ke as isRamp,Nn as isSteppable,pi as isStillDocument,xe as isStrokeMarker,It as isSurfaceTexture3D,ee as isTextureLike,P as isUniformCorners,Qa as isViewport3D,tt as isWgslShader,j as lerpColor,b as lerpCornerScalarStyle,L as lerpCorners,at as lerpEffect,ss as lerpEuler3,ie as lerpFill,At as lerpFilter,Lt as lerpFilterArray,_r as lerpLookAt,E as lerpNumber,qe as lerpParam,N as lerpPerspective,k as lerpUniformRecord,X as lerpUniformValue,D as lerpVector2,es as lerpVector3,Ee as linear,xa as lookAtRotation4,Rt as looksLikeAssetPath,qr as loopCommand,Vr as loopPasses,Wr as loopPhase,Cr as loopRepeats,Ir as loopSpan,Yi as loweredAudioDocument,jr as makeCommand,bi as migrateDocument,Js as migrateNodeProps,Vi as missingNodeOf,pr as multiply,ma as multiply4,zs as nearPolyline,An as niceStep,dn as nodeAt,an as nodeBox,nn as nodeBoxAt,sn as nodeHandlesAt,lr as nodeLocalMatrix,gs as nodePath,yr as nodeProjectedMatrix,xi as nodeSpan,mn as nodeTextLayout,Wi as nodeTypeIsA,ns as normalizeQuaternion,Ur as normalizeShaderPack,Q as normalizeUniforms,ba as now,Aa as orthographic4,Ye as paramKey,Ki as parentIssue,tn as parentPlanePointAt,Ps as parentSpaceOf,wn as parseCSV,Jt as parseCanvas3DResourceKey,V as parseColor,yn as parseData,pe as pathOps,_a as perspective4,hn as pickNode,ka as pickNode3D,Ia as placeTracks,$i as placementIssues,qs as pointInPolygon,js as polygonVertices,Ys as polygramVertices,Hr as prepareNumericCellTween,Gr as prepareNumericTween,xs as primeMotionTree,Za as projectNode3D,fn as projectNode3DAt,ds as quaternionFromEuler,fs as quaternionOps,Ie as ramp,Xt as registerCanvas3DResourceLoader,Qt as registerCanvas3DWarmup,Ci as registryVocabulary,Zi as renderIssueKey,Oa as renderMatrix,Ga as renderSettled,rn as reparentPlacementAt,xo as requireFontFamily,B as resolveAsciiCharset,Xe as resolveAudioEffects,fa as resolveBevel3D,Uo as resolveCameraPlacement,Tt as resolveChainAdjustments,ht as resolveChainEffects,ut as resolveChainFill,F as resolveCorners,C as resolveEffectAxis,W as resolveEffectColor,se as resolveFill,$t as resolveFill3D,Yt as resolveMaterialShorthand3D,q as resolveMotionBlurAlignment,vs as resolvePivotPosition,un as resolveProjectDocument,Re as resolveRamp,nt as resolveShaderProperties,me as resolveShadow,na as resolveShadowOptions3D,Bt as resolveShadows3D,Us as resolveShapeAlignment,Ts as resolveShapePivot,_e as resolveStroke,ge as resolveStrokeAlign,ue as resolveStrokeCap,we as resolveStrokeEnd,ye as resolveStrokeJoin,Vt as resolveSurfaceSource,Wt as resolveTexture3D,ts as resolveVector3,Mt as resolveVideoTimestamp,ya as rotationOf4,I as sameEffectAxis,K as sameEffectColor,$e as sampleRamp,ls as sampleTree,sa as segmentsOf,U as setTheme,Rr as settles,Kr as settling,rt as shaderContractOf,ia as shadowCasts,ce as shadowOps,aa as shadowReceives,Ri as siblingIssue,Fr as size2DOps,Lr as sizeInputOps,as as slerpQuaternion,ke as sourceTimeAtClip,He as sourceTimeAtClipElapsed,Ar as space3dOps,$a as spanFrames,Ka as spansCovering,Ve as specOfEase,je as staticValue,Ms as stripShapeAlignmentKeys,Ae as strokeOps,Fs as structuralPathOf,Sr as textOps,Kt as texture3DSource,vr as toCommand,Hi as toPathString,Xi as toRenderIssue,Wa as totalFramesOf,Ca as trackFrameCount,Ea as transformBox3,ua as transformMatrix4,sr as transitionGainAt,or as transitionKey,rr as transitionSpans,hr as translation,wa as translation4,O as uniformRecordsEqual,Z as uniformValuesEqual,La as unionBox3,_i as untimed,Di as validateDocument,Mi as validateProjectDocument,Ds as validateShapeAlignmentProps,M as vector2Ops,rs as vector3Ops,Ii as vocabularyBreaks,Zt as warmCanvas3D,$ as withEffectOptions,Cs as withEllipseDescriptor,Ks as withLineDescriptor,Ji as withPathDescriptor,qi as withPlayedSounds,Is as withPolygonDescriptor,Ws as withPolygramDescriptor,Vs as withRectDescriptor,Gi as withRichTextDescriptor,uo as withTextDescriptor,Da as yieldToScheduler};
|
|
1
|
+
import{$ as $o,$a as Ri,$b as Wa,A as io,Aa as ci,Ab as ma,Ac as pn,B as ao,Ba as gi,Bb as ca,Bc as mn,C as no,Ca as li,Cb as ga,Cc as cn,D as fo,Da as xi,Db as la,Dc as gn,E as ho,Ea as ui,Eb as xa,Ec as ln,F as po,Fa as wi,Fb as ua,Fc as w,G as mo,Ga as yi,Gb as wa,Gc as xn,H as co,Ha as _i,Hb as ya,Hc as y,I as go,Ia as Ai,Ib as _a,Ic as _,J as Fo,Ja as Fi,Jb as Aa,Jc as f,K as Lo,Ka as Li,Kb as Fa,Kc as un,L as Po,La as Pi,Lb as La,Lc as wn,M as Eo,Ma as Ei,Mb as Pa,Mc as yn,N as No,Na as Ni,Nb as Ea,Nc as _n,O as So,Oa as Si,Ob as Na,Oc as An,P as To,Pa as Ti,Pb as Sa,Pc as Fn,Q as bo,Qa as bi,Qb as Ta,Qc as Ln,R as Do,Ra as Di,Rb as x,Rc as Nn,S as Mo,Sa as Mi,Sb as u,Sc as Sn,T as Uo,Ta as Ui,Tb as ba,Tc as Tn,U as vo,Ua as vi,Ub as Da,Uc as bn,V as Vo,Va as Vi,Vb as Ma,W as Co,Wa as Ci,Wb as Ua,X as Io,Xa as Ii,Xb as va,Y as Wo,Ya as d,Yb as Va,Z as Ko,Za as Wi,Zb as Ca,_ as Ro,_a as Ki,_b as Ia,a as Ze,aa as jo,ab as $i,ac as Ka,b as ke,ba as Yo,bb as ji,bc as Ra,c as Oe,ca as qo,cb as Yi,cc as $a,d as tr,da as zo,db as qi,dc as ja,e as er,ea as Bo,eb as zi,ec as Ya,f as rr,fa as Go,fb as Bi,fc as qa,g as sr,ga as Ho,gb as Gi,gc as za,h as or,ha as Jo,hb as Hi,hc as Ba,i as ir,ia as Qo,ib as Ji,ic as Ga,j as br,ja as Xo,jb as Qi,jc as Ha,k as Dr,ka as Zo,kb as Xi,kc as Ja,l as Mr,la as ko,lb as Zi,lc as Qa,m as Ur,ma as Oo,mb as ki,mc as Xa,n as gs,na as ti,nb as Oi,nc as Za,o as ls,oa as ei,ob as ta,oc as ka,p as xs,pa as ri,pb as ea,pc as Oa,q as us,qa as si,qb as ra,qc as tn,r as Ls,ra as oi,rb as sa,rc as en,s as Zs,sa as ii,sb as oa,sc as rn,t as ks,ta as ai,tb as ia,tc as sn,u as Os,ua as ni,ub as aa,uc as on,v as to,va as di,vb as na,vc as an,w as eo,wa as fi,wb as da,wc as nn,x as ro,xa as hi,xb as fa,xc as dn,y as so,ya as pi,yb as ha,yc as fn,z as oo,za as mi,zb as pa,zc as hn}from"./chunks/chunk-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};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/runtime/engine.ts", "../../src/platform/audio-sink.ts", "../../src/platform/storage-adapter.ts"],
|
|
4
4
|
"sourcesContent": ["import { Size2D } from \"@/attributes/layout/size\";\nimport type { Shader } from \"@/attributes/shape/shaders/pack\";\nimport { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetManifest } from \"@/assets/manifest\";\nimport { Registry, type NodeConstructor, type RegistryOptions } from \"@/document/registry\";\nimport { AudioSink } from \"@/platform/audio-sink\";\nimport { Exporter } from \"@/platform/exporter\";\nimport { Ticker } from \"@/platform/ticker\";\nimport { StorageAdapter } from \"@/platform/storage-adapter\";\nimport { CanvasRenderContext2D } from \"@/render/canvas-render-context2d\";\nimport { MeasureContext2D } from \"@/render/measure-context\";\nimport { RenderSurface } from \"@/render/surface\";\nimport { OpenOptions, Session } from \"./session\";\n\nexport type EngineRenderContext = CanvasRenderContext2D & RenderSurface;\n\nexport interface PlatformDeps {\n catalog: AssetCatalog;\n viewport: Size2D;\n fps: number;\n}\n\n/**\n * Each seam is a factory, not an instance: a storage adapter is per-viewport (it clamps decode resolution, so\n * a decode cached for one viewport is wrong at a larger one) while the engine outlives any session.\n *\n * The type parameter lets a platform hand its factories a richer storage adapter without `core` naming that\n * type; core stores and forwards these, never inspects them.\n */\nexport interface EnginePlatform<TStorage extends StorageAdapter = StorageAdapter> {\n createStorageAdapter(deps: PlatformDeps): TStorage;\n createRenderContext(storage: TStorage): EngineRenderContext;\n createMeasureContext(storage: TStorage): MeasureContext2D;\n createAudioSink(): AudioSink;\n /**\n * `null` when this environment has no realtime playback (a headless export has no wall clock): the session\n * reports `playback === null` rather than faking one.\n *\n * This seam separates preview from export, not browser from server: an export is frame-stepped in either,\n * because a wall-clock export drifts. Handed `audioDevice` because a clock that drives sound must share its\n * timebase (the browser's runs on the device's `AudioContext`).\n */\n createTicker(fps: number, audioDevice: AudioSink): Ticker | null;\n createExporter(): Exporter;\n /** Torn down with the engine. For a platform holding a device or a process. */\n dispose?(): void;\n}\n\n/** What to render is passed to `open()`. */\nexport interface EngineOptions {\n /** Components as an array, or a record naming each key outright. */\n nodes?: RegistryOptions[\"nodes\"];\n shaders?: RegistryOptions[\"shaders\"];\n lerps?: RegistryOptions[\"lerps\"];\n /** Enables `Engine.registerNode` with a source string; see `DynamicNodeConfig`. */\n dynamicNodes?: RegistryOptions[\"dynamicNodes\"];\n /** See `RegistryOptions.strict`. */\n strict?: boolean;\n /**\n * Asset metadata the renderer needs before it loads a file (an image's size, a clip's duration). Reconciled\n * with {@link Engine.setManifest} rather than rebuilt, so a change keeps every decode already cached.\n */\n manifest?: AssetManifest;\n /** Viewport used when a source carries none. Defaults to 1920×1080. */\n viewport?: Size2D;\n /** Frame rate used when a source carries none. Defaults to 60. */\n fps?: number;\n}\n\nexport const DEFAULT_VIEWPORT: Size2D = { width: 1920, height: 1080 };\nexport const DEFAULT_FPS = 60;\n/** What a document renders at when neither the caller nor the document says. */\nexport const DEFAULT_OUTPUT: { viewport: Size2D; fps: number } = { viewport: DEFAULT_VIEWPORT, fps: DEFAULT_FPS };\nexport const EMPTY_MANIFEST: AssetManifest = { image: {}, video: {}, audio: {}, font: {} };\n\n/**\n * Expensive and meant to be shared, one per app: the caches underneath it (registered fonts, decoded images,\n * shaped paragraphs) are why a warm engine beats a cold one, and live here so a preview, a filmstrip and an\n * export share them.\n *\n * What belongs here rather than on a `Session`: if two open documents could disagree about it, it is session\n * state. They can disagree about a theme; they cannot disagree about whether `\"pulseRing\"` is a registered\n * type, since one of them is simply invalid.\n */\nexport class Engine<TStorage extends StorageAdapter = StorageAdapter> {\n readonly viewport: Size2D;\n readonly fps: number;\n\n constructor(\n readonly platform: EnginePlatform<TStorage>,\n options: EngineOptions = {},\n ) {\n this._registry = new Registry({\n nodes: options.nodes,\n shaders: options.shaders,\n lerps: options.lerps,\n dynamicNodes: options.dynamicNodes,\n strict: options.strict,\n });\n this.viewport = options.viewport ?? DEFAULT_VIEWPORT;\n this.fps = options.fps ?? DEFAULT_FPS;\n this._manifest = options.manifest ?? EMPTY_MANIFEST;\n this._exporter = platform.createExporter();\n }\n\n get manifest(): AssetManifest {\n return this._manifest;\n }\n\n get exporter(): Exporter {\n return this._exporter;\n }\n\n /** Replaces what the catalog reports, not the bytes behind it, so existing sessions keep every decode. */\n setManifest(manifest: AssetManifest): void {\n this._manifest = manifest;\n for (const notify of this._manifestListeners) notify(manifest);\n }\n\n /**\n * Cheap: the renderer, fonts, decoded images and shaped paragraphs belong to the engine and are shared across\n * every session.\n */\n open(options: OpenOptions): Session {\n return new Session(this as Engine, options);\n }\n\n knows(key: string): boolean {\n return this._registry.hasNode(key);\n }\n\n /** Read-only: register or replace through `registerNode`/`registerShader`. */\n get registry(): Registry {\n return this._registry;\n }\n\n /**\n * Always `async`: one calling convention whether the argument resolves immediately (a class) or needs\n * compiling (a string).\n */\n async registerNode(\n nodeOrSource: NodeConstructor | string,\n options?: { replace?: boolean },\n ): Promise<NodeConstructor> {\n if (typeof nodeOrSource === \"string\") {\n return this._registry.addNodeFromSource(nodeOrSource, options);\n }\n this._registry.addNode(nodeOrSource, options);\n return nodeOrSource;\n }\n\n /** See `Registry.addShader` for why the key is never inferred from the pack. */\n registerShader(key: string, pack: unknown, options?: { replace?: boolean }): Shader {\n return this._registry.addShader(key, pack, options);\n }\n\n dispose(): void {\n this._manifestListeners.clear();\n this.platform.dispose?.();\n }\n\n /**\n * Not public surface; reach it through `registerNode`/`registerShader`/`knows`. A `Session` (same package)\n * reads it directly; nothing enforces that, as with `_onManifestChange`.\n */\n readonly _registry: Registry;\n private _manifest: AssetManifest;\n private readonly _exporter: Exporter;\n private readonly _manifestListeners = new Set<(m: AssetManifest) => void>();\n\n /** @internal A `Session` registers here for the life of its catalog. */\n _onManifestChange(notify: (m: AssetManifest) => void): () => void {\n this._manifestListeners.add(notify);\n return () => this._manifestListeners.delete(notify);\n }\n}\n", "import type { AudioRequest } from \"@/attributes/audio/request\";\n\n\n/** Stackable audio player driven by the AssetManager: it pushes decoded data in via {@link append}, the device schedules {@link AudioRequest}s via {@link schedule} and plays through {@link syncTo} each tick. */\nexport abstract class AudioSink {\n /** Whether pushing the audio working set does anything. False for a sink that discards everything (an export mixes offline at the end): `AssetManager.syncAudio` rebuilds a `Set`, id strings and a sorted signature every frame, so the work is skipped rather than done and thrown away. */\n get schedulesAudio(): boolean {\n return true;\n }\n\n abstract has(src: string): boolean;\n\n /** Decodes and stacks `data` under `src`; idempotent for a cached `src`. */\n abstract append(src: string, data: ArrayBuffer): Promise<void>;\n\n /** Drop cached audio data (and any active sources) for srcs not in `keep`. */\n abstract retain(keep: ReadonlySet<string>): void;\n\n /** Sets the working set for the current look-ahead window: requests no longer present stop; new ones become eligible via {@link syncTo} once their data is appended. */\n abstract schedule(requests: readonly AudioRequest[]): void;\n\n /** Starts/stops scheduled sources to match `clipTime`, every tick; sources whose data isn't appended yet are skipped. */\n abstract syncTo(clipTime: number): void;\n\n abstract play(time: number, speed: number, reverse: boolean): void | Promise<void>;\n abstract stop(): void;\n\n /** Mutes or unmutes all output. No-op by default (devices that produce no sound). */\n setMuted(muted: boolean): void {}\n\n /** Linear gain on all output, on top of each request's `volume`. Independent of {@link setMuted} (unmuting restores this level) so a host can hold a slider and a mute button. No-op by default. */\n setVolume(volume: number): void {}\n\n dispose(): void {\n this.stop();\n }\n}\n", "import { AssetCatalog } from \"@/assets/catalog\";\nimport { AssetNotLoadedError } from \"@/assets/errors\";\nimport { AssetRecord } from \"@/assets/record\";\nimport { Size2D } from \"@/attributes/layout/size\";\n\n/** How an adapter picks the decode resolution and how strict it is about what it cannot load. `\"exact\"` (export, stills): the level follows the current draw alone, so a frame is the same whatever was drawn before on a reused adapter, and an undescribed font family is refused. `\"interactive\"` (preview): reuse any resident level that is good enough, upgrade in the background, and draw an undescribed family in the fallback face. */\nexport type DecodePolicy = \"exact\" | \"interactive\";\n\nexport abstract class StorageAdapter {\n protected catalog: AssetCatalog;\n protected viewport: Size2D;\n constructor(catalog: AssetCatalog, viewport: Size2D) {\n this.catalog = catalog;\n this.viewport = viewport;\n }\n\n /** Points the adapter at a different catalog, keeping its caches. Safe because the catalog supplies only *metadata* and caches are keyed by source URL: a dropped src leaves an orphaned decode, an added one isn't cached yet. The viewport has no such setter; changing output size rebuilds the adapter. */\n setCatalog(catalog: AssetCatalog): void {\n this.catalog = catalog;\n }\n /** Every asset src whose load is in flight, with its promise; the render path awaits these so no draw happens mid-load. */\n protected inFlightLoads = new Map<string, Promise<void>>();\n /** Keys of assets that have been fully loaded and are ready to use. */\n protected cachedAssets = new Set<string>();\n\n /** Whether `key` has finished loading and is usable now. */\n isLoaded(key: string): boolean {\n return this.cachedAssets.has(key);\n }\n\n async loadAsset(key: string, value: AssetRecord): Promise<void> {\n const existing = this.inFlightLoads.get(key);\n if (existing) return existing;\n if (this.cachedAssets.has(key)) return;\n\n const job = this.runLoad(key, value);\n this.inFlightLoads.set(key, job);\n try {\n await job;\n } finally {\n this.inFlightLoads.delete(key);\n }\n }\n\n private async runLoad(key: string, value: AssetRecord): Promise<void> {\n let loaded = true;\n switch (value.type) {\n case 'image':\n await this.loadImage(key);\n break;\n case 'video':\n await this.loadVideo(key, value.startFrame, value.endFrame, value.trimStart, value.trimEnd);\n break;\n case 'font': {\n const { fontFamily, fontWeight } = this.parseFontKey(key);\n loaded = await this.loadFont(key, fontFamily, fontWeight);\n if (!loaded && this.getDecodePolicy() === \"exact\") {\n throw new AssetNotLoadedError(\n \"font\",\n fontFamily,\n `The manifest has no font entry for \"${fontFamily}\", so this frame would be shaped against the fallback face and differ from the one drawn once it is described. Add the family to the manifest's font record.`,\n );\n }\n break;\n }\n case 'audio':\n // Audio files load on demand via fetchAudioData / syncAudio, not loadAsset.\n break;\n case 'loader':\n // Loaders are opaque callbacks run directly by the AssetManager and\n // never dispatched through the storage adapter.\n throw new Error(\"Loader records must not be routed through StorageAdapter.loadAsset\");\n default: {\n const _exhaustive: never = value;\n throw new Error(`Unsupported asset type: ${(_exhaustive as AssetRecord).type}`);\n }\n }\n\n // Only a load that happened is cached: caching an undescribable font family marked it handled for this adapter's life, so a manifest that later described it (installing a typeface) could never load it.\n if (loaded) this.cachedAssets.add(key);\n }\n\n protected parseFontKey(key: string): { fontFamily: string; fontWeight: number } {\n const [fontFamily, weightStr] = key.split('@');\n const fontWeight = weightStr ? parseInt(weightStr, 10) : 400;\n return {\n fontFamily: fontFamily || key,\n fontWeight: isNaN(fontWeight) ? 400 : fontWeight,\n };\n }\n\n /** Decode resolution follows the draw, so a load names only the source. */\n abstract loadImage(src: string): Promise<void>;\n abstract loadVideo(\n src: string,\n startFrame: number,\n endFrame: number,\n trimStart: number,\n trimEnd?: number,\n ): Promise<void>;\n abstract loadAudio(\n src: string,\n startFrame: number,\n endFrame: number,\n trimStart: number,\n trimEnd?: number,\n ): Promise<void>;\n abstract fetchAudioData(src: string): Promise<ArrayBuffer>;\n /** Registers every face of `fontFamily` the catalog describes; `false` means the manifest has no entry. Not an error while previewing (the platform fallback shapes it), but a blocking caller refuses it (see {@link DecodePolicy}), and it must not be remembered as handled either way (see {@link runLoad}). */\n abstract loadFont(src: string, fontFamily: string, fontWeight: number): Promise<boolean>;\n\n /** Decodes any exact media frames the last render needed but couldn't satisfy synchronously (a video frame at a freshly-seeked time) and reports whether there were any. A blocking caller renders, awaits this, and re-renders while it returns true. No-op by default. */\n async warmPendingVideo(): Promise<boolean> {\n return false;\n }\n\n setDecodePolicy(policy: DecodePolicy): void {\n }\n\n /** Read back so a caller that borrows the adapter can restore it. */\n getDecodePolicy(): DecodePolicy {\n return \"interactive\";\n }\n\n /** Whether the most recent render left decodes that {@link warmPendingDecodes} would settle. */\n hasPendingDecodes(): boolean {\n return false;\n }\n\n /** Settles what the last render could not draw acceptably under the current policy (video frames, every exact image level under `\"exact\"`, a source drawn with nothing resident under `\"interactive\"`); reports whether there was any. Defaults to {@link warmPendingVideo} so older adapters keep working. See `renderSettled`. */\n async warmPendingDecodes(): Promise<boolean> {\n return this.warmPendingVideo();\n }\n\n /** Whether an `\"interactive\"` decode is on its way that would draw the last render sharper. A paint doesn't wait for it; a preview repaints when {@link warmPendingUpgrades} reports a landing. */\n hasPendingUpgrades(): boolean {\n return false;\n }\n\n async warmPendingUpgrades(): Promise<boolean> {\n return false;\n }\n\n /** Whether playback is live: video prefetches ahead only while playing and quiesces on pause. No-op by default. */\n setPlaying(playing: boolean): void {\n }\n\n dispose(): void {\n this.inFlightLoads.clear();\n this.cachedAssets.clear();\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "67HAqEO,IAAMA,EAA2B,CAAE,MAAO,KAAM,OAAQ,IAAI,EACtDC,EAAc,GAEdC,GAAoD,CAAE,SAAUF,EAAkB,IAAKC,CAAW,EAClGE,EAAgC,CAAE,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,MAAO,CAAA,EAAI,KAAM,CAAA,CAAE,EAW3EC,EAAP,KAAa,CAKF,SAJJ,SACA,IAET,YACaC,EACTC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AI,EAAE,CAClF,CACJ,CAGIJ,GAAQ,KAAK,aAAa,IAAIJ,CAAG,CACzC,CAEU,aAAaA,EAAW,CAC9B,GAAM,CAACK,EAAYI,CAAS,EAAIT,EAAI,MAAM,GAAG,EACvCM,EAAaG,EAAY,SAASA,EAAW,EAAE,EAAI,IACzD,MAAO,CACH,WAAYJ,GAAcL,EAC1B,WAAY,MAAMM,CAAU,EAAI,IAAMA,EAE9C,CAuBA,MAAM,kBAAgB,CAClB,MAAO,EACX,CAEA,gBAAgBI,EAAoB,CACpC,CAGA,iBAAe,CACX,MAAO,aACX,CAGA,mBAAiB,CACb,MAAO,EACX,CAGA,MAAM,oBAAkB,CACpB,OAAO,KAAK,iBAAgB,CAChC,CAGA,oBAAkB,CACd,MAAO,EACX,CAEA,MAAM,qBAAmB,CACrB,MAAO,EACX,CAGA,WAAWC,EAAgB,CAC3B,CAEA,SAAO,CACH,KAAK,cAAc,MAAK,EACxB,KAAK,aAAa,MAAK,CAC3B",
|
|
6
6
|
"names": ["DEFAULT_VIEWPORT", "DEFAULT_FPS", "DEFAULT_OUTPUT", "EMPTY_MANIFEST", "Engine", "platform", "options", "Registry", "manifest", "notify", "Session", "key", "nodeOrSource", "pack", "AudioSink", "muted", "volume", "StorageAdapter", "catalog", "viewport", "key", "value", "existing", "job", "loaded", "fontFamily", "fontWeight", "AssetNotLoadedError", "_exhaustive", "weightStr", "policy", "playing"]
|
|
7
7
|
}
|
package/dist/browser/sdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as Fo,$a as vt,A as oo,Ac as Ht,B as to,Ba as
|
|
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};
|
|
2
2
|
//# sourceMappingURL=sdk.js.map
|
package/dist/browser/sdk.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/modules/paint3d.ts"],
|
|
4
4
|
"sourcesContent": ["import type { NormalizedColor } from \"@/attributes/shape/fill/color/parser\";\nimport type { FillResolved } from \"@/attributes/shape/fill/union\";\nimport type { StrokeResolved } from \"@/attributes/shape/stroke/stroke\";\nimport { resolveFill3D, type Fill3D } from \"@/render3d/fill3d\";\nimport type { Geometry3D } from \"@/render3d/geometry\";\nimport type { Graphics3D } from \"@/render3d/graphics3d\";\nimport type { BasicMaterial3D, Material3D, StandardMaterial3D } from \"@/render3d/material\";\nimport type { Transform3D } from \"@/render3d/transform\";\nimport type { Quaternion } from \"@/render3d/vector3\";\nimport { Types } from \"@/components/factory/types\";\nimport * as Paint from \"@/components/modules/paint\";\n\n/**\n * A custom 3D node's paint: the same `fill` and `stroke` entries a 2D shape takes, so a 3D component never invents\n * `color`, `lineColor` or `lineWidth`. Spread `...Paint3D.state` and `...Paint3D.commands`, then draw the surface with\n * {@link material} and the lines with {@link lines}. Built-in meshes keep `Material.state`.\n */\nexport const state = {\n fill: Types.fill,\n stroke: Types.stroke,\n};\n\n/** `fillTo` and `strokeTo`, the same commands `Paint` has. */\nexport const commands = {\n fillTo: Paint.commands.fillTo,\n strokeTo: Paint.commands.strokeTo,\n};\n\n/** A point in a node's own 3D space. */\nexport type Vec3 = readonly [number, number, number];\n\n/** A line segment from one point to another. */\nexport type Segment3D = readonly [Vec3, Vec3];\n\n/** A stroke `weight`, `dash` or `dashOffset` of 1 is this many scene units: weights are thousandths of a unit. */\nexport const STROKE_UNIT = 0.001;\n\n/** The surface options {@link material} takes: `type` picks the shading, and every other field is laid over the result. */\nexport type MaterialOptions =\n | ({ readonly type?: \"basic\" } & Partial<Omit<BasicMaterial3D, \"type\">>)\n | ({ readonly type: \"standard\" } & Partial<Omit<StandardMaterial3D, \"type\">>);\n\n/** The colour a fill layer is when it is one flat colour with no blend; `null` for anything else. */\nfunction solidOf(layer: FillResolved | undefined): { color: NormalizedColor; alpha: number } | null {\n if (layer === undefined || layer.type !== \"solid\") return null;\n if (layer.blend !== undefined) return null;\n const color = layer.color;\n return { color, alpha: (color[3] ?? 1) * (layer.opacity ?? 1) };\n}\n\n/**\n * The material a surface painted with `fill` wears. Unlit (`basic`) by default; `{ type: \"standard\" }` lights it.\n *\n * - **One solid layer** becomes `color` with its alpha as `opacity`, so `fillTo` between colours tweens the uniforms\n * and allocates nothing.\n * - **Anything else** (a gradient, an image, a stack of layers) goes through `resolveFill3D` and becomes a `map`.\n * - **An empty fill** gives an invisible material (`visible: false`), as an empty 2D fill paints nothing.\n *\n * Fields in `extra` are laid over the result; its `opacity` multiplies the fill's.\n */\nexport function material(fill: readonly FillResolved[], extra: MaterialOptions = {}): Material3D {\n const { type = \"basic\", opacity: extraOpacity, ...rest } = extra as MaterialOptions & { opacity?: number };\n const scale = extraOpacity ?? 1;\n if (fill.length === 0) return { type, ...rest, visible: false } as Material3D;\n const solid = fill.length === 1 ? solidOf(fill[0]) : null;\n if (solid !== null) {\n const [r, g, b] = solid.color;\n return { type, color: [r, g, b, 1], opacity: solid.alpha * scale, ...rest } as Material3D;\n }\n const resolved = resolveFill3D(fill as unknown as Fill3D);\n return {\n type,\n ...(resolved.color !== undefined ? { color: resolved.color } : {}),\n ...(resolved.map !== undefined ? { map: resolved.map } : {}),\n ...(extraOpacity !== undefined ? { opacity: extraOpacity } : {}),\n ...rest,\n } as Material3D;\n}\n\n/** What {@link lines} takes besides the strokes and segments. */\nexport interface LinesOptions {\n /**\n * Draw through solids: `depthTest: false, depthWrite: false`, and blended so it draws after every opaque mesh. For\n * the hidden lines a CAD view shows dashed through the body.\n */\n readonly through?: boolean;\n /**\n * Added to both ends of every segment: a surface's normal times the gap. A line laid on a face needs a gap of at\n * least the camera distance ÷ 2000 (`docs/3d.md`, Depth rule 2); a bar centred on a solid's edge needs none. Leave\n * it out to place the segments yourself.\n */\n readonly lift?: Vec3;\n /** A transform for the whole draw, as `Graphics3D.instances` takes one. */\n readonly transform?: Transform3D;\n}\n\n/** The unit box each bar scales: 1 long on x, 1 by 1 across. */\nexport const BAR: Geometry3D = { type: \"box\", width: 1, height: 1, depth: 1 };\n\n/** The turn that carries +x onto the unit direction `d`. */\nfunction turnOnto(dx: number, dy: number, dz: number): Quaternion {\n // About +x cross d, by the angle between them; straight back along -x turns half way round y.\n if (dx <= -0.9999) return { x: 0, y: 1, z: 0, w: 0 };\n const qy = -dz;\n const qz = dy;\n const qw = 1 + dx;\n const l = Math.hypot(qy, qz, qw);\n return { x: 0, y: qy / l, z: qz / l, w: qw / l };\n}\n\n/** A square bar from `p` to `q`, `w` across, running `extend` past each end. */\nexport function bar(p: Vec3, q: Vec3, w: number, extend = 0): Transform3D {\n const dx = q[0] - p[0];\n const dy = q[1] - p[1];\n const dz = q[2] - p[2];\n const len = Math.hypot(dx, dy, dz) || 1e-9;\n return {\n position: [(p[0] + q[0]) / 2, (p[1] + q[1]) / 2, (p[2] + q[2]) / 2],\n quaternion: turnOnto(dx / len, dy / len, dz / len),\n scale: [len + extend * 2, w, w],\n };\n}\n\n/** The pattern a `dash` repeats, in scene units: an odd list runs twice, as in SVG; `null` for a solid line. */\nfunction dashPattern(dash: readonly number[] | undefined): number[] | null {\n if (dash === undefined || dash.length === 0) return null;\n const units = dash.map((d) => Math.max(0, d) * STROKE_UNIT);\n const pattern = units.length % 2 === 1 ? [...units, ...units] : units;\n return pattern.reduce((sum, d) => sum + d, 0) > 1e-9 ? pattern : null;\n}\n\n/** The stretches `[from, to]` along a segment `length` long that a dash pattern draws, starting `offset` into it. */\nexport function dashes(length: number, pattern: readonly number[], offset = 0): [number, number][] {\n const period = pattern.reduce((sum, d) => sum + d, 0);\n const out: [number, number][] = [];\n if (period <= 0 || length <= 0) return out;\n // Start at the beginning of the period the offset falls in, before the segment.\n let at = -(((offset % period) + period) % period);\n let i = 0;\n const end = length - 1e-9;\n while (at < end) {\n const d = pattern[i % pattern.length]!;\n if (i % 2 === 0 && d > 0) {\n const from = Math.max(0, at);\n const to = Math.min(length, at + d);\n if (to - from > 1e-9) out.push([from, to]);\n }\n at += d;\n i++;\n }\n return out;\n}\n\n/** The bars one stroke layer draws along `segments`. */\nfunction barsFor(stroke: StrokeResolved, segments: readonly Segment3D[], lift: Vec3 | undefined): Transform3D[] {\n const w = stroke.weight * STROKE_UNIT;\n // `round` has no round end to draw on a box, so it ends flush, as `butt` does.\n const extend = stroke.cap === \"square\" ? w / 2 : 0;\n const pattern = dashPattern(stroke.dash);\n const offset = stroke.dashOffset * STROKE_UNIT;\n const out: Transform3D[] = [];\n for (const [a, b] of segments) {\n const p: Vec3 = lift ? [a[0] + lift[0], a[1] + lift[1], a[2] + lift[2]] : a;\n const q: Vec3 = lift ? [b[0] + lift[0], b[1] + lift[1], b[2] + lift[2]] : b;\n const length = Math.hypot(q[0] - p[0], q[1] - p[1], q[2] - p[2]);\n if (length <= 1e-9) continue;\n if (pattern === null) {\n out.push(bar(p, q, w, extend));\n continue;\n }\n const at = (s: number): Vec3 => {\n const t = s / length;\n return [p[0] + (q[0] - p[0]) * t, p[1] + (q[1] - p[1]) * t, p[2] + (q[2] - p[2]) * t];\n };\n for (const [from, to] of dashes(length, pattern, offset)) out.push(bar(at(from), at(to), w, extend));\n }\n return out;\n}\n\n/** The unlit material one stroke layer draws with, or `null` when it would draw nothing. */\nfunction strokeMaterial(stroke: StrokeResolved, through: boolean): Material3D | null {\n const solid = stroke.fill.map(solidOf).find((s) => s !== null) ?? null;\n if (solid === null || solid.alpha <= 0) return null;\n const [r, g, b] = solid.color;\n const blended = solid.alpha < 1 || through;\n return {\n type: \"basic\",\n color: [r, g, b, 1],\n opacity: solid.alpha,\n ...(blended ? { transparent: true, depthWrite: false } : {}),\n ...(through ? { depthTest: false } : {}),\n } as Material3D;\n}\n\n/**\n * Draws `segments` with each layer of `stroke`, one `g3.instances` call of unit boxes per layer, bottom to top.\n *\n * - **`weight`, `dash` and `dashOffset` are thousandths of a scene unit**: weight 5.5 is a 0.0055-wide bar, a CAD\n * hairline on a model a few units across.\n * - **Caps**: `square` runs each bar (and each dash) half the weight past its ends, so outline corners close; `butt`\n * ends flush. `round` ends flush too, as `butt` does: a box has no round end.\n * - **Colour** is the layer's first solid fill, its alpha the bar's `opacity` (below 1 the bars blend and stop writing\n * depth). A layer with no solid fill, or nothing opaque in it, draws nothing; so does an empty `stroke`.\n * - `align`, `join`, markers and the shape of `startCap`/`endCap` are 2D path ideas and are ignored.\n */\nexport function lines(g3: Graphics3D, stroke: readonly StrokeResolved[], segments: readonly Segment3D[], options: LinesOptions = {}): Graphics3D {\n const through = options.through ?? false;\n for (const layer of stroke) {\n if (!(layer.weight > 0)) continue;\n const ink = strokeMaterial(layer, through);\n if (ink === null) continue;\n const bars = barsFor(layer, segments, options.lift);\n if (bars.length === 0) continue;\n g3.instances(BAR, ink, bars, options.transform ? { transform: options.transform } : undefined);\n }\n return g3;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "qwDAGA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,SAAAE,EAAA,gBAAAC,EAAA,QAAAC,EAAA,aAAAC,GAAA,WAAAC,EAAA,UAAAC,GAAA,aAAAC,GAAA,UAAAC,KAcO,IAA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IK,IAAQ,KAAM,SAClB,IAAMC,EAAOd,GAAQ9C,EAAOgD,EAAUU,EAAQ,IAAI,EAC9CE,EAAK,SAAW,GACpBH,EAAG,UAAU1C,EAAK4C,EAAKC,EAAMF,EAAQ,UAAY,CAAE,UAAWA,EAAQ,SAAS,EAAK,MAAS,CACjG,CACA,OAAOD,CACX",
|
|
6
6
|
"names": ["paint3d_exports", "__export", "BAR", "STROKE_UNIT", "bar", "commands", "dashes", "lines", "material", "state", "state", "Types", "commands", "STROKE_UNIT", "solidOf", "layer", "color", "material", "fill", "extra", "type", "extraOpacity", "rest", "scale", "solid", "r", "g", "b", "resolved", "resolveFill3D", "BAR", "turnOnto", "dx", "dy", "dz", "qy", "qz", "qw", "l", "bar", "p", "q", "w", "extend", "len", "dashPattern", "dash", "units", "d", "pattern", "sum", "dashes", "length", "offset", "period", "out", "at", "i", "end", "from", "to", "barsFor", "stroke", "segments", "lift", "a", "s", "t", "strokeMaterial", "through", "blended", "lines", "g3", "options", "ink", "bars"]
|
|
7
7
|
}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -106,8 +106,8 @@ export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParalle
|
|
|
106
106
|
export type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween/index.js';
|
|
107
107
|
export { linear, easeIn, easeOut, easeInOut } from '../tween/index.js';
|
|
108
108
|
export type { EasingFunction, EaseParams, StandardEase } from '../tween/index.js';
|
|
109
|
-
export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, } from '../util/index.js';
|
|
110
|
-
export type { Reference, RefTarget, Context, DataRecord, ParseCSVOptions, } from '../util/index.js';
|
|
109
|
+
export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, deprecate, warnDeprecated, } from '../util/index.js';
|
|
110
|
+
export type { Reference, RefTarget, Context, DataRecord, ParseCSVOptions, Deprecation, } from '../util/index.js';
|
|
111
111
|
export { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement.js';
|
|
112
112
|
export type { PlacementIssue, PlacementOptions } from '../document/placement.js';
|
|
113
113
|
export { nodeBox, pickNode, collectBoxes, parentPlanePointAt, childPlanePointAt, reparentPlacementAt, nodeHandlesAt, handleValueAt, } from '../runtime/node-picking.js';
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACR,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpD,YAAY,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,aAAa,GAChB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACH,gBAAgB,EAChB,mBAAmB,EAGnB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,aAAa,EAEb,QAAQ,GACX,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,GACxB,MAAM,eAAe,CAAC;AACvB,Y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U,CAAC;AAClB,YAAY,EACR,cAAc,EACd,UAAU,EACV,YAAY,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACR,SAAS,EACT,SAAS,EACT,OAAO,EACP,UAAU,EACV,eAAe,GAClB,MAAM,SAAS,CAAC;AAKjB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChG,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,OAAO,EACP,iBAAiB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACR,YAAY,GACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACR,eAAe,EACf,KAAK,GACR,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACR,KAAK,EACL,WAAW,EACX,UAA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,gCAAgC,CAAC;AACxC,YAAY,EACR,SAAS,GACZ,MAAM,YAAY,CAAC"}
|
package/dist/sdk/index.js
CHANGED
|
@@ -91,7 +91,7 @@ export { lerpNumber, } from '../tween/index.js';
|
|
|
91
91
|
// 1)` is a single command, not a builder; sequencing is by timeline placement.
|
|
92
92
|
export { getCommandMeta, isCommand, makeCommand, commandSequence, commandParallel, loopCommand, } from '../tween/index.js';
|
|
93
93
|
export { linear, easeIn, easeOut, easeInOut } from '../tween/index.js';
|
|
94
|
-
export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, } from '../util/index.js';
|
|
94
|
+
export { createRef, clamp, generateList, createContext, ContextMap, Random, SeedGenerator, parseCSV, parseData, deprecate, warnDeprecated, } from '../util/index.js';
|
|
95
95
|
// Pure functions over a scene's node tree, in viewport space (origin at the viewport centre, y-up); a player
|
|
96
96
|
// embedding reaches the same through `useMotionPlayer`. They live in `../runtime` but are deep-imported from
|
|
97
97
|
// their files, never the runtime barrel.
|
package/dist/sdk/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,sGAAsG;AACtG,wGAAwG;AACxG,iFAAiF;AAEjF,sFAAsF;AACtF,OAAO,EACH,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,aAAa,EACb,OAAO,EACP,YAAY,GACf,MAAM,aAAa,CAAC;AAKrB,0GAA0G;AAC1G,6EAA6E;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAoBnD,OAAO,EACH,gBAAgB,EAChB,mBAAmB;AACnB,8GAA8G;AAC9G,sCAAsC;AACtC,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,eAA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ACX,eAAe,EACf,eAAe,EACf,WAAW,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAOlB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,GACZ,MAAM,SAAS,CAAC;AASjB,6GAA6G;AAC7G,6GAA6G;AAC7G,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface: published as `@motionscript/sdk`, a one-line passthrough of\n// `@motionscript/core/sdk` (this file). A deliberate subset of core's root barrel (`../index.ts`): no\n// `Engine`/`Session`/platform seams, no `@internal` descriptor plumbing. Every export is named from its\n// declaring sub-barrel, never a wildcard, so nothing internal leaks by accident.\n\n// A lone still or composition is sugar for a one-track project (`asProjectDocument`).\nexport {\n isProjectDocument,\n asProjectDocument,\n documentDuration,\n commandSpan,\n hasTimeline,\n nodeSpan,\n effectiveSpan,\n untimed,\n ROOT_NODE_ID,\n} from '../document';\nexport type {\n ProjectDocument,\n Track,\n} from '../document';\n// `resolveProjectDocument`/`placeTracks` live in `../runtime` but are deep-imported from their files: the\n// runtime barrel also carries `Engine`/`Session` and is never a source here.\nexport { resolveProjectDocument } from '../runtime/session';\nexport { placeTracks } from '../runtime/placement';\nexport type { TrackSpan } from '../runtime/placement';\nexport type {\n Theme,\n ColorTokens,\n Typography,\n TypographyPreset,\n} from '../project';\nexport type { NodeTime, AttachScope } from '../components/trees';\nexport type { BoxBounds, Extents } from '../layout';\n\nexport type {\n ImageMeta,\n VideoMeta,\n AudioMeta,\n FontMeta,\n AssetMeta,\n AssetManifest,\n} from '../assets';\n\nexport {\n validateDocument,\n assertValidDocument,\n // Saved documents carry the format they were written in; these bring one forward, and a host rewriting stored\n // node rows calls `migrateNodeProps`.\n DOCUMENT_FORMAT_VERSION,\n DocumentTooNewError,\n documentFormatVersion,\n migrateDocument,\n migrateNodeProps,\n missingNodeOf,\n // Not a singleton: what a document can name is a property of the registry compiling it.\n Registry,\n} from '../document';\n// The shader-pack vocabulary lives beside the fill/shader attribute machinery, not in `../document`.\nexport {\n normalizeShaderPack,\n resolveShaderProperties,\n isKnownShaderProperty,\n} from '../attributes';\nexport type {\n RegistryOptions,\n NodeTypeMap,\n ShaderPackMap,\n NodeTypeRecord,\n NodeCommandEntry,\n VisualDocument,\n ClipDocument,\n StillDocument,\n CompositionDocument,\n AudioDocument,\n NodeSpec,\n TimedNodeSpec,\n NodeSpan,\n CommandSpec,\n EaseSpec,\n LoopSpec,\n LoopDirection,\n VariableSpec,\n ValidationIssue,\n ValidationResult,\n ValidateOptions,\n DocumentChange,\n DocumentMigrationResult,\n PropMigration,\n PropNote,\n MissingNodeInfo,\n NodeConstructor,\n CommandFactory,\n CommandTypeEntry,\n VariableCommandFactory,\n VariableLerp,\n VariableTarget,\n} from '../document';\nexport type {\n Shader,\n FillShader,\n EffectShader,\n ShaderProperty,\n KnownShaderProperty,\n ShaderPropertyValues,\n} from '../attributes';\n\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint or rewrite an expression\n// without reimplementing the grammar.\nexport { expressionOps, ExpressionError } from '../document';\nexport type {\n ParsedExpression,\n ExpressionNode,\n ExpressionDialect,\n VariableResolver,\n} from '../document';\n\n// A component is one object literal; behaviour is spread in from modules (`...Paint.state`) and their helpers\n// called (`Paint.draw`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.\nexport { component2d } from '../components/factory/component2d';\nexport { componentAudio } from '../components/factory/component-audio';\nexport { component3d } from '../components/factory/component3d';\nexport { commandsFor } from '../components/factory/commands-for';\nexport { Types } from '../components/factory/types';\nexport { provides } from '../components/factory/api';\nexport * as Paint from '../components/modules/paint';\nexport * as Flow from '../components/modules/flow';\nexport * as Shapes from '../components/modules/shapes';\nexport * as Aim from '../components/modules/aim';\n// The face text is set in: its entries inherit from the nearest provider.\nexport * as Typeface from '../components/modules/text-style';\nexport * as TextLayout from '../components/modules/text-layout';\n// A mesh's surface: the material entries, and the mesh drawn with them.\nexport * as Material from '../components/modules/material';\n// A custom 3D node's paint: the 2D `fill` and `stroke` entries, as a material and as lines.\nexport * as Paint3D from '../components/modules/paint3d';\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\nexport * as View3D from '../components/modules/view3d';\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\nexport type { StyleGroups, StyleInput, StyleOptions, StyleShape, StyleValues } from '../components/factory/style';\nexport type {\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\n Timeline, Type, Values, Writes,\n // Named in every component's type, so a package exporting one can declare it.\n Merge, BuiltNode,\n // What `render` is handed; `RenderContext2D` is the renderer's.\n RenderContext2D as RenderContext,\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\n RenderContext3D as SceneContext,\n} from '../components/factory/api';\n\n// Types only: a node type is a component, never a subclass.\nexport type { Node, Node2D } from '../components/trees';\nexport {\n // A clip's root container: layout frame, background paint and camera in\n // one node. Every track builds into one sized to the viewport.\n Canvas2D,\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\n findNode2D,\n frameIn,\n} from '../components/trees';\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\nexport type {\n NodeProps,\n Node2DProps,\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\n ChildPlacement,\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\n ChildPlane,\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\n NodeHandle,\n Canvas2DProps,\n NodeConfig,\n NodeChildren,\n NodeDimension,\n} from '../components/trees';\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\n\nexport {\n Rect,\n Ellipse,\n Path,\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\n // where `Path` draws its `d` at face value.\n PathShape,\n Polygon,\n Polygram,\n Triangle,\n RightTriangle,\n Pentagon,\n Hexagon,\n Octagon,\n Star,\n} from '../components/builtins/geometry/geometry';\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\nexport type {\n PaintProps,\n ShapeProps,\n RectProps,\n FlexSize,\n EllipseProps,\n PathProps,\n PathShapeProps,\n PolygonProps,\n PolygramProps,\n} from '../components/builtins/geometry/geometry';\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\n// not node-prop types.\nexport type {\n BooleanOperation,\n MaskMode,\n MaskOptions,\n} from '../attributes';\n\nexport {\n Camera,\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\n OrbitCamera,\n RotatedBox,\n} from '../components/builtins/layout/layout';\nexport type {\n CameraProps,\n OrbitCameraProps,\n} from '../components/builtins/layout/layout';\n\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\nexport type {\n TextProps,\n RichTextProps,\n NumberProps,\n NumberFormat,\n DefaultTextStyleProps,\n} from '../components/builtins/text/text';\nexport { textOps } from '../attributes';\nexport type {\n TextStyle,\n TextAlign,\n VerticalAlign,\n TextDecoration,\n TextCase,\n TextSpan,\n TextRun,\n FontStyle,\n} from '../attributes';\n\nexport { Video } from '../components/builtins/media/media';\nexport type {\n VideoProps,\n VideoSegment,\n} from '../components/builtins/media/media';\n\n// Levels are `Param`, so a fade is a ramp or transition rather than a `to()`: sound is scheduled once, ahead\n// of time.\nexport type { NodeAudio } from '../components/trees';\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\nexport {\n Sound,\n AudioEffects,\n ramp,\n hold,\n isRamp,\n} from '../attributes';\nexport type {\n NodeAudioProps,\n} from '../components/trees';\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\nexport type {\n SoundProps,\n AudioRequest,\n AudioBusStop,\n AudioEffect,\n AudioEffectsInput,\n AudioTransition,\n Param,\n Ramp,\n RampKey,\n} from '../attributes';\n\n// One 3D node; everything inside it is described with `Graphics3D`. `Surface2D` is the 2D to 3D bridge: a\n// child of `Canvas3D` whose 2D content is rasterized offscreen and bound to a material by `Tex.surface(name)`.\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\nexport type { Node3D } from '../components/trees';\n// The 3D scene graph: components, each placed by its transform.\nexport {\n Group3D,\n Mesh3D,\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\n PointLight3D, SpotLight3D, AreaLight3D,\n Camera3D,\n Fog3D, Environment3D,\n} from '../components/builtins/three/three';\nexport {\n Graphics3D,\n Scene3D,\n RenderContext3D,\n Geo,\n Mat,\n Tex,\n lerpVector3,\n lerpEuler3,\n slerpQuaternion,\n quaternionFromEuler,\n normalizeQuaternion,\n resolveVector3,\n evaluateParametric,\n evaluateRoundedBox,\n resolveSurfaceSource,\n resolveFill3D,\n segmentsOf,\n resolveCameraPlacement,\n resolveShadows3D,\n shadowCasts,\n shadowReceives,\n} from '../render3d';\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\nexport type {\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\n ChildSpace3D,\n Node3DProps,\n} from '../components/trees';\nexport type {\n Group3DProps, Mesh3DProps, Material3DProps,\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\n Camera3DProps,\n Fog3DProps, Environment3DProps,\n} from '../components/builtins/three/three';\nexport type {\n Node3DRenderState,\n Graphics3DOp,\n Scene3DOp,\n Vector3,\n Vector3Input,\n Euler3,\n EulerOrder,\n Quaternion,\n Transform3D,\n Shadow3D,\n ShadowOptions3D,\n Faces3D,\n Blend3D,\n Shading3D,\n Segments3D,\n Sweep3D,\n Bevel3D,\n Fill3D,\n Geometry3D,\n BufferGeometry3D,\n Material3D,\n MaterialCommon3D,\n MeshShorthand3D,\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\n MaterialShorthand3D,\n Uniform3D,\n Texture3D,\n TextureOptions3D,\n SurfaceTexture3D,\n SurfaceSource3D,\n ResolvedSurfaceSource,\n LightData3D,\n CameraData3D,\n FogData3D,\n EnvironmentData3D,\n Shadows3D,\n ShadowSettings3D,\n ToneMapping3D,\n ToneSettings3D,\n PostEffect3D,\n LineMode3D,\n LineStroke3D,\n ModelAnimation3D,\n} from '../render3d';\n\nexport {\n Graphics2D,\n PathBuilder,\n Clip,\n toPathString,\n} from '../render';\nexport type {\n RenderContext2D,\n RenderPass2D,\n MeasureContext2D,\n TextBlockSource,\n // One recorded entry of `Graphics2D.ops()`.\n GraphicsOp,\n PathData,\n PathCommand,\n PathBounds,\n EllipseArc,\n} from '../render';\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\nexport type { AssetScope, LoaderFn } from '../assets';\n\nexport {\n Fills,\n parseColor,\n resolveFill,\n fillOps,\n colorOps,\n} from '../attributes';\nexport type {\n Fill,\n FillChain,\n FillOptions,\n VideoFillOptions,\n // Placement of an image/video source inside the shape it paints:\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\n MediaPlacementOptions,\n ImageFit,\n ImageCrop,\n ImageMatrix,\n FillResolved,\n // A custom WGSL shader as a fill. Uniforms are keyed by their declared\n // name, and a `ShaderTexture` is an image it samples.\n ShaderFillProp,\n ShaderFillResolved,\n ShaderTexture,\n ShaderUniformRecord,\n FractalNoiseBasis,\n // The colour type every fill, stroke, shadow and 3D material accepts —\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\n // pre-normalized RGBA tuple.\n Color,\n NormalizedColor,\n BlendMode,\n FillSpace,\n} from '../attributes';\n\nexport {\n resolveStroke,\n strokeOps,\n resolveShadow,\n shadowOps,\n resolveCorners,\n cornerRadiusOps,\n cornerStyleOps,\n // Parsing, measuring, sampling, trimming and morphing a path, and the\n // anchor model (`VectorPath`) a pen tool edits.\n pathOps,\n} from '../attributes';\nexport type {\n PathSampler,\n PathAnchor,\n PathSubpath,\n VectorPath,\n Stroke,\n StrokeProp,\n StrokeAlign,\n StrokeCap,\n StrokeMarker,\n StrokeEnd,\n StrokeJoin,\n StrokeResolved,\n Shadow,\n ShadowProp,\n ShadowResolved,\n Corners,\n CornerStyle,\n CornerStyleResolved,\n CornerRadiusResolved,\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\n RectCornerRadius,\n RectCornerStyle,\n NodeEffect,\n} from '../attributes';\n\n// `flowOps` is the layout a container runs on its children, as plain data in and boxes out, so a custom node\n// can lay out what it draws the same way.\nexport {\n lerpVector2,\n sizeInputOps,\n insetsOps,\n alignmentOps,\n} from '../attributes';\n// `flowOps` itself is the layout package's, not the attribute layer's —\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\nexport { flowOps } from '../layout';\nexport type {\n Vector2,\n Size2D,\n Insets,\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\n InsetsProps,\n InsetsResolved,\n AlignmentKey,\n Alignment,\n} from '../attributes';\nexport type {\n FlowMode,\n GapSize,\n FlowResolved,\n FlowProps,\n FlowSettings,\n LayoutItem,\n FlowSpace,\n FlowMeasure,\n FlowLine,\n // What an overriding `measure(constraints, scope)` is handed.\n SizeConstraints,\n} from '../layout';\n\n// `space3dOps` is the camera's own projection, for a host drawing over the picture rather than keeping a copy.\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D space.\nexport { space3dOps } from '../attributes/layout/space3d';\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\n\n// `describeEffect`/`effectDescriptors` describe each built-in effect's fields as plain JSON, so a host builds\n// its effect UI from the engine.\nexport { describeEffect, effectDescriptors } from '../attributes';\nexport type {\n EffectDescriptor,\n EffectParamDescriptor,\n EffectParamKind,\n EffectParamUnit,\n EffectParamControl,\n EffectGroup,\n EffectJson,\n} from '../attributes';\nexport {\n Effects,\n EffectChain,\n Adjustments,\n VideoAdjustments,\n AdjustmentChain,\n VideoAdjustmentChain,\n} from '../attributes';\n\nexport type {\n /** The `effects` prop type — what a node actually accepts. */\n Effect,\n EffectMode,\n EffectAxis,\n EffectSurface,\n EffectOptions,\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\n ImageAdjustment,\n VideoAdjustment,\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\n EffectAdjustment,\n MediaAdjustment,\n VideoOnlyAdjustment,\n} from '../attributes';\n\n/**\n * Per-builder options. Every effect builder takes exactly one argument: one of\n * these, or the dominant scalar it wraps.\n */\nexport type {\n BlurOptions,\n DirectionalBlurOptions,\n GrayscaleOptions,\n PixelateOptions,\n BulgeOptions,\n MagnifyOptions,\n BloomOptions,\n VintageOptions,\n ChromaticAberrationOptions,\n InvertOptions,\n ScatterOptions,\n PosterizeOptions,\n MotionBlurOptions,\n ShaderEffectOptions,\n OutlineOptions,\n VignetteOptions,\n GrainOptions,\n SharpenOptions,\n EdgesOptions,\n ThresholdOptions,\n RadialBlurOptions,\n HalftoneOptions,\n DitherOptions,\n DuotoneOptions,\n CurvesOptions,\n ColorAdjustmentOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n BlockDisplaceOptions,\n BitCrushOptions,\n AsciiOptions,\n StreakOptions,\n GlowOptions,\n OilPaintOptions,\n WaveOptions,\n TwirlOptions,\n ProgressiveBlurOptions,\n KaleidoscopeOptions,\n GlassOptions,\n LutOptions,\n} from '../attributes';\n\n/**\n * Per-builder options for the filters that exist only as filters. Everything\n * else on {@link Adjustments} takes the matching effect options above, minus\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\n * point it at.\n */\nexport type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n VideoEchoFilterOptions,\n} from '../attributes';\n\n/** Effect data types, for naming an effect value or building one by hand. */\nexport type {\n BlurEffect,\n DirectionalBlurEffect,\n GrayscaleEffect,\n PixelateEffect,\n BulgeEffect,\n MagnifyEffect,\n BloomEffect,\n VintageEffect,\n ChromaticAberrationEffect,\n InvertEffect,\n InvertChannel,\n ScatterEffect,\n PosterizeEffect,\n MotionBlurEffect,\n MotionBlurAlignment,\n ShaderEffect,\n ShaderUniform,\n ShaderUniformValue,\n OutlineEffect,\n OutlinePosition,\n VignetteEffect,\n GrainEffect,\n SharpenEffect,\n EdgesEffect,\n EdgeKernel,\n ThresholdEffect,\n RadialBlurEffect,\n RadialBlurStyle,\n HalftoneEffect,\n HalftoneShape,\n HalftoneSeparation,\n DitherEffect,\n DitherMatrix,\n DuotoneEffect,\n CurvesEffect,\n ColorAdjustmentEffect,\n RgbShiftEffect,\n ScanlinesEffect,\n BlockDisplaceEffect,\n BitCrushEffect,\n BitCrushPalette,\n AsciiEffect,\n AsciiCharset,\n StreakEffect,\n GlowEffect,\n GlowChannel,\n GlowLoopStyle,\n GlowOriginal,\n GlowTint,\n OilPaintEffect,\n WaveEffect,\n WaveShape,\n TwirlEffect,\n ProgressiveBlurEffect,\n ProgressiveBlurShape,\n KaleidoscopeEffect,\n GlassEffect,\n LutEffect,\n} from '../attributes';\n\nexport {\n lerpNumber,\n} from '../tween';\nexport type {\n AnimationTarget,\n Steppable,\n TweenStepper,\n LerpFunction,\n TweenOptions,\n} from '../tween';\n\n// An animation as a value: a declared duration plus `at(t)`, so a host can ask what it looks like at a time\n// instead of running it to one. A component's `commands` return one. One command shape, always: `node.to(a,\n// 1)` is a single command, not a builder; sequencing is by timeline placement.\nexport {\n getCommandMeta,\n isCommand,\n makeCommand,\n commandSequence,\n commandParallel,\n loopCommand,\n} from '../tween';\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\n\nexport {\n linear,\n easeIn,\n easeOut,\n easeInOut\n} from '../tween';\nexport type {\n EasingFunction,\n EaseParams,\n StandardEase\n} from '../tween';\n\nexport {\n createRef,\n clamp,\n generateList,\n createContext,\n ContextMap,\n Random,\n SeedGenerator,\n parseCSV,\n parseData,\n} from '../util';\nexport type {\n Reference,\n RefTarget,\n Context,\n DataRecord,\n ParseCSVOptions,\n} from '../util';\n\n// Pure functions over a scene's node tree, in viewport space (origin at the viewport centre, y-up); a player\n// embedding reaches the same through `useMotionPlayer`. They live in `../runtime` but are deep-imported from\n// their files, never the runtime barrel.\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\n\nexport {\n nodeBox,\n pickNode,\n collectBoxes,\n parentPlanePointAt,\n childPlanePointAt,\n reparentPlacementAt,\n nodeHandlesAt,\n handleValueAt,\n} from '../runtime/node-picking';\nexport type {\n NodeBox,\n ReparentPlacement,\n} from '../runtime/node-picking';\nexport type {\n NodeOverride,\n} from '../runtime/playback-controller';\nexport type {\n TreeState,\n} from '../project';\n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,EACX,YAAY,EACZ,SAAS,EACT,YAAY,GACf,MAAM,eAAe,CAAC;AACvB,wEAAwE;AACxE,iFAAiF;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBpC,+GAA+G;AAC/G,mFAAmF;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG1D,8GAA8G;AAC9G,iCAAiC;AACjC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUlE,OAAO,EACH,OAAO,EACP,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACvB,MAAM,eAAe,CAAC;AAiJvB,OAAO,EACH,UAAU,GACb,MAAM,UAAU,CAAC;AASlB,4GAA4G;AAC5G,4GAA4G;AAC5G,+EAA+E;AAC/E,OAAO,EACH,cAAc,EACd,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,WAAW,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EACH,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,EACZ,MAAM,UAAU,CAAC;AAOlB,OAAO,EACH,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,MAAM,EACN,aAAa,EACb,QAAQ,EACR,SAAS,EACT,SAAS,EACT,cAAc,GACjB,MAAM,SAAS,CAAC;AAUjB,6GAA6G;AAC7G,6GAA6G;AAC7G,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGhG,OAAO,EACH,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,aAAa,GAChB,MAAM,yBAAyB,CAAC","sourcesContent":["// The curated public surface: published as `@motionscript/sdk`, a one-line passthrough of\n// `@motionscript/core/sdk` (this file). A deliberate subset of core's root barrel (`../index.ts`): no\n// `Engine`/`Session`/platform seams, no `@internal` descriptor plumbing. Every export is named from its\n// declaring sub-barrel, never a wildcard, so nothing internal leaks by accident.\n\n// A lone still or composition is sugar for a one-track project (`asProjectDocument`).\nexport {\n isProjectDocument,\n asProjectDocument,\n documentDuration,\n commandSpan,\n hasTimeline,\n nodeSpan,\n effectiveSpan,\n untimed,\n ROOT_NODE_ID,\n} from '../document';\nexport type {\n ProjectDocument,\n Track,\n} from '../document';\n// `resolveProjectDocument`/`placeTracks` live in `../runtime` but are deep-imported from their files: the\n// runtime barrel also carries `Engine`/`Session` and is never a source here.\nexport { resolveProjectDocument } from '../runtime/session';\nexport { placeTracks } from '../runtime/placement';\nexport type { TrackSpan } from '../runtime/placement';\nexport type {\n Theme,\n ColorTokens,\n Typography,\n TypographyPreset,\n} from '../project';\nexport type { NodeTime, AttachScope } from '../components/trees';\nexport type { BoxBounds, Extents } from '../layout';\n\nexport type {\n ImageMeta,\n VideoMeta,\n AudioMeta,\n FontMeta,\n AssetMeta,\n AssetManifest,\n} from '../assets';\n\nexport {\n validateDocument,\n assertValidDocument,\n // Saved documents carry the format they were written in; these bring one forward, and a host rewriting stored\n // node rows calls `migrateNodeProps`.\n DOCUMENT_FORMAT_VERSION,\n DocumentTooNewError,\n documentFormatVersion,\n migrateDocument,\n migrateNodeProps,\n missingNodeOf,\n // Not a singleton: what a document can name is a property of the registry compiling it.\n Registry,\n} from '../document';\n// The shader-pack vocabulary lives beside the fill/shader attribute machinery, not in `../document`.\nexport {\n normalizeShaderPack,\n resolveShaderProperties,\n isKnownShaderProperty,\n} from '../attributes';\nexport type {\n RegistryOptions,\n NodeTypeMap,\n ShaderPackMap,\n NodeTypeRecord,\n NodeCommandEntry,\n VisualDocument,\n ClipDocument,\n StillDocument,\n CompositionDocument,\n AudioDocument,\n NodeSpec,\n TimedNodeSpec,\n NodeSpan,\n CommandSpec,\n EaseSpec,\n LoopSpec,\n LoopDirection,\n VariableSpec,\n ValidationIssue,\n ValidationResult,\n ValidateOptions,\n DocumentChange,\n DocumentMigrationResult,\n PropMigration,\n PropNote,\n MissingNodeInfo,\n NodeConstructor,\n CommandFactory,\n CommandTypeEntry,\n VariableCommandFactory,\n VariableLerp,\n VariableTarget,\n} from '../document';\nexport type {\n Shader,\n FillShader,\n EffectShader,\n ShaderProperty,\n KnownShaderProperty,\n ShaderPropertyValues,\n} from '../attributes';\n\n// `expressionOps` carries recognition, parsing and compiling, so a host can lint or rewrite an expression\n// without reimplementing the grammar.\nexport { expressionOps, ExpressionError } from '../document';\nexport type {\n ParsedExpression,\n ExpressionNode,\n ExpressionDialect,\n VariableResolver,\n} from '../document';\n\n// A component is one object literal; behaviour is spread in from modules (`...Paint.state`) and their helpers\n// called (`Paint.draw`). See `packages/core/docs/why.md#node-types-are-factory-specs-not-decorated-classes`.\nexport { component2d } from '../components/factory/component2d';\nexport { componentAudio } from '../components/factory/component-audio';\nexport { component3d } from '../components/factory/component3d';\nexport { commandsFor } from '../components/factory/commands-for';\nexport { Types } from '../components/factory/types';\nexport { provides } from '../components/factory/api';\nexport * as Paint from '../components/modules/paint';\nexport * as Flow from '../components/modules/flow';\nexport * as Shapes from '../components/modules/shapes';\nexport * as Aim from '../components/modules/aim';\n// The face text is set in: its entries inherit from the nearest provider.\nexport * as Typeface from '../components/modules/text-style';\nexport * as TextLayout from '../components/modules/text-layout';\n// A mesh's surface: the material entries, and the mesh drawn with them.\nexport * as Material from '../components/modules/material';\n// A custom 3D node's paint: the 2D `fill` and `stroke` entries, as a material and as lines.\nexport * as Paint3D from '../components/modules/paint3d';\n// A viewport onto 3D children: the default camera and lights, the grid, the render settings.\nexport * as View3D from '../components/modules/view3d';\nexport type { Attribute, EntryOptions, NumberOptions, TextOptions } from '../components/factory/types';\nexport type { StyleGroups, StyleInput, StyleOptions, StyleShape, StyleValues } from '../components/factory/style';\nexport type {\n Box2DState, BoxAudioState, CallProps, ChildView, Children2D, Component, Element, Entry, InOf, Inputs, Loader,\n Measurer, MergePaint, NodeOf, NodeView, OutOf, Piece, Placement2D, Provided, SoundOptions, StateSpec,\n Timeline, Type, Values, Writes,\n // Named in every component's type, so a package exporting one can declare it.\n Merge, BuiltNode,\n // What `render` is handed; `RenderContext2D` is the renderer's.\n RenderContext2D as RenderContext,\n CallProps3D, Placement3DProps, Transform3DState, Handle, LayoutBox, NodeFrame,\n // What a 3D `render` is handed; `RenderContext3D` is the renderer's.\n RenderContext3D as SceneContext,\n} from '../components/factory/api';\n\n// Types only: a node type is a component, never a subclass.\nexport type { Node, Node2D } from '../components/trees';\nexport {\n // A clip's root container: layout frame, background paint and camera in\n // one node. Every track builds into one sized to the viewport.\n Canvas2D,\n // Reaching another node by the id a `nodeRef` prop holds, and reading where it sits.\n findNode2D,\n frameIn,\n} from '../components/trees';\nexport { Provider, ThemeProvider } from '../components/builtins/providers/providers';\nexport type {\n NodeProps,\n Node2DProps,\n // A slot a layout puts each child in beyond its box — see `Node2D._placementOf`.\n ChildPlacement,\n // A parent's own coordinates for its children's `x`/`y` — see `Node2D._planeOf`.\n ChildPlane,\n // A point an editor can drag to set a `Vector2` prop — see `Node2D._handles`.\n NodeHandle,\n Canvas2DProps,\n NodeConfig,\n NodeChildren,\n NodeDimension,\n} from '../components/trees';\nexport type { ProviderProps, ThemeProviderProps } from '../components/builtins/providers/providers';\n\nexport {\n Rect,\n Ellipse,\n Path,\n // The document's `\"path\"`: its `data` is in the unit space of its own box,\n // where `Path` draws its `d` at face value.\n PathShape,\n Polygon,\n Polygram,\n Triangle,\n RightTriangle,\n Pentagon,\n Hexagon,\n Octagon,\n Star,\n} from '../components/builtins/geometry/geometry';\nexport { BooleanGroup, MaskGroup } from '../components/builtins/geometry/composite';\nexport type {\n PaintProps,\n ShapeProps,\n RectProps,\n FlexSize,\n EllipseProps,\n PathProps,\n PathShapeProps,\n PolygonProps,\n PolygramProps,\n} from '../components/builtins/geometry/geometry';\nexport type { BooleanGroupProps, MaskGroupProps } from '../components/builtins/geometry/composite';\n// The operation/mode vocabularies behind `Boolean`/`Mask` are attribute types,\n// not node-prop types.\nexport type {\n BooleanOperation,\n MaskMode,\n MaskOptions,\n} from '../attributes';\n\nexport {\n Camera,\n // The stage's 2.5D camera for one subtree: its children orbited in depth.\n OrbitCamera,\n RotatedBox,\n} from '../components/builtins/layout/layout';\nexport type {\n CameraProps,\n OrbitCameraProps,\n} from '../components/builtins/layout/layout';\n\nexport { Text, RichText, NumberNode, DefaultTextStyle } from '../components/builtins/text/text';\nexport type {\n TextProps,\n RichTextProps,\n NumberProps,\n NumberFormat,\n DefaultTextStyleProps,\n} from '../components/builtins/text/text';\nexport { textOps } from '../attributes';\nexport type {\n TextStyle,\n TextAlign,\n VerticalAlign,\n TextDecoration,\n TextCase,\n TextSpan,\n TextRun,\n FontStyle,\n} from '../attributes';\n\nexport { Video } from '../components/builtins/media/media';\nexport type {\n VideoProps,\n VideoSegment,\n} from '../components/builtins/media/media';\n\n// Levels are `Param`, so a fade is a ramp or transition rather than a `to()`: sound is scheduled once, ahead\n// of time.\nexport type { NodeAudio } from '../components/trees';\nexport { AudioBus, SoundNode } from '../components/builtins/audio/audio';\nexport {\n Sound,\n AudioEffects,\n ramp,\n hold,\n isRamp,\n} from '../attributes';\nexport type {\n NodeAudioProps,\n} from '../components/trees';\nexport type { AudioBusProps, SoundNodeProps } from '../components/builtins/audio/audio';\nexport type {\n SoundProps,\n AudioRequest,\n AudioBusStop,\n AudioEffect,\n AudioEffectsInput,\n AudioTransition,\n Param,\n Ramp,\n RampKey,\n} from '../attributes';\n\n// One 3D node; everything inside it is described with `Graphics3D`. `Surface2D` is the 2D to 3D bridge: a\n// child of `Canvas3D` whose 2D content is rasterized offscreen and bound to a material by `Tex.surface(name)`.\nexport { Canvas3D } from '../components/builtins/three/canvas3d';\nexport type { Node3D } from '../components/trees';\n// The 3D scene graph: components, each placed by its transform.\nexport {\n Group3D,\n Mesh3D,\n Box3D, Sphere3D, Plane3D, Cylinder3D, Cone3D, Torus3D, TorusKnot3D,\n Circle3D, Ring3D, Capsule3D, Polyhedron3D, Extrude3D, Lathe3D, Tube3D,\n Instances3D, Points3D, Line3D, Sprite3D, Model3D,\n AmbientLight3D, HemisphereLight3D, DirectionalLight3D,\n PointLight3D, SpotLight3D, AreaLight3D,\n Camera3D,\n Fog3D, Environment3D,\n} from '../components/builtins/three/three';\nexport {\n Graphics3D,\n Scene3D,\n RenderContext3D,\n Geo,\n Mat,\n Tex,\n lerpVector3,\n lerpEuler3,\n slerpQuaternion,\n quaternionFromEuler,\n normalizeQuaternion,\n resolveVector3,\n evaluateParametric,\n evaluateRoundedBox,\n resolveSurfaceSource,\n resolveFill3D,\n segmentsOf,\n resolveCameraPlacement,\n resolveShadows3D,\n shadowCasts,\n shadowReceives,\n} from '../render3d';\nexport type { Canvas3DProps } from '../components/builtins/three/canvas3d';\nexport type {\n // A 3D parent's own coordinates for its children's position: see `Node3D._spaceOf`.\n ChildSpace3D,\n Node3DProps,\n} from '../components/trees';\nexport type {\n Group3DProps, Mesh3DProps, Material3DProps,\n Box3DProps, Sphere3DProps, Plane3DProps, Cylinder3DProps, Cone3DProps,\n Torus3DProps, TorusKnot3DProps, Circle3DProps, Ring3DProps, Capsule3DProps,\n Polyhedron3DProps, Extrude3DProps, Lathe3DProps, Tube3DProps,\n Instances3DProps, Points3DProps, Line3DProps, Sprite3DProps, Model3DProps,\n AmbientLight3DProps, HemisphereLight3DProps, DirectionalLight3DProps,\n PointLight3DProps, SpotLight3DProps, AreaLight3DProps,\n Camera3DProps,\n Fog3DProps, Environment3DProps,\n} from '../components/builtins/three/three';\nexport type {\n Node3DRenderState,\n Graphics3DOp,\n Scene3DOp,\n Vector3,\n Vector3Input,\n Euler3,\n EulerOrder,\n Quaternion,\n Transform3D,\n Shadow3D,\n ShadowOptions3D,\n Faces3D,\n Blend3D,\n Shading3D,\n Segments3D,\n Sweep3D,\n Bevel3D,\n Fill3D,\n Geometry3D,\n BufferGeometry3D,\n Material3D,\n MaterialCommon3D,\n MeshShorthand3D,\n // What `Mesh3D.materialShorthand()` returns: a mesh node of your own overrides it.\n MaterialShorthand3D,\n Uniform3D,\n Texture3D,\n TextureOptions3D,\n SurfaceTexture3D,\n SurfaceSource3D,\n ResolvedSurfaceSource,\n LightData3D,\n CameraData3D,\n FogData3D,\n EnvironmentData3D,\n Shadows3D,\n ShadowSettings3D,\n ToneMapping3D,\n ToneSettings3D,\n PostEffect3D,\n LineMode3D,\n LineStroke3D,\n ModelAnimation3D,\n} from '../render3d';\n\nexport {\n Graphics2D,\n PathBuilder,\n Clip,\n toPathString,\n} from '../render';\nexport type {\n RenderContext2D,\n RenderPass2D,\n MeasureContext2D,\n TextBlockSource,\n // One recorded entry of `Graphics2D.ops()`.\n GraphicsOp,\n PathData,\n PathCommand,\n PathBounds,\n EllipseArc,\n} from '../render';\n// What a node's `declareAssets` declares into, and the async load a `loader` takes.\nexport type { AssetScope, LoaderFn } from '../assets';\n\nexport {\n Fills,\n parseColor,\n resolveFill,\n fillOps,\n colorOps,\n} from '../attributes';\nexport type {\n Fill,\n FillChain,\n FillOptions,\n VideoFillOptions,\n // Placement of an image/video source inside the shape it paints:\n // `crop` -> `fit` -> `zoom` -> `anchor`, plus the raw-matrix escape hatch.\n MediaPlacementOptions,\n ImageFit,\n ImageCrop,\n ImageMatrix,\n FillResolved,\n // A custom WGSL shader as a fill. Uniforms are keyed by their declared\n // name, and a `ShaderTexture` is an image it samples.\n ShaderFillProp,\n ShaderFillResolved,\n ShaderTexture,\n ShaderUniformRecord,\n FractalNoiseBasis,\n // The colour type every fill, stroke, shadow and 3D material accepts —\n // a CSS string (incl. `oklch()`, theme tokens, `\"white/10\"`) or a\n // pre-normalized RGBA tuple.\n Color,\n NormalizedColor,\n BlendMode,\n FillSpace,\n} from '../attributes';\n\nexport {\n resolveStroke,\n strokeOps,\n resolveShadow,\n shadowOps,\n resolveCorners,\n cornerRadiusOps,\n cornerStyleOps,\n // Parsing, measuring, sampling, trimming and morphing a path, and the\n // anchor model (`VectorPath`) a pen tool edits.\n pathOps,\n} from '../attributes';\nexport type {\n PathSampler,\n PathAnchor,\n PathSubpath,\n VectorPath,\n Stroke,\n StrokeProp,\n StrokeAlign,\n StrokeCap,\n StrokeMarker,\n StrokeEnd,\n StrokeJoin,\n StrokeResolved,\n Shadow,\n ShadowProp,\n ShadowResolved,\n Corners,\n CornerStyle,\n CornerStyleResolved,\n CornerRadiusResolved,\n // What a rect's `cornerRadius` and `cornerStyle` take, before they resolve.\n RectCornerRadius,\n RectCornerStyle,\n NodeEffect,\n} from '../attributes';\n\n// `flowOps` is the layout a container runs on its children, as plain data in and boxes out, so a custom node\n// can lay out what it draws the same way.\nexport {\n lerpVector2,\n sizeInputOps,\n insetsOps,\n alignmentOps,\n} from '../attributes';\n// `flowOps` itself is the layout package's, not the attribute layer's —\n// `../attributes`'s own `./layout` only carries Vector2/Size2D/Insets/Alignment.\nexport { flowOps } from '../layout';\nexport type {\n Vector2,\n Size2D,\n Insets,\n // What a `padding`-style prop accepts, before `insetsOps` resolves it.\n InsetsProps,\n InsetsResolved,\n AlignmentKey,\n Alignment,\n} from '../attributes';\nexport type {\n FlowMode,\n GapSize,\n FlowResolved,\n FlowProps,\n FlowSettings,\n LayoutItem,\n FlowSpace,\n FlowMeasure,\n FlowLine,\n // What an overriding `measure(constraints, scope)` is handed.\n SizeConstraints,\n} from '../layout';\n\n// `space3dOps` is the camera's own projection, for a host drawing over the picture rather than keeping a copy.\n// `SpaceCamera` is what a node returns from `_spaceCamera()` to open a 2.5D space.\nexport { space3dOps } from '../attributes/layout/space3d';\nexport type { LookAt, SpaceCamera, SpaceCameraProps, SpacePoint } from '../attributes/layout/space3d';\n\n// `describeEffect`/`effectDescriptors` describe each built-in effect's fields as plain JSON, so a host builds\n// its effect UI from the engine.\nexport { describeEffect, effectDescriptors } from '../attributes';\nexport type {\n EffectDescriptor,\n EffectParamDescriptor,\n EffectParamKind,\n EffectParamUnit,\n EffectParamControl,\n EffectGroup,\n EffectJson,\n} from '../attributes';\nexport {\n Effects,\n EffectChain,\n Adjustments,\n VideoAdjustments,\n AdjustmentChain,\n VideoAdjustmentChain,\n} from '../attributes';\n\nexport type {\n /** The `effects` prop type — what a node actually accepts. */\n Effect,\n EffectMode,\n EffectAxis,\n EffectSurface,\n EffectOptions,\n /** What an image fill's `preset.adjustments` accepts — one, a list, or a chain. */\n ImageAdjustment,\n VideoAdjustment,\n /** The node effects that also work as a media adjustment — see {@link Adjustments}. */\n EffectAdjustment,\n MediaAdjustment,\n VideoOnlyAdjustment,\n} from '../attributes';\n\n/**\n * Per-builder options. Every effect builder takes exactly one argument: one of\n * these, or the dominant scalar it wraps.\n */\nexport type {\n BlurOptions,\n DirectionalBlurOptions,\n GrayscaleOptions,\n PixelateOptions,\n BulgeOptions,\n MagnifyOptions,\n BloomOptions,\n VintageOptions,\n ChromaticAberrationOptions,\n InvertOptions,\n ScatterOptions,\n PosterizeOptions,\n MotionBlurOptions,\n ShaderEffectOptions,\n OutlineOptions,\n VignetteOptions,\n GrainOptions,\n SharpenOptions,\n EdgesOptions,\n ThresholdOptions,\n RadialBlurOptions,\n HalftoneOptions,\n DitherOptions,\n DuotoneOptions,\n CurvesOptions,\n ColorAdjustmentOptions,\n RgbShiftOptions,\n ScanlinesOptions,\n BlockDisplaceOptions,\n BitCrushOptions,\n AsciiOptions,\n StreakOptions,\n GlowOptions,\n OilPaintOptions,\n WaveOptions,\n TwirlOptions,\n ProgressiveBlurOptions,\n KaleidoscopeOptions,\n GlassOptions,\n LutOptions,\n} from '../attributes';\n\n/**\n * Per-builder options for the filters that exist only as filters. Everything\n * else on {@link Adjustments} takes the matching effect options above, minus\n * `mode` — a filter is on the fill's own pixels, so there is no backdrop to\n * point it at.\n */\nexport type {\n BlurFilterOptions,\n GrayscaleFilterOptions,\n AlphaFilterOptions,\n ExposureFilterOptions,\n ColorMatrixFilterOptions,\n CurvesFilterOptions,\n ColorAdjustmentFilterOptions,\n PosterizeTimeFilterOptions,\n VideoEchoFilterOptions,\n} from '../attributes';\n\n/** Effect data types, for naming an effect value or building one by hand. */\nexport type {\n BlurEffect,\n DirectionalBlurEffect,\n GrayscaleEffect,\n PixelateEffect,\n BulgeEffect,\n MagnifyEffect,\n BloomEffect,\n VintageEffect,\n ChromaticAberrationEffect,\n InvertEffect,\n InvertChannel,\n ScatterEffect,\n PosterizeEffect,\n MotionBlurEffect,\n MotionBlurAlignment,\n ShaderEffect,\n ShaderUniform,\n ShaderUniformValue,\n OutlineEffect,\n OutlinePosition,\n VignetteEffect,\n GrainEffect,\n SharpenEffect,\n EdgesEffect,\n EdgeKernel,\n ThresholdEffect,\n RadialBlurEffect,\n RadialBlurStyle,\n HalftoneEffect,\n HalftoneShape,\n HalftoneSeparation,\n DitherEffect,\n DitherMatrix,\n DuotoneEffect,\n CurvesEffect,\n ColorAdjustmentEffect,\n RgbShiftEffect,\n ScanlinesEffect,\n BlockDisplaceEffect,\n BitCrushEffect,\n BitCrushPalette,\n AsciiEffect,\n AsciiCharset,\n StreakEffect,\n GlowEffect,\n GlowChannel,\n GlowLoopStyle,\n GlowOriginal,\n GlowTint,\n OilPaintEffect,\n WaveEffect,\n WaveShape,\n TwirlEffect,\n ProgressiveBlurEffect,\n ProgressiveBlurShape,\n KaleidoscopeEffect,\n GlassEffect,\n LutEffect,\n} from '../attributes';\n\nexport {\n lerpNumber,\n} from '../tween';\nexport type {\n AnimationTarget,\n Steppable,\n TweenStepper,\n LerpFunction,\n TweenOptions,\n} from '../tween';\n\n// An animation as a value: a declared duration plus `at(t)`, so a host can ask what it looks like at a time\n// instead of running it to one. A component's `commands` return one. One command shape, always: `node.to(a,\n// 1)` is a single command, not a builder; sequencing is by timeline placement.\nexport {\n getCommandMeta,\n isCommand,\n makeCommand,\n commandSequence,\n commandParallel,\n loopCommand,\n} from '../tween';\nexport type { Command, CommandArgs, CommandMeta, CommandOptions } from '../tween';\n\nexport {\n linear,\n easeIn,\n easeOut,\n easeInOut\n} from '../tween';\nexport type {\n EasingFunction,\n EaseParams,\n StandardEase\n} from '../tween';\n\nexport {\n createRef,\n clamp,\n generateList,\n createContext,\n ContextMap,\n Random,\n SeedGenerator,\n parseCSV,\n parseData,\n deprecate,\n warnDeprecated,\n} from '../util';\nexport type {\n Reference,\n RefTarget,\n Context,\n DataRecord,\n ParseCSVOptions,\n Deprecation,\n} from '../util';\n\n// Pure functions over a scene's node tree, in viewport space (origin at the viewport centre, y-up); a player\n// embedding reaches the same through `useMotionPlayer`. They live in `../runtime` but are deep-imported from\n// their files, never the runtime barrel.\nexport { nodeTypeIsA, parentIssue, placementIssues, siblingIssue } from '../document/placement';\nexport type { PlacementIssue, PlacementOptions } from '../document/placement';\n\nexport {\n nodeBox,\n pickNode,\n collectBoxes,\n parentPlanePointAt,\n childPlanePointAt,\n reparentPlacementAt,\n nodeHandlesAt,\n handleValueAt,\n} from '../runtime/node-picking';\nexport type {\n NodeBox,\n ReparentPlacement,\n} from '../runtime/node-picking';\nexport type {\n NodeOverride,\n} from '../runtime/playback-controller';\nexport type {\n TreeState,\n} from '../project';\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retiring an export: it keeps working, warns once in development, and names the release that removes it.
|
|
3
|
+
* Pair it with a `@deprecated … Remove in X.Y.Z.` doc comment naming the same release; editors read that, and
|
|
4
|
+
* `scripts/check-deprecations.mjs` fails CI once the package reaches it. A constant or type takes the comment
|
|
5
|
+
* alone. A component's retired prop stays for good under its spec's `deprecated`, since saved documents set it.
|
|
6
|
+
*/
|
|
7
|
+
export interface Deprecation {
|
|
8
|
+
/** The name callers import, as the warning prints it. */
|
|
9
|
+
readonly name: string;
|
|
10
|
+
/** What to write instead, as code: `"seriesPaint(series).fill"`. */
|
|
11
|
+
readonly use: string;
|
|
12
|
+
/** The release that removes it: the next major (`"1.0.0"`, or the next minor while on 0.x). */
|
|
13
|
+
readonly removeIn: string;
|
|
14
|
+
}
|
|
15
|
+
/** The sentence a deprecation warns with. */
|
|
16
|
+
export declare function deprecationMessage(notice: Deprecation): string;
|
|
17
|
+
/**
|
|
18
|
+
* Warn about `notice` once per name, in development only. For a use `deprecate` cannot wrap: a deprecated
|
|
19
|
+
* option read inside a function that otherwise stays.
|
|
20
|
+
*/
|
|
21
|
+
export declare function warnDeprecated(notice: Deprecation): void;
|
|
22
|
+
/**
|
|
23
|
+
* `fn`, unchanged in what it does and how it is typed, warning on its first call that `notice.use` replaces it.
|
|
24
|
+
* A class is not a function here: wrapping one would break `new` and `instanceof`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function deprecate<F extends (...args: never[]) => unknown>(fn: F, notice: Deprecation): F;
|
|
27
|
+
/** Forget what has been warned, so a test can see the same warning again. @internal */
|
|
28
|
+
export declare function resetDeprecationWarnings(): void;
|
|
29
|
+
//# sourceMappingURL=deprecate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecate.d.ts","sourceRoot":"","sources":["../../src/util/deprecate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,WAAW;IACxB,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,+FAA+F;IAC/F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC7B;AASD,6CAA6C;AAC7C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAE9D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAIxD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,CAAC,CAOhG;AAED,uFAAuF;AACvF,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retiring an export: it keeps working, warns once in development, and names the release that removes it.
|
|
3
|
+
* Pair it with a `@deprecated … Remove in X.Y.Z.` doc comment naming the same release; editors read that, and
|
|
4
|
+
* `scripts/check-deprecations.mjs` fails CI once the package reaches it. A constant or type takes the comment
|
|
5
|
+
* alone. A component's retired prop stays for good under its spec's `deprecated`, since saved documents set it.
|
|
6
|
+
*/
|
|
7
|
+
const warned = new Set();
|
|
8
|
+
/** `process` is absent in a browser that loads the ES modules unbundled; a bundler replaces the whole read. */
|
|
9
|
+
function isProduction() {
|
|
10
|
+
return typeof process !== "undefined" && process.env?.NODE_ENV === "production";
|
|
11
|
+
}
|
|
12
|
+
/** The sentence a deprecation warns with. */
|
|
13
|
+
export function deprecationMessage(notice) {
|
|
14
|
+
return `[motionscript] ${notice.name} is deprecated and will be removed in ${notice.removeIn}; use ${notice.use} instead.`;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Warn about `notice` once per name, in development only. For a use `deprecate` cannot wrap: a deprecated
|
|
18
|
+
* option read inside a function that otherwise stays.
|
|
19
|
+
*/
|
|
20
|
+
export function warnDeprecated(notice) {
|
|
21
|
+
if (isProduction() || warned.has(notice.name))
|
|
22
|
+
return;
|
|
23
|
+
warned.add(notice.name);
|
|
24
|
+
console.warn(deprecationMessage(notice));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* `fn`, unchanged in what it does and how it is typed, warning on its first call that `notice.use` replaces it.
|
|
28
|
+
* A class is not a function here: wrapping one would break `new` and `instanceof`.
|
|
29
|
+
*/
|
|
30
|
+
export function deprecate(fn, notice) {
|
|
31
|
+
const wrapped = function (...args) {
|
|
32
|
+
warnDeprecated(notice);
|
|
33
|
+
return fn.apply(this, args);
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(wrapped, "name", { value: notice.name });
|
|
36
|
+
return wrapped;
|
|
37
|
+
}
|
|
38
|
+
/** Forget what has been warned, so a test can see the same warning again. @internal */
|
|
39
|
+
export function resetDeprecationWarnings() {
|
|
40
|
+
warned.clear();
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=deprecate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecate.js","sourceRoot":"","sources":["../../src/util/deprecate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;AAEjC,+GAA+G;AAC/G,SAAS,YAAY;IACjB,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,QAAQ,KAAK,YAAY,CAAC;AACpF,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,kBAAkB,CAAC,MAAmB;IAClD,OAAO,kBAAkB,MAAM,CAAC,IAAI,yCAAyC,MAAM,CAAC,QAAQ,SAAS,MAAM,CAAC,GAAG,WAAW,CAAC;AAC/H,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,MAAmB;IAC9C,IAAI,YAAY,EAAE,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO;IACtD,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAA0C,EAAK,EAAE,MAAmB;IACzF,MAAM,OAAO,GAAG,UAAyB,GAAG,IAAmB;QAC3D,cAAc,CAAC,MAAM,CAAC,CAAC;QACvB,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAkB,CAAC;IACjD,CAAC,CAAC;IACF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/D,OAAO,OAAuB,CAAC;AACnC,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,wBAAwB;IACpC,MAAM,CAAC,KAAK,EAAE,CAAC;AACnB,CAAC","sourcesContent":["/**\n * Retiring an export: it keeps working, warns once in development, and names the release that removes it.\n * Pair it with a `@deprecated … Remove in X.Y.Z.` doc comment naming the same release; editors read that, and\n * `scripts/check-deprecations.mjs` fails CI once the package reaches it. A constant or type takes the comment\n * alone. A component's retired prop stays for good under its spec's `deprecated`, since saved documents set it.\n */\n\nexport interface Deprecation {\n /** The name callers import, as the warning prints it. */\n readonly name: string;\n /** What to write instead, as code: `\"seriesPaint(series).fill\"`. */\n readonly use: string;\n /** The release that removes it: the next major (`\"1.0.0\"`, or the next minor while on 0.x). */\n readonly removeIn: string;\n}\n\nconst warned = new Set<string>();\n\n/** `process` is absent in a browser that loads the ES modules unbundled; a bundler replaces the whole read. */\nfunction isProduction(): boolean {\n return typeof process !== \"undefined\" && process.env?.NODE_ENV === \"production\";\n}\n\n/** The sentence a deprecation warns with. */\nexport function deprecationMessage(notice: Deprecation): string {\n return `[motionscript] ${notice.name} is deprecated and will be removed in ${notice.removeIn}; use ${notice.use} instead.`;\n}\n\n/**\n * Warn about `notice` once per name, in development only. For a use `deprecate` cannot wrap: a deprecated\n * option read inside a function that otherwise stays.\n */\nexport function warnDeprecated(notice: Deprecation): void {\n if (isProduction() || warned.has(notice.name)) return;\n warned.add(notice.name);\n console.warn(deprecationMessage(notice));\n}\n\n/**\n * `fn`, unchanged in what it does and how it is typed, warning on its first call that `notice.use` replaces it.\n * A class is not a function here: wrapping one would break `new` and `instanceof`.\n */\nexport function deprecate<F extends (...args: never[]) => unknown>(fn: F, notice: Deprecation): F {\n const wrapped = function (this: unknown, ...args: Parameters<F>): ReturnType<F> {\n warnDeprecated(notice);\n return fn.apply(this, args) as ReturnType<F>;\n };\n Object.defineProperty(wrapped, \"name\", { value: notice.name });\n return wrapped as unknown as F;\n}\n\n/** Forget what has been warned, so a test can see the same warning again. @internal */\nexport function resetDeprecationWarnings(): void {\n warned.clear();\n}\n"]}
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './clamp.js';
|
|
2
2
|
export * from './context.js';
|
|
3
3
|
export * from './csv.js';
|
|
4
|
+
export { deprecate, deprecationMessage, warnDeprecated } from './deprecate.js';
|
|
5
|
+
export type { Deprecation } from './deprecate.js';
|
|
4
6
|
export * from './generateList.js';
|
|
5
7
|
export * from './metrics.js';
|
|
6
8
|
export * from './reference.js';
|
package/dist/util/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC3E,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/util/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './clamp.js';
|
|
2
2
|
export * from './context.js';
|
|
3
3
|
export * from './csv.js';
|
|
4
|
+
export { deprecate, deprecationMessage, warnDeprecated } from './deprecate.js';
|
|
4
5
|
export * from './generateList.js';
|
|
5
6
|
export * from './metrics.js';
|
|
6
7
|
export * from './reference.js';
|
package/dist/util/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA","sourcesContent":["export * from './clamp'\nexport * from './context'\nexport * from './csv'\nexport * from './generateList'\nexport * from './metrics'\nexport * from './reference'\nexport * from './scheduler'\nexport { Random, SeedGenerator } from './random'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA;AACzB,cAAc,OAAO,CAAA;AACrB,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE3E,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA","sourcesContent":["export * from './clamp'\nexport * from './context'\nexport * from './csv'\nexport { deprecate, deprecationMessage, warnDeprecated } from './deprecate'\nexport type { Deprecation } from './deprecate'\nexport * from './generateList'\nexport * from './metrics'\nexport * from './reference'\nexport * from './scheduler'\nexport { Random, SeedGenerator } from './random'\n"]}
|