@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.
@@ -1 +1 @@
1
- import{g as P}from"./index-CkxPQxLJ.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-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};
@@ -1,4 +1,4 @@
1
- import{n as Qi}from"./index-CkxPQxLJ.js";/*!
1
+ import{n as Qi}from"./index-BRr1JoHX.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
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-CkxPQxLJ.js"></script>
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: (input, { signal }) => runToolBody(
42919
+ execute: writeTool(
42919
42920
  "studio_set_text",
42920
- () => studioSetText(depsRef.current, input, signal)
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: (input, { signal }) => runToolBody(
42930
+ execute: writeTool(
42930
42931
  "studio_set_style",
42931
- () => studioSetStyle(depsRef.current, input, signal)
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: (input, { signal }) => runToolBody(
42941
+ execute: writeTool(
42941
42942
  "studio_transform",
42942
- () => studioTransform(depsRef.current, input, signal)
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: (input, { signal }) => runToolBody(
42952
+ execute: writeTool(
42952
42953
  "studio_add_animation",
42953
- () => studioAddAnimation(depsRef.current, input, signal)
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: (input, { signal }) => runToolBody(
42963
+ execute: writeTool(
42963
42964
  "studio_update_animation",
42964
- () => studioUpdateAnimation(depsRef.current, input, signal)
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: (input, { signal }) => runToolBody(
42974
+ execute: writeTool(
42974
42975
  "studio_add_keyframe",
42975
- () => studioAddKeyframe(depsRef.current, input, signal)
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: (input, { signal }) => runToolBody(
42985
+ execute: writeTool(
42985
42986
  "studio_delete_animation",
42986
- () => studioDeleteAnimation(depsRef.current, input, signal)
42987
+ (deps, input, signal) => studioDeleteAnimation(deps, input, signal)
42987
42988
  )
42988
42989
  }
42989
42990
  ];