@hyperframes/studio 0.8.8 → 0.8.9
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-DYTqZd0d.js → hyperframes-player-OP68oEBG.js} +1 -1
- package/dist/assets/{index-ng4tq6YE.js → index-57oMsXQN.js} +113 -113
- package/dist/assets/{index-D6CV2x61.js → index-BIdEpMGS.js} +1 -1
- package/dist/assets/{index-B69X8UsY.js → index-D1Sa69m2.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +26 -14
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/editor/CanvasContextMenu.test.tsx +1 -1
- package/src/components/editor/CanvasContextMenu.tsx +1 -1
- package/src/components/editor/TimelineFxPopover.test.tsx +89 -0
- package/src/components/editor/TimelineFxPopover.tsx +49 -15
- package/src/player/components/AutomationSelectionMenu.tsx +1 -1
- package/src/player/components/ClipContextMenu.tsx +1 -1
- package/src/player/components/KeyframeDiamondContextMenu.tsx +1 -1
- package/src/player/components/TimelineFxButton.tsx +1 -1
- package/src/player/components/TimelineGroupHeader.test.tsx +76 -0
- package/src/player/components/TimelineGroupHeader.tsx +8 -4
- package/src/player/components/TrackGapContextMenu.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-57oMsXQN.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 g=e[o+x]-t,_=r.some(function(h){if(h.interval===g)return h.count+=1});_||r.push({interval:g,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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<title>HyperFrames Studio</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-57oMsXQN.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Ba9zbpT9.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -11655,7 +11655,7 @@ var AutomationSelectionMenu = memo11(function AutomationSelectionMenu2({
|
|
|
11655
11655
|
"div",
|
|
11656
11656
|
{
|
|
11657
11657
|
ref: menuRef,
|
|
11658
|
-
className: "hf-automation-menu fixed z-
|
|
11658
|
+
className: "hf-automation-menu fixed z-[200] min-w-[140px] rounded border border-panel-border-input bg-panel-bg-2 py-1 shadow-lg",
|
|
11659
11659
|
style: { left: adjustedX, top: adjustedY },
|
|
11660
11660
|
children: [
|
|
11661
11661
|
AUTOMATION_SHAPES.map((shape) => /* @__PURE__ */ jsx28(
|
|
@@ -13543,18 +13543,30 @@ function useFxAudition(chain, onChainPreview, onAuditionTransport) {
|
|
|
13543
13543
|
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
13544
13544
|
var POPOVER_WIDTH = 260;
|
|
13545
13545
|
var VIEWPORT_MARGIN2 = 8;
|
|
13546
|
+
var MIN_POPOVER_HEIGHT = 160;
|
|
13546
13547
|
function clampedStyle(anchorRect) {
|
|
13547
13548
|
const left = Math.min(
|
|
13548
13549
|
Math.max(anchorRect.left, VIEWPORT_MARGIN2),
|
|
13549
13550
|
Math.max(VIEWPORT_MARGIN2, window.innerWidth - POPOVER_WIDTH - VIEWPORT_MARGIN2)
|
|
13550
13551
|
);
|
|
13551
13552
|
const spaceBelow = window.innerHeight - anchorRect.bottom;
|
|
13552
|
-
const
|
|
13553
|
+
const spaceAbove = anchorRect.top;
|
|
13554
|
+
const openUpward = spaceBelow < 260 && spaceAbove > spaceBelow;
|
|
13555
|
+
const available = (openUpward ? spaceAbove : spaceBelow) - VIEWPORT_MARGIN2 - 4;
|
|
13556
|
+
const height = Math.min(
|
|
13557
|
+
Math.max(MIN_POPOVER_HEIGHT, available),
|
|
13558
|
+
window.innerHeight - VIEWPORT_MARGIN2 * 2
|
|
13559
|
+
);
|
|
13560
|
+
const inset = (desired) => Math.max(
|
|
13561
|
+
VIEWPORT_MARGIN2,
|
|
13562
|
+
Math.min(desired, Math.max(VIEWPORT_MARGIN2, window.innerHeight - height - VIEWPORT_MARGIN2))
|
|
13563
|
+
);
|
|
13553
13564
|
return {
|
|
13554
13565
|
position: "fixed",
|
|
13555
13566
|
left,
|
|
13556
13567
|
width: POPOVER_WIDTH,
|
|
13557
|
-
|
|
13568
|
+
maxHeight: height,
|
|
13569
|
+
...openUpward ? { bottom: inset(window.innerHeight - anchorRect.top + 4) } : { top: inset(anchorRect.bottom + 4) }
|
|
13558
13570
|
};
|
|
13559
13571
|
}
|
|
13560
13572
|
function TimelineFxPopover({
|
|
@@ -13595,20 +13607,20 @@ function TimelineFxPopover({
|
|
|
13595
13607
|
ref: rootRef,
|
|
13596
13608
|
role: "dialog",
|
|
13597
13609
|
"aria-label": "Effects",
|
|
13598
|
-
className: "z-
|
|
13610
|
+
className: "z-[200] flex flex-col overflow-hidden rounded-md border border-white/10 bg-[#1b1b1f] p-2 shadow-xl",
|
|
13599
13611
|
style: clampedStyle(anchorRect),
|
|
13600
13612
|
onKeyDown,
|
|
13601
13613
|
onPointerDown: (event) => event.stopPropagation(),
|
|
13602
13614
|
children: [
|
|
13603
|
-
/* @__PURE__ */ jsx37(
|
|
13615
|
+
/* @__PURE__ */ jsx37("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx37(
|
|
13604
13616
|
FxPresetMenu,
|
|
13605
13617
|
{
|
|
13606
13618
|
trackKind,
|
|
13607
13619
|
onPick: applyPreset,
|
|
13608
13620
|
onAudition: onChainPreview ? (id) => audition(id ? (base2) => applyPresetToChain(base2, id, trackKind) ?? base2 : null) : void 0
|
|
13609
13621
|
}
|
|
13610
|
-
),
|
|
13611
|
-
/* @__PURE__ */ jsxs25("div", { className: "mt-2 flex items-center justify-between border-t border-white/10 pt-2 text-[10px] text-white/55", children: [
|
|
13622
|
+
) }),
|
|
13623
|
+
/* @__PURE__ */ jsxs25("div", { className: "mt-2 flex shrink-0 items-center justify-between border-t border-white/10 pt-2 text-[10px] text-white/55", children: [
|
|
13612
13624
|
/* @__PURE__ */ jsx37(
|
|
13613
13625
|
"button",
|
|
13614
13626
|
{
|
|
@@ -13682,7 +13694,7 @@ function TimelineFxButton(props) {
|
|
|
13682
13694
|
{
|
|
13683
13695
|
role: "dialog",
|
|
13684
13696
|
"aria-label": "Group these clips to add effects",
|
|
13685
|
-
className: "z-
|
|
13697
|
+
className: "z-[200] w-56 rounded-md border border-white/10 bg-[#1b1b1f] p-2.5 text-[11px] text-white/75 shadow-xl",
|
|
13686
13698
|
style: { position: "fixed", left: anchorRect.left, top: anchorRect.bottom + 4 },
|
|
13687
13699
|
onPointerDown: (event) => event.stopPropagation(),
|
|
13688
13700
|
children: [
|
|
@@ -14451,13 +14463,13 @@ function TimelineGroupHeader({
|
|
|
14451
14463
|
"aria-expanded": isExpanded,
|
|
14452
14464
|
"aria-label": `${isExpanded ? "Hide" : "Show"} ${label} tracks`,
|
|
14453
14465
|
title: `${isExpanded ? "Hide" : "Show"} tracks`,
|
|
14454
|
-
className: `flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 text-[
|
|
14466
|
+
className: `flex h-6 w-6 shrink-0 items-center justify-center rounded border-0 bg-transparent p-0 font-mono text-[13px] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[#3CE6AC] ${isExpanded ? "text-white" : "text-white/55 hover:text-white"}`,
|
|
14455
14467
|
onPointerDown: (event) => event.stopPropagation(),
|
|
14456
14468
|
onClick: (event) => {
|
|
14457
14469
|
event.stopPropagation();
|
|
14458
14470
|
onToggleExpanded();
|
|
14459
14471
|
},
|
|
14460
|
-
children: /* @__PURE__ */ jsx42("span", { "aria-hidden": "true",
|
|
14472
|
+
children: /* @__PURE__ */ jsx42("span", { "aria-hidden": "true", children: isExpanded ? "\u25BE" : "\u25B8" })
|
|
14461
14473
|
}
|
|
14462
14474
|
),
|
|
14463
14475
|
/* @__PURE__ */ jsx42("span", { "aria-hidden": "true", className: "shrink-0 text-[12px] leading-none text-white/50", children: "\u25A4" }),
|
|
@@ -19989,7 +20001,7 @@ function KeyframeDiamondContextMenu({
|
|
|
19989
20001
|
ref: menuRef,
|
|
19990
20002
|
role: "menu",
|
|
19991
20003
|
"aria-label": "Keyframe actions",
|
|
19992
|
-
className: "fixed z-
|
|
20004
|
+
className: "fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px] overflow-y-auto",
|
|
19993
20005
|
style: { left: adjustedX, top: adjustedY, maxHeight: `calc(100vh - ${adjustedY + 8}px)` },
|
|
19994
20006
|
children: [
|
|
19995
20007
|
onMoveToPlayhead && /* @__PURE__ */ jsx50(
|
|
@@ -20098,7 +20110,7 @@ var ClipContextMenu = memo14(function ClipContextMenu2({
|
|
|
20098
20110
|
ref: menuRef,
|
|
20099
20111
|
role: "menu",
|
|
20100
20112
|
"aria-label": "Clip actions",
|
|
20101
|
-
className: "fixed z-
|
|
20113
|
+
className: "fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",
|
|
20102
20114
|
style: { left: adjustedX, top: adjustedY },
|
|
20103
20115
|
children: [
|
|
20104
20116
|
splitLabel && /* @__PURE__ */ jsxs38(Fragment16, { children: [
|
|
@@ -20176,7 +20188,7 @@ var TrackGapContextMenu = memo15(function TrackGapContextMenu2({
|
|
|
20176
20188
|
"div",
|
|
20177
20189
|
{
|
|
20178
20190
|
ref: menuRef,
|
|
20179
|
-
className: "fixed z-
|
|
20191
|
+
className: "fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",
|
|
20180
20192
|
style: { left: adjustedX, top: adjustedY },
|
|
20181
20193
|
onPointerLeave: () => onHoverAction(null),
|
|
20182
20194
|
children: [
|
|
@@ -32653,7 +32665,7 @@ var CanvasContextMenu = memo23(function CanvasContextMenu2({
|
|
|
32653
32665
|
"div",
|
|
32654
32666
|
{
|
|
32655
32667
|
ref: menuRef,
|
|
32656
|
-
className: "fixed z-
|
|
32668
|
+
className: "fixed z-[200] bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[180px]",
|
|
32657
32669
|
style: { left: adjustedX, top: adjustedY },
|
|
32658
32670
|
onPointerDown: stopBubble,
|
|
32659
32671
|
onMouseDown: stopBubble,
|