@popmelt.com/core 0.28.0 → 0.28.2
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 +4 -2
- package/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/{ParticipantRuntime-4NMUTZL3.mjs → ParticipantRuntime-SYIF75DS.mjs} +1 -1
- package/dist/{PopmeltTasteConnectedPane-ZMJXKDPJ.mjs → PopmeltTasteConnectedPane-JO4QR6ZT.mjs} +1 -1
- package/dist/{PreviewRuntime-AZAHK27Q.mjs → PreviewRuntime-JAZLAGQE.mjs} +1 -1
- package/dist/bridge-entry.mjs +1 -1
- package/dist/browser-runtime-7YSJ2DPK.mjs +2 -0
- package/dist/browser.mjs +1 -1
- package/dist/{chunk-JNR6PO2Z.mjs → chunk-264MDJPC.mjs} +25 -25
- package/dist/chunk-A2UXK7AS.mjs +77 -0
- package/dist/{chunk-YBULEE33.mjs → chunk-DZI4H523.mjs} +1 -1
- package/dist/chunk-JQHZFDY5.mjs +2 -0
- package/dist/{chunk-Q5PC5FWC.mjs → chunk-MIGCFNL4.mjs} +3 -3
- package/dist/{chunk-BISCKKOX.mjs → chunk-MP7S5ALD.mjs} +1 -1
- package/dist/{chunk-PKTQWFUA.mjs → chunk-QUNV5PNI.mjs} +1 -1
- package/dist/{chunk-DPSBNNGU.mjs → chunk-SWTSMLHA.mjs} +1 -1
- package/dist/{chunk-WNZFCDVR.mjs → chunk-TP3COBHM.mjs} +25 -25
- package/dist/chunk-XOGBFVWI.mjs +2 -0
- package/dist/cli.mjs +2 -2
- package/dist/{focus-inspection-ZKWDPDRI.mjs → focus-inspection-2FPCQIN2.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-nuxt.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server.mjs +1 -1
- package/package.json +25 -23
- package/dist/browser-runtime-57XUOV3C.mjs +0 -2
- package/dist/chunk-M3MBL5NR.mjs +0 -2
- package/dist/chunk-R5RMIYS5.mjs +0 -77
- package/dist/chunk-YIAZGECE.mjs +0 -2
- /package/dist/{chunk-HPQJKWK5.mjs → chunk-VKFM7ZBT.mjs} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as c,j as F,r as y,l as D,t as T,q as W,o as S,m as g,d as k,s as I,e as q}from"./chunk-HGW2U6PD.mjs";var B=["data-popmelt-frame","data-popmelt-media-id","data-testid","data-test","data-cy"];function w(e){let t=e.getRootNode();if(!("querySelectorAll"in t))return null;let r=new Set([...B,...e.getAttributeNames().filter(n=>n!=="id"&&I(n))]);for(let n of r){let o=e.getAttribute(n);if(!o||o.length>200)continue;let i=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(o):Array.from(o,a=>{if(a==='"'||a==="\\")return`\\${a}`;let u=a.charCodeAt(0);return u<32||u===127?`\\${u.toString(16)} `:a}).join(""),l=`[${n}="${i}"]`;if(t.querySelectorAll(l).length===1)return l}return null}function C(e){if(c(e.ownerDocument))return f(e);let t=w(e);if(t)return t;if(e.id)return`#${e.id}`;let r=e.tagName.toLowerCase(),n=Array.from(e.classList).slice(0,3).join(".");return n?`${r}.${n}`:r}function f(e){return $(x(e),e.ownerDocument)}function $(e,t){let r=c(t);if(r){!(r.id&&r.ownerDocument.querySelectorAll(`#${CSS.escape(r.id)}`).length===1)&&!w(r)&&r.setAttribute("data-popmelt-frame",globalThis.crypto?.randomUUID?.()??`frame-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`);let n=r.hasAttribute("data-popmelt-frame")?`[data-popmelt-frame="${r.getAttribute("data-popmelt-frame")}"]`:x(r),o=c(r.ownerDocument)?f(r):n;return F(o,t)+e}return e}function x(e){if(e.getRootNode().nodeType===9&&e.id&&!e.id.startsWith("radix-")&&!e.id.startsWith(":")&&e.ownerDocument.querySelectorAll(`#${CSS.escape(e.id)}`).length===1)return`#${CSS.escape(e.id)}`;let t=[],r=e;for(;r&&r!==e.ownerDocument.documentElement;){let n=r.tagName.toLowerCase(),o=w(r);if(o?n=o:r.id&&!r.id.startsWith("radix-")&&!r.id.startsWith(":")&&r.getRootNode().querySelectorAll(`#${CSS.escape(r.id)}`).length===1&&(n=`#${CSS.escape(r.id)}`),!o&&!n.startsWith("#")){let a=Array.from(r.classList).filter(u=>!u.startsWith("_")&&u.length<30).slice(0,2);a.length>0&&(n+="."+a.map(u=>CSS.escape(u)).join("."))}let i=r.parentElement;if(i&&!o&&!n.startsWith("#")){let a=Array.from(i.children).filter(u=>u.tagName===r.tagName);if(a.length>1){let u=a.indexOf(r)+1;n+=`:nth-of-type(${u})`}}if(t.unshift(n),o||n.startsWith("#")){let a=r.getRootNode();if(a.nodeType===9)break;if("host"in a){t.unshift(y().trim()),r=a.host;continue}}if(i){r=i;continue}let l=r.getRootNode();if(!("host"in l))break;t.unshift(y().trim()),r=l.host}return t.join(" > ").replace(/ > >>> > /g,y())}function O(e){try{return D(e)}catch{return null}}var M=900,h=80;function d(e){if(!e)return null;try{return D(e)}catch{return null}}function p(e){return(e??"").replace(/\s+/g," ").trim()}function L(e){let t=p(e.getAttribute("aria-label"));if(t)return t.slice(0,h);let r=p(e.getAttribute("aria-labelledby"));if(r){let o=r.split(/\s+/).map(i=>p(document.getElementById(i)?.textContent)).filter(Boolean).join(" ");if(o)return o.slice(0,h)}let n=p(e.getAttribute("title"));return n?n.slice(0,h):p(e.textContent).slice(0,h)}function P(e){return e.id?Array.from(document.querySelectorAll("[aria-controls]")).find(t=>t.getAttribute("aria-controls")===e.id)??null:null}function U(e){if(e instanceof HTMLDetailsElement){let n=Array.from(e.children).find(i=>i.tagName.toLowerCase()==="summary");if(!n)return null;let o=L(n);return o?{triggerSelector:f(n),targetSelector:f(e),label:o}:null}let t=P(e);if(!t)return null;let r=L(t);return r?{triggerSelector:f(t),targetSelector:f(e),label:r}:null}function N(e){let t=[],r=new Set,n=g(e);for(;n&&n!==document.body&&n!==document.documentElement;){let i=U(n);i&&!r.has(i.triggerSelector)&&(r.add(i.triggerSelector),t.push(i)),n=g(n)}if(t.length===0)return;let o=t.reverse();return{steps:o,location:o.map(i=>i.label)}}function j(e){let t=e?.[0]?.revealRecipe;if(t?.steps.length)return t;let r=d(e?.[0]?.selector);return r?N(r):void 0}function H(e){let t=j(e)?.location.filter(Boolean);return t?.length?`Inside: ${t.join(" \u203A ")}`:null}function v(e){if(!e?.isConnected)return!1;let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||e.getClientRects().length===0)return!1;let r=e;for(;r;){let n=window.getComputedStyle(r);if(n.display==="none"||n.visibility==="hidden"||n.visibility==="collapse"||Number.parseFloat(n.opacity||"1")<=0)return!1;r=r.parentElement}return!0}function V(e,t,r){return t.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open"?!0:r instanceof HTMLDetailsElement?r.open:v(r)}function R(e,t=M){return e?new Promise(r=>{let n=performance.now(),o=()=>{let i=d(e);if(v(i)){r(i);return}if(performance.now()-n>=t){r(null);return}requestAnimationFrame(o)};o()}):Promise.resolve(null)}function X(e,t){return d(e)??d(t?.[0]?.selector)}async function Z(e,t){let r=X(e,t);if(v(r))return r;let n=j(t)??(r?N(r):void 0);if(!n)return null;for(let i of n.steps){let l=d(i.triggerSelector);if(!(l instanceof HTMLElement))return null;let a=d(i.targetSelector);if(!V(i,l,a)&&(l.click(),!await R(i.targetSelector)))return null}let o=e&&d(e)?e:t?.[0]?.selector;return R(o)}function E(e){let t=Object.keys(e).find(i=>i.startsWith("__reactFiber$")||i.startsWith("__reactInternalInstance$"));if(!t)return null;let r=e[t],n=[],o=r?._debugSource;for(;r;){let i=r.type,l=i?.displayName||i?.name;l&&typeof l=="string"&&/^[A-Z]/.test(l)&&!l.startsWith("_")&&l!=="Fragment"&&n.unshift(l),r=r.return}return n.length>0?{name:n[n.length-1],path:n,...o?.fileName&&Number.isFinite(o.lineNumber)?{source:o}:{}}:null}function z(e){let t=Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"));if(!t)return[];let r=e[t],n=[];for(;r;){let o=r.type,i=typeof o=="function"||typeof o=="object"?o?.displayName||o?.name:null;i&&typeof i=="string"&&/^[A-Z]/.test(i)&&!i.startsWith("_")&&i!=="Fragment"&&n.push({name:i,fiber:r}),r=r.return}return n.reverse(),n}function K(e){let t=e,r=new Set;for(;t&&!r.has(t);){if(r.add(t),t.stateNode instanceof Element)return t.stateNode;t.child?t=t.child:t=null}return null}function Q(e){let t={targetFingerprint:T(e),selector:C(e),tagName:e.tagName.toLowerCase()},r=[],n=e.ownerDocument,o=c(n);for(;o;)r.unshift({url:n.URL,title:n.title,label:o.title||o.getAttribute("aria-label")||o.id||void 0}),n=o.ownerDocument,o=c(n);r.length&&(t.frameContext=r),e.id&&(t.id=e.id),e.classList.length>0&&(t.className=Array.from(e.classList).join(" "));let i=Y(e)||e.matches('button, a, [role="button"], [role="tab"]')&&(e.getAttribute("aria-label")||e.getAttribute("title")||e.textContent?.trim())||"";i&&i.length>0&&i.length<200&&(t.textContent=i);let l={};for(let m of e.attributes)m.name.startsWith("data-")&&(l[m.name]=m.value);Object.keys(l).length>0&&(t.dataAttributes=l);let a=E(e);a&&(t.reactComponent=a.name,t.reactComponentPath=a.path,a.source&&(t.reactSource=a.source));let u=oe(e);u&&(t.context=u);let s=N(e);return s&&(t.revealRecipe=s),t}function Y(e){let t="";for(let r of e.childNodes)r.nodeType===Node.TEXT_NODE&&(t+=r.textContent||"");return t.trim()}function G(e,t,r){let n=A(e,t,r),o=n.findIndex(i=>i.tagName.toLowerCase()==="canvas");return(o<0?n[0]:n.slice(0,o+1).find(i=>b(i,e,t)))??null}function J(e,t,r){if(typeof document.elementsFromPoint!="function")return!0;for(let n of A(t,r)){if(n===e||e.contains(n))return b(n,t,r);if(b(n,t,r))return!1}return!1}var ee="[data-popmelt-canvas-block]";function _(e,t){let r=W(e,t).find(n=>n.id!=="devtools-canvas"&&n.id!=="devtools-scrim");return!!(r&&S(r,ee))}function te(e){return e.namespaceURI==="http://www.w3.org/2000/svg"?e.closest("svg")??e:e}function A(e,t,r){if(_(e,t))return[];let n=new Set,o=W(e,t),i=o.map(te).filter(l=>n.has(l)||(n.add(l),l.id==="devtools-canvas"||l.id==="devtools-toolbar"||l.id==="devtools-scrim")||S(l,"#devtools-toolbar")||l.hasAttribute("data-devtools")||S(l,"[data-devtools]")?!1:l!==l.ownerDocument.body&&l!==l.ownerDocument.documentElement);return i.length>0?i:r?.allowBodyFallback&&o.includes(document.body)?[document.body]:[]}function re(e,t,r){for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE||!n.textContent?.trim())continue;let o=e.ownerDocument.createRange();o.selectNodeContents(n);let i=o.getClientRects?.();if(i&&Array.from(i).some(l=>{let a=q(t,r,e.ownerDocument);return a.x>=l.left&&a.x<=l.right&&a.y>=l.top&&a.y<=l.bottom}))return!0}return!1}function b(e,t,r){let n=e.ownerDocument.defaultView;if(!n)return!1;let o=n.getComputedStyle(e);if(o.visibility==="hidden"||o.visibility==="collapse")return!1;for(let s=e;s;s=g(s))if(s.ownerDocument.defaultView?.getComputedStyle(s).opacity==="0")return!1;if(re(e,t,r)||["button","canvas","embed","iframe","img","input","object","select","svg","textarea","video"].includes(e.tagName.toLowerCase())||o.backgroundImage&&o.backgroundImage!=="none")return!0;let i=o.backgroundColor.trim();if(i&&i!=="transparent"&&!/rgba?\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(i))return!0;let l=k(e),a={top:Number.parseFloat(o.borderTopWidth)||0,right:Number.parseFloat(o.borderRightWidth)||0,bottom:Number.parseFloat(o.borderBottomWidth)||0,left:Number.parseFloat(o.borderLeftWidth)||0},u=s=>{let m=o[`border${s}Color`];return o[`border${s}Style`]!=="none"&&m!=="transparent"&&!/rgba?\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(m)};return a.top>0&&u("Top")&&r<=l.top+a.top||a.right>0&&u("Right")&&t>=l.right-a.right||a.bottom>0&&u("Bottom")&&r>=l.bottom-a.bottom||a.left>0&&u("Left")&&t<=l.left+a.left}function ne(e,t,r){let n=A(e,t,r);return n.find(o=>b(o,e,t))??n.at(-1)??null}function oe(e){let t=g(e),r=["section","article","nav","aside","header","footer","main"];for(;t&&t!==e.ownerDocument.body;){let n=t.tagName.toLowerCase();if(r.includes(n)&&t.id)return c(t.ownerDocument)?C(t):`${n}#${t.id}`;if(t.id&&!t.id.startsWith("radix-")&&!t.id.startsWith(":"))return c(t.ownerDocument)?C(t):`${n}#${t.id}`;t=g(t)}return null}export{f as a,$ as b,O as c,H as d,Z as e,E as f,z as g,K as h,Q as i,G as j,J as k,_ as l,ne as m};
|