@hyperframes/studio 0.8.150 → 0.8.151
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/assets/{hyperframes-player-kup62bDR.js → hyperframes-player-DJt8E7k4.js} +1 -1
- package/dist/assets/{index-CS_m0TkX.js → index-BGks9KLI.js} +73 -73
- package/dist/assets/{index-B8BBYY8L.js → index-DWIHrAY2.js} +1 -1
- package/dist/assets/{index-DQ5jGodF.js → index-DgbLblGR.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +8 -18
- package/package.json +8 -8
- package/src/hooks/gsapShared.ts +1 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as P}from"./index-
|
|
1
|
+
import{h as P}from"./index-BGks9KLI.js";function j(c,d){for(var s=0;s<d.length;s++){const a=d[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in c)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(c,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var v={},w;function k(){if(w)return v;w=1,Object.defineProperty(v,"__esModule",{value:!0}),v.default=d;var c=window.OfflineAudioContext||window.webkitOfflineAudioContext;function d(e){var r=a(e);return r.start(0),[i,y,O(e.sampleRate),s].reduce(function(t,o){return o(t)},r.buffer.getChannelData(0))}function s(e){return e.sort(function(r,t){return t.count-r.count}).splice(0,5)[0].tempo}function a(e){var r=e.length,t=e.numberOfChannels,o=e.sampleRate,n=new c(t,r,o),u=n.createBufferSource();u.buffer=e;var f=n.createBiquadFilter();return f.type="lowpass",u.connect(f),f.connect(n.destination),u}function i(e){for(var r=[],t=.9,o=.3,n=15;r.length<n&&t>=o;)r=l(e,t),t-=.05;if(r.length<n)throw new Error("Could not find enough samples for a reliable detection.");return r}function l(e,r){for(var t=[],o=0,n=e.length;o<n;o+=1)e[o]>r&&(t.push(o),o+=1e4);return t}function y(e){var r=[];return e.forEach(function(t,o){for(var n=function(x){var h=e[o+x]-t,_=r.some(function(g){if(g.interval===h)return g.count+=1});_||r.push({interval:h,count:1})},u=0;u<10;u+=1)n(u)}),r}function O(e){return function(r){var t=[];return r.forEach(function(o){if(o.interval!==0){for(var n=60/(o.interval/e);n<90;)n*=2;for(;n>180;)n/=2;n=Math.round(n);var u=t.some(function(f){if(f.tempo===n)return f.count+=o.count});u||t.push({tempo:n,count:o.count})}}),t}}return v}var p,b;function q(){return b||(b=1,p=k().default),p}var m=q();const A=P(m),D=j({__proto__:null,default:A},[m]);export{D as i};
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-BGks9KLI.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/assets/index-DkQKsFxx.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -5026,17 +5026,7 @@ function matchesSelector(tweenSelector, querySelector) {
|
|
|
5026
5026
|
}
|
|
5027
5027
|
|
|
5028
5028
|
// src/hooks/gsapShared.ts
|
|
5029
|
-
|
|
5030
|
-
opacity: 1,
|
|
5031
|
-
x: 0,
|
|
5032
|
-
y: 0,
|
|
5033
|
-
scale: 1,
|
|
5034
|
-
scaleX: 1,
|
|
5035
|
-
scaleY: 1,
|
|
5036
|
-
rotation: 0,
|
|
5037
|
-
width: 100,
|
|
5038
|
-
height: 100
|
|
5039
|
-
};
|
|
5029
|
+
import { KEYFRAME_PROPERTY_DEFAULTS } from "@hyperframes/core/keyframe-defaults";
|
|
5040
5030
|
function keyframeEases(anim) {
|
|
5041
5031
|
if (!anim.keyframes) return { easeEach: anim.ease };
|
|
5042
5032
|
return { ease: runEaseOf(anim), easeEach: anim.keyframes.easeEach };
|
|
@@ -5327,14 +5317,14 @@ function synthesizeFlatTweenKeyframes(anim) {
|
|
|
5327
5317
|
if (anim.method === "from") {
|
|
5328
5318
|
for (const [k, v] of Object.entries(toProps)) {
|
|
5329
5319
|
rawStart[k] = v;
|
|
5330
|
-
rawEnd[k] =
|
|
5320
|
+
rawEnd[k] = KEYFRAME_PROPERTY_DEFAULTS[k] ?? 0;
|
|
5331
5321
|
}
|
|
5332
5322
|
} else if (anim.method === "fromTo" && fromProps) {
|
|
5333
5323
|
Object.assign(rawStart, fromProps);
|
|
5334
5324
|
Object.assign(rawEnd, toProps);
|
|
5335
5325
|
} else {
|
|
5336
5326
|
for (const [k, v] of Object.entries(toProps)) {
|
|
5337
|
-
rawStart[k] =
|
|
5327
|
+
rawStart[k] = KEYFRAME_PROPERTY_DEFAULTS[k] ?? 0;
|
|
5338
5328
|
rawEnd[k] = v;
|
|
5339
5329
|
}
|
|
5340
5330
|
}
|
|
@@ -23030,7 +23020,7 @@ function propertyStops(animation2, property, start) {
|
|
|
23030
23020
|
}));
|
|
23031
23021
|
const first = stops[0];
|
|
23032
23022
|
if (!first || first.percentage <= 0 || typeof first.value !== "number") return stops;
|
|
23033
|
-
return [{ percentage: 0, value: start ??
|
|
23023
|
+
return [{ percentage: 0, value: start ?? KEYFRAME_PROPERTY_DEFAULTS[property] ?? 0 }, ...stops];
|
|
23034
23024
|
}
|
|
23035
23025
|
function interpolableEnds(before, after) {
|
|
23036
23026
|
if (typeof before.value !== "number" || typeof after.value !== "number") return null;
|
|
@@ -47644,7 +47634,7 @@ async function commitWholePropertyOffset(selection, anim, newValues, currentPct,
|
|
|
47644
47634
|
const ts = resolveTweenStart(effectiveAnim);
|
|
47645
47635
|
const td = resolveTweenDuration(effectiveAnim);
|
|
47646
47636
|
const keys = Object.keys(newValues);
|
|
47647
|
-
const at = (props, key2) => typeof props[key2] === "number" ? props[key2] :
|
|
47637
|
+
const at = (props, key2) => typeof props[key2] === "number" ? props[key2] : KEYFRAME_PROPERTY_DEFAULTS[key2] ?? 0;
|
|
47648
47638
|
const kfs = effectiveAnim.keyframes?.keyframes ?? synthesizeFlatTweenKeyframes(effectiveAnim)?.keyframes;
|
|
47649
47639
|
if (!kfs || kfs.length === 0) {
|
|
47650
47640
|
await callbacks.commitMutation(
|
|
@@ -82597,7 +82587,7 @@ async function commitKeyframeAtTimeImpl(selection, absoluteTime, animations, pro
|
|
|
82597
82587
|
}
|
|
82598
82588
|
const backfillDefaults = {};
|
|
82599
82589
|
for (const key2 of Object.keys(properties)) {
|
|
82600
|
-
backfillDefaults[key2] =
|
|
82590
|
+
backfillDefaults[key2] = KEYFRAME_PROPERTY_DEFAULTS[key2] ?? 0;
|
|
82601
82591
|
}
|
|
82602
82592
|
await commitMutation(
|
|
82603
82593
|
selection,
|
|
@@ -83018,7 +83008,7 @@ function useGsapPropertyDebounce(commitMutationSafely, sdk) {
|
|
|
83018
83008
|
const addGsapProperty = useCallback137(
|
|
83019
83009
|
// fallow-ignore-next-line complexity
|
|
83020
83010
|
async (selection, animationId, property) => {
|
|
83021
|
-
let defaultValue =
|
|
83011
|
+
let defaultValue = KEYFRAME_PROPERTY_DEFAULTS[property] ?? 0;
|
|
83022
83012
|
const el = selection.element;
|
|
83023
83013
|
if (property === "width" || property === "height") {
|
|
83024
83014
|
const rect = el.getBoundingClientRect();
|
|
@@ -83140,7 +83130,7 @@ function useGsapPropertyDebounce(commitMutationSafely, sdk) {
|
|
|
83140
83130
|
);
|
|
83141
83131
|
const addGsapFromProperty = useCallback137(
|
|
83142
83132
|
async (selection, animationId, property) => {
|
|
83143
|
-
const defaultValue =
|
|
83133
|
+
const defaultValue = KEYFRAME_PROPERTY_DEFAULTS[property] ?? 0;
|
|
83144
83134
|
const { sdkSession, sdkDeps, activeCompPath } = sdkRef.current ?? {};
|
|
83145
83135
|
if (sdkSession && sdkDeps) {
|
|
83146
83136
|
const targetPath = selection.sourceFile || activeCompPath || "index.html";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.151",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"dockview-react": "8.3.1",
|
|
61
61
|
"gsap": "^3.13.0",
|
|
62
62
|
"mediabunny": "^1.45.3",
|
|
63
|
-
"@hyperframes/
|
|
64
|
-
"@hyperframes/
|
|
65
|
-
"@hyperframes/
|
|
66
|
-
"@hyperframes/
|
|
67
|
-
"@hyperframes/
|
|
68
|
-
"@hyperframes/
|
|
63
|
+
"@hyperframes/player": "0.8.151",
|
|
64
|
+
"@hyperframes/sdk": "0.8.151",
|
|
65
|
+
"@hyperframes/core": "0.8.151",
|
|
66
|
+
"@hyperframes/shader-transitions": "0.8.151",
|
|
67
|
+
"@hyperframes/studio-server": "0.8.151",
|
|
68
|
+
"@hyperframes/parsers": "0.8.151"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vite": "^6.4.2",
|
|
83
83
|
"vitest": "^4.1.11",
|
|
84
84
|
"zustand": "^5.0.0",
|
|
85
|
-
"@hyperframes/producer": "0.8.
|
|
85
|
+
"@hyperframes/producer": "0.8.151"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"react": "19",
|
package/src/hooks/gsapShared.ts
CHANGED
|
@@ -25,17 +25,7 @@ export interface IframeGsap {
|
|
|
25
25
|
|
|
26
26
|
// ── Constants ─────────────────────────────────────────────────────────────────
|
|
27
27
|
|
|
28
|
-
export
|
|
29
|
-
opacity: 1,
|
|
30
|
-
x: 0,
|
|
31
|
-
y: 0,
|
|
32
|
-
scale: 1,
|
|
33
|
-
scaleX: 1,
|
|
34
|
-
scaleY: 1,
|
|
35
|
-
rotation: 0,
|
|
36
|
-
width: 100,
|
|
37
|
-
height: 100,
|
|
38
|
-
};
|
|
28
|
+
export { KEYFRAME_PROPERTY_DEFAULTS as PROPERTY_DEFAULTS } from "@hyperframes/core/keyframe-defaults";
|
|
39
29
|
|
|
40
30
|
/** A tween's eases for re-writing it as keyframes: a flat tween's ease must become easeEach,
|
|
41
31
|
* since GSAP eases each percentage segment power1.inOut whatever the tween-level ease says. */
|