@vtbag/inspection-chamber 1.0.11 → 1.0.12
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/README.md +1 -2
- package/lib/index.js +3 -3
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
Put your view transitions through their paces in the Inspection Chamber!
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@vtbag/inspection-chamber)
|
|
7
|
-

|
|
8
7
|

|
|
9
8
|
[](https://www.npmjs.com/package/@vtbag/inspection-chamber)
|
|
10
9
|
|
|
@@ -37,5 +36,5 @@ The Inspection Chamber is your ultimate playground for experimenting with the Vi
|
|
|
37
36
|
|
|
38
37
|
With a comprehensive set of controls at your fingertips, you can interactively test and fine-tune your view transitions to perfection. Dive in and explore all the features the Inspection Chamber offers to elevate your web development projects!
|
|
39
38
|
|
|
40
|
-
Find the documentation of the Inspection Chamber at https://vtbag.pages.dev/inspection-chamber
|
|
39
|
+
Find the documentation of the Inspection Chamber at [https://vtbag.pages.dev/tools/inspection-chamber/](https://vtbag.pages.dev/tools/inspection-chamber/)!
|
|
41
40
|
|
package/lib/index.js
CHANGED
|
@@ -898,7 +898,7 @@
|
|
|
898
898
|
[data-vtbag-transition-name] {
|
|
899
899
|
cursor: help;
|
|
900
900
|
}
|
|
901
|
-
`)}function dt(){pt(),mt()}function mt(){let t=1/Math.max(1e-6,parseFloat(top.document.querySelector("#vtbag-ui-tsf")?.innerText??"1.0"));top.__vtbag.inspectionChamber.animations?.forEach(e=>{e.playbackRate=t,e.playState==="paused"&&e.play()})}function It(){let t=top.document.querySelector("#vtbag-ui-slo-mo"),e=top.document.querySelector("#vtbag-ui-tsf");t.addEventListener("input",n=>{if(n.target instanceof HTMLInputElement){let i=(Math.exp(parseInt(n.target.value,10)/100)-100)/100+1-.14;e.innerText=`${i.toFixed(1)}`,mt()}})}function pt(){let t=top.__vtbag.inspectionChamber,e=t.longestAnimation;e&&(top.document.querySelector("#vtbag-ui-slo-mo-progress").innerText=` ${~~(e.currentTime??0)} / ${t.animationEndTime} ms`,v()&&top.setTimeout(pt,20))}var vt=[],ne=["top","left","right","bottom"];var At;function Ct(t){At??=ie();let e=[];return e.push("inset"),vt.forEach(n=>{t.getPropertyValue(n)!==At[n]&&e.push(n)}),e.filter(n=>!(n.startsWith("inset-")||n.startsWith("animation-")||ne.includes(n)))}function ie(){let t=top.document.createElement("div");top.document.body.appendChild(t);let e=top.getComputedStyle(t),n={};for(let i=0;i<e.length;i++){let o=e.item(i);vt.push(o),n[o]=e.getPropertyValue(o)}return top.document.body.removeChild(t),n}function bt(t,e,n,i,o){let a=e.createElement("vtbag-pseudo-twin");d(a,t,"::view-transition","");let l=top.__vtbag.inspectionChamber.twin=a.firstElementChild;n.forEach(s=>{let c=d(l,t,"group",s),u=d(c,t,"image-pair",s);d(u,t,"old",s)&&i.add(s),d(u,t,"new",s)&&o.add(s)}),e.body.insertAdjacentElement("beforeend",l);function d(s,c,u,g){if(!s){console.error("[inspection chamber] Works not as expected ;-)");return}let I=top.__vtbag.inspectionChamber,r=s.ownerDocument,p=c.defaultView,A=g?`::view-transition-${u}(${g})`:u,b=p.getComputedStyle(c.documentElement,A);if(!b.height.endsWith("px"))return;I?.styleMap.set(g?`${u}-${g}`:u,b);let C=r.createElement("vtbag-pseudo-twin");return C.id=oe(g,u),C.dataset.vtbagTransitionName=g,C.dataset.vtbagTransitionPseudo=u,s.insertAdjacentElement("beforeend",C),yt(b,C.style),C.style.visibility="hidden",C}}function oe(t,e){return t?`vtbag-twin--view-transition-${e}-${t}`:"vtbag-twin--view-transition"}async function Mt(t){top.document.documentElement.classList.add("vtbag-twin-sync");let e=top.__vtbag.inspectionChamber,n=e.frameDocument.documentElement;for(let i of[...e.twin.children]){let o=i.dataset.vtbagTransitionName;t.has(o)||(W(i,o),W(i.children[0],o),W(i.children[0].children[0],o),W(i.children[0].children[1],o),await new Promise(a=>self.setTimeout(a)))}top.document.documentElement.classList.remove("vtbag-twin-sync")}function W(t,e){if(!t)return;let n=t.dataset.vtbagTransitionPseudo,i=top.__vtbag.inspectionChamber.styleMap.get(`${n}-${e}`),o=t.style;yt(i,o)}function yt(t,e){e.position=t.position,e.inset=t.inset,e.height=t.height,e.width=t.width,e.transform=t.transform,e.zIndex=t.zIndex,e.transformOrigin=t.transformOrigin,e.perspective=t.perspective}function ht(t){if(v()){let e,n=1/0;top.__vtbag.inspectionChamber.twin.querySelectorAll("vtbag-pseudo-twin > vtbag-pseudo-twin > vtbag-pseudo-twin > vtbag-pseudo-twin").forEach(i=>{let{clientX:o,clientY:a}=t,{top:l,bottom:d,left:s,right:c,width:u,height:g}=i.getBoundingClientRect(),I=i.dataset.vtbagTransitionName,r=i.dataset.vtbagTransitionPseudo;if(u&&g&&u*g<n&&l<=a&&a<=d&&s<=o&&o<=c){let p=!0,A;window.top.document.querySelectorAll("#vtbag-ui-names li").forEach(b=>{b.innerText===I&&(A=b,b.classList.contains(`${r}-hidden`)&&(p=!1))}),p&&(n=u*g,e=A)}}),e?.click()}}function P(){top.document.querySelector('#vtbag-ui-filter input[type="text"]').value="",top.document.querySelector("#vtbag-ui-filter ul input").click(),Z()}function ft(){top.document.querySelectorAll("#vtbag-ui-names li").forEach(t=>t.classList.remove("selected","old-hidden","new-hidden")),S(),wt(),O()}function Lt(){top.document.querySelector("#vtbag-ui-filter ul").addEventListener("change",Z),top.document.querySelector('#vtbag-ui-filter input[type="text"]').addEventListener("input",Z),top.document.querySelector("#vtbag-ui-filter button").addEventListener("click",P)}var Et=500;function Y(t,e){
|
|
901
|
+
`)}function dt(){pt(),mt()}function mt(){let t=1/Math.max(1e-6,parseFloat(top.document.querySelector("#vtbag-ui-tsf")?.innerText??"1.0"));top.__vtbag.inspectionChamber.animations?.forEach(e=>{e.playbackRate=t,e.playState==="paused"&&e.play()})}function It(){let t=top.document.querySelector("#vtbag-ui-slo-mo"),e=top.document.querySelector("#vtbag-ui-tsf");t.addEventListener("input",n=>{if(n.target instanceof HTMLInputElement){let i=(Math.exp(parseInt(n.target.value,10)/100)-100)/100+1-.14;e.innerText=`${i.toFixed(1)}`,mt()}})}function pt(){let t=top.__vtbag.inspectionChamber,e=t.longestAnimation;e&&(top.document.querySelector("#vtbag-ui-slo-mo-progress").innerText=` ${~~(e.currentTime??0)} / ${t.animationEndTime} ms`,v()&&top.setTimeout(pt,20))}var vt=[],ne=["top","left","right","bottom"];var At;function Ct(t){At??=ie();let e=[];return e.push("inset"),vt.forEach(n=>{t.getPropertyValue(n)!==At[n]&&e.push(n)}),e.filter(n=>!(n.startsWith("inset-")||n.startsWith("animation-")||ne.includes(n)))}function ie(){let t=top.document.createElement("div");top.document.body.appendChild(t);let e=top.getComputedStyle(t),n={};for(let i=0;i<e.length;i++){let o=e.item(i);vt.push(o),n[o]=e.getPropertyValue(o)}return top.document.body.removeChild(t),n}function bt(t,e,n,i,o){let a=e.createElement("vtbag-pseudo-twin");d(a,t,"::view-transition","");let l=top.__vtbag.inspectionChamber.twin=a.firstElementChild;n.forEach(s=>{let c=d(l,t,"group",s),u=d(c,t,"image-pair",s);d(u,t,"old",s)&&i.add(s),d(u,t,"new",s)&&o.add(s)}),e.body.insertAdjacentElement("beforeend",l);function d(s,c,u,g){if(!s){console.error("[inspection chamber] Works not as expected ;-)");return}let I=top.__vtbag.inspectionChamber,r=s.ownerDocument,p=c.defaultView,A=g?`::view-transition-${u}(${g})`:u,b=p.getComputedStyle(c.documentElement,A);if(!b.height.endsWith("px"))return;I?.styleMap.set(g?`${u}-${g}`:u,b);let C=r.createElement("vtbag-pseudo-twin");return C.id=oe(g,u),C.dataset.vtbagTransitionName=g,C.dataset.vtbagTransitionPseudo=u,s.insertAdjacentElement("beforeend",C),yt(b,C.style),C.style.visibility="hidden",C}}function oe(t,e){return t?`vtbag-twin--view-transition-${e}-${t}`:"vtbag-twin--view-transition"}async function Mt(t){top.document.documentElement.classList.add("vtbag-twin-sync");let e=top.__vtbag.inspectionChamber,n=e.frameDocument.documentElement;for(let i of[...e.twin.children]){let o=i.dataset.vtbagTransitionName;t.has(o)||(W(i,o),W(i.children[0],o),W(i.children[0].children[0],o),W(i.children[0].children[1],o),await new Promise(a=>self.setTimeout(a)))}top.document.documentElement.classList.remove("vtbag-twin-sync")}function W(t,e){if(!t)return;let n=t.dataset.vtbagTransitionPseudo,i=top.__vtbag.inspectionChamber.styleMap.get(`${n}-${e}`),o=t.style;yt(i,o)}function yt(t,e){e.position=t.position,e.inset=t.inset,e.height=t.height,e.width=t.width,e.transform=t.transform,e.zIndex=t.zIndex,e.transformOrigin=t.transformOrigin,e.perspective=t.perspective}function ht(t){if(v()){let e,n=1/0;top.__vtbag.inspectionChamber.twin.querySelectorAll("vtbag-pseudo-twin > vtbag-pseudo-twin > vtbag-pseudo-twin > vtbag-pseudo-twin").forEach(i=>{let{clientX:o,clientY:a}=t,{top:l,bottom:d,left:s,right:c,width:u,height:g}=i.getBoundingClientRect(),I=i.dataset.vtbagTransitionName,r=i.dataset.vtbagTransitionPseudo;if(u&&g&&u*g<n&&l<=a&&a<=d&&s<=o&&o<=c){let p=!0,A;window.top.document.querySelectorAll("#vtbag-ui-names li").forEach(b=>{b.innerText===I&&(A=b,b.classList.contains(`${r}-hidden`)&&(p=!1))}),p&&(n=u*g,e=A)}}),e?.click()}}function P(){top.document.querySelector('#vtbag-ui-filter input[type="text"]').value="",top.document.querySelector("#vtbag-ui-filter ul input").click(),Z()}function ft(){top.document.querySelectorAll("#vtbag-ui-names li").forEach(t=>t.classList.remove("selected","old-hidden","new-hidden")),S(),wt(),O()}function Lt(){top.document.querySelector("#vtbag-ui-filter ul").addEventListener("change",Z),top.document.querySelector('#vtbag-ui-filter input[type="text"]').addEventListener("input",Z),top.document.querySelector("#vtbag-ui-filter button").addEventListener("click",P)}var Et=500;function Y(t,e,n){return h(()=>{top.document.querySelector("#vtbag-ui-info").innerHTML="",top.document.querySelectorAll("#vtbag-ui-names li").forEach(o=>o.remove()),top.document.querySelector("#vtbag-ui-names h4").innerText=n?"Animation Groups":"Elements w/ View Transition Names",top.document.querySelector("#vtbag-ui-names div").style.display=n?"flex":"none";let i=top.document.querySelector("#vtbag-ui-names > ol");(n?t:[...t].sort()).forEach((o,a)=>{let l=top.document.createElement("li");l.innerText=o,n&&e.has(o)&&l.classList.add("old"),n?.has(o)&&l.classList.add("new"),l.style.viewTransitionName=`vtbag-name-${a}`,i.appendChild(l)}),top.document.querySelector("#vtbag-ui-filter ul").style.display=n?"block":"none",Z()},"update names"),t}function Z(){let t=top.document.querySelectorAll("#vtbag-ui-names li"),e=top.document.querySelector("#vtbag-ui-filter ul input:checked").id.replace("vtbag-c-",""),n=top.document.querySelector('#vtbag-ui-filter input[type="text"]').value;h(()=>{t.forEach(i=>{let o=i.style,a=i.classList,l=i.innerText;o.display=(n===""||l.includes(n))&&(e==="all"||e==="both"&&a.contains("new")&&a.contains("old")||e==="old-only"&&a.contains("old")&&!a.contains("new")||e==="new-only"&&a.contains("new")&&!a.contains("old")||e==="old"&&a.contains("old")||e==="new"&&a.contains("new"))?"list-item":"none"})},"refresh names")}async function G(){if(!v())return;let e=top.__vtbag.inspectionChamber.twin.ownerDocument,n=top.document,i=top.getComputedStyle(n.documentElement),o=n.documentElement.classList.contains("vtbag-ui-column"),a=o?parseFloat(i.getPropertyValue("--vtbag-panel-width")||"0"):0,l=o?0:parseFloat(i.getPropertyValue("--vtbag-panel-height")||"0"),d=n.querySelectorAll("#vtbag-ui-names li"),s=new Set;d.forEach(c=>{c.classList.contains("old-hidden")&&c.classList.contains("new-hidden")&&s.add(c.innerText)}),await Mt(s),d.forEach(c=>{let u=c.innerText,g=c.classList;g[g.contains("old")&&Tt(e.querySelector(`#vtbag-twin--view-transition-old-${u}`),a,l)===!1?"add":"remove"]("old-invisible"),g[g.contains("new")&&Tt(e.querySelector(`#vtbag-twin--view-transition-new-${u}`),a,l)===!1?"add":"remove"]("new-invisible"),g[(!g.contains("old")||g.contains("old-invisible"))&&(!g.contains("new")||g.contains("new-invisible"))?"add":"remove"]("invisible")})}function Tt(t,e=0,n=0){if(!t)return;let{top:i,right:o,bottom:a,left:l,width:d,height:s}=t.getBoundingClientRect();return!1,d>0&&s>0&&i<window.top.innerHeight-n&&a>0&&l<window.top.innerWidth-e&&o>0}function S(){let t=[];top.document.querySelectorAll("#vtbag-ui-names li").forEach(e=>{let n=e.innerText,i=e.classList,o=!1;i.contains("old-hidden")&&(o=!0,t.push(`::view-transition-old(${n}) { visibility: hidden; }`)),i.contains("new-hidden")&&(t.push(`::view-transition-new(${n}) { visibility: hidden; }`),o&&t.push(`::view-transition-group(${n}) { visibility: hidden; }`))}),L(t.join(`
|
|
902
902
|
`),"image-visibility"),f()}function ae(t){let e=y()==="full-control"&&v(),n=top.document.querySelectorAll("#vtbag-ui-names li"),i,o=top.document.querySelector("#vtbag-ui-controller"),a=top.document.querySelector("#vtbag-ui-progress"),l=top.document.querySelector("#vtbag-ui-controller2"),d=top.document.querySelector("#vtbag-ui-progress2");n.forEach(s=>{s.innerText===t?(s.classList.contains("selected")?(l.value=o.value,d.innerText=a.innerText):(o.value=l.value,a.innerText=d.innerText),s.classList[e?"toggle":"add"]("selected"),i=s,s.style.display==="none"&&P()):e||s.classList.remove("selected")}),i&&i.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})}function ge(t){let e=top.document.querySelector("#vtbag-ui-info");if(t&&!v())navigator.clipboard.writeText(`inspect(top.document.querySelector("#vtbag-main-frame").contentDocument.querySelector("${St(t)}"))`),e.innerHTML=`<h4>Info</h4>
|
|
903
903
|
<p>DevTools selector '<b><code>${St(t)}</code></b>' copied to clipboard. Paste to DevTools console to further inspect the element.</p>`;else{navigator.clipboard.writeText('inspect(top.document.querySelector("#vtbag-main-frame").contentDocument.querySelector(":root"))');let n=t&&t.dataset.vtbagTransitionName;e.innerHTML=`<h4>Info</h4>
|
|
904
904
|
<p>DevTools selector '<b><code>:root</code></b>' copied to clipboard. Paste to DevTools console, then expand the <code><html></code> element and its <code>::view-transition</code> pseudo element.</p>${n&&"<p>Look for the <code>::view-transition-group("+n+")</code> pseudo element and its children.</p>"}`}T(e)}function St(t,e=!0){let n=[];for(;t&&t.nodeType===Node.ELEMENT_NODE;){let i=t.nodeName.toLowerCase();if(e&&t.id){i="#"+t.id,n.unshift(i);break}else{let o=t,a=1;for(;o=o.previousElementSibling;)o.nodeName.toLowerCase()===i&&a++;a!==1&&(i+=":nth-of-type("+a+")")}n.unshift(i),t=t.parentNode}return n.join(" > ")}function Nt(){let t=e=>{let n=e+"-hidden",o=[...top.document.querySelectorAll("#vtbag-ui-names li")].filter(l=>l.classList.contains(e)),a=o.length>0&&o[0].classList.contains(n)?"remove":"add";o.forEach(l=>l.classList[a](n)),S()};top.document.querySelector("#vtbag-ui-names button").addEventListener("click",()=>ft()),top.document.querySelector("#vtbag-ui-names-old").addEventListener("click",()=>t("old")),top.document.querySelector("#vtbag-ui-names-new").addEventListener("click",()=>t("new")),top.document.querySelector("#vtbag-ui-names ol").addEventListener("click",e=>{let n=!e.isTrusted;if(e.target instanceof HTMLElement){let i=e.target.closest("li");if(i&&e instanceof PointerEvent){i.style.display==="none"&&P();let o=y();h(()=>{let{left:a,width:l}=i.getBoundingClientRect(),d=e.clientX-a,s=!n&&d>=0&&d<=20,c=!n&&d>=l-20&&d<=l,u=i.classList;if(s&&u.contains("old")){u.toggle("old-hidden"),S();return}if(c&&u.contains("new")){u.toggle("new-hidden"),S();return}let g=i.innerText;!n&&re(g),ae(g);let I=window.top.__vtbag.inspectionChamber?.frameDocument.querySelector(`[data-vtbag-transition-name="${g}"]`);o&&o!=="bypass"&&ge(I),v()&&B(g)},"names",!0)}}O()})}var xt=[{boxShadow:"inset 0 0 50px darkslateblue"},{boxShadow:"inset 0 0 0px darkslateblue"},{boxShadow:"0 0 50px darkslateblue"},{boxShadow:"0 0 100px darkslateblue",display:"inline-block",minWidth:"20px",minHeight:"20px",backgroundColor:"darkslateblue",opacity:"0.5"},{boxShadow:"0 0 50px darkslateblue"},{boxShadow:"0 0 0px darkslateblue"},{boxShadow:"inset 0 0 50px darkslateblue"}];function re(t){if(v())le(t);else{let e=top.__vtbag.inspectionChamber,n=e.frameDocument.querySelector(`[data-vtbag-transition-name="${t}"]`);if(n){n.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"});let i=self.getComputedStyle(n).display;xt[3].display=i.includes("block")?i:"inline-block",e.glow=n.animate(xt,{duration:500,iterations:1}),self.setTimeout(()=>e.glow=void 0,500)}}}function le(t){L(`
|
|
@@ -925,11 +925,11 @@
|
|
|
925
925
|
::view-transition-image-pair(*) {
|
|
926
926
|
animation: vtbag-twin-noop forwards;
|
|
927
927
|
animation-duration: inherit;
|
|
928
|
-
}`,"catch",void 0,!0)}async function zt(){let t=top.__vtbag.inspectionChamber,e=t.frameDocument,n=t.animations=[],i=t.keyframesMap=new Map,o=new Set;t.styleMap=new Map;let a=new WeakSet,l=!0,d=!1;for(;l;)l=!1,e.getAnimations().forEach(g=>{if(g.effect?.pseudoElement?.startsWith("::view-transition")){let{pseudoName:I,viewTransitionName:r}=J(g);if(!a.has(g)){let p=g instanceof CSSAnimation?g.animationName:void 0,A=g instanceof CSSTransition?g.transitionProperty:void 0;A?console.warn("[inspection-chamber] Unhandled transition:",r,I,A):p?(g.pause(),g.currentTime=0,r&&I==="image-pair"&&o.add(r),!r&&I==="::view-transition"&&(d=!0),p==="vtbag-twin-noop"?g.cancel():(n.push(g),i.set(p,g.effect?.getKeyframes()))):console.warn("[inspection-chamber] Unhandled animation:",r,I,g.constructor.name),l=!0}a.add(g)}}),l&&await new Promise(g=>e.defaultView.setTimeout(g)),d&&console.warn("[inspection-chamber] Root root animation detected");let s=g=>g.effect?.getComputedTiming().endTime?.valueOf()??0;n.length>0?(t.longestAnimation=n.reduce((g,I)=>s(I)>s(g)?I:g),t.animationEndTime=~~s(t.longestAnimation)):(t.longestAnimation=void 0,t.animationEndTime=0);let c=new Set,u=new Set;bt(e,e,o,c,u),Y(c,u)}function kt(){let t=top.__vtbag.inspectionChamber;t.frameDocument.querySelector("#vtbag-adopted-sheet")?.remove(),t.animations?.forEach(n=>{try{n.finish()}catch(i){console.error(i,n,n.effect?.getComputedTiming())}})}var H=(t,e)=>e?`<tr><td style="text-align:right">${t}</td><td><tt><b>${e}</b></tt></td><tr>`:"";function B(t){let e=new Set,n=["offset","computedOffset","easing","composite"],i=top.__vtbag.inspectionChamber,o=i.styleMap,a=top.document.querySelector("#vtbag-ui-animations");a.innerHTML=v()?`<h4 data-vtbag-name=${t}>Animations of ${t}:</h4>`+l("group")+l("image-pair")+l("old")+l("new"):"",a.querySelectorAll('input[type="checkbox"]').forEach(c=>{let u=JSON.parse(c.dataset.vtbagContext);c.removeAttribute("data-vtbag-context"),c.checked=Zt(t,u.pseudo,u.idx)?.playState==="paused",c.addEventListener("change",()=>{se(t,u.pseudo,u.idx,c.checked)||(c.checked=!c.checked)})}),a.querySelectorAll("[data-vtbag-snapshot]").forEach(c=>c.addEventListener("toggle",Dt)),q(),Dt(),T(a);function l(c){let u=[],g=o.get(`${c}-${t}`),I=g?.animation,r=g?.animationName;if(e.clear(),r&&r!=="vtbag-twin-noop"&&r!=="none"){let A=r.split(", "),b=0;I.split(/,(?![^(]*\))/).forEach((C,D)=>{i.keyframesMap?.get(A[D])?u.push(`<details><summary><input type="checkbox" data-vtbag-context='{"pseudo":"${c}","idx":${D-b}}'/> ${c}: <tt>${A[D]}</tt></summary>${p(A[D],C.endsWith(r)?C.slice(0,-r.length):C)}</details>`):(u.push(`<span style="padding-right: 0.25ex; width: 4.75ex; display: inline-block; text-align:right">\u26A0\uFE0F</span> ${c}: keyframes <tt>${A[D]}</tt> not found.<br>`),++b)}),e.size>0&&u.push(`<details data-vtbag-live-values="${c+","+[...e].sort().join(",")}"><summary> \u{1F300}  ${c}: live values</summary></details>`)}return g&&u.push(`<details data-vtbag-snapshot="${c}"><summary> \u{1F4F8} ${c}: CSS snapshot</summary></details>`),u.length>0?u.join("")+"<hr>":"";function p(A,b){let C=d(A)||"\u26A0\uFE0F no properties? ";return`
|
|
928
|
+
}`,"catch",void 0,!0)}async function zt(){let t=top.__vtbag.inspectionChamber,e=t.frameDocument,n=t.animations=[],i=t.keyframesMap=new Map,o=new Set;t.styleMap=new Map;let a=new WeakSet,l=!0,d=!1;for(;l;)l=!1,e.getAnimations().forEach(g=>{if(g.effect?.pseudoElement?.startsWith("::view-transition")){let{pseudoName:I,viewTransitionName:r}=J(g);if(!a.has(g)){let p=g instanceof CSSAnimation?g.animationName:void 0,A=g instanceof CSSTransition?g.transitionProperty:void 0;A?console.warn("[inspection-chamber] Unhandled transition:",r,I,A):p?(g.pause(),g.currentTime=0,r&&I==="image-pair"&&o.add(r),!r&&I==="::view-transition"&&(d=!0),p==="vtbag-twin-noop"?g.cancel():(n.push(g),i.set(p,g.effect?.getKeyframes()))):console.warn("[inspection-chamber] Unhandled animation:",r,I,g.constructor.name),l=!0}a.add(g)}}),l&&await new Promise(g=>e.defaultView.setTimeout(g)),d&&console.warn("[inspection-chamber] Root root animation detected");let s=g=>g.effect?.getComputedTiming().endTime?.valueOf()??0;n.length>0?(t.longestAnimation=n.reduce((g,I)=>s(I)>s(g)?I:g),t.animationEndTime=~~s(t.longestAnimation)):(t.longestAnimation=void 0,t.animationEndTime=0);let c=new Set,u=new Set;bt(e,e,o,c,u),Y(o,c,u)}function kt(){let t=top.__vtbag.inspectionChamber;t.frameDocument.querySelector("#vtbag-adopted-sheet")?.remove(),t.animations?.forEach(n=>{try{n.finish()}catch(i){console.error(i,n,n.effect?.getComputedTiming())}})}var H=(t,e)=>e?`<tr><td style="text-align:right">${t}</td><td><tt><b>${e}</b></tt></td><tr>`:"";function B(t){let e=new Set,n=["offset","computedOffset","easing","composite"],i=top.__vtbag.inspectionChamber,o=i.styleMap,a=top.document.querySelector("#vtbag-ui-animations");a.innerHTML=v()?`<h4 data-vtbag-name=${t}>Animations of ${t}:</h4>`+l("group")+l("image-pair")+l("old")+l("new"):"",a.querySelectorAll('input[type="checkbox"]').forEach(c=>{let u=JSON.parse(c.dataset.vtbagContext);c.removeAttribute("data-vtbag-context"),c.checked=Zt(t,u.pseudo,u.idx)?.playState==="paused",c.addEventListener("change",()=>{se(t,u.pseudo,u.idx,c.checked)||(c.checked=!c.checked)})}),a.querySelectorAll("[data-vtbag-snapshot]").forEach(c=>c.addEventListener("toggle",Dt)),q(),Dt(),T(a);function l(c){let u=[],g=o.get(`${c}-${t}`),I=g?.animation,r=g?.animationName;if(e.clear(),r&&r!=="vtbag-twin-noop"&&r!=="none"){let A=r.split(", "),b=0;I.split(/,(?![^(]*\))/).forEach((C,D)=>{i.keyframesMap?.get(A[D])?u.push(`<details><summary><input type="checkbox" data-vtbag-context='{"pseudo":"${c}","idx":${D-b}}'/> ${c}: <tt>${A[D]}</tt></summary>${p(A[D],C.endsWith(r)?C.slice(0,-r.length):C)}</details>`):(u.push(`<span style="padding-right: 0.25ex; width: 4.75ex; display: inline-block; text-align:right">\u26A0\uFE0F</span> ${c}: keyframes <tt>${A[D]}</tt> not found.<br>`),++b)}),e.size>0&&u.push(`<details data-vtbag-live-values="${c+","+[...e].sort().join(",")}"><summary> \u{1F300}  ${c}: live values</summary></details>`)}return g&&u.push(`<details data-vtbag-snapshot="${c}"><summary> \u{1F4F8} ${c}: CSS snapshot</summary></details>`),u.length>0?u.join("")+"<hr>":"";function p(A,b){let C=d(A)||"\u26A0\uFE0F no properties? ";return`
|
|
929
929
|
<table>
|
|
930
930
|
${H("animation:",b)}
|
|
931
931
|
${H("animates:",C)}
|
|
932
932
|
${s(A)}
|
|
933
|
-
</table>`}}function d(c){let u=new Set;i.keyframesMap?.get(c)?.forEach(I=>Object.keys(I).forEach(r=>u.add(r)));let g=[...u].filter(I=>!n.includes(I)).sort();return g.forEach(I=>e.add(I)),g.join(", ")}function s(c){return i.keyframesMap?.get(c)?.map(u=>H(+(u.computedOffset??0)*100+"% :",Object.keys(u).sort().filter(g=>!n.includes(g)).map(g=>u[g]).join(", "))).join("")}}function wt(){top.__vtbag.inspectionChamber.animations?.forEach(t=>{t instanceof CSSAnimation&&t.animationName!=="vtbag-twin-noop"&&t.playState==="idle"&&t.pause()}),B(top.document.querySelector("#vtbag-ui-animations h4").dataset.vtbagName),f()}function se(t,e,n,i){let o=Zt(t,e,n);return o?(i?(o.pause(),y()==="full-control"&&f()):o.cancel(),!0):!1}function Zt(t,e,n){let i=top.__vtbag.inspectionChamber,a=i.styleMap.get(`${e}-${t}`).animationName.split(", ")[n],l=i.animations,d=`::view-transition-${e}(${t})`,s=l.filter(u=>u.effect?.pseudoElement===d);if(n>=s.length){console.error(`[injection chamber] found ${s.length} animations for ${d} when looking for animation with index ${n} called ${t}`);return}let c=s[n];if(c instanceof CSSAnimation&&c.animationName!==a){console.error(`[injection chamber] found an animation called ${c.animationName} for ${d} when looking for animation at index ${n} with expected name ${t}`);return}return c}function q(){let t=top.document.querySelector("h4[data-vtbag-name]")?.dataset.vtbagName,n=top.__vtbag.inspectionChamber.styleMap;top.document.querySelectorAll("[data-vtbag-live-values]").forEach(i=>{let[o,...a]=i.dataset.vtbagLiveValues.split(","),l=n.get(`${o}-${t}`),d=a.map(s=>H(s+":",l.getPropertyValue(s)));i.innerHTML=`<summary> \u{1F300}  ${o}: live values</summary><table>`+d.join("")+"</table>"})}function Dt(){let t=top.document.querySelector("h4[data-vtbag-name]")?.dataset.vtbagName,n=top.__vtbag.inspectionChamber.styleMap;top.document.querySelectorAll("[data-vtbag-snapshot]").forEach(i=>{if(i.open){let o=i.dataset.vtbagSnapshot,a=i.previousElementSibling?.dataset.vtbagLiveValues?.split(",").slice(1)??[""],l=n.get(`${o}-${t}`),d=Ct(l).filter(s=>!a.includes(s)).sort().map(s=>H(s+":",l.getPropertyValue(s)));i.innerHTML=`<summary> \u{1F4F8} ${o}: CSS snapshot</summary><table>`+d.join("")+"</table>"}})}function Yt(){let t=top.__vtbag.inspectionChamber.animationEndTime;top.document.querySelector("#vtbag-ui-controller-max").innerText=t+" ms",top.document.querySelector("#vtbag-ui-progress").innerText="0";let e=top.document.querySelector("#vtbag-ui-controller");e.max=""+t,e.value="0",e.disabled=!1,top.document.querySelector("#vtbag-ui-progress2").innerText="0";let n=top.document.querySelector("#vtbag-ui-controller2");n.max=""+t,n.value="0",n.disabled=!1,f(),G()}function f(){let t=top.__vtbag.inspectionChamber,e=t.animations;if(t.updateNameVisibilityTimeout&&(top.clearTimeout(t.updateNameVisibilityTimeout),t.updateNameVisibilityTimeout=void 0),t.updateNameVisibilityTimeout=top.setTimeout(G,Et),e){let n=parseInt(top.document.querySelector("#vtbag-ui-progress").innerText,10),i=parseInt(top.document.querySelector("#vtbag-ui-progress2").innerText,10),o=new Set;top.document.querySelectorAll("#vtbag-ui-names li.selected").forEach(a=>o.add(a.innerText)),e.forEach(a=>{if(a.playState==="paused"){let{viewTransitionName:l}=J(a);a.currentTime=l&&o.has(l)?n:i}})}q()}function J(t){let e=t.effect?.pseudoElement?.replace(/::view-transition-(new|old|group|image-pair)\((.*)\)/,"$1 $2").split(" ");return{pseudoName:e?.[0],viewTransitionName:e?.[1]}}function Ht(){let t=top.document.querySelector("#vtbag-ui-controller"),e=top.document.querySelector("#vtbag-ui-progress");t.addEventListener("input",o=>{o.target instanceof HTMLInputElement&&(e.innerText=""+~~o.target.value,f())});let n=top.document.querySelector("#vtbag-ui-controller2"),i=top.document.querySelector("#vtbag-ui-progress2");n.addEventListener("input",o=>{o.target instanceof HTMLInputElement&&(i.innerText=""+~~o.target.value,f())})}function O(){v()&&y()==="full-control"&&f()}var Wt="vtbag-ui-panel-orientation",Pt="vtbag-ui-framed",Ot="named_only",Vt="\u{1F52C}";top.__vtbag??={};top.__vtbag.inspectionChamber??={};var M=top.__vtbag.inspectionChamber;top===self?top.setTimeout(Ie,500):self.parent===top&&ce();function ce(){let t=M.frameDocument=self.document;self.addEventListener("pageswap",Ut,{once:!0}),self.addEventListener("pagereveal",ue,{once:!0}),e();function e(){let n=top.document.startViewTransition;n&&(t.startViewTransition=i=>{"@vtbag";return Ut(),M.viewTransition=n.call(t,async()=>{await Promise.resolve(),await i(),Qt()}),M.viewTransition})}}function Ut(){!1,M.glow?.cancel(),N(!1,!1)}function ue(t){M.viewTransition="viewTransition"in t&&t.viewTransition||void 0,Qt()}function Qt(){!1,M.viewTransition&&(jt(),de())}function de(){nt();let t=top.document.documentElement,e=M.viewTransition,n={bypass:()=>{},"slow-motion":dt,"full-control":Yt,compare:()=>{}},i=y();e.updateCallbackDone.catch(()=>{}),e.ready.then(async()=>{if(i&&i!=="bypass"){try{await zt(),N(!!top.document.querySelector("#vtbag-ui-framed")?.checked,!!top.document.querySelector("#vtbag-ui-named-only")?.checked),M.twin.ownerDocument.addEventListener("click",ht)}finally{}n[i]()}top.history.replaceState(history.state,"",self.location.href),top.document.title=Vt+" "+self.document.title}).finally(()=>{}),e.finished.finally(()=>{it(),M.viewTransition=void 0,M.frameDocument?.querySelector("#vtbag-twin--view-transition")?.remove(),kt(),M.animations=void 0,M.longestAnimation=void 0,N(!!top.document.querySelector("#vtbag-ui-framed")?.checked,!!top.document.querySelector("#vtbag-ui-named-only")?.checked),Y(V()),S(),top.document.querySelector("#vtbag-ui-slo-mo-progress").innerText="",top.document.querySelector("#vtbag-ui-animations").innerText="",!y()&&top.document.querySelector("#vtbag-ui-modi li input")?.click(),M.frameDocument.addEventListener("click",Bt),gt()})}function Gt(){let t=top.document.documentElement;t.style.setProperty("--vtbag-background-accent",t.style.colorScheme.startsWith("dark")?"#4E545D":"#c6d1d7")}function me(){let t=top.document.querySelector("#vtbag-tutorial-mode");t.checked=localStorage.getItem("vtbag-tutorial-mode")!=="false",t.addEventListener("change",()=>{localStorage.setItem("vtbag-tutorial-mode",""+t.checked);let e=top.document.querySelector("#vtbag-ui-inner-panel #vtbag-ui-messages h4"),n=top.document.querySelector("#vtbag-ui-panel #vtbag-ui-messages h4");!t.checked&&e&&e.click(),t.checked&&n&&n.click()})}async function Ie(){if(top.document.querySelector("#vtbag-ui-panel"))return;let t=top.document.documentElement;if(top.sessionStorage.getItem(j)==="true"){et();return}let e=top.getComputedStyle(t).colorScheme,n=top.document.title,i=top.document.querySelector('link[rel="icon"]')?.outerHTML??"",o=X.replace('<iframe id="vtbag-main-frame" src="/"></iframe>',`<iframe id="vtbag-main-frame" style="opacity: 0;" src="${location.href}"></iframe>`).replace("<title></title>",`<title>${Vt} ${n}</title>`).replace('<link rel="icon"/>',i);top.addEventListener("resize",Rt),t.innerHTML=o,t.style.colorScheme=e,Rt(),Gt(),me(),Q();let a=top.document.querySelector("#vtbag-main-frame");if(await new Promise(d=>a.onload=d),!top.document.startViewTransition){top.document.querySelector("#vtbag-ui-messages").innerHTML=`
|
|
933
|
+
</table>`}}function d(c){let u=new Set;i.keyframesMap?.get(c)?.forEach(I=>Object.keys(I).forEach(r=>u.add(r)));let g=[...u].filter(I=>!n.includes(I)).sort();return g.forEach(I=>e.add(I)),g.join(", ")}function s(c){return i.keyframesMap?.get(c)?.map(u=>H(+(u.computedOffset??0)*100+"% :",Object.keys(u).sort().filter(g=>!n.includes(g)).map(g=>u[g]).join(", "))).join("")}}function wt(){top.__vtbag.inspectionChamber.animations?.forEach(t=>{t instanceof CSSAnimation&&t.animationName!=="vtbag-twin-noop"&&t.playState==="idle"&&t.pause()}),B(top.document.querySelector("#vtbag-ui-animations h4").dataset.vtbagName),f()}function se(t,e,n,i){let o=Zt(t,e,n);return o?(i?(o.pause(),y()==="full-control"&&f()):o.cancel(),!0):!1}function Zt(t,e,n){let i=top.__vtbag.inspectionChamber,a=i.styleMap.get(`${e}-${t}`).animationName.split(", ")[n],l=i.animations,d=`::view-transition-${e}(${t})`,s=l.filter(u=>u.effect?.pseudoElement===d);if(n>=s.length){console.error(`[injection chamber] found ${s.length} animations for ${d} when looking for animation with index ${n} called ${t}`);return}let c=s[n];if(c instanceof CSSAnimation&&c.animationName!==a){console.error(`[injection chamber] found an animation called ${c.animationName} for ${d} when looking for animation at index ${n} with expected name ${t}`);return}return c}function q(){let t=top.document.querySelector("h4[data-vtbag-name]")?.dataset.vtbagName,n=top.__vtbag.inspectionChamber.styleMap;top.document.querySelectorAll("[data-vtbag-live-values]").forEach(i=>{let[o,...a]=i.dataset.vtbagLiveValues.split(","),l=n.get(`${o}-${t}`),d=a.map(s=>H(s+":",l.getPropertyValue(s)));i.innerHTML=`<summary> \u{1F300}  ${o}: live values</summary><table>`+d.join("")+"</table>"})}function Dt(){let t=top.document.querySelector("h4[data-vtbag-name]")?.dataset.vtbagName,n=top.__vtbag.inspectionChamber.styleMap;top.document.querySelectorAll("[data-vtbag-snapshot]").forEach(i=>{if(i.open){let o=i.dataset.vtbagSnapshot,a=i.previousElementSibling?.dataset.vtbagLiveValues?.split(",").slice(1)??[""],l=n.get(`${o}-${t}`),d=Ct(l).filter(s=>!a.includes(s)).sort().map(s=>H(s+":",l.getPropertyValue(s)));i.innerHTML=`<summary> \u{1F4F8} ${o}: CSS snapshot</summary><table>`+d.join("")+"</table>"}})}function Yt(){let t=top.__vtbag.inspectionChamber.animationEndTime;top.document.querySelector("#vtbag-ui-controller-max").innerText=t+" ms",top.document.querySelector("#vtbag-ui-progress").innerText="0";let e=top.document.querySelector("#vtbag-ui-controller");e.max=""+t,e.value="0",e.disabled=!1,top.document.querySelector("#vtbag-ui-progress2").innerText="0";let n=top.document.querySelector("#vtbag-ui-controller2");n.max=""+t,n.value="0",n.disabled=!1,f(),G()}function f(){let t=top.__vtbag.inspectionChamber,e=t.animations;if(t.updateNameVisibilityTimeout&&(top.clearTimeout(t.updateNameVisibilityTimeout),t.updateNameVisibilityTimeout=void 0),t.updateNameVisibilityTimeout=top.setTimeout(G,Et),e){let n=parseInt(top.document.querySelector("#vtbag-ui-progress").innerText,10),i=parseInt(top.document.querySelector("#vtbag-ui-progress2").innerText,10),o=new Set;top.document.querySelectorAll("#vtbag-ui-names li.selected").forEach(a=>o.add(a.innerText)),e.forEach(a=>{if(a.playState==="paused"){let{viewTransitionName:l}=J(a);a.currentTime=l&&o.has(l)?n:i}})}q()}function J(t){let e=t.effect?.pseudoElement?.replace(/::view-transition-(new|old|group|image-pair)\((.*)\)/,"$1 $2").split(" ");return{pseudoName:e?.[0],viewTransitionName:e?.[1]}}function Ht(){let t=top.document.querySelector("#vtbag-ui-controller"),e=top.document.querySelector("#vtbag-ui-progress");t.addEventListener("input",o=>{o.target instanceof HTMLInputElement&&(e.innerText=""+~~o.target.value,f())});let n=top.document.querySelector("#vtbag-ui-controller2"),i=top.document.querySelector("#vtbag-ui-progress2");n.addEventListener("input",o=>{o.target instanceof HTMLInputElement&&(i.innerText=""+~~o.target.value,f())})}function O(){v()&&y()==="full-control"&&f()}var Wt="vtbag-ui-panel-orientation",Pt="vtbag-ui-framed",Ot="named_only",Vt="\u{1F52C}";top.__vtbag??={};top.__vtbag.inspectionChamber??={};var M=top.__vtbag.inspectionChamber;top===self?top.setTimeout(Ie,500):self.parent===top&&ce();function ce(){let t=M.frameDocument=self.document;self.addEventListener("pageswap",Ut,{once:!0}),self.addEventListener("pagereveal",ue,{once:!0}),e();function e(){let n=top.document.startViewTransition;n&&(t.startViewTransition=i=>{"@vtbag";return Ut(),M.viewTransition=n.call(t,async()=>{await Promise.resolve(),i&&await i(),Qt()}),M.viewTransition})}}function Ut(){!1,M.glow?.cancel(),N(!1,!1)}function ue(t){M.viewTransition="viewTransition"in t&&t.viewTransition||void 0,Qt()}function Qt(){!1,M.viewTransition&&(jt(),de())}function de(){nt();let t=top.document.documentElement,e=M.viewTransition,n={bypass:()=>{},"slow-motion":dt,"full-control":Yt,compare:()=>{}},i=y();e.updateCallbackDone.catch(()=>{}),e.ready.then(async()=>{if(i&&i!=="bypass"){try{await zt(),N(!!top.document.querySelector("#vtbag-ui-framed")?.checked,!!top.document.querySelector("#vtbag-ui-named-only")?.checked),M.twin.ownerDocument.addEventListener("click",ht)}finally{}n[i]()}top.history.replaceState(history.state,"",self.location.href),top.document.title=Vt+" "+self.document.title}).finally(()=>{}),e.finished.finally(()=>{it(),M.viewTransition=void 0,M.frameDocument?.querySelector("#vtbag-twin--view-transition")?.remove(),kt(),M.animations=void 0,M.longestAnimation=void 0,N(!!top.document.querySelector("#vtbag-ui-framed")?.checked,!!top.document.querySelector("#vtbag-ui-named-only")?.checked),Y(V()),S(),top.document.querySelector("#vtbag-ui-slo-mo-progress").innerText="",top.document.querySelector("#vtbag-ui-animations").innerText="",!y()&&top.document.querySelector("#vtbag-ui-modi li input")?.click(),M.frameDocument.addEventListener("click",Bt),gt()})}function Gt(){let t=top.document.documentElement;t.style.setProperty("--vtbag-background-accent",t.style.colorScheme.startsWith("dark")?"#4E545D":"#c6d1d7")}function me(){let t=top.document.querySelector("#vtbag-tutorial-mode");t.checked=localStorage.getItem("vtbag-tutorial-mode")!=="false",t.addEventListener("change",()=>{localStorage.setItem("vtbag-tutorial-mode",""+t.checked);let e=top.document.querySelector("#vtbag-ui-inner-panel #vtbag-ui-messages h4"),n=top.document.querySelector("#vtbag-ui-panel #vtbag-ui-messages h4");!t.checked&&e&&e.click(),t.checked&&n&&n.click()})}async function Ie(){if(top.document.querySelector("#vtbag-ui-panel"))return;let t=top.document.documentElement;if(top.sessionStorage.getItem(j)==="true"){et();return}let e=top.getComputedStyle(t).colorScheme,n=top.document.title,i=top.document.querySelector('link[rel="icon"]')?.outerHTML??"",o=X.replace('<iframe id="vtbag-main-frame" src="/"></iframe>',`<iframe id="vtbag-main-frame" style="opacity: 0;" src="${location.href}"></iframe>`).replace("<title></title>",`<title>${Vt} ${n}</title>`).replace('<link rel="icon"/>',i);top.addEventListener("resize",Rt),t.innerHTML=o,t.style.colorScheme=e,Rt(),Gt(),me(),Q();let a=top.document.querySelector("#vtbag-main-frame");if(await new Promise(d=>a.onload=d),!top.document.startViewTransition){top.document.querySelector("#vtbag-ui-messages").innerHTML=`
|
|
934
934
|
<p>I'm sorry!</p><p>Native view transitions are required to make the \u{1F52C} Inspection Chamber work, but they are not supported by this browser.</p>
|
|
935
935
|
<p>Sadly have to give up.</p>`,top.document.querySelectorAll("#vtbag-ui-modi, #vtbag-ui-filter, #vtbag-ui-names, #vtbag-ui-animations, #vtbag-ui-info").forEach(d=>d.remove());return}Y(V()),pe();let l=top.document.querySelector("#divider");w(l,(d,s)=>{t.classList.contains("vtbag-ui-column")?t.classList.contains("vtbag-ui-tl")?t.style.setProperty("--vtbag-panel-width",`calc(max(216px, ${Math.min(innerWidth-100,d)}px))`):t.style.setProperty("--vtbag-panel-width",`calc(max(216px, 100vw - ${Math.max(100,d+1)}px))`):t.classList.contains("vtbag-ui-tl")?t.style.setProperty("--vtbag-panel-height",`calc(max(245px, ${Math.min(innerHeight-100,s)}px))`):t.style.setProperty("--vtbag-panel-height",`calc(max(245px, 100vh - ${Math.max(100,s+1)}px))`)}),localStorage.getItem("vtbag-tutorial-mode")!=="false"&&top.document.querySelector("#vtbag-ui-messages h4").click(),a.animate([{opacity:0,transform:"translateY(100vh)"},{opacity:1}],{duration:500,fill:"forwards"}),a.contentDocument.addEventListener("click",Bt)}function Bt(t){if(v())return;let n=t.target.closest("[data-vtbag-transition-name]");if(n){let i=n.dataset.vtbagTransitionName;top.document.querySelectorAll("#vtbag-ui-names li").forEach(o=>{o.innerText===i&&(o.click(),t.ctrlKey&&t.shiftKey&&t.preventDefault())})}}function Rt(){let t=top.document.documentElement,e=top.localStorage.getItem(Wt)??"";e?(e.split(" ").forEach(n=>t.classList.add(n)),Jt()):top.matchMedia("(orientation: landscape)").matches!==t.classList.contains("vtbag-ui-column")&&qt()}function qt(){h(()=>{let t=top.document.documentElement.classList;z(),t.toggle("vtbag-ui-column"),t.contains("vtbag-ui-column")&&t.toggle("vtbag-ui-tl"),top.localStorage.setItem(Wt,[...t].filter(e=>e.startsWith("vtbag-ui-")).join(" ")),Jt()},"switch orientation")}function Jt(){let t=top.document.querySelector("#vtbag-ui-turn"),e=top.document.documentElement.classList;t.innerText="\u292A\u2928\u2929\u2927"[(e.contains("vtbag-ui-column")?2:0)+(e.contains("vtbag-ui-tl")?1:0)]}function pe(){top.document.querySelector("#vtbag-ui-turn").addEventListener("click",()=>qt()),top.document.querySelector("#vtbag-ui-light-dark").addEventListener("click",()=>{let o=top.document.documentElement.style;top.document.querySelector("#vtbag-main-frame").contentDocument.documentElement.style.colorScheme=o.colorScheme=o.colorScheme.startsWith("dark")?"light":"dark",Gt()}),ot(),top.document.querySelector("#vtbag-ui-standby").addEventListener("click",()=>{top.sessionStorage.setItem(j,"true"),top.location.reload()}),top.document.querySelector("#vtbag-ui-modi ul").addEventListener("change",Ae),Lt(),Nt();let e=top.document.querySelector("#vtbag-ui-framed"),n=top.document.querySelector("#vtbag-ui-named-only");e.addEventListener("change",i),n.addEventListener("change",i);function i(){let o=e.checked,a=n.checked;top.sessionStorage.setItem(Pt,o?"X":""),top.sessionStorage.setItem(Ot,a?"X":""),N(o,a)}It(),Ht(),top.document.querySelectorAll("#vtbag-ui-control-exit, #vtbag-ui-control-play").forEach(o=>o.addEventListener("click",z)),top.addEventListener("keyup",function(o){o.key==="Escape"&&(v()?z():(top.sessionStorage.setItem(j,"true"),top.location.reload()))})}function Ae(){let t=top.document.querySelector("#vtbag-ui-modi ul input:checked");if(t){let e=t.id.replace("vtbag-m-","");e!==y()&&h(()=>{Q(e),z(),top.document.querySelector("#vtbag-ui-filter ul input").click(),e==="slow-motion"&&F("#vtbag-ui-slow-motion"),e==="full-control"&&F("#vtbag-ui-control"),e==="bypass"&&F("#vtbag-ui-modi"),ut(e),at()},"update-modus")}}function F(t){let e=top.document.querySelector("#vtbag-ui-framed"),n=top.document.querySelector("#vtbag-ui-named-only"),i=e.parentElement,o=top.document.querySelector(t);e.checked=!!top.sessionStorage.getItem(Pt),n.checked=!!top.sessionStorage.getItem(Ot),N(e.checked,n.checked),i&&o&&i.parentElement!==o&&o.insertAdjacentElement("beforeend",i)}})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtbag/inspection-chamber",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "The Inspection Chamber is an in-browser development tool that gives you all the knobs and dials to interactively put your view transitions through their paces.",
|
|
6
6
|
"files": [
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"keywords": [
|
|
22
22
|
"view",
|
|
23
23
|
"transition",
|
|
24
|
+
"view-transition",
|
|
24
25
|
"view transition",
|
|
25
26
|
"animation",
|
|
26
27
|
"debugging",
|
|
@@ -37,11 +38,11 @@
|
|
|
37
38
|
"url": "https://github.com/sponsors/martrapp"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
|
-
"@changesets/cli": "^2.27.
|
|
41
|
-
"@eslint/js": "^9.
|
|
41
|
+
"@changesets/cli": "^2.27.8",
|
|
42
|
+
"@eslint/js": "^9.10.0",
|
|
42
43
|
"@types/dom-view-transitions": "^1.0.5",
|
|
43
44
|
"esbuild": "^0.23.1",
|
|
44
45
|
"prettier": "^3.3.3",
|
|
45
|
-
"typescript": "^5.
|
|
46
|
+
"typescript": "^5.6.2"
|
|
46
47
|
}
|
|
47
48
|
}
|