An open-source, self-hosted system for apps built with web technologies.
Use current React UI and default Appearance in the System
zohayrslileh4bfaa966947b
diff --git a/bun.lock b/bun.lockindex f27dd24..46f696c 100644--- a/bun.lock+++ b/bun.lock@@ -8,8 +8,8 @@"@fontsource/roboto": "^5.3.0","@hono/node-server": "^2.1.1","@jitl/quickjs-ng-wasmfile-release-sync": "^0.32.0",- "@phreshos/core": "^0.1.60",- "@phreshos/react-ui": "^0.1.35",+ "@phreshos/core": "^0.1.61",+ "@phreshos/react-ui": "^0.1.37","@the-link/core": "^0.3.1","@the-link/http": "^0.1.1","@the-link/ipc": "^0.2.2",@@ -199,9 +199,9 @@"@oxc-project/types": ["@oxc-project/[email protected]", "", {}, "sha512-rDS5/31E9HfPl/CIzGrn0DOlvBbXFseQ5URJ9sYMfstbKLD/c6Gm9vmRzRGDdAXyOIL4zmO37lc9RIwYqVruZw=="],- "@phreshos/core": ["@phreshos/[email protected]", "", { "dependencies": { "zod": "^4.6.5" } }, "sha512-EK76XvlQGySOhd4+ZdqP9fwOY7IaDDLHs2R6iqLuoNZUKpMJEi1vWHaR8ALbTYNkDo4OOaSjnibK/4djPeZtTw=="],+ "@phreshos/core": ["@phreshos/[email protected]", "", { "dependencies": { "zod": "^4.6.5" } }, "sha512-ih5YrIey/5ANhEmn8UCizPZ0ktCrzPre0MEL+Civa0bxDlJJPTwWg9MnPDgN7tBVaWJ7+6XmWVHGNiud9g9yKQ=="],- "@phreshos/react-ui": ["@phreshos/[email protected]", "", { "dependencies": { "@base-ui/react": "^1.7.0", "@internationalized/date": "^3.12.3", "@phreshos/core": "^0.1.60", "colorjs.io": "^0.7.1", "motion": "^13.2.0", "react-aria": "^3.51.0", "react-aria-components": "^1.20.0" }, "peerDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-uNjk0ET0ry5hmMnPK4U/MtLu7SXGsByjqc20sSsgtp7MdYMuY7gpxXSyWUVYFJKgEMXS330Yt7iYWJfU/7hRpw=="],+ "@phreshos/react-ui": ["@phreshos/[email protected]", "", { "dependencies": { "@base-ui/react": "^1.7.0", "@internationalized/date": "^3.12.3", "@phreshos/core": "^0.1.61", "colorjs.io": "^0.7.1", "lucide-react": "^1.48.0", "react-aria": "^3.51.0", "react-aria-components": "^1.20.0" }, "peerDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-jRVzjckBtGCDS5swQ985qHiXMpt7lGxMQoViQY3BWFgYF/j5qs8EdnlCkc/MMQnEXd7GkBIO83w4Af3gYJLLOA=="],"@react-types/shared": ["@react-types/[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-AzsuD9OfxTOZMMvTRhlN3oHBwOmFN7tDh27LzqmHt4+uOgPhJT7ZM7/kVs/8/o0WxayMUIk3hBmCFRHv1FUoag=="],@@ -429,6 +429,8 @@"lru-cache": ["[email protected]", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="],+ "lucide-react": ["[email protected]", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-R0CIKY/fXiC6y9xRBADgsK+VW2p/pcTJOMhLZf1T+uG+vJUvyUR02nGOgmIIC7MPkiNK4Ox8QDnbqF8rJYWPZQ=="],+"magic-string": ["[email protected]", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],"motion": ["[email protected]", "", { "dependencies": { "framer-motion": "^13.4.0", "tslib": "^2.4.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["react", "react-dom"] }, "sha512-aiNSA29N+vgV5p5cJSB5cFzx8KTuuxB99z8zGtxsaqlwKtBK6sq8YgPRpkVQLkbJMOcLDU0q/ShdT95qpBy/0g=="],diff --git a/package.json b/package.jsonindex 06a7a08..a531020 100644--- a/package.json+++ b/package.json@@ -1,7 +1,7 @@{"name": "phreshos","displayName": "PhreshOS",- "version": "0.1.91",+ "version": "0.1.92","description": "The PhreshOS server, desktop, and authoritative system runtime.","type": "module","private": true,@@ -37,8 +37,8 @@"@fontsource/roboto": "^5.3.0","@hono/node-server": "^2.1.1","@jitl/quickjs-ng-wasmfile-release-sync": "^0.32.0",- "@phreshos/core": "^0.1.60",- "@phreshos/react-ui": "^0.1.35",+ "@phreshos/core": "^0.1.61",+ "@phreshos/react-ui": "^0.1.37","@the-link/core": "^0.3.1","@the-link/http": "^0.1.1","@the-link/ipc": "^0.2.2",diff --git a/source/client/view/appearance/appearance.css b/source/client/view/appearance/appearance.cssindex 5c00d3c..b67359a 100644--- a/source/client/view/appearance/appearance.css+++ b/source/client/view/appearance/appearance.css@@ -3,7 +3,10 @@@import "@fontsource/roboto";-html[data-phreshos-theme-capture] * {+/* Pseudo-elements carry Surface paint, so they settle instantly too. */+html[data-phreshos-theme-capture] *,+html[data-phreshos-theme-capture] *::before,+html[data-phreshos-theme-capture] *::after {transition-delay: 0ms !important;diff --git a/source/client/view/appearance/theme-transition.ts b/source/client/view/appearance/theme-transition.tsindex 42e6b30..89072fa 100644--- a/source/client/view/appearance/theme-transition.ts+++ b/source/client/view/appearance/theme-transition.ts@@ -66,10 +66,8 @@ export function transitionTheme(active.set(document, { revision, transition: view })- settle(view.ready, () => {- if (revisions.get(document) === revision) delete root.dataset.phreshosThemeCapture- })-+ // The new view is live, not a still image: any late commit would animate+ // inside it. Changes stay instant until the whole transition finishes.settle(view.finished, () => {if (active.get(document)?.revision !== revision) returndiff --git a/source/client/view/components/phreshos-icon.tsx b/source/client/view/components/phreshos-icon.tsxnew file mode 100644index 0000000..a78c980--- /dev/null+++ b/source/client/view/components/phreshos-icon.tsx@@ -0,0 +1,16 @@+import { type SVGProps } from "react"++/**+ * The PhreshOS mark as a single-color icon. It paints in `currentColor`, so it+ * follows the text color of wherever it is placed.+ */+export default function PhreshOSIcon(props: SVGProps<SVGSVGElement>) {++ return <svg viewBox="126.5 97 1059 1059" fill="currentColor" aria-hidden="true" {...props}>++ <path d="M790.2 874.1C793.3 877.7 804.9 872.7 808.7 871.7C866.2 855.4 920 824.3 963.7 783.7C1015.6 735.4 1055 674.6 1074.3 606.1C1122 435.8 1034.5 252.4 879 173C810.4 138 733.9 123 657.3 120.5C626 119.5 594.6 120.5 563.3 120.5C515.1 120.5 418 114 377.4 136.7C340.2 157.5 332.9 200.8 338.5 239.8C352.9 340.9 432.2 426.5 519.7 473C545.5 486.8 573.4 496.8 601.4 505.3C655.7 521.7 712.8 527.2 763.4 554.5C797.7 573 826.9 603.3 843.8 638.3C875.3 703.5 871 789.6 821.9 845.1C818 849.5 790.2 872.5 790.2 874.1Z" />++ <path d="M841.4 746.3C839.8 698.2 818.9 653.6 783.6 621C676.8 522.3 492.6 546.3 384.1 629.6C286.6 704.4 236.5 826 227.9 946.3C224.4 994 220.8 1074.2 253.5 1112.5C298.9 1165.9 395.1 1100.2 434.9 1068.5C489.5 1025 536.1 971.2 595.6 934.1C618.1 920.1 642.9 908.9 668.1 900.7C693.5 892.5 720 888.8 745.2 879.8C804.2 858.5 840 808.7 841.4 746.3Z" />++ </svg>+}diff --git a/source/client/view/components/system-header.tsx b/source/client/view/components/system-header.tsxindex 3624bd8..6b951e5 100644--- a/source/client/view/components/system-header.tsx+++ b/source/client/view/components/system-header.tsx@@ -1,6 +1,9 @@import logo from "@/assets/bundled/logo.png"-/** The System identity header shared by System-owned panels. */+/**+ * The System identity shared by System-owned panels. It is content only: the+ * holder, such as a Panel header, decides the space around it.+ */export default function SystemHeader({ labelId, name, version }: Readonly<{labelId?: string@@ -10,7 +13,7 @@ export default function SystemHeader({ labelId, name, version }: Readonly<{version: string}>) {- return <div className="relative grid h-10 shrink-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 px-3.5 select-none">+ return <div className="relative grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 select-none"><img src={logo} alt="" draggable={false} className="size-4 rounded-sm object-contain" />diff --git a/source/client/view/structure/authentication/credentials-form.tsx b/source/client/view/structure/authentication/credentials-form.tsxindex 4117708..02b3ad9 100644--- a/source/client/view/structure/authentication/credentials-form.tsx+++ b/source/client/view/structure/authentication/credentials-form.tsx@@ -2,7 +2,7 @@ import { type AuthenticationState } from "@server/core/authentication/authenticaimport { surfaceLifecyclePose, surfacePresenceTransition } from "../../appearance/surface-presence"import { useReducedMotion } from "@libs/react-motion"import { motion } from "motion/react"-import { Button, Input, Panel, useAppearance } from "@phreshos/react-ui"+import { Button, Input, Panel, resolveSpacing, useAppearance } from "@phreshos/react-ui"import Alert from "../../components/alert"import { useState, type SyntheticEvent } from "react"import { ApplicationContext } from "../../contexts"@@ -12,7 +12,7 @@ import SystemHeader from "../../components/system-header"export default function CredentialsForm({ title, description, submitLabel, passwordAutocomplete, requirements, error, pending, onEdit, onSubmit }: CredentialsFormProps) {const reducedMotion = useReducedMotion()- const transaction = useAppearance().transaction+ const { transaction, spacing } = useAppearance()const application = ApplicationContext.useValue()const [password, setPassword] = useState("")const passwordReady = requirements === undefined || [...password].length >= requirements.password.minimumLength@@ -54,78 +54,79 @@ export default function CredentialsForm({ title, description, submitLabel, passw<Panel.Header><SystemHeader name={application.displayName} version={application.version} /></Panel.Header>- <Panel.Content material="extended" className="grid gap-5 p-5">+ {/* The padding and the gaps inside are Appearance spacing levels by use. */}+ <Panel.Content material="extended" style={{ display: "grid", padding: resolveSpacing("large", spacing), gap: resolveSpacing("xlarge", spacing) }}>- <div className="grid gap-1">+ <div className="grid" style={{ gap: resolveSpacing("small", spacing) }}>- <h1 className="text-xl font-semibold">{title}</h1>+ <h1 className="text-xl font-semibold">{title}</h1>- <p className="text-sm leading-5 opacity-60">{description}</p>+ <p className="text-sm leading-5 opacity-60">{description}</p>- </div>+ </div>- <div className="grid gap-4">+ <div className="grid" style={{ gap: resolveSpacing("large", spacing) }}>- {/* A submitted failure belongs to the exact credential values that produced it. */}- <Input- aria-label="Username"- placeholder="Username"- size="large"- name="username"- type="text"- autoComplete="username"- minLength={requirements?.username.minimumLength}- maxLength={requirements?.username.maximumLength}- required- disabled={pending}- invalid={error?.target === "username" || error?.target === "credentials"}- errorMessage={error?.target === "username" ? error.message : undefined}- onChange={() => onEdit?.()}- autoFocus- />-- <Input- aria-label="Password"- placeholder="Password"- size="large"- name="password"- type="password"- autoComplete={passwordAutocomplete}- minLength={requirements?.password.minimumLength}- maxLength={requirements?.password.maximumLength}- required- disabled={pending}- invalid={error?.target === "password" || error?.target === "credentials"}- errorMessage={error?.target === "password" ? error.message : undefined}- onChange={value => {+ {/* A submitted failure belongs to the exact credential values that produced it. */}+ <Input+ aria-label="Username"+ placeholder="Username"+ size="large"+ name="username"+ type="text"+ autoComplete="username"+ minLength={requirements?.username.minimumLength}+ maxLength={requirements?.username.maximumLength}+ required+ disabled={pending}+ invalid={error?.target === "username" || error?.target === "credentials"}+ errorMessage={error?.target === "username" ? error.message : undefined}+ onChange={() => onEdit?.()}+ autoFocus+ />- // This controls registration readiness only; Authentication- // remains the authority for accepting the submitted value.- setPassword(value)- onEdit?.()- }}- description={requirements ? `Use at least ${requirements.password.minimumLength} characters.` : undefined}- />+ <Input+ aria-label="Password"+ placeholder="Password"+ size="large"+ name="password"+ type="password"+ autoComplete={passwordAutocomplete}+ minLength={requirements?.password.minimumLength}+ maxLength={requirements?.password.maximumLength}+ required+ disabled={pending}+ invalid={error?.target === "password" || error?.target === "credentials"}+ errorMessage={error?.target === "password" ? error.message : undefined}+ onChange={value => {- </div>+ // This controls registration readiness only; Authentication+ // remains the authority for accepting the submitted value.+ setPassword(value)+ onEdit?.()+ }}+ description={requirements ? `Use at least ${requirements.password.minimumLength} characters.` : undefined}+ />- {(error?.target === "credentials" || error?.target === "form") && <Alert className="text-sm">{error.message}</Alert>}+ </div>- <Button+ {(error?.target === "credentials" || error?.target === "form") && <Alert className="text-sm">{error.message}</Alert>}- type="submit"+ <Button- disabled={!passwordReady}+ type="submit"- pending={pending}+ disabled={!passwordReady}- size="large"+ pending={pending}++ size="large"- color="primary:base"+ color="primary:base"- style={{ width: "100%" }}+ style={{ width: "100%" }}- >{pending ? `${submitLabel}…` : submitLabel}</Button>+ >{pending ? `${submitLabel}…` : submitLabel}</Button></Panel.Content>diff --git a/source/client/view/structure/desktop/layers/shell/dialogs/permission-requests.tsx b/source/client/view/structure/desktop/layers/shell/dialogs/permission-requests.tsxindex 29b7bf0..7edaaf4 100644--- a/source/client/view/structure/desktop/layers/shell/dialogs/permission-requests.tsx+++ b/source/client/view/structure/desktop/layers/shell/dialogs/permission-requests.tsx@@ -61,7 +61,7 @@ function PermissionRequestView({ request, description }: Readonly<{ request: Perconst presentation = permissionPresentation[request.name]const program = request.from.process.program- return <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-5 p-4">+ return <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-5"><span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-sky-600/25 bg-sky-500/15 text-sm font-medium">?</span><div className="grid gap-1"><h3 className="text-base font-medium">{program.name} needs {presentation.title}</h3>diff --git a/source/client/view/structure/desktop/layers/shell/dialogs/system-errors.tsx b/source/client/view/structure/desktop/layers/shell/dialogs/system-errors.tsxindex f500184..3238116 100644--- a/source/client/view/structure/desktop/layers/shell/dialogs/system-errors.tsx+++ b/source/client/view/structure/desktop/layers/shell/dialogs/system-errors.tsx@@ -81,7 +81,7 @@ export default function SystemErrors() {<ShellSurface material="full" label="System error" labelId={title}>- <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-5 p-4">+ <div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-5"><span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-rose-600/25 bg-rose-500/15 text-lg font-medium">!</span>diff --git a/source/client/view/structure/desktop/layers/shell/shell-surface.tsx b/source/client/view/structure/desktop/layers/shell/shell-surface.tsxindex 7fc9650..625983e 100644--- a/source/client/view/structure/desktop/layers/shell/shell-surface.tsx+++ b/source/client/view/structure/desktop/layers/shell/shell-surface.tsx@@ -7,7 +7,7 @@ export const shellSurfaceClassName = "isolate overflow-visible border-0 bg-transexport default forwardRef<HTMLDivElement, ShellSurfaceProps>(function ShellSurface({ label, labelId, contentClassName = "", className, children, ...props }, ref) {return <Panel {...props} ref={ref} className={className}>- <Panel.Header><h2 id={labelId} className="relative grid h-10 items-center px-3.5 text-window-title font-medium select-none">{label}</h2></Panel.Header>+ <Panel.Header><h2 id={labelId} className="m-0 truncate text-window-title font-medium select-none">{label}</h2></Panel.Header><Panel.Content className={contentClassName}>{children}</Panel.Content></Panel>})diff --git a/source/client/view/structure/desktop/layers/shell/start-menu/start-menu-panel.tsx b/source/client/view/structure/desktop/layers/shell/start-menu/start-menu-panel.tsxindex 244ad63..932045f 100644--- a/source/client/view/structure/desktop/layers/shell/start-menu/start-menu-panel.tsx+++ b/source/client/view/structure/desktop/layers/shell/start-menu/start-menu-panel.tsx@@ -16,7 +16,7 @@ export default function StartMenuPanel({ labelId, name, version, left, right, foreturn <Surface material="full" style={{ display: "grid", gridTemplateRows: "auto minmax(0, 1fr)", minHeight: 0, height: "100%", maxHeight: "inherit", overflow: "hidden" }}>- <SystemHeader labelId={labelId} name={name} version={version} />+ <div className="grid h-10 shrink-0 items-center px-3.5"><SystemHeader labelId={labelId} name={name} version={version} /></div><div className="grid min-h-0 min-w-0" style={{ gridTemplateRows: "minmax(0, 1fr) auto", gap: spacing, padding: spacing, paddingTop: 0 }}>diff --git a/source/client/view/structure/desktop/layers/shell/start-menu/start-menu.tsx b/source/client/view/structure/desktop/layers/shell/start-menu/start-menu.tsxindex 7e6689e..fae6d4f 100644--- a/source/client/view/structure/desktop/layers/shell/start-menu/start-menu.tsx+++ b/source/client/view/structure/desktop/layers/shell/start-menu/start-menu.tsx@@ -1,4 +1,4 @@-import logo from "@/assets/bundled/logo.png"+import PhreshOSIcon from "@client/view/components/phreshos-icon"import { createContext, memo, useCallback, useContext, useEffect, useId, useRef, useState, type CSSProperties, type PropsWithChildren, type RefObject } from "react"import Programs from "./programs/programs"import Processes from "./processes/processes"@@ -92,10 +92,10 @@ export const StartMenuButton = memo(function StartMenuButton({ showLabel = trueconst control = useStartMenuControl()return <TaskbarButton- icon={<img src={logo} alt="" draggable={false} className="block size-full object-contain" />}+ icon={<PhreshOSIcon className="block size-full" />}label={application.displayName}showLabel={showLabel}- color="primary:base"+ color="default:base"aria-controls={control.id}aria-expanded={control.open}aria-haspopup="dialog"diff --git a/source/client/view/structure/desktop/layers/shell/taskbar/programs/window-taskbar-item.tsx b/source/client/view/structure/desktop/layers/shell/taskbar/programs/window-taskbar-item.tsxindex 7d75f3f..e87a39d 100644--- a/source/client/view/structure/desktop/layers/shell/taskbar/programs/window-taskbar-item.tsx+++ b/source/client/view/structure/desktop/layers/shell/taskbar/programs/window-taskbar-item.tsx@@ -41,17 +41,21 @@ export default memo(function ({ record, title, icon, position, active, minimized</ContextMenu.Trigger>- <ContextMenu.Content UNSTABLE_portalContainer={scaleContainer ?? undefined}>+ <ContextMenu.Content portalContainer={scaleContainer ?? undefined}>- <Menu aria-label={`${title} window actions`} size="small">+ <Menu aria-label={`${title} window actions`} size="small" onAction={action => {+ if (action === "visibility") changeVisibility()+ else if (action === "fill") fill()+ else if (action === "close") close()+ }}>- <Menu.Item onAction={changeVisibility}>{minimized ? "Show" : "Minimize"}</Menu.Item>+ <Menu.Item id="visibility">{minimized ? "Show" : "Minimize"}</Menu.Item>- <Menu.Item onAction={fill}>{maximized ? "Restore" : "Maximize"}</Menu.Item>+ <Menu.Item id="fill">{maximized ? "Restore" : "Maximize"}</Menu.Item><Menu.Separator />- <Menu.Item color="danger:base" onAction={close}>Close</Menu.Item>+ <Menu.Item id="close" color="danger">Close</Menu.Item></Menu>diff --git a/source/client/view/structure/desktop/windows/window-surface.tsx b/source/client/view/structure/desktop/windows/window-surface.tsxindex 6d5b913..7abae9c 100644--- a/source/client/view/structure/desktop/windows/window-surface.tsx+++ b/source/client/view/structure/desktop/windows/window-surface.tsx@@ -101,5 +101,5 @@ export function windowSurfaceRadius(surface: VisibleWindowSurface, appearance: Aconst radius = typeof surface === "object" ? surface.radius : undefined- return resolveRadius(radius ?? "medium", appearance)+ return resolveRadius(radius ?? "medium", appearance.radius)}diff --git a/tests/panel.test.tsx b/tests/panel.test.tsxindex 4b61233..b6bd454 100644--- a/tests/panel.test.tsx+++ b/tests/panel.test.tsx@@ -28,7 +28,7 @@ test("panel contract", async () => {}function panel(html: string, materials = 2) {- assert.equal(html.match(/data-material=""/g)?.length, materials)+ assert.equal(html.match(/class="[^"]*phreshos-surface[^"]*"/g)?.length, materials)assert.match(html, /grid-template-rows:auto minmax\(0, 1fr\)/)assert.match(html, /margin:6px;margin-top:0/)}@@ -39,7 +39,7 @@ test("panel contract", async () => {assert.match(shell, /<button>Action<\/button>/)const window = markup(<Window layer="window" icon="/icon.svg" title="Window"><iframe title="Content" /></Window>)- assert.equal(window.match(/data-material=""/g)?.length, 1)+ assert.equal(window.match(/class="[^"]*phreshos-surface[^"]*"/g)?.length, 1)assert.match(window, /grid-template-rows:auto minmax\(0, 1fr\)/)assert.match(window, /data-window-content="true"/)assert.doesNotMatch(window, /border-top:1px solid yellow/)@@ -49,10 +49,10 @@ test("panel contract", async () => {assert.doesNotMatch(window, /class="p-px"/)const windowPanel = window.match(/<div style="([^"]*grid-template-rows:auto minmax\(0, 1fr\)[^"]*)">/)?.[1] ?? ""assert.match(windowPanel, /overflow:hidden/)- assert.match(windowPanel, new RegExp(`border-radius:${resolveRadius("medium", defaultAppearance)}`))+ assert.match(windowPanel, new RegExp(`border-radius:${resolveRadius("medium", defaultAppearance.radius)}`))const bare = markup(<Window layer="over" icon="/icon.svg" title="Bare"><iframe title="Content" /></Window>)- assert.doesNotMatch(bare, /data-material/)+ assert.doesNotMatch(bare, /class="[^"]*phreshos-surface[^"]*"/)assert.doesNotMatch(bare, /grid-template-rows:auto minmax\(0, 1fr\)/)const passThrough = markup(<Window layer="over" icon="/icon.svg" title="Pass-through" interactive={false}><iframe title="Content" /></Window>)@@ -68,7 +68,6 @@ test("panel contract", async () => {assert.match(authentication, /placeholder="Username"/)assert.match(authentication, /placeholder="Password"/)assert.doesNotMatch(authentication, /<label\b/)- assert.equal(authentication.match(/height:42px/g)?.length, 3)assert.match(authentication, /type="submit"/)assert.match(authentication, /<h2[^>]*>Example System<\/h2>/)assert.match(authentication, /System version 1.2.3/)@@ -87,7 +86,7 @@ test("panel contract", async () => {assert.match(authenticationFailure, /The request failed\./)const launcher = markup(<StartMenuPanel labelId="start-menu-label" name="Example System" version="1.2.3" left={<button>Programs</button>} right={<p>Processes</p>} footer={<input type="search" aria-label="Search Programs and Processes" />} />)- assert.equal(launcher.match(/data-material=""/g)?.length, 3)+ assert.equal(launcher.match(/class="[^"]*phreshos-surface[^"]*"/g)?.length, 3)assert.match(launcher, /grid-cols-2/)assert.match(launcher, /grid-template-rows:auto minmax\(0, 1fr\);min-height:0/)assert.match(launcher, /grid-template-rows:minmax\(0, 1fr\) auto;gap:8px;padding:8px;padding-top:0/)diff --git a/tests/start-menu-search.test.tsx b/tests/start-menu-search.test.tsxindex 55bb84b..45acc69 100644--- a/tests/start-menu-search.test.tsx+++ b/tests/start-menu-search.test.tsx@@ -44,7 +44,7 @@ test("start menu search contract", async () => {assert.match(footer, /<input\b/)assert.match(footer, /value="notes"/)assert.match(footer, /aria-label="Search Programs and Processes"/)- assert.equal(footer.match(/data-material=""/g)?.length, 1)+ assert.equal(footer.match(/class="[^"]*phreshos-surface[^"]*"/g)?.length, 1)assert.doesNotMatch(footer, /<(?:main|section|article|aside|nav|header|footer)\b/)assert.doesNotMatch(footer, /Signed in as/)}, 120_000)diff --git a/tests/theme-transition.test.ts b/tests/theme-transition.test.tsindex f0bf46a..14384e2 100644--- a/tests/theme-transition.test.ts+++ b/tests/theme-transition.test.ts@@ -44,13 +44,15 @@ test("theme transitions capture one complete old and new document state", asyncawait ready.promiseawait Promise.resolve()- assert.equal(document.documentElement.dataset.phreshosThemeCapture, undefined)+ // The new view stays live while it animates, so changes stay instant until it finishes.+ assert.equal(document.documentElement.dataset.phreshosThemeCapture, "")assert.equal(document.documentElement.dataset.phreshosThemeTransition, "")finished.resolve()await completeawait Promise.resolve()+ assert.equal(document.documentElement.dataset.phreshosThemeCapture, undefined)assert.equal(document.documentElement.dataset.phreshosThemeTransition, undefined)assert.equal(document.documentElement.style.values.size, 0)})