@glissade/core 0.10.1-pre.0 → 0.10.1

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as validateTrack, A as GainEnvelope, At as inferValueType, B as emitDevWarning, C as resolveTweenTarget, Ct as ValueType, D as ChildEntry, Dt as booleanType, E as AudioClip, Et as Vec2, F as TimelineValidationError, Ft as stringType, G as TrackValidationError, H as Key, I as audioOffsetSamples, It as vec2ArcType, J as resolveEaseDerivative, K as key, L as compileTimeline, Lt as vec2Equals, M as Marker, Mt as paintType, N as Timeline, Nt as pathType, O as CompiledTimeline, Ot as colorType, P as TimelineInit, Pt as registerValueType, Q as track, R as isDurationEditable, Rt as vec2Type, S as isEditableNodeId, St as UnknownValueTypeError, T as AssetRef, Tt as ValueTypeInferenceError, U as KeyOpts, V as setDevWarning, W as Track, X as springTo, Y as sampleTrack, Z as stagger, _ as setSidecarTrack, _t as ColorStop, a as SidecarOrphan, at as springEasing, b as TweenTarget, bt as PathContour, c as SidecarVersionError, ct as DEFAULT_EASE, d as emptySidecar, dt as UnknownEasingError, et as velocityAt, f as hashKeys, ft as cubicBezier, g as normalizeEditedKeys, gt as namedEasing, h as migrateSidecar, ht as easings, i as SidecarDocV1, it as spring, j as Json, jt as numberType, k as FontFaceRef, kt as getValueType, l as assignKeyIds, lt as EaseSpec, m as mergeSidecarDetailed, mt as easingDerivatives, n as OrphanReason, nt as SpringConfig, o as SidecarTimelineEntry, ot as springEasingDerivative, p as mergeSidecar, pt as cubicBezierDerivative, q as resolveEase, r as SidecarDoc, rt as SpringEase, s as SidecarTrackEntry, st as springPresets, t as MergeResult, tt as RetargetSpring, u as deleteSidecarTrack, ut as EasingFn, v as TARGET_PATH, vt as HandoffKind, w as targetNodeId, wt as ValueTypeId, x as UnresolvableTargetError, xt as PathValue, y as TargetCarrier, yt as Paint, z as DevWarning } from "./sidecar.js";
1
+ import { $ as validateTrack, A as GainEnvelope, At as getValueType, B as emitDevWarning, C as resolveTweenTarget, Ct as UnknownValueTypeError, D as ChildEntry, Dt as Vec2, E as AudioClip, Et as ValueTypeInferenceError, F as TimelineValidationError, Ft as registerValueType, G as TrackValidationError, H as Key, I as audioOffsetSamples, It as stringType, J as resolveEaseDerivative, K as key, L as compileTimeline, Lt as vec2ArcType, M as Marker, Mt as numberType, N as Timeline, Nt as paintType, O as CompiledTimeline, Ot as booleanType, P as TimelineInit, Pt as pathType, Q as track, R as isDurationEditable, Rt as vec2Equals, S as isEditableNodeId, St as PathValue, T as AssetRef, Tt as ValueTypeId, U as KeyOpts, V as setDevWarning, W as Track, X as springTo, Y as sampleTrack, Z as stagger, _ as setSidecarTrack, _t as ColorStop, a as SidecarOrphan, at as springEasing, b as TweenTarget, bt as Paint, c as SidecarVersionError, ct as DEFAULT_EASE, d as emptySidecar, dt as UnknownEasingError, et as velocityAt, f as hashKeys, ft as cubicBezier, g as normalizeEditedKeys, gt as namedEasing, h as migrateSidecar, ht as easings, i as SidecarDocV1, it as spring, j as Json, jt as inferValueType, k as FontFaceRef, kt as colorType, l as assignKeyIds, lt as EaseSpec, m as mergeSidecarDetailed, mt as easingDerivatives, n as OrphanReason, nt as SpringConfig, o as SidecarTimelineEntry, ot as springEasingDerivative, p as mergeSidecar, pt as cubicBezierDerivative, q as resolveEase, r as SidecarDoc, rt as SpringEase, s as SidecarTrackEntry, st as springPresets, t as MergeResult, tt as RetargetSpring, u as deleteSidecarTrack, ut as EasingFn, v as TARGET_PATH, vt as GradientInterpolation, w as targetNodeId, wt as ValueType, x as UnresolvableTargetError, xt as PathContour, y as TargetCarrier, yt as HandoffKind, z as DevWarning, zt as vec2Type } from "./sidecar.js";
2
2
 
3
3
  //#region src/signal.d.ts
4
4
 
@@ -357,4 +357,4 @@ interface CheckpointedSim {
357
357
  }
358
358
  declare function bakeCheckpointed<W, S = W>(cfg: CheckpointedBakeConfig<W, S>): CheckpointedSim;
359
359
  //#endregion
360
- export { type AssetRef, type AudioClip, type BakeConfig, BakeError, type BindTarget, type BindableSignal, type BoundTimeline, type CheckpointedBakeConfig, type CheckpointedSim, type ChildEntry, CircularDependencyError, ColorParseError, type ColorStop, type CompiledTimeline, type CoverageReport, type CurveSampler, DEFAULT_EASE, type DevWarning, type EaseSpec, type EasingFn, type Equals, type FontFaceRef, type FontMode, type FontRegistry, type FontUsage, FontValidationError, type GainEnvelope, type HandoffKind, type Json, type Key, type KeyOpts, type Marker, type MergeResult, type MissingGlyphs, type OkLab, type OrphanReason, type Paint, type PathContour, type PathValue, type Playhead, type Position, PositionError, type ReadonlySignal, type ResolvedFace, type RetargetSpring, type Rgba, type Rng, type Scheduler, type SidecarDoc, type SidecarDocV1, type SidecarOrphan, type SidecarTimelineEntry, type SidecarTrackEntry, SidecarVersionError, type Signal, type SignalOptions, type SpringConfig, type SpringEase, TARGET_PATH, type TargetCarrier, type Timeline, type TimelineBuilder, type TimelineInit, TimelineValidationError, type Track, TrackValidationError, type TweenOpts, type TweenTarget, UnboundTargetError, UnknownEasingError, UnknownValueTypeError, UnresolvableTargetError, type ValidateFontsOptions, type ValueType, type ValueTypeId, ValueTypeInferenceError, type Vec2, type Vec2Signal, WriteDuringEvaluationError, assignKeyIds, audioOffsetSamples, bake, bakeCheckpointed, batch, beginReadPhase, bindTimeline, booleanType, buildFontRegistry, buildTimeline, colorType, compileTimeline, computed, createPlayhead, cubicBezier, cubicBezierDerivative, deleteSidecarTrack, easingDerivatives, easings, emitDevWarning, emptySidecar, endReadPhase, evaluateAt, formatColor, getTimelineCallbacks, getValueType, hashKeys, inReadPhase, inferValueType, isDurationEditable, isEditableNodeId, isExemptFamily, key, lerpColor, mergeSidecar, mergeSidecarDetailed, migrateSidecar, namedEasing, normalizeEditedKeys, numberType, oklabToRgba, paintType, parseCmap, parseColor, pathType, random, registerValueType, resolveEase, resolveEaseDerivative, resolveTweenTarget, rgbaToOklab, sampleTrack, setDevWarning, setScheduler, setSidecarTrack, signal, spring, springEasing, springEasingDerivative, springPresets, springTo, stagger, stringType, synchronousScheduler, targetNodeId, timeline, track, untracked, validateFonts, validateTrack, vec2ArcType, vec2Equals, vec2Signal, vec2Type, velocityAt };
360
+ export { type AssetRef, type AudioClip, type BakeConfig, BakeError, type BindTarget, type BindableSignal, type BoundTimeline, type CheckpointedBakeConfig, type CheckpointedSim, type ChildEntry, CircularDependencyError, ColorParseError, type ColorStop, type CompiledTimeline, type CoverageReport, type CurveSampler, DEFAULT_EASE, type DevWarning, type EaseSpec, type EasingFn, type Equals, type FontFaceRef, type FontMode, type FontRegistry, type FontUsage, FontValidationError, type GainEnvelope, type GradientInterpolation, type HandoffKind, type Json, type Key, type KeyOpts, type Marker, type MergeResult, type MissingGlyphs, type OkLab, type OrphanReason, type Paint, type PathContour, type PathValue, type Playhead, type Position, PositionError, type ReadonlySignal, type ResolvedFace, type RetargetSpring, type Rgba, type Rng, type Scheduler, type SidecarDoc, type SidecarDocV1, type SidecarOrphan, type SidecarTimelineEntry, type SidecarTrackEntry, SidecarVersionError, type Signal, type SignalOptions, type SpringConfig, type SpringEase, TARGET_PATH, type TargetCarrier, type Timeline, type TimelineBuilder, type TimelineInit, TimelineValidationError, type Track, TrackValidationError, type TweenOpts, type TweenTarget, UnboundTargetError, UnknownEasingError, UnknownValueTypeError, UnresolvableTargetError, type ValidateFontsOptions, type ValueType, type ValueTypeId, ValueTypeInferenceError, type Vec2, type Vec2Signal, WriteDuringEvaluationError, assignKeyIds, audioOffsetSamples, bake, bakeCheckpointed, batch, beginReadPhase, bindTimeline, booleanType, buildFontRegistry, buildTimeline, colorType, compileTimeline, computed, createPlayhead, cubicBezier, cubicBezierDerivative, deleteSidecarTrack, easingDerivatives, easings, emitDevWarning, emptySidecar, endReadPhase, evaluateAt, formatColor, getTimelineCallbacks, getValueType, hashKeys, inReadPhase, inferValueType, isDurationEditable, isEditableNodeId, isExemptFamily, key, lerpColor, mergeSidecar, mergeSidecarDetailed, migrateSidecar, namedEasing, normalizeEditedKeys, numberType, oklabToRgba, paintType, parseCmap, parseColor, pathType, random, registerValueType, resolveEase, resolveEaseDerivative, resolveTweenTarget, rgbaToOklab, sampleTrack, setDevWarning, setScheduler, setSidecarTrack, signal, spring, springEasing, springEasingDerivative, springPresets, springTo, stagger, stringType, synchronousScheduler, targetNodeId, timeline, track, untracked, validateFonts, validateTrack, vec2ArcType, vec2Equals, vec2Signal, vec2Type, velocityAt };
package/dist/sidecar.d.ts CHANGED
@@ -60,6 +60,14 @@ interface ColorStop {
60
60
  offset: number;
61
61
  color: string;
62
62
  }
63
+ /**
64
+ * How a gradient blends BETWEEN its stops: `linear` (the canvas-native ramp,
65
+ * the default — byte-identical to no mode), `smooth` (a smoothstep S-curve, no
66
+ * Mach-banding at stops), or `gaussian` (a soft gaussian shoulder — melts like
67
+ * a wide blur with 2-3 stops). `smooth`/`gaussian` densify + oklab-interpolate
68
+ * the stops at raster, so a soft-light fill reads as smooth as a blur, no filter.
69
+ */
70
+ type GradientInterpolation = 'linear' | 'smooth' | 'gaussian';
63
71
  /**
64
72
  * A fill/stroke paint (§2.2 animatable document value): a solid color, or a
65
73
  * `linear`/`radial` gradient. Geometry (`from`/`to`, `center`/`radius`) is in
@@ -74,11 +82,13 @@ type Paint = {
74
82
  stops: ColorStop[];
75
83
  from?: [number, number];
76
84
  to?: [number, number];
85
+ interpolation?: GradientInterpolation;
77
86
  } | {
78
87
  kind: 'radial';
79
88
  stops: ColorStop[];
80
89
  center?: [number, number];
81
90
  radius?: number;
91
+ interpolation?: GradientInterpolation;
82
92
  };
83
93
  /**
84
94
  * Gradient paint morphing (§2.2): a solid color lifts to a uniform gradient to
@@ -540,4 +550,4 @@ declare function mergeSidecar(code: Timeline, sidecar: SidecarDoc | SidecarDocV1
540
550
  */
541
551
  declare function normalizeEditedKeys(keys: Key[]): Key[];
542
552
  //#endregion
543
- export { validateTrack as $, GainEnvelope as A, inferValueType as At, emitDevWarning as B, resolveTweenTarget as C, ValueType as Ct, ChildEntry as D, booleanType as Dt, AudioClip as E, Vec2 as Et, TimelineValidationError as F, stringType as Ft, TrackValidationError as G, Key as H, audioOffsetSamples as I, vec2ArcType as It, resolveEaseDerivative as J, key as K, compileTimeline as L, vec2Equals as Lt, Marker as M, paintType as Mt, Timeline as N, pathType as Nt, CompiledTimeline as O, colorType as Ot, TimelineInit as P, registerValueType as Pt, track as Q, isDurationEditable as R, vec2Type as Rt, isEditableNodeId as S, UnknownValueTypeError as St, AssetRef as T, ValueTypeInferenceError as Tt, KeyOpts as U, setDevWarning as V, Track as W, springTo as X, sampleTrack as Y, stagger as Z, setSidecarTrack as _, ColorStop as _t, SidecarOrphan as a, springEasing as at, TweenTarget as b, PathContour as bt, SidecarVersionError as c, DEFAULT_EASE as ct, emptySidecar as d, UnknownEasingError as dt, velocityAt as et, hashKeys as f, cubicBezier as ft, normalizeEditedKeys as g, namedEasing as gt, migrateSidecar as h, easings as ht, SidecarDocV1 as i, spring as it, Json as j, numberType as jt, FontFaceRef as k, getValueType as kt, assignKeyIds as l, EaseSpec as lt, mergeSidecarDetailed as m, easingDerivatives as mt, OrphanReason as n, SpringConfig as nt, SidecarTimelineEntry as o, springEasingDerivative as ot, mergeSidecar as p, cubicBezierDerivative as pt, resolveEase as q, SidecarDoc as r, SpringEase as rt, SidecarTrackEntry as s, springPresets as st, MergeResult as t, RetargetSpring as tt, deleteSidecarTrack as u, EasingFn as ut, TARGET_PATH as v, HandoffKind as vt, targetNodeId as w, ValueTypeId as wt, UnresolvableTargetError as x, PathValue as xt, TargetCarrier as y, Paint as yt, DevWarning as z };
553
+ export { validateTrack as $, GainEnvelope as A, getValueType as At, emitDevWarning as B, resolveTweenTarget as C, UnknownValueTypeError as Ct, ChildEntry as D, Vec2 as Dt, AudioClip as E, ValueTypeInferenceError as Et, TimelineValidationError as F, registerValueType as Ft, TrackValidationError as G, Key as H, audioOffsetSamples as I, stringType as It, resolveEaseDerivative as J, key as K, compileTimeline as L, vec2ArcType as Lt, Marker as M, numberType as Mt, Timeline as N, paintType as Nt, CompiledTimeline as O, booleanType as Ot, TimelineInit as P, pathType as Pt, track as Q, isDurationEditable as R, vec2Equals as Rt, isEditableNodeId as S, PathValue as St, AssetRef as T, ValueTypeId as Tt, KeyOpts as U, setDevWarning as V, Track as W, springTo as X, sampleTrack as Y, stagger as Z, setSidecarTrack as _, ColorStop as _t, SidecarOrphan as a, springEasing as at, TweenTarget as b, Paint as bt, SidecarVersionError as c, DEFAULT_EASE as ct, emptySidecar as d, UnknownEasingError as dt, velocityAt as et, hashKeys as f, cubicBezier as ft, normalizeEditedKeys as g, namedEasing as gt, migrateSidecar as h, easings as ht, SidecarDocV1 as i, spring as it, Json as j, inferValueType as jt, FontFaceRef as k, colorType as kt, assignKeyIds as l, EaseSpec as lt, mergeSidecarDetailed as m, easingDerivatives as mt, OrphanReason as n, SpringConfig as nt, SidecarTimelineEntry as o, springEasingDerivative as ot, mergeSidecar as p, cubicBezierDerivative as pt, resolveEase as q, SidecarDoc as r, SpringEase as rt, SidecarTrackEntry as s, springPresets as st, MergeResult as t, RetargetSpring as tt, deleteSidecarTrack as u, EasingFn as ut, TARGET_PATH as v, GradientInterpolation as vt, targetNodeId as w, ValueType as wt, UnresolvableTargetError as x, PathContour as xt, TargetCarrier as y, HandoffKind as yt, DevWarning as z, vec2Type as zt };
package/dist/sidecar.js CHANGED
@@ -243,16 +243,19 @@ function liftColor(color, shape) {
243
243
  offset: s.offset,
244
244
  color
245
245
  }));
246
+ const interp = shape.interpolation ? { interpolation: shape.interpolation } : {};
246
247
  return shape.kind === "radial" ? {
247
248
  kind: "radial",
248
249
  stops,
249
250
  ...shape.center ? { center: shape.center } : {},
250
- ...shape.radius !== void 0 ? { radius: shape.radius } : {}
251
+ ...shape.radius !== void 0 ? { radius: shape.radius } : {},
252
+ ...interp
251
253
  } : {
252
254
  kind: "linear",
253
255
  stops,
254
256
  ...shape.from ? { from: shape.from } : {},
255
- ...shape.to ? { to: shape.to } : {}
257
+ ...shape.to ? { to: shape.to } : {},
258
+ ...interp
256
259
  };
257
260
  }
258
261
  let warnedPaintShape = false;
@@ -287,17 +290,20 @@ const paintType = {
287
290
  offset: lerpN(sa.offset, B.stops[i].offset, t),
288
291
  color: lerpColor(sa.color, B.stops[i].color, t)
289
292
  }));
293
+ const interp = A.interpolation ? { interpolation: A.interpolation } : {};
290
294
  if (A.kind === "radial" && B.kind === "radial") return {
291
295
  kind: "radial",
292
296
  stops,
293
297
  ...A.center && B.center ? { center: lerpPt(A.center, B.center, t) } : A.center ? { center: A.center } : {},
294
- ...A.radius !== void 0 && B.radius !== void 0 ? { radius: lerpN(A.radius, B.radius, t) } : A.radius !== void 0 ? { radius: A.radius } : {}
298
+ ...A.radius !== void 0 && B.radius !== void 0 ? { radius: lerpN(A.radius, B.radius, t) } : A.radius !== void 0 ? { radius: A.radius } : {},
299
+ ...interp
295
300
  };
296
301
  if (A.kind === "linear" && B.kind === "linear") return {
297
302
  kind: "linear",
298
303
  stops,
299
304
  ...A.from && B.from ? { from: lerpPt(A.from, B.from, t) } : A.from ? { from: A.from } : {},
300
- ...A.to && B.to ? { to: lerpPt(A.to, B.to, t) } : A.to ? { to: A.to } : {}
305
+ ...A.to && B.to ? { to: lerpPt(A.to, B.to, t) } : A.to ? { to: A.to } : {},
306
+ ...interp
301
307
  };
302
308
  return paintSnap(t, a, b);
303
309
  },
@@ -308,6 +314,7 @@ const paintType = {
308
314
  if (a.kind === "color") return b.kind === "color" && a.color === b.color;
309
315
  if (b.kind === "color") return false;
310
316
  if (!stopsEqual(a.stops, b.stops)) return false;
317
+ if (a.interpolation !== b.interpolation) return false;
311
318
  if (a.kind === "radial" && b.kind === "radial") return JSON.stringify(a.center) === JSON.stringify(b.center) && a.radius === b.radius;
312
319
  if (a.kind === "linear" && b.kind === "linear") return JSON.stringify(a.from) === JSON.stringify(b.from) && JSON.stringify(a.to) === JSON.stringify(b.to);
313
320
  return false;
@@ -1,4 +1,4 @@
1
- import { H as Key, N as Timeline, S as isEditableNodeId, a as SidecarOrphan, lt as EaseSpec, r as SidecarDoc, w as targetNodeId, wt as ValueTypeId } from "./sidecar.js";
1
+ import { H as Key, N as Timeline, S as isEditableNodeId, Tt as ValueTypeId, a as SidecarOrphan, lt as EaseSpec, r as SidecarDoc, w as targetNodeId } from "./sidecar.js";
2
2
 
3
3
  //#region src/timelinePatch.d.ts
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissade/core",
3
- "version": "0.10.1-pre.0",
3
+ "version": "0.10.1",
4
4
  "description": "glissade core: signals, tracks, timeline document, evaluation, easing, springs, seeded RNG. Zero DOM/Node dependencies.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",