create-opentray 0.24.0 → 0.26.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 (52) hide show
  1. package/README.md +21 -13
  2. package/dist/{bin-BQb2Bjcu.mjs → bin-Bz16rwKs.mjs} +249 -313
  3. package/dist/bin-Bz16rwKs.mjs.map +1 -0
  4. package/dist/bin-CrMTyTux.d.mts +751 -0
  5. package/dist/bin-CrMTyTux.d.mts.map +1 -0
  6. package/dist/bin.d.mts +2 -15
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{decode-ico-BHd2POHf.mjs → decode-ico-DDEIV7iZ.mjs} +2 -2
  9. package/dist/{decode-ico-BHd2POHf.mjs.map → decode-ico-DDEIV7iZ.mjs.map} +1 -1
  10. package/dist/encode-CTEluLqt.mjs +167 -0
  11. package/dist/encode-CTEluLqt.mjs.map +1 -0
  12. package/dist/icon-codec-Bs3XehqZ.mjs +20 -0
  13. package/dist/icon-codec-Bs3XehqZ.mjs.map +1 -0
  14. package/dist/index.d.mts +1 -724
  15. package/dist/index.d.mts.map +1 -1
  16. package/dist/index.mjs +1 -1
  17. package/dist/rolldown-runtime-DJK8HYOj.mjs +34 -0
  18. package/dist/shell/assets/ghostty-web.js +1 -1
  19. package/dist/shell/assets/index.css +1 -1
  20. package/dist/shell/assets/index.js +2 -9
  21. package/dist/shell/assets/index2.js +9 -2
  22. package/dist/shell/assets/input.js +1 -1
  23. package/dist/shell/assets/main.js +8 -8
  24. package/dist/shell/assets/terminal-pane.js +2 -2
  25. package/dist/shell/assets/terminal.js +1 -1
  26. package/dist/shell/assets/toolbar.js +1 -0
  27. package/dist/shell/index.html +1 -1
  28. package/dist/shell/terminal.html +1 -1
  29. package/dist/shell/{browse.html → toolbar.html} +3 -3
  30. package/dist/skill/SKILL.md +14 -11
  31. package/dist/skill/references/cli-reference.md +1 -1
  32. package/dist/skill/references/how-it-works.md +15 -9
  33. package/dist/webui/assets/ghostty-web.js +1 -1
  34. package/dist/webui/assets/index.css +1 -1
  35. package/dist/webui/assets/index.js +2 -9
  36. package/dist/webui/assets/index2.js +9 -2
  37. package/dist/webui/assets/input.js +1 -1
  38. package/dist/webui/assets/main.js +8 -8
  39. package/dist/webui/assets/terminal-pane.js +2 -2
  40. package/dist/webui/assets/terminal.js +1 -1
  41. package/dist/webui/assets/toolbar.js +1 -0
  42. package/dist/webui/index.html +1 -1
  43. package/dist/webui/terminal.html +1 -1
  44. package/dist/webui/{browse.html → toolbar.html} +3 -3
  45. package/package.json +6 -6
  46. package/skill/SKILL.md +14 -11
  47. package/skill/references/cli-reference.md +1 -1
  48. package/skill/references/how-it-works.md +15 -9
  49. package/dist/bin-BQb2Bjcu.mjs.map +0 -1
  50. package/dist/bin.d.mts.map +0 -1
  51. package/dist/shell/assets/browse.js +0 -1
  52. package/dist/webui/assets/browse.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ghostty-web.js","assets/index.js","assets/index.css"])))=>i.map(i=>d[i]);
2
- import{d as h,i as b,o as y,n as w,p as x}from"./index.js";const k=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],L=h("terminal",k);function E(n){return b(n.defaultTagName??"div",n,n)}const S=x("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function N({className:n,variant:i="default",render:t,...c}){return E({defaultTagName:"span",props:y({className:w(S({variant:i}),n)},c),render:t,state:{slot:"badge",variant:i}})}const P="modulepreload",R=function(n){return"/"+n},v={},_=function(i,t,c){let u=Promise.resolve();if(t&&t.length>0){let f=function(e){return Promise.all(e.map(r=>Promise.resolve(r).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=s?.nonce||s?.getAttribute("nonce");u=f(t.map(e=>{if(e=R(e),e in v)return;v[e]=!0;const r=e.endsWith(".css"),d=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${d}`))return;const a=document.createElement("link");if(a.rel=r?"stylesheet":P,r||(a.as="script"),a.crossOrigin="",a.href=e,o&&a.setAttribute("nonce",o),document.head.appendChild(a),r)return new Promise((m,p)=>{a.addEventListener("load",m),a.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${e}`)))})}))}function l(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return u.then(s=>{for(const o of s||[])o.status==="rejected"&&l(o.reason);return i().catch(l)})};let g;const T=()=>{g??=(async()=>{const n=await _(()=>import("./ghostty-web.js"),__vite__mapDeps([0,1,2]));return await n.init(),n})()};async function A(n){let i;try{T(),i=await g}catch{return}const t=new i.Terminal({fontSize:13,theme:{background:"#05070b",foreground:"#b7c3d8",cursor:"#3d8bff",selectionBackground:"#2a3550"}});t.open(n);const c=new i.FitAddon;t.loadAddon(c),c.fit();const u=new Set,l=new Set,s=t.onData(e=>{for(const r of u)r(e)}),o=t.onResize(({cols:e,rows:r})=>{for(const d of l)d({cols:e,rows:r})}),f=new ResizeObserver(()=>{try{c.fit()}catch{}});return f.observe(n),{write:e=>t.write(e),reset:()=>t.reset(),fit:()=>c.fit(),focus:()=>n.querySelector("canvas")?.dispatchEvent(new Event("focus")),readState:()=>{const e=t.buffer.active,r=t.getSelectionPosition();return{cols:t.cols,rows:t.rows,cursorX:e.cursorX,cursorY:e.cursorY,...r===void 0?{}:{selection:{start:{x:r.start.x,y:r.start.y},end:{x:r.end.x,y:r.end.y}}}}},onData(e){return u.add(e),()=>u.delete(e)},onResize(e){return l.add(e),()=>l.delete(e)},dispose(){f.disconnect(),s.dispose(),o.dispose(),t.dispose()}}}export{N as B,L as T,_,A as c,T as p,E as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ghostty-web.js","assets/index2.js","assets/index.css"])))=>i.map(i=>d[i]);
2
+ import{c as p,d as b,m as y,h as w,k as x}from"./index2.js";const k=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],L=p("terminal",k);function E(n){return b(n.defaultTagName??"div",n,n)}const S=x("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function N({className:n,variant:i="default",render:t,...c}){return E({defaultTagName:"span",props:y({className:w(S({variant:i}),n)},c),render:t,state:{slot:"badge",variant:i}})}const P="modulepreload",R=function(n){return"/"+n},v={},_=function(i,t,c){let u=Promise.resolve();if(t&&t.length>0){let f=function(e){return Promise.all(e.map(r=>Promise.resolve(r).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=s?.nonce||s?.getAttribute("nonce");u=f(t.map(e=>{if(e=R(e),e in v)return;v[e]=!0;const r=e.endsWith(".css"),d=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${d}`))return;const a=document.createElement("link");if(a.rel=r?"stylesheet":P,r||(a.as="script"),a.crossOrigin="",a.href=e,o&&a.setAttribute("nonce",o),document.head.appendChild(a),r)return new Promise((m,h)=>{a.addEventListener("load",m),a.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${e}`)))})}))}function l(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return u.then(s=>{for(const o of s||[])o.status==="rejected"&&l(o.reason);return i().catch(l)})};let g;const T=()=>{g??=(async()=>{const n=await _(()=>import("./ghostty-web.js"),__vite__mapDeps([0,1,2]));return await n.init(),n})()};async function A(n){let i;try{T(),i=await g}catch{return}const t=new i.Terminal({fontSize:13,theme:{background:"#05070b",foreground:"#b7c3d8",cursor:"#3d8bff",selectionBackground:"#2a3550"}});t.open(n);const c=new i.FitAddon;t.loadAddon(c),c.fit();const u=new Set,l=new Set,s=t.onData(e=>{for(const r of u)r(e)}),o=t.onResize(({cols:e,rows:r})=>{for(const d of l)d({cols:e,rows:r})}),f=new ResizeObserver(()=>{try{c.fit()}catch{}});return f.observe(n),{write:e=>t.write(e),reset:()=>t.reset(),fit:()=>c.fit(),focus:()=>n.querySelector("canvas")?.dispatchEvent(new Event("focus")),readState:()=>{const e=t.buffer.active,r=t.getSelectionPosition();return{cols:t.cols,rows:t.rows,cursorX:e.cursorX,cursorY:e.cursorY,...r===void 0?{}:{selection:{start:{x:r.start.x,y:r.start.y},end:{x:r.end.x,y:r.end.y}}}}},onData(e){return u.add(e),()=>u.delete(e)},onResize(e){return l.add(e),()=>l.delete(e)},dispose(){f.disconnect(),s.dispose(),o.dispose(),t.dispose()}}}export{N as B,L as T,_,A as c,T as p,E as u};
@@ -1 +1 @@
1
- import{u as y,r as s,j as e,G as N,a as R,b as S,R as E,c as P,P as k}from"./index.js";import{p as I,c as T,T as O,B}from"./terminal-pane.js";function D(){const{messages:d}=y(),[v,w]=s.useState(""),[g,b]=s.useState(!1),[m,p]=s.useState([]),[o,j]=s.useState({cursorX:0,cursorY:0,cols:0,rows:0}),h=s.useRef(null),c=s.useRef(void 0),l=s.useRef([]),x=s.useRef(!1);return s.useEffect(()=>{I()},[]),s.useEffect(()=>{let r=!1;return(async()=>{const a=h.current;if(a===null)return;const n=await T(a);if(r||n===void 0)return;c.current=n,n.onData(f=>{x.current&&fetch("/api/terminal-input",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({data:f})}).catch(()=>{})});const t=l.current;l.current=[];for(const f of t)n.write(f);const u=window.setInterval(()=>{try{j(n.readState())}catch{}},300);return()=>window.clearInterval(u)})(),()=>{r=!0,c.current?.dispose(),c.current=void 0}},[]),s.useEffect(()=>{const r=n=>{const t=c.current;t!==void 0?t.write(n):l.current.push(n)},a=new EventSource("/api/events");return a.onmessage=n=>{const t=JSON.parse(n.data);if(t.type==="state"){w(t.command),x.current=t.interactive,b(t.interactive),p(t.services);for(const u of t.output)r(u)}else t.type==="log"?r(t.chunk):p(t.services)},()=>a.close()},[]),e.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-2 border-b border-border bg-card px-3",children:[e.jsx(O,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:v||"…"}),g?null:e.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-amber-400",children:d.tabs.nonInteractive})]}),e.jsx("div",{ref:h,className:"min-h-0 flex-1 bg-[#05070b] px-1"}),e.jsxs("div",{className:"flex h-8 shrink-0 items-center gap-3 overflow-x-auto border-t border-border bg-card px-3 text-[11px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono whitespace-nowrap",children:N(d.tabs.cursor,{y:o.cursorY,x:o.cursorX})}),e.jsxs("span",{className:"font-mono whitespace-nowrap",children:[o.cols,"×",o.rows]}),e.jsx("span",{className:"h-3 w-px bg-border"}),m.length===0?e.jsx("span",{children:d.tabs.portsSniffing}):m.map(r=>e.jsxs(B,{variant:r.detached?"destructive":"secondary",className:"font-mono whitespace-nowrap",children:[":",r.port,r.detached?" · detached":""]},r.port))]})]})}const i=R();S(i.locale,i.theme);E.createRoot(document.getElementById("root")).render(e.jsx(P.StrictMode,{children:e.jsx(k,{initialLocale:i.locale,initialTheme:i.theme,children:e.jsx(D,{})})}));
1
+ import{l as y,a as s,j as e,C as N,F as R,G as S,R as E,H as P,P as k}from"./index2.js";import{p as I,c as T,T as O,B}from"./terminal-pane.js";function C(){const{messages:l}=y(),[v,w]=s.useState(""),[g,b]=s.useState(!1),[m,p]=s.useState([]),[o,j]=s.useState({cursorX:0,cursorY:0,cols:0,rows:0}),h=s.useRef(null),c=s.useRef(void 0),d=s.useRef([]),x=s.useRef(!1);return s.useEffect(()=>{I()},[]),s.useEffect(()=>{let r=!1;return(async()=>{const a=h.current;if(a===null)return;const n=await T(a);if(r||n===void 0)return;c.current=n,n.onData(f=>{x.current&&fetch("/api/terminal-input",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({data:f})}).catch(()=>{})});const t=d.current;d.current=[];for(const f of t)n.write(f);const u=window.setInterval(()=>{try{j(n.readState())}catch{}},300);return()=>window.clearInterval(u)})(),()=>{r=!0,c.current?.dispose(),c.current=void 0}},[]),s.useEffect(()=>{const r=n=>{const t=c.current;t!==void 0?t.write(n):d.current.push(n)},a=new EventSource("/api/events");return a.onmessage=n=>{const t=JSON.parse(n.data);if(t.type==="state"){w(t.command),x.current=t.interactive,b(t.interactive),p(t.services);for(const u of t.output)r(u)}else t.type==="log"?r(t.chunk):p(t.services)},()=>a.close()},[]),e.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-2 border-b border-border bg-card px-3",children:[e.jsx(O,{className:"size-4 shrink-0 text-muted-foreground"}),e.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",children:v||"…"}),g?null:e.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-amber-400",children:l.tabs.nonInteractive})]}),e.jsx("div",{ref:h,className:"min-h-0 flex-1 bg-[#05070b] px-1"}),e.jsxs("div",{className:"flex h-8 shrink-0 items-center gap-3 overflow-x-auto border-t border-border bg-card px-3 text-[11px] text-muted-foreground",children:[e.jsx("span",{className:"font-mono whitespace-nowrap",children:N(l.tabs.cursor,{y:o.cursorY,x:o.cursorX})}),e.jsxs("span",{className:"font-mono whitespace-nowrap",children:[o.cols,"×",o.rows]}),e.jsx("span",{className:"h-3 w-px bg-border"}),m.length===0?e.jsx("span",{children:l.tabs.portsSniffing}):m.map(r=>e.jsxs(B,{variant:r.detached?"destructive":"secondary",className:"font-mono whitespace-nowrap",children:[":",r.port,r.detached?" · detached":""]},r.port))]})]})}const i=R();S(i.locale,i.theme);E.createRoot(document.getElementById("root")).render(e.jsx(P.StrictMode,{children:e.jsx(k,{initialLocale:i.locale,initialTheme:i.theme,children:e.jsx(C,{})})}));
@@ -0,0 +1 @@
1
+ import{l as N,a as s,j as a,F as M,G as P,R as z,H as A,P as I}from"./index2.js";import{N as y,a5 as T,a6 as U,a7 as _,a2 as K,$}from"./input.js";const O=()=>navigator.opentrayWebview,G=o=>{const t=o.trim();if(t.length!==0)try{return new URL(/^https?:\/\//iu.test(t)?t:`http://${t}`).href}catch{return}},H=o=>{const t=o;return typeof t=="object"&&t!==null&&t.kind==="load-state"&&(t.phase==="started"||t.phase==="finished"||t.phase==="failed")&&typeof t.url=="string"},w={active:!1,progress:null},W=240,q=o=>typeof o!="number"||!Number.isFinite(o)?null:Math.min(Math.max(o,0),1),J=o=>{try{const t=new URL(o);return t.protocol!=="http:"&&t.protocol!=="https:"||t.hostname.length===0?void 0:{src:`${t.origin}/favicon.ico`,glyph:t.hostname[0].toUpperCase()}}catch{return}};function Q(){const{messages:o}=N(),t=s.useRef(null),m=s.useRef(null),u=s.useRef(null),[j,C]=s.useState(""),[L,E]=s.useState(""),[b,h]=s.useState(!1),[d,p]=s.useState(w),[S,D]=s.useState(null),f=s.useCallback(()=>{u.current!==null&&(clearTimeout(u.current),u.current=null)},[]);s.useEffect(()=>f,[f]);const R=s.useCallback(r=>{if(r.phase==="started"){f(),p({active:!0,progress:q(r.progress)});return}if(r.phase==="finished"){p(e=>e.active?{active:!0,progress:1}:e),f(),u.current=setTimeout(()=>{u.current=null,p(w)},W);return}p(e=>e.active?w:e)},[f]);s.useEffect(()=>{const r=O();r!==void 0&&r.onCreatedMessageChannel(e=>{t.current=e,h(!0),e.onMessage(i=>{const n=i;if(typeof n=="object"&&n!==null&&n.kind==="url"&&typeof n.url=="string"){C(n.url),E(n.url);return}H(n)&&R(n)}),e.onClose(()=>h(!1)),e.post({kind:"get-url"}).catch(()=>h(!1))})},[R]);const l=s.useCallback(r=>{const e=t.current;e!==null&&e.post(r).catch(()=>h(!1))},[]),k=s.useCallback(()=>{l({kind:"back"})},[l]),v=s.useCallback(()=>{l({kind:"forward"})},[l]),x=s.useCallback(()=>{l({kind:"reload"})},[l]),B=r=>{const e=G(r);e!==void 0&&l({kind:"navigate",url:e})};s.useEffect(()=>{const r=e=>{const i=e.metaKey||e.ctrlKey,n=document.activeElement===m.current;if(e.key==="F5"||i&&e.key.toLowerCase()==="r"){e.preventDefault(),x();return}if(!n){if(i&&e.key==="ArrowLeft"||i&&e.key==="["){e.preventDefault(),k();return}if(i&&e.key==="ArrowRight"||i&&e.key==="]"){e.preventDefault(),v();return}i&&e.key.toLowerCase()==="l"&&(e.preventDefault(),m.current?.focus(),m.current?.select())}};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[k,v,x]);const c=J(L),F=c!==void 0&&S===c.src;return a.jsxs("div",{className:"relative flex h-11 w-full items-center gap-2 border-b border-border bg-card px-3",children:[a.jsx(y,{variant:"ghost",size:"icon-sm",disabled:!b,onClick:k,"aria-label":o.common.back,children:a.jsx(T,{})}),a.jsx(y,{variant:"ghost",size:"icon-sm",disabled:!b,onClick:v,"aria-label":o.common.forward,children:a.jsx(U,{})}),a.jsx(y,{variant:"ghost",size:"icon-sm",disabled:!b,onClick:x,"aria-label":o.common.reload,children:a.jsx(_,{})}),c===void 0?a.jsx(K,{className:"size-4 shrink-0 text-muted-foreground","aria-label":o.tabs.siteIconPlaceholder}):F?a.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center rounded-sm bg-muted font-mono text-[10px] leading-none font-semibold text-muted-foreground","aria-label":o.tabs.siteIconFallback,children:c.glyph}):a.jsx("img",{src:c.src,alt:"",className:"size-4 shrink-0 rounded-sm",onError:()=>{D(c.src)}},c.src),a.jsx($,{ref:m,className:"h-7 font-mono text-xs",value:j,placeholder:o.tabs.urlPlaceholder,onChange:r=>C(r.target.value),onKeyDown:r=>{r.key==="Enter"&&B(j)}}),d.active?a.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,...d.progress===null?{}:{"aria-valuenow":Math.round(d.progress*100)},className:"pointer-events-none absolute inset-x-0 bottom-0 h-0.5 overflow-hidden",children:d.progress===null?a.jsx("div",{className:"toolbar-load-indeterminate h-full w-1/4 bg-primary"}):a.jsx("div",{className:"h-full bg-primary transition-[width] duration-150 ease-out",style:{width:`${Math.round(d.progress*100)}%`}})}):null]})}const g=M();P(g.locale,g.theme);z.createRoot(document.getElementById("root")).render(a.jsx(A.StrictMode,{children:a.jsx(I,{initialLocale:g.locale,initialTheme:g.theme,children:a.jsx(Q,{})})}));
@@ -8,7 +8,7 @@
8
8
  <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" />
9
9
  <title>create-opentray</title>
10
10
  <script type="module" crossorigin src="/assets/main.js"></script>
11
- <link rel="modulepreload" crossorigin href="/assets/index.js">
11
+ <link rel="modulepreload" crossorigin href="/assets/index2.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/input.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/terminal-pane.js">
14
14
  <link rel="stylesheet" crossorigin href="/assets/index.css">
@@ -8,7 +8,7 @@
8
8
  <link rel="icon" type="image/png" sizes="16x16" href="./favicon-16.png" />
9
9
  <title>Terminal</title>
10
10
  <script type="module" crossorigin src="./assets/terminal.js"></script>
11
- <link rel="modulepreload" crossorigin href="./assets/index.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/index2.js">
12
12
  <link rel="modulepreload" crossorigin href="./assets/terminal-pane.js">
13
13
  <link rel="stylesheet" crossorigin href="./assets/index.css">
14
14
  </head>
@@ -6,9 +6,9 @@
6
6
  <link rel="icon" type="image/png" sizes="64x64" href="./favicon-64.png" />
7
7
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
8
8
  <link rel="icon" type="image/png" sizes="16x16" href="./favicon-16.png" />
9
- <title>Browse</title>
10
- <script type="module" crossorigin src="./assets/browse.js"></script>
11
- <link rel="modulepreload" crossorigin href="./assets/index.js">
9
+ <title>Toolbar</title>
10
+ <script type="module" crossorigin src="./assets/toolbar.js"></script>
11
+ <link rel="modulepreload" crossorigin href="./assets/index2.js">
12
12
  <link rel="modulepreload" crossorigin href="./assets/input.js">
13
13
  <link rel="stylesheet" crossorigin href="./assets/index.css">
14
14
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-opentray",
3
- "version": "0.24.0",
3
+ "version": "0.26.0",
4
4
  "description": "Turn any start command that serves HTTP locally into an OpenTray-hosted desktop app.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,9 +36,9 @@
36
36
  "exifr": "^7.1.3",
37
37
  "figma-squircle": "^1.1.0",
38
38
  "yargs": "^18.0.0",
39
- "@opentray/packaging": "0.24.0",
40
- "@opentray/spec": "0.24.0",
41
- "@opentray/vite-plugin": "0.24.0"
39
+ "@opentray/packaging": "0.26.0",
40
+ "@opentray/spec": "0.26.0",
41
+ "@opentray/vite-plugin": "0.26.0"
42
42
  },
43
43
  "optionalDependencies": {
44
44
  "@lydell/node-pty": "^1.1.0"
@@ -49,8 +49,8 @@
49
49
  "tsdown": "^0.22.1",
50
50
  "typescript": "^6.0.3",
51
51
  "vitest": "^4.1.7",
52
- "@create-opentray/core": "0.1.6",
53
- "@create-opentray/cli": "0.1.6"
52
+ "@create-opentray/core": "0.1.8",
53
+ "@create-opentray/cli": "0.1.8"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=20"
package/skill/SKILL.md CHANGED
@@ -99,17 +99,20 @@ npx create-opentray create \
99
99
  as DEFAULTS (explicit flags win; failures fall back silently; `--no-scrape`
100
100
  skips the fetch). `app edit <id> --url <new-address>` changes it later;
101
101
  export emits `--url`.
102
- - URL app window behavior (all persisted in v1 config, export round-trips):
103
- `--toolbar` wraps the address in the shared address-bar page (back/forward/
104
- reload buttons + ⌘/Ctrl+←→, ⌘/Ctrl+[] , ⌘/Ctrl+R, F5, ⌘/Ctrl+L shortcuts
105
- while the wrapper has focus). Embedding-hostile targets (X-Frame-Options /
106
- CSP frame-ancestors refusing third-party iframes) are detected during the
107
- creation scrape and degrade to the direct window with a notice — e.g.
108
- news.ycombinator.com sends `X-Frame-Options: DENY`, so HN always runs
109
- direct;
110
- the tray menu always offers Reload; the window title follows the document
111
- by default (`--no-title-follow` opts out) and favicon following is opt-in
112
- (`--icon-follow`).
102
+ - Window behavior (all persisted in v1 config, export round-trips):
103
+ `--toolbar` (URL and command applications; default off; the single canonical
104
+ `window.toolbar` field) composes the native navigation toolbar one toolbar
105
+ webview at a fixed top strip (back/forward/reload buttons, address input,
106
+ and the ⌘/Ctrl+←→, ⌘/Ctrl+[], ⌘/Ctrl+R, F5, ⌘/Ctrl+L shortcuts while the
107
+ toolbar holds native focus) plus one content webview loading the address
108
+ directly as a top-level browsing context. Embedding policy is never
109
+ consulted — an embedding-hostile site renders the same as any other address
110
+ because the content webview is not an embedded context; creation does not
111
+ probe, warn about, or downgrade the toolbar request (the legacy
112
+ `showAddressBar` input no longer exists; stale occurrences in old configs
113
+ are ignored). The tray menu always offers Reload; the window title follows
114
+ the document by default (`--no-title-follow` opts out) and favicon
115
+ following is opt-in (`--icon-follow`).
113
116
  - Icon sources may be local files, `http(s)` URLs, or `data:` URLs. The CLI
114
117
  never scrapes names or favicons — everything is explicit.
115
118
  - `--dry-run` prints the Core plan (effects, warnings, blocks) without
@@ -33,7 +33,7 @@ command flags (`--exec` family) OR `--url`. Options:
33
33
  | `--tray-template` | treat the tray source as a darwin template |
34
34
  | `--developer-mode` | admit WebView DevTools (default false) |
35
35
  | `--window <WxH>` | window size (default 1200x800) |
36
- | `--toolbar` | URL apps: host the address-bar wrapper (back/forward/reload + shortcuts) |
36
+ | `--toolbar` | URL and command applications: compose the native navigation toolbar over the target/service page (back/forward/reload + address bar; default off; canonical `window.toolbar` field) |
37
37
  | `--title-follow <bool>` | window title follows document.title (default true; negate with `--no-title-follow`) |
38
38
  | `--icon-follow <bool>` | runtime favicon→window-icon following (default off) |
39
39
  | `--force` | replace a VERIFIED existing payload |
@@ -12,8 +12,9 @@ A v1 application carries exactly ONE source:
12
12
  once and adopts its `<title>` and best favicon as DEFAULTS — explicit flags
13
13
  win, failures fall back silently to the address-derived name and a glyph
14
14
  icon, and `--no-scrape` skips the fetch. appId always derives from the
15
- address text, never from page content. URL apps carry no PTY, no
16
- terminal/address-bar shell, and no env overlay.
15
+ address text, never from page content. URL apps carry no PTY, no terminal
16
+ shell, and no env overlay; toolbar mode adds only the shell-served toolbar
17
+ page (still no PTY).
17
18
 
18
19
  ## The creation pipeline
19
20
 
@@ -39,19 +40,24 @@ Command apps:
39
40
  DevTools sockets are never adopted).
40
41
  - Opens one application-mode webview window per verified port; a port that
41
42
  stops listening marks its window detached.
42
- - Publishes a tray with Quit; optional startup-terminal and address-bar
43
- shells when configured.
43
+ - Publishes a tray with Quit; optional startup-terminal and navigation-
44
+ toolbar shells when configured (the toolbar composes a native toolbar
45
+ webview above each service window's content webview).
44
46
 
45
47
  URL apps:
46
48
 
47
49
  - Publish the tray (Show/Reload/Quit) and one application-mode webview
48
50
  window at the frozen URL. The title follows the page document by default
49
51
  (one-way); runtime favicon→icon following is opt-in (`--icon-follow`).
50
- - Toolbar mode (`--toolbar`) wraps the address in the shared address-bar
51
- page: back/forward/reload buttons, an address input, and the ⌘/Ctrl
52
- navigation shortcuts while the wrapper has focus (keystrokes inside a
53
- cross-origin embedded page are not observable by the wrapper; the tray
54
- Reload item always works). Sites that forbid embedding cannot be wrapped.
52
+ - Toolbar mode (`--toolbar`, `window.toolbar` in the v1 config) composes the
53
+ native navigation-toolbar carrier: one toolbar webview at a fixed top strip
54
+ (back/forward/reload buttons, address input, and the ⌘/Ctrl navigation
55
+ shortcuts while the toolbar holds native focus) above one content webview
56
+ loading the address directly as a top-level browsing context. The address
57
+ bar follows the content webview's URL events as its source of truth;
58
+ back/forward drive the content webview's native history. Embedding policy
59
+ is never consulted — an embedding-hostile site renders the same as any
60
+ other address because the content webview is not an embedded context.
55
61
  - Supervise nothing: no child process, no port monitor; Quit destroys the
56
62
  window and tray session and exits.
57
63