import { For, Index, Show, createSignal, onCleanup, onMount, type JSX } from "solid-js"; import { ModuleCard, STATUS, ACCENT, CALM, WARM, CRITICAL, CARD_FILL, CARD_STROKE } from "./IslandMock"; import { CollageCell, InkStage } from "./FeatureCollage"; import { useDemoLoop } from "./useDemoLoop"; import { Glyph, TimerTapeMock, TIMER_ORANGE, type GlyphName } from "./ModuleMocks"; /** * "Everything else": a bento of small live tiles for the modules that do * not get a full breakdown, headed by a two-way marquee naming the rest. */ /** Steady tick for tiles that animate continuously rather than in steps. */ function useTick(everyMs: number) { const [tick, setTick] = createSignal(0); onMount(() => { const interval = setInterval(() => setTick((t) => t + 1), everyMs); onCleanup(() => clearInterval(interval)); }); return tick; } /** A compact black island strip for tiles that show a slot reading. */ function MiniPill(props: { children: JSX.Element; class?: string }) { return (
{props.children}
); } /* ── Now Playing + the waveform slot ─────────────────────────────── */ function NowPlayingMock() { return (

Night Drive

Synthwave Radio · Browser

⏮ ⏸ ⏭
{(i) => ( )} waveform slot
); } /* ── Timers: the module's face — readout over the tick tape ──────── */ /** TimerService.format: m:ss, rounding up like the app. */ function clock(seconds: number) { const s = Math.ceil(seconds); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`; } /** The face's capsule control: 26 px, mono 11, white 8 %. */ function TimerPill(props: { glyph?: GlyphName; label?: string }) { return ( {props.label} ); } /* * A 3:00 lead timer drains (in fast-forward), rings with its tape pulsing, * and a 25:00 Focus timer keeps running in the stacked row beneath. */ const LEAD_SECONDS = 180; const LEAD_MS = 9000; const TIMER_PERIOD = 14000; function TimersMock() { const tick = useTick(50); const t = () => (tick() * 50) % TIMER_PERIOD; const leadLeft = () => Math.max(0, 1 - t() / LEAD_MS); const ringing = () => t() >= LEAD_MS; const focusLeft = () => 0.64 - (t() / TIMER_PERIOD) * 0.06; return (
{clock(leadLeft() * LEAD_SECONDS)} } > Time's up

{ringing() ? "3:00 timer" : "Remaining of 3:00"}

} >
{/* a further timer: readout, slim tape, icon controls */}
{clock(focusLeft() * 1500)}
{(m) => }
); } /* ── Weather: saved places rotate through the slot ───────────────── */ type Sky = "sun" | "cloud" | "rain"; function SkyGlyph(props: { sky: Sky; size?: number }) { const s = () => props.size ?? 14; return ( ); } const PLACES: { place: string; temp: number; sky: Sky; hourly: [Sky, number][] }[] = [ { place: "Portland", temp: 13, sky: "rain", hourly: [["rain", 13], ["rain", 13], ["cloud", 14], ["cloud", 15], ["sun", 16], ["sun", 15]] }, { place: "Lisbon", temp: 24, sky: "sun", hourly: [["sun", 24], ["sun", 25], ["sun", 26], ["cloud", 25], ["cloud", 23], ["sun", 21]] } ]; function WeatherMock() { const [i, setI] = createSignal(0); useDemoLoop(7000, [ [0, () => setI(0)], [3500, () => setI(1)] ]); const p = () => PLACES[i()]; return (
{p().temp}°
{p().place} {i() + 1} of {PLACES.length}
{(h, hour) => (
{hour === 0 ? "Now" : `${(13 + hour) % 24}`} {h()[1]}°
)}
); } /* ── Interceptions: volume & brightness peek below the island ────── */ const PEEKS = [ { kind: "volume", label: "Speakers", from: 0.35, to: 0.7 }, { kind: "bright", label: "Built-in display", from: 0.6, to: 1 }, { kind: "xdr", label: "Extra brightness", from: 1, to: 1.3 }, { kind: "bright", label: "External display", from: 0.3, to: 0.65 } ] as const; function InterceptionMock() { const [peek, setPeek] = createSignal(0); const [level, setLevel] = createSignal(PEEKS[0].from); const [shown, setShown] = createSignal(false); const steps: [number, () => void][] = []; PEEKS.forEach((pk, n) => { const base = n * 2600; steps.push([base, () => (setPeek(n), setLevel(pk.from), setShown(true))]); for (let k = 1; k <= 4; k++) { steps.push([ base + 250 + k * 280, () => setLevel(pk.from + ((pk.to - pk.from) * k) / 4) ]); } steps.push([base + 2300, () => setShown(false)]); }); useDemoLoop(PEEKS.length * 2600, steps); const pk = () => PEEKS[peek()]; const xdr = () => level() > 1; return (
} >

{pk().label}

{Math.round(level() * 100)}%
); } /* ── Network: speed test on demand + identity rows ───────────────── */ function NetworkMock() { const [down, setDown] = createSignal(0); const [up, setUp] = createSignal(0); const [running, setRunning] = createSignal(false); const steps: [number, () => void][] = [ [0, () => (setDown(0), setUp(0), setRunning(false))], [1200, () => setRunning(true)] ]; for (let k = 1; k <= 12; k++) { steps.push([1200 + k * 120, () => setDown(Math.round((842 * k) / 12))]); steps.push([2800 + k * 90, () => setUp(Math.round((96 * k) / 12))]); } steps.push([4000, () => setRunning(false)]); useDemoLoop(8400, steps); return (

DOWN

{down()} Mbps

UP

{up()} Mbps

{running() ? "testing…" : "Run"}
{([k, v]) => (
{k} {v} ⧉
)}
VPN · default route
); } /* ── Disk: throughput trace, capacity, SMART ─────────────────────── */ function DiskMock() { const tick = useTick(450); const sample = (n: number, k: number) => { const x = Math.sin(n * 0.9 + k * 2.1) * 0.5 + Math.sin(n * 0.37 + k) * 0.5; return Math.max(0.05, Math.min(1, 0.45 + x * 0.45)); }; const path = (k: number) => { const pts = Array.from({ length: 24 }, (_, i) => { const v = sample(tick() + i, k) * (k === 0 ? 1 : 0.45); return `${(i / 23) * 200},${40 - v * 36}`; }); return `M${pts.join(" L")}`; }; const read = () => Math.round(sample(tick() + 23, 0) * 900); const write = () => Math.round(sample(tick() + 23, 1) * 0.45 * 900); return (
R {read()} MB/s W {write()} MB/s
Macintosh HD 612 GB free of 1 TB
SMART · Verified
); } /* ── Keep Awake: four ways to hold off sleep ─────────────────────── */ const AWAKE_MODES = [ { label: "1 hour", note: "awake for 59:12 more" }, { label: "On power", note: "awake while plugged in" }, { label: "Lid closed", note: "keeps running with the lid shut" }, { label: "Agents", note: "awake only while agents work" } ]; function KeepAwakeMock() { const [mode, setMode] = createSignal(0); useDemoLoop( 9600, AWAKE_MODES.map((_, n) => [n * 2400, () => setMode(n)] as [number, () => void]) ); return (
{(m, n) => ( {m.label} )}

{AWAKE_MODES[mode()].note}

); } /* ── Approval modes: Auto · Yolo · Verify ────────────────────────── */ const MODES = [ { name: "Auto", note: "follows each agent's own settings", card: "asks", tint: "rgba(234,179,8,0.10)" }, { name: "Yolo", note: "gated tools pass straight through", card: "passed", tint: "rgba(111,185,130,0.12)" }, { name: "Verify", note: "every gated tool waits for you", card: "held", tint: "rgba(229,72,77,0.12)" } ]; function ApprovalModesMock() { const [mode, setMode] = createSignal(0); useDemoLoop(8400, [ [0, () => setMode(0)], [2800, () => setMode(1)], [5600, () => setMode(2)] ]); const m = () => MODES[mode()]; return (
{(x, n) => ( {x.name} )}
Bash rm -rf build/ {m().card}

{m().note}

); } /* ── Lock Screen: counts without unlocking ───────────────────────── */ function LockScreenMock() { const [counts, setCounts] = createSignal({ working: 3, waiting: 0 }); useDemoLoop(7200, [ [0, () => setCounts({ working: 3, waiting: 0 })], [2400, () => setCounts({ working: 2, waiting: 1 })], [4800, () => setCounts({ working: 1, waiting: 0 })] ]); return (
{counts().working} {counts().waiting}

9:41

); } /* ── Layout: the mosaic reflows ──────────────────────────────────── */ type Box = [l: number, t: number, w: number, h: number]; const LAYOUTS: Box[][] = [ [[0, 0, 66, 58], [68, 0, 32, 58], [0, 62, 32, 38], [34, 62, 32, 38], [68, 62, 32, 38]], [[0, 0, 32, 100], [34, 0, 66, 40], [34, 44, 32, 56], [68, 44, 32, 26], [68, 74, 32, 26]], [[0, 0, 49, 48], [51, 0, 49, 48], [0, 52, 100, 22], [0, 78, 49, 22], [51, 78, 49, 22]] ]; const TILE_COLORS = [CALM, STATUS.ready, WARM, "#fa5c7c", "rgba(255,255,255,0.5)"]; function LayoutMock() { const [n, setN] = createSignal(0); useDemoLoop(7500, [ [0, () => setN(0)], [2500, () => setN(1)], [5000, () => setN(2)] ]); return (
{(color, i) => { const b = () => LAYOUTS[n()][i()]; return (
); }}
); } /* ── Marquee ─────────────────────────────────────────────────────── */ const CHIPS_A = [ "18 agents", "Custom agents", "Six chiptunes", "Focus-aware slots", "Per-app output routing", "Low Power Mode toggle", "Reminders", "Battery health", "Energy flow in watts", "Thermal charge protection", "Top-up charging", "Memory by process" ]; const CHIPS_B = [ "Jump to the terminal", "tmux · iTerm2 · kitty", "Markdown replies", "Tailscale hosts", "One-click SSH setup", "iPhone widgets", "Watch-face widgets", "Screenshots to clipboard", "System audio + mic", "Hourly forecast", "External display brightness", "Lid-closed keep-awake" ]; function MarqueeRow(props: { chips: string[]; reverse?: boolean }) { return (
{(chip, i) => ( = props.chips.length ? "true" : undefined} class="border-overlay0 bg-surface0 text-subtext0 rounded-full border px-3.5 py-1.5 text-xs font-semibold whitespace-nowrap" > {chip} )}
); } export default function IslandExtras() { return (

And everything else

One island instead of a menu bar full of utilities

Every module below lives in the same notch, arranged however you like, under the same one-time license.

); }