hyperframes 0.7.33 → 0.7.34

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/cli.js CHANGED
@@ -50,7 +50,7 @@ var VERSION;
50
50
  var init_version = __esm({
51
51
  "src/version.ts"() {
52
52
  "use strict";
53
- VERSION = true ? "0.7.33" : "0.0.0-dev";
53
+ VERSION = true ? "0.7.34" : "0.0.0-dev";
54
54
  }
55
55
  });
56
56
 
@@ -60667,7 +60667,7 @@ async function applyDomLayerMask(page, showIds, extraHideIds) {
60667
60667
  (args) => {
60668
60668
  const existing = document.getElementById(args.styleId);
60669
60669
  if (existing) existing.remove();
60670
- const restoreMaskedTimedDescendants = () => {
60670
+ const restoreMaskedElements = () => {
60671
60671
  const masked = document.querySelectorAll(`[${args.hiddenAttr}="1"]`);
60672
60672
  for (const node of masked) {
60673
60673
  if (!(node instanceof HTMLElement)) continue;
@@ -60683,7 +60683,25 @@ async function applyDomLayerMask(page, showIds, extraHideIds) {
60683
60683
  node.removeAttribute(args.prevPriorityAttr);
60684
60684
  }
60685
60685
  };
60686
- restoreMaskedTimedDescendants();
60686
+ restoreMaskedElements();
60687
+ const rememberAndHideElement = (el) => {
60688
+ if (el.getAttribute(args.hiddenAttr) !== "1") {
60689
+ const prevVisibility = el.style.getPropertyValue("visibility");
60690
+ const prevPriority = typeof el.style.getPropertyPriority === "function" ? el.style.getPropertyPriority("visibility") : "";
60691
+ if (prevVisibility) {
60692
+ el.setAttribute(args.prevVisibilityAttr, prevVisibility);
60693
+ } else {
60694
+ el.removeAttribute(args.prevVisibilityAttr);
60695
+ }
60696
+ if (prevPriority) {
60697
+ el.setAttribute(args.prevPriorityAttr, prevPriority);
60698
+ } else {
60699
+ el.removeAttribute(args.prevPriorityAttr);
60700
+ }
60701
+ el.setAttribute(args.hiddenAttr, "1");
60702
+ }
60703
+ el.style.setProperty("visibility", "hidden", "important");
60704
+ };
60687
60705
  const hiddenTimedDescendants = [];
60688
60706
  const rememberHiddenTimedDescendants = (root) => {
60689
60707
  for (const node of root.querySelectorAll("[data-start]")) {
@@ -60710,30 +60728,16 @@ async function applyDomLayerMask(page, showIds, extraHideIds) {
60710
60728
  ${showRule}`;
60711
60729
  document.head.appendChild(style);
60712
60730
  for (const el of hiddenTimedDescendants) {
60713
- if (el.getAttribute(args.hiddenAttr) === "1") continue;
60714
- const prevVisibility = el.style.getPropertyValue("visibility");
60715
- const prevPriority = typeof el.style.getPropertyPriority === "function" ? el.style.getPropertyPriority("visibility") : "";
60716
- if (prevVisibility) {
60717
- el.setAttribute(args.prevVisibilityAttr, prevVisibility);
60718
- } else {
60719
- el.removeAttribute(args.prevVisibilityAttr);
60720
- }
60721
- if (prevPriority) {
60722
- el.setAttribute(args.prevPriorityAttr, prevPriority);
60723
- } else {
60724
- el.removeAttribute(args.prevPriorityAttr);
60725
- }
60726
- el.setAttribute(args.hiddenAttr, "1");
60727
- el.style.setProperty("visibility", "hidden", "important");
60731
+ rememberAndHideElement(el);
60728
60732
  }
60729
60733
  for (const id of args.hide) {
60730
60734
  const el = document.getElementById(id);
60731
60735
  if (el) {
60732
- el.style.setProperty("visibility", "hidden", "important");
60736
+ rememberAndHideElement(el);
60733
60737
  }
60734
60738
  const img = document.getElementById(`__render_frame_${id}__`);
60735
60739
  if (img) {
60736
- img.style.setProperty("visibility", "hidden", "important");
60740
+ rememberAndHideElement(img);
60737
60741
  }
60738
60742
  }
60739
60743
  },
@@ -60747,7 +60751,7 @@ ${showRule}`;
60747
60751
  }
60748
60752
  );
60749
60753
  }
60750
- async function removeDomLayerMask(page, extraHideIds) {
60754
+ async function removeDomLayerMask(page, _extraHideIds) {
60751
60755
  await page.evaluate(
60752
60756
  (args) => {
60753
60757
  const style = document.getElementById(args.styleId);
@@ -60766,17 +60770,8 @@ async function removeDomLayerMask(page, extraHideIds) {
60766
60770
  node.removeAttribute(args.prevVisibilityAttr);
60767
60771
  node.removeAttribute(args.prevPriorityAttr);
60768
60772
  }
60769
- for (const id of args.hide) {
60770
- const el = document.getElementById(id);
60771
- if (el) {
60772
- el.style.removeProperty("visibility");
60773
- }
60774
- const img = document.getElementById(`__render_frame_${id}__`);
60775
- if (img) img.style.removeProperty("visibility");
60776
- }
60777
60773
  },
60778
60774
  {
60779
- hide: extraHideIds,
60780
60775
  styleId: DOM_LAYER_MASK_STYLE_ID,
60781
60776
  hiddenAttr: DOM_LAYER_MASK_HIDDEN_ATTR,
60782
60777
  prevVisibilityAttr: DOM_LAYER_MASK_PREV_VISIBILITY_ATTR,
@@ -1 +1 @@
1
- import{g as P}from"./index-BZBjzYc8.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-DlLW9GH4.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-BZBjzYc8.js";/*!
1
+ import{n as Qi}from"./index-DlLW9GH4.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