sliccy 3.32.2 → 3.34.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/dist/ui/assets/adobe-BkTvvNWq.js +1 -0
- package/dist/ui/assets/{adobe-0hBB-cvI.js → adobe-C_KbKd0n.js} +2 -2
- package/dist/ui/assets/{agent-bridge-B4fMRTq4.js → agent-bridge-FF6kv2fb.js} +1 -1
- package/dist/ui/assets/{agent-message-to-chat-BtGucQZb.js → agent-message-to-chat-DkR9NV9t.js} +1 -1
- package/dist/ui/assets/anthropic-DfZXQaUp.js +39 -0
- package/dist/ui/assets/{anthropic-BtADBMTr.js → anthropic-HYC-Omg5.js} +1 -1
- package/dist/ui/assets/{apps-JmnZT0_d.js → apps-BxS_QnGn.js} +1 -1
- package/dist/ui/assets/azure-openai-CLWQP72f.js +1 -0
- package/dist/ui/assets/{azure-openai-BF07BSkG.js → azure-openai-Vm01DpT_.js} +1 -1
- package/dist/ui/assets/azure-openai-responses-33r3NvaZ.js +1 -0
- package/dist/ui/assets/{azure-openai-responses-DAwt8x-O.js → azure-openai-responses-DUgZZ6eN.js} +1 -1
- package/dist/ui/assets/{biome_wasm-CwT46YkP.js → biome_wasm-CvSAK_uf.js} +1 -1
- package/dist/ui/assets/{bsh-watchdog-DOS3grX1.js → bsh-watchdog-Du7KRjWw.js} +1 -1
- package/dist/ui/assets/{cdp-B0CbWj0b.js → cdp-BMZH9kfw.js} +3 -3
- package/dist/ui/assets/{cdp-ws-page-bridge-BaREToXn.js → cdp-ws-page-bridge-DYY56Jqj.js} +1 -1
- package/dist/ui/assets/{common-DPijqIuN.js → common-BG1B2pGi.js} +1 -1
- package/dist/ui/assets/{connect-surface-B8X2BxSx.js → connect-surface-0lxpf-5t.js} +1 -1
- package/dist/ui/assets/cost-command-DNDC9f5s.js +1 -0
- package/dist/ui/assets/dist-BanEKbJr.js +18 -0
- package/dist/ui/assets/dist-CfHbsibs.js +2 -0
- package/dist/ui/assets/dist-JjJ6duRw.js +12 -0
- package/dist/ui/assets/dist-Yxhff45Z.js +2 -0
- package/dist/ui/assets/{es-BvNkEnLt.js → es-CMFNtJSL.js} +5 -5
- package/dist/ui/assets/{follower-sprinkle-bridge-i8o45Iz0.js → follower-sprinkle-bridge-CszKWKEN.js} +1 -1
- package/dist/ui/assets/{github-BHPt4SGX.js → github-D5chbBco.js} +1 -1
- package/dist/ui/assets/github-copilot-DB_-fjnz.js +1 -0
- package/dist/ui/assets/{github-copilot-C1p7G_lc.js → github-copilot-Hxxj6MFv.js} +2 -2
- package/dist/ui/assets/{github-D3FUw7Ft.js → github-lQAdGX0Z.js} +2 -2
- package/dist/ui/assets/{google-vnvvxTni.js → google-6xMZvOez.js} +1 -1
- package/dist/ui/assets/google-CbHlbByo.js +1 -0
- package/dist/ui/assets/{google-shared-DNHwaM2i.js → google-shared-CR-aIyZa.js} +1 -1
- package/dist/ui/assets/{google-shared-Ck5bpSOw.js → google-shared-DX0yj3UK.js} +3 -3
- package/dist/ui/assets/{google-vertex-CkktMzxu.js → google-vertex-BHOYutHi.js} +1 -1
- package/dist/ui/assets/{google-vertex-CwyKiWDF.js → google-vertex-Dpr6tNZD.js} +1 -1
- package/dist/ui/assets/{hosted-config-apply-CAtsa6WM.js → hosted-config-apply-LNWPnWio.js} +1 -1
- package/dist/ui/assets/{intercepted-oauth-CGJydQlU.js → intercepted-oauth-D41iguEu.js} +1 -1
- package/dist/ui/assets/{kernel-worker-Cjl8fjr8.js → kernel-worker-ApBe2nsN.js} +1089 -1062
- package/dist/ui/assets/{lick-ws-bridge-Ca7uAWlQ.js → lick-ws-bridge-DLkh-q6E.js} +1 -1
- package/dist/ui/assets/{local-llm-YcdPZyUH.js → local-llm-BUHqKQIs.js} +1 -1
- package/dist/ui/assets/{magick-wasm-C8lW0-35.js → magick-wasm-WfPf-mzW.js} +1 -1
- package/dist/ui/assets/main-CiPLuc4Y.js +1683 -0
- package/dist/ui/assets/{main-cherry-CfIm_qBH.js → main-cherry-CvuKVZgJ.js} +1 -1
- package/dist/ui/assets/migration-run-CjK_K6H_.js +1 -0
- package/dist/ui/assets/migration-splash-D-cAt2r9.js +1 -0
- package/dist/ui/assets/{mistral-Dgd8b7W0.js → mistral-3BOt-kpO.js} +2 -2
- package/dist/ui/assets/{mistral-DeuCdnLs.js → mistral-7zIzaf30.js} +1 -1
- package/dist/ui/assets/nodejs-BOWNwnaN.js +1 -0
- package/dist/ui/assets/{nuke-command-alibr6is.js → nuke-command-D8Fh0gbL.js} +1 -1
- package/dist/ui/assets/{oauth-BvQKYNNy.js → oauth-DLszIWW7.js} +1 -1
- package/dist/ui/assets/{oauth-bootstrap-BAnHB1H5.js → oauth-bootstrap-Bkf6-I68.js} +2 -2
- package/dist/ui/assets/{oauth-service-2Bm2tu9h.js → oauth-service-DclCNOyC.js} +1 -1
- package/dist/ui/assets/{oauth-service-HBkDeXXf.js → oauth-service-IRbgSoZf.js} +1 -1
- package/dist/ui/assets/offscreen-client-WfjjyTww.js +1 -0
- package/dist/ui/assets/{onboarding-orchestrator-VipPxQM9.js → onboarding-orchestrator-Cj4wwL1r.js} +1 -1
- package/dist/ui/assets/{openai-codex-BOCOi8v3.js → openai-codex-DQpjVOFB.js} +1 -1
- package/dist/ui/assets/openai-codex-o1t-m8rL.js +1 -0
- package/dist/ui/assets/{openai-codex-responses-2_MR5Im1.js → openai-codex-responses-DGMmjslY.js} +1 -1
- package/dist/ui/assets/{openai-codex-responses-XAgywVT2.js → openai-codex-responses-DhoTOdH3.js} +4 -4
- package/dist/ui/assets/{openai-completions-aOEJoPfR.js → openai-completions-CTH4LB2F.js} +1 -1
- package/dist/ui/assets/openai-responses-D68JIQf1.js +1 -0
- package/dist/ui/assets/{openai-responses-DV7QYgXj.js → openai-responses-Hs-gRUiN.js} +1 -1
- package/dist/ui/assets/{openai-responses-shared-BK_I3ssh.js → openai-responses-shared-S3zguGjk.js} +1 -1
- package/dist/ui/assets/{openai-responses-shared-CU6P3yaz.js → openai-responses-shared-yJFA8VNU.js} +5 -5
- package/dist/ui/assets/{openrouter-C8oMEs0J.js → openrouter-B2BsIHza.js} +1 -1
- package/dist/ui/assets/openrouter-UArPIjqO.js +1 -0
- package/dist/ui/assets/opfs-leader-election-BJDtxHPr.js +1 -0
- package/dist/ui/assets/opfs-readonly-banner-BwveszbN.js +1 -0
- package/dist/ui/assets/{panel-rpc-handlers-DHlnRnNz.js → panel-rpc-handlers-CkCiX7Tp.js} +1 -1
- package/dist/ui/assets/panel-vfs-guard-1E455_lR.js +1 -0
- package/dist/ui/assets/provider-BYq4p5If.js +1 -0
- package/dist/ui/assets/{provider-DB2BpoXt.js → provider-Cs2-iVKM.js} +2 -2
- package/dist/ui/assets/provider-store-access-G9HYvkSk.js +1 -0
- package/dist/ui/assets/provider-store-access-Mcnc2eQL.js +1 -0
- package/dist/ui/assets/{proxied-fetch-ChX8PtVt.js → proxied-fetch-B31wB0pw.js} +1 -1
- package/dist/ui/assets/py-realm-worker-DhXHapes.js +23 -0
- package/dist/ui/assets/pyodide-BXKIZesR.js +3 -0
- package/dist/ui/assets/{remote-terminal-view-BYUBsOyw.js → remote-terminal-view-D8Lym4ke.js} +1 -1
- package/dist/ui/assets/remote-vfs-client-CX-U7Vpk.js +1 -0
- package/dist/ui/assets/{secret-env-yupQt_od.js → secret-env-We7YhnkP.js} +1 -1
- package/dist/ui/assets/{slicc-editor-Bdty0qFW.js → slicc-editor-D1shQp3f.js} +1 -1
- package/dist/ui/assets/spawn-BROIpDuE.js +1 -0
- package/dist/ui/assets/{sql-wasm-D0KJBRcf.js → sql-wasm-BKOzFTaN.js} +2 -2
- package/dist/ui/assets/src-LhD223BJ.js +3 -0
- package/dist/ui/assets/{store-CoqxzWD_.js → store-DcwzvMDt.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-DgzvG0cq.js → tray-leave-runtime-D0wlJrCA.js} +1 -1
- package/dist/ui/assets/{typescript-D8obSBRU.js → typescript-BegR4udl.js} +9 -9
- package/dist/ui/assets/{upgrade-detection-SLtjojQ6.js → upgrade-detection-fcwNs12W.js} +1 -1
- package/dist/ui/assets/{web-2nwzshjs.js → web-VQMyUYjU.js} +1 -1
- package/dist/ui/assets/writable-vfs-client-C-OKNpFf.js +1 -0
- package/dist/ui/assets/{ws-subscribers-D0P6rQ_C.js → ws-subscribers-CWuwl3YA.js} +1 -1
- package/dist/ui/assets/{xai-grok-CGuHGhwm.js → xai-grok-DEMNJsqQ.js} +1 -1
- package/dist/ui/assets/xai-grok-g5ns0DU5.js +1 -0
- package/dist/ui/electron-overlay-entry.js +10 -10
- package/dist/ui/index.html +1 -1
- package/dist/ui/packages/webapp/index.html +1 -1
- package/dist/ui/preview-sw.js +1 -4
- package/package.json +1 -1
- package/dist/ui/assets/adobe-Siq458HU.js +0 -1
- package/dist/ui/assets/anthropic-ClPBBm6O.js +0 -39
- package/dist/ui/assets/azure-openai-BadnFKYq.js +0 -1
- package/dist/ui/assets/azure-openai-responses-PyfCX2VE.js +0 -1
- package/dist/ui/assets/cost-command-CEPNh0VO.js +0 -1
- package/dist/ui/assets/github-copilot-C7jxXCHT.js +0 -1
- package/dist/ui/assets/google-DS3rVZP1.js +0 -1
- package/dist/ui/assets/main-BccCPfVs.js +0 -1685
- package/dist/ui/assets/nodejs-D_wR4YhI.js +0 -1
- package/dist/ui/assets/offscreen-client-ijhP4Z8j.js +0 -1
- package/dist/ui/assets/openai-codex-BquojmIo.js +0 -1
- package/dist/ui/assets/openai-responses-CSMuG2OA.js +0 -1
- package/dist/ui/assets/openrouter-ybLvFVQF.js +0 -1
- package/dist/ui/assets/provider-CuDhBMAi.js +0 -1
- package/dist/ui/assets/provider-store-access-C_cZs2wy.js +0 -1
- package/dist/ui/assets/provider-store-access-DGBFQqC5.js +0 -1
- package/dist/ui/assets/py-realm-worker-BDTXsbRf.js +0 -23
- package/dist/ui/assets/pyodide-CjGywQ7Z.js +0 -3
- package/dist/ui/assets/spawn-BQL7p7C6.js +0 -1
- package/dist/ui/assets/xai-grok-24FXuNvx.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e}from"./main-
|
|
1
|
+
import{I as e}from"./main-CiPLuc4Y.js";import{BrowserAPI as t}from"./cdp-BMZH9kfw.js";var n=new Set([`handshake.hello`,`handshake.welcome`,`cdp.request`,`cdp.response`,`cdp.event`,`permission.request`,`permission.response`,`host.event`,`slicc.event`]);function r(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.cherry===1&&typeof t.channelId==`string`&&typeof t.kind==`string`&&n.has(t.kind)}function i(e,t){return!(!t.allowOrigins.includes(e.origin)||t.expectedSource!==null&&e.source!==t.expectedSource||!r(e.data)||t.channelId!==null&&e.data.channelId!==t.channelId)}var a=e(`cherry-transport`),o=`cherry-session`,s=`cherry-target`,c=`cherry-frame`,l=3e4,u=class{opts;channelId=null;nextId=1;_state=`disconnected`;pending=new Map;listeners=new Map;connectResolve=null;connectTimer=null;_joinUrl=null;boundHandler=e=>this.handleMessage(e);onHostEvent=null;constructor(e){this.opts=e}get state(){return this._state}get joinUrl(){return this._joinUrl}async connect(e){if(this._state!==`disconnected`)throw Error(`Cannot connect: state is ${this._state}`);this._state=`connecting`,this.channelId=`cherry-${crypto.randomUUID()}`,typeof window<`u`&&window.addEventListener(`message`,this.boundHandler);let t=e?.timeout??l;return new Promise((e,n)=>{this.connectResolve=e,this.connectTimer=setTimeout(()=>{this.connectTimer=null,typeof window<`u`&&window.removeEventListener(`message`,this.boundHandler),this._state=`disconnected`,this.channelId=null,this.connectResolve=null,n(Error(`Cherry handshake timed out after ${t}ms`))},t),this.post({cherry:1,channelId:this.channelId,kind:`handshake.hello`,capabilities:this.opts.capabilities??{navigate:!0,screenshot:!0,openUrl:!0}})})}disconnect(){this.connectTimer!==null&&(clearTimeout(this.connectTimer),this.connectTimer=null),typeof window<`u`&&window.removeEventListener(`message`,this.boundHandler);for(let[,e]of this.pending)e.reject(Error(`Cherry transport disconnected`));this.pending.clear(),this._state=`disconnected`,this.channelId=null}async send(e,t,n,r=3e4){if(this._state!==`connected`)throw Error(`Cherry transport is not connected`);let i=this.handleSynthetic(e,t);if(i)return i;let a=this.nextId++,o=await new Promise((n,i)=>{let o=setTimeout(()=>{this.pending.delete(a),i(Error(`Cherry CDP timed out after ${r}ms: ${e}`))},r);this.pending.set(a,{resolve:e=>{clearTimeout(o),n(e)},reject:e=>{clearTimeout(o),i(e)}}),this.post({cherry:1,channelId:this.channelId,kind:`cdp.request`,id:a,method:e,params:t})});return e===`Page.navigate`&&this.synthesizeNavigationLifecycle(o,t?.url),o}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){let n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}once(e,t=3e4){return new Promise((n,r)=>{let i=setTimeout(()=>{this.off(e,a),r(Error(`Timed out waiting for event: ${e}`))},t),a=t=>{clearTimeout(i),this.off(e,a),n(t)};this.on(e,a)})}__test_receive(e){this.handleMessage(e)}emitSliccEventToHost(e,t){if(!this.channelId){a.warn(`Dropping slicc.event before handshake (no channelId yet)`,{name:e});return}this.post({cherry:1,channelId:this.channelId,kind:`slicc.event`,name:e,detail:t})}post(e){this.opts.counterpart.postMessage(e,this.opts.targetOrigin)}emit(e,t){let n=this.listeners.get(e);if(n)for(let e of n)try{e(t)}catch{}}handleSynthetic(e,t){switch(e){case`Target.getTargets`:return Promise.resolve({targetInfos:[{targetId:s,type:`page`,title:`Cherry Host Page`,url:typeof location<`u`?location.href:`about:blank`,attached:!0}]});case`Target.attachToTarget`:return Promise.resolve({sessionId:o});case`Target.detachFromTarget`:case`Target.closeTarget`:return Promise.resolve({success:!0});case`Page.enable`:case`Runtime.enable`:case`DOM.enable`:case`Page.bringToFront`:return Promise.resolve({});case`Page.getFrameTree`:return Promise.resolve({frameTree:{frame:{id:c,loaderId:`cherry-loader`,url:typeof location<`u`?location.href:`about:blank`,securityOrigin:this.opts.targetOrigin,mimeType:`text/html`},childFrames:[]}});case`Runtime.createIsolatedWorld`:return Promise.resolve({executionContextId:1});default:return null}}synthesizeNavigationLifecycle(e,t){let n=e.frameId??c,r=t??(typeof location<`u`?location.href:`about:blank`);this.emit(`Page.frameNavigated`,{frame:{id:n,loaderId:`cherry-loader`,url:r,securityOrigin:this.opts.targetOrigin,mimeType:`text/html`},sessionId:o}),this.emit(`Page.loadEventFired`,{timestamp:Date.now()/1e3,sessionId:o})}handleMessage(e){if(!i(e,{allowOrigins:this.opts.allowOrigins,expectedSource:this.opts.counterpart,channelId:this.channelId})){r(e.data)&&a.warn(`Rejected a cherry envelope (origin/source/channel mismatch)`,{origin:e.origin,allowOrigins:this.opts.allowOrigins});return}let t=e.data;switch(t.kind){case`handshake.welcome`:this.connectTimer!==null&&(clearTimeout(this.connectTimer),this.connectTimer=null),this._state=`connected`,this._joinUrl=t.joinUrl??null,a.info(`Cherry handshake complete`,{channelId:this.channelId}),this.connectResolve?.(),this.connectResolve=null;return;case`cdp.response`:{let e=this.pending.get(t.id);if(!e)return;this.pending.delete(t.id),t.error?e.reject(Error(`Cherry CDP error: ${t.error.message} (${t.error.code})`)):e.resolve(t.result??{});return}case`cdp.event`:this.emit(t.method,{...t.params??{},sessionId:t.sessionId??o});return;case`host.event`:this.onHostEvent?.(t.name,t.detail);return;default:return}}},d=e(`cherry-boot`);async function f(){let e=[document.referrer?new URL(document.referrer).origin:location.origin],n=e[0],r=new u({counterpart:window.parent,allowOrigins:e,targetOrigin:n});await r.connect(),d.info(`Cherry transport connected`);let i=r.joinUrl;if(!i)throw Error(`cherry boot: no joinUrl from handshake`);return{transport:r,browser:new t(r),joinUrl:i}}export{f as setupCherryFollower};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{St as e,gt as t,m as n,p as r}from"./kernel-worker-ApBe2nsN.js";const i=`/.slicc-migrated`;async function a(e){let{manifest:t,source:n,target:r,logger:i}=e,a={fileCount:t.fileCount,totalBytes:t.totalBytes},c=t.entries.filter(e=>e.type===`dir`).sort((e,t)=>o(e.path)-o(t.path)),l=t.entries.filter(e=>e.type===`file`),u=t.entries.filter(e=>e.type===`symlink`);for(let e of c)try{await r.mkdir(e.path)}catch(e){return i?.warn?.(`[migration] mkdir failed during C2 copy`,{copiedFiles:0,stage:`mkdir`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:0,stage:`mkdir`}}let d=0;try{e.onProgress?.({copied:0,total:a.fileCount})}catch{}for(let t of l){if(t.type!==`file`)continue;let o;try{o=await n.readFile(t.path)}catch(e){return i?.warn?.(`[migration] legacy read failed during C2 copy`,{copiedFiles:d,stage:`read`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`read`}}try{await r.writeFile(t.path,o)}catch(e){return i?.warn?.(`[migration] OPFS write failed during C2 copy`,{copiedFiles:d,stage:`writeFile`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`writeFile`}}d++;try{e.onProgress?.({copied:d,total:a.fileCount})}catch{}}let f=0;for(let e of u)if(e.type===`symlink`)try{await r.symlink(e.target,e.path)}catch(e){if(s(e)===`EEXIST`){f++;continue}return i?.warn?.(`[migration] symlink failed during C2 copy`,{copiedFiles:d,stage:`symlink`,code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`symlink`}}if(f>0&&i?.info?.(`[migration] tolerated pre-existing symlinks during C2 re-run`,{skipped:f,symlinks:t.symlinkCount}),e.flushBeforeSentinel)try{await e.flushBeforeSentinel()}catch(e){return i?.warn?.(`[migration] sidecar flush failed before parity`,{code:s(e)}),{kind:`copy-error`,expected:a,copiedFiles:d,stage:`writeFile`}}let p=await e.countOpfsFiles(),m=p.totalBytes-a.totalBytes;return p.fileCount===a.fileCount?(m!==0&&i?.info?.(`[migration] byte drift tolerated (count parity matched)`,{expectedBytes:a.totalBytes,actualBytes:p.totalBytes,byteDelta:m}),await e.writeSentinel(),i?.info?.(`[migration] C2 copy complete, sentinel written`,{files:p.fileCount,totalBytes:p.totalBytes,expectedBytes:a.totalBytes,byteDelta:m,symlinks:t.symlinkCount,dirs:t.dirCount}),{kind:`success`,fileCount:p.fileCount,totalBytes:p.totalBytes}):(i?.warn?.(`[migration] parity mismatch — sentinel NOT written`,{expectedFiles:a.fileCount,actualFiles:p.fileCount,expectedBytes:a.totalBytes,actualBytes:p.totalBytes,byteDelta:m}),{kind:`parity-mismatch`,expected:a,actual:p})}function o(e){if(e===`/`)return 0;let t=0;for(let n=0;n<e.length;n++)e.charCodeAt(n)===47&&t++;return t}function s(e){let t=e?.code;return typeof t==`string`?t:void 0}const c=t(`migration-guard`);function l(){let e=globalThis;return{hasExtensionRuntime:typeof e.chrome?.runtime?.id==`string`,hasDocument:e.document!==void 0,pathname:e.window?.location?.pathname??``}}function u(e){return!e.hasExtensionRuntime||!e.hasDocument?!1:!/offscreen\.html$/.test(e.pathname)}var d=class extends Error{constructor(e){super(`runLegacyMigrationFromVfs invoked from the chrome extension side panel (pathname='${e.pathname}'). Migration must run only in the offscreen document; the panel should wait on the kernel-ready RPC (OffscreenClient.onReady).`),this.name=`MigrationFromSidePanelError`}};function f(e=l()){if(u(e)){let t=new d(e);throw c.error(t.message),t}}async function p(e,t={}){f(t.callerEnv);let r=t.logger,o=await n({sentinelExists:async()=>{try{return await e.stat(i),!0}catch{return!1}},probeLegacyDbExists:t.probeLegacyDbExists??y,lfsFactory:t.legacyLfsFactory??v,logger:r});if(o.kind===`sentinel-present`)return{kind:`sentinel-present`};if(o.kind===`legacy-absent`)return{kind:`legacy-absent`};let s=await(t.legacyReaderFactory??_)(),c=m(e);return{kind:`copied`,result:await a({manifest:o.manifest,source:s,target:c,countOpfsFiles:()=>g(e,o.manifest),flushBeforeSentinel:()=>e.flush().catch(()=>{}),writeSentinel:async()=>{await e.writeFile(i,``),await e.flush().catch(()=>{})},onProgress:t.onProgress,logger:r})}}function m(e){return{mkdir:async t=>{await e.mkdir(t,{recursive:!0})},writeFile:async(t,n)=>{await e.writeFile(t,n)},symlink:async(t,n)=>{try{await e.symlink(t,n);return}catch(e){if(h(e)!==`EEXIST`)throw e}let r;try{r=await e.readlink(n)}catch{}r!==t&&(await e.rm(n,{recursive:!0}),await e.symlink(t,n))}}}function h(e){let t=e?.code;return typeof t==`string`?t:void 0}async function g(e,t){let n=0,r=0;for(let i of t.entries){if(i.type!==`file`)continue;let t;try{t=await e.lstat(i.path)}catch{continue}t.type===`file`&&(n++,r+=t.size??0)}return{fileCount:n,totalBytes:r}}async function _(){let t=(await import(`./src-LhD223BJ.js`).then(t=>e(t.default,1))).default,n=new t(r).promises;return{readFile:async e=>{let t=await n.readFile(e);return t instanceof Uint8Array?t:new TextEncoder().encode(String(t))}}}async function v(){let t=(await import(`./src-LhD223BJ.js`).then(t=>e(t.default,1))).default;return new t(r).promises}async function y(){try{let e=globalThis.indexedDB;if(!e)return!1;let t=e.databases;return typeof t==`function`?(await t.call(e)).some(e=>e.name===r):!0}catch{return!0}}export{p as runLegacyMigrationFromVfs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`slicc-migration-splash`,t=`"Adobe Clean", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`;function n(n){let r=n.thresholdMs??1e3,i=n.setTimeout??globalThis.setTimeout,a=n.clearTimeout??globalThis.clearTimeout,o=n.message??`Upgrading workspace storage… this only happens once.`,s=n.logger,c=null,l=null,u={copied:0,total:0},d=null,f=null;function p(){if(!l)return;let{copied:e,total:t}=u,n=t>0?Math.max(0,Math.min(100,Math.round(e/t*100))):0;l.fill.style.width=`${n}%`,l.counter.textContent=t>0?`${e} / ${t} files`:`Preparing…`}function m(){if(l)return;let r=n.root.ownerDocument;if(!r)return;let i=r.createElement(`div`);i.id=e,i.setAttribute(`role`,`status`),i.setAttribute(`aria-live`,`polite`),i.setAttribute(`aria-modal`,`true`),i.style.position=`fixed`,i.style.inset=`0`,i.style.zIndex=`2147483646`,i.style.display=`flex`,i.style.alignItems=`center`,i.style.justifyContent=`center`,i.style.background=`rgba(20,20,20,0.72)`,i.style.backdropFilter=`blur(4px)`,i.style.webkitBackdropFilter=`blur(4px)`,i.style.pointerEvents=`auto`,i.style.fontFamily=t,i.addEventListener(`click`,e=>{e.stopPropagation()});let a=r.defaultView??r,c=e=>{e.stopImmediatePropagation(),e.preventDefault()};a.addEventListener(`keydown`,c,!0),d=c,f=a;let u=r.createElement(`div`);u.style.minWidth=`320px`,u.style.maxWidth=`420px`,u.style.padding=`28px 32px`,u.style.borderRadius=`12px`,u.style.background=`#1e1e1e`,u.style.color=`#e8e8e8`,u.style.boxShadow=`0 12px 32px rgba(0,0,0,0.45)`,u.style.border=`1px solid #3a3a3a`,u.style.textAlign=`center`,u.style.fontFamily=t;let m=r.createElement(`div`);m.textContent=o,m.style.fontSize=`16px`,m.style.fontWeight=`500`,m.style.lineHeight=`1.4`,m.style.marginBottom=`18px`;let h=r.createElement(`div`);h.style.height=`6px`,h.style.width=`100%`,h.style.borderRadius=`3px`,h.style.background=`#2c2c2c`,h.style.overflow=`hidden`,h.style.marginBottom=`10px`;let g=r.createElement(`div`);g.setAttribute(`data-slicc-migration-progress-fill`,``),g.style.height=`100%`,g.style.width=`0%`,g.style.background=`#3562ff`,g.style.transition=`width 120ms linear`,h.appendChild(g);let _=r.createElement(`div`);_.setAttribute(`data-slicc-migration-progress-counter`,``),_.style.fontSize=`12px`,_.style.fontVariantNumeric=`tabular-nums`,_.style.color=`#a1a1a1`,u.appendChild(m),u.appendChild(h),u.appendChild(_),i.appendChild(u),n.root.appendChild(i),l={root:i,fill:g,counter:_},p(),s?.debug?.(`[migration-splash] painted`)}function h(){d&&f&&(f.removeEventListener(`keydown`,d,!0),d=null,f=null),l&&(l.root.remove(),l=null,s?.debug?.(`[migration-splash] removed`))}return{arm(){c!==null||l!==null||(s?.debug?.(`[migration-splash] armed (threshold=${r}ms)`),c=i(()=>{c=null,m()},r))},updateProgress(e){u={copied:Math.max(0,e.copied|0),total:Math.max(0,e.total|0)},p()},disarm(){c!==null&&(a(c),c=null,s?.debug?.(`[migration-splash] disarmed before threshold`)),h()},isActive(){return c!==null||l!==null},forceShow(){c!==null&&(a(c),c=null),m()}}}export{n as createMigrationSplash};
|