@popmelt.com/core 0.14.0 → 0.14.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.
@@ -1 +1 @@
1
- import{a as p,b as d,c as l,d as g}from"./chunk-WVBQZISK.mjs";import"./chunk-NOHXTT24.mjs";import{Buffer as c}from"buffer";function u(e){return typeof e=="string"?e:e instanceof Uint8Array?c.from(e).toString("utf8"):String(e??"")}function m(e,t,r){let o=e.url||"";if(r.port===null||!(e.headers.accept?.includes("text/html")||o==="/"||o.endsWith(".html")))return;let a=t.write.bind(t),s=t.end.bind(t),n="";t.write=(i=>(n+=u(i),!0)),t.end=(i=>(i!==void 0&&(n+=u(i)),n=n.replace("<head>",`<head><script type="text/javascript">${g(r)}</script>`),t.getHeader("content-length")&&t.setHeader("content-length",c.byteLength(n)),a(n,"utf8"),s()))}function y(e){let t=e?.basePath??"/popmelt",r={port:null,projectId:null};return{name:"popmelt",hooks:{async"astro:server:setup"({server:o}){r=await p(e,o,4321),await d(r,o);let a=l(t,()=>r);o.middlewares.use((s,n,i)=>{if((s.url||"").startsWith(t))return a(s,n,i);m(s,n,r),i()})}}}}export{y as popmelt};
1
+ import{a as p,b as d,c as l,d as g}from"./chunk-LCXDL4VE.mjs";import"./chunk-NOHXTT24.mjs";import{Buffer as c}from"buffer";function u(e){return typeof e=="string"?e:e instanceof Uint8Array?c.from(e).toString("utf8"):String(e??"")}function m(e,t,r){let o=e.url||"";if(r.port===null||!(e.headers.accept?.includes("text/html")||o==="/"||o.endsWith(".html")))return;let a=t.write.bind(t),s=t.end.bind(t),n="";t.write=(i=>(n+=u(i),!0)),t.end=(i=>(i!==void 0&&(n+=u(i)),n=n.replace("<head>",`<head><script type="text/javascript">${g(r)}</script>`),t.getHeader("content-length")&&t.setHeader("content-length",c.byteLength(n)),a(n,"utf8"),s()))}function y(e){let t=e?.basePath??"/popmelt",r={port:null,projectId:null};return{name:"popmelt",hooks:{async"astro:server:setup"({server:o}){r=await p(e,o,4321),await d(r,o);let a=l(t,()=>r);o.middlewares.use((s,n,i)=>{if((s.url||"").startsWith(t))return a(s,n,i);m(s,n,r),i()})}}}}export{y as popmelt};
@@ -1 +1 @@
1
- import{a as n,b as i,c as o,d as a}from"./chunk-WVBQZISK.mjs";import"./chunk-NOHXTT24.mjs";function s(r){let d=r?.basePath??"/popmelt",e={port:null,projectId:null};return{name:"popmelt",async configureServer(t){e=await n(r,t,5173),await i(e,t),t.middlewares.use(o(d,()=>e))},transformIndexHtml(){if(e.port!==null)return[{tag:"script",attrs:{type:"text/javascript"},children:a(e),injectTo:"head-prepend"}]}}}export{s as popmelt};
1
+ import{a as n,b as i,c as o,d as a}from"./chunk-LCXDL4VE.mjs";import"./chunk-NOHXTT24.mjs";function s(r){let d=r?.basePath??"/popmelt",e={port:null,projectId:null};return{name:"popmelt",async configureServer(t){e=await n(r,t,5173),await i(e,t),t.middlewares.use(o(d,()=>e))},transformIndexHtml(){if(e.port!==null)return[{tag:"script",attrs:{type:"text/javascript"},children:a(e),injectTo:"head-prepend"}]}}}export{s as popmelt};
@@ -1,4 +1,4 @@
1
- import{a as Qr,b as Xr}from"./chunk-NOHXTT24.mjs";import{spawn as jp}from"child_process";import{closeSync as Mp,openSync as Ep}from"fs";import{appendFile as _p,mkdir as Cp,readFile as $p,realpath as Op}from"fs/promises";import{dirname as Dp,join as Wr}from"path";import{fileURLToPath as Np}from"url";function Jt(o){return ha(o).slice(0,12)}var fa=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ha(o){let e=typeof TextEncoder<"u"?Array.from(new TextEncoder().encode(o)):ga(o),t=e.length*8;for(e.push(128);e.length%64!==56;)e.push(0);for(let g=7;g>=0;g--)e.push(t/Math.pow(2,g*8)&255);let n=1779033703,r=3144134277,i=1013904242,s=2773480762,a=1359893119,d=2600822924,l=528734635,w=1541459225,b=new Array(64);for(let g=0;g<e.length;g+=64){for(let m=0;m<16;m++){let f=g+m*4;b[m]=(e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3])>>>0}for(let m=16;m<64;m++){let f=tt(b[m-15],7)^tt(b[m-15],18)^b[m-15]>>>3,j=tt(b[m-2],17)^tt(b[m-2],19)^b[m-2]>>>10;b[m]=b[m-16]+f+b[m-7]+j>>>0}let k=n,x=r,h=i,u=s,y=a,I=d,p=l,A=w;for(let m=0;m<64;m++){let f=tt(y,6)^tt(y,11)^tt(y,25),j=y&I^~y&p,$=A+f+j+fa[m]+b[m]>>>0,R=tt(k,2)^tt(k,13)^tt(k,22),_=k&x^k&h^x&h,X=R+_>>>0;A=p,p=I,I=y,y=u+$>>>0,u=h,h=x,x=k,k=$+X>>>0}n=n+k>>>0,r=r+x>>>0,i=i+h>>>0,s=s+u>>>0,a=a+y>>>0,d=d+I>>>0,l=l+p>>>0,w=w+A>>>0}return[n,r,i,s,a,d,l,w].map(g=>g.toString(16).padStart(8,"0")).join("")}function tt(o,e){return o>>>e|o<<32-e}function ga(o){let e=[];for(let t=0;t<o.length;t++){let n=o.charCodeAt(t);n<128?e.push(n):n<2048?e.push(192|n>>6,128|n&63):e.push(224|n>>12,128|n>>6&63,128|n&63)}return e}var Yr={name:"@popmelt.com/core",version:"0.14.0",description:"A tiny, powerful design layer for humans and AI",license:"PolyForm-Shield-1.0.0",author:"Popmelt <reb@popmelt.com> (https://popmelt.com)",homepage:"https://github.com/popmelt/core",bugs:{url:"https://github.com/popmelt/core/issues"},repository:{type:"git",url:"git+https://github.com/popmelt/core.git"},keywords:["ai","annotations","collaboration","devtools","react","visual-feedback"],bin:{popmelt:"dist/cli.mjs"},sideEffects:!1,engines:{node:">=18.0.0"},scripts:{build:"tsup",clean:"git clean -xdf .turbo node_modules dist",format:'prettier --check "**/*.{ts,tsx}"',lint:"eslint . && node scripts/check-eslint-suppressions.mjs","pack:smoke":"node scripts/pack-smoke.mjs","peer:smoke":"node scripts/peer-compat-smoke.mjs",prepublishOnly:"pnpm run verify",test:"vitest run","test:coverage":"vitest run --coverage.enabled","test:watch":"vitest",typecheck:"tsc --noEmit --incremental false",verify:"pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"},exports:{".":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./provider":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./server":{types:"./dist/server.d.mts",import:"./dist/server.mjs"},"./memory":{types:"./dist/memory.d.mts",import:"./dist/memory.mjs"},"./memory/legacy":{types:"./dist/memory-legacy.d.mts",import:"./dist/memory-legacy.mjs"},"./memory/store":{types:"./dist/memory-store.d.mts",import:"./dist/memory-store.mjs"},"./next":{types:"./dist/plugin-next.d.mts",import:"./dist/plugin-next.mjs",default:"./dist/plugin-next.mjs"},"./vite":{types:"./dist/plugin-vite.d.mts",import:"./dist/plugin-vite.mjs",default:"./dist/plugin-vite.mjs"},"./astro":{types:"./dist/plugin-astro.d.mts",import:"./dist/plugin-astro.mjs",default:"./dist/plugin-astro.mjs"}},files:["dist","codex-plugin","LICENSE","README.md","THIRD_PARTY_NOTICES.md"],dependencies:{"modern-screenshot":"4.7.0",ws:"8.21.3"},peerDependencies:{"lucide-react":">=1.23.0",next:">=14.0.0",react:">=18.0.0","react-dom":">=18.0.0"},peerDependenciesMeta:{next:{optional:!0}},devDependencies:{"@kit/eslint-config":"workspace:^","@tanstack/react-router":"1.120.5","@types/react":"19.1.0","@types/react-dom":"19.1.2","@types/ws":"8.18.1","@vitejs/plugin-react":"^5.1.1","@vitest/coverage-v8":"3.2.4",eslint:"^9.24.0",geist:"1.7.2",jsdom:"26.1.0","lucide-react":"^1.23.0",next:"15.3.8",prettier:"^3.5.3",react:"19.1.0","react-dom":"19.1.0",tsup:"^8.5.1",typescript:"^5.8.3",vite:"7.3.6",vitest:"^3.2.4"}};var st=Yr.version;import{execFileSync as Yl,spawn as Zs}from"child_process";import{randomUUID as pt}from"crypto";import{mkdir as Zl,readFile as ep,readdir as tp,realpath as np,stat as op,unlink as rp,writeFile as Fo}from"fs/promises";import{createServer as ip}from"http";import{tmpdir as sp}from"os";import{basename as Uo,isAbsolute as sa,join as Ye,relative as ap,resolve as dp}from"path";function Zr(o){let e=o.instruction?.trim();return e?o.attachments?.some(n=>n.name?.trim()===e)?null:e:null}function Vo(o,e){let t=o?.tagName?.toLowerCase(),n=o?.id?`#${o.id}`:"",r=o?.className?`.${o.className.trim().split(/\s+/).slice(0,2).join(".")}`:"",i=t?`${t}${n}${r}`:e;return o?.reactComponent?`<${o.reactComponent}> ${i}`:i}function Ia(o){let e=o.elements?.[0]?.reactComponent||o.elements?.[0]?.tagName||o.linkedSelector,t=o.type&&o.type!=="annotation"?`${o.type} annotation`:"Annotation";return e?`${t} on ${e}`:t}function ei(o){let e=o.annotations.map(r=>({kind:"annotation",annotationId:r.id,pathname:r.pathname,text:Zr(r)??Ia(r)})),t=new Map,n=r=>{let i=`${r.pathname??""}:${r.durableSelector??r.selector}`,s=t.get(i);if(s){s.changes.push(r.text),r.annotationNumber!==void 0&&(s.annotationNumber===void 0||r.annotationNumber<s.annotationNumber)&&(s.annotationNumber=r.annotationNumber);return}let a={kind:"changes",elementKey:i,elementLabel:Vo(r.element,r.selector),...r.annotationNumber!==void 0?{annotationNumber:r.annotationNumber}:{},pathname:r.pathname,changes:[r.text]};t.set(i,a),e.push(a)};for(let r of o.styleModifications??[])for(let i of r.changes)n({...r,text:`${i.property}: ${i.original||"unset"} \u2192 ${i.modified||"unset"}${i.token?` (${i.token})`:""}`});for(let r of o.textModifications??[])n({...r,text:`Text: ${r.original||"empty"} \u2192 ${r.modified||"empty"}`});for(let r of o.domModifications??[])n({...r,text:r.operation==="copy"?"Copied element":"Moved element"});return o.spacingTokenChanges?.length&&e.push({kind:"changes",elementKey:"spacing-tokens",elementLabel:"Spacing tokens",changes:o.spacingTokenChanges.map(r=>`${r.tokenName}: ${r.originalPx}px \u2192 ${r.newPx}px`)}),e}function ti(o){let e=o.annotations.flatMap(r=>{let i=Zr(r);return i?[{instruction:i,pathname:r.pathname}]:[]});if(e.length===0)return;if(new Set(e.map(r=>r.pathname).filter(Boolean)).size<=1)return e.map(r=>r.instruction).join(`
1
+ import{a as Qr,b as Xr}from"./chunk-NOHXTT24.mjs";import{spawn as jp}from"child_process";import{closeSync as Mp,openSync as Ep}from"fs";import{appendFile as _p,mkdir as Cp,readFile as $p,realpath as Op}from"fs/promises";import{dirname as Dp,join as Wr}from"path";import{fileURLToPath as Np}from"url";function Jt(o){return ha(o).slice(0,12)}var fa=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ha(o){let e=typeof TextEncoder<"u"?Array.from(new TextEncoder().encode(o)):ga(o),t=e.length*8;for(e.push(128);e.length%64!==56;)e.push(0);for(let g=7;g>=0;g--)e.push(t/Math.pow(2,g*8)&255);let n=1779033703,r=3144134277,i=1013904242,s=2773480762,a=1359893119,d=2600822924,l=528734635,w=1541459225,b=new Array(64);for(let g=0;g<e.length;g+=64){for(let m=0;m<16;m++){let f=g+m*4;b[m]=(e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3])>>>0}for(let m=16;m<64;m++){let f=tt(b[m-15],7)^tt(b[m-15],18)^b[m-15]>>>3,j=tt(b[m-2],17)^tt(b[m-2],19)^b[m-2]>>>10;b[m]=b[m-16]+f+b[m-7]+j>>>0}let k=n,x=r,h=i,u=s,y=a,I=d,p=l,A=w;for(let m=0;m<64;m++){let f=tt(y,6)^tt(y,11)^tt(y,25),j=y&I^~y&p,$=A+f+j+fa[m]+b[m]>>>0,R=tt(k,2)^tt(k,13)^tt(k,22),_=k&x^k&h^x&h,X=R+_>>>0;A=p,p=I,I=y,y=u+$>>>0,u=h,h=x,x=k,k=$+X>>>0}n=n+k>>>0,r=r+x>>>0,i=i+h>>>0,s=s+u>>>0,a=a+y>>>0,d=d+I>>>0,l=l+p>>>0,w=w+A>>>0}return[n,r,i,s,a,d,l,w].map(g=>g.toString(16).padStart(8,"0")).join("")}function tt(o,e){return o>>>e|o<<32-e}function ga(o){let e=[];for(let t=0;t<o.length;t++){let n=o.charCodeAt(t);n<128?e.push(n):n<2048?e.push(192|n>>6,128|n&63):e.push(224|n>>12,128|n>>6&63,128|n&63)}return e}var Yr={name:"@popmelt.com/core",version:"0.14.2",description:"A tiny, powerful design layer for humans and AI",license:"PolyForm-Shield-1.0.0",author:"Popmelt <reb@popmelt.com> (https://popmelt.com)",homepage:"https://github.com/popmelt/core",bugs:{url:"https://github.com/popmelt/core/issues"},repository:{type:"git",url:"git+https://github.com/popmelt/core.git"},keywords:["ai","annotations","collaboration","devtools","react","visual-feedback"],bin:{popmelt:"dist/cli.mjs"},sideEffects:!1,engines:{node:">=18.0.0"},scripts:{build:"tsup",clean:"git clean -xdf .turbo node_modules dist",format:'prettier --check "**/*.{ts,tsx}"',lint:"eslint . && node scripts/check-eslint-suppressions.mjs","pack:smoke":"node scripts/pack-smoke.mjs","peer:smoke":"node scripts/peer-compat-smoke.mjs",prepublishOnly:"pnpm run verify",test:"vitest run","test:coverage":"vitest run --coverage.enabled","test:watch":"vitest",typecheck:"tsc --noEmit --incremental false",verify:"pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"},exports:{".":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./provider":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./server":{types:"./dist/server.d.mts",import:"./dist/server.mjs"},"./memory":{types:"./dist/memory.d.mts",import:"./dist/memory.mjs"},"./memory/legacy":{types:"./dist/memory-legacy.d.mts",import:"./dist/memory-legacy.mjs"},"./memory/store":{types:"./dist/memory-store.d.mts",import:"./dist/memory-store.mjs"},"./next":{types:"./dist/plugin-next.d.mts",import:"./dist/plugin-next.mjs",default:"./dist/plugin-next.mjs"},"./vite":{types:"./dist/plugin-vite.d.mts",import:"./dist/plugin-vite.mjs",default:"./dist/plugin-vite.mjs"},"./astro":{types:"./dist/plugin-astro.d.mts",import:"./dist/plugin-astro.mjs",default:"./dist/plugin-astro.mjs"}},files:["dist","codex-plugin","LICENSE","README.md","THIRD_PARTY_NOTICES.md"],dependencies:{"modern-screenshot":"4.7.0",ws:"8.21.3"},peerDependencies:{"lucide-react":">=1.23.0",next:">=14.0.0",react:">=18.0.0","react-dom":">=18.0.0"},peerDependenciesMeta:{next:{optional:!0}},devDependencies:{"@kit/eslint-config":"workspace:^","@tanstack/react-router":"1.120.5","@types/react":"19.1.0","@types/react-dom":"19.1.2","@types/ws":"8.18.1","@vitejs/plugin-react":"^5.1.1","@vitest/coverage-v8":"3.2.4",eslint:"^9.24.0",geist:"1.7.2",jsdom:"26.1.0","lucide-react":"^1.23.0",next:"15.3.8",prettier:"^3.5.3",react:"19.1.0","react-dom":"19.1.0",tsup:"^8.5.1",typescript:"^5.8.3",vite:"7.3.6",vitest:"^3.2.4"}};var st=Yr.version;import{execFileSync as Yl,spawn as Zs}from"child_process";import{randomUUID as pt}from"crypto";import{mkdir as Zl,readFile as ep,readdir as tp,realpath as np,stat as op,unlink as rp,writeFile as Fo}from"fs/promises";import{createServer as ip}from"http";import{tmpdir as sp}from"os";import{basename as Uo,isAbsolute as sa,join as Ye,relative as ap,resolve as dp}from"path";function Zr(o){let e=o.instruction?.trim();return e?o.attachments?.some(n=>n.name?.trim()===e)?null:e:null}function Vo(o,e){let t=o?.tagName?.toLowerCase(),n=o?.id?`#${o.id}`:"",r=o?.className?`.${o.className.trim().split(/\s+/).slice(0,2).join(".")}`:"",i=t?`${t}${n}${r}`:e;return o?.reactComponent?`<${o.reactComponent}> ${i}`:i}function Ia(o){let e=o.elements?.[0]?.reactComponent||o.elements?.[0]?.tagName||o.linkedSelector,t=o.type&&o.type!=="annotation"?`${o.type} annotation`:"Annotation";return e?`${t} on ${e}`:t}function ei(o){let e=o.annotations.map(r=>({kind:"annotation",annotationId:r.id,pathname:r.pathname,text:Zr(r)??Ia(r)})),t=new Map,n=r=>{let i=`${r.pathname??""}:${r.durableSelector??r.selector}`,s=t.get(i);if(s){s.changes.push(r.text),r.annotationNumber!==void 0&&(s.annotationNumber===void 0||r.annotationNumber<s.annotationNumber)&&(s.annotationNumber=r.annotationNumber);return}let a={kind:"changes",elementKey:i,elementLabel:Vo(r.element,r.selector),...r.annotationNumber!==void 0?{annotationNumber:r.annotationNumber}:{},pathname:r.pathname,changes:[r.text]};t.set(i,a),e.push(a)};for(let r of o.styleModifications??[])for(let i of r.changes)n({...r,text:`${i.property}: ${i.original||"unset"} \u2192 ${i.modified||"unset"}${i.token?` (${i.token})`:""}`});for(let r of o.textModifications??[])n({...r,text:`Text: ${r.original||"empty"} \u2192 ${r.modified||"empty"}`});for(let r of o.domModifications??[])n({...r,text:r.operation==="copy"?"Copied element":"Moved element"});return o.spacingTokenChanges?.length&&e.push({kind:"changes",elementKey:"spacing-tokens",elementLabel:"Spacing tokens",changes:o.spacingTokenChanges.map(r=>`${r.tokenName}: ${r.originalPx}px \u2192 ${r.newPx}px`)}),e}function ti(o){let e=o.annotations.flatMap(r=>{let i=Zr(r);return i?[{instruction:i,pathname:r.pathname}]:[]});if(e.length===0)return;if(new Set(e.map(r=>r.pathname).filter(Boolean)).size<=1)return e.map(r=>r.instruction).join(`
2
2
 
3
3
  `);let n=new Map;for(let r of e){let i=r.pathname||"(unknown)",s=n.get(i)??[];s.push(r.instruction),n.set(i,s)}return[...n.entries()].map(([r,i])=>`\`${r}\`
4
4
  ${i.map(s=>`- ${s}`).join(`
package/dist/server.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{spawn as Cp}from"child_process";import{closeSync as $p,openSync as Op}from"fs";import{appendFile as Dp,mkdir as Np,readFile as Bp,realpath as Jp}from"fs/promises";import{dirname as qp,join as Wr}from"path";import{fileURLToPath as Lp}from"url";function Jt(o){return ga(o).slice(0,12)}var ha=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ga(o){let e=typeof TextEncoder<"u"?Array.from(new TextEncoder().encode(o)):ya(o),t=e.length*8;for(e.push(128);e.length%64!==56;)e.push(0);for(let g=7;g>=0;g--)e.push(t/Math.pow(2,g*8)&255);let n=1779033703,r=3144134277,i=1013904242,s=2773480762,a=1359893119,d=2600822924,l=528734635,w=1541459225,b=new Array(64);for(let g=0;g<e.length;g+=64){for(let m=0;m<16;m++){let f=g+m*4;b[m]=(e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3])>>>0}for(let m=16;m<64;m++){let f=tt(b[m-15],7)^tt(b[m-15],18)^b[m-15]>>>3,j=tt(b[m-2],17)^tt(b[m-2],19)^b[m-2]>>>10;b[m]=b[m-16]+f+b[m-7]+j>>>0}let k=n,x=r,h=i,u=s,y=a,I=d,p=l,A=w;for(let m=0;m<64;m++){let f=tt(y,6)^tt(y,11)^tt(y,25),j=y&I^~y&p,$=A+f+j+ha[m]+b[m]>>>0,R=tt(k,2)^tt(k,13)^tt(k,22),_=k&x^k&h^x&h,X=R+_>>>0;A=p,p=I,I=y,y=u+$>>>0,u=h,h=x,x=k,k=$+X>>>0}n=n+k>>>0,r=r+x>>>0,i=i+h>>>0,s=s+u>>>0,a=a+y>>>0,d=d+I>>>0,l=l+p>>>0,w=w+A>>>0}return[n,r,i,s,a,d,l,w].map(g=>g.toString(16).padStart(8,"0")).join("")}function tt(o,e){return o>>>e|o<<32-e}function ya(o){let e=[];for(let t=0;t<o.length;t++){let n=o.charCodeAt(t);n<128?e.push(n):n<2048?e.push(192|n>>6,128|n&63):e.push(224|n>>12,128|n>>6&63,128|n&63)}return e}var Xr={name:"@popmelt.com/core",version:"0.14.0",description:"A tiny, powerful design layer for humans and AI",license:"PolyForm-Shield-1.0.0",author:"Popmelt <reb@popmelt.com> (https://popmelt.com)",homepage:"https://github.com/popmelt/core",bugs:{url:"https://github.com/popmelt/core/issues"},repository:{type:"git",url:"git+https://github.com/popmelt/core.git"},keywords:["ai","annotations","collaboration","devtools","react","visual-feedback"],bin:{popmelt:"dist/cli.mjs"},sideEffects:!1,engines:{node:">=18.0.0"},scripts:{build:"tsup",clean:"git clean -xdf .turbo node_modules dist",format:'prettier --check "**/*.{ts,tsx}"',lint:"eslint . && node scripts/check-eslint-suppressions.mjs","pack:smoke":"node scripts/pack-smoke.mjs","peer:smoke":"node scripts/peer-compat-smoke.mjs",prepublishOnly:"pnpm run verify",test:"vitest run","test:coverage":"vitest run --coverage.enabled","test:watch":"vitest",typecheck:"tsc --noEmit --incremental false",verify:"pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"},exports:{".":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./provider":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./server":{types:"./dist/server.d.mts",import:"./dist/server.mjs"},"./memory":{types:"./dist/memory.d.mts",import:"./dist/memory.mjs"},"./memory/legacy":{types:"./dist/memory-legacy.d.mts",import:"./dist/memory-legacy.mjs"},"./memory/store":{types:"./dist/memory-store.d.mts",import:"./dist/memory-store.mjs"},"./next":{types:"./dist/plugin-next.d.mts",import:"./dist/plugin-next.mjs",default:"./dist/plugin-next.mjs"},"./vite":{types:"./dist/plugin-vite.d.mts",import:"./dist/plugin-vite.mjs",default:"./dist/plugin-vite.mjs"},"./astro":{types:"./dist/plugin-astro.d.mts",import:"./dist/plugin-astro.mjs",default:"./dist/plugin-astro.mjs"}},files:["dist","codex-plugin","LICENSE","README.md","THIRD_PARTY_NOTICES.md"],dependencies:{"modern-screenshot":"4.7.0",ws:"8.21.3"},peerDependencies:{"lucide-react":">=1.23.0",next:">=14.0.0",react:">=18.0.0","react-dom":">=18.0.0"},peerDependenciesMeta:{next:{optional:!0}},devDependencies:{"@kit/eslint-config":"workspace:^","@tanstack/react-router":"1.120.5","@types/react":"19.1.0","@types/react-dom":"19.1.2","@types/ws":"8.18.1","@vitejs/plugin-react":"^5.1.1","@vitest/coverage-v8":"3.2.4",eslint:"^9.24.0",geist:"1.7.2",jsdom:"26.1.0","lucide-react":"^1.23.0",next:"15.3.8",prettier:"^3.5.3",react:"19.1.0","react-dom":"19.1.0",tsup:"^8.5.1",typescript:"^5.8.3",vite:"7.3.6",vitest:"^3.2.4"}};var st=Xr.version;import{execFileSync as Zl,spawn as Ys}from"child_process";import{randomUUID as pt}from"crypto";import{mkdir as ep,readFile as tp,readdir as np,realpath as op,stat as rp,unlink as ip,writeFile as Fo}from"fs/promises";import{createServer as sp}from"http";import{tmpdir as ap}from"os";import{basename as Uo,isAbsolute as ia,join as Ye,relative as dp,resolve as cp}from"path";function Yr(o){let e=o.instruction?.trim();return e?o.attachments?.some(n=>n.name?.trim()===e)?null:e:null}function Vo(o,e){let t=o?.tagName?.toLowerCase(),n=o?.id?`#${o.id}`:"",r=o?.className?`.${o.className.trim().split(/\s+/).slice(0,2).join(".")}`:"",i=t?`${t}${n}${r}`:e;return o?.reactComponent?`<${o.reactComponent}> ${i}`:i}function wa(o){let e=o.elements?.[0]?.reactComponent||o.elements?.[0]?.tagName||o.linkedSelector,t=o.type&&o.type!=="annotation"?`${o.type} annotation`:"Annotation";return e?`${t} on ${e}`:t}function Zr(o){let e=o.annotations.map(r=>({kind:"annotation",annotationId:r.id,pathname:r.pathname,text:Yr(r)??wa(r)})),t=new Map,n=r=>{let i=`${r.pathname??""}:${r.durableSelector??r.selector}`,s=t.get(i);if(s){s.changes.push(r.text),r.annotationNumber!==void 0&&(s.annotationNumber===void 0||r.annotationNumber<s.annotationNumber)&&(s.annotationNumber=r.annotationNumber);return}let a={kind:"changes",elementKey:i,elementLabel:Vo(r.element,r.selector),...r.annotationNumber!==void 0?{annotationNumber:r.annotationNumber}:{},pathname:r.pathname,changes:[r.text]};t.set(i,a),e.push(a)};for(let r of o.styleModifications??[])for(let i of r.changes)n({...r,text:`${i.property}: ${i.original||"unset"} \u2192 ${i.modified||"unset"}${i.token?` (${i.token})`:""}`});for(let r of o.textModifications??[])n({...r,text:`Text: ${r.original||"empty"} \u2192 ${r.modified||"empty"}`});for(let r of o.domModifications??[])n({...r,text:r.operation==="copy"?"Copied element":"Moved element"});return o.spacingTokenChanges?.length&&e.push({kind:"changes",elementKey:"spacing-tokens",elementLabel:"Spacing tokens",changes:o.spacingTokenChanges.map(r=>`${r.tokenName}: ${r.originalPx}px \u2192 ${r.newPx}px`)}),e}function ei(o){let e=o.annotations.flatMap(r=>{let i=Yr(r);return i?[{instruction:i,pathname:r.pathname}]:[]});if(e.length===0)return;if(new Set(e.map(r=>r.pathname).filter(Boolean)).size<=1)return e.map(r=>r.instruction).join(`
1
+ import{spawn as Cp}from"child_process";import{closeSync as $p,openSync as Op}from"fs";import{appendFile as Dp,mkdir as Np,readFile as Bp,realpath as Jp}from"fs/promises";import{dirname as qp,join as Wr}from"path";import{fileURLToPath as Lp}from"url";function Jt(o){return ga(o).slice(0,12)}var ha=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function ga(o){let e=typeof TextEncoder<"u"?Array.from(new TextEncoder().encode(o)):ya(o),t=e.length*8;for(e.push(128);e.length%64!==56;)e.push(0);for(let g=7;g>=0;g--)e.push(t/Math.pow(2,g*8)&255);let n=1779033703,r=3144134277,i=1013904242,s=2773480762,a=1359893119,d=2600822924,l=528734635,w=1541459225,b=new Array(64);for(let g=0;g<e.length;g+=64){for(let m=0;m<16;m++){let f=g+m*4;b[m]=(e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3])>>>0}for(let m=16;m<64;m++){let f=tt(b[m-15],7)^tt(b[m-15],18)^b[m-15]>>>3,j=tt(b[m-2],17)^tt(b[m-2],19)^b[m-2]>>>10;b[m]=b[m-16]+f+b[m-7]+j>>>0}let k=n,x=r,h=i,u=s,y=a,I=d,p=l,A=w;for(let m=0;m<64;m++){let f=tt(y,6)^tt(y,11)^tt(y,25),j=y&I^~y&p,$=A+f+j+ha[m]+b[m]>>>0,R=tt(k,2)^tt(k,13)^tt(k,22),_=k&x^k&h^x&h,X=R+_>>>0;A=p,p=I,I=y,y=u+$>>>0,u=h,h=x,x=k,k=$+X>>>0}n=n+k>>>0,r=r+x>>>0,i=i+h>>>0,s=s+u>>>0,a=a+y>>>0,d=d+I>>>0,l=l+p>>>0,w=w+A>>>0}return[n,r,i,s,a,d,l,w].map(g=>g.toString(16).padStart(8,"0")).join("")}function tt(o,e){return o>>>e|o<<32-e}function ya(o){let e=[];for(let t=0;t<o.length;t++){let n=o.charCodeAt(t);n<128?e.push(n):n<2048?e.push(192|n>>6,128|n&63):e.push(224|n>>12,128|n>>6&63,128|n&63)}return e}var Xr={name:"@popmelt.com/core",version:"0.14.2",description:"A tiny, powerful design layer for humans and AI",license:"PolyForm-Shield-1.0.0",author:"Popmelt <reb@popmelt.com> (https://popmelt.com)",homepage:"https://github.com/popmelt/core",bugs:{url:"https://github.com/popmelt/core/issues"},repository:{type:"git",url:"git+https://github.com/popmelt/core.git"},keywords:["ai","annotations","collaboration","devtools","react","visual-feedback"],bin:{popmelt:"dist/cli.mjs"},sideEffects:!1,engines:{node:">=18.0.0"},scripts:{build:"tsup",clean:"git clean -xdf .turbo node_modules dist",format:'prettier --check "**/*.{ts,tsx}"',lint:"eslint . && node scripts/check-eslint-suppressions.mjs","pack:smoke":"node scripts/pack-smoke.mjs","peer:smoke":"node scripts/peer-compat-smoke.mjs",prepublishOnly:"pnpm run verify",test:"vitest run","test:coverage":"vitest run --coverage.enabled","test:watch":"vitest",typecheck:"tsc --noEmit --incremental false",verify:"pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test:coverage && pnpm run build && pnpm run pack:smoke"},exports:{".":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./provider":{types:"./dist/index.d.mts",import:"./dist/index.mjs"},"./server":{types:"./dist/server.d.mts",import:"./dist/server.mjs"},"./memory":{types:"./dist/memory.d.mts",import:"./dist/memory.mjs"},"./memory/legacy":{types:"./dist/memory-legacy.d.mts",import:"./dist/memory-legacy.mjs"},"./memory/store":{types:"./dist/memory-store.d.mts",import:"./dist/memory-store.mjs"},"./next":{types:"./dist/plugin-next.d.mts",import:"./dist/plugin-next.mjs",default:"./dist/plugin-next.mjs"},"./vite":{types:"./dist/plugin-vite.d.mts",import:"./dist/plugin-vite.mjs",default:"./dist/plugin-vite.mjs"},"./astro":{types:"./dist/plugin-astro.d.mts",import:"./dist/plugin-astro.mjs",default:"./dist/plugin-astro.mjs"}},files:["dist","codex-plugin","LICENSE","README.md","THIRD_PARTY_NOTICES.md"],dependencies:{"modern-screenshot":"4.7.0",ws:"8.21.3"},peerDependencies:{"lucide-react":">=1.23.0",next:">=14.0.0",react:">=18.0.0","react-dom":">=18.0.0"},peerDependenciesMeta:{next:{optional:!0}},devDependencies:{"@kit/eslint-config":"workspace:^","@tanstack/react-router":"1.120.5","@types/react":"19.1.0","@types/react-dom":"19.1.2","@types/ws":"8.18.1","@vitejs/plugin-react":"^5.1.1","@vitest/coverage-v8":"3.2.4",eslint:"^9.24.0",geist:"1.7.2",jsdom:"26.1.0","lucide-react":"^1.23.0",next:"15.3.8",prettier:"^3.5.3",react:"19.1.0","react-dom":"19.1.0",tsup:"^8.5.1",typescript:"^5.8.3",vite:"7.3.6",vitest:"^3.2.4"}};var st=Xr.version;import{execFileSync as Zl,spawn as Ys}from"child_process";import{randomUUID as pt}from"crypto";import{mkdir as ep,readFile as tp,readdir as np,realpath as op,stat as rp,unlink as ip,writeFile as Fo}from"fs/promises";import{createServer as sp}from"http";import{tmpdir as ap}from"os";import{basename as Uo,isAbsolute as ia,join as Ye,relative as dp,resolve as cp}from"path";function Yr(o){let e=o.instruction?.trim();return e?o.attachments?.some(n=>n.name?.trim()===e)?null:e:null}function Vo(o,e){let t=o?.tagName?.toLowerCase(),n=o?.id?`#${o.id}`:"",r=o?.className?`.${o.className.trim().split(/\s+/).slice(0,2).join(".")}`:"",i=t?`${t}${n}${r}`:e;return o?.reactComponent?`<${o.reactComponent}> ${i}`:i}function wa(o){let e=o.elements?.[0]?.reactComponent||o.elements?.[0]?.tagName||o.linkedSelector,t=o.type&&o.type!=="annotation"?`${o.type} annotation`:"Annotation";return e?`${t} on ${e}`:t}function Zr(o){let e=o.annotations.map(r=>({kind:"annotation",annotationId:r.id,pathname:r.pathname,text:Yr(r)??wa(r)})),t=new Map,n=r=>{let i=`${r.pathname??""}:${r.durableSelector??r.selector}`,s=t.get(i);if(s){s.changes.push(r.text),r.annotationNumber!==void 0&&(s.annotationNumber===void 0||r.annotationNumber<s.annotationNumber)&&(s.annotationNumber=r.annotationNumber);return}let a={kind:"changes",elementKey:i,elementLabel:Vo(r.element,r.selector),...r.annotationNumber!==void 0?{annotationNumber:r.annotationNumber}:{},pathname:r.pathname,changes:[r.text]};t.set(i,a),e.push(a)};for(let r of o.styleModifications??[])for(let i of r.changes)n({...r,text:`${i.property}: ${i.original||"unset"} \u2192 ${i.modified||"unset"}${i.token?` (${i.token})`:""}`});for(let r of o.textModifications??[])n({...r,text:`Text: ${r.original||"empty"} \u2192 ${r.modified||"empty"}`});for(let r of o.domModifications??[])n({...r,text:r.operation==="copy"?"Copied element":"Moved element"});return o.spacingTokenChanges?.length&&e.push({kind:"changes",elementKey:"spacing-tokens",elementLabel:"Spacing tokens",changes:o.spacingTokenChanges.map(r=>`${r.tokenName}: ${r.originalPx}px \u2192 ${r.newPx}px`)}),e}function ei(o){let e=o.annotations.flatMap(r=>{let i=Yr(r);return i?[{instruction:i,pathname:r.pathname}]:[]});if(e.length===0)return;if(new Set(e.map(r=>r.pathname).filter(Boolean)).size<=1)return e.map(r=>r.instruction).join(`
2
2
 
3
3
  `);let n=new Map;for(let r of e){let i=r.pathname||"(unknown)",s=n.get(i)??[];s.push(r.instruction),n.set(i,s)}return[...n.entries()].map(([r,i])=>`\`${r}\`
4
4
  ${i.map(s=>`- ${s}`).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popmelt.com/core",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "A tiny, powerful design layer for humans and AI",
5
5
  "license": "PolyForm-Shield-1.0.0",
6
6
  "author": "Popmelt <reb@popmelt.com> (https://popmelt.com)",