@coreframe/vite 0.1.40 → 0.1.41
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.d.ts +30 -0
- package/dist/codex-task-launcher.js +68 -0
- package/dist/overlay/codex-task-launcher.d.ts +30 -0
- package/dist/overlay/codex-task-launcher.js +1 -0
- package/dist/overlay/managed-dev-overlay.d.ts +4 -1
- package/dist/overlay/managed-dev-overlay.js +5 -69
- package/dist/plugins/assets.js +1 -1
- package/dist/plugins/cloudflare.d.ts +6 -1
- package/dist/plugins/cloudflare.js +1 -1
- package/dist/plugins/codex-task.d.ts +14 -0
- package/dist/plugins/codex-task.js +1 -0
- package/dist/plugins/dashboard.d.ts +18 -3
- package/dist/plugins/dashboard.js +4 -1
- package/dist/plugins/development-controls.d.ts +11 -0
- package/dist/plugins/development-controls.js +1 -0
- package/dist/plugins/favicon.d.ts +1 -1
- package/dist/plugins/index.d.ts +10 -2
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/managed-dev.d.ts +1 -1
- package/dist/plugins/managed-dev.js +1 -1
- package/dist/plugins/native.d.ts +1 -0
- package/dist/plugins/native.js +1 -0
- package/dist/plugins/preset.d.ts +1 -1
- package/dist/plugins/preset.js +1 -1
- package/dist/plugins/routes.d.ts +76 -0
- package/dist/plugins/routes.js +1 -0
- package/dist/plugins/shell.d.ts +7 -0
- package/dist/plugins/shell.js +1 -0
- package/dist/plugins/startup-timing.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +24 -6
package/client.d.ts
CHANGED
|
@@ -1 +1,31 @@
|
|
|
1
1
|
/// <reference types="vite-plugin-hashed-favicons/virtual" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly PLATFORM: import("@coreframe/lib/shell").ShellPlatform
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface ImportMeta {
|
|
8
|
+
readonly env: ImportMetaEnv
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "virtual:coreframe-shell" {
|
|
12
|
+
export const shell: import("@coreframe/lib/shell").CoreframeShell
|
|
13
|
+
export const ShellHost: (props: Record<string, never>) => import("react").ReactNode
|
|
14
|
+
export const NativeRouteLink: (
|
|
15
|
+
props: import("@coreframe/lib/shell").NativeRouteLinkProps,
|
|
16
|
+
) => import("react").ReactNode
|
|
17
|
+
export function configureShellClient(): void
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare module "virtual:coreframe-shell/auth" {
|
|
21
|
+
export function createAuthenticatedFetch(
|
|
22
|
+
options: import("@coreframe/lib/auth-transport").AuthenticatedFetchOptions,
|
|
23
|
+
): import("@coreframe/lib/auth-transport").AuthenticatedFetch
|
|
24
|
+
export function createAuthClient(
|
|
25
|
+
options: import("@coreframe/lib/auth-transport").AuthClientOptions,
|
|
26
|
+
): import("@coreframe/lib/auth-transport").AuthClient
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module "virtual:coreframe-router" {
|
|
30
|
+
export * from "@coreframe/flutter-js/router"
|
|
31
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import{codexTaskEvents as e}from"@coreframe/dev-contracts/codex-task";import{createContext as t,createElement as n,forwardRef as r,useContext as i,useEffect as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{createPortal as l}from"react-dom";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";const p=()=>{if(typeof document>`u`)return;let e=document.querySelector(`meta[name="csp-nonce"]`);if(e?.content)return e.content;let t=document.querySelector(`script[nonce]`),n=t?.nonce||t?.getAttribute(`nonce`);if(n)return n},m=(e,t,n)=>{if(typeof document>`u`)return null;let r=`isolet-style-${e}`,i=typeof CSS<`u`&&CSS.escape?CSS.escape(r):r,a=`getElementById`in n?n.getElementById(r):n.querySelector(`#${i}`);if(a)return a.textContent=t,a;let o=document.createElement(`style`);o.id=r;let s=p();return s&&o.setAttribute(`nonce`,s),o.textContent=t,n.appendChild(o),o},h=`data-isolet`,g=(e,t,n={})=>{if(typeof document>`u`)return{host:null,shadowRoot:null,container:t,target:t};let r=n.isolation??`shadow-dom`;if(r===`none`){let r=`[${h}="${e}"]`,i=t.querySelector(r);if(i)return{host:i,shadowRoot:null,container:i,target:t};let a=document.createElement(`div`);if(a.setAttribute(h,e),n.hostAttributes)for(let[e,t]of Object.entries(n.hostAttributes))a.setAttribute(e,t);return _(a,n),n.css&&m(e,n.css,t),t.appendChild(a),{host:a,shadowRoot:null,container:a,target:t}}let i=`[${h}="${e}"]`,a=t.querySelector(i);if(a){if(r===`shadow-dom`&&a.shadowRoot){let e=a.shadowRoot.querySelector(`[${h}-root]`);if(e)return{host:a,shadowRoot:a.shadowRoot,container:e,target:t}}else if(r===`scoped`)return{host:a,shadowRoot:null,container:a,target:t}}let o=document.createElement(`div`);if(o.setAttribute(h,e),n.hostAttributes)for(let[e,t]of Object.entries(n.hostAttributes))o.setAttribute(e,t);if(r===`shadow-dom`){o.style.all=`initial`;let r=o.attachShadow({mode:n.shadowMode??`open`});n.css&&m(e,n.css,r);let i=document.createElement(`div`);return i.setAttribute(`${h}-root`,``),r.appendChild(i),_(o,n),t.appendChild(o),{host:o,shadowRoot:r,container:i,target:t}}return _(o,n),n.css&&m(e,n.css,t),t.appendChild(o),{host:o,shadowRoot:null,container:o,target:t}},_=(e,t)=>{if(t.hostStyles)for(let[n,r]of Object.entries(t.hostStyles))r==null||typeof r==`function`||e.style.setProperty(n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),String(r));t.zIndex!=null&&(e.style.zIndex=String(t.zIndex))},v=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),y=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),x=e=>{
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v1.24.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v1.24.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @license lucide-react v1.24.0 - ISC
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the ISC license.
|
|
18
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* @license lucide-react v1.24.0 - ISC
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the ISC license.
|
|
24
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/
|
|
26
|
+
let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
27
|
+
/**
|
|
28
|
+
* @license lucide-react v1.24.0 - ISC
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the ISC license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/
|
|
33
|
+
var S={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};
|
|
34
|
+
/**
|
|
35
|
+
* @license lucide-react v1.24.0 - ISC
|
|
36
|
+
*
|
|
37
|
+
* This source code is licensed under the ISC license.
|
|
38
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
+
*/
|
|
40
|
+
const C=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},w=t({}),T=()=>i(w),E=r(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:i,className:a=``,children:o,iconNode:s,...c},l)=>{
|
|
41
|
+
/**
|
|
42
|
+
* @license lucide-react v1.24.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* @license lucide-react v1.24.0 - ISC
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the ISC license.
|
|
51
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/
|
|
53
|
+
let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=T()??{},h=i??f?Number(r??d)*24/Number(t??u):r??d;return n(`svg`,{ref:l,...S,width:t??u??S.width,height:t??u??S.height,stroke:e??p,strokeWidth:h,className:v(`lucide`,m,a),...!o&&!C(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>n(e,t)),...Array.isArray(o)?o:[o]])}),D=(e,t)=>{
|
|
54
|
+
/**
|
|
55
|
+
* @license lucide-react v1.24.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/
|
|
60
|
+
let i=r(({className:r,...i},a)=>n(E,{ref:a,iconNode:t,className:v(`lucide-${y(x(e))}`,`lucide-${e}`,r),...i}));return i.displayName=x(e),i},O=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]])
|
|
61
|
+
/**
|
|
62
|
+
* @license lucide-react v1.24.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/
|
|
67
|
+
;function k(){return import.meta.hot}var A={actions:`actions`,backdrop:`backdrop`,button:`button`,close:`close`,dialog:`dialog`,error:`error`,form:`form`,header:`header`,hint:`hint`,primary:`primary`,prompt:`prompt`,surface:`surface`,title:`title`,toast:`toast`},j=`[data-isolet-root]{color-scheme:light dark;--codex-background:#fff;--codex-border:#dee2e6;--codex-text:#212529;--codex-muted:#495057;--codex-subtle:#868e96;--codex-accent:#228be6;--codex-accent-hover:#1c7ed6;--codex-accent-soft:#e7f5ff;--codex-danger:#c92a2a;--codex-danger-soft:#fff5f5;color:var(--codex-text);font:14px/1.45 system-ui,sans-serif}.surface{pointer-events:none;position:fixed;inset:0}.backdrop{pointer-events:auto;background:#0f172a59;position:fixed;inset:0}.dialog{background:var(--codex-background);border:1px solid var(--codex-border);box-sizing:border-box;color:var(--codex-text);pointer-events:auto;border-radius:14px;width:min(560px,100vw - 32px);max-width:min(560px,100vw - 32px);margin:0;padding:20px;position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);box-shadow:0 18px 60px #0f172a47,0 2px 8px #0f172a1f}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.title{margin:0;font-size:18px}.close{appearance:none;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.close:hover{background:#f1f3f5}.close:focus-visible,.button:focus-visible,.prompt:focus-visible{outline-offset:2px;outline:3px solid #a5d8ff}.form{gap:12px;margin-top:18px;display:grid}.prompt{background:var(--codex-background);border:1px solid var(--codex-border);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:9px;width:100%;min-height:150px;padding:10px 12px}.hint{color:var(--codex-subtle);margin:0;font-size:12px}.error{background:var(--codex-danger-soft);color:var(--codex-danger);border:1px solid #ffc9c9;border-radius:8px;margin:0;padding:8px 10px}.actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.button{appearance:none;border:1px solid var(--codex-border);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:8px;justify-content:center;align-items:center;gap:7px;min-height:36px;padding:7px 12px;display:inline-flex}.button:hover{background:#f1f3f5}.primary{background:var(--codex-accent);border-color:var(--codex-accent);color:#fff}.primary:hover{background:var(--codex-accent-hover)}.button:disabled{cursor:not-allowed;opacity:.55}.toast{background:var(--codex-background);border:1px solid var(--codex-border);bottom:calc(20px + env(safe-area-inset-bottom,0px));color:var(--codex-text);pointer-events:auto;border-radius:9px;max-width:min(520px,100vw - 32px);padding:10px 14px;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #0f172a2e}
|
|
68
|
+
`;let M=!1,N=0;const P=new Set,F=4e3;function I(){H(!M)}function L(){let e=V(),t=c(U,W,G);return e?l(d(`div`,{className:A.surface,children:d(R,{onClose:()=>H(!1),visible:t})}),e):null}function R({onClose:e,visible:t}){let[n,r]=s();return a(()=>{if(!n)return;let e=setTimeout(()=>r(void 0),F);return()=>clearTimeout(e)},[n]),f(u,{children:[t?f(u,{children:[d(`button`,{"aria-label":`Close Codex task launcher`,className:A.backdrop,onClick:e}),f(`dialog`,{"aria-labelledby":`coreframe-codex-task-title`,className:A.dialog,open:!0,children:[f(`div`,{className:A.header,children:[d(`h2`,{className:A.title,id:`coreframe-codex-task-title`,children:`New Codex task`}),d(`button`,{"aria-label":`Close Codex task launcher`,className:A.close,onClick:e,type:`button`,children:d(O,{"aria-hidden":`true`,size:18})})]}),d(z,{onClose:e,onStarted:r,showToast:!1})]})]}):null,n?d(`div`,{className:A.toast,role:`status`,children:n}):null]})}function z({classNames:e=A,label:t=`Codex task prompt`,onClose:n,onStarted:r,placeholder:i=`Describe what you want Codex to do…`,showToast:a=!0}){let{error:o,pending:s,prompt:c,setPrompt:l,submit:p,toast:m}=B({onClose:n,onStarted:r});return f(u,{children:[f(`form`,{className:e.form,onSubmit:e=>{e.preventDefault(),p()},children:[d(`textarea`,{"aria-label":t,autoFocus:!0,className:e.prompt,disabled:s,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||(e.preventDefault(),p(e.metaKey||e.ctrlKey))},placeholder:i,value:c}),f(`p`,{className:e.hint,children:[`Enter opens in Codex · `,navigator.platform.includes(`Mac`)?`⌘`:`Ctrl`,`+Enter runs in background · Shift+Enter adds a line`]}),o?d(`p`,{className:e.error,children:o}):null,f(`div`,{className:e.actions,children:[d(`button`,{className:e.button,disabled:s,onClick:n,type:`button`,children:`Cancel`}),d(`button`,{className:e.button,disabled:s||!c.trim(),onClick:()=>p(!1),type:`button`,children:`Open in Codex`}),d(`button`,{className:`${e.button} ${e.primary}`,disabled:s||!c.trim(),onClick:()=>p(!0),type:`button`,children:s?`Starting…`:`Run in background`})]})]}),a&&m?d(`div`,{className:e.toast,role:`status`,children:m}):null]})}function B({onClose:t,onStarted:n}){let[r,i]=s(``),[c,l]=s(),[u,d]=s(!1),[f,p]=s(),m=k(),h=o(void 0);return a(()=>{if(!m)return;let r=e=>{if(e.requestId!==h.current)return;if(h.current=void 0,d(!1),e.error){l(e.error);return}let r=e.warning?`Codex task started. ${e.warning}`:e.openedInCodex?`Codex task started in the Codex app.`:`Codex task started.`;l(void 0),i(``),n?.(r),t(),p(r)};return m.on(e.result,r),()=>m.off(e.result,r)},[m,t,n]),a(()=>{if(!f)return;let e=setTimeout(()=>p(void 0),F);return()=>clearTimeout(e)},[f]),{error:c,pending:u,prompt:r,setPrompt:i,submit:(t=!1)=>{let n=r.trim();if(!n||u)return;if(!m){l(`The Vite HMR connection is unavailable.`);return}let i=String(++N);h.current=i,l(void 0),d(!0),m.send(e.start,{openInBackground:t,prompt:n,requestId:i})},toast:f}}function V(){let[e,t]=s(null);return a(()=>{let e=!0,n=g(`coreframe-codex-task-launcher`,document.body,{css:j,hostAttributes:{"aria-live":`polite`,id:`coreframe-codex-task-launcher`},hostStyles:{inset:`0`,pointerEvents:`none`,position:`fixed`},zIndex:2147483647});return queueMicrotask(()=>{e&&t(n.container)}),()=>{e=!1,n.host?.remove()}},[]),e}function H(e){if(M!==e){M=e;for(let e of P)e()}}function U(e){return P.add(e),()=>P.delete(e)}function W(){return M}function G(){return!1}export{D as a,O as i,z as n,g as o,I as r,L as t};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region overlay/codex-task-launcher.d.ts
|
|
2
|
+
declare function toggleCodexTaskLauncher(): void;
|
|
3
|
+
declare function CodexTaskLauncher(): import("react").ReactPortal | null;
|
|
4
|
+
type CodexTaskPromptClassNames = {
|
|
5
|
+
actions: string;
|
|
6
|
+
button: string;
|
|
7
|
+
error: string;
|
|
8
|
+
form: string;
|
|
9
|
+
hint: string;
|
|
10
|
+
primary: string;
|
|
11
|
+
prompt: string;
|
|
12
|
+
toast: string;
|
|
13
|
+
};
|
|
14
|
+
declare function CodexTaskPrompt({
|
|
15
|
+
classNames,
|
|
16
|
+
label,
|
|
17
|
+
onClose,
|
|
18
|
+
onStarted,
|
|
19
|
+
placeholder,
|
|
20
|
+
showToast
|
|
21
|
+
}: {
|
|
22
|
+
classNames?: CodexTaskPromptClassNames;
|
|
23
|
+
label?: string;
|
|
24
|
+
onClose(): void;
|
|
25
|
+
onStarted?(message: string): void;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
showToast?: boolean;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { CodexTaskLauncher, CodexTaskPrompt, CodexTaskPromptClassNames, toggleCodexTaskLauncher };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"../codex-task-launcher.js";export{n as CodexTaskLauncher,e as CodexTaskPrompt,t as toggleCodexTaskLauncher};
|
|
@@ -9,13 +9,16 @@ type ManagedDevOverlayIndicatorProps = {
|
|
|
9
9
|
};
|
|
10
10
|
type ManagedDevOverlayProps = {
|
|
11
11
|
bottomOffset?: number | string;
|
|
12
|
+
codexEnabled?: boolean;
|
|
12
13
|
debug?: boolean;
|
|
13
14
|
indicator?: ReactNode;
|
|
14
15
|
rightOffset?: number | string;
|
|
15
16
|
};
|
|
16
17
|
declare function toggleManagedDevOverlay(): void;
|
|
18
|
+
declare function openManagedDevCodex(): void;
|
|
17
19
|
declare function ManagedDevOverlay({
|
|
18
20
|
bottomOffset,
|
|
21
|
+
codexEnabled,
|
|
19
22
|
debug,
|
|
20
23
|
indicator,
|
|
21
24
|
rightOffset
|
|
@@ -27,4 +30,4 @@ declare function ManagedDevOverlayIndicator({
|
|
|
27
30
|
warningColor
|
|
28
31
|
}: ManagedDevOverlayIndicatorProps): import("react").JSX.Element;
|
|
29
32
|
//#endregion
|
|
30
|
-
export { ManagedDevOverlay, ManagedDevOverlayIndicator, ManagedDevOverlayIndicatorProps, ManagedDevOverlayProps, toggleManagedDevOverlay };
|
|
33
|
+
export { ManagedDevOverlay, ManagedDevOverlayIndicator, ManagedDevOverlayIndicatorProps, ManagedDevOverlayProps, openManagedDevCodex, toggleManagedDevOverlay };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,i as t,n,o as r}from"../codex-task-launcher.js";import{cloneElement as i,isValidElement as a,useCallback as o,useEffect as s,useRef as c,useState as l,useSyncExternalStore as u}from"react";import{createPortal as d}from"react-dom";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import{SpinnerInline as h}from"@agilek/cli-loaders";import{developmentControlsEvents as g}from"@coreframe/dev-contracts/development-controls";import{managedDevEvents as _}from"@coreframe/dev-contracts/managed-dev"
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v1.24.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
+
;const v=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),y=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),b=e(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),x=e(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),S=e(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ee=e(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),C=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]])
|
|
8
9
|
/**
|
|
9
10
|
* @license lucide-react v1.24.0 - ISC
|
|
10
11
|
*
|
|
@@ -23,89 +24,24 @@ import{SpinnerInline as e}from"@agilek/cli-loaders";import{managedDevEvents as t
|
|
|
23
24
|
* This source code is licensed under the ISC license.
|
|
24
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
26
|
*/
|
|
26
|
-
let t=w(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
27
27
|
/**
|
|
28
28
|
* @license lucide-react v1.24.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
32
|
*/
|
|
33
|
-
var E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};
|
|
34
33
|
/**
|
|
35
34
|
* @license lucide-react v1.24.0 - ISC
|
|
36
35
|
*
|
|
37
36
|
* This source code is licensed under the ISC license.
|
|
38
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
38
|
*/
|
|
40
|
-
const D=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ee=r({}),te=()=>c(ee),ne=a(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a=``,children:o,iconNode:s,...c},l)=>{
|
|
41
39
|
/**
|
|
42
40
|
* @license lucide-react v1.24.0 - ISC
|
|
43
41
|
*
|
|
44
42
|
* This source code is licensed under the ISC license.
|
|
45
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
44
|
*/
|
|
47
|
-
/**
|
|
48
|
-
* @license lucide-react v1.24.0 - ISC
|
|
49
|
-
|
|
50
|
-
* This source code is licensed under the ISC license.
|
|
51
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/
|
|
53
|
-
let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=te()??{},h=r??f?Number(n??d)*24/Number(t??u):n??d;return i(`svg`,{ref:l,...E,width:t??u??E.width,height:t??u??E.height,stroke:e??p,strokeWidth:h,className:S(`lucide`,m,a),...!o&&!D(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>i(e,t)),...Array.isArray(o)?o:[o]])}),O=(e,t)=>{
|
|
54
|
-
/**
|
|
55
|
-
* @license lucide-react v1.24.0 - ISC
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the ISC license.
|
|
58
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/
|
|
60
|
-
let n=a(({className:n,...r},a)=>i(ne,{ref:a,iconNode:t,className:S(`lucide-${C(T(e))}`,`lucide-${e}`,n),...r}));return n.displayName=T(e),n},k=O(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),A=O(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),j=O(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),M=O(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),N=O(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),re=O(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ie=O(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),P=O(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]])
|
|
61
|
-
/**
|
|
62
|
-
* @license lucide-react v1.24.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/
|
|
67
|
-
/**
|
|
68
|
-
* @license lucide-react v1.24.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/
|
|
73
|
-
/**
|
|
74
|
-
* @license lucide-react v1.24.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/
|
|
79
|
-
/**
|
|
80
|
-
* @license lucide-react v1.24.0 - ISC
|
|
81
|
-
*
|
|
82
|
-
* This source code is licensed under the ISC license.
|
|
83
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/
|
|
85
|
-
/**
|
|
86
|
-
* @license lucide-react v1.24.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/
|
|
91
|
-
/**
|
|
92
|
-
* @license lucide-react v1.24.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/
|
|
97
|
-
/**
|
|
98
|
-
* @license lucide-react v1.24.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/
|
|
103
|
-
/**
|
|
104
|
-
* @license lucide-react v1.24.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/
|
|
109
|
-
;function ae(){return import.meta.hot}var F={actionError:`actionError`,actions:`actions`,actionSuccess:`actionSuccess`,button:`button`,checkbox:`checkbox`,checkCommand:`checkCommand`,checkFailure:`checkFailure`,checkGuidance:`checkGuidance`,codexMessage:`codexMessage`,codexMessageAgent:`codexMessageAgent`,codexMessageLabel:`codexMessageLabel`,codexMessageText:`codexMessageText`,codexMessageThought:`codexMessageThought`,codexMessageUser:`codexMessageUser`,codexOutput:`codexOutput`,codexTranscript:`codexTranscript`,codexWaiting:`codexWaiting`,codexWorking:`codexWorking`,codexWorkingSpinner:`codexWorkingSpinner`,content:`content`,debugBackButton:`debugBackButton`,debugNotice:`debugNotice`,debugToolbar:`debugToolbar`,dialog:`dialog`,errorIcon:`errorIcon`,errorMessage:`errorMessage`,filePath:`filePath`,files:`files`,header:`header`,iconButton:`iconButton`,iconOnly:`iconOnly`,indicatorButton:`indicatorButton`,indicatorDot:`indicatorDot`,message:`message`,paragraph:`paragraph`,previousThoughtList:`previousThoughtList`,previousThoughts:`previousThoughts`,primary:`primary`,radiate:`radiate`,rebasedCommit:`rebasedCommit`,rebasedCommitList:`rebasedCommitList`,rebasedCommits:`rebasedCommits`,scenarioButton:`scenarioButton`,scenarioDescription:`scenarioDescription`,scenarioLabel:`scenarioLabel`,scenarioList:`scenarioList`,setupFailure:`setupFailure`,successIcon:`successIcon`,surface:`surface`,title:`title`,warning:`warning`},oe=`[data-isolet-root]{color-scheme:light dark;--oc-white:#fff;--oc-gray-0:#f8f9fa;--oc-gray-1:#f1f3f5;--oc-gray-2:#e9ecef;--oc-gray-3:#dee2e6;--oc-gray-4:#ced4da;--oc-gray-5:#adb5bd;--oc-gray-6:#868e96;--oc-gray-7:#495057;--oc-gray-8:#343a40;--oc-gray-9:#212529;--oc-red-0:#fff5f5;--oc-red-2:#ffc9c9;--oc-red-7:#f03e3e;--oc-red-9:#c92a2a;--oc-grape-0:#f8f0fc;--oc-grape-2:#eebefa;--oc-grape-7:#ae3ec9;--oc-grape-9:#862e9c;--oc-blue-0:#e7f5ff;--oc-blue-2:#a5d8ff;--oc-blue-4:#4dabf7;--oc-blue-6:#228be6;--oc-blue-7:#1c7ed6;--oc-blue-9:#1864ab;--oc-green-0:#ebfbee;--oc-green-2:#b2f2bb;--oc-green-7:#37b24d;--oc-green-9:#2b8a3e;--oc-yellow-0:#fff9db;--oc-yellow-2:#ffec99;--oc-yellow-7:#f59f00;--oc-yellow-9:#e67700;--overlay-background:var(--oc-white);--overlay-surface-subtle:var(--oc-gray-0);--overlay-surface-muted:var(--oc-gray-1);--overlay-border:var(--oc-gray-3);--overlay-border-strong:var(--oc-gray-4);--overlay-text:var(--oc-gray-9);--overlay-text-muted:var(--oc-gray-7);--overlay-text-subtle:var(--oc-gray-6);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:var(--oc-blue-0);--overlay-accent-border:var(--oc-blue-2);--overlay-accent-text:var(--oc-blue-9);--overlay-thought-soft:var(--oc-grape-0);--overlay-thought-border:var(--oc-grape-2);--overlay-thought-text:var(--oc-grape-9);--overlay-success-soft:var(--oc-green-0);--overlay-success-border:var(--oc-green-2);--overlay-success-text:var(--oc-green-9);--overlay-warning-soft:var(--oc-yellow-0);--overlay-warning-border:var(--oc-yellow-2);--overlay-warning-text:var(--oc-yellow-9);--overlay-danger-soft:var(--oc-red-0);--overlay-danger-border:var(--oc-red-2);--overlay-danger-text:var(--oc-red-9);color:var(--overlay-text);font:14px/1.45 system-ui,sans-serif}.surface{--managed-dev-bottom-offset:0px;--managed-dev-right-offset:0px}.indicatorButton{appearance:none;bottom:calc(10px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset));cursor:pointer;pointer-events:auto;height:44px;right:calc(10px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset));background:0 0;border:0;justify-content:center;align-items:center;width:44px;padding:0;display:flex;position:fixed}.indicatorButton:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:-3px}.indicatorDot{background:var(--managed-dev-indicator-color);box-shadow:0 0 0 2px var(--overlay-background), 0 0 0 3px var(--overlay-border);height:var(--managed-dev-indicator-size);width:var(--managed-dev-indicator-size);border-radius:50%;display:block;position:relative}.indicatorDot:before{border:max(1px, calc(var(--managed-dev-indicator-size) / 9)) solid var(--managed-dev-indicator-color);border-radius:inherit;content:"";animation:1.8s ease-out infinite radiate;position:absolute;inset:0}.dialog{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 18px 60px color-mix(in srgb, var(--oc-gray-9) 28%, transparent), 0 2px 8px color-mix(in srgb, var(--oc-gray-9) 12%, transparent);color:var(--overlay-text);box-sizing:border-box;height:max-content;inset:auto calc(18px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset)) calc(62px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset)) auto;pointer-events:auto;border-radius:14px;width:min(430px,100vw - 36px);max-width:min(430px,100vw - 36px);max-height:min(620px,100dvh - 80px);margin:0;padding:18px;position:fixed;overflow:auto}.dialog[open]{align-content:start;gap:12px;display:grid}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.title{margin:0;font-size:16px}.iconButton{color:inherit;cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.iconButton:hover{background:var(--overlay-surface-muted);border-radius:8px}.iconButton:focus-visible,.debugBackButton:focus-visible,.scenarioButton:focus-visible,.button:focus-visible,.message:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:2px}.content{gap:12px;display:grid}.debugNotice{background:var(--overlay-thought-soft);border:1px solid var(--overlay-thought-border);color:var(--overlay-thought-text);border-radius:10px;margin:0;padding:9px 10px;font-size:12px}.debugToolbar{color:var(--overlay-thought-text);justify-content:space-between;align-items:center;gap:10px;font-size:12px;display:flex}.debugBackButton{color:var(--overlay-thought-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-weight:650}.scenarioList{gap:7px;max-height:min(480px,100dvh - 210px);display:grid;overflow:auto}.scenarioButton{background:var(--overlay-surface-subtle);color:inherit;cursor:pointer;font:inherit;text-align:start;border:1px solid #0000;border-radius:10px;gap:3px;padding:10px;display:grid}.scenarioButton:hover{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.scenarioLabel{font-weight:650}.scenarioDescription{color:var(--overlay-text-muted);font-size:12px}.paragraph{margin:0}.codexOutput{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;white-space:pre-wrap;word-break:break-word;border-radius:10px;max-height:280px;margin:0;padding:10px;font:12px/1.5 ui-monospace,monospace;overflow:auto}.codexWorking{color:var(--overlay-text-muted);font:12px/1.5 ui-monospace,monospace}.codexWorkingSpinner{color:var(--overlay-accent)}.codexTranscript{gap:10px;max-height:360px;display:grid;overflow:auto}.codexMessage{border:1px solid #0000;border-radius:10px;gap:5px;padding:10px;display:grid}.codexMessageUser{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.codexMessageThought{background:var(--overlay-thought-soft);border-color:var(--overlay-thought-border)}.codexMessageAgent{background:var(--overlay-success-soft);border-color:var(--overlay-success-border)}.codexMessageLabel{color:var(--overlay-text-muted);letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:11px;font-weight:650}.codexMessageText,.codexWaiting{white-space:pre-wrap;word-break:break-word;margin:0;font:12px/1.5 ui-monospace,monospace}.codexWaiting{color:var(--overlay-text-subtle)}.rebasedCommits{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);border-radius:10px;gap:7px;padding:10px;display:grid}.rebasedCommitList{gap:5px;margin:0;padding:0;list-style:none;display:grid}.rebasedCommit{grid-template-columns:auto auto minmax(0,1fr);align-items:baseline;gap:7px;font-size:12px;display:grid}.rebasedCommit>svg{color:var(--overlay-success-text);align-self:center}.rebasedCommit>code{color:var(--overlay-text-muted);font-size:11px}.rebasedCommit>span{overflow-wrap:anywhere}.previousThoughts{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:10px;padding:8px 10px}.previousThoughts>summary{cursor:pointer;font-size:12px;font-weight:600}.previousThoughtList{gap:8px;padding-top:8px;display:grid}.files{gap:7px;max-height:190px;display:grid;overflow:auto}.checkbox{overflow-wrap:anywhere;align-items:start;gap:8px;display:flex}.checkbox input{accent-color:var(--overlay-accent)}.filePath{font-family:ui-monospace,monospace}.message{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:var(--overlay-text);resize:vertical;border-radius:10px;width:100%;min-height:92px;padding:10px;font-family:ui-monospace,monospace}.actions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.button{border:1px solid var(--overlay-border-strong);cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:7px 11px;transition:opacity .14s;display:inline-flex}.button:hover:not(:disabled){background:var(--overlay-surface-muted)}.primary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.primary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.button:disabled{cursor:wait;opacity:.55}.iconOnly{min-width:32px;padding:7px}.warning{color:var(--overlay-warning-text);white-space:pre-wrap}.checkFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.checkCommand{margin:0;font-family:ui-monospace,monospace;font-weight:600}.checkGuidance{margin:3px 0 0;font-size:12px}.setupFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.actionError{background:var(--overlay-warning-soft);border:1px solid var(--overlay-warning-border);color:var(--overlay-warning-text);white-space:pre-wrap;border-radius:10px;gap:10px;padding:10px;display:grid}.errorMessage{grid-template-columns:auto 1fr;align-items:start;gap:8px;display:grid}.actionSuccess{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);color:var(--overlay-success-text);border-radius:10px;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:10px;display:grid}.errorIcon,.successIcon{margin-top:1px}@media (prefers-color-scheme:dark){[data-isolet-root]{--overlay-background:var(--oc-gray-9);--overlay-surface-subtle:var(--oc-gray-8);--overlay-surface-muted:var(--oc-gray-7);--overlay-border:var(--oc-gray-7);--overlay-border-strong:var(--oc-gray-6);--overlay-text:var(--oc-gray-0);--overlay-text-muted:var(--oc-gray-4);--overlay-text-subtle:var(--oc-gray-5);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:color-mix(in srgb, var(--oc-blue-9) 32%, var(--overlay-background));--overlay-accent-border:var(--oc-blue-7);--overlay-accent-text:var(--oc-blue-2);--overlay-thought-soft:color-mix(in srgb, var(--oc-grape-9) 30%, var(--overlay-background));--overlay-thought-border:var(--oc-grape-7);--overlay-thought-text:var(--oc-grape-2);--overlay-success-soft:color-mix(in srgb, var(--oc-green-9) 30%, var(--overlay-background));--overlay-success-border:var(--oc-green-7);--overlay-success-text:var(--oc-green-2);--overlay-warning-soft:color-mix(in srgb, var(--oc-yellow-9) 24%, var(--overlay-background));--overlay-warning-border:var(--oc-yellow-7);--overlay-warning-text:var(--oc-yellow-2);--overlay-danger-soft:color-mix(in srgb, var(--oc-red-9) 30%, var(--overlay-background));--overlay-danger-border:var(--oc-red-7);--overlay-danger-text:var(--oc-red-2)}}@keyframes radiate{0%{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (width<=600px){.dialog{inset:auto calc(12px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset)) calc(62px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset)) calc(12px + env(safe-area-inset-left,0px));width:auto;max-height:calc(100dvh - 86px);padding:16px}.button{min-height:44px}.checkbox{align-items:center;min-height:44px}.iconButton{min-width:44px;min-height:44px}.iconOnly{min-width:44px}}@media (prefers-reduced-motion:reduce){.indicatorDot:before{opacity:.45;animation:none;transform:scale(1.65)}}
|
|
110
|
-
`;let I=!1,se=0;const L=new Set,R=[{description:`A clean managed checkout with no available updates.`,id:`idle`,label:`No updates`,status:{mode:`managed`,warnings:[]}},{description:`Tracked and untracked files awaiting review.`,id:`local-changes`,label:`Review local changes`,status:{draft:{fingerprint:`debug-local-changes`,tracked:!0,untracked:[`src/web/new-feature.tsx`,`src/web/new-feature.style.ts`]},mode:`managed`,warnings:[]}},{description:`Local changes with a proposed Conventional Commit message.`,id:`confirm-commit`,label:`Confirm commit`,status:{draft:{fingerprint:`debug-confirm-commit`,tracked:!0,untracked:[`src/web/new-feature.tsx`]},mode:`managed`,proposal:`feat: add the new feature`,warnings:[]}},{description:`A newer commit is available from the local dev branch.`,id:`dev-update`,label:`Local dev update`,status:{mode:`managed`,target:{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,source:`dev`,subject:`feat: update the managed preview`},warnings:[]}},{description:`A newer upstream main commit is ready to refresh.`,id:`upstream-update`,label:`Upstream update`,status:{mode:`managed`,target:{commit:`abcdef1234567890`,shortCommit:`abcdef123456`,source:`upstream`,subject:`fix: update shared project defaults`},warnings:[]}},{description:`The accepted update is currently being integrated.`,id:`busy`,label:`Busy integration`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{description:`Managed development is paused until the checkout returns to main.`,id:`paused`,label:`Paused checkout`,status:{message:`Managed synchronization is paused until the primary checkout is back on local main.`,mode:`waiting`,warnings:[]}},{description:`Managed development cannot run from the current checkout.`,id:`unavailable`,label:`Unavailable checkout`,status:{message:`Managed development only runs from the primary checkout.`,mode:`unmanaged`,warnings:[]}},{description:`A managed-development warning requiring attention.`,id:`warning`,label:`Warning`,status:{mode:`managed`,warnings:[`The remote update could not be checked. The last known project state is shown.`]}},{description:`Typechecking failed after synchronization.`,id:`failed-check`,label:`Failed check`,status:{checks:{commit:`1234567890abcdef`,commands:[{command:`pnpm typecheck`,failureId:`debug-typecheck-failure`,output:`src/web/feature.tsx(12,4): error TS2322: Type mismatch.`,status:`failed`},{command:`pnpm test`,status:`passed`}],trigger:`synchronization`},mode:`managed`,warnings:[]}},{description:`Dependency installation failed after synchronization.`,id:`dependency-failure`,label:`Dependency failure`,status:{mode:`managed`,setupFailure:{command:`pnpm install --frozen-lockfile`,commit:`1234567890abcdef`,message:`The project was synchronized, but dependency installation failed. Fix the package or lockfile issue, then retry the install.`,output:`ERR_PNPM_OUTDATED_LOCKFILE Cannot install with a frozen lockfile.`,restartRequired:!0,stage:`dependencies`},warnings:[]}},{description:`Database migration failed and can be reset.`,id:`migration-failure`,label:`Database failure`,status:{mode:`managed`,setupFailure:{command:`pnpm db migrate`,commit:`1234567890abcdef`,message:`The project was synchronized, but its database migration failed. The previous database was restored.`,output:`Migration 0012_add_project_state failed: duplicate column name.`,restartRequired:!1,stage:`migration`},warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`}],phase:`running`,requestId:`debug-codex-running`},description:`Codex is resolving conflicts with previous thoughts collapsed.`,id:`codex-running`,label:`Codex reasoning`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}],phase:`complete`,requestId:`debug-codex-message`},description:`Codex has produced its final message while synchronization finishes.`,id:`codex-message`,label:`Codex response`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[],messages:[{kind:`user`,text:`Resolve the current Git merge conflicts in src/web/root.tsx.`},{kind:`thought`,text:`The conflict could not be resolved safely.`}],phase:`error`,requestId:`debug-codex-error`},description:`The Codex-assisted conflict resolution failed.`,error:`Codex could not resolve the merge conflicts.`,id:`codex-error`,label:`Codex failure`,status:{mode:`managed`,warnings:[]}},{description:`A durable Codex completion waiting for acknowledgment.`,id:`codex-finished`,label:`Codex finished`,status:{codexCompletion:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],finalMessage:`Resolved root.tsx while preserving both the command layer and overlay mounting.`,id:`debug-completion`,messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}]},mode:`managed`,warnings:[]}},{description:`A successful synchronization result before it auto-dismisses.`,id:`success`,label:`Refresh success`,status:{mode:`managed`,warnings:[]},success:{heading:`Refresh complete`,message:`Your project is up to date.`}}];function z(){B(!I)}function B(e){if(I!==e){I=e;for(let e of L)e()}}function ce({bottomOffset:e,debug:t=!1,indicator:n,rightOffset:r}){return h(t?ue:le,{bottomOffset:e,indicator:n,rightOffset:r})}function le({bottomOffset:e,indicator:t,rightOffset:r}){let{act:i,checkFailure:a,codex:s,dismissCheckFailure:c,dismissError:u,dismissSuccess:d,error:f,status:p,success:m}=be();l(()=>{if(!m)return;let e=setTimeout(()=>{d(),B(!1)},1600);return()=>clearTimeout(e)},[d,m]);let g=p?.mode===`waiting`&&!!p.message,_=t??h(U,{}),v=o(_)&&_.type===U?n(_,{paused:g}):_;return h(V,{bottomOffset:e,indicator:Q(p,a)?v:null,rightOffset:r,children:h(W,{act:i,checkFailure:a,codex:s,dismissCheckFailure:c,dismissError:u,error:f,onClose:()=>{p?.codexCompletion&&i({id:p.codexCompletion.id,type:`acknowledge-codex`}),B(!1)},status:p,success:m})})}function V({bottomOffset:e,children:t,indicator:n,openOnMount:r=!1,rightOffset:i}){let[a,o]=d(null),s=f(xe,Se,$);l(()=>{r&&B(!0);let e=!0,t=b(`coreframe-managed-dev`,document.body,{css:oe,hostAttributes:{"aria-live":`polite`,id:`coreframe-managed-dev`},hostStyles:{inset:`0`,pointerEvents:`none`,position:`fixed`},zIndex:2147483647});return queueMicrotask(()=>{e&&o(t.container)}),()=>{e=!1,t.host?.remove()}},[r]);let c={"--managed-dev-bottom-offset":H(e),"--managed-dev-right-offset":H(i)};return a?p(g(`div`,{className:F.surface,style:c,children:[n,s?t:null]}),a):null}function ue({bottomOffset:e,indicator:t,rightOffset:r}){let[i,a]=d(),[s,c]=d(),l=R.find(({id:e})=>e===i),u=e=>{a(e),c(void 0)},f=async e=>{if(e.type===`acknowledge-codex`){u(void 0);return}c(ye(e))},p=t??h(U,{});return h(V,{bottomOffset:e,indicator:o(p)&&p.type===U?n(p,{paused:l?.status.mode===`waiting`}):p,openOnMount:!0,rightOffset:r,children:l?h(W,{act:f,checkFailure:Z(l.status),codex:l.codex,dismissCheckFailure:()=>void 0,dismissError:()=>void 0,error:l.error,onBack:()=>u(void 0),onClose:()=>B(!1),status:l.status,success:s??l.success},l.id):h(de,{onClose:()=>B(!1),onSelect:e=>u(e)})})}function H(e){return typeof e==`number`?`${e}px`:e??`0px`}function de({onClose:e,onSelect:t}){return g(`dialog`,{"aria-labelledby":`coreframe-managed-title`,className:F.dialog,id:`coreframe-managed-dev-dialog`,open:!0,children:[g(`div`,{className:F.header,children:[h(`h2`,{className:F.title,id:`coreframe-managed-title`,children:`Managed dev overlay scenarios`}),h(`button`,{"aria-label":`Close managed development`,className:F.iconButton,onClick:e,type:`button`,children:h(P,{"aria-hidden":`true`,size:18})})]}),h(`p`,{className:F.debugNotice,children:`Debug preview. Project actions are simulated locally.`}),h(`div`,{className:F.scenarioList,children:R.map(e=>g(`button`,{className:F.scenarioButton,onClick:()=>t(e.id),type:`button`,children:[h(`span`,{className:F.scenarioLabel,children:e.label}),h(`span`,{className:F.scenarioDescription,children:e.description})]},e.id))})]})}function U({color:e=`#228be6`,paused:t=!1,size:n=14,warningColor:r=`#fd7e14`}){let i=f(xe,Se,$),a={"--managed-dev-indicator-color":t?r:e,"--managed-dev-indicator-size":typeof n==`number`?`${n}px`:n};return h(`button`,{"aria-controls":`coreframe-managed-dev-dialog`,"aria-expanded":i,"aria-label":`${i?`Hide`:`Show`} Coreframe managed development`,className:F.indicatorButton,onClick:z,style:a,type:`button`,children:h(`span`,{className:F.indicatorDot})})}function W({act:e,checkFailure:t,codex:n,dismissCheckFailure:r,dismissError:i,error:a,onBack:o,onClose:s,status:c,success:f}){let[p,_]=d({value:``}),[v,y]=d(()=>({paths:new Set})),b=u(null),x=c?.codexCompletion,S=c?.draft,C=c?.target,w=!x&&!f&&!n,T=v.fingerprint===S?.fingerprint?v.paths:new Set(S?.untracked??[]),E=p.fingerprint===S?.fingerprint&&p.proposal===c?.proposal?p.value:c?.proposal??``,D=!!(S?.untracked.length&&S.untracked.every(e=>T.has(e)));return l(()=>{let e=b.current;e&&n?.phase===`running`&&(e.scrollTop=e.scrollHeight)},[n]),t?g(`dialog`,{"aria-labelledby":`coreframe-managed-title`,className:F.dialog,id:`coreframe-managed-dev-dialog`,open:!0,children:[g(`div`,{className:F.header,children:[h(`h2`,{className:F.title,id:`coreframe-managed-title`,children:`Managed development check failed`}),h(`button`,{"aria-label":`Close managed development`,className:F.iconButton,onClick:s,type:`button`,children:h(P,{"aria-hidden":`true`,size:18})})]}),g(`div`,{className:F.content,children:[o?g(`div`,{className:F.debugToolbar,children:[h(`button`,{className:F.debugBackButton,onClick:o,type:`button`,children:`All scenarios`}),h(`span`,{children:`Debug preview · actions are simulated`})]}):null,h(`div`,{className:F.checkFailure,role:`alert`,children:g(`div`,{className:F.checkMessage,children:[g(`p`,{className:F.checkCommand,children:[t.check.command,` failed`]}),h(`p`,{className:F.checkGuidance,children:ge(t)}),h(`p`,{className:F.checkGuidance,children:`Copy the output and paste it into your agent orchestration tool.`})]})}),g(q,{children:[h(Y,{ariaLabel:`Dismiss error`,icon:P,iconOnly:!0,onClick:()=>r(t),children:`Dismiss`}),h(Y,{ariaLabel:`Copy output for ${t.check.command}`,icon:A,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(t.check.output??``),children:`Copy output`})]})]})]}):g(`dialog`,{"aria-labelledby":`coreframe-managed-title`,className:F.dialog,id:`coreframe-managed-dev-dialog`,open:!0,children:[g(`div`,{className:F.header,children:[h(`h2`,{className:F.title,id:`coreframe-managed-title`,children:x?`Codex conflict resolution finished`:f?.heading??(n?.phase===`complete`?`Finishing synchronization…`:n?.phase===`error`?`Conflict resolution failed.`:n?`Resolving conflicts with Codex…`:me(c))}),h(`button`,{"aria-label":`Close managed development`,className:F.iconButton,onClick:s,type:`button`,children:h(P,{"aria-hidden":`true`,size:18})})]}),g(`div`,{className:F.content,children:[o?g(`div`,{className:F.debugToolbar,children:[h(`button`,{className:F.debugBackButton,onClick:o,type:`button`,children:`All scenarios`}),h(`span`,{children:`Debug preview · actions are simulated`})]}):null,f&&!x?g(`div`,{className:F.actionSuccess,role:`status`,children:[h(k,{"aria-hidden":`true`,className:F.successIcon,size:18}),h(`p`,{className:F.paragraph,children:f.message})]}):null,a?g(m,{children:[h(`div`,{className:F.actionError,role:`alert`,children:h(J,{children:a})}),h(q,{children:h(Y,{ariaLabel:`Dismiss error`,icon:P,iconOnly:!0,onClick:i,children:`Dismiss`})})]}):null,x||!f&&n?h(fe,{commits:x?.commits??n?.commits??[],completion:x,messages:x?.messages??n?.messages??[],outputRef:b,working:n?.phase===`running`}):w&&c?.setupFailure?g(m,{children:[g(`div`,{className:F.setupFailure,role:`alert`,children:[h(J,{children:c.setupFailure.message}),h(`pre`,{className:F.codexOutput,children:c.setupFailure.output})]}),g(q,{children:[h(Y,{ariaLabel:`Dismiss error`,icon:P,iconOnly:!0,onClick:s,children:`Dismiss`}),h(Y,{ariaLabel:`Copy diagnostics`,busy:c.busy,icon:A,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(ve(c.setupFailure)),children:`Copy diagnostics`}),c.setupFailure.stage===`dependencies`?h(Y,{ariaLabel:`Retry install`,busy:c.busy,icon:M,iconOnly:!0,onClick:()=>void e({type:`retry-install`}),primary:!0,children:`Retry install`}):h(Y,{busy:c.busy,icon:N,onClick:()=>{window.confirm(`Reset the local database? This permanently deletes its current data, then reapplies migrations and seed scripts.`)&&e({type:`reset-database`})},primary:!0,children:`Reset database`})]})]}):w?h(`p`,{className:F.paragraph,children:c?c.busy||c.message||he(c):`Checking managed development status…`}):null,x&&!a?h(q,{children:h(Y,{busy:c?.busy,icon:k,onClick:()=>void e({id:x.id,type:`acknowledge-codex`}),primary:!0,children:`Continue`})}):null,w&&c?.mode===`waiting`&&c.message?g(`p`,{className:F.paragraph,children:[`To re-enable managed development, run `,h(`code`,{children:`git switch main`}),` in the primary checkout. Synchronization will resume automatically.`]}):null,w&&C&&!S?g(`p`,{className:F.paragraph,children:[C.subject,` (`,C.shortCommit,`)`]}):null,w?c?.warnings.map((e,t)=>h(`p`,{className:`${F.paragraph} ${F.warning}`,children:e},`${t}-${e}`)):null,w&&S?g(m,{children:[g(`div`,{className:F.files,children:[S.untracked.map(e=>h(K,{checked:T.has(e),label:h(`span`,{className:F.filePath,children:e}),onChange:t=>y(()=>{let n=new Set(T);return t?n.add(e):n.delete(e),{fingerprint:S.fingerprint,paths:n}})},e)),S.untracked.length>0?h(K,{checked:D,label:`Include all untracked files`,onChange:e=>y({fingerprint:S.fingerprint,paths:e?new Set(S.untracked):new Set})}):null]}),c.proposal===void 0?g(q,{children:[C?h(Y,{busy:c.busy,icon:N,onClick:()=>void e({type:`reject`}),children:`Reject`}):null,h(Y,{busy:c.busy,icon:re,onClick:()=>void e({type:`message`,fingerprint:S.fingerprint,untracked:[...T]}),primary:!0,children:`Generate commit message`})]}):g(m,{children:[h(`textarea`,{"aria-label":`Commit message`,className:F.message,onChange:e=>_({fingerprint:S.fingerprint,proposal:c.proposal,value:e.target.value}),value:E}),g(q,{children:[C?h(Y,{busy:c.busy,icon:N,onClick:()=>void e({type:`reject`}),children:`Reject`}):null,h(Y,{busy:c.busy,icon:j,onClick:()=>{e(C?{type:`apply`,target:C.commit,fingerprint:S.fingerprint,untracked:[...T],message:E}:{type:`commit`,fingerprint:S.fingerprint,untracked:[...T],message:E})},primary:!0,children:C?`Commit and refresh`:`Commit changes`})]})]})]}):w&&C?h(q,{children:h(Y,{busy:c.busy,icon:M,onClick:()=>void e({type:`prepare`,target:C.commit}),primary:!0,children:C.source===`upstream`?`Refresh`:String(C.source)===`dev`?`Sync with dev`:`Sync with main`})}):null]})]})}function fe({commits:t,completion:n,messages:r,outputRef:i,working:a}){let o=[...r].reverse().find(e=>e.kind===`user`),s=[...r].reverse().find(e=>e.kind!==`user`),c=r.filter(e=>e.kind===`thought`&&e!==s),l=n?{kind:`agent`,text:n.finalMessage}:s;return g(m,{children:[a?h(`div`,{className:F.codexWorking,children:h(e,{className:F.codexWorkingSpinner,label:`Codex is resolving conflicts`,children:`Working...`})}):null,g(`div`,{"aria-live":n?void 0:`polite`,className:F.codexTranscript,ref:i,role:`log`,children:[t.length>0?h(pe,{commits:t}):null,o?h(G,{message:o}):null,c.length>0?g(`details`,{className:F.previousThoughts,children:[g(`summary`,{children:[`Previous thoughts (`,c.length,`)`]}),h(`div`,{className:F.previousThoughtList,children:c.map((e,t)=>h(G,{message:e},`thought-${t}`))})]}):null,l?h(G,{message:l}):h(`p`,{className:F.codexWaiting,children:`Waiting for Codex output…`})]})]})}function pe({commits:e}){return g(`section`,{className:F.rebasedCommits,children:[g(`h3`,{className:F.codexMessageLabel,children:[`Rebased commits (`,e.length,`)`]}),h(`ul`,{className:F.rebasedCommitList,children:e.map(e=>g(`li`,{className:F.rebasedCommit,children:[h(j,{"aria-hidden":`true`,size:14}),h(`code`,{children:e.shortCommit}),h(`span`,{children:e.subject})]},e.commit))})]})}function G({message:e}){let t=e.kind===`user`?`Request`:e.kind===`thought`?`Codex thought`:`Codex`,n=e.kind===`user`?F.codexMessageUser:e.kind===`thought`?F.codexMessageThought:F.codexMessageAgent;return g(`section`,{className:`${F.codexMessage} ${n}`,children:[h(`h3`,{className:F.codexMessageLabel,children:t}),h(`p`,{className:F.codexMessageText,children:e.text})]})}function K({checked:e,label:t,onChange:n}){return g(`label`,{className:F.checkbox,children:[h(`input`,{checked:e,onChange:e=>n(e.target.checked),type:`checkbox`}),t]})}function q({children:e}){return h(`div`,{className:F.actions,children:e})}function J({children:e}){return g(`div`,{className:F.errorMessage,children:[h(ie,{"aria-hidden":`true`,className:F.errorIcon,size:18}),h(`p`,{className:F.paragraph,children:e})]})}function Y({ariaLabel:e,busy:t,children:n,icon:r,iconOnly:i=!1,onClick:a,primary:o=!1}){return g(`button`,{"aria-label":e,"aria-busy":!!t,className:`${F.button} ${i?F.iconOnly:``} ${o?F.primary:``}`,disabled:!!t,onClick:a,title:i?e:void 0,type:`button`,children:[r?h(r,{"aria-hidden":`true`,size:16}):null,i?null:n]})}function me(e){return e?e.mode===`waiting`&&e.message?`Managed development paused`:e.mode===`unmanaged`?`Managed development unavailable`:e.mode===`error`?`Managed development stopped`:e.setupFailure?.stage===`dependencies`?`Dependency installation failed`:e.setupFailure?.stage===`migration`?`Database setup failed`:e.draft?e.proposal===void 0?`Review local changes`:`Confirm your commit`:e.target?.source===`upstream`?`Refresh from upstream`:String(e.target?.source)===`dev`?`Sync with local dev`:e.target?`Sync with local main`:e.checks?.commands.some(e=>e.status===`failed`)?`Managed development checks failed`:e.warnings.length>0?`Managed development warning`:`Managed development status`:`Checking managed development`}function he(e){return e.mode===`waiting`?`Waiting for managed development to start.`:e.mode===`unmanaged`?`Managed synchronization is unavailable for this session.`:e.mode===`error`?`Managed synchronization stopped.`:e.draft&&!e.target?`Commit the local changes before managed development checks for updates.`:e.target&&e.target.source!==`upstream`?String(e.target?.source)===`dev`?`New changes are available in local dev.`:`New changes are available in local main.`:e.target?`A newer main commit is ready.`:`Managed development is active. No updates are available.`}function X(e){return e.mode!==`managed`||!!(e.busy||e.codexCompletion||e.draft||e.message||e.setupFailure||e.target||e.warnings.length>0)}function Z(e){if(!e?.checks||X(e))return;let t=e.checks.commands.find(e=>e.status===`failed`&&!e.dismissed);return t?{check:t,commit:e.checks.commit,trigger:e.checks.trigger}:void 0}function ge({commit:e,trigger:t}){let n=e.slice(0,12);return t===`dependency-recovery`?`Managed dev ran this check after dependency installation recovered for commit ${n}.`:t===`database-recovery`?`Managed dev ran this check after database setup recovered for commit ${n}.`:`Managed dev ran this check after synchronizing the accepted update at commit ${n}.`}function Q(e,t=Z(e)){return e?e.mode===`waiting`?!!e.message:!!(t||X(e)):!1}function _e(e){let t=new Set(e.filter(e=>e.kind===`user`)),n=[...t].reduce((e,t)=>e+t.text.length,0),r=!1;for(let i of[...e].reverse())if(i.kind!==`user`){if(n+i.text.length>1e5&&r)break;t.add(i),r=!0,n+=i.text.length}return e.filter(e=>t.has(e))}function ve(e){return[e.message,`Commit: ${e.commit}`,`Command: ${e.command}`,``,e.output].join(`
|
|
111
|
-
`)}function ye(e){return e.type===`apply`?{heading:`Refresh complete`,message:`Your changes were committed and the project is up to date.`}:e.type===`prepare`?{heading:`Refresh complete`,message:`Your project is up to date.`}:e.type===`commit`?{heading:`Changes committed`,message:`Your local changes are committed. Checking for managed development updates…`,preserveDuringStatus:!0}:e.type===`reject`?{heading:`Update dismissed`,message:`No further action is required.`}:e.type===`retry-install`?{heading:`Setup complete`,message:`Dependencies installed and the project is ready.`}:e.type===`reset-database`?{heading:`Database reset complete`,message:`The database was recreated, migrated, and seeded.`}:{heading:`Action complete`,message:`No further action is required.`}}function be(){let[e,n]=d(),[r,i]=d(),[a,o]=d(),[c,f]=d(),p=u(void 0),m=u(void 0),h=u(new Map),g=ae();l(()=>{if(!g)return;let e=h.current,r=({status:t})=>{let r=Q(t);n(t),t.codexCompletion&&m.current!==t.codexCompletion.id&&(m.current=t.codexCompletion.id,B(!0)),!r&&[...e.values()].some(e=>e.type===`acknowledge-codex`)&&B(!1),r&&o(e=>e?.preserveDuringStatus?e:void 0)},a=t=>{let r=e.get(t.requestId);r&&(e.delete(t.requestId),t.status&&n(t.status),t.error?(i(t.error),r.type===`acknowledge-codex`&&B(!0)):t.status?.codexCompletion?(m.current=t.status.codexCompletion.id,p.current=void 0,f(void 0),o(void 0),B(!0)):r.type===`acknowledge-codex`||r.type===`dismiss-check`?(o(void 0),t.status&&!Q(t.status)&&B(!1)):t.status&&(r.type===`commit`||!Q(t.status))&&o(ye(r)))},s=t=>{if(!e.has(t.requestId))return;if(t.phase===`start`){let e={commits:t.commits,messages:[t.message],phase:`running`,requestId:t.requestId};p.current=e,f(e),B(!0);return}let n=p.current;if(!n||n.requestId!==t.requestId)return;let r=t.phase===`message`?{...n,messages:_e([...n.messages,t.message])}:t.phase===`complete`?{commits:n.commits,messages:n.messages,phase:`complete`,requestId:t.requestId}:t.phase===`progress`?{...n,commits:t.commits}:{...n,phase:`error`};p.current=r,f(r)};return g.on(t.status,r),g.on(t.actionResult,a),g.on(t.codex,s),g.send(t.statusRequest),()=>{e.clear(),p.current=void 0,g.off(t.status,r),g.off(t.actionResult,a),g.off(t.codex,s)}},[g]);let _=async e=>{if(e.type===`acknowledge-codex`&&(m.current=e.id),i(void 0),o(void 0),p.current=void 0,f(void 0),!g){i(`The Vite HMR connection is unavailable.`);return}let n=String(++se);h.current.set(n,e),g.send(t.action,{action:e,requestId:n})},v=s(()=>o(void 0),[]);return{act:_,checkFailure:!r&&!a&&!c&&!e?.codexCompletion?Z(e):void 0,codex:c,dismissCheckFailure:e=>{if(!e.check.failureId){B(!1);return}_({failureId:e.check.failureId,type:`dismiss-check`})},dismissError:()=>i(void 0),dismissSuccess:v,error:r,status:e,success:a}}function xe(e){return L.add(e),()=>L.delete(e)}function Se(){return I}function $(){return!1}export{ce as ManagedDevOverlay,U as ManagedDevOverlayIndicator,z as toggleManagedDevOverlay};
|
|
45
|
+
;function w(){return import.meta.hot}function T(){return import.meta.hot}var E={actionError:`actionError`,actions:`actions`,actionSuccess:`actionSuccess`,button:`button`,checkbox:`checkbox`,checkCommand:`checkCommand`,checkFailure:`checkFailure`,checkGuidance:`checkGuidance`,codexActions:`codexActions`,codexButton:`codexButton`,codexError:`codexError`,codexForm:`codexForm`,codexHint:`codexHint`,codexHistory:`codexHistory`,codexHistoryList:`codexHistoryList`,codexMessage:`codexMessage`,codexMessageAge:`codexMessageAge`,codexMessageAgent:`codexMessageAgent`,codexMessageHeader:`codexMessageHeader`,codexMessageLabel:`codexMessageLabel`,codexMessageText:`codexMessageText`,codexMessageThought:`codexMessageThought`,codexMessageUser:`codexMessageUser`,codexOutput:`codexOutput`,codexPrimary:`codexPrimary`,codexPrompt:`codexPrompt`,codexToast:`codexToast`,codexTranscript:`codexTranscript`,codexWaiting:`codexWaiting`,codexWorking:`codexWorking`,codexWorkingSpinner:`codexWorkingSpinner`,content:`content`,debugBackButton:`debugBackButton`,debugNotice:`debugNotice`,debugToolbar:`debugToolbar`,dialog:`dialog`,drawerBody:`drawerBody`,errorIcon:`errorIcon`,errorMessage:`errorMessage`,filePath:`filePath`,files:`files`,header:`header`,iconButton:`iconButton`,iconOnly:`iconOnly`,indicatorButton:`indicatorButton`,indicatorDot:`indicatorDot`,message:`message`,paragraph:`paragraph`,primary:`primary`,radiate:`radiate`,rebasedCommit:`rebasedCommit`,rebasedCommitList:`rebasedCommitList`,rebasedCommits:`rebasedCommits`,scenarioButton:`scenarioButton`,scenarioDescription:`scenarioDescription`,scenarioLabel:`scenarioLabel`,scenarioList:`scenarioList`,section:`section`,sectionDescription:`sectionDescription`,sectionHeading:`sectionHeading`,sectionLink:`sectionLink`,sectionTitle:`sectionTitle`,setupFailure:`setupFailure`,successIcon:`successIcon`,surface:`surface`,title:`title`,warning:`warning`},D=`[data-isolet-root]{color-scheme:light dark;--oc-white:#fff;--oc-gray-0:#f8f9fa;--oc-gray-1:#f1f3f5;--oc-gray-2:#e9ecef;--oc-gray-3:#dee2e6;--oc-gray-4:#ced4da;--oc-gray-5:#adb5bd;--oc-gray-6:#868e96;--oc-gray-7:#495057;--oc-gray-8:#343a40;--oc-gray-9:#212529;--oc-red-0:#fff5f5;--oc-red-2:#ffc9c9;--oc-red-7:#f03e3e;--oc-red-9:#c92a2a;--oc-grape-0:#f8f0fc;--oc-grape-2:#eebefa;--oc-grape-7:#ae3ec9;--oc-grape-9:#862e9c;--oc-blue-0:#e7f5ff;--oc-blue-2:#a5d8ff;--oc-blue-4:#4dabf7;--oc-blue-6:#228be6;--oc-blue-7:#1c7ed6;--oc-blue-9:#1864ab;--oc-green-0:#ebfbee;--oc-green-2:#b2f2bb;--oc-green-7:#37b24d;--oc-green-9:#2b8a3e;--oc-yellow-0:#fff9db;--oc-yellow-2:#ffec99;--oc-yellow-7:#f59f00;--oc-yellow-9:#e67700;--overlay-background:var(--oc-white);--overlay-surface-subtle:var(--oc-gray-0);--overlay-surface-muted:var(--oc-gray-1);--overlay-border:var(--oc-gray-3);--overlay-border-strong:var(--oc-gray-4);--overlay-text:var(--oc-gray-9);--overlay-text-muted:var(--oc-gray-7);--overlay-text-subtle:var(--oc-gray-6);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:var(--oc-blue-0);--overlay-accent-border:var(--oc-blue-2);--overlay-accent-text:var(--oc-blue-9);--overlay-thought-soft:var(--oc-grape-0);--overlay-thought-border:var(--oc-grape-2);--overlay-thought-text:var(--oc-grape-9);--overlay-success-soft:var(--oc-green-0);--overlay-success-border:var(--oc-green-2);--overlay-success-text:var(--oc-green-9);--overlay-warning-soft:var(--oc-yellow-0);--overlay-warning-border:var(--oc-yellow-2);--overlay-warning-text:var(--oc-yellow-9);--overlay-danger-soft:var(--oc-red-0);--overlay-danger-border:var(--oc-red-2);--overlay-danger-text:var(--oc-red-9);color:var(--overlay-text);font:14px/1.45 system-ui,sans-serif}.surface{--managed-dev-bottom-offset:0px;--managed-dev-right-offset:0px}.indicatorButton{appearance:none;bottom:calc(10px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset));cursor:pointer;pointer-events:auto;height:44px;right:calc(10px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset));background:0 0;border:0;justify-content:center;align-items:center;width:44px;padding:0;display:flex;position:fixed}.indicatorButton:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:-3px}.indicatorDot{background:var(--managed-dev-indicator-color);box-shadow:inset 0 0 0 .5px color-mix(in srgb, var(--overlay-border) 30%, transparent);height:var(--managed-dev-indicator-size);width:var(--managed-dev-indicator-size);border-radius:50%;display:block;position:relative}.indicatorDot:before{border:max(1px, calc(var(--managed-dev-indicator-size) / 9)) solid var(--managed-dev-indicator-color);border-radius:inherit;content:"";animation:1.8s ease-out infinite radiate;position:absolute;inset:0}.dialog{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 18px 60px color-mix(in srgb, var(--oc-gray-9) 28%, transparent), 0 2px 8px color-mix(in srgb, var(--oc-gray-9) 12%, transparent);color:var(--overlay-text);box-sizing:border-box;height:auto;inset:0 calc(18px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset)) var(--managed-dev-bottom-offset) auto;pointer-events:auto;border-radius:16px 0 0 16px;width:min(520px,100vw - 18px);max-width:min(520px,100vw - 18px);max-height:none;margin:0;padding:20px;position:fixed;overflow:hidden}.dialog[open]{flex-direction:column;gap:12px;display:flex}.drawerBody{gap:16px;min-height:0;display:grid;overflow:auto}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.title{margin:0;font-size:16px}.iconButton{color:inherit;cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.iconButton:hover{background:var(--overlay-surface-muted);border-radius:8px}.iconButton:focus-visible,.debugBackButton:focus-visible,.scenarioButton:focus-visible,.sectionLink:focus-visible,.button:focus-visible,.message:focus-visible,.codexButton:focus-visible,.codexPrompt:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:2px}.content{gap:12px;display:grid}.section{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:12px;gap:12px;padding:14px;display:grid}.sectionHeading{justify-content:space-between;align-items:start;gap:12px;display:flex}.sectionTitle{margin:0;font-size:13px}.sectionDescription{color:var(--overlay-text-muted);margin:3px 0 0;font-size:12px}.sectionLink{color:var(--overlay-accent-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-size:12px}.debugNotice{background:var(--overlay-thought-soft);border:1px solid var(--overlay-thought-border);color:var(--overlay-thought-text);border-radius:10px;margin:0;padding:9px 10px;font-size:12px}.debugToolbar{color:var(--overlay-thought-text);justify-content:space-between;align-items:center;gap:10px;font-size:12px;display:flex}.debugBackButton{color:var(--overlay-thought-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-weight:650}.scenarioList{gap:7px;max-height:min(480px,100dvh - 210px);display:grid;overflow:auto}.scenarioButton{background:var(--overlay-surface-subtle);color:inherit;cursor:pointer;font:inherit;text-align:start;border:1px solid #0000;border-radius:10px;gap:3px;padding:10px;display:grid}.scenarioButton:hover{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.scenarioLabel{font-weight:650}.scenarioDescription{color:var(--overlay-text-muted);font-size:12px}.paragraph{margin:0}.codexOutput{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;white-space:pre-wrap;word-break:break-word;border-radius:10px;max-height:280px;margin:0;padding:10px;font:12px/1.5 ui-monospace,monospace;overflow:auto}.codexForm{gap:12px;display:grid}.codexPrompt{background:var(--overlay-background);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:10px;width:100%;min-height:130px;padding:10px 12px}.codexHint{color:var(--overlay-text-subtle);margin:0;font-size:12px}.codexError{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:9px;margin:0;padding:8px 10px}.codexActions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.codexButton{border:1px solid var(--overlay-border-strong);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;min-height:36px;padding:7px 11px;display:inline-flex}.codexButton:hover:not(:disabled){background:var(--overlay-surface-muted)}.codexPrimary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.codexPrimary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.codexButton:disabled{cursor:wait;opacity:.55}.codexToast{color:var(--overlay-success-text);font-size:12px}.codexWorking{color:var(--overlay-text-muted);font:12px/1.5 ui-monospace,monospace}.codexWorkingSpinner{color:var(--overlay-accent)}.codexTranscript{gap:10px;max-height:360px;display:grid;overflow:auto}.codexMessage{border:1px solid #0000;border-radius:10px;gap:5px;padding:10px;display:grid}.codexMessageUser{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.codexMessageThought{background:var(--overlay-thought-soft);border-color:var(--overlay-thought-border)}.codexMessageAgent{background:var(--overlay-success-soft);border-color:var(--overlay-success-border)}.codexMessageHeader{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.codexMessageLabel{color:var(--overlay-text-muted);letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:11px;font-weight:650}.codexMessageAge{color:var(--overlay-text-subtle);white-space:nowrap;font-size:11px}.codexMessageText,.codexWaiting{white-space:pre-wrap;word-break:break-word;margin:0;font:12px/1.5 ui-monospace,monospace}.codexWaiting{color:var(--overlay-text-subtle)}.rebasedCommits{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);border-radius:10px;gap:7px;padding:10px;display:grid}.rebasedCommitList{gap:5px;margin:0;padding:0;list-style:none;display:grid}.rebasedCommit{grid-template-columns:auto auto minmax(0,1fr);align-items:baseline;gap:7px;font-size:12px;display:grid}.rebasedCommit>svg{color:var(--overlay-success-text);align-self:center}.rebasedCommit>code{color:var(--overlay-text-muted);font-size:11px}.rebasedCommit>span{overflow-wrap:anywhere}.codexHistory{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:10px;padding:8px 10px}.codexHistory>summary{cursor:pointer;font-size:12px;font-weight:600}.codexHistoryList{gap:8px;padding-top:8px;display:grid}.files{gap:7px;max-height:190px;display:grid;overflow:auto}.checkbox{overflow-wrap:anywhere;align-items:start;gap:8px;display:flex}.checkbox input{accent-color:var(--overlay-accent)}.filePath{font-family:ui-monospace,monospace}.message{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:var(--overlay-text);resize:vertical;border-radius:10px;width:100%;min-height:92px;padding:10px;font-family:ui-monospace,monospace}.actions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.button{border:1px solid var(--overlay-border-strong);cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:7px 11px;transition:opacity .14s;display:inline-flex}.button:hover:not(:disabled){background:var(--overlay-surface-muted)}.primary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.primary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.button:disabled{cursor:wait;opacity:.55}.iconOnly{min-width:32px;padding:7px}.warning{color:var(--overlay-warning-text);white-space:pre-wrap}.checkFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.checkCommand{margin:0;font-family:ui-monospace,monospace;font-weight:600}.checkGuidance{margin:3px 0 0;font-size:12px}.setupFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.actionError{background:var(--overlay-warning-soft);border:1px solid var(--overlay-warning-border);color:var(--overlay-warning-text);white-space:pre-wrap;border-radius:10px;gap:10px;padding:10px;display:grid}.errorMessage{grid-template-columns:auto 1fr;align-items:start;gap:8px;display:grid}.actionSuccess{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);color:var(--overlay-success-text);border-radius:10px;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:10px;display:grid}.errorIcon,.successIcon{margin-top:1px}@media (prefers-color-scheme:dark){[data-isolet-root]{--overlay-background:var(--oc-gray-9);--overlay-surface-subtle:var(--oc-gray-8);--overlay-surface-muted:var(--oc-gray-7);--overlay-border:var(--oc-gray-7);--overlay-border-strong:var(--oc-gray-6);--overlay-text:var(--oc-gray-0);--overlay-text-muted:var(--oc-gray-4);--overlay-text-subtle:var(--oc-gray-5);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:color-mix(in srgb, var(--oc-blue-9) 32%, var(--overlay-background));--overlay-accent-border:var(--oc-blue-7);--overlay-accent-text:var(--oc-blue-2);--overlay-thought-soft:color-mix(in srgb, var(--oc-grape-9) 30%, var(--overlay-background));--overlay-thought-border:var(--oc-grape-7);--overlay-thought-text:var(--oc-grape-2);--overlay-success-soft:color-mix(in srgb, var(--oc-green-9) 30%, var(--overlay-background));--overlay-success-border:var(--oc-green-7);--overlay-success-text:var(--oc-green-2);--overlay-warning-soft:color-mix(in srgb, var(--oc-yellow-9) 24%, var(--overlay-background));--overlay-warning-border:var(--oc-yellow-7);--overlay-warning-text:var(--oc-yellow-2);--overlay-danger-soft:color-mix(in srgb, var(--oc-red-9) 30%, var(--overlay-background));--overlay-danger-border:var(--oc-red-7);--overlay-danger-text:var(--oc-red-2)}}@keyframes radiate{0%{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (width<=600px){.dialog{max-width:none;padding:calc(16px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));border-radius:0;width:auto;inset:0}.button,.codexButton{min-height:44px}.checkbox{align-items:center;min-height:44px}.iconButton{min-width:44px;min-height:44px}.iconOnly{min-width:44px}}@media (prefers-reduced-motion:reduce){.indicatorDot:before{opacity:.45;animation:none;transform:scale(1.65)}}
|
|
46
|
+
`;let O=!1,k=0,A=0;const j=new Set;let M=!1;const N=new Set,P=[{description:`A clean managed checkout with no available updates.`,id:`idle`,label:`No updates`,status:{mode:`managed`,warnings:[]}},{description:`Tracked and untracked files awaiting review.`,id:`local-changes`,label:`Review local changes`,status:{draft:{fingerprint:`debug-local-changes`,tracked:!0,untracked:[`src/web/new-feature.tsx`,`src/web/new-feature.style.ts`]},mode:`managed`,warnings:[]}},{description:`Local changes with a proposed Conventional Commit message.`,id:`confirm-commit`,label:`Confirm commit`,status:{draft:{fingerprint:`debug-confirm-commit`,tracked:!0,untracked:[`src/web/new-feature.tsx`]},mode:`managed`,proposal:`feat: add the new feature`,warnings:[]}},{description:`A newer commit is available from the local dev branch.`,id:`dev-update`,label:`Local dev update`,status:{mode:`managed`,target:{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,source:`dev`,subject:`feat: update the managed preview`},warnings:[]}},{description:`A newer upstream main commit is ready to refresh.`,id:`upstream-update`,label:`Upstream update`,status:{mode:`managed`,target:{commit:`abcdef1234567890`,shortCommit:`abcdef123456`,source:`upstream`,subject:`fix: update shared project defaults`},warnings:[]}},{description:`The accepted update is currently being integrated.`,id:`busy`,label:`Busy integration`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{description:`Managed development is paused until the checkout returns to main.`,id:`paused`,label:`Paused checkout`,status:{message:`Managed synchronization is paused until the primary checkout is back on local main.`,mode:`waiting`,warnings:[]}},{description:`Managed development cannot run from the current checkout.`,id:`unavailable`,label:`Unavailable checkout`,status:{message:`Managed development only runs from the primary checkout.`,mode:`unmanaged`,warnings:[]}},{description:`A managed-development warning requiring attention.`,id:`warning`,label:`Warning`,status:{mode:`managed`,warnings:[`The remote update could not be checked. The last known project state is shown.`]}},{description:`Typechecking failed after synchronization.`,id:`failed-check`,label:`Failed check`,status:{checks:{commit:`1234567890abcdef`,commands:[{command:`pnpm typecheck`,failureId:`debug-typecheck-failure`,output:`src/web/feature.tsx(12,4): error TS2322: Type mismatch.`,status:`failed`},{command:`pnpm test`,status:`passed`}],trigger:`synchronization`},mode:`managed`,warnings:[]}},{description:`Dependency installation failed after synchronization.`,id:`dependency-failure`,label:`Dependency failure`,status:{mode:`managed`,setupFailure:{command:`pnpm install --frozen-lockfile`,commit:`1234567890abcdef`,message:`The project was synchronized, but dependency installation failed. Fix the package or lockfile issue, then retry the install.`,output:`ERR_PNPM_OUTDATED_LOCKFILE Cannot install with a frozen lockfile.`,restartRequired:!0,stage:`dependencies`},warnings:[]}},{description:`Database migration failed and can be reset.`,id:`migration-failure`,label:`Database failure`,status:{mode:`managed`,setupFailure:{command:`pnpm db migrate`,commit:`1234567890abcdef`,message:`The project was synchronized, but its database migration failed. The previous database was restored.`,output:`Migration 0012_add_project_state failed: duplicate column name.`,restartRequired:!1,stage:`migration`},warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`}],phase:`running`,requestId:`debug-codex-running`},description:`Codex is resolving conflicts with previous thoughts collapsed.`,id:`codex-running`,label:`Codex reasoning`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}],phase:`complete`,requestId:`debug-codex-message`},description:`Codex has produced its final message while synchronization finishes.`,id:`codex-message`,label:`Codex response`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[],messages:[{kind:`user`,text:`Resolve the current Git merge conflicts in src/web/root.tsx.`},{kind:`thought`,text:`The conflict could not be resolved safely.`}],phase:`error`,requestId:`debug-codex-error`},description:`The Codex-assisted conflict resolution failed.`,error:`Codex could not resolve the merge conflicts.`,id:`codex-error`,label:`Codex failure`,status:{mode:`managed`,warnings:[]}},{description:`A durable Codex completion waiting for acknowledgment.`,id:`codex-finished`,label:`Codex finished`,status:{codexCompletion:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],finalMessage:`Resolved root.tsx while preserving both the command layer and overlay mounting.`,id:`debug-completion`,messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}]},mode:`managed`,warnings:[]}},{description:`A successful synchronization result before it auto-dismisses.`,id:`success`,label:`Refresh success`,status:{mode:`managed`,warnings:[]},success:{heading:`Refresh complete`,message:`Your project is up to date.`}}];function F(){L(!O)}function I(){R(!0),L(!0)}function L(e){if(O!==e){O=e;for(let e of j)e()}}function R(e){if(M!==e){M=e;for(let e of N)e()}}function z({bottomOffset:e,codexEnabled:t=!1,debug:n=!1,indicator:r,rightOffset:i}){return n?p(te,{bottomOffset:e,indicator:r,rightOffset:i}):p(B,{bottomOffset:e,codexEnabled:t,indicator:r,rightOffset:i})}function B({bottomOffset:e,codexEnabled:t=!1,indicator:n,rightOffset:r}){let{act:o,checkFailure:c,codex:l,dismissCheckFailure:d,dismissError:f,dismissSuccess:m,error:h,status:g,success:_}=_e(),v=he(),y=u(ye,Se,Ce);s(()=>{if(!_)return;let e=setTimeout(()=>{m(),L(!1)},1600);return()=>clearTimeout(e)},[m,_]);let b=n??p(W,{}),x=a(b)&&b.type===W?i(b,{paused:!g?.target}):b;return p(V,{bottomOffset:e,indicator:$(g,c)||t?x:null,rightOffset:r,children:p(G,{act:o,checkFailure:c,codex:l,codexEnabled:t,codexPromptOpen:y,developmentControls:v,dismissCheckFailure:d,dismissError:f,error:h,onClose:()=>{g?.codexCompletion&&o({id:g.codexCompletion.id,type:`acknowledge-codex`}),R(!1),L(!1)},onCloseCodex:()=>R(!1),onOpenCodex:I,status:g,success:_})})}function V({bottomOffset:e,children:t,indicator:n,openOnMount:i=!1,rightOffset:a}){let[o,c]=l(null),f=u(ve,be,xe);s(()=>{i&&L(!0);let e=!0,t=r(`coreframe-managed-dev`,document.body,{css:D,hostAttributes:{"aria-live":`polite`,id:`coreframe-managed-dev`},hostStyles:{inset:`0`,pointerEvents:`none`,position:`fixed`},zIndex:2147483647});return queueMicrotask(()=>{e&&c(t.container)}),()=>{e=!1,t.host?.remove()}},[i]);let p={"--managed-dev-bottom-offset":H(e),"--managed-dev-right-offset":H(a)};return o?d(m(`div`,{className:E.surface,style:p,children:[n,f?t:null]}),o):null}function te({bottomOffset:e,indicator:t,rightOffset:n}){let[r,o]=l(),[s,c]=l(),u=P.find(({id:e})=>e===r),d=e=>{o(e),c(void 0)},f=async e=>{if(e.type===`acknowledge-codex`){d(void 0);return}c(ge(e))},m=t??p(W,{});return p(V,{bottomOffset:e,indicator:a(m)&&m.type===W?i(m,{paused:u?.status.mode===`waiting`}):m,openOnMount:!0,rightOffset:n,children:u?p(G,{act:f,checkFailure:Q(u.status),codex:u.codex,codexEnabled:!1,codexPromptOpen:!1,developmentControls:void 0,dismissCheckFailure:()=>void 0,dismissError:()=>void 0,error:u.error,onBack:()=>d(void 0),onClose:()=>L(!1),onCloseCodex:()=>void 0,onOpenCodex:()=>void 0,status:u.status,success:s??u.success},u.id):p(ne,{onClose:()=>L(!1),onSelect:e=>d(e)})})}function H(e){return typeof e==`number`?`${e}px`:e??`0px`}function ne({onClose:e,onSelect:t}){return m(U,{onClose:e,title:`Managed dev overlay scenarios`,children:[p(`p`,{className:E.debugNotice,children:`Debug preview. Project actions are simulated locally.`}),p(`div`,{className:E.scenarioList,children:P.map(e=>m(`button`,{className:E.scenarioButton,onClick:()=>t(e.id),type:`button`,children:[p(`span`,{className:E.scenarioLabel,children:e.label}),p(`span`,{className:E.scenarioDescription,children:e.description})]},e.id))})]})}function U({children:e,onClose:n,title:r}){return m(`dialog`,{"aria-labelledby":`coreframe-managed-title`,"aria-modal":`true`,className:E.dialog,id:`coreframe-managed-dev-dialog`,onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),n())},open:!0,children:[m(`div`,{className:E.header,children:[p(`h2`,{className:E.title,id:`coreframe-managed-title`,children:r}),p(`button`,{"aria-label":`Close managed development`,className:E.iconButton,onClick:n,type:`button`,children:p(t,{"aria-hidden":`true`,size:18})})]}),p(`div`,{className:E.drawerBody,children:e})]})}function W({color:e=`#228be6`,paused:t=!1,size:n=14,warningColor:r=`#fd7e14`}){let i=u(ve,be,xe),a={"--managed-dev-indicator-color":t?r:e,"--managed-dev-indicator-size":typeof n==`number`?`${n}px`:n};return p(`button`,{"aria-controls":`coreframe-managed-dev-dialog`,"aria-expanded":i,"aria-label":`${i?`Hide`:`Show`} Coreframe managed development`,className:E.indicatorButton,onClick:F,style:a,type:`button`,children:p(`span`,{className:E.indicatorDot})})}function G({act:e,checkFailure:n,codex:r,codexEnabled:i,codexPromptOpen:a,developmentControls:o,dismissCheckFailure:u,dismissError:d,error:h,onBack:g,onClose:_,onCloseCodex:C,onOpenCodex:w,status:T,success:D}){let[O,k]=l({value:``}),[A,j]=l(()=>({paths:new Set})),M=c(null),[N,P]=l(),F=T?.codexCompletion,I=T?.draft,L=T?.target,R=!F&&!D&&!r,z=A.fingerprint===I?.fingerprint?A.paths:new Set(I?.untracked??[]),B=O.fingerprint===I?.fingerprint&&O.proposal===T?.proposal?O.value:T?.proposal??``,V=!!(I?.untracked.length&&I.untracked.every(e=>z.has(e)));return s(()=>{let e=M.current;e&&r?.phase===`running`&&(e.scrollTop=e.scrollHeight)},[r]),n?m(U,{onClose:_,title:`Managed development check failed`,children:[m(`div`,{className:E.content,children:[g?m(`div`,{className:E.debugToolbar,children:[p(`button`,{className:E.debugBackButton,onClick:g,type:`button`,children:`All scenarios`}),p(`span`,{children:`Debug preview · actions are simulated`})]}):null,p(`div`,{className:E.checkFailure,role:`alert`,children:m(`div`,{className:E.checkMessage,children:[m(`p`,{className:E.checkCommand,children:[n.check.command,` failed`]}),p(`p`,{className:E.checkGuidance,children:fe(n)}),p(`p`,{className:E.checkGuidance,children:`Copy the output and paste it into your agent orchestration tool.`})]})}),m(Y,{children:[p(Z,{ariaLabel:`Dismiss error`,icon:t,iconOnly:!0,onClick:()=>u(n),children:`Dismiss`}),p(Z,{ariaLabel:`Copy output for ${n.check.command}`,icon:y,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(n.check.output??``),children:`Copy output`})]})]}),p(K,{controls:o}),p(q,{enabled:i,notice:N,onClose:C,onOpen:w,open:a,onStarted:P})]}):m(U,{onClose:_,title:F?`Codex conflict resolution finished`:D?.heading??(r?.phase===`complete`?`Finishing synchronization…`:r?.phase===`error`?`Conflict resolution failed.`:r?`Resolving conflicts with Codex…`:le(T)),children:[m(`section`,{"aria-labelledby":`coreframe-managed-sync-heading`,className:E.section,children:[p(`div`,{className:E.sectionHeading,children:p(`h3`,{className:E.sectionTitle,id:`coreframe-managed-sync-heading`,children:`Managed synchronization`})}),m(`div`,{className:E.content,children:[g?m(`div`,{className:E.debugToolbar,children:[p(`button`,{className:E.debugBackButton,onClick:g,type:`button`,children:`All scenarios`}),p(`span`,{children:`Debug preview · actions are simulated`})]}):null,D&&!F?m(`div`,{className:E.actionSuccess,role:`status`,children:[p(v,{"aria-hidden":`true`,className:E.successIcon,size:18}),p(`p`,{className:E.paragraph,children:D.message})]}):null,h?m(f,{children:[p(`div`,{className:E.actionError,role:`alert`,children:p(X,{children:h})}),p(Y,{children:p(Z,{ariaLabel:`Dismiss error`,icon:t,iconOnly:!0,onClick:d,children:`Dismiss`})})]}):null,F||!D&&r?p(re,{commits:F?.commits??r?.commits??[],completion:F,messages:F?.messages??r?.messages??[],outputRef:M,working:r?.phase===`running`}):R&&T?.setupFailure?m(f,{children:[m(`div`,{className:E.setupFailure,role:`alert`,children:[p(X,{children:T.setupFailure.message}),p(`pre`,{className:E.codexOutput,children:T.setupFailure.output})]}),m(Y,{children:[p(Z,{ariaLabel:`Dismiss error`,icon:t,iconOnly:!0,onClick:_,children:`Dismiss`}),p(Z,{ariaLabel:`Copy diagnostics`,busy:T.busy,icon:y,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(me(T.setupFailure)),children:`Copy diagnostics`}),T.setupFailure.stage===`dependencies`?p(Z,{ariaLabel:`Retry install`,busy:T.busy,icon:x,iconOnly:!0,onClick:()=>void e({type:`retry-install`}),primary:!0,children:`Retry install`}):p(Z,{busy:T.busy,icon:S,onClick:()=>{window.confirm(`Reset the local database? This permanently deletes its current data, then reapplies migrations and seed scripts.`)&&e({type:`reset-database`})},primary:!0,children:`Reset database`})]})]}):R?p(`p`,{className:E.paragraph,children:T?T.busy||T.message||ue(T):`Checking managed development status…`}):null,F&&!h?p(Y,{children:p(Z,{busy:T?.busy,icon:v,onClick:()=>void e({id:F.id,type:`acknowledge-codex`}),primary:!0,children:`Continue`})}):null,R&&T?.mode===`waiting`&&T.message?m(`p`,{className:E.paragraph,children:[`To re-enable managed development, run `,p(`code`,{children:`git switch main`}),` in the primary checkout. Synchronization will resume automatically.`]}):null,R&&L&&!I?m(`p`,{className:E.paragraph,children:[L.subject,` (`,L.shortCommit,`)`]}):null,R?T?.warnings.map((e,t)=>p(`p`,{className:`${E.paragraph} ${E.warning}`,children:e},`${t}-${e}`)):null,R&&I?m(f,{children:[m(`div`,{className:E.files,children:[I.untracked.map(e=>p(ce,{checked:z.has(e),label:p(`span`,{className:E.filePath,children:e}),onChange:t=>j(()=>{let n=new Set(z);return t?n.add(e):n.delete(e),{fingerprint:I.fingerprint,paths:n}})},e)),I.untracked.length>0?p(ce,{checked:V,label:`Include all untracked files`,onChange:e=>j({fingerprint:I.fingerprint,paths:e?new Set(I.untracked):new Set})}):null]}),T.proposal===void 0?m(Y,{children:[L?p(Z,{busy:T.busy,icon:S,onClick:()=>void e({type:`reject`}),children:`Reject`}):null,p(Z,{busy:T.busy,icon:ee,onClick:()=>void e({type:`message`,fingerprint:I.fingerprint,untracked:[...z]}),primary:!0,children:`Generate commit message`})]}):m(f,{children:[p(`textarea`,{"aria-label":`Commit message`,className:E.message,onChange:e=>k({fingerprint:I.fingerprint,proposal:T.proposal,value:e.target.value}),value:B}),m(Y,{children:[L?p(Z,{busy:T.busy,icon:S,onClick:()=>void e({type:`reject`}),children:`Reject`}):null,p(Z,{busy:T.busy,icon:b,onClick:()=>{e(L?{type:`apply`,target:L.commit,fingerprint:I.fingerprint,untracked:[...z],message:B}:{type:`commit`,fingerprint:I.fingerprint,untracked:[...z],message:B})},primary:!0,children:L?`Commit and refresh`:`Commit changes`})]})]})]}):R&&L?p(Y,{children:p(Z,{busy:T.busy,icon:x,onClick:()=>void e({type:`prepare`,target:L.commit}),primary:!0,children:L.source===`upstream`?`Refresh`:String(L.source)===`dev`?`Sync with dev`:`Sync with main`})}):null]})]}),p(K,{controls:o}),p(q,{enabled:i,notice:N,onClose:C,onOpen:w,open:a,onStarted:P})]})}function K({controls:e}){return e?m(`section`,{"aria-labelledby":`coreframe-development-controls-heading`,className:E.section,children:[p(`div`,{className:E.sectionHeading,children:m(`div`,{children:[p(`h3`,{className:E.sectionTitle,id:`coreframe-development-controls-heading`,children:`Development controls`}),p(`p`,{className:E.sectionDescription,children:`Local actions for the current dev session.`})]})}),m(Y,{children:[p(Z,{icon:x,onClick:e.reloadPage,children:`Reload page`}),p(Z,{busy:e.pending?`Restarting Vite`:void 0,icon:S,onClick:e.restartVite,primary:!0,children:e.pending?`Restarting Vite…`:`Restart Vite`})]}),e.error?p(`div`,{className:E.actionError,role:`alert`,children:p(X,{children:`Vite restart failed: ${e.error}`})}):null,e.success?m(`div`,{className:E.actionSuccess,role:`status`,children:[p(v,{"aria-hidden":`true`,className:E.successIcon,size:18}),p(`p`,{className:E.paragraph,children:e.success})]}):null]}):null}function q({enabled:e,notice:t,onClose:r,onOpen:i,onStarted:a,open:o}){return e?m(`section`,{"aria-labelledby":`coreframe-codex-heading`,className:E.section,children:[m(`div`,{className:E.sectionHeading,children:[m(`div`,{children:[p(`h3`,{className:E.sectionTitle,id:`coreframe-codex-heading`,children:`Codex`}),p(`p`,{className:E.sectionDescription,children:`Start a prompt in the existing Codex task workflow.`})]}),o?p(`button`,{className:E.sectionLink,onClick:r,type:`button`,children:`Close`}):null]}),o?p(n,{classNames:{actions:E.codexActions,button:E.codexButton,error:E.codexError,form:E.codexForm,hint:E.codexHint,primary:E.codexPrimary,prompt:E.codexPrompt,toast:E.codexToast},label:`Codex chat prompt`,onClose:r,onStarted:a,placeholder:`Describe what you want Codex to do…`,showToast:!1}):p(Y,{children:p(Z,{icon:ee,onClick:i,primary:!0,children:`New Codex chat`})}),t?m(`div`,{className:E.actionSuccess,role:`status`,children:[p(v,{"aria-hidden":`true`,className:E.successIcon,size:18}),p(`p`,{className:E.paragraph,children:t})]}):null]}):null}function re({commits:e,completion:t,messages:n,outputRef:r,working:i}){let a=[...n].reverse().find(e=>e.kind===`user`),o=[...n].reverse().find(e=>e.kind!==`user`),s=t?[...n].reverse().find(e=>e.kind===`agent`&&e.text===t.finalMessage):o,c=n.filter(e=>e.kind!==`user`&&e!==s),l=t?{kind:`agent`,text:t.finalMessage}:o,u=s?`message-${n.lastIndexOf(s)}`:`completion`;return m(f,{children:[i?p(`div`,{className:E.codexWorking,children:p(h,{className:E.codexWorkingSpinner,label:`Codex is resolving conflicts`,children:p(ie,{})})}):null,m(`div`,{"aria-live":t?void 0:`polite`,className:E.codexTranscript,ref:r,role:`log`,children:[e.length>0?p(ae,{commits:e}):null,a?p(J,{message:a}):null,c.length>0?m(`details`,{className:E.codexHistory,children:[m(`summary`,{children:[`History (`,c.length,`)`]}),p(`div`,{className:E.codexHistoryList,children:c.map((e,t)=>p(J,{message:e},`history-${t}`))})]}):null,l?p(J,{message:l,showAge:!0},u):p(`p`,{className:E.codexWaiting,children:`Waiting for Codex output…`})]})]})}function ie(){let e=c(0),[t,n]=l(0);return s(()=>{e.current=Date.now();let t=window.setInterval(()=>{n(Math.floor((Date.now()-e.current)/1e3))},1e3);return()=>window.clearInterval(t)},[]),m(f,{children:[`Working for `,se(t),`...`]})}function ae({commits:e}){return m(`section`,{className:E.rebasedCommits,children:[m(`h3`,{className:E.codexMessageLabel,children:[`Rebased commits (`,e.length,`)`]}),p(`ul`,{className:E.rebasedCommitList,children:e.map(e=>m(`li`,{className:E.rebasedCommit,children:[p(b,{"aria-hidden":`true`,size:14}),p(`code`,{children:e.shortCommit}),p(`span`,{children:e.subject})]},e.commit))})]})}function J({message:e,showAge:t=!1}){let n=e.kind===`user`?`Request`:e.kind===`thought`?`Codex thought`:`Codex`,r=e.kind===`user`?E.codexMessageUser:e.kind===`thought`?E.codexMessageThought:E.codexMessageAgent;return m(`section`,{className:`${E.codexMessage} ${r}`,children:[m(`div`,{className:E.codexMessageHeader,children:[p(`h3`,{className:E.codexMessageLabel,children:n}),t?p(oe,{}):null]}),p(`p`,{className:E.codexMessageText,children:e.text})]})}function oe(){let e=c(0),[t,n]=l(0);return s(()=>{e.current=Date.now();let t=window.setInterval(()=>{n(Math.floor((Date.now()-e.current)/1e3))},1e3);return()=>window.clearInterval(t)},[]),m(`span`,{"aria-hidden":`true`,className:E.codexMessageAge,children:[se(t),` ago`]})}function se(e){let t=Math.floor(e/60),n=e%60;return t>0?`${t}m ${n}s`:`${n}s`}function ce({checked:e,label:t,onChange:n}){return m(`label`,{className:E.checkbox,children:[p(`input`,{checked:e,onChange:e=>n(e.target.checked),type:`checkbox`}),t]})}function Y({children:e}){return p(`div`,{className:E.actions,children:e})}function X({children:e}){return m(`div`,{className:E.errorMessage,children:[p(C,{"aria-hidden":`true`,className:E.errorIcon,size:18}),p(`p`,{className:E.paragraph,children:e})]})}function Z({ariaLabel:e,busy:t,children:n,icon:r,iconOnly:i=!1,onClick:a,primary:o=!1}){let[c,u]=l(!0);return s(()=>{let e=window.setTimeout(()=>u(!1),1e3);return()=>window.clearTimeout(e)},[]),m(`button`,{"aria-label":e,"aria-busy":!!t,className:`${E.button} ${i?E.iconOnly:``} ${o?E.primary:``}`,disabled:c||!!t,onClick:a,title:i?e:void 0,type:`button`,children:[r?p(r,{"aria-hidden":`true`,size:16}):null,i?null:n]})}function le(e){return e?e.mode===`waiting`&&e.message?`Managed development paused`:e.mode===`unmanaged`?`Managed development unavailable`:e.mode===`error`?`Managed development stopped`:e.setupFailure?.stage===`dependencies`?`Dependency installation failed`:e.setupFailure?.stage===`migration`?`Database setup failed`:e.draft?e.proposal===void 0?`Review local changes`:`Confirm your commit`:e.target?.source===`upstream`?`Refresh from upstream`:String(e.target?.source)===`dev`?`Sync with local dev`:e.target?`Sync with local main`:e.checks?.commands.some(e=>e.status===`failed`)?`Managed development checks failed`:e.warnings.length>0?`Managed development warning`:`Managed development status`:`Checking managed development`}function ue(e){return e.mode===`waiting`?`Waiting for managed development to start.`:e.mode===`unmanaged`?`Managed synchronization is unavailable for this session.`:e.mode===`error`?`Managed synchronization stopped.`:e.draft&&!e.target?`Commit the local changes before managed development checks for updates.`:e.target&&e.target.source!==`upstream`?String(e.target?.source)===`dev`?`New changes are available in local dev.`:`New changes are available in local main.`:e.target?`A newer main commit is ready.`:`Managed development is active. No updates are available.`}function de(e){return e.mode!==`managed`||!!(e.busy||e.codexCompletion||e.draft||e.message||e.setupFailure||e.target||e.warnings.length>0)}function Q(e){if(!e?.checks||de(e))return;let t=e.checks.commands.find(e=>e.status===`failed`&&!e.dismissed);return t?{check:t,commit:e.checks.commit,trigger:e.checks.trigger}:void 0}function fe({commit:e,trigger:t}){let n=e.slice(0,12);return t===`dependency-recovery`?`Managed dev ran this check after dependency installation recovered for commit ${n}.`:t===`database-recovery`?`Managed dev ran this check after database setup recovered for commit ${n}.`:`Managed dev ran this check after synchronizing the accepted update at commit ${n}.`}function $(e,t=Q(e)){return e?e.mode===`waiting`?!!e.message:!!(t||de(e)):!1}function pe(e){let t=new Set(e.filter(e=>e.kind===`user`)),n=[...t].reduce((e,t)=>e+t.text.length,0),r=!1;for(let i of[...e].reverse())if(i.kind!==`user`){if(n+i.text.length>1e5&&r)break;t.add(i),r=!0,n+=i.text.length}return e.filter(e=>t.has(e))}function me(e){return[e.message,`Commit: ${e.commit}`,`Command: ${e.command}`,``,e.output].join(`
|
|
47
|
+
`)}function he(){let[e,t]=l(),[n,r]=l(!1),[i,a]=l(),o=w(),u=c(void 0);return s(()=>{if(!o)return;let e=e=>{if(e.requestId===u.current){if(e.state===`busy`){r(!0);return}if(u.current=void 0,r(!1),e.state===`error`){a(void 0),t(e.error??`The Vite restart failed.`);return}t(void 0),a(`Vite restarted.`)}};return o.on(g.actionResult,e),()=>o.off(g.actionResult,e)},[o]),{error:e,pending:n,reloadPage:()=>globalThis.location.reload(),restartVite:()=>{if(n)return;if(t(void 0),a(void 0),!o){t(`The Vite HMR connection is unavailable.`);return}let e=String(++A);u.current=e,r(!0),o.send(g.action,{action:{type:`restart-vite`},requestId:e})},success:i}}function ge(e){return e.type===`apply`?{heading:`Refresh complete`,message:`Your changes were committed and the project is up to date.`}:e.type===`prepare`?{heading:`Refresh complete`,message:`Your project is up to date.`}:e.type===`commit`?{heading:`Changes committed`,message:`Your local changes are committed. Checking for managed development updates…`,preserveDuringStatus:!0}:e.type===`reject`?{heading:`Update dismissed`,message:`No further action is required.`}:e.type===`retry-install`?{heading:`Setup complete`,message:`Dependencies installed and the project is ready.`}:e.type===`reset-database`?{heading:`Database reset complete`,message:`The database was recreated, migrated, and seeded.`}:{heading:`Action complete`,message:`No further action is required.`}}function _e(){let[e,t]=l(),[n,r]=l(),[i,a]=l(),[u,d]=l(),f=c(void 0),p=c(void 0),m=c(new Map),h=T();s(()=>{if(!h)return;let e=m.current,n=({status:n})=>{let r=$(n);t(n),n.codexCompletion&&p.current!==n.codexCompletion.id&&(p.current=n.codexCompletion.id,L(!0));let i=!n.busy&&!n.codexCompletion?[...e.entries()].filter(([,e])=>e.type===`acknowledge-codex`).map(([e])=>e):[];if(i.length>0){for(let t of i)e.delete(t);a(void 0),r||L(!1)}r&&a(e=>e?.preserveDuringStatus?e:void 0)},i=n=>{let i=e.get(n.requestId);i&&(e.delete(n.requestId),n.status&&t(n.status),n.error?(r(n.error),i.type===`acknowledge-codex`&&L(!0)):n.status?.codexCompletion?(p.current=n.status.codexCompletion.id,f.current=void 0,d(void 0),a(void 0),L(!0)):i.type===`acknowledge-codex`||i.type===`dismiss-check`?(a(void 0),n.status&&!$(n.status)&&L(!1)):n.status&&(i.type===`commit`||!$(n.status))&&a(ge(i)))},o=t=>{if(!e.has(t.requestId))return;if(t.phase===`start`){let e={commits:t.commits,messages:[t.message],phase:`running`,requestId:t.requestId};f.current=e,d(e),L(!0);return}let n=f.current;if(!n||n.requestId!==t.requestId)return;let r=t.phase===`message`?{...n,messages:pe([...n.messages,t.message])}:t.phase===`complete`?{commits:n.commits,messages:n.messages,phase:`complete`,requestId:t.requestId}:t.phase===`progress`?{...n,commits:t.commits}:{...n,phase:`error`};f.current=r,d(r)};h.on(_.status,n),h.on(_.actionResult,i),h.on(_.codex,o),h.send(_.statusRequest);let s=window.setInterval(()=>{[...e.values()].some(e=>e.type===`acknowledge-codex`)&&h.send(_.statusRequest)},1e3);return()=>{window.clearInterval(s),e.clear(),f.current=void 0,h.off(_.status,n),h.off(_.actionResult,i),h.off(_.codex,o)}},[h]);let g=async e=>{if(e.type===`acknowledge-codex`&&(p.current=e.id),r(void 0),a(void 0),f.current=void 0,d(void 0),!h){r(`The Vite HMR connection is unavailable.`);return}let t=String(++k);m.current.set(t,e),h.send(_.action,{action:e,requestId:t})},v=o(()=>a(void 0),[]);return{act:g,checkFailure:!n&&!i&&!u&&!e?.codexCompletion?Q(e):void 0,codex:u,dismissCheckFailure:e=>{if(!e.check.failureId){L(!1);return}g({failureId:e.check.failureId,type:`dismiss-check`})},dismissError:()=>r(void 0),dismissSuccess:v,error:n,status:e,success:i}}function ve(e){return j.add(e),()=>j.delete(e)}function ye(e){return N.add(e),()=>N.delete(e)}function be(){return O}function xe(){return!1}function Se(){return M}function Ce(){return!1}export{z as ManagedDevOverlay,W as ManagedDevOverlayIndicator,I as openManagedDevCodex,F as toggleManagedDevOverlay};
|
package/dist/plugins/assets.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createReadStream as e}from"node:fs";import{stat as t}from"node:fs/promises";import{resolve as n,sep as r}from"node:path";import{pipeline as i}from"node:stream/promises";import{assetCatalogPackNames as a,buildAssets as o,checkAssetManifests as s,checkAssets as c,formatAssetProblems as l,manifestEntryOutputs as u,materializeAsset as d,readAssetCatalog as f,readAssetManifest as p,resolveAssetVariantFile as m}from"@coreframe/
|
|
1
|
+
import{createReadStream as e}from"node:fs";import{stat as t}from"node:fs/promises";import{resolve as n,sep as r}from"node:path";import{pipeline as i}from"node:stream/promises";import{assetCatalogPackNames as a,buildAssets as o,checkAssetManifests as s,checkAssets as c,formatAssetProblems as l,manifestEntryOutputs as u,materializeAsset as d,readAssetCatalog as f,readAssetManifest as p,resolveAssetVariantFile as m}from"@coreframe/assets";import{readProjectConfig as h}from"@coreframe/config";const g=`virtual:assets`,_=`virtual:assets/internal/`,v=/!\[([^\]]*)\]\(@asset\s+([a-z0-9][a-z0-9/-]*)\)/g;function y({cwd:t=process.cwd(),devMaterialize:u=!0}={}){let y=`\0${g}`,w=`\0${_}`,k=n(t,`assets/catalog.json`),A=n(t,`assets/manifest.json`),j=`${n(t,`assets/manifests`)}${r}`,M=new Set([y]),N=new Map,P=!1,F,I=``,L=!1,R=!1,z,B,V=!1,H=!1;async function U(){L||=(I=S((await h({cwd:t})).assets?.publicBaseUrl),!0)}function W(e){if(e.kind===`image`)return{kind:e.kind,alt:e.alt,width:e.width,height:e.height,variants:[...e.variants].sort((e,t)=>e.width-t.width).map(e=>({width:e.width,height:e.height,src:b(I,e.path)}))};let t={mediaType:e.file.mediaType,src:b(I,e.file.path)};return e.kind===`svg`?{kind:e.kind,alt:e.alt,viewBox:e.viewBox,file:t}:e.kind===`audio`?{kind:e.kind,durationSeconds:e.durationSeconds,file:t}:e.kind===`lottie`?{kind:e.kind,width:e.width,height:e.height,frameRate:e.frameRate,durationSeconds:e.durationSeconds,file:t}:{kind:e.kind,width:e.width,height:e.height,durationSeconds:e.durationSeconds,hasAudio:e.hasAudio,file:t}}async function G(){let e=await f(t),n=[...e.problems],r=new Map;for(let i of[void 0,...a(e.catalog)]){let e=await p(t,{pack:i});n.push(...e.problems),r.set(i,e.manifest)}return{catalog:e.catalog,manifests:r,problems:n}}async function K(e){let n=N.get(e);if(n)return n;let r=(async()=>{let n=await d(e,{cwd:t,updateManifest:!1});if(!n.ok)throw Error(l(n.problems));return n})();N.set(e,r);try{return await r}finally{N.delete(e)}}async function q(e){let n=e.requiresFullBuild||e.staleAssetIds.length!==1?[{}]:[{id:e.staleAssetIds[0]}];F?.config.logger.info(`Regenerating stale Coreframe asset manifests for development.`);for(let e of n){let n=await o({cwd:t,...e});if(!n.ok)throw Error(l(n.problems))}let r=await s({cwd:t});if(!r.ok)throw Error(l(r.problems))}async function J(){if(R=!0,z)return z;z=(async()=>{for(;R;){R=!1;let e=await s({cwd:t});e.ok||await q(e)}V&&(V=!1,Y())})();try{await z}finally{z=void 0}}function Y(){if(F){for(let e of M){let t=F.moduleGraph.getModuleById(e);t&&F.moduleGraph.invalidateModule(t)}F.ws.send({type:`full-reload`})}}function X(e){let t=n(e);return t===k||t===A||t.startsWith(j)&&t.endsWith(`.json`)}function Z(e){let t=e instanceof Error?e:Error(String(e)),n=t.stack??t.message;F?.config.logger.error(`Coreframe asset manifest reconciliation failed.\n${n}`),F?.ws.send({type:`error`,err:{message:t.message,plugin:`coreframe:assets`,stack:n}})}function Q(){B&&clearTimeout(B),B=setTimeout(()=>{B=void 0,V=!0,J().catch(Z)},100)}return{name:`coreframe:assets`,configResolved(e){H=e.mode===`test`||process.env.VITEST===`true`;let t=S(e.env.VITE_ASSETS_PUBLIC_BASE_URL);H||e.command===`serve`&&!t?(I=``,L=!0):(I=t,L=!!t),P=e.command===`serve`&&!H},configureServer(n){F=n,P&&n.watcher.on(`all`,(e,t)=>{X(t)&&(z?R=!0:Q())}),n.middlewares.use(async(r,a,o)=>{try{if(!r.url||![`GET`,`HEAD`].includes(r.method??`GET`)){o();return}let s=T(r.url);if(!s){o();return}let c=await G();if(c.problems.length>0){o(Error(l(c.problems)));return}let d=E([...c.manifests.values()],s);if(!d){o();return}let f=m(t,s),p=await D(f);if(p===void 0&&u&&(n.config.logger.info(`Materializing Coreframe asset "${d.assetId}" for dev.`),await K(d.assetId),p=await D(f),p===void 0))throw Error(`Coreframe asset output "${s}" does not match its source. Run: coreframe assets build --id ${d.assetId}`);if(p===void 0){o();return}let h=O(r.headers.range,p);if(h===`invalid`){a.statusCode=416,a.setHeader(`Content-Range`,`bytes */${p}`),a.end();return}let g=h?.start??0,_=h?.end??p-1;if(a.statusCode=h?206:200,a.setHeader(`Accept-Ranges`,`bytes`),a.setHeader(`Content-Type`,d.output.mediaType),a.setHeader(`Cache-Control`,`public, max-age=31536000, immutable`),a.setHeader(`Content-Length`,_-g+1),h&&a.setHeader(`Content-Range`,`bytes ${g}-${_}/${p}`),r.method===`HEAD`){a.end();return}await i(e(f,{start:g,end:_}),a)}catch(e){o(e)}})},async buildStart(){if(this.meta.watchMode){P&&await J();return}if(H)return;let e=await c({cwd:t});if(!e.ok)throw Error(l(e.problems))},closeWatcher(){B&&=(clearTimeout(B),void 0),F=void 0},async resolveId(e){if(e===g)return y;if(e.startsWith(_)){let t=`${w}${e.slice(24)}`;return M.add(t),t}},async load(e){if(e!==y&&!e.startsWith(w))return;await U();let n=e===y?void 0:e.slice(w.length),r=await f(t),i=a(r.catalog);if(n!==void 0&&!i.includes(n))throw Error(`Unknown Coreframe asset pack: ${n}`);let{manifest:o,problems:s}=await p(t,{pack:n}),c=[...r.problems,...s];if(c.length>0)throw Error(l(c));return x(Object.fromEntries(Object.entries(o.assets).map(([e,t])=>[e,W(t)])),n,i)},async transform(e,t){let[n]=t.split(`?`,1);if(!n?.endsWith(`.md`)&&!n?.endsWith(`.mdx`))return;let r=[...e.matchAll(v)];if(r.length===0)return;await U();let i=await G(),a=[...i.problems],o=e;for(let e of r){let[n,r,s]=e,c;for(let e of i.manifests.values())if(c=e.assets[s],c)break;if(!c){a.push({code:`INVALID_REFERENCE`,message:`Asset reference "${s}" in "${t}" is not present in any asset manifest.`,assetId:s,file:t});continue}if(c.kind!==`image`&&c.kind!==`svg`){a.push({code:`INVALID_REFERENCE`,message:`Markdown image reference "${s}" cannot use asset kind "${c.kind}".`,assetId:s,file:t});continue}if(c.kind===`image`&&this.meta.watchMode&&u&&c.variants.length===0){this.warn(`Materializing Coreframe asset "${s}" for dev.`);let e=await K(s);a.push(...e.problems);let t=e.assets.find(e=>e.assetId===s)?.outputs.filter(e=>e.format===`webp`);t&&(c={...c,variants:t})}if(c.kind===`image`&&c.variants.length===0){a.push({code:`GENERATED_ASSET_MISSING`,message:`Asset "${s}" has no generated variants.`,assetId:s,file:t,fix:`Run: coreframe assets build --id ${s}`});continue}o=o.replace(n,C(r,W(c)))}if(a.length>0)throw Error(l(a));return o}}}function b(e,t){return`${e}/${t}`}function x(e,t,n){let r=[`const manifest = ${JSON.stringify(e)};`,`export { manifest };`,`export function asset(id) {`,` const entry = manifest[id];`," if (!entry) throw new Error(`Unknown Coreframe asset: ${id}`);",` if (entry.kind === "image" && entry.variants.length === 0) {`," throw new Error(`Coreframe image asset has no generated variants: ${id}. Run: coreframe assets build --id ${id}`);",` }`,` return entry;`,`}`];if(t!==void 0)return r.push(`export const pack = Object.freeze({ name: ${JSON.stringify(t)}, manifest, asset });`),r.join(`
|
|
2
2
|
`);let i=Object.fromEntries(n.map(e=>[e,{name:e}]));return r.push(`const descriptors = ${JSON.stringify(i)};`,`for (const descriptor of Object.values(descriptors)) Object.freeze(descriptor);`,`Object.freeze(descriptors);`,`const loaders = {`,...n.map(e=>` ${JSON.stringify(e)}: () => import(${JSON.stringify(`${_}${e}`)}),`),`};`,`const pending = new Map();`,`export function assetPack(name) {`,` const descriptor = descriptors[name];`," if (!descriptor) throw new Error(`Unknown Coreframe asset pack: ${name}`);",` return descriptor;`,`}`,`export function loadAssetPack(pack) {`,` if (!pack || descriptors[pack.name] !== pack) {`,` return Promise.reject(new Error("Invalid Coreframe asset pack descriptor."));`,` }`,` let promise = pending.get(pack.name);`,` if (!promise) {`,` promise = loaders[pack.name]().then((module) => module.pack);`,` pending.set(pack.name, promise);`,` promise.catch(() => {`,` if (pending.get(pack.name) === promise) pending.delete(pack.name);`,` });`,` }`,` return promise;`,`}`),r.join(`
|
|
3
3
|
`)}function S(e){return(e??``).replace(/\/+$/,``)}function C(e,t){if(t.kind===`svg`)return[`<img alt="${w(e)}"`,`src="${w(t.file.src)}"`,`width="${t.viewBox.width}"`,`height="${t.viewBox.height}">`].join(` `);let n=t.variants.at(-1),r=t.variants.map(e=>`${e.src} ${e.width}w`).join(`, `);return[`<img alt="${w(e)}"`,`src="${w(n.src)}"`,`srcset="${w(r)}"`,`sizes="100vw"`,`width="${t.width}"`,`height="${t.height}">`].join(` `)}function w(e){return e.replaceAll(`&`,`&`).replaceAll(`"`,`"`).replaceAll(`<`,`<`).replaceAll(`>`,`>`)}function T(e){let t=decodeURIComponent(new URL(e,`http://coreframe.local`).pathname).replace(/^\/+/,``);return t.startsWith(`projects/`)?t:void 0}function E(e,t){for(let n of e)for(let[e,r]of Object.entries(n.assets)){let n=u(r).find(e=>e.path===t);if(n)return{assetId:e,output:n}}}async function D(e){try{return(await t(e)).size}catch(e){if(k(e)&&e.code===`ENOENT`)return;throw e}}function O(e,t){if(!e)return;let n=/^bytes=(\d*)-(\d*)$/.exec(e);if(!n||!n[1]&&!n[2])return`invalid`;if(!n[1]){let e=Number(n[2]);return!Number.isSafeInteger(e)||e<=0?`invalid`:{start:Math.max(0,t-e),end:t-1}}let r=Number(n[1]),i=n[2]?Number(n[2]):t-1;return!Number.isSafeInteger(r)||!Number.isSafeInteger(i)||r<0||r>=t||i<r?`invalid`:{start:r,end:Math.min(i,t-1)}}function k(e){return e instanceof Error&&`code`in e}export{y as coreframeAssetsPlugin};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { WorkerConfig } from "@coreframe/config";
|
|
2
|
+
|
|
1
3
|
//#region plugins/cloudflare.d.ts
|
|
2
4
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
5
|
[key: string]: JsonValue;
|
|
@@ -10,6 +12,9 @@ type CloudflareWorkerConfig = {
|
|
|
10
12
|
assets?: CloudflareAssetsConfig;
|
|
11
13
|
vars?: Record<string, JsonValue>;
|
|
12
14
|
};
|
|
13
|
-
declare function coreframeCloudflareConfig(config: CloudflareWorkerConfig
|
|
15
|
+
declare function coreframeCloudflareConfig(config: CloudflareWorkerConfig, options?: {
|
|
16
|
+
environment?: WorkerConfig["environment"];
|
|
17
|
+
processEnvironment?: NodeJS.ProcessEnv;
|
|
18
|
+
}): CloudflareWorkerConfig | undefined;
|
|
14
19
|
//#endregion
|
|
15
20
|
export { coreframeCloudflareConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{coreframeLocalWorkerVariables as e,normalizeWorkerEnvironment as t}from"@coreframe/config";const n=`/cdn-cgi/*`,r=[`DATABASE_URL`];function i(i,a={}){let o=a.processEnvironment??process.env;if(o.CLOUDFLARE_ENV!==`development`)return;let s=i.assets?.run_worker_first,c=s!==!0&&!(Array.isArray(s)?s:[]).includes(n),l=new Set(t(a.environment).map(e=>e.name)),u=new Set([...e,...r.filter(e=>l.has(e))]),d=Object.fromEntries([...u].flatMap(e=>{let t=o[e];return t?[[e,t]]:[]}));if(!(!c&&Object.keys(d).length===0))return{...c?{assets:{run_worker_first:[n]}}:{},...Object.keys(d).length>0?{vars:{...i.vars,...d}}:{}}}export{i as coreframeCloudflareConfig};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { startCodexTask } from "@coreframe/dev/codex-task";
|
|
2
|
+
import { Plugin } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region plugins/codex-task.d.ts
|
|
5
|
+
type CoreframeCodexTaskPluginOptions = {
|
|
6
|
+
env?: NodeJS.ProcessEnv;
|
|
7
|
+
startTask?: typeof startCodexTask;
|
|
8
|
+
};
|
|
9
|
+
declare function coreframeCodexTaskPlugin({
|
|
10
|
+
env,
|
|
11
|
+
startTask
|
|
12
|
+
}?: CoreframeCodexTaskPluginOptions): Plugin;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CoreframeCodexTaskPluginOptions, coreframeCodexTaskPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{codexTaskEnv as e,codexTaskEvents as t}from"@coreframe/dev-contracts/codex-task";import{startCodexTask as n}from"@coreframe/dev/codex-task";function r({env:r=process.env,startTask:i=n}={}){let a=r[e]===`1`;return{name:`coreframe:codex-task`,apply:`serve`,config(){return{define:{"import.meta.env.COREFRAME_CODEX_TASKS":JSON.stringify(a)}}},configureServer(e){if(!a)return;let n=async(n,a)=>{try{let o=await i({cwd:e.config.root,env:r,openInBackground:n.openInBackground,prompt:n.prompt});a.send(t.result,{requestId:n.requestId,...o})}catch(r){let i=r instanceof Error?r.message:String(r);e.config.logger.error(`Coreframe Codex task failed to start: ${i}`,{error:r instanceof Error?r:void 0}),a.send(t.result,{error:i,requestId:n.requestId})}};e.ws.on(t.start,n),e.httpServer?.once(`close`,()=>{e.ws.off(t.start,n)})}}}export{r as coreframeCodexTaskPlugin};
|
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
import { Plugin } from "vite";
|
|
2
|
+
import { DashboardEnvironment } from "@coreframe/dashboard/config";
|
|
2
3
|
|
|
3
4
|
//#region plugins/dashboard.d.ts
|
|
4
5
|
type CoreframeDashboardPluginOptions = {
|
|
5
|
-
|
|
6
|
+
dashboardConfig?: string;
|
|
7
|
+
dashboardOrigin?: string;
|
|
6
8
|
env?: NodeJS.ProcessEnv;
|
|
7
9
|
projectRoot?: string;
|
|
8
10
|
};
|
|
11
|
+
/** Hosts the app-owned dashboard at the main same-origin URL and generates its Worker registry. */
|
|
9
12
|
declare function coreframeDashboardPlugin({
|
|
10
|
-
|
|
13
|
+
dashboardConfig,
|
|
14
|
+
dashboardOrigin,
|
|
11
15
|
env,
|
|
12
16
|
projectRoot
|
|
13
17
|
}?: CoreframeDashboardPluginOptions): Plugin;
|
|
18
|
+
type CoreframeDashboardAppPluginOptions = {
|
|
19
|
+
dashboardDirectory?: string;
|
|
20
|
+
environment?: DashboardEnvironment;
|
|
21
|
+
projectRoot?: string;
|
|
22
|
+
};
|
|
23
|
+
/** Composes the browser manifest and localhost API host for the app-owned dashboard build. */
|
|
24
|
+
declare function coreframeDashboardAppPlugin({
|
|
25
|
+
dashboardDirectory,
|
|
26
|
+
environment,
|
|
27
|
+
projectRoot
|
|
28
|
+
}?: CoreframeDashboardAppPluginOptions): Plugin;
|
|
14
29
|
//#endregion
|
|
15
|
-
export { CoreframeDashboardPluginOptions, coreframeDashboardPlugin };
|
|
30
|
+
export { CoreframeDashboardAppPluginOptions, CoreframeDashboardPluginOptions, coreframeDashboardAppPlugin, coreframeDashboardPlugin };
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{existsSync as e}from"node:fs";import{readFile as t}from"node:fs/promises";import{dirname as n,isAbsolute as r,resolve as i}from"node:path";import{readProjectConfig as a}from"@coreframe/config";import{composeDashboardApiRegistries as o,composeDashboardManifest as s,discoverDashboardPages as c,renderDashboardApiRegistryModule as l,resolveDashboardModuleReference as u,resolveDashboardRouteModules as d}from"@coreframe/dashboard/build";import{createDashboardRequestHandler as f}from"@coreframe/dashboard/server";import{createServer as p,loadConfigFromFile as m,normalizePath as h}from"vite";const g=`/__dashboard`,_=`virtual:coreframe-dashboard-worker-api`,v=`\0${_}`,y=`virtual:coreframe-dashboard-manifest`,b=`\0${y}`,x=`virtual:coreframe-dashboard-routes`,S=`\0${x}`,C=`virtual:coreframe-dashboard-document`,w=`\0${C}`,T=`virtual:coreframe-dashboard-styles`,E=`\0${T}`;function D({dashboardConfig:e=`dashboard/dashboard.config.ts`,dashboardOrigin:t=process.env.COREFRAME_DASHBOARD_ORIGIN??`http://127.0.0.1:5174`,env:r=process.env,projectRoot:a=process.cwd()}={}){let s,c,u=()=>c??=M(a,e,s);return{name:`coreframe:dashboard`,async config(e,n){return s=n,{define:{__COREFRAME_DASHBOARD_BUILD__:JSON.stringify(await L(a,r))},server:{proxy:{[g]:{target:t}}}}},resolveId(e){if(e===_)return v},async load(e){if(e===v)return l(o(await u()).worker,`worker`)},configureServer(e){return()=>{let t=e.printUrls.bind(e);e.printUrls=()=>{t();let n=e.resolvedUrls?.local[0];n&&e.config.logger.info(` ➜ Dashboard: ${new URL(g,n)}`)}}},configurePreviewServer:{order:`pre`,async handler(t){let r=await p({appType:`custom`,configFile:!1,envFile:!1,logLevel:`silent`,mode:t.config.mode,resolve:{alias:t.config.resolve.alias,dedupe:t.config.resolve.dedupe,tsconfigPaths:t.config.resolve.tsconfigPaths},root:a,server:{hmr:!1,middlewareMode:!0,watch:null}}),o;try{let s=await F(r.ssrLoadModule.bind(r),await u(),n(N(a,e))),c=t.config.environments.client.build.outDir;o=f({clientDist:i(t.config.root,c,g.slice(1)),pluginApis:s,projectRoot:a})}catch(e){throw await r.close(),e}t.middlewares.use(async(e,t,n)=>{if(!e.url||!P(e.url)){n();return}await o.handle(e,t)});let s,c=()=>s??=Promise.all([o.dispose(),r.close()]).then(()=>void 0),l=t.close.bind(t);return t.close=async()=>{await Promise.all([c(),l()])},t.httpServer.once(`close`,()=>{c()}),()=>{let e=t.printUrls.bind(t);t.printUrls=()=>{e();let n=t.resolvedUrls?.local[0];n&&t.config.logger.info(` ➜ Dashboard: ${new URL(g,n)}`)}}}}}}function O({dashboardDirectory:e=process.cwd(),environment:t=process.env.DEPLOY_ENV?`deployed`:`local`,projectRoot:n=i(e,`..`)}={}){let r,a,o,l=i(e,`dashboard.config.ts`),u=()=>a??=M(n,l,r);return{name:`coreframe:dashboard-app`,config(e,t){return r=t,{ssr:{noExternal:[`@coreframe/dashboard`]}}},resolveId(e){if(e===y)return b;if(e===x)return S;if(e===C)return w;if(e===T)return E},async load(r){if(r===E)return A(e);if(r===w)return k((await u()).document,e,n);if(r!==b&&r!==S)return;let[i,a]=await Promise.all([u(),c({dashboardDirectory:e})]),o=s(i,a,{environment:t});if(r===S){let t=d(o,{dashboardDirectory:e,projectRoot:n});return`export const dashboardRoutePages = ${JSON.stringify(t)}\n`}return`export const dashboardManifest = ${JSON.stringify(o)}\n`},async configureServer(t){o=f({pluginApis:await F(t.ssrLoadModule.bind(t),await u(),e),projectRoot:n}),t.middlewares.use(async(e,t,n)=>{if(!e.url||!e.url.startsWith(`${g}/api/plugins/`)){n();return}await o.handle(e,t)}),t.httpServer?.once(`close`,()=>{o?.dispose()})}}}function k(e,t,n){if(!e)return[`export const Layout = undefined`,`export const links = undefined`,`export const meta = undefined`,`export default undefined`,``].join(`
|
|
2
|
+
`);let r=j(u(e,{dashboardDirectory:t,projectRoot:n}));return[`import * as document from ${JSON.stringify(r)}`,`export const Layout = document.Layout`,`export const links = document.links`,`export const meta = document.meta`,`export default document.default`,``].join(`
|
|
3
|
+
`)}function A(t){let n=[`import ${JSON.stringify(`@coreframe/dashboard/shell.css`)}`,`import ${JSON.stringify(`nanoreset`)}`];for(let r of[`styles.css`,`styled-system/styles.css`]){let a=i(t,r);e(a)&&n.push(`import ${JSON.stringify(j(a))}`)}return`${n.join(`
|
|
4
|
+
`)}\n`}function j(e){return`/@fs/${h(e)}`}async function M(e,t,n){let r=N(e,t),i=await m(n,r,e);if(!i)throw Error(`Could not load dashboard configuration at ${r}.`);return i.config}function N(e,t){return r(t)?t:i(e,t)}function P(e){let[t]=e.split(`?`,1);return t===g||t.startsWith(`${g}/`)}async function F(e,t,n){let r=o(t).local;return Promise.all(r.map(async t=>{let[r,i,a]=await Promise.all([e(I(t.routesModule,n)),e(I(t.handlersModule,n)),e(I(t.capabilityModule,n))]);return{pluginId:t.pluginId,routes:r.routes,createHandlers:i.createHandlers,createCapability:a.createCapability}}))}function I(e,t){return e.startsWith(`.`)?`/@fs/${h(i(n(i(t,`dashboard.config.ts`)),e))}`:e}async function L(e,n){let[r,o]=await Promise.all([t(i(e,`package.json`),`utf8`),a({cwd:e})]),s=JSON.parse(r),c=Object.entries(o.worker?.environment??{}).flatMap(([e,t])=>t.kind===`generated`?[]:[{description:t.description,kind:t.kind,name:e,requiredIn:t.requiredIn??[]}]);return{applicationName:s.name??`Coreframe application`,applicationVersion:s.version,commit:n.GITHUB_SHA,configuration:c,coreframeVersion:s.engines?.coreframe,deployUrls:{production:o.deploy?.environments?.production?.url,staging:o.deploy?.environments?.staging?.url}}}export{O as coreframeDashboardAppPlugin,D as coreframeDashboardPlugin};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plugin } from "vite";
|
|
2
|
+
|
|
3
|
+
//#region plugins/development-controls.d.ts
|
|
4
|
+
type CoreframeDevelopmentControlsPluginOptions = {
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function coreframeDevelopmentControlsPlugin({
|
|
8
|
+
enabled
|
|
9
|
+
}?: CoreframeDevelopmentControlsPluginOptions): Plugin;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { CoreframeDevelopmentControlsPluginOptions, coreframeDevelopmentControlsPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{developmentControlsEvents as e}from"@coreframe/dev-contracts/development-controls";function t({enabled:t=!0}={}){return{name:`coreframe:development-controls`,apply:`serve`,configureServer(n){if(!t)return;let r=!1,i=async(t,i)=>{if(r){i.send(e.actionResult,{error:`A Vite restart is already in progress.`,requestId:t.requestId,state:`error`});return}r=!0,i.send(e.actionResult,{requestId:t.requestId,state:`busy`});try{await n.restart(),r=!1,i.send(e.actionResult,{requestId:t.requestId,state:`complete`})}catch(a){r=!1;let o=a instanceof Error?a.message:String(a);n.config.logger.error(`Coreframe Vite restart failed: ${o}`,{error:a instanceof Error?a:void 0}),i.send(e.actionResult,{error:o,requestId:t.requestId,state:`error`})}};n.ws.on(e.action,i),n.httpServer?.once(`close`,()=>{n.ws.off(e.action,i)})}}}export{t as coreframeDevelopmentControlsPlugin};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HashedFaviconsOptions } from "vite-plugin-hashed-favicons";
|
|
2
1
|
import { Plugin } from "vite";
|
|
2
|
+
import { HashedFaviconsOptions } from "vite-plugin-hashed-favicons";
|
|
3
3
|
|
|
4
4
|
//#region plugins/favicon.d.ts
|
|
5
5
|
declare function coreframeFaviconPlugin(options?: HashedFaviconsOptions): Plugin[];
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { ConfigEnv, PluginOption } from "vite";
|
|
2
|
+
import { ShellPlatform } from "@coreframe/lib/shell";
|
|
2
3
|
|
|
3
4
|
//#region plugins/index.d.ts
|
|
4
|
-
type
|
|
5
|
+
type CoreframeHost = "browser" | "flutter" | "tauri";
|
|
6
|
+
type CoreframePlatform = ShellPlatform;
|
|
7
|
+
type CoreframeRunner = "vite" | "vitest" | "react-router-prerender";
|
|
5
8
|
type CoreframeConfigEnv = ConfigEnv & {
|
|
9
|
+
host: CoreframeHost;
|
|
10
|
+
platform: CoreframePlatform;
|
|
6
11
|
runner: CoreframeRunner;
|
|
7
12
|
};
|
|
8
13
|
type PluginFilter = (env: CoreframeConfigEnv) => boolean;
|
|
9
14
|
type PluginSelector = (env: CoreframeConfigEnv) => PluginOption;
|
|
10
15
|
type SelectablePlugin = PluginOption | PluginSelector;
|
|
11
16
|
declare function extendConfigEnv(env: ConfigEnv, processEnv?: NodeJS.ProcessEnv): CoreframeConfigEnv;
|
|
17
|
+
declare function resolveCoreframeHost(processEnv?: NodeJS.ProcessEnv, platform?: CoreframePlatform): CoreframeHost;
|
|
18
|
+
declare function resolveCoreframeRunner(processEnv?: NodeJS.ProcessEnv): CoreframeRunner;
|
|
19
|
+
declare function resolveCoreframePlatform(processEnv?: NodeJS.ProcessEnv): CoreframePlatform;
|
|
12
20
|
declare function selectPlugins(env: CoreframeConfigEnv, plugins: readonly SelectablePlugin[]): PluginOption[];
|
|
13
21
|
declare function apply(filter: PluginFilter, plugin: SelectablePlugin): PluginSelector;
|
|
14
22
|
declare function buildOnly(plugin: SelectablePlugin): PluginSelector;
|
|
@@ -16,4 +24,4 @@ declare function devOnly(plugin: SelectablePlugin): PluginSelector;
|
|
|
16
24
|
declare function runnerOnly(runners: CoreframeRunner | readonly CoreframeRunner[], plugin: SelectablePlugin): PluginSelector;
|
|
17
25
|
declare function exceptRunner(runners: CoreframeRunner | readonly CoreframeRunner[], plugin: SelectablePlugin): PluginSelector;
|
|
18
26
|
//#endregion
|
|
19
|
-
export { CoreframeConfigEnv, CoreframeRunner, PluginFilter, PluginSelector, SelectablePlugin, apply, buildOnly, devOnly, exceptRunner, extendConfigEnv, runnerOnly, selectPlugins };
|
|
27
|
+
export { CoreframeConfigEnv, CoreframeHost, CoreframePlatform, CoreframeRunner, PluginFilter, PluginSelector, SelectablePlugin, apply, buildOnly, devOnly, exceptRunner, extendConfigEnv, resolveCoreframeHost, resolveCoreframePlatform, resolveCoreframeRunner, runnerOnly, selectPlugins };
|
package/dist/plugins/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,
|
|
1
|
+
function e(e,i=process.env){let a=r(i);return{...e,host:t(i,a),platform:a,runner:n(i)}}function t(e=process.env,t=r(e)){return e.TAURI_ENV_PLATFORM===void 0?t===`web`?`browser`:`flutter`:`tauri`}function n(e=process.env){return e.VITEST===`true`?`vitest`:e.IS_RR_BUILD_REQUEST===`yes`?`react-router-prerender`:`vite`}function r(e=process.env){let t=e.COREFRAME_PLATFORM??e.TAURI_ENV_PLATFORM??`web`,n=t===`darwin`?`macos`:t===`win32`?`windows`:t;if(n!==`web`&&n!==`ios`&&n!==`android`&&n!==`macos`&&n!==`windows`&&n!==`linux`)throw Error(`Unsupported Coreframe platform: ${JSON.stringify(t)}.`);return n}function i(e,t){return t.map(t=>u(e,t))}function a(e,t){return n=>e(n)?u(n,t):null}function o(e){return a(e=>e.command===`build`,e)}function s(e){return a(e=>e.command===`serve`,e)}function c(e,t){return a(t=>d(e,t.runner),t)}function l(e,t){return a(t=>!d(e,t.runner),t)}function u(e,t){return typeof t==`function`?t(e):t}function d(e,t){return(typeof e==`string`?[e]:e).includes(t)}export{a as apply,o as buildOnly,s as devOnly,l as exceptRunner,e as extendConfigEnv,t as resolveCoreframeHost,r as resolveCoreframePlatform,n as resolveCoreframeRunner,c as runnerOnly,i as selectPlugins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readProjectConfig as e}from"@coreframe/
|
|
1
|
+
import{readProjectConfig as e}from"@coreframe/config";import{managedDevEnv as t,managedDevEvents as n}from"@coreframe/dev-contracts/managed-dev";import{startManagedDevSession as r}from"@coreframe/dev/managed-dev";const i=Symbol.for(`@coreframe/vite/managed-dev-session-states`),a=(()=>{let e=globalThis;return e[i]??=new Map})();function o({env:i=process.env,startSession:a=r}={}){let o=i[t]===`1`,l,u,d,f,p=!1,m=!1,h={mode:`waiting`,warnings:[]},g=()=>f??=(async()=>{m=!0,await d,p=!1;let e=l;l=void 0,e&&u&&await c(u,e)})();return{name:`coreframe:managed-dev`,apply:`serve`,config(){return{define:{"import.meta.env.COREFRAME_MANAGED_DEV":JSON.stringify(o)}}},configureServer(t){if(!o)return;let r=t.config.root;u=r;let f=!1,_=()=>l?.getStatus()??h,v=()=>{m||t.ws.send(n.status,{status:_()})},y=(e,t)=>t.send(n.status,{status:_()}),b=async(e,r)=>{let i;try{if(!p||!l)throw Error(`Managed development is still initializing.`);let i=await l.action(e.action,{onCodexEvent:t=>r.send(n.codex,{...t,requestId:e.requestId})});r.send(n.actionResult,{requestId:e.requestId,...i}),f&&(f=!1,queueMicrotask(()=>{g().then(()=>t.restart()).catch(e=>{let n=e instanceof Error?e.message:String(e);t.config.logger.error(`Coreframe managed development restart failed: ${n}`,{error:e instanceof Error?e:void 0})})}));return}catch(e){i=e}let a=i instanceof Error?i.message:String(i);t.config.logger.error(`Coreframe managed development action failed: ${a}`,{error:i instanceof Error?i:void 0}),r.send(n.actionResult,{error:a,requestId:e.requestId,status:_()})};t.ws.on(n.statusRequest,y),t.ws.on(n.action,b),d=(async()=>{let n;try{let t=await e({cwd:r});if(m)return;if(n=await a({config:t,cwd:r,env:i,onRestart:()=>{f=!0},onStatusChange:e=>{h=e,v()}}),l=n,h=n.getStatus(),m){l=void 0,await n.close();return}if(await s(r,n),m){l=void 0,await c(r,n);return}p=!0}catch(e){if(l===n&&(l=void 0),!m){let n=e instanceof Error?e.message:String(e);h={message:n,mode:`error`,warnings:[n]},t.config.logger.error(`Coreframe managed development initialization failed: ${n}`,{error:e instanceof Error?e:void 0}),v()}}})(),t.httpServer?.once(`close`,()=>{t.ws.off(n.statusRequest,y),t.ws.off(n.action,b),g()})},async closeBundle(){await g()}}}async function s(e,t){await l(e,async e=>{let n=e.session;e.session=void 0,await n?.close();try{await t.activate(),e.session=t}catch(e){throw await t.close(),e}})}async function c(e,t){await l(e,async e=>{e.session===t&&(e.session=void 0),await t.close()})}async function l(e,t){let n=a.get(e);n||(n={transition:Promise.resolve()},a.set(e,n));let r=n.transition,i;n.transition=new Promise(e=>{i=()=>e()}),await r;try{await t(n)}finally{i()}}export{o as coreframeManagedDevPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@coreframe/flutter-tools";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from"@coreframe/flutter-tools";export{};
|
package/dist/plugins/preset.d.ts
CHANGED
package/dist/plugins/preset.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{coreframeAssetsPlugin as e}from"./assets.js";import{
|
|
1
|
+
import{coreframeAssetsPlugin as e}from"./assets.js";import{coreframeCodexTaskPlugin as t}from"./codex-task.js";import{coreframeDashboardPlugin as n}from"./dashboard.js";import{coreframeDevelopmentControlsPlugin as r}from"./development-controls.js";import{coreframeFaviconPlugin as i}from"./favicon.js";import{t as a}from"../icons-vb_lG-av.js";import{coreframeManagedDevPlugin as o}from"./managed-dev.js";import{coreframeStartupTimingPlugin as s}from"./startup-timing.js";import{t as c}from"../worktree-head-BZrhW1-Q.js";function l(l={}){return[s(),e(),...a(),r(),o(),t(),c(),n(),...i(l.webManifest===void 0?void 0:{webManifest:l.webManifest})]}export{l as coreframeVitePreset};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { RouteConfigEntry, getAppDirectory } from "@react-router/dev/routes";
|
|
2
|
+
|
|
3
|
+
//#region plugins/routes.d.ts
|
|
4
|
+
type MobileRouteStack = string | {
|
|
5
|
+
/** Stable finite stack identifier. */id: string; /** Marks this Flutter-wrapped DOM route as the stack root. */
|
|
6
|
+
root?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type MobileRouteLayerMetadata = {
|
|
9
|
+
/** Absolute route compositor plane. Defaults to zero. */z?: number; /** Optional one-level named stack membership. */
|
|
10
|
+
stack?: MobileRouteStack;
|
|
11
|
+
};
|
|
12
|
+
type NativeRouteRegistration = {
|
|
13
|
+
/** Module containing the route's non-DOM controller. */path: string; /** Symbolic Flutter shell transition selected when this route is presented. */
|
|
14
|
+
transitionKey?: string;
|
|
15
|
+
} & MobileRouteLayerMetadata;
|
|
16
|
+
type MobileRouteRegistration = {
|
|
17
|
+
/** Opts the ordinary DOM implementation into Flutter-owned physical presentation on mobile. */surface: "flutter-dom"; /** Symbolic Flutter shell transition selected when this route is presented. */
|
|
18
|
+
transitionKey?: string; /** Optional opaque route backdrop used while platform transitions fade route content. */
|
|
19
|
+
underlayColor?: string;
|
|
20
|
+
} & MobileRouteLayerMetadata;
|
|
21
|
+
declare const DEFAULT_MOBILE_TRANSITION_KEY: "platform";
|
|
22
|
+
type CoreframeRouteConfigEntry = Omit<RouteConfigEntry, "children"> & {
|
|
23
|
+
children?: CoreframeRouteConfigEntry[]; /** Selects native handling for this route on native hosts. */
|
|
24
|
+
native?: NativeRouteRegistration; /** Selects an explicit mobile presentation policy without changing the DOM route projection. */
|
|
25
|
+
mobile?: MobileRouteRegistration;
|
|
26
|
+
};
|
|
27
|
+
type RouteConfig = CoreframeRouteConfigEntry[] | Promise<CoreframeRouteConfigEntry[]>;
|
|
28
|
+
type NativeRouteManifestEntry = {
|
|
29
|
+
routeId: string;
|
|
30
|
+
canonicalPath: string;
|
|
31
|
+
caseSensitive: boolean;
|
|
32
|
+
routeModulePath: string;
|
|
33
|
+
controllerModulePath: string;
|
|
34
|
+
transitionKey: string;
|
|
35
|
+
};
|
|
36
|
+
type MobileRouteManifestEntry = {
|
|
37
|
+
routeId: string;
|
|
38
|
+
canonicalPath: string;
|
|
39
|
+
caseSensitive: boolean;
|
|
40
|
+
routeModulePath: string;
|
|
41
|
+
surface: "flutter-dom" | "native";
|
|
42
|
+
transitionKey: string;
|
|
43
|
+
z: number;
|
|
44
|
+
stackId: string | null;
|
|
45
|
+
stackRoot: boolean;
|
|
46
|
+
underlayColor: string | null;
|
|
47
|
+
};
|
|
48
|
+
type MobileStackManifestEntry = {
|
|
49
|
+
id: string;
|
|
50
|
+
rootRouteId: string;
|
|
51
|
+
routeIds: readonly string[];
|
|
52
|
+
};
|
|
53
|
+
type CompiledRouteRegistrations = {
|
|
54
|
+
routes: RouteConfigEntry[];
|
|
55
|
+
nativeManifest: NativeRouteManifestEntry[];
|
|
56
|
+
mobileManifest: MobileRouteManifestEntry[];
|
|
57
|
+
stacks: MobileStackManifestEntry[];
|
|
58
|
+
};
|
|
59
|
+
type RouteOptions = Pick<CoreframeRouteConfigEntry, "id" | "index" | "caseSensitive" | "mobile" | "native">;
|
|
60
|
+
type IndexOptions = Pick<CoreframeRouteConfigEntry, "id">;
|
|
61
|
+
type LayoutOptions = Pick<CoreframeRouteConfigEntry, "id">;
|
|
62
|
+
declare function route(path: string | null | undefined, file: string, children?: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry;
|
|
63
|
+
declare function route(path: string | null | undefined, file: string, options: RouteOptions, children?: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry;
|
|
64
|
+
declare function index(file: string, options?: IndexOptions): CoreframeRouteConfigEntry;
|
|
65
|
+
declare function layout(file: string, children?: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry;
|
|
66
|
+
declare function layout(file: string, options: LayoutOptions, children?: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry;
|
|
67
|
+
declare function prefix(prefixPath: string, routes: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry[];
|
|
68
|
+
declare function relative(directory: string): {
|
|
69
|
+
route(path: string | null | undefined, file: string, optionsOrChildren?: RouteOptions | CoreframeRouteConfigEntry[], children?: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry;
|
|
70
|
+
index(file: string, options?: IndexOptions): CoreframeRouteConfigEntry;
|
|
71
|
+
layout(file: string, optionsOrChildren?: LayoutOptions | CoreframeRouteConfigEntry[], children?: CoreframeRouteConfigEntry[]): CoreframeRouteConfigEntry;
|
|
72
|
+
prefix: typeof prefix;
|
|
73
|
+
};
|
|
74
|
+
declare function compileRouteRegistrations(config: readonly CoreframeRouteConfigEntry[]): CompiledRouteRegistrations;
|
|
75
|
+
//#endregion
|
|
76
|
+
export { CompiledRouteRegistrations, CoreframeRouteConfigEntry, DEFAULT_MOBILE_TRANSITION_KEY, MobileRouteManifestEntry, MobileRouteRegistration, MobileRouteStack, MobileStackManifestEntry, NativeRouteManifestEntry, NativeRouteRegistration, RouteConfig, compileRouteRegistrations, getAppDirectory, index, layout, prefix, relative, route };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FLUTTER_DOM_ROUTE_ID as e}from"@coreframe/lib/shell";import{getAppDirectory as t,index as n,layout as r,prefix as i,relative as a,route as o}from"@react-router/dev/routes";const s=`platform`,c=Symbol(`coreframe-route-registration`);function l(e,t,n,r){let i=Array.isArray(n)||n===void 0?void 0:n,a=Array.isArray(n)?n:r,s=i===void 0?void 0:{id:i.id,index:i.index,caseSensitive:i.caseSensitive},l=s===void 0?o(e,t,a):o(e,t,s,a);return i?.native!==void 0&&(l.native=i.native,l[c]={authoredControllerPath:i.native.path}),i?.mobile!==void 0&&(l.mobile=i.mobile),l}function u(e,t){return n(e,t)}function d(e,t,n){return Array.isArray(t)?r(e,t):t===void 0?r(e):r(e,t,n)}function f(e,t){return i(e,t)}function p(e){let t=a(e);return{route(e,n,r,i){let a=l(e,n,r,i);return a.file=t.route(null,n).file,a.native!==void 0&&(a.native={path:t.route(null,a.native.path).file}),a},index(e,n){return t.index(e,n)},layout(e,n,r){return Array.isArray(n)?t.layout(e,n):n===void 0?t.layout(e):t.layout(e,n,r)},prefix:f}}function m(e){if(!Array.isArray(e))throw Error(`Coreframe route config must be an array. Await asynchronous route config before compiling it.`);let t=[],n=[],r=new Map,i=new Map;return{routes:e.map((e,a)=>h(e,`/`,`routes[${a}]`,r,i,t,n)),nativeManifest:t,mobileManifest:n,stacks:_(n)}}function h(e,t,n,r,i,a,o){if(typeof e!=`object`||!e||typeof e.file!=`string`)throw Error(`Invalid Coreframe route registration at ${n}: expected a route helper result.`);if(e.id!==void 0){if(e.id.length===0||e.id.trim()!==e.id)throw Error(`Invalid route id ${JSON.stringify(e.id)} at ${n}: IDs must be non-empty and cannot have surrounding whitespace.`);let t=r.get(e.id);if(t!==void 0)throw Error(`Duplicate route id ${JSON.stringify(e.id)} at ${n}; it is already registered at ${t}.`);r.set(e.id,n)}let s=S(t,e.path);if(e.mobile!==void 0&&e.native!==void 0)throw Error(`Conflicting mobile surface policy for route ${JSON.stringify(e.id)} at ${n}: use either mobile.surface or native, not both.`);if(e.mobile!==void 0&&e.mobile.surface!==`flutter-dom`)throw Error(`Invalid mobile surface policy for route ${JSON.stringify(e.id)} at ${n}: expected "flutter-dom".`);if((e.mobile!==void 0||e.native!==void 0)&&x(e,n),e.native!==void 0){b(e,n);let t=v(e,n),r=e.id,c=C(s),l=i.get(c);if(l!==void 0)throw Error(`Ambiguous native route ${JSON.stringify(r)} at ${n}: canonical path ${JSON.stringify(s)} conflicts with native route ${JSON.stringify(l)}.`);i.set(c,r),a.push({routeId:r,canonicalPath:s,caseSensitive:e.caseSensitive===!0,routeModulePath:e.file,controllerModulePath:e.native.path,transitionKey:t}),o.push({routeId:r,canonicalPath:s,caseSensitive:e.caseSensitive===!0,routeModulePath:e.file,surface:`native`,transitionKey:t,underlayColor:null,...g(e,n)})}else if(e.mobile!==void 0){y(e.mobile.underlayColor,n);let t=v(e,n),r=e.id,a=C(s),c=i.get(a);if(c!==void 0)throw Error(`Ambiguous mobile route ${JSON.stringify(r)} at ${n}: canonical path ${JSON.stringify(s)} conflicts with mobile route ${JSON.stringify(c)}.`);i.set(a,r),o.push({routeId:r,canonicalPath:s,caseSensitive:e.caseSensitive===!0,routeModulePath:e.file,surface:`flutter-dom`,transitionKey:t,underlayColor:e.mobile.underlayColor??null,...g(e,n)})}let c={file:e.file};return`children`in e&&(c.children=e.children?.map((e,t)=>h(e,s,`${n}.children[${t}]`,r,i,a,o))),`path`in e&&(c.path=e.path),`id`in e&&(c.id=e.id),`index`in e&&(c.index=e.index),`caseSensitive`in e&&(c.caseSensitive=e.caseSensitive),c}function g(e,t){let n=e.native??e.mobile;if(n===void 0)return{stackId:null,stackRoot:!1,z:0};let r=n.z??0;if(typeof r!=`number`||!Number.isFinite(r))throw Error(`Invalid mobile route z ${JSON.stringify(r)} for route ${JSON.stringify(e.id)} at ${t}: z must be a finite number.`);let i=n.stack,a=typeof i==`object`?i:void 0,o=typeof i==`string`?i:a?.id,s=a?.root??!1;if(o===void 0&&s)throw Error(`Invalid mobile stack metadata for route ${JSON.stringify(e.id)} at ${t}: stackRoot requires a stack id.`);if(o!==void 0&&(typeof o!=`string`||o.length===0||o.trim()!==o))throw Error(`Invalid mobile stack id ${JSON.stringify(o)} for route ${JSON.stringify(e.id)} at ${t}: IDs must be non-empty and cannot have surrounding whitespace.`);if(typeof s!=`boolean`)throw Error(`Invalid mobile stack root flag for route ${JSON.stringify(e.id)} at ${t}: expected a boolean.`);return{stackId:o??null,stackRoot:s,z:r}}function _(e){let t=new Map;for(let n of e){if(n.stackId===null){if(n.stackRoot)throw Error(`Mobile route ${JSON.stringify(n.routeId)} marks a stack root without a stack.`);continue}let e=t.get(n.stackId)??[];e.push(n),t.set(n.stackId,e)}return[...t.entries()].sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>{let n=t.filter(e=>e.stackRoot);if(n.length!==1)throw Error(`Mobile stack ${JSON.stringify(e)} must declare exactly one Flutter DOM root route.`);let r=n[0];if(r.surface!==`flutter-dom`)throw Error(`Mobile stack ${JSON.stringify(e)} root route ${JSON.stringify(r.routeId)} must use the Flutter DOM surface.`);return{id:e,rootRouteId:r.routeId,routeIds:t.map(({routeId:e})=>e).sort((e,t)=>e.localeCompare(t))}})}function v(e,t){let n=e.native?.transitionKey??e.mobile?.transitionKey;if(n===void 0)return s;if(typeof n!=`string`||n.length===0||n.trim()!==n)throw Error(`Invalid mobile transition key ${JSON.stringify(n)} for route ${JSON.stringify(e.id)} at ${t}: keys must be non-empty and cannot have surrounding whitespace.`);return n}function y(e,t){if(e!==void 0&&(typeof e!=`string`||!/^#[0-9A-Fa-f]{6}$/.test(e)))throw Error(`Invalid mobile underlay color ${JSON.stringify(e)} at ${t}: expected a solid #RRGGBB color.`)}function b(e,t){x(e,t);let n=e[c]?.authoredControllerPath??e.native?.path;if(typeof n!=`string`||n.trim()!==n||!n.startsWith(`.`)||n.includes(`\\`)||n.includes(`?`)||n.includes(`#`)||!/\.native-page\.(?:ts|tsx)$/.test(n))throw Error(`Invalid native controller path ${JSON.stringify(n)} for route ${JSON.stringify(e.id)} at ${t}: expected a relative *.native-page.ts or *.native-page.tsx module path without query, hash, or backslash characters.`)}function x(t,n){if(t.id===void 0)throw Error(`Mobile route at ${n} (${JSON.stringify(t.file)}) requires an explicit stable id.`);if(t.id===`root`)throw Error(`Mobile route at ${n} cannot use React Router's reserved id "root".`);if(t.id===e)throw Error(`Mobile route at ${n} cannot use Coreframe's reserved Flutter-DOM route id ${JSON.stringify(e)}.`);if(t.path===void 0&&t.index!==!0)throw Error(`Mobile route ${JSON.stringify(t.id)} at ${n} must have an addressable path or be an index route.`)}function S(e,t){if(t===void 0||t===``)return e;let n=(t.startsWith(`/`)?t:`${e===`/`?``:e}/${t}`).replace(/\/{2,}/g,`/`);return n.startsWith(`/`)?n:`/${n}`}function C(e){return e.split(`/`).map(e=>e.startsWith(`:`)?`:${e.endsWith(`?`)?`?`:``}`:e).join(`/`).toLowerCase()}export{s as DEFAULT_MOBILE_TRANSITION_KEY,m as compileRouteRegistrations,t as getAppDirectory,u as index,d as layout,f as prefix,p as relative,l as route};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveCoreframeHost as e,resolveCoreframePlatform as t}from"./index.js";import{realpathSync as n}from"node:fs";import{extname as r,isAbsolute as i,relative as a,resolve as o,sep as s}from"node:path";import{parseSync as c}from"vite";const l=`virtual:coreframe-shell`,u=`\0${l}`,d=`virtual:coreframe-shell/composition`,f=`virtual:coreframe-shell/auth`,p=`\0${f}`,m=`virtual:coreframe-shell/auth-composition`,h=`virtual:coreframe-router`,g=`\0${h}`,_=`virtual:coreframe-router/composition`,v={browser:{auth:`@coreframe/lib/auth-transport/browser`,router:`react-router`,shell:`@coreframe/lib/shell/dom`},flutter:{auth:`@coreframe/flutter-js/client`,router:`@coreframe/flutter-js/router`,shell:`@coreframe/flutter-js/composition`},tauri:{auth:`./src/api/client/tauri-auth.ts`,router:`react-router`,shell:`@coreframe/lib/shell/dom`}};function y(){let n=t(),r=e(process.env,n),i=v[r],a=process.cwd();return{name:`coreframe:shell`,enforce:`pre`,config(){return{define:{"import.meta.env.PLATFORM":JSON.stringify(n)}}},configResolved(e){a=e.root},transform(e,t){let n=b(t);if(r!==`flutter`||!C(t,a)||n===void 0)return;let{module:i}=c(t,e,{lang:n});(i.staticImports.some(({moduleRequest:e})=>e.value===`react-router`)||i.staticExports.some(({entries:e})=>e.some(({moduleRequest:e})=>e?.value===`react-router`))||i.dynamicImports.some(({moduleRequest:t})=>x(e.slice(t.start,t.end))))&&S()},resolveId(e){if(e===l)return u;if(e===f)return p;if(e===h)return g;if(e===d)return this.resolve(i.shell,o(a,`vite.config.ts`),{skipSelf:!0});if(e===m)return this.resolve(i.auth,o(a,`vite.config.ts`),{skipSelf:!0});if(e===_)return this.resolve(i.router,o(a,`vite.config.ts`),{skipSelf:!0});if(e===`virtual:coreframe-flutter/application`)return this.resolve(o(a,`src/web/app/flutter-shell/application.ts`),void 0,{skipSelf:!0});if(e===`virtual:coreframe-flutter/native-bridge`)return this.resolve(o(a,`src/web/app/flutter-shell/generated/native-bridge.ts`),void 0,{skipSelf:!0});if(e===`virtual:coreframe-flutter/native-pages`)return this.resolve(o(a,`src/web/app/flutter-shell/generated/native-pages.ts`),void 0,{skipSelf:!0})},load(e){if(e===u)return`export * from ${JSON.stringify(d)};`;if(e===p)return`export { createAuthenticatedFetch, createAuthClient } from ${JSON.stringify(m)};`;if(e===g)return`export * from ${JSON.stringify(_)};`}}}function b(e){let t=r(e.split(`?`,1)[0]);if(t===`.jsx`)return`jsx`;if(t===`.ts`||t===`.mts`||t===`.cts`)return`ts`;if(t===`.tsx`)return`tsx`;if(t===`.js`||t===`.mjs`||t===`.cjs`)return`js`}function x(e){return e===`"react-router"`||e===`'react-router'`||e==="`react-router`"}function S(){throw Error(`Flutter application modules must import React Router APIs from ${JSON.stringify(h)}; direct ${JSON.stringify(`react-router`)} imports bypass the native navigation contract. Importing ${JSON.stringify(`react-router/dom`)} remains supported.`)}function C(e,t){let r=e.split(`?`,1)[0];if(!i(r))return!1;let o=a(n(t),n(r)),c=o.split(s);return o!==``&&o!==`..`&&!o.startsWith(`..${s}`)&&!i(o)&&!c.includes(`node_modules`)&&c[0]!==`.react-router`}export{y as coreframeShellPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devStartupStartedAtEnv as e,devStartupTimingsEnv as t}from"@coreframe/
|
|
1
|
+
import{devStartupStartedAtEnv as e,devStartupTimingsEnv as t}from"@coreframe/dev/timing";function n({env:n=process.env,now:r=Date.now}={}){let i=n[t]===`1`,a=r(),o=Number(n[e]),s=Number.isFinite(o)&&o>=0?o:a;return{name:`coreframe:startup-timing`,enforce:`pre`,configureServer(e){if(!i)return;let t=t=>{let n=Math.max(0,Math.round(r()-s));e.config.logger.info(`[coreframe:startup] ${t}=${n}ms`)};return t(`vite-configured`),()=>{t(`vite-hooks-complete`),e.httpServer?.once(`listening`,()=>{t(`ready`)})}}}}export{n as coreframeStartupTimingPlugin};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-isolet-root]{color-scheme:light dark;--oc-white:#fff;--oc-gray-0:#f8f9fa;--oc-gray-1:#f1f3f5;--oc-gray-2:#e9ecef;--oc-gray-3:#dee2e6;--oc-gray-4:#ced4da;--oc-gray-5:#adb5bd;--oc-gray-6:#868e96;--oc-gray-7:#495057;--oc-gray-8:#343a40;--oc-gray-9:#212529;--oc-red-0:#fff5f5;--oc-red-2:#ffc9c9;--oc-red-7:#f03e3e;--oc-red-9:#c92a2a;--oc-grape-0:#f8f0fc;--oc-grape-2:#eebefa;--oc-grape-7:#ae3ec9;--oc-grape-9:#862e9c;--oc-blue-0:#e7f5ff;--oc-blue-2:#a5d8ff;--oc-blue-4:#4dabf7;--oc-blue-6:#228be6;--oc-blue-7:#1c7ed6;--oc-blue-9:#1864ab;--oc-green-0:#ebfbee;--oc-green-2:#b2f2bb;--oc-green-7:#37b24d;--oc-green-9:#2b8a3e;--oc-yellow-0:#fff9db;--oc-yellow-2:#ffec99;--oc-yellow-7:#f59f00;--oc-yellow-9:#e67700;--overlay-background:var(--oc-white);--overlay-surface-subtle:var(--oc-gray-0);--overlay-surface-muted:var(--oc-gray-1);--overlay-border:var(--oc-gray-3);--overlay-border-strong:var(--oc-gray-4);--overlay-text:var(--oc-gray-9);--overlay-text-muted:var(--oc-gray-7);--overlay-text-subtle:var(--oc-gray-6);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:var(--oc-blue-0);--overlay-accent-border:var(--oc-blue-2);--overlay-accent-text:var(--oc-blue-9);--overlay-thought-soft:var(--oc-grape-0);--overlay-thought-border:var(--oc-grape-2);--overlay-thought-text:var(--oc-grape-9);--overlay-success-soft:var(--oc-green-0);--overlay-success-border:var(--oc-green-2);--overlay-success-text:var(--oc-green-9);--overlay-warning-soft:var(--oc-yellow-0);--overlay-warning-border:var(--oc-yellow-2);--overlay-warning-text:var(--oc-yellow-9);--overlay-danger-soft:var(--oc-red-0);--overlay-danger-border:var(--oc-red-2);--overlay-danger-text:var(--oc-red-9);color:var(--overlay-text);font:14px/1.45 system-ui,sans-serif}.surface{--managed-dev-bottom-offset:0px;--managed-dev-right-offset:0px}.indicatorButton{appearance:none;bottom:calc(10px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset));cursor:pointer;pointer-events:auto;height:44px;right:calc(10px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset));background:0 0;border:0;justify-content:center;align-items:center;width:44px;padding:0;display:flex;position:fixed}.indicatorButton:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:-3px}.indicatorDot{background:var(--managed-dev-indicator-color);box-shadow:0 0 0 2px var(--overlay-background), 0 0 0 3px var(--overlay-border);height:var(--managed-dev-indicator-size);width:var(--managed-dev-indicator-size);border-radius:50%;display:block;position:relative}.indicatorDot:before{border:max(1px, calc(var(--managed-dev-indicator-size) / 9)) solid var(--managed-dev-indicator-color);border-radius:inherit;content:"";animation:1.8s ease-out infinite radiate;position:absolute;inset:0}.dialog{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 18px 60px color-mix(in srgb, var(--oc-gray-9) 28%, transparent), 0 2px 8px color-mix(in srgb, var(--oc-gray-9) 12%, transparent);color:var(--overlay-text);box-sizing:border-box;height:max-content;inset:auto calc(18px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset)) calc(62px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset)) auto;pointer-events:auto;border-radius:14px;width:min(430px,100vw - 36px);max-width:min(430px,100vw - 36px);max-height:min(620px,100dvh - 80px);margin:0;padding:18px;position:fixed;overflow:auto}.dialog[open]{align-content:start;gap:12px;display:grid}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.title{margin:0;font-size:16px}.iconButton{color:inherit;cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.iconButton:hover{background:var(--overlay-surface-muted);border-radius:8px}.iconButton:focus-visible,.debugBackButton:focus-visible,.scenarioButton:focus-visible,.button:focus-visible,.message:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:2px}.content{gap:12px;display:grid}.debugNotice{background:var(--overlay-thought-soft);border:1px solid var(--overlay-thought-border);color:var(--overlay-thought-text);border-radius:10px;margin:0;padding:9px 10px;font-size:12px}.debugToolbar{color:var(--overlay-thought-text);justify-content:space-between;align-items:center;gap:10px;font-size:12px;display:flex}.debugBackButton{color:var(--overlay-thought-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-weight:650}.scenarioList{gap:7px;max-height:min(480px,100dvh - 210px);display:grid;overflow:auto}.scenarioButton{background:var(--overlay-surface-subtle);color:inherit;cursor:pointer;font:inherit;text-align:start;border:1px solid #0000;border-radius:10px;gap:3px;padding:10px;display:grid}.scenarioButton:hover{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.scenarioLabel{font-weight:650}.scenarioDescription{color:var(--overlay-text-muted);font-size:12px}.paragraph{margin:0}.codexOutput{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;white-space:pre-wrap;word-break:break-word;border-radius:10px;max-height:280px;margin:0;padding:10px;font:12px/1.5 ui-monospace,monospace;overflow:auto}.codexWorking{color:var(--overlay-text-muted);font:12px/1.5 ui-monospace,monospace}.codexWorkingSpinner{color:var(--overlay-accent)}.codexTranscript{gap:10px;max-height:360px;display:grid;overflow:auto}.codexMessage{border:1px solid #0000;border-radius:10px;gap:5px;padding:10px;display:grid}.codexMessageUser{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.codexMessageThought{background:var(--overlay-thought-soft);border-color:var(--overlay-thought-border)}.codexMessageAgent{background:var(--overlay-success-soft);border-color:var(--overlay-success-border)}.codexMessageLabel{color:var(--overlay-text-muted);letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:11px;font-weight:650}.codexMessageText,.codexWaiting{white-space:pre-wrap;word-break:break-word;margin:0;font:12px/1.5 ui-monospace,monospace}.codexWaiting{color:var(--overlay-text-subtle)}.rebasedCommits{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);border-radius:10px;gap:7px;padding:10px;display:grid}.rebasedCommitList{gap:5px;margin:0;padding:0;list-style:none;display:grid}.rebasedCommit{grid-template-columns:auto auto minmax(0,1fr);align-items:baseline;gap:7px;font-size:12px;display:grid}.rebasedCommit>svg{color:var(--overlay-success-text);align-self:center}.rebasedCommit>code{color:var(--overlay-text-muted);font-size:11px}.rebasedCommit>span{overflow-wrap:anywhere}.previousThoughts{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:10px;padding:8px 10px}.previousThoughts>summary{cursor:pointer;font-size:12px;font-weight:600}.previousThoughtList{gap:8px;padding-top:8px;display:grid}.files{gap:7px;max-height:190px;display:grid;overflow:auto}.checkbox{overflow-wrap:anywhere;align-items:start;gap:8px;display:flex}.checkbox input{accent-color:var(--overlay-accent)}.filePath{font-family:ui-monospace,monospace}.message{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:var(--overlay-text);resize:vertical;border-radius:10px;width:100%;min-height:92px;padding:10px;font-family:ui-monospace,monospace}.actions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.button{border:1px solid var(--overlay-border-strong);cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:7px 11px;transition:opacity .14s;display:inline-flex}.button:hover:not(:disabled){background:var(--overlay-surface-muted)}.primary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.primary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.button:disabled{cursor:wait;opacity:.55}.iconOnly{min-width:32px;padding:7px}.warning{color:var(--overlay-warning-text);white-space:pre-wrap}.checkFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.checkCommand{margin:0;font-family:ui-monospace,monospace;font-weight:600}.checkGuidance{margin:3px 0 0;font-size:12px}.setupFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.actionError{background:var(--overlay-warning-soft);border:1px solid var(--overlay-warning-border);color:var(--overlay-warning-text);white-space:pre-wrap;border-radius:10px;gap:10px;padding:10px;display:grid}.errorMessage{grid-template-columns:auto 1fr;align-items:start;gap:8px;display:grid}.actionSuccess{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);color:var(--overlay-success-text);border-radius:10px;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:10px;display:grid}.errorIcon,.successIcon{margin-top:1px}@media (prefers-color-scheme:dark){[data-isolet-root]{--overlay-background:var(--oc-gray-9);--overlay-surface-subtle:var(--oc-gray-8);--overlay-surface-muted:var(--oc-gray-7);--overlay-border:var(--oc-gray-7);--overlay-border-strong:var(--oc-gray-6);--overlay-text:var(--oc-gray-0);--overlay-text-muted:var(--oc-gray-4);--overlay-text-subtle:var(--oc-gray-5);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:color-mix(in srgb, var(--oc-blue-9) 32%, var(--overlay-background));--overlay-accent-border:var(--oc-blue-7);--overlay-accent-text:var(--oc-blue-2);--overlay-thought-soft:color-mix(in srgb, var(--oc-grape-9) 30%, var(--overlay-background));--overlay-thought-border:var(--oc-grape-7);--overlay-thought-text:var(--oc-grape-2);--overlay-success-soft:color-mix(in srgb, var(--oc-green-9) 30%, var(--overlay-background));--overlay-success-border:var(--oc-green-7);--overlay-success-text:var(--oc-green-2);--overlay-warning-soft:color-mix(in srgb, var(--oc-yellow-9) 24%, var(--overlay-background));--overlay-warning-border:var(--oc-yellow-7);--overlay-warning-text:var(--oc-yellow-2);--overlay-danger-soft:color-mix(in srgb, var(--oc-red-9) 30%, var(--overlay-background));--overlay-danger-border:var(--oc-red-7);--overlay-danger-text:var(--oc-red-2)}}@keyframes radiate{0%{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (width<=600px){.dialog{inset:auto calc(12px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset)) calc(62px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset)) calc(12px + env(safe-area-inset-left,0px));width:auto;max-height:calc(100dvh - 86px);padding:16px}.button{min-height:44px}.checkbox{align-items:center;min-height:44px}.iconButton{min-width:44px;min-height:44px}.iconOnly{min-width:44px}}@media (prefers-reduced-motion:reduce){.indicatorDot:before{opacity:.45;animation:none;transform:scale(1.65)}}
|
|
1
|
+
[data-isolet-root]{color-scheme:light dark;--oc-white:#fff;--oc-gray-0:#f8f9fa;--oc-gray-1:#f1f3f5;--oc-gray-2:#e9ecef;--oc-gray-3:#dee2e6;--oc-gray-4:#ced4da;--oc-gray-5:#adb5bd;--oc-gray-6:#868e96;--oc-gray-7:#495057;--oc-gray-8:#343a40;--oc-gray-9:#212529;--oc-red-0:#fff5f5;--oc-red-2:#ffc9c9;--oc-red-7:#f03e3e;--oc-red-9:#c92a2a;--oc-grape-0:#f8f0fc;--oc-grape-2:#eebefa;--oc-grape-7:#ae3ec9;--oc-grape-9:#862e9c;--oc-blue-0:#e7f5ff;--oc-blue-2:#a5d8ff;--oc-blue-4:#4dabf7;--oc-blue-6:#228be6;--oc-blue-7:#1c7ed6;--oc-blue-9:#1864ab;--oc-green-0:#ebfbee;--oc-green-2:#b2f2bb;--oc-green-7:#37b24d;--oc-green-9:#2b8a3e;--oc-yellow-0:#fff9db;--oc-yellow-2:#ffec99;--oc-yellow-7:#f59f00;--oc-yellow-9:#e67700;--overlay-background:var(--oc-white);--overlay-surface-subtle:var(--oc-gray-0);--overlay-surface-muted:var(--oc-gray-1);--overlay-border:var(--oc-gray-3);--overlay-border-strong:var(--oc-gray-4);--overlay-text:var(--oc-gray-9);--overlay-text-muted:var(--oc-gray-7);--overlay-text-subtle:var(--oc-gray-6);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:var(--oc-blue-0);--overlay-accent-border:var(--oc-blue-2);--overlay-accent-text:var(--oc-blue-9);--overlay-thought-soft:var(--oc-grape-0);--overlay-thought-border:var(--oc-grape-2);--overlay-thought-text:var(--oc-grape-9);--overlay-success-soft:var(--oc-green-0);--overlay-success-border:var(--oc-green-2);--overlay-success-text:var(--oc-green-9);--overlay-warning-soft:var(--oc-yellow-0);--overlay-warning-border:var(--oc-yellow-2);--overlay-warning-text:var(--oc-yellow-9);--overlay-danger-soft:var(--oc-red-0);--overlay-danger-border:var(--oc-red-2);--overlay-danger-text:var(--oc-red-9);color:var(--overlay-text);font:14px/1.45 system-ui,sans-serif}.surface{--managed-dev-bottom-offset:0px;--managed-dev-right-offset:0px}.indicatorButton{appearance:none;bottom:calc(10px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset));cursor:pointer;pointer-events:auto;height:44px;right:calc(10px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset));background:0 0;border:0;justify-content:center;align-items:center;width:44px;padding:0;display:flex;position:fixed}.indicatorButton:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:-3px}.indicatorDot{background:var(--managed-dev-indicator-color);box-shadow:inset 0 0 0 .5px color-mix(in srgb, var(--overlay-border) 30%, transparent);height:var(--managed-dev-indicator-size);width:var(--managed-dev-indicator-size);border-radius:50%;display:block;position:relative}.indicatorDot:before{border:max(1px, calc(var(--managed-dev-indicator-size) / 9)) solid var(--managed-dev-indicator-color);border-radius:inherit;content:"";animation:1.8s ease-out infinite radiate;position:absolute;inset:0}.dialog{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 18px 60px color-mix(in srgb, var(--oc-gray-9) 28%, transparent), 0 2px 8px color-mix(in srgb, var(--oc-gray-9) 12%, transparent);color:var(--overlay-text);box-sizing:border-box;height:auto;inset:0 calc(18px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset)) var(--managed-dev-bottom-offset) auto;pointer-events:auto;border-radius:16px 0 0 16px;width:min(520px,100vw - 18px);max-width:min(520px,100vw - 18px);max-height:none;margin:0;padding:20px;position:fixed;overflow:hidden}.dialog[open]{flex-direction:column;gap:12px;display:flex}.drawerBody{gap:16px;min-height:0;display:grid;overflow:auto}.iconButton{color:inherit;cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.iconButton:hover{background:var(--overlay-surface-muted);border-radius:8px}.iconButton:focus-visible,.debugBackButton:focus-visible,.scenarioButton:focus-visible,.sectionLink:focus-visible,.button:focus-visible,.message:focus-visible,.codexButton:focus-visible,.codexPrompt:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:2px}.content{gap:12px;display:grid}.section{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:12px;gap:12px;padding:14px;display:grid}.sectionHeading{justify-content:space-between;align-items:start;gap:12px;display:flex}.sectionTitle{margin:0;font-size:13px}.sectionDescription{color:var(--overlay-text-muted);margin:3px 0 0;font-size:12px}.sectionLink{color:var(--overlay-accent-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-size:12px}.debugNotice{background:var(--overlay-thought-soft);border:1px solid var(--overlay-thought-border);color:var(--overlay-thought-text);border-radius:10px;margin:0;padding:9px 10px;font-size:12px}.debugToolbar{color:var(--overlay-thought-text);justify-content:space-between;align-items:center;gap:10px;font-size:12px;display:flex}.debugBackButton{color:var(--overlay-thought-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-weight:650}.scenarioList{gap:7px;max-height:min(480px,100dvh - 210px);display:grid;overflow:auto}.scenarioButton{background:var(--overlay-surface-subtle);color:inherit;cursor:pointer;font:inherit;text-align:start;border:1px solid #0000;border-radius:10px;gap:3px;padding:10px;display:grid}.scenarioButton:hover{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.scenarioLabel{font-weight:650}.scenarioDescription{color:var(--overlay-text-muted);font-size:12px}.paragraph{margin:0}.codexOutput{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;white-space:pre-wrap;word-break:break-word;border-radius:10px;max-height:280px;margin:0;padding:10px;font:12px/1.5 ui-monospace,monospace;overflow:auto}.codexForm{gap:12px;display:grid}.codexPrompt{background:var(--overlay-background);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:10px;width:100%;min-height:130px;padding:10px 12px}.codexHint{color:var(--overlay-text-subtle);margin:0;font-size:12px}.codexError{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:9px;margin:0;padding:8px 10px}.codexActions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.codexButton{border:1px solid var(--overlay-border-strong);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;min-height:36px;padding:7px 11px;display:inline-flex}.codexButton:hover:not(:disabled){background:var(--overlay-surface-muted)}.codexPrimary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.codexPrimary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.codexButton:disabled{cursor:wait;opacity:.55}.codexToast{color:var(--overlay-success-text);font-size:12px}.codexWorking{color:var(--overlay-text-muted);font:12px/1.5 ui-monospace,monospace}.codexWorkingSpinner{color:var(--overlay-accent)}.codexTranscript{gap:10px;max-height:360px;display:grid;overflow:auto}.codexMessage{border:1px solid #0000;border-radius:10px;gap:5px;padding:10px;display:grid}.codexMessageUser{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.codexMessageThought{background:var(--overlay-thought-soft);border-color:var(--overlay-thought-border)}.codexMessageAgent{background:var(--overlay-success-soft);border-color:var(--overlay-success-border)}.codexMessageHeader{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.codexMessageLabel{color:var(--overlay-text-muted);letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:11px;font-weight:650}.codexMessageAge{color:var(--overlay-text-subtle);white-space:nowrap;font-size:11px}.codexMessageText,.codexWaiting{white-space:pre-wrap;word-break:break-word;margin:0;font:12px/1.5 ui-monospace,monospace}.codexWaiting{color:var(--overlay-text-subtle)}.rebasedCommits{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);border-radius:10px;gap:7px;padding:10px;display:grid}.rebasedCommitList{gap:5px;margin:0;padding:0;list-style:none;display:grid}.rebasedCommit{grid-template-columns:auto auto minmax(0,1fr);align-items:baseline;gap:7px;font-size:12px;display:grid}.rebasedCommit>svg{color:var(--overlay-success-text);align-self:center}.rebasedCommit>code{color:var(--overlay-text-muted);font-size:11px}.rebasedCommit>span{overflow-wrap:anywhere}.codexHistory{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:10px;padding:8px 10px}.codexHistory>summary{cursor:pointer;font-size:12px;font-weight:600}.codexHistoryList{gap:8px;padding-top:8px;display:grid}.files{gap:7px;max-height:190px;display:grid;overflow:auto}.checkbox{overflow-wrap:anywhere;align-items:start;gap:8px;display:flex}.checkbox input{accent-color:var(--overlay-accent)}.filePath{font-family:ui-monospace,monospace}.message{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:var(--overlay-text);resize:vertical;border-radius:10px;width:100%;min-height:92px;padding:10px;font-family:ui-monospace,monospace}.button{border:1px solid var(--overlay-border-strong);cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:7px 11px;transition:opacity .14s;display:inline-flex}.button:hover:not(:disabled){background:var(--overlay-surface-muted)}.primary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.iconOnly{min-width:32px;padding:7px}.warning{color:var(--overlay-warning-text);white-space:pre-wrap}.checkFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.checkCommand{margin:0;font-family:ui-monospace,monospace;font-weight:600}.checkGuidance{margin:3px 0 0;font-size:12px}.setupFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.actionError{background:var(--overlay-warning-soft);border:1px solid var(--overlay-warning-border);color:var(--overlay-warning-text);white-space:pre-wrap;border-radius:10px;gap:10px;padding:10px;display:grid}.errorMessage{grid-template-columns:auto 1fr;align-items:start;gap:8px;display:grid}.actionSuccess{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);color:var(--overlay-success-text);border-radius:10px;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:10px;display:grid}.errorIcon,.successIcon{margin-top:1px}@media (prefers-color-scheme:dark){[data-isolet-root]{--overlay-background:var(--oc-gray-9);--overlay-surface-subtle:var(--oc-gray-8);--overlay-surface-muted:var(--oc-gray-7);--overlay-border:var(--oc-gray-7);--overlay-border-strong:var(--oc-gray-6);--overlay-text:var(--oc-gray-0);--overlay-text-muted:var(--oc-gray-4);--overlay-text-subtle:var(--oc-gray-5);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:color-mix(in srgb, var(--oc-blue-9) 32%, var(--overlay-background));--overlay-accent-border:var(--oc-blue-7);--overlay-accent-text:var(--oc-blue-2);--overlay-thought-soft:color-mix(in srgb, var(--oc-grape-9) 30%, var(--overlay-background));--overlay-thought-border:var(--oc-grape-7);--overlay-thought-text:var(--oc-grape-2);--overlay-success-soft:color-mix(in srgb, var(--oc-green-9) 30%, var(--overlay-background));--overlay-success-border:var(--oc-green-7);--overlay-success-text:var(--oc-green-2);--overlay-warning-soft:color-mix(in srgb, var(--oc-yellow-9) 24%, var(--overlay-background));--overlay-warning-border:var(--oc-yellow-7);--overlay-warning-text:var(--oc-yellow-2);--overlay-danger-soft:color-mix(in srgb, var(--oc-red-9) 30%, var(--overlay-background));--overlay-danger-border:var(--oc-red-7);--overlay-danger-text:var(--oc-red-2)}}@keyframes radiate{0%{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (width<=600px){.dialog{max-width:none;padding:calc(16px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));border-radius:0;width:auto;inset:0}.button,.codexButton{min-height:44px}.checkbox{align-items:center;min-height:44px}.iconButton{min-width:44px;min-height:44px}.iconOnly{min-width:44px}}@media (prefers-reduced-motion:reduce){.indicatorDot:before{opacity:.45;animation:none;transform:scale(1.65)}}[data-isolet-root]{color-scheme:light dark;--codex-background:#fff;--codex-border:#dee2e6;--codex-text:#212529;--codex-muted:#495057;--codex-subtle:#868e96;--codex-accent:#228be6;--codex-accent-hover:#1c7ed6;--codex-accent-soft:#e7f5ff;--codex-danger:#c92a2a;--codex-danger-soft:#fff5f5;color:var(--codex-text);font:14px/1.45 system-ui,sans-serif}.surface{pointer-events:none;position:fixed;inset:0}.backdrop{pointer-events:auto;background:#0f172a59;position:fixed;inset:0}.dialog{background:var(--codex-background);border:1px solid var(--codex-border);box-sizing:border-box;color:var(--codex-text);pointer-events:auto;border-radius:14px;width:min(560px,100vw - 32px);max-width:min(560px,100vw - 32px);margin:0;padding:20px;position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);box-shadow:0 18px 60px #0f172a47,0 2px 8px #0f172a1f}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.title{margin:0;font-size:18px}.close{appearance:none;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.close:hover{background:#f1f3f5}.close:focus-visible,.button:focus-visible,.prompt:focus-visible{outline-offset:2px;outline:3px solid #a5d8ff}.form{gap:12px;margin-top:18px;display:grid}.prompt{background:var(--codex-background);border:1px solid var(--codex-border);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:9px;width:100%;min-height:150px;padding:10px 12px}.hint{color:var(--codex-subtle);margin:0;font-size:12px}.error{background:var(--codex-danger-soft);color:var(--codex-danger);border:1px solid #ffc9c9;border-radius:8px;margin:0;padding:8px 10px}.actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.button{appearance:none;border:1px solid var(--codex-border);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:8px;justify-content:center;align-items:center;gap:7px;min-height:36px;padding:7px 12px;display:inline-flex}.button:hover{background:#f1f3f5}.primary{background:var(--codex-accent);border-color:var(--codex-accent);color:#fff}.primary:hover{background:var(--codex-accent-hover)}.button:disabled{cursor:not-allowed;opacity:.55}.toast{background:var(--codex-background);border:1px solid var(--codex-border);bottom:calc(20px + env(safe-area-inset-bottom,0px));color:var(--codex-text);pointer-events:auto;border-radius:9px;max-width:min(520px,100vw - 32px);padding:10px 14px;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #0f172a2e}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/vite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/airlock-labs/coreframe.git",
|
|
7
|
-
"directory": "vite"
|
|
7
|
+
"directory": "node/vite"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist/",
|
|
@@ -23,10 +23,22 @@
|
|
|
23
23
|
"types": "./dist/overlay/managed-dev-overlay.d.ts",
|
|
24
24
|
"default": "./dist/overlay/managed-dev-overlay.js"
|
|
25
25
|
},
|
|
26
|
+
"./codex-task-launcher": {
|
|
27
|
+
"types": "./dist/overlay/codex-task-launcher.d.ts",
|
|
28
|
+
"default": "./dist/overlay/codex-task-launcher.js"
|
|
29
|
+
},
|
|
26
30
|
"./worktree-head-reload": {
|
|
27
31
|
"types": "./dist/browser/worktree-head-reload.d.ts",
|
|
28
32
|
"default": "./dist/browser/worktree-head-reload.js"
|
|
29
33
|
},
|
|
34
|
+
"./routes": {
|
|
35
|
+
"types": "./dist/plugins/routes.d.ts",
|
|
36
|
+
"default": "./dist/plugins/routes.js"
|
|
37
|
+
},
|
|
38
|
+
"./native": {
|
|
39
|
+
"types": "./dist/plugins/native.d.ts",
|
|
40
|
+
"default": "./dist/plugins/native.js"
|
|
41
|
+
},
|
|
30
42
|
"./*": {
|
|
31
43
|
"types": "./dist/plugins/*.d.ts",
|
|
32
44
|
"default": "./dist/plugins/*.js"
|
|
@@ -35,15 +47,21 @@
|
|
|
35
47
|
"dependencies": {
|
|
36
48
|
"@agilek/cli-loaders": "^1.1.0",
|
|
37
49
|
"@iconify/utils": "^3.1.4",
|
|
50
|
+
"@react-router/dev": "^8.2.0",
|
|
38
51
|
"@svgr/core": "^8.1.0",
|
|
39
52
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
40
53
|
"lucide-react": "^1.24.0",
|
|
41
54
|
"obug": "^2.1.3",
|
|
42
55
|
"unplugin": "^2.3.11",
|
|
43
56
|
"vite-plugin-hashed-favicons": "^2.1.1",
|
|
44
|
-
"@coreframe/
|
|
45
|
-
"@coreframe/
|
|
46
|
-
"@coreframe/
|
|
57
|
+
"@coreframe/assets": "^0.1.0",
|
|
58
|
+
"@coreframe/config": "^0.1.0",
|
|
59
|
+
"@coreframe/dev": "^0.1.0",
|
|
60
|
+
"@coreframe/dev-contracts": "^0.1.0",
|
|
61
|
+
"@coreframe/flutter-js": "^0.1.0",
|
|
62
|
+
"@coreframe/flutter-tools": "^0.1.0",
|
|
63
|
+
"@coreframe/dashboard": "^0.2.28",
|
|
64
|
+
"@coreframe/lib": "^0.1.18"
|
|
47
65
|
},
|
|
48
66
|
"devDependencies": {
|
|
49
67
|
"@tsdown/css": "0.22.3",
|
|
@@ -68,7 +86,7 @@
|
|
|
68
86
|
"build": "tsdown",
|
|
69
87
|
"test": "vitest run --reporter=minimal",
|
|
70
88
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
71
|
-
"format": "oxfmt",
|
|
89
|
+
"format": "oxlint --fix && oxfmt",
|
|
72
90
|
"lint": "oxlint"
|
|
73
91
|
}
|
|
74
92
|
}
|