@hyperframes/studio 0.8.15 → 0.8.17

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.
Files changed (62) hide show
  1. package/dist/assets/hyperframes-player-DejBDgXB.js +459 -0
  2. package/dist/assets/index-BX3KHhGX.js +71 -0
  3. package/dist/assets/{index-DKoZIpw1.js → index-CU6o8PuW.js} +180 -180
  4. package/dist/assets/{index-CVtYYTnA.js → index-CklNVmi3.js} +1 -1
  5. package/dist/assets/{index-CtDg2lB7.js → index-uu4Zd3BU.js} +1 -1
  6. package/dist/index.d.ts +9 -13
  7. package/dist/index.html +1 -1
  8. package/dist/index.js +1660 -1284
  9. package/dist/index.js.map +1 -1
  10. package/package.json +8 -7
  11. package/src/components/EditorShell.tsx +4 -0
  12. package/src/components/editor/DomEditCropHandles.test.tsx +1 -1
  13. package/src/components/editor/DomEditCropHandles.tsx +1 -1
  14. package/src/components/editor/DomEditOverlay.tsx +1 -1
  15. package/src/components/editor/DomEditSelectionChrome.tsx +1 -1
  16. package/src/components/editor/anchoredResizeCommitFeedsOffset.test.ts +38 -4
  17. package/src/components/editor/propertyPanelCommitField.tsx +1 -1
  18. package/src/components/editor/propertyPanelFlatLayoutSection.tsx +3 -3
  19. package/src/components/editor/propertyPanelFlatMaskInsetRows.tsx +1 -1
  20. package/src/components/editor/propertyPanelFlatMediaSection.tsx +1 -1
  21. package/src/components/editor/propertyPanelFlatPrimitives.tsx +1 -1
  22. package/src/components/editor/propertyPanelFlatStyleSections.tsx +8 -8
  23. package/src/components/editor/propertyPanelMediaSection.tsx +1 -1
  24. package/src/components/editor/propertyPanelPrimitives.tsx +1 -1
  25. package/src/components/editor/propertyPanelStyleSections.tsx +1 -1
  26. package/src/components/editor/propertyPanelTypes.ts +1 -1
  27. package/src/components/editor/useDomEditOverlayGestures.ts +8 -2
  28. package/src/components/editor/useInspectorGestureTransaction.ts +3 -3
  29. package/src/components/sidebar/AudioRow.tsx +13 -2
  30. package/src/hooks/domEditCommitRunner.ts +47 -0
  31. package/src/hooks/useDomEditPositionPatchCommit.test.tsx +116 -0
  32. package/src/hooks/useDomEditPositionPatchCommit.ts +6 -1
  33. package/src/hooks/useDomEditTextCommits.test.tsx +175 -21
  34. package/src/hooks/useDomEditTextCommits.ts +17 -9
  35. package/src/hooks/useDomEditWiring.ts +1 -1
  36. package/src/hooks/useDomGeometryCommits.test.tsx +1 -0
  37. package/src/hooks/useDomGeometryCommits.ts +10 -2
  38. package/src/hooks/useDomSelection.test.ts +48 -0
  39. package/src/hooks/useDomSelection.ts +26 -82
  40. package/src/hooks/useDomSelectionTypes.ts +82 -0
  41. package/src/hooks/useElementLifecycleOps.multiDelete.test.tsx +81 -31
  42. package/src/hooks/useElementLifecycleOps.ts +11 -5
  43. package/src/hooks/useGsapSelectionHandlers.ts +4 -2
  44. package/src/hooks/usePanelLayout.test.ts +38 -0
  45. package/src/hooks/usePanelLayout.ts +21 -6
  46. package/src/player/lib/playbackTypes.ts +3 -12
  47. package/src/player/lib/runtimeProtocol.test.ts +1 -0
  48. package/src/utils/studioUiPreferences.ts +11 -0
  49. package/src/webmcp/StudioAgentTools.tsx +46 -0
  50. package/src/webmcp/handles.test.ts +130 -0
  51. package/src/webmcp/handles.ts +129 -0
  52. package/src/webmcp/polyfill.test.ts +98 -0
  53. package/src/webmcp/polyfill.ts +60 -0
  54. package/src/webmcp/registrar.test.ts +150 -0
  55. package/src/webmcp/registrar.ts +115 -0
  56. package/src/webmcp/toolResult.ts +67 -0
  57. package/src/webmcp/tools/lookTools.test.ts +225 -0
  58. package/src/webmcp/tools/lookTools.ts +201 -0
  59. package/src/webmcp/types.ts +90 -0
  60. package/src/webmcp/useStudioAgentTools.test.tsx +221 -0
  61. package/src/webmcp/useStudioAgentTools.ts +119 -0
  62. package/dist/assets/hyperframes-player-BlIp1Y-b.js +0 -459
@@ -1,4 +1,4 @@
1
- import{n as Qi}from"./index-DKoZIpw1.js";/*!
1
+ import{n as Qi}from"./index-CU6o8PuW.js";/*!
2
2
  * Copyright (c) 2026-present, Vanilagy and contributors
3
3
  *
4
4
  * This Source Code Form is subject to the terms of the Mozilla Public
@@ -1 +1 @@
1
- import{g as P}from"./index-DKoZIpw1.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};
1
+ import{g as P}from"./index-CU6o8PuW.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.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, RefObject } from 'react';
4
+ import { RuntimeTimelineClipIdentity } from '@hyperframes/core';
4
5
  import { GsapAnimation, PropertyGroupName } from '@hyperframes/core/gsap-parser';
5
6
  import * as zustand from 'zustand';
6
7
  import { MusicBeatAnalysis } from '@hyperframes/core/beats';
@@ -47,23 +48,18 @@ interface BeatEditState {
47
48
  removed: number[];
48
49
  }
49
50
 
50
- interface ClipManifestClip {
51
- id: string | null;
52
- label: string;
53
- start: number;
54
- duration: number;
55
- track: number;
51
+ /**
52
+ * Shared type definitions for the timeline playback subsystem.
53
+ * Kept in a separate module so adapter, DOM, and hook modules can all import
54
+ * from here without creating circular dependencies.
55
+ */
56
+
57
+ interface ClipManifestClip extends RuntimeTimelineClipIdentity {
56
58
  zIndex?: number;
57
59
  stackingContextId?: string | null;
58
- kind: "video" | "audio" | "image" | "element" | "composition";
59
- tagName: string | null;
60
- compositionId: string | null;
61
60
  compositionAncestors?: string[];
62
- parentCompositionId: string | null;
63
- compositionSrc: string | null;
64
61
  playbackStart?: number;
65
62
  playbackRate?: number;
66
- assetUrl: string | null;
67
63
  }
68
64
 
69
65
  type TimelineTimeDisplayMode = "time" | "frame";
@@ -1052,7 +1048,7 @@ interface PropertyPanelProps {
1052
1048
  copiedAgentPrompt: boolean;
1053
1049
  onClearSelection: () => void;
1054
1050
  onUngroup?: () => void;
1055
- onSetStyle: (prop: string, value: string) => void | Promise<void>;
1051
+ onSetStyle: (prop: string, value: string) => void | Promise<unknown>;
1056
1052
  onPreviewStyle?: (prop: string, value: string) => void;
1057
1053
  onSetAttribute: (attr: string, value: string) => void | Promise<void>;
1058
1054
  /** Commits several data-* attributes on the SAME element in ONE atomic
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-DKoZIpw1.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-CU6o8PuW.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-yGhfxxoL.css">
10
10
  </head>
11
11
  <body>