@scene-glass/devtools 0.0.0-stage → 0.1.32

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/package.json CHANGED
@@ -1,6 +1,66 @@
1
1
  {
2
2
  "name": "@scene-glass/devtools",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.32",
4
+ "private": false,
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "engines": {
10
+ "node": ">=24 <25"
11
+ },
12
+ "bin": {
13
+ "scene-glass": "./dist/cli.js"
14
+ },
15
+ "exports": {
16
+ "./vite": "./dist/vite.js"
17
+ },
18
+ "files": [
19
+ "dist/",
20
+ "prebuilds/",
21
+ "premium/",
22
+ "release-manifest.json",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "scripts": {
27
+ "build:native": "node ./scripts/build-native-prebuild.mjs",
28
+ "build:runtime": "node ./scripts/build-runtime.mjs"
29
+ },
30
+ "peerDependencies": {
31
+ "vite": ">=7.3.6 <8"
32
+ },
33
+ "optionalDependencies": {
34
+ "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.289",
35
+ "@openai/codex-darwin-arm64": "npm:@openai/codex@0.160.0-darwin-arm64",
36
+ "@scene-glass/runtime-omo-darwin-arm64": "1.0.0"
37
+ },
38
+ "sceneGlass": {
39
+ "runtimePackages": {
40
+ "claude-darwin-arm64": {
41
+ "kind": "upstream-npm",
42
+ "name": "@anthropic-ai/claude-agent-sdk-darwin-arm64",
43
+ "version": "0.3.289",
44
+ "catalogueDigest": "9d046a7013e219d6c93624ea1c5b7a49c2658b00ff0cabd11c0554487df7e1d0",
45
+ "runtimeId": "c89ba071b55e88b2a2ea79208d3c50957519db1244bb0139aa11fe2c7f53d87c",
46
+ "manifestDigest": "f6e8458cfdd8c57236604424cae985dd41492a05d9a1e4917040d5a77d10b7d7"
47
+ },
48
+ "codex-darwin-arm64": {
49
+ "kind": "upstream-npm",
50
+ "name": "@openai/codex-darwin-arm64",
51
+ "version": "0.160.0-darwin-arm64",
52
+ "catalogueDigest": "9d046a7013e219d6c93624ea1c5b7a49c2658b00ff0cabd11c0554487df7e1d0",
53
+ "runtimeId": "9766d05ead07da746529f82b2040bc1db18e5c94d5fc16a1b0340d634d20fd63",
54
+ "manifestDigest": "07336d73c2fd9ec88cad4703745d9e73b27f50a786adc32c6064878c2827a6b3"
55
+ },
56
+ "omo-darwin-arm64": {
57
+ "kind": "upstream-npm",
58
+ "name": "@scene-glass/runtime-omo-darwin-arm64",
59
+ "version": "1.0.0",
60
+ "catalogueDigest": "9d046a7013e219d6c93624ea1c5b7a49c2658b00ff0cabd11c0554487df7e1d0",
61
+ "runtimeId": "33d5a42347e10f5716a44cb0a48367033ee87349a1a206f857cc30616821e567",
62
+ "manifestDigest": "34523ff6010eee0d14b1adab9f95d738eb6d02074fc3d31c65ed162660ae5f22"
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "scene-glass-native-prebuild",
4
+ "tuple": "darwin-arm64",
5
+ "nodeMajor": 24,
6
+ "napi": 9,
7
+ "artifactPath": "prebuilds/darwin-arm64/secure-read.node",
8
+ "size": 223344,
9
+ "sha256": "a20b4d3e9c0c6d0631eba6e6514779db458502114c9a44dfed594f1aa31dfe34",
10
+ "provenance": {
11
+ "kind": "local-native"
12
+ }
13
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "scene-glass-native-prebuild",
4
+ "tuple": "darwin-x64",
5
+ "nodeMajor": 24,
6
+ "napi": 9,
7
+ "artifactPath": "prebuilds/darwin-x64/secure-read.node",
8
+ "size": 209240,
9
+ "sha256": "10486b77ede5a579d2e06bf6baaab71095779546a7d0755df4ad93483da53180",
10
+ "provenance": {
11
+ "kind": "local-native"
12
+ },
13
+ "executionMode": "translated-rosetta"
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "scene-glass-native-prebuild",
4
+ "tuple": "linux-x64-gnu",
5
+ "nodeMajor": 24,
6
+ "napi": 9,
7
+ "artifactPath": "prebuilds/linux-x64-gnu/secure-read.node",
8
+ "size": 311752,
9
+ "sha256": "39b2ccb86ba9a95b263eeae161ba2b61fa3c2295b9b4157e7552297fe2d9a767",
10
+ "provenance": {
11
+ "kind": "local-native"
12
+ },
13
+ "executionMode": "emulated-amd64"
14
+ }
@@ -0,0 +1 @@
1
+ [data-scg-premium-measurement=true]{box-sizing:border-box}.scg-measure-layer,.scg-size-layer{inset:0;pointer-events:none!important;position:fixed;z-index:2147483644}.scg-measure-layer[hidden],.scg-size-layer[hidden]{display:none}.scg-measure-outline{border-radius:2px;position:fixed}.scg-measure-outline--base{outline:2px solid #2563eb}.scg-measure-outline--target{outline:2px dashed #ec4899}.scg-measure-line{background:#ec4899;position:fixed}.scg-measure-line--horizontal{height:1px}.scg-measure-line--vertical{width:1px}.scg-measure-line[hidden]{display:none}.scg-measure-label{background:#ec4899;border-radius:4px;color:#fff;font:600 11px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;padding:2px 5px;position:fixed;transform:translate(-50%,-50%);white-space:nowrap}.scg-measure-label[hidden]{display:none}.scg-size-layer *,.scg-size-layer *:before,.scg-size-layer *:after{box-sizing:border-box}.scg-size-outline{border-radius:2px;outline:2px solid #7c3aed;position:fixed}.scg-size-box{position:fixed}.scg-size-box[hidden]{display:none}.scg-size-box--margin{background:#f9731629;outline:1px dashed rgba(234,88,12,.8)}.scg-size-box--padding{background:#10b98129;outline:1px dashed rgba(5,150,105,.8)}.scg-size-label{background:#7c3aed;border-radius:4px;color:#fff;font:600 11px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;padding:2px 5px;position:fixed;transform:translateY(-100%);white-space:nowrap}.scg-size-label--inside{transform:none}.scg-size-label[hidden]{display:none}.scg-size-badge{align-items:center;background:#7c3aed;border:2px solid #fff;border-radius:999px;box-shadow:0 2px 8px #00000040;color:#fff;cursor:pointer;display:flex;height:22px;justify-content:center;padding:0;pointer-events:auto!important;position:fixed;width:22px}.scg-size-badge:hover{background:#6d28d9}.scg-size-badge--open{background:#18181b}.scg-size-badge[hidden]{display:none}.scg-size-popover{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:12px;box-shadow:0 12px 32px #0000001f,0 2px 8px #0000000f;color:#18181b;font:500 12px/1.4 Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;padding:10px 12px;pointer-events:auto!important;position:fixed;white-space:nowrap}.scg-size-popover[hidden]{display:none}.scg-size-row{align-items:center;display:flex;gap:10px;justify-content:space-between}.scg-size-row+.scg-size-row{margin-top:4px}.scg-size-row-label{color:#71717a;font-size:11px;font-weight:600}.scg-size-row-value{color:#18181b;display:flex;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:600;gap:8px}.scg-size-side-name{color:#a1a1aa;font-weight:500;margin-right:3px}.scg-premium-selector-outline{background:#4f8cff1f;border:2px solid #4f8cff;box-sizing:border-box;display:none;pointer-events:none!important;position:fixed;z-index:2147483644}
@@ -0,0 +1 @@
1
+ const q="data-scg-owned",G="data-scg-selector-overlay",J=["pointerdown","mousedown","mouseup","touchstart","contextmenu"],Z="button[disabled], input[disabled], select[disabled], textarea[disabled], optgroup[disabled], option[disabled]";function K(t){const{host:e}=t,n=e.root;let s=!1,l=!1,c=null,d,v=null;const g=o=>{if(!U(o)||o===n||!n.contains(o)||Q(o))return;const p=o.getBoundingClientRect();if(!(p.width<=0||p.height<=0))return Object.freeze({element:o,rect:p})},M=o=>{const p=c;if(p===null||o===void 0){p!==null&&(p.style.display="none");return}const y=o.element.getBoundingClientRect();if(y.width<=0||y.height<=0){p.style.display="none";return}p.style.display="block",p.style.left=`${y.left}px`,p.style.top=`${y.top}px`,p.style.width=`${y.width}px`,p.style.height=`${y.height}px`},w=o=>{d=o,M(o),t.onChange?.(o)},A=o=>w(g(o.target)),m=o=>{!s||U(o.target)&&Q(o.target)||(o.preventDefault(),o.stopPropagation())},a=(o,p)=>{p.preventDefault(),p.stopPropagation(),E(),t.onSelect(o)},i=o=>{if(!s)return;const p=g(o.target);w(p),p!==void 0&&a(p,o)},b=o=>{v=s?g(o.target)?.element??null:null},x=o=>{const p=v;if(v=null,!s||p===null||!_(p))return;const y=g(o.target);y?.element===p&&(w(y),a(y,o))},f=()=>M(d),h=()=>{n.removeEventListener("pointermove",A),n.removeEventListener("pointerdown",b,!0),n.removeEventListener("pointerup",x,!0),n.removeEventListener("click",i,!0),n.removeEventListener("scroll",f,!0);for(const o of J)n.removeEventListener(o,m,!0)},E=()=>{s&&(s=!1,v=null,h(),c?.remove(),c=null,d=void 0,t.onChange?.(void 0))};return{get active(){return s},start(){if(l||s)return;const o=e.createElement("div");o.className="scg-premium-selector-outline",H(o),n.append(o),c=o,s=!0,n.addEventListener("pointermove",A,{passive:!0}),n.addEventListener("pointerdown",b,!0),n.addEventListener("pointerup",x,!0),n.addEventListener("click",i,!0),n.addEventListener("scroll",f,!0);for(const p of J)n.addEventListener(p,m,!0)},stop:E,destroy(){l||(l=!0,E())}}}function H(t){t.setAttribute(q,"true"),t.setAttribute("data-scg-premium-measurement","true")}function Q(t){return t.getAttribute(q)==="true"||t.getAttribute(G)==="true"?!0:typeof t.closest=="function"&&(t.closest(`[${q}="true"]`)!==null||t.closest(`[${G}="true"]`)!==null)}function U(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&t.nodeType===1&&"getAttribute"in t&&typeof t.getAttribute=="function"}function _(t){if(typeof t.closest!="function")return!1;if(t.closest(Z)!==null)return!0;const e=t.closest("fieldset[disabled]");if(e===null)return!1;const n=e.querySelector(":scope > legend");return n===null||!n.contains(t)}function X(t,e){const n=(s,l)=>s.left<=l.left&&s.top<=l.top&&s.right>=l.right&&s.bottom>=l.bottom;if(n(t,e))return{outer:t,inner:e};if(n(e,t))return{outer:e,inner:t}}function F(t){return Math.round(t*10)/10}function tt(t,e){const n=e.left>=t.right?e.left-t.right:t.left>=e.right?t.left-e.right:void 0,s=e.top>=t.bottom?e.top-t.bottom:t.top>=e.bottom?t.top-e.bottom:void 0,l=n===void 0&&s===void 0?X(t,e):void 0;return Object.freeze({...n===void 0?{}:{horizontal:F(n)},...s===void 0?{}:{vertical:F(s)},...l===void 0?{}:{inset:Object.freeze({top:F(l.inner.top-l.outer.top),right:F(l.outer.right-l.inner.right),bottom:F(l.outer.bottom-l.inner.bottom),left:F(l.inner.left-l.outer.left)})}})}function et(t,e){const[n,s]=e.left>=t.right?[t.right,e.left]:[e.right,t.left],l=Math.max(t.top,e.top),c=Math.min(t.bottom,e.bottom),d=c>l?(l+c)/2:(Math.min(t.bottom,e.bottom)+Math.max(t.top,e.top))/2;return{from:n,to:s,at:d}}function nt(t,e){const[n,s]=e.top>=t.bottom?[t.bottom,e.top]:[e.bottom,t.top],l=Math.max(t.left,e.left),c=Math.min(t.right,e.right),d=c>l?(l+c)/2:(Math.min(t.right,e.right)+Math.max(t.left,e.left))/2;return{from:n,to:s,at:d}}function ot(t){const e=t.createElement("div");e.className="scg-measure-layer",e.hidden=!0,H(e);const n=t.createElement("div");n.className="scg-measure-outline scg-measure-outline--base";const s=t.createElement("div");s.className="scg-measure-outline scg-measure-outline--target";const l=t.createElement("div");l.className="scg-measure-line scg-measure-line--horizontal";const c=t.createElement("span");c.className="scg-measure-label";const d=t.createElement("div");d.className="scg-measure-line scg-measure-line--vertical";const v=t.createElement("span");v.className="scg-measure-label";const g=["top","right","bottom","left"].map(m=>{const a=t.createElement("div");a.className=`scg-measure-line scg-measure-line--${m==="left"||m==="right"?"horizontal":"vertical"}`;const i=t.createElement("span");return i.className="scg-measure-label",{side:m,line:a,label:i}});e.append(n,s,l,c,d,v,...g.flatMap(({line:m,label:a})=>[m,a]));let M=!1,w=!1;const A=(m,a)=>{m.style.left=`${a.left}px`,m.style.top=`${a.top}px`,m.style.width=`${Math.max(0,a.right-a.left)}px`,m.style.height=`${Math.max(0,a.bottom-a.top)}px`};return{show(m,a){if(w)return;M||(t.root.append(e),M=!0),e.removeAttribute("aria-hidden"),e.removeAttribute("inert"),A(n,m),A(s,a);const i=tt(m,a),b=i.inset===void 0?void 0:X(m,a);for(const{side:h,line:E,label:o}of g){const p=b!==void 0&&i.inset!==void 0;if(E.hidden=!p,o.hidden=!p,!p||b===void 0||i.inset===void 0)continue;const{outer:y,inner:z}=b,k=(z.left+z.right)/2,u=(z.top+z.bottom)/2,r=i.inset[h];if(o.textContent=`${r}px`,h==="top"||h==="bottom"){const $=h==="top"?y.top:z.bottom;E.style.left=`${k}px`,E.style.top=`${$}px`,E.style.height=`${r}px`,E.style.width="",o.style.left=`${k}px`,o.style.top=`${$+r/2}px`}else{const $=h==="left"?y.left:z.right;E.style.left=`${$}px`,E.style.top=`${u}px`,E.style.width=`${r}px`,E.style.height="",o.style.left=`${$+r/2}px`,o.style.top=`${u}px`}}const x=i.horizontal!==void 0;if(l.hidden=!x,c.hidden=!x,x){const h=et(m,a);l.style.left=`${h.from}px`,l.style.top=`${h.at}px`,l.style.width=`${h.to-h.from}px`,c.textContent=`${i.horizontal}px`,c.style.left=`${(h.from+h.to)/2}px`,c.style.top=`${h.at}px`}const f=i.vertical!==void 0;if(d.hidden=!f,v.hidden=!f,f){const h=nt(m,a);d.style.left=`${h.at}px`,d.style.top=`${h.from}px`,d.style.height=`${h.to-h.from}px`,v.textContent=`${i.vertical}px`,v.style.left=`${h.at}px`,v.style.top=`${(h.from+h.to)/2}px`}!x&&!f&&i.inset===void 0&&(c.hidden=!1,c.textContent="\uACB9\uCE68",c.style.left=`${(Math.max(m.left,a.left)+Math.min(m.right,a.right))/2}px`,c.style.top=`${(Math.max(m.top,a.top)+Math.min(m.bottom,a.bottom))/2}px`),e.hidden=!1},hide(){e.hidden=!0},destroy(){w||(w=!0,e.remove(),M=!1)}}}function W(t){return Math.round(t*10)/10}function L(t){const e=Number.parseFloat(t??"");return Number.isFinite(e)?W(e):0}function lt(t,e){return Object.freeze({width:W(t.width),height:W(t.height),padding:Object.freeze({top:L(e.paddingTop),right:L(e.paddingRight),bottom:L(e.paddingBottom),left:L(e.paddingLeft)}),margin:Object.freeze({top:L(e.marginTop),right:L(e.marginRight),bottom:L(e.marginBottom),left:L(e.marginLeft)})})}function st(t,e){const n=t.getBoundingClientRect();let s={};try{s=e(t)}catch{}return lt(n,s)}const it=[{side:"top",text:"\uC0C1"},{side:"right",text:"\uC6B0"},{side:"bottom",text:"\uD558"},{side:"left",text:"\uC88C"}],B=22,N=8;function rt(t){const e=t.createElement("div");e.className="scg-size-layer",e.hidden=!0,H(e);const n=t.createElement("div");n.className="scg-size-outline";const s=t.createElement("div");s.className="scg-size-box scg-size-box--margin";const l=t.createElement("div");l.className="scg-size-box scg-size-box--padding";const c=t.createElement("span");c.className="scg-size-label";const d=t.createElement("button");d.className="scg-size-badge",d.type="button",d.setAttribute("aria-label","\uD328\uB529\uACFC \uB9C8\uC9C4 \uBCF4\uAE30"),d.setAttribute("aria-expanded","false");const v=t.createElement("span");v.setAttribute("aria-hidden","true"),v.textContent="\u2194",d.append(v);const g=t.createElement("div");g.className="scg-size-popover",g.hidden=!0,g.setAttribute("role","group"),g.setAttribute("aria-label","\uC120\uD0DD\uD55C \uC694\uC18C\uC758 \uD328\uB529\uACFC \uB9C8\uC9C4");const M=["\uD06C\uAE30(px)","\uD328\uB529(px)","\uB9C8\uC9C4(px)"].map(u=>{const r=t.createElement("div");r.className="scg-size-row";const $=t.createElement("span");$.className="scg-size-row-label",$.textContent=u;const C=t.createElement("span");return C.className="scg-size-row-value",r.append($,C),g.append(r),C}),[w,A,m]=M;e.append(s,l,n,c,d,g);let a=null,i=!1,b=!1,x=!1,f=null;const h=(u,r)=>{u.style.left=`${r.left}px`,u.style.top=`${r.top}px`,u.style.width=`${Math.max(0,r.width)}px`,u.style.height=`${Math.max(0,r.height)}px`},E=(u,r)=>{u!==void 0&&u.replaceChildren(...it.map(({side:$,text:C})=>{const R=t.createElement("span");R.className="scg-size-side";const O=t.createElement("span");return O.className="scg-size-side-name",O.textContent=C,R.append(O,String(r[$])),R}))},o=()=>{x||a===null||f!==null||(f=t.requestAnimationFrame(p))},p=()=>{f=null;const u=a;if(x||u===null)return;const r=u.getBoundingClientRect();if(!t.root.contains(u)||r.width===0&&r.height===0){e.hidden=!0,o();return}e.removeAttribute("aria-hidden"),e.removeAttribute("inert");const $=st(u,t.getComputedStyle);h(n,r),c.textContent=`${$.width} \xD7 ${$.height}`;const C=t.root.clientWidth,R=t.root.clientHeight,O=C>0?C:r.right+B+N,D=R>0?R:r.bottom+B+N,P=r.top>=22,Y=!P&&r.bottom+22<=D;c.classList.toggle("scg-size-label--inside",!P),c.style.left=`${r.left}px`,c.style.top=`${P?r.top-4:Y?r.bottom+4:r.top+4}px`;const I=T(r.right-B/2,N,O-B-N),V=T(r.bottom-B/2,N,D-B-N);if(d.style.left=`${I}px`,d.style.top=`${V}px`,s.hidden=!i,l.hidden=!i,g.hidden=!i,i){const{padding:S,margin:j}=$;h(s,{left:r.left-j.left,top:r.top-j.top,width:r.width+j.left+j.right,height:r.height+j.top+j.bottom}),h(l,{left:r.left+S.left,top:r.top+S.top,width:r.width-S.left-S.right,height:r.height-S.top-S.bottom}),w!==void 0&&(w.textContent=`${$.width} \xD7 ${$.height}`),E(A,S),E(m,j),g.style.left=`${T(I,N,O-g.offsetWidth-N)}px`,g.style.top=`${T(V+B+6,N,D-g.offsetHeight-N)}px`}e.hidden=!1,o()},y=()=>{f!==null&&t.cancelAnimationFrame(f),f=null,p()},z=u=>{i=u,d.setAttribute("aria-expanded",String(u)),d.classList.toggle("scg-size-badge--open",u),d.setAttribute("aria-label",u?"\uD328\uB529\uACFC \uB9C8\uC9C4 \uB2EB\uAE30":"\uD328\uB529\uACFC \uB9C8\uC9C4 \uBCF4\uAE30")},k=u=>{u.preventDefault(),u.stopPropagation(),z(!i),y()};return d.addEventListener("click",k),{show(u){x||(b||(t.root.append(e),b=!0),u!==a&&z(!1),a=u,y())},collapse(){return i?(z(!1),y(),!0):!1},hide(){a=null,z(!1),e.hidden=!0,f!==null&&(t.cancelAnimationFrame(f),f=null)},destroy(){x||(x=!0,a=null,d.removeEventListener("click",k),f!==null&&t.cancelAnimationFrame(f),f=null,e.remove(),b=!1)}}}function T(t,e,n){return Math.min(Math.max(t,e),Math.max(e,n))}const at="scene-glass-premium-measurement-v1",ct=1;function dt(t){let e=null,n=null,s=null,l=null,c=null,d=!1;const v=()=>{e?.stop(),s=null,n?.hide()},g=()=>{l?.stop(),c?.hide()},M=()=>(n??=ot(t),e??=K({host:t,onChange(i){const b=s,x=n;if(b===null||x===null||i===void 0||i.element===b||!t.root.contains(b)){x?.hide(),b!==null&&!t.root.contains(b)&&(s=null);return}x.show(b.getBoundingClientRect(),i.element.getBoundingClientRect())},onSelect(i){s=i.element,n?.hide(),e?.start()}}),e),w=()=>(c??=rt(t),l??=K({host:t,onSelect(i){c?.show(i.element),l?.start()}}),l),A=i=>{d||(v(),i.active&&(g(),s=i.selectedElement,M().start()))},m=i=>{if(d||(g(),!i.active))return;v();const b=w();i.selectedElement!==null&&c?.show(i.selectedElement),b.start()},a=()=>{d||(d=!0,e?.destroy(),e=null,n?.destroy(),n=null,s=null,l?.destroy(),l=null,c?.destroy(),c=null,t.signal.removeEventListener("abort",a))};return t.signal.aborted?a():t.signal.addEventListener("abort",a,{once:!0}),Object.freeze({setMeasureMode:A,setSizeMode:m,destroy:a})}export{ct as abiVersion,dt as activate,at as namespace};