@pixerate/editor 0.58.0 → 0.59.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/animation/index.cjs +9 -3
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +2 -2
- package/dist/animation/index.d.ts +2 -2
- package/dist/animation/index.js +9 -3
- package/dist/animation-editor/index.cjs +456 -83
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +159 -9
- package/dist/animation-editor/index.d.ts +159 -9
- package/dist/animation-editor/index.js +415 -42
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/canvas/index.cjs +35 -29
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +4 -4
- package/dist/canvas/index.d.ts +4 -4
- package/dist/canvas/index.js +9 -3
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-O4ONBPZW.cjs → chunk-2FGRTYJN.cjs} +4 -4
- package/dist/{chunk-O4ONBPZW.cjs.map → chunk-2FGRTYJN.cjs.map} +1 -1
- package/dist/{chunk-XZ4L3R4K.cjs → chunk-2FHLHZAL.cjs} +39 -3
- package/dist/chunk-2FHLHZAL.cjs.map +1 -0
- package/dist/{chunk-PYMV7HLI.js → chunk-3TLL5OID.js} +2 -2
- package/dist/{chunk-UB2OY7FD.js → chunk-AGR4P4UZ.js} +38 -2
- package/dist/chunk-AGR4P4UZ.js.map +1 -0
- package/dist/{chunk-SHOVAHUB.js → chunk-JK6M6V7G.js} +2 -2
- package/dist/{chunk-FKONE6AO.cjs → chunk-YJLCBA7V.cjs} +3 -3
- package/dist/{chunk-FKONE6AO.cjs.map → chunk-YJLCBA7V.cjs.map} +1 -1
- package/dist/{easing-CNGk-W6d.d.ts → easing-lM0Xo9Ni.d.cts} +14 -2
- package/dist/{easing-CNGk-W6d.d.cts → easing-lM0Xo9Ni.d.ts} +14 -2
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.d.cts +1 -1
- package/dist/parameters/index.d.ts +1 -1
- package/dist/parameters/index.js +1 -1
- package/dist/{player-W-5DX3Go.d.ts → player-DV4Jujdq.d.ts} +1 -1
- package/dist/{player-Dg0FT0UI.d.cts → player-DrcP2xqj.d.cts} +1 -1
- package/dist/vector/index.cjs +472 -472
- package/dist/vector/index.d.cts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/dist/vector/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-UB2OY7FD.js.map +0 -1
- package/dist/chunk-XZ4L3R4K.cjs.map +0 -1
- /package/dist/{chunk-PYMV7HLI.js.map → chunk-3TLL5OID.js.map} +0 -0
- /package/dist/{chunk-SHOVAHUB.js.map → chunk-JK6M6V7G.js.map} +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - `spring` is a damped spring settling on the next value (it may overshoot).
|
|
9
9
|
*/
|
|
10
10
|
/** Named easing presets. */
|
|
11
|
-
type AnimationEasingPreset = 'linear' | 'hold' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-back' | 'ease-out-back' | 'ease-out-elastic' | 'ease-in-elastic' | 'ease-in-out-elastic' | 'elastic' | 'spring';
|
|
11
|
+
type AnimationEasingPreset = 'linear' | 'hold' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-back' | 'ease-out-back' | 'ease-out-elastic' | 'ease-in-elastic' | 'ease-in-out-elastic' | 'elastic' | 'spring' | 'spring-gentle' | 'spring-quick' | 'spring-bouncy' | 'spring-slow';
|
|
12
12
|
interface CubicBezierEasing {
|
|
13
13
|
type: 'cubic-bezier';
|
|
14
14
|
x1: number;
|
|
@@ -43,6 +43,18 @@ declare const ANIMATION_EASING_PRESETS: readonly AnimationEasingPreset[];
|
|
|
43
43
|
declare const ANIMATION_EASING_LABELS: Readonly<Record<AnimationEasingPreset, string>>;
|
|
44
44
|
/** The CSS control points of the bezier presets (CSS Easing Functions Level 1 values for the CSS keywords). */
|
|
45
45
|
declare const CUBIC_BEZIER_PRESETS: Readonly<Record<string, readonly [number, number, number, number]>>;
|
|
46
|
+
/**
|
|
47
|
+
* Figma's named springs (mass 1): gentle 100 / 15, quick 300 / 20, bouncy 600 / 15, slow 80 / 20
|
|
48
|
+
* (stiffness / damping). Each plays until it settles (see `springSettleMs`).
|
|
49
|
+
*/
|
|
50
|
+
declare const SPRING_PRESETS: Readonly<Record<'spring-gentle' | 'spring-quick' | 'spring-bouncy' | 'spring-slow', Required<Omit<SpringEasing, 'type'>>>>;
|
|
51
|
+
/**
|
|
52
|
+
* How long a spring takes to settle within 0.1% of its target, in ms (clamped to 50–10000):
|
|
53
|
+
* 6.9 / (ζ·ω₀) s when under-damped, else 9.2 / its slowest rate.
|
|
54
|
+
*/
|
|
55
|
+
declare function springSettleMs(spring: Omit<SpringEasing, 'type'>): number;
|
|
56
|
+
/** The same curve run backwards in time (`1 − e(1 − u)`) for a cubic-bezier, or null for other easings. */
|
|
57
|
+
declare function reverseCubicBezier(easing: AnimationEasing | string | undefined | null): CubicBezierEasing | null;
|
|
46
58
|
/**
|
|
47
59
|
* Normalised position for a parametric elastic oscillation curve (as used in Rive and Penner curves).
|
|
48
60
|
* Amplitude controls the overshoot intensity; period controls the wave frequency across normalized progress `t` (0–1).
|
|
@@ -85,4 +97,4 @@ declare function easingToCss(easing: AnimationEasing | string | undefined | null
|
|
|
85
97
|
/** Short label for an easing (a preset's label, or `Custom` / `Spring` / `Elastic`). */
|
|
86
98
|
declare function easingLabel(easing: AnimationEasing | undefined | null): string;
|
|
87
99
|
|
|
88
|
-
export { ANIMATION_EASING_LABELS as A, CUBIC_BEZIER_PRESETS as C, type ElasticEasing as E,
|
|
100
|
+
export { ANIMATION_EASING_LABELS as A, CUBIC_BEZIER_PRESETS as C, type ElasticEasing as E, SPRING_PRESETS as S, ANIMATION_EASING_PRESETS as a, type AnimationEasing as b, type AnimationEasingPreset as c, type CubicBezierEasing as d, type SpringEasing as e, cubicBezierAt as f, easingFromInfluence as g, easingLabel as h, easingToCss as i, elasticAt as j, evaluateEasing as k, isAnimationEasing as l, reverseCubicBezier as m, springSettleMs as n, parseCssEasing as p, resolveEasing as r, springAt as s };
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - `spring` is a damped spring settling on the next value (it may overshoot).
|
|
9
9
|
*/
|
|
10
10
|
/** Named easing presets. */
|
|
11
|
-
type AnimationEasingPreset = 'linear' | 'hold' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-back' | 'ease-out-back' | 'ease-out-elastic' | 'ease-in-elastic' | 'ease-in-out-elastic' | 'elastic' | 'spring';
|
|
11
|
+
type AnimationEasingPreset = 'linear' | 'hold' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-back' | 'ease-out-back' | 'ease-out-elastic' | 'ease-in-elastic' | 'ease-in-out-elastic' | 'elastic' | 'spring' | 'spring-gentle' | 'spring-quick' | 'spring-bouncy' | 'spring-slow';
|
|
12
12
|
interface CubicBezierEasing {
|
|
13
13
|
type: 'cubic-bezier';
|
|
14
14
|
x1: number;
|
|
@@ -43,6 +43,18 @@ declare const ANIMATION_EASING_PRESETS: readonly AnimationEasingPreset[];
|
|
|
43
43
|
declare const ANIMATION_EASING_LABELS: Readonly<Record<AnimationEasingPreset, string>>;
|
|
44
44
|
/** The CSS control points of the bezier presets (CSS Easing Functions Level 1 values for the CSS keywords). */
|
|
45
45
|
declare const CUBIC_BEZIER_PRESETS: Readonly<Record<string, readonly [number, number, number, number]>>;
|
|
46
|
+
/**
|
|
47
|
+
* Figma's named springs (mass 1): gentle 100 / 15, quick 300 / 20, bouncy 600 / 15, slow 80 / 20
|
|
48
|
+
* (stiffness / damping). Each plays until it settles (see `springSettleMs`).
|
|
49
|
+
*/
|
|
50
|
+
declare const SPRING_PRESETS: Readonly<Record<'spring-gentle' | 'spring-quick' | 'spring-bouncy' | 'spring-slow', Required<Omit<SpringEasing, 'type'>>>>;
|
|
51
|
+
/**
|
|
52
|
+
* How long a spring takes to settle within 0.1% of its target, in ms (clamped to 50–10000):
|
|
53
|
+
* 6.9 / (ζ·ω₀) s when under-damped, else 9.2 / its slowest rate.
|
|
54
|
+
*/
|
|
55
|
+
declare function springSettleMs(spring: Omit<SpringEasing, 'type'>): number;
|
|
56
|
+
/** The same curve run backwards in time (`1 − e(1 − u)`) for a cubic-bezier, or null for other easings. */
|
|
57
|
+
declare function reverseCubicBezier(easing: AnimationEasing | string | undefined | null): CubicBezierEasing | null;
|
|
46
58
|
/**
|
|
47
59
|
* Normalised position for a parametric elastic oscillation curve (as used in Rive and Penner curves).
|
|
48
60
|
* Amplitude controls the overshoot intensity; period controls the wave frequency across normalized progress `t` (0–1).
|
|
@@ -85,4 +97,4 @@ declare function easingToCss(easing: AnimationEasing | string | undefined | null
|
|
|
85
97
|
/** Short label for an easing (a preset's label, or `Custom` / `Spring` / `Elastic`). */
|
|
86
98
|
declare function easingLabel(easing: AnimationEasing | undefined | null): string;
|
|
87
99
|
|
|
88
|
-
export { ANIMATION_EASING_LABELS as A, CUBIC_BEZIER_PRESETS as C, type ElasticEasing as E,
|
|
100
|
+
export { ANIMATION_EASING_LABELS as A, CUBIC_BEZIER_PRESETS as C, type ElasticEasing as E, SPRING_PRESETS as S, ANIMATION_EASING_PRESETS as a, type AnimationEasing as b, type AnimationEasingPreset as c, type CubicBezierEasing as d, type SpringEasing as e, cubicBezierAt as f, easingFromInfluence as g, easingLabel as h, easingToCss as i, elasticAt as j, evaluateEasing as k, isAnimationEasing as l, reverseCubicBezier as m, springSettleMs as n, parseCssEasing as p, resolveEasing as r, springAt as s };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkQKLRAA4Tcjs = require('../chunk-QKLRAA4T.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2FHLHZALcjs = require('../chunk-2FHLHZAL.cjs');
|
|
7
7
|
|
|
8
8
|
// src/parameters/schema.ts
|
|
9
9
|
function humanizeParameterId(id) {
|
|
@@ -1259,7 +1259,7 @@ function createRangeMapper(options = {}) {
|
|
|
1259
1259
|
if (typeof easing === "function") {
|
|
1260
1260
|
progress = easing(normalized);
|
|
1261
1261
|
} else {
|
|
1262
|
-
progress =
|
|
1262
|
+
progress = _chunk2FHLHZALcjs.evaluateEasing.call(void 0, easing, normalized);
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
1265
|
return outMin + progress * outSpan;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as AnimationEasing } from '../easing-
|
|
1
|
+
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
2
2
|
import { J as JsonSchema } from '../schema-Di0CS6Pe.cjs';
|
|
3
3
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
4
4
|
import { C as CommandSpec } from '../registry-CaR7LC6W.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as AnimationEasing } from '../easing-
|
|
1
|
+
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
|
|
2
2
|
import { J as JsonSchema } from '../schema-Di0CS6Pe.js';
|
|
3
3
|
import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
|
|
4
4
|
import { C as CommandSpec } from '../registry-rVtFJjRM.js';
|
package/dist/parameters/index.js
CHANGED