@hyperframes/studio 0.8.34 → 0.8.35
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-D4aSRr_M.js → hyperframes-player-lPOqAC3l.js} +1 -1
- package/dist/assets/{index-CkxPQxLJ.js → index-BRr1JoHX.js} +80 -80
- package/dist/assets/{index-hch4ktcC.js → index-RPEcu_bT.js} +1 -1
- package/dist/assets/{index-aNyQBoJv.js → index-ywAULfGT.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/webmcp/types.ts +5 -1
- package/src/webmcp/useStudioAgentTools.polyfill.test.tsx +219 -0
- package/src/webmcp/useStudioAgentTools.test.tsx +81 -67
- package/src/webmcp/useStudioAgentTools.ts +49 -28
- package/src/webmcp/webmcpTestUtils.ts +56 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as P}from"./index-
|
|
1
|
+
import{g as P}from"./index-BRr1JoHX.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-BRr1JoHX.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-DnRfAiK2.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -42851,6 +42851,7 @@ function reportRegistration(report, native) {
|
|
|
42851
42851
|
}
|
|
42852
42852
|
}
|
|
42853
42853
|
function buildStudioTools(depsRef) {
|
|
42854
|
+
const writeTool = (name, run) => (input, options) => runToolBody(name, () => run(depsRef.current, input, options?.signal));
|
|
42854
42855
|
return [
|
|
42855
42856
|
{
|
|
42856
42857
|
name: "studio_look",
|
|
@@ -42915,9 +42916,9 @@ function buildStudioTools(depsRef) {
|
|
|
42915
42916
|
description: STUDIO_SET_TEXT_DESCRIPTION,
|
|
42916
42917
|
inputSchema: STUDIO_SET_TEXT_INPUT_SCHEMA,
|
|
42917
42918
|
annotations: { readOnlyHint: false, untrustedContentHint: true },
|
|
42918
|
-
execute: (
|
|
42919
|
+
execute: writeTool(
|
|
42919
42920
|
"studio_set_text",
|
|
42920
|
-
() => studioSetText(
|
|
42921
|
+
(deps, input, signal) => studioSetText(deps, input, signal)
|
|
42921
42922
|
)
|
|
42922
42923
|
},
|
|
42923
42924
|
{
|
|
@@ -42926,9 +42927,9 @@ function buildStudioTools(depsRef) {
|
|
|
42926
42927
|
description: STUDIO_SET_STYLE_DESCRIPTION,
|
|
42927
42928
|
inputSchema: STUDIO_SET_STYLE_INPUT_SCHEMA,
|
|
42928
42929
|
annotations: { readOnlyHint: false },
|
|
42929
|
-
execute: (
|
|
42930
|
+
execute: writeTool(
|
|
42930
42931
|
"studio_set_style",
|
|
42931
|
-
() => studioSetStyle(
|
|
42932
|
+
(deps, input, signal) => studioSetStyle(deps, input, signal)
|
|
42932
42933
|
)
|
|
42933
42934
|
},
|
|
42934
42935
|
{
|
|
@@ -42937,9 +42938,9 @@ function buildStudioTools(depsRef) {
|
|
|
42937
42938
|
description: STUDIO_TRANSFORM_DESCRIPTION,
|
|
42938
42939
|
inputSchema: STUDIO_TRANSFORM_INPUT_SCHEMA,
|
|
42939
42940
|
annotations: { readOnlyHint: false },
|
|
42940
|
-
execute: (
|
|
42941
|
+
execute: writeTool(
|
|
42941
42942
|
"studio_transform",
|
|
42942
|
-
() => studioTransform(
|
|
42943
|
+
(deps, input, signal) => studioTransform(deps, input, signal)
|
|
42943
42944
|
)
|
|
42944
42945
|
},
|
|
42945
42946
|
{
|
|
@@ -42948,9 +42949,9 @@ function buildStudioTools(depsRef) {
|
|
|
42948
42949
|
description: STUDIO_ADD_ANIMATION_DESCRIPTION,
|
|
42949
42950
|
inputSchema: STUDIO_ADD_ANIMATION_INPUT_SCHEMA,
|
|
42950
42951
|
annotations: { readOnlyHint: false },
|
|
42951
|
-
execute: (
|
|
42952
|
+
execute: writeTool(
|
|
42952
42953
|
"studio_add_animation",
|
|
42953
|
-
() => studioAddAnimation(
|
|
42954
|
+
(deps, input, signal) => studioAddAnimation(deps, input, signal)
|
|
42954
42955
|
)
|
|
42955
42956
|
},
|
|
42956
42957
|
{
|
|
@@ -42959,9 +42960,9 @@ function buildStudioTools(depsRef) {
|
|
|
42959
42960
|
description: STUDIO_UPDATE_ANIMATION_DESCRIPTION,
|
|
42960
42961
|
inputSchema: STUDIO_UPDATE_ANIMATION_INPUT_SCHEMA,
|
|
42961
42962
|
annotations: { readOnlyHint: false },
|
|
42962
|
-
execute: (
|
|
42963
|
+
execute: writeTool(
|
|
42963
42964
|
"studio_update_animation",
|
|
42964
|
-
() => studioUpdateAnimation(
|
|
42965
|
+
(deps, input, signal) => studioUpdateAnimation(deps, input, signal)
|
|
42965
42966
|
)
|
|
42966
42967
|
},
|
|
42967
42968
|
{
|
|
@@ -42970,9 +42971,9 @@ function buildStudioTools(depsRef) {
|
|
|
42970
42971
|
description: STUDIO_ADD_KEYFRAME_DESCRIPTION,
|
|
42971
42972
|
inputSchema: STUDIO_ADD_KEYFRAME_INPUT_SCHEMA,
|
|
42972
42973
|
annotations: { readOnlyHint: false },
|
|
42973
|
-
execute: (
|
|
42974
|
+
execute: writeTool(
|
|
42974
42975
|
"studio_add_keyframe",
|
|
42975
|
-
() => studioAddKeyframe(
|
|
42976
|
+
(deps, input, signal) => studioAddKeyframe(deps, input, signal)
|
|
42976
42977
|
)
|
|
42977
42978
|
},
|
|
42978
42979
|
{
|
|
@@ -42981,9 +42982,9 @@ function buildStudioTools(depsRef) {
|
|
|
42981
42982
|
description: STUDIO_DELETE_ANIMATION_DESCRIPTION,
|
|
42982
42983
|
inputSchema: STUDIO_DELETE_ANIMATION_INPUT_SCHEMA,
|
|
42983
42984
|
annotations: { readOnlyHint: false },
|
|
42984
|
-
execute: (
|
|
42985
|
+
execute: writeTool(
|
|
42985
42986
|
"studio_delete_animation",
|
|
42986
|
-
() => studioDeleteAnimation(
|
|
42987
|
+
(deps, input, signal) => studioDeleteAnimation(deps, input, signal)
|
|
42987
42988
|
)
|
|
42988
42989
|
}
|
|
42989
42990
|
];
|