@hyperframes/sdk 0.8.150 → 0.8.152

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,16 +1,2 @@
1
- /**
2
- * Backfill defaults for add-keyframe ops.
3
- *
4
- * When an add-keyframe op introduces a property absent from the other keyframes,
5
- * the writer needs a rest value to seed those keyframes with so GSAP interpolates
6
- * instead of snapping. The SDK derives the numeric-default set here so the acorn
7
- * writer matches the recast writer the server uses.
8
- *
9
- * Only props with a real numeric default get a backfill value. Defaulting an
10
- * unknown or string-valued prop to 0 (e.g. `color: 0`, `filter: 0`) emits invalid
11
- * GSAP, so such props are SKIPPED — the writer then leaves them out of the other
12
- * keyframes (GSAP reads the rest value from the DOM), matching recast (which skips
13
- * any prop whose default is null).
14
- */
15
1
  /** Derive the backfillDefaults for an add-keyframe op (numeric-default props only). */
16
2
  export declare function deriveKeyframeBackfillDefaults(value: Record<string, number | string>): Record<string, number | string>;
@@ -12,24 +12,7 @@
12
12
  * keyframes (GSAP reads the rest value from the DOM), matching recast (which skips
13
13
  * any prop whose default is null).
14
14
  */
15
- // Numeric rest values for editable transform/style props. Props absent here have
16
- // no safe static default and are intentionally omitted from the backfill set.
17
- //
18
- // KEEP IN SYNC WITH packages/studio/src/hooks/gsapShared.ts:PROPERTY_DEFAULTS —
19
- // the studio (recast) and SDK (acorn) paths must derive the same defaults or
20
- // SDK-written keyframes drift from server-written ones (the exact bug this fixes).
21
- // TODO: lift the canonical table into @hyperframes/core and import from both.
22
- const KEYFRAME_PROPERTY_DEFAULTS = {
23
- opacity: 1,
24
- x: 0,
25
- y: 0,
26
- scale: 1,
27
- scaleX: 1,
28
- scaleY: 1,
29
- rotation: 0,
30
- width: 100,
31
- height: 100,
32
- };
15
+ import { KEYFRAME_PROPERTY_DEFAULTS } from "@hyperframes/core/keyframe-defaults";
33
16
  /** Derive the backfillDefaults for an add-keyframe op (numeric-default props only). */
34
17
  export function deriveKeyframeBackfillDefaults(value) {
35
18
  const defaults = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/sdk",
3
- "version": "0.8.150",
3
+ "version": "0.8.152",
4
4
  "description": "Headless, framework-neutral HyperFrames composition editing engine",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "linkedom": "^0.18.12",
47
- "@hyperframes/parsers": "0.8.150",
48
- "@hyperframes/core": "0.8.150"
47
+ "@hyperframes/core": "0.8.152",
48
+ "@hyperframes/parsers": "0.8.152"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^25.0.10",