moi-computer 0.12.1-next.1 → 0.12.1-next.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.
- package/client/AGENTS.md +3 -2
- package/client/api/app-config.ts +3 -9
- package/client/api/workspace-keys.ts +2 -1
- package/client/app/app-provider.tsx +25 -0
- package/client/app/routes/workspace-route.tsx +4 -0
- package/client/app/shell/sidebar-layout.tsx +19 -13
- package/client/dev/index.html +5 -5
- package/client/features/applets/api.ts +1 -1
- package/client/features/chat/connection/chat-frames.ts +2 -2
- package/client/features/chat/sessions/api.ts +1 -1
- package/client/features/chat/use-chat.ts +1 -1
- package/client/features/collab/host-state.ts +24 -7
- package/client/features/collab/local-user.ts +1 -1
- package/client/features/collab/proxy-user.ts +4 -9
- package/client/features/demo/demo-dialog.tsx +25 -79
- package/client/features/dev/workspace-setup-preview.tsx +43 -16
- package/client/features/harness/device-login-steps.tsx +2 -2
- package/client/features/home/api.ts +29 -9
- package/client/features/home/home-page.tsx +7 -4
- package/client/features/scratchpad/scratchpad.tsx +3 -6
- package/client/features/settings/api.ts +14 -8
- package/client/features/workspace/api.ts +12 -16
- package/client/features/workspace/setup/workspace-login-state.tsx +4 -4
- package/client/features/workspace/setup/workspace-setup.tsx +2 -1
- package/client/features/workspace/workspace-content.tsx +12 -52
- package/client/features/workspace/workspace-frame.tsx +76 -0
- package/client/features/workspace/workspace-layout-context.tsx +2 -0
- package/client/features/workspace/workspace-pending-screen.tsx +26 -0
- package/client/features/workspace/workspace-screen.tsx +3 -3
- package/client/index.html +28 -9
- package/client/index.tsx +7 -2
- package/client/lib/browser-tab-id.ts +4 -0
- package/client/main.tsx +9 -6
- package/client/runtime/app-context.ts +20 -0
- package/client/runtime/use-workspace-events.ts +29 -153
- package/client/runtime/workspace-events.ts +151 -0
- package/dist/chunk-00rh9df4.js +2 -0
- package/dist/chunk-4nh7y1hq.css +1 -0
- package/dist/{chunk-jvyvwwv3.js → chunk-am4agx6v.js} +1 -1
- package/dist/chunk-hbpdv7vd.js +1 -0
- package/dist/chunk-hmka9rt5.js +2 -0
- package/dist/chunk-mjjregkn.js +10 -0
- package/dist/chunk-vt6zybej.js +2 -0
- package/dist/chunk-wbkwf6cc.js +68 -0
- package/dist/chunk-xjyfyz64.js +1 -0
- package/dist/{chunk-q0gbdts4.js → chunk-y8nbwp21.js} +71 -71
- package/dist/chunk-ysfdcew7.js +1 -0
- package/dist/index.html +29 -10
- package/lib/ids.ts +2 -2
- package/package.json +1 -1
- package/server/api/index.ts +41 -22
- package/server/applets/thumbnails.ts +8 -5
- package/server/harness/codex/thread-list.ts +4 -0
- package/server/static.ts +4 -2
- package/server/vendor.ts +23 -30
- package/server/web.ts +3 -2
- package/server/workspaces/layout.ts +11 -6
- package/dist/chunk-08ndj2rg.js +0 -2
- package/dist/chunk-2x040tmg.js +0 -68
- package/dist/chunk-3smxq0ts.js +0 -1
- package/dist/chunk-68ch5hs8.js +0 -2
- package/dist/chunk-9vg3xa81.js +0 -2
- package/dist/chunk-c2p00p9j.css +0 -1
- package/dist/chunk-cs833y9j.js +0 -1
- package/dist/chunk-nwevqe86.js +0 -10
- package/dist/chunk-y5y3kj67.js +0 -1
- /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-dom-client.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-dom.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-jsx-dev-runtime.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-jsx-runtime.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/_impl/react.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/react-dom-client.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/react-dom.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/react-jsx-dev-runtime.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/react-jsx-runtime.js +0 -0
- /package/client/vendor/react/{development → 19.2.4/development}/react.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-dom-client.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-dom.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-jsx-dev-runtime.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-jsx-runtime.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/_impl/react.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/react-dom-client.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/react-dom.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/react-jsx-dev-runtime.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/react-jsx-runtime.js +0 -0
- /package/client/vendor/react/{production → 19.2.4/production}/react.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
async function s(t,e){let o=await t.text();return Error(o||e)}async function i(t,e,o="Request failed"){let n=await fetch(t,e);if(!n.ok)throw await s(n,o);return n.json()}async function r(t,e,o="Request failed"){let n=await fetch(t,e);if(!n.ok)throw await s(n,o)}function a(t,e){return{method:t,headers:{"Content-Type":"application/json"},body:e===void 0?void 0:JSON.stringify(e)}}
|
|
2
|
-
export{i as
|
|
2
|
+
export{i as Xc,r as Yc,a as Zc};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Uc as e,Vc as o,Wc as i}from"/chunk-hmka9rt5.js";import{bd as r}from"/chunk-d7cbm65e.js";if(typeof globalThis.structuredClone==="function")globalThis.structuredClone=globalThis.structuredClone.bind(globalThis);o();i();async function l(n){let[{mount:s},t,c]=await Promise.all([import("/chunk-wbkwf6cc.js"),import("/chunk-xjyfyz64.js").then((a)=>a.loadAppConfig()),import("/chunk-ysfdcew7.js").then((a)=>a.loadProxyUser())]);e(t?.environment==="local"&&!t.demo,c),s(n)}globalThis.__init=l;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var T=["pink","orange","amber","lime","emerald","cyan","blue","violet"];function _(A){return typeof A==="string"&&T.includes(A)}function V(A){let C=2166136261;for(let f=0;f<A.length;f++)C^=A.charCodeAt(f),C=Math.imul(C,16777619);return T[(C>>>0)%T.length]??T[0]}var o=1;var D=8192,H=320;function Q(A){return typeof A==="object"&&A!==null&&!Array.isArray(A)}function y(A,C=256){return typeof A==="string"&&A.length>0&&!A.includes("\x00")&&new TextEncoder().encode(A).length<=C}function j(A){return Q(A)&&y(A.id,240)&&A.id.trim().length>0&&(A.name===void 0||y(A.name)&&A.name.trim().length>0)&&_(A.color)&&(A.avatar===void 0||y(A.avatar,D))&&(A.email===void 0||y(A.email,H))}var W=["Curious Kiwi","Cheerful Cherry","Sleepy Peach","Excited Banana","Cosmic Mango","Velvet Lemon","Electric Plum","Wandering Pear","Dramatic Papaya","Suspicious Pineapple","Confused Coconut","Sneaky Tangerine","Gentle Fig","Quiet Apricot","Mellow Melon","Dreamy Guava"];function I(A,C){let f=A.filter((n)=>n!==C);return f[Math.floor(Math.random()*f.length)]??A[0]}function Z(A){return{name:I(W,A?.name),color:I(T,A?.color)}}function $(A,C){let f=C.name.trim();return{id:A,...f?{name:f}:{},color:C.color}}function G(){return $(`local-${crypto.randomUUID().slice(0,8)}`,Z())}var k="moi:local-profile",L=Object.freeze([]),B,g,Y,p=!1,w=new Set,X=new Set;function J(A,C){return JSON.stringify(A)===JSON.stringify(C)}function N(A){if(!A||typeof A.id!=="string"||!A.id.trim())throw Error("A user profile needs an id.");if(A.name!==void 0&&typeof A.name!=="string")throw Error("A user profile name must be a string when provided.");if(A.color!==void 0&&!_(A.color))throw Error("A user profile color must be one of the user palette names.");let C=A.id.trim(),f=A.name?.trim(),n={id:C,...f?{name:f}:{},color:A.color??V(C),...A.avatar!==void 0?{avatar:A.avatar}:{},...A.email!==void 0?{email:A.email}:{}};if(!j(n))throw Error("Invalid user profile.");return Object.freeze(n)}function b(A){if(!Array.isArray(A))throw Error("Users must be an array.");let C=new Set,f=A.map((n)=>{let M=N(n);if(C.has(M.id))throw Error("Users must have unique ids.");return C.add(M.id),M});return Object.freeze(f)}function F(A){if(!A||typeof A!=="object")throw Error("Users must be published as an object.");let C=b(A.users),f;if(A.me!==void 0&&A.me!==null){if(typeof A.me!=="string")throw Error("The current user id must be a string.");let M=A.me.trim();if(f=C.find((q)=>q.id===M),!f)throw Error("The current user must be listed in users.")}let n=g!=="external"||!J(B,f);if(g="external",n)B=f;if(Y=f?C:L,n)w.forEach((M)=>M());X.forEach((M)=>M())}function i(){return Y}function d(A){return X.add(A),()=>{X.delete(A)}}function c(){return B}function U(A){return w.add(A),()=>{w.delete(A)}}function a({provider:A,profile:C}){if(g==="external")return;if(A===void 0){if(g===void 0||g==="local")return;g=void 0,B=void 0}else{let f=C===void 0?void 0:N(C);if(g===A&&J(B,f))return;g=A,B=f}w.forEach((f)=>f())}function K(){try{localStorage.setItem(k,JSON.stringify(B))}catch{}}function E(A){if(g!==void 0&&g!=="local")return;let C=N(A);g="local",B=C,K(),w.forEach((f)=>f())}function u(A,C){if(!A||!C||C.provider!==void 0||g!==void 0)return;try{let f=localStorage.getItem(k);if(f){E(JSON.parse(f));return}}catch{}E(G())}function v(){if(typeof window>"u"||p)return;p=!0;let A=window;A.moi??={};let C={publishUsers:F};A.moi.collab=C}function O(A){if(A.key!==k||!A.newValue||g!=="local")return;try{let C=N(JSON.parse(A.newValue));if(J(C,B))return;B=C,w.forEach((f)=>f())}catch{}}function s(){return window.addEventListener("storage",O),()=>window.removeEventListener("storage",O)}
|
|
2
|
+
export{o as Oc,i as Pc,d as Qc,c as Rc,U as Sc,a as Tc,u as Uc,v as Vc,s as Wc};
|