@glissade/core 0.39.0-pre.1 → 0.40.0-pre.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/dist/timeline.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as emitDevWarning, H as spring, h as validateTrack } from "./targetRef.js";
1
+ import { L as emitDevWarning, f as validateTrack, z as spring } from "./track.js";
2
2
  //#region src/timeline.ts
3
3
  /**
4
4
  * The Timeline document (DESIGN.md §2.3) — the serializable animation source
package/dist/track.d.ts CHANGED
@@ -329,6 +329,14 @@ interface Track<T = unknown> {
329
329
  type: ValueTypeId;
330
330
  /** Sorted by t; enforced by validateTrack(). */
331
331
  keys: Key<T>[];
332
+ /**
333
+ * Expr (0.40): a serializable math-formula of the playhead `t`
334
+ * (e.g. `'100 + 50*sin(t*2)'`). When set, the track is sampled by evaluating the
335
+ * formula at `t` instead of interpolating `keys` (which may be empty). `type`
336
+ * must be 'number'. Compiled once + cached; a pure function of `t` (+ seeded
337
+ * `rand`), so the SAME time channel + determinism as keyframes.
338
+ */
339
+ expr?: string;
332
340
  /** Studio may own this track's keys via sidecar (§6.2). */
333
341
  editable?: boolean;
334
342
  /** Reserved (§2.2/§B.6): v2 additive blending. v1 accepts but ignores it (coalesce stays last-wins). */
@@ -389,6 +397,13 @@ declare function retime<T>(tracks: readonly Track<T>[], spec: RetimeSpec): Track
389
397
  declare function track<T>(target: string, type: ValueTypeId, keys: Key<T>[], opts?: {
390
398
  editable?: boolean;
391
399
  }): Track<T>;
400
+ /**
401
+ * Expr (0.40): build a raw formula-driven numeric track — `{ target, type:
402
+ * 'number', keys: [], expr }`. The public `exprTrack()` (on `@glissade/core/expr`,
403
+ * which also registers the evaluator) wraps this + validates. Kept here (base) so
404
+ * `tl.expr` can emit a track without dragging the evaluator onto the embed.
405
+ */
406
+
392
407
  declare function resolveEase(spec: EaseSpec | undefined): EasingFn;
393
408
  /**
394
409
  * Analytic d(u) for an ease spec (§B.6). Custom-registered eases without a