@popmelt.com/core 0.34.0 → 0.35.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.
- package/README.md +23 -863
- package/THIRD_PARTY_NOTICES.md +46 -0
- package/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/ExploreAttachment-TTEKD4AU.mjs +1 -0
- package/dist/PagePreviewLayer-TJZOJBSD.mjs +1 -0
- package/dist/ParticipantRuntime-BQAOTSQZ.mjs +1 -0
- package/dist/PhoneHostGate-LNSDZOG2.mjs +1 -0
- package/dist/PopmeltTasteConnectedPane-NCCF7YUX.mjs +1 -0
- package/dist/{PreviewRuntime-EYKB7MG5.mjs → PreviewRuntime-H2UOLP6T.mjs} +1 -1
- package/dist/QueuedReplies-LQUBEZ6K.mjs +1 -0
- package/dist/SuppliedContext-YKQSMF3J.mjs +1 -0
- package/dist/ThreadErrorCard-4MOA34C4.mjs +1 -0
- package/dist/ThreadPanel-T6IXWFLA.mjs +1 -0
- package/dist/adapter-react-three-fiber.d.mts +1 -1
- package/dist/bridge-entry.mjs +1 -1
- package/dist/browser-runtime-HQM2Y6EL.mjs +1 -0
- package/dist/browser.d.mts +4 -4
- package/dist/browser.mjs +1 -1
- package/dist/{checkFixture-AMLLLJNS.mjs → checkFixture-BXILOUP5.mjs} +1 -1
- package/dist/{chunk-2ETPREWQ.mjs → chunk-66VOM5NA.mjs} +1 -1
- package/dist/chunk-APP5IYTE.mjs +1 -0
- package/dist/chunk-AYDREFWN.mjs +1 -0
- package/dist/chunk-CRJPE33X.mjs +1 -0
- package/dist/chunk-DC47WNPG.mjs +1 -0
- package/dist/chunk-DJTGR3RO.mjs +1 -0
- package/dist/chunk-DOJBWTT5.mjs +1 -0
- package/dist/chunk-F45IVFS3.mjs +1 -0
- package/dist/chunk-GKOMTSWV.mjs +1 -0
- package/dist/chunk-HU2XWUJC.mjs +1 -0
- package/dist/{chunk-MJ2PFKF3.mjs → chunk-KTRMNVPZ.mjs} +1 -1
- package/dist/{chunk-YXPRWW6B.mjs → chunk-M5P6VHZY.mjs} +1 -1
- package/dist/{chunk-QQB5G3VB.mjs → chunk-N4737FRL.mjs} +1 -1
- package/dist/{chunk-YTUQYKLM.mjs → chunk-NDGM4DAP.mjs} +1 -1
- package/dist/{chunk-GSEMSZDB.mjs → chunk-OAHYSDJ4.mjs} +1 -1
- package/dist/chunk-PYGRFSUU.mjs +1 -0
- package/dist/chunk-R34FOW4D.mjs +1 -0
- package/dist/{chunk-H2RLTCUJ.mjs → chunk-R3AJWOID.mjs} +1 -1
- package/dist/{chunk-RSUMSUAW.mjs → chunk-S7BCEQKP.mjs} +1 -1
- package/dist/{chunk-E5WNW4WE.mjs → chunk-T4CCY2EL.mjs} +1 -1
- package/dist/chunk-TH7DML4A.mjs +1 -0
- package/dist/chunk-UEGDSECJ.mjs +1 -0
- package/dist/chunk-WDAXARLI.mjs +1 -0
- package/dist/{chunk-Y6WD56SO.mjs → chunk-XG2YIAJS.mjs} +1 -1
- package/dist/chunk-Y3SF5YCR.mjs +1 -0
- package/dist/{chunk-BACXPVHP.mjs → chunk-ZG6XHKYO.mjs} +1 -1
- package/dist/chunk-ZG7MAEEV.mjs +30 -0
- package/dist/chunk-ZSL57PQ7.mjs +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/codex-note-context-OUG4S6XE.mjs +1 -0
- package/dist/codex-project-B5466BL6.mjs +1 -0
- package/dist/focus-inspection-SZJ5KP23.mjs +1 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +1 -1
- package/dist/media.d.mts +3 -3
- package/dist/{participantBootstrap-ClKpD2qC.d.mts → participantBootstrap-DFJlcKRI.d.mts} +2 -2
- package/dist/peer-client-SCSWLRCX.mjs +1 -0
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-nuxt.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.mjs +1 -1
- package/dist/{steerStyles-VKQD57KC.mjs → steerStyles-E76E44PI.mjs} +1 -1
- package/dist/{subjects-EWAR5-0S.d.mts → subjects-DdavjSTL.d.mts} +12 -0
- package/dist/{video-adapter-BUMpNTCP.d.mts → video-adapter-DB6Hex1f.d.mts} +1 -1
- package/package.json +1 -3
- package/dist/ExploreAttachment-BG7ZOQSA.mjs +0 -1
- package/dist/PagePreviewLayer-CBDGPMJQ.mjs +0 -1
- package/dist/ParticipantRuntime-FSZX2PUQ.mjs +0 -1
- package/dist/PhoneHostGate-OM7FLOJ2.mjs +0 -1
- package/dist/PopmeltTasteConnectedPane-KJSBPJQR.mjs +0 -1
- package/dist/QueuedReplies-ZYUDSTS2.mjs +0 -1
- package/dist/SuppliedContext-7THB2WZY.mjs +0 -1
- package/dist/ThreadErrorCard-J2VTA5JW.mjs +0 -1
- package/dist/ThreadPanel-PNVMIIYJ.mjs +0 -1
- package/dist/browser-runtime-FFT5NH66.mjs +0 -1
- package/dist/chunk-3WSTAV5B.mjs +0 -1
- package/dist/chunk-67OWRNU3.mjs +0 -30
- package/dist/chunk-BFVLMSG5.mjs +0 -1
- package/dist/chunk-BJ25TGJN.mjs +0 -1
- package/dist/chunk-FMI4VQDZ.mjs +0 -1
- package/dist/chunk-GRPDZGPP.mjs +0 -1
- package/dist/chunk-JRP5XFYN.mjs +0 -1
- package/dist/chunk-LD3532UC.mjs +0 -1
- package/dist/chunk-MP6ZV2DN.mjs +0 -1
- package/dist/chunk-N66ZZG3L.mjs +0 -1
- package/dist/chunk-P4KM3K5M.mjs +0 -1
- package/dist/chunk-R3FPXDQS.mjs +0 -1
- package/dist/chunk-TRHC7WBO.mjs +0 -1
- package/dist/chunk-XSMCZUDR.mjs +0 -1
- package/dist/chunk-YC5CUNRU.mjs +0 -1
- package/dist/codex-note-context-NUKGR2WT.mjs +0 -1
- package/dist/codex-project-KE7ZZ6YX.mjs +0 -1
- package/dist/focus-inspection-BPPRCMNN.mjs +0 -1
- package/dist/peer-client-UQDASAO7.mjs +0 -1
- /package/dist/{chunk-G6RYESYI.mjs → chunk-6LBPTCGC.mjs} +0 -0
- /package/dist/{chunk-3GXLNBXU.mjs → chunk-XM6RE6HT.mjs} +0 -0
package/dist/chunk-BFVLMSG5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{b as e}from"./chunk-DOCRI237.mjs";import{f as t}from"./chunk-YC5CUNRU.mjs";import{b as n,a,c as o,d as i,e as r,s,r as l}from"./chunk-N66ZZG3L.mjs";import{domToCanvas as m}from"modern-screenshot";import{useId as c,useState as p,useLayoutEffect as u}from"react";async function h(s,l){if(s&&s.pathname===location.pathname)try{let c=n(s),p=a(c.element),u=c.legacyScene||(p&&(p===c.element||c.element?.closest("svg,canvas"))?p:null),h=u?"component":"element",d=u??o(c,"element",!1);if(!d||d.closest("[data-popmelt-explore-original],[data-popmelt-explore-scene]"))return;let{width:f,height:g}=d.getBoundingClientRect();if(f<=0||g<=0)return;let v=getComputedStyle(d),x={capturedAt:Date.now(),backdrop:e(d),selector:s.selector,pathname:s.pathname,scope:h,width:f,height:g,viewport:{width:innerWidth,height:innerHeight},textFonts:r(d),style:Object.fromEntries(i.map(e=>[e,v.getPropertyValue(e)]))};try{let e=l&&(d.matches("canvas")||d.querySelector("canvas"))?await l():[],n=await t(e,()=>m(d,{width:Math.ceil(f),height:Math.ceil(g),scale:Math.min(2,512/Math.max(f,g)),timeout:1500,backgroundColor:x.backdrop,style:{margin:"0",position:"static",transform:"none"},filter:e=>!(e instanceof Element&&e.matches("[data-devtools],[data-popmelt-root],[data-popmelt-explore-preview]"))}));for(;n.width&&n.height;){let e=n.toDataURL("image/webp",.8);if(e.length<=96e3&&/^data:image\/(webp|png);base64,/.test(e)){x.still=e;break}if(Math.max(n.width,n.height)<32)break;let t=document.createElement("canvas");t.width=Math.max(1,Math.floor(n.width/2)),t.height=Math.max(1,Math.floor(n.height/2)),t.getContext("2d").drawImage(n,0,0,t.width,t.height),n=t}}catch{}return x}catch{return}}async function d(e,t){let n=1===e.annotations.length&&e.annotations[0];n&&s(n.instruction??"")&&(e.exploreCapture=await h(l(n,location.pathname),t))}function f(e,t,n){let a=e.flatMap(({requestedAt:e,resolvedAt:a})=>Number.isFinite(e)&&Number.isFinite(a)?[[Math.max(t,e),Math.min(n,a)]]:[]).sort((e,t)=>e[0]-t[0]),o=t,i=0;for(let[e,t]of a)i+=Math.max(0,t-Math.max(o,e)),o=Math.max(o,t);return i}function g(e){let t=new Map,n=new Set;for(let a of e)if("approval"===a.type){let e=a.data.approval;t.set(e.id,e)}else("done"===a.type||"error"===a.type)&&n.add(String(a.data.jobId));return new Set([...t.values()].filter(e=>"pending"===e.status&&!n.has(e.jobId)).map(e=>e.jobId))}function v(e,t){if(!e?.frames?.length)return[];let n=new Map;for(let t of e.steps){let e=t.visuals?.afterFrameId;e&&!n.has(e)&&n.set(e,t.action?.label?`After ${t.action.label}`:"Resulting state")}return e.frames.flatMap((e,a)=>{let o=t[e.imageIndex];return o?[{id:e.id,imageIndex:e.imageIndex,label:0===a?"Initial state":n.get(e.id)??"State",url:o}]:[]})}function x(e){let t=e.instruction?.trim();return t?e.attachments?.some(e=>e.name?.trim()===t)?null:t:null}function b(e,t){let n=e?.tagName?.toLowerCase(),a=e?.id?`#${e.id}`:"",o=e?.className?`.${e.className.trim().split(/\s+/).slice(0,2).join(".")}`:"",i=n?`${n}${a}${o}`:t;return e?.reactComponent?`<${e.reactComponent}> ${i}`:i}function w(e){let t=e.elements?.[0]?.reactComponent||e.elements?.[0]?.tagName||e.linkedSelector,n=e.type&&"annotation"!==e.type?`${e.type} annotation`:"Annotation";return t?`${n} on ${t}`:n}function y(e){let t=e.annotations.map(e=>{let t=e.interactionEpisode?.steps.length??0;return{kind:"annotation",annotationId:e.id,pathname:e.pathname,text:x(e)??w(e),...t>0?{interactionEpisodeStepCount:t}:{}}}),n=new Map,a=e=>{let a=`${e.pathname??""}:${e.durableSelector??e.selector}`,o=n.get(a);if(o)return o.changes.push(e.text),void(void 0!==e.annotationNumber&&(void 0===o.annotationNumber||e.annotationNumber<o.annotationNumber)&&(o.annotationNumber=e.annotationNumber));let i={kind:"changes",elementKey:a,elementLabel:b(e.element,e.selector),...void 0!==e.annotationNumber?{annotationNumber:e.annotationNumber}:{},pathname:e.pathname,changes:[e.text]};n.set(a,i),t.push(i)};for(let t of e.styleModifications??[])for(let e of t.changes)a({...t,text:`${e.property}: ${e.original||"unset"} → ${e.modified||"unset"}${e.token?` (${e.token})`:""}`});for(let t of e.textModifications??[])a({...t,text:`Text: ${t.original||"empty"} → ${t.modified||"empty"}`});for(let t of e.domModifications??[])a({...t,text:"copy"===t.operation?"Copied element":"Moved element"});return e.spacingTokenChanges?.length&&t.push({kind:"changes",elementKey:"spacing-tokens",elementLabel:"Spacing tokens",changes:e.spacingTokenChanges.map(e=>`${e.tokenName}: ${e.originalPx}px → ${e.newPx}px`)}),t}function $(e){let t=e.annotations.flatMap(e=>{let t=x(e);return t?[{instruction:t,pathname:e.pathname}]:[]});if(0===t.length)return;if(new Set(t.map(e=>e.pathname).filter(Boolean)).size<=1)return t.map(e=>e.instruction).join("\n\n");let n=new Map;for(let e of t){let t=e.pathname||"(unknown)",a=n.get(t)??[];a.push(e.instruction),n.set(t,a)}return[...n.entries()].map(([e,t])=>`\`${e}\`\n${t.map(e=>`- ${e}`).join("\n")}`).join("\n")}function M(e,t=96){let n=e.replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,Math.max(0,t-3))}...`:n}function k(e,t){let n=c(),[a,o]=p(-1),[i,r]=p(!1),s=t.some(({suffix:e})=>e);u(()=>{let t=e.current;if(!t||!s)return;let n=()=>o(t.matches(":focus")&&t.selectionStart===t.selectionEnd?t.selectionEnd:-1),a=()=>o(-1);return n(),t.addEventListener("selectionchange",n),t.addEventListener("select",n),t.addEventListener("input",n),t.addEventListener("focus",n),t.addEventListener("blur",a),()=>{t.removeEventListener("selectionchange",n),t.removeEventListener("select",n),t.removeEventListener("input",n),t.removeEventListener("focus",n),t.removeEventListener("blur",a)}},[s,e]);let l=i?void 0:t.find(({start:e,token:t,suffix:n})=>n&&e+t.length===a);return{active:l,complete:function(e,t){let n=e.currentTarget;if(!l||"Tab"!==e.key||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||e.nativeEvent.isComposing||n.selectionStart!==a||n.selectionEnd!==a)return!1;e.preventDefault(),e.stopPropagation();let o=/\s/.test(n.value.charAt(a)),i=l.suffix+(o?"":" ");return n.ownerDocument.execCommand?.("insertText",!1,i)||(n.setRangeText(i,a,a,"end"),t()),o&&n.setSelectionRange(a+i.length+1,a+i.length+1),!0},hintId:n,inputProps:{"aria-autocomplete":l?"inline":void 0,"aria-describedby":l?n:void 0,onCompositionStart:()=>r(!0),onCompositionEnd:()=>r(!1)}}}function C(e,t,n){return n?.activePreview?n.annotationNumber:e??t}function E(e,t){return e?.trim()?e.trim():function(e){let t=e?.requestItems?.flatMap(e=>"annotation"===e.kind&&e.text.trim()?[e.text.trim()]:[]);if(t?.length)return t.join("; ");let n=e?.requestItems?.flatMap(e=>"changes"===e.kind?[`${e.elementLabel} [${e.changes.join(", ")}]`]:[]);return n?.length?n.join("; "):e?.requestText?.trim()||void 0}(t.find(e=>"human"===e.role))}export{h as a,d as b,f as c,g as d,v as e,y as f,$ as g,M as h,k as i,C as j,E as k};
|