@motionscript/core 0.2.0 → 0.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +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,eAAe,EACf,gBAAgB,EAChB,aAAa;AACb,wFAAwF;AACxF,QAAQ,GACX,MAAM,aAAa,CAAC;AACrB,qGAAqG;AACrG,OAAO,EACH,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,GACxB,MAAM,eAAe,CAAC;AA4CvB,0GAA0G;AAC1G,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAQ7D,8GAA8G;AAC9G,6GAA6G;AAC7G,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD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// 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"]}
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,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"]}
@@ -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';
@@ -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"}
@@ -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';
@@ -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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motionscript/core",
3
- "version": "0.2.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "type": "module",
5
5
  "description": "Engine-agnostic animation library for Motion Script: scenes, nodes, props, tweens and layout.",
6
6
  "repository": {