@popmelt.com/core 0.27.0 → 0.28.0

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.
Files changed (55) hide show
  1. package/claude-plugin/.claude-plugin/plugin.json +1 -1
  2. package/codex-plugin/.codex-plugin/plugin.json +1 -1
  3. package/dist/ParticipantRuntime-4NMUTZL3.mjs +139 -0
  4. package/dist/PopmeltTasteConnectedPane-ZMJXKDPJ.mjs +221 -0
  5. package/dist/PreviewRuntime-AZAHK27Q.mjs +2 -0
  6. package/dist/bridge-entry.mjs +2 -229
  7. package/dist/browser-runtime-57XUOV3C.mjs +2 -0
  8. package/dist/browser.mjs +1 -1
  9. package/dist/chunk-3LBOX7HQ.mjs +3 -0
  10. package/dist/chunk-BISCKKOX.mjs +2 -0
  11. package/dist/chunk-DPSBNNGU.mjs +2 -0
  12. package/dist/chunk-GL4I4MI6.mjs +3 -0
  13. package/dist/chunk-HGW2U6PD.mjs +2 -0
  14. package/dist/chunk-HPQJKWK5.mjs +1 -0
  15. package/dist/chunk-JNR6PO2Z.mjs +369 -0
  16. package/dist/chunk-LVEMYZOA.mjs +2 -0
  17. package/dist/chunk-M3MBL5NR.mjs +2 -0
  18. package/dist/chunk-O4HZP3RP.mjs +2 -0
  19. package/dist/chunk-PKTQWFUA.mjs +2 -0
  20. package/dist/chunk-Q5PC5FWC.mjs +347 -0
  21. package/dist/chunk-QXVMGZFP.mjs +1 -0
  22. package/dist/chunk-R5RMIYS5.mjs +77 -0
  23. package/dist/chunk-WNZFCDVR.mjs +289 -0
  24. package/dist/chunk-XTOCFTVW.mjs +2 -0
  25. package/dist/{chunk-C5Q6LDAS.mjs → chunk-YBULEE33.mjs} +1 -1
  26. package/dist/chunk-YIAZGECE.mjs +2 -0
  27. package/dist/cli.mjs +169 -106
  28. package/dist/focus-inspection-ZKWDPDRI.mjs +2 -0
  29. package/dist/index-CHp2bgs1.d.mts +565 -0
  30. package/dist/index.mjs +1 -1
  31. package/dist/memory-legacy.d.mts +1 -489
  32. package/dist/memory-legacy.mjs +1 -1
  33. package/dist/memory-store.d.mts +2 -660
  34. package/dist/memory-store.mjs +1 -3
  35. package/dist/plugin-astro.mjs +1 -1
  36. package/dist/plugin-nuxt.mjs +1 -1
  37. package/dist/plugin-vite.mjs +1 -1
  38. package/dist/server.d.mts +3 -291
  39. package/dist/server.mjs +7 -234
  40. package/dist/taste-proposal-session-XU4N7RUV.mjs +2 -0
  41. package/dist/types-Bur49CLH.d.mts +349 -0
  42. package/dist/workspace-snapshot-EJQHHDQ4.mjs +2 -0
  43. package/package.json +23 -25
  44. package/dist/ParticipantRuntime-AD3YD4FW.mjs +0 -139
  45. package/dist/PopmeltTasteConnectedPane-HLCTVPJP.mjs +0 -81
  46. package/dist/PreviewRuntime-KGLZJGUN.mjs +0 -2
  47. package/dist/browser-runtime-3JZGB3P2.mjs +0 -2
  48. package/dist/chunk-7YCLSSQA.mjs +0 -2
  49. package/dist/chunk-7YIQQYRU.mjs +0 -77
  50. package/dist/chunk-D7HY2EDH.mjs +0 -2
  51. package/dist/chunk-MDJYUX5S.mjs +0 -370
  52. package/dist/chunk-MTRUVFH7.mjs +0 -1
  53. package/dist/chunk-TFPKDKDO.mjs +0 -345
  54. package/dist/chunk-TSY2K45H.mjs +0 -2
  55. package/dist/server-MJF4KF26.mjs +0 -241
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ function r(){let l=!1,t=null,n,a=new Set,s=()=>a.forEach(e=>e());return{connect(e){t!==e&&(n?.(),t=e,t.setAvailable(l),n=t.subscribe(s),s())},setAvailable(e){l=e,t?.setAvailable(e)},getSnapshot:()=>t?.getSnapshot()??null,subscribe(e){return a.add(e),()=>{a.delete(e)}}}}var b=r();export{b as a};
@@ -1 +1 @@
1
- import{a as o,b as d,c as l,d as s}from"./chunk-MTRUVFH7.mjs";function g(r){let p=r?.basePath??"/popmelt",e={port:null,projectId:null},n="virtual:popmelt/bridge",i=`\0${n}`;return{name:"popmelt",resolveId(t){if(t===n)return i},load(t){if(t===i)return`export const bridgeUrl = ${JSON.stringify(e.port===null?null:`http://localhost:${e.port}`)}; export const projectId = ${JSON.stringify(e.projectId)};`},async configureServer(t){e=await o(r,t,5173),await d(e,t),t.middlewares.use(l(p,()=>e))},transformIndexHtml(){if(e.port!==null)return[{tag:"script",attrs:{type:"text/javascript"},children:s(e),injectTo:"head-prepend"}]}}}export{g as a};
1
+ import{a as o,b as d,c as l,d as s}from"./chunk-HPQJKWK5.mjs";function g(r){let p=r?.basePath??"/popmelt",e={port:null,projectId:null},n="virtual:popmelt/bridge",i=`\0${n}`;return{name:"popmelt",resolveId(t){if(t===n)return i},load(t){if(t===i)return`export const bridgeUrl = ${JSON.stringify(e.port===null?null:`http://localhost:${e.port}`)}; export const projectId = ${JSON.stringify(e.projectId)};`},async configureServer(t){e=await o(r,t,5173),await d(e,t),t.middlewares.use(l(p,()=>e))},transformIndexHtml(){if(e.port!==null)return[{tag:"script",attrs:{type:"text/javascript"},children:s(e),injectTo:"head-prepend"}]}}}export{g as a};
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import{a as s,j as R,r as p,l as C,t as k,q as v,o as b,m,s as F,d as T,e as I}from"./chunk-HGW2U6PD.mjs";var q=["data-popmelt-frame","data-popmelt-media-id","data-testid","data-test","data-cy"];function y(e){let t=e.getRootNode();if(!("querySelectorAll"in t))return null;let r=new Set([...q,...e.getAttributeNames().filter(n=>n!=="id"&&F(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 S(e){if(s(e.ownerDocument))return c(e);let t=y(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 c(e){return D(W(e),e.ownerDocument)}function D(e,t){let r=s(t);if(r){!(r.id&&r.ownerDocument.querySelectorAll(`#${CSS.escape(r.id)}`).length===1)&&!y(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")}"]`:W(r),o=s(r.ownerDocument)?c(r):n;return R(o,t)+e}return e}function W(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=y(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(p().trim()),r=a.host;continue}}if(i){r=i;continue}let l=r.getRootNode();if(!("host"in l))break;t.unshift(p().trim()),r=l.host}return t.join(" > ").replace(/ > >>> > /g,p())}function B(e){try{return C(e)}catch{return null}}var O=900,g=80;function f(e){if(!e)return null;try{return C(e)}catch{return null}}function d(e){return(e??"").replace(/\s+/g," ").trim()}function $(e){let t=d(e.getAttribute("aria-label"));if(t)return t.slice(0,g);let r=d(e.getAttribute("aria-labelledby"));if(r){let o=r.split(/\s+/).map(i=>d(document.getElementById(i)?.textContent)).filter(Boolean).join(" ");if(o)return o.slice(0,g)}let n=d(e.getAttribute("title"));return n?n.slice(0,g):d(e.textContent).slice(0,g)}function M(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=$(n);return o?{triggerSelector:c(n),targetSelector:c(e),label:o}:null}let t=M(e);if(!t)return null;let r=$(t);return r?{triggerSelector:c(t),targetSelector:c(e),label:r}:null}function w(e){let t=[],r=new Set,n=m(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=m(n)}if(t.length===0)return;let o=t.reverse();return{steps:o,location:o.map(i=>i.label)}}function x(e){let t=e?.[0]?.revealRecipe;if(t?.steps.length)return t;let r=f(e?.[0]?.selector);return r?w(r):void 0}function H(e){let t=x(e)?.location.filter(Boolean);return t?.length?`Inside: ${t.join(" \u203A ")}`:null}function A(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 P(e,t,r){return t.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open"?!0:r instanceof HTMLDetailsElement?r.open:A(r)}function j(e,t=O){return e?new Promise(r=>{let n=performance.now(),o=()=>{let i=f(e);if(A(i)){r(i);return}if(performance.now()-n>=t){r(null);return}requestAnimationFrame(o)};o()}):Promise.resolve(null)}function X(e,t){return f(e)??f(t?.[0]?.selector)}async function Z(e,t){let r=X(e,t);if(A(r))return r;let n=x(t)??(r?w(r):void 0);if(!n)return null;for(let i of n.steps){let l=f(i.triggerSelector);if(!(l instanceof HTMLElement))return null;let a=f(i.targetSelector);if(!P(i,l,a)&&(l.click(),!await j(i.targetSelector)))return null}let o=e&&f(e)?e:t?.[0]?.selector;return j(o)}function L(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:k(e),selector:S(e),tagName:e.tagName.toLowerCase()},r=[],n=e.ownerDocument,o=s(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=s(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=V(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 h of e.attributes)h.name.startsWith("data-")&&(l[h.name]=h.value);Object.keys(l).length>0&&(t.dataAttributes=l);let a=L(e);a&&(t.reactComponent=a.name,t.reactComponentPath=a.path,a.source&&(t.reactSource=a.source));let u=ne(e);u&&(t.context=u);let N=w(e);return N&&(t.revealRecipe=N),t}function V(e){let t="";for(let r of e.childNodes)r.nodeType===Node.TEXT_NODE&&(t+=r.textContent||"");return t.trim()}function Y(e,t,r){return _(e,t,r)[0]??null}var G="[data-popmelt-canvas-block]";function E(e,t){let r=v(e,t).find(n=>n.id!=="devtools-canvas"&&n.id!=="devtools-scrim");return!!(r&&b(r,G))}function J(e){return e.namespaceURI==="http://www.w3.org/2000/svg"?e.closest("svg")??e:e}function _(e,t,r){if(E(e,t))return[];let n=new Set,o=v(e,t),i=o.map(J).filter(l=>n.has(l)||(n.add(l),l.id==="devtools-canvas"||l.id==="devtools-toolbar"||l.id==="devtools-scrim")||b(l,"#devtools-toolbar")||l.hasAttribute("data-devtools")||b(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 ee(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=I(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 te(e,t,r){if(ee(e,t,r)||["button","canvas","embed","iframe","img","input","object","select","svg","textarea","video"].includes(e.tagName.toLowerCase()))return!0;let n=getComputedStyle(e);if(n.backgroundImage&&n.backgroundImage!=="none")return!0;let o=n.backgroundColor.trim();if(o&&o!=="transparent"&&!/rgba?\([^)]*,\s*0(?:\.0+)?\s*\)$/.test(o))return!0;let i=T(e),l={top:Number.parseFloat(n.borderTopWidth)||0,right:Number.parseFloat(n.borderRightWidth)||0,bottom:Number.parseFloat(n.borderBottomWidth)||0,left:Number.parseFloat(n.borderLeftWidth)||0};return l.top>0&&r<=i.top+l.top||l.right>0&&t>=i.right-l.right||l.bottom>0&&r>=i.bottom-l.bottom||l.left>0&&t<=i.left+l.left}function re(e,t,r){let n=_(e,t,r);return n.find(o=>te(o,e,t))??n.at(-1)??null}function ne(e){let t=m(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 s(t.ownerDocument)?S(t):`${n}#${t.id}`;if(t.id&&!t.id.startsWith("radix-")&&!t.id.startsWith(":"))return s(t.ownerDocument)?S(t):`${n}#${t.id}`;t=m(t)}return null}export{c as a,D as b,B as c,H as d,Z as e,L as f,z as g,K as h,Q as i,Y as j,E as k,re as l};