@earendil-works/pi-coding-agent 0.99.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +86 -0
- package/dist/bundle/chunks/anthropic-messages-UID2PALB.js +6 -0
- package/dist/bundle/chunks/anthropic.js +2 -2
- package/dist/bundle/chunks/{azure-openai-responses-EN5WOBET.js → azure-openai-responses-AFMVM6NP.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-AXPY26X7.js → chunk-2KTBZM5G.js} +14 -28
- package/dist/bundle/chunks/{chunk-LRS5S6EK.js → chunk-2VNGUWBO.js} +2 -2
- package/dist/bundle/chunks/chunk-33XOIQ5N.js +1204 -0
- package/dist/bundle/chunks/{chunk-W2DOMZSC.js → chunk-3LH3ZQKY.js} +1 -1
- package/dist/bundle/chunks/chunk-4KU537KD.js +2 -0
- package/dist/bundle/chunks/chunk-6D7LHLKG.js +2 -0
- package/dist/bundle/chunks/chunk-7FH3BDRG.js +82 -0
- package/dist/bundle/chunks/{chunk-LLMKQWZS.js → chunk-IBCPYVFK.js} +7 -9
- package/dist/bundle/chunks/chunk-KDN6RCEQ.js +4 -0
- package/dist/bundle/chunks/chunk-LD2P6SFZ.js +2 -0
- package/dist/bundle/chunks/{chunk-PEHWOV5U.js → chunk-LTXEMVMA.js} +18 -78
- package/dist/bundle/chunks/{chunk-J4CWPC4N.js → chunk-OSKPX3Z5.js} +1 -1
- package/dist/bundle/chunks/chunk-PRD6WYBT.js +16 -0
- package/dist/bundle/chunks/chunk-VIV3CWXG.js +2 -0
- package/dist/bundle/chunks/{cli-AZXNGIZH.js → cli-QOMC26IJ.js} +8 -6
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-XJQQYGGU.js → cloudflare-workers-ai-system-one-NPQN263E.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +67 -8
- package/dist/bundle/chunks/execute-GVRSEGHL.js +367 -0
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-CQAKKJTA.js → google-generative-ai-APTPZOQL.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-AE36YXJU.js → google-vertex-MXCOSOY3.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-PJJYKPLD.js → llama-cpp-classify-XT44PI3C.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-KEYTXJM7.js → mistral-conversations-DKVFNQL6.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-JQTCOVEG.js → openai-codex-responses-GK67DQQJ.js} +1 -1
- package/dist/bundle/chunks/openai-codex.js +1 -1
- package/dist/bundle/chunks/{openai-completions-XW2Q5HVC.js → openai-completions-JXDDPZ23.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-6AXWFL75.js → openai-responses-CQDDLDQF.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-TPQ4V6OR.js → openrouter-images-ZVXWCSIM.js} +1 -1
- package/dist/bundle/chunks/openrouter.js +1 -1
- package/dist/bundle/chunks/pi-logo-animation-MPKZE4EK.js +2 -0
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/runtime-2SO2JDWM.js +2 -0
- package/dist/bundle/chunks/{typesafe-system-one-E7A4HNJI.js → typesafe-system-one-A4CZTQWZ.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-6ZMK7GDO.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts +5 -8
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -13
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +15 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +51 -10
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +13 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +6 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +34 -7
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +52 -11
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-registry.d.ts +3 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +4 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-runtime.d.ts +6 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +22 -18
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/radius.d.ts +2 -0
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/radius.js +2 -0
- package/dist/core/radius.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +4 -9
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +7 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +3 -2
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.js +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -5
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +11 -31
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/virtual-models.d.ts +2 -0
- package/dist/core/virtual-models.d.ts.map +1 -1
- package/dist/core/virtual-models.js +19 -12
- package/dist/core/virtual-models.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +197 -51
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +43 -25
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +12 -11
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +73 -129
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/codemode/worker.d.ts +1 -1
- package/dist/extensions/codemode/worker.js +1 -1
- package/dist/extensions/codemode/worker.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +20 -5
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts +4 -2
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +14 -2
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts +32 -8
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +220 -56
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +10 -7
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +56 -31
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +2 -0
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +16 -9
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +5 -4
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +33 -15
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +4 -2
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +5 -4
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +7 -28
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +8 -2
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +24 -21
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/pi-logo-animation.d.ts +68 -0
- package/dist/modes/interactive/components/pi-logo-animation.d.ts.map +1 -0
- package/dist/modes/interactive/components/pi-logo-animation.js +1086 -0
- package/dist/modes/interactive/components/pi-logo-animation.js.map +1 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.d.ts +7 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.d.ts.map +1 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.js +12 -0
- package/dist/modes/interactive/components/pi-logo-animation.lazy.js.map +1 -0
- package/dist/modes/interactive/components/pi-logo.d.ts +7 -0
- package/dist/modes/interactive/components/pi-logo.d.ts.map +1 -1
- package/dist/modes/interactive/components/pi-logo.js +13 -1
- package/dist/modes/interactive/components/pi-logo.js.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.d.ts +15 -0
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/radius-login-selector.js +85 -0
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +5 -5
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +5 -4
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +39 -6
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +10 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +153 -40
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/system-theme.d.ts +2 -1
- package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/system-theme.js +16 -5
- package/dist/modes/interactive/theme/system-theme.js.map +1 -1
- package/docs/cli.md +8 -18
- package/docs/codemode.md +207 -0
- package/docs/docs.json +5 -1
- package/docs/environment-variables.md +2 -2
- package/docs/extensions.md +3 -3
- package/docs/index.md +1 -1
- package/docs/mcp.md +142 -82
- package/docs/models.md +22 -1
- package/docs/providers.md +18 -6
- package/docs/sdk.md +2 -2
- package/docs/settings.md +5 -3
- package/docs/usage.md +1 -1
- package/examples/extensions/built-in-tool-renderer.ts +16 -40
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +24 -96
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/14-codemode-mcp.ts +2 -2
- package/npm-shrinkwrap.json +25 -30
- package/package.json +10 -10
- package/dist/bundle/chunks/anthropic-messages-A6EXUBG6.js +0 -6
- package/dist/bundle/chunks/chunk-GOPCREV2.js +0 -4
- package/dist/bundle/chunks/chunk-GUORCHFS.js +0 -1435
- package/dist/bundle/chunks/chunk-HSPCVFST.js +0 -2
- package/dist/bundle/chunks/chunk-IMTXZUO7.js +0 -82
- package/dist/bundle/chunks/chunk-SLDA2X2H.js +0 -2
- package/dist/bundle/chunks/chunk-XNGRGP62.js +0 -2
- package/dist/bundle/chunks/execute-7XXPZAWW.js +0 -308
- package/dist/bundle/chunks/runtime-G5WJPRBM.js +0 -2
- package/dist/bundle/chunks/virtual-modules-CSWRO37N.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi-logo-animation.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo-animation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,cAAc,EAGd,UAAU,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,QAAQ,EAIR,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAuDtD,MAAM,KAAK,GAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACnC,MAAM,IAAI,GAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACjC,MAAM,MAAM,GAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AAEnC,MAAM,KAAK,GAAG,GAAG,CAAC;AAClB,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,YAAY,GAAG,GAAG,CAAC;AAKzB,wFAAwF;AACxF,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,C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C,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1F,CAAC;IAEO,IAAI,CAAC,GAAW,EAAE,YAAqB;QAC9C,MAAM,QAAQ,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;YACvE,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;YAClC,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACjF,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["import {\n\tbackgroundAnsi,\n\ttype Color,\n\ttype Component,\n\tcolorToRgb,\n\tforegroundAnsi,\n\tgetKeybindings,\n\tindexedColor,\n\trgbColor,\n\ttype TUI,\n\ttype TuiMouseEvent,\n\ttype TuiMouseEventResult,\n\tvisibleWidth,\n} from \"@earendil-works/pi-tui\";\nimport { theme } from \"../theme/theme.ts\";\nimport { formatKeyText } from \"./keybinding-hints.ts\";\n\n/**\n * Fullscreen easter egg shown when the header logo is clicked. The current screen dissolves into braille dust,\n * spreading out from the logo, while the logo lifts off as a 3D object, flies to the center, grows, and spins.\n * Leaving plays the same timeline backwards, so the logo lands on the header and the screen reassembles.\n *\n * The logo is ray cast per braille dot. A braille cell holds 2x4 dots and roughly square dots, so one logo\n * pixel (a half block) is exactly 2x2 dots and the header logo (4x2 cells) is 8x8 dots at the start.\n */\n\ntype Rgb = readonly [number, number, number];\n\ninterface ScreenCell {\n\ttext: string;\n\t/** 1 or 2 for a grapheme, 0 for the second column of a wide grapheme. */\n\twidth: number;\n\tfg: Rgb;\n\t/** Undefined when the cell uses the terminal's default background. */\n\tbg: Rgb | undefined;\n\t/** Seconds until the cell turns into braille dust. */\n\tdelay: number;\n\t/** Number of braille dots the glyph turns into. */\n\tink: number;\n\tseed: number;\n}\n\ninterface Star {\n\t/** Braille character with the single dot the star occupies. */\n\tglyph: string;\n\t/** Color the star leans toward; it only ever shows a small step from the background toward it. */\n\ttint: Rgb;\n\t/** Largest step from the background toward the tint, from 0 to 1. */\n\tstrength: number;\n\tphase: number;\n\t/** Flicker speed in radians per second. */\n\tspeed: number;\n}\n\ninterface LogoBox {\n\tmin: readonly [number, number, number];\n\tmax: readonly [number, number, number];\n\tcolor: Rgb;\n}\n\ninterface Pose {\n\tcenterX: number;\n\tcenterY: number;\n\t/** Braille dots per logo pixel at depth 0. */\n\tscale: number;\n\tyaw: number;\n\tpitch: number;\n\troll: number;\n}\n\nconst CORAL: Rgb = [228, 138, 122];\nconst BLUE: Rgb = [79, 142, 179];\nconst YELLOW: Rgb = [234, 182, 93];\n\nconst DEPTH = 0.7;\nconst CAMERA_DISTANCE = 10;\nconst FLY_START = 0.1;\nconst FLY_DURATION = 1.3;\n\n/** Grid position of a logo block: column and row in the 4x4 logo, and layer (-1, 0, 1) in depth. */\ntype Cell3 = readonly [number, number, number];\n\n// The logo's pixels on a 4x4 grid. Each pixel is a block that the puzzle slides around.\nconst LOGO_PIXELS = [\"ccc.\", \"b.c.\", \"bb.y\", \"b..y\"];\nconst BLOCKS: Array<{ home: Cell3; color: Rgb }> = LOGO_PIXELS.flatMap((line, row) =>\n\t[...line].flatMap((pixel, column) => {\n\t\tconst color = pixel === \"c\" ? CORAL : pixel === \"b\" ? BLUE : pixel === \"y\" ? YELLOW : undefined;\n\t\treturn color ? [{ home: [column, row, 0] as Cell3, color }] : [];\n\t}),\n);\n// Farthest distance of any block corner from the origin, with blocks on the outer depth layers.\nconst LOGO_RADIUS = Math.hypot(2, 2, 1 + DEPTH / 2);\n\n// The sliding puzzle: after the logo spun for a while, blocks slide into free neighboring cells, one step at\n// a time. Each cycle shuffles, flies every block back home, and holds the logo briefly.\nconst PUZZLE_START = FLY_START + FLY_DURATION + 3;\nconst PUZZLE_STEP = 0.3;\nconst PUZZLE_STEPS = 12;\nconst PUZZLE_RETURN = 1;\nconst PUZZLE_HOLD = 0.6;\nconst PUZZLE_CYCLE = PUZZLE_STEP * PUZZLE_STEPS + PUZZLE_RETURN + PUZZLE_HOLD;\nconst PUZZLE_MOVES: Cell3[] = [\n\t[1, 0, 0],\n\t[-1, 0, 0],\n\t[0, 1, 0],\n\t[0, -1, 0],\n\t[1, 0, 0],\n\t[-1, 0, 0],\n\t[0, 1, 0],\n\t[0, -1, 0],\n\t[0, 0, 1],\n\t[0, 0, -1],\n];\n\n/** Block positions after each step of one shuffle cycle, starting at home. Deterministic per cycle. */\nfunction shuffleSteps(cycle: number): Cell3[][] {\n\tlet positions: Cell3[] = BLOCKS.map((block) => block.home);\n\tconst steps = [positions];\n\tconst lastMoved = new Set<number>();\n\tlet random = cycle * 7_919 + 1;\n\tconst next = () => hash(random++);\n\tconst key = ([x, y, z]: Cell3) => (z + 1) * 16 + y * 4 + x;\n\tfor (let step = 0; step < PUZZLE_STEPS; step++) {\n\t\tconst occupied = new Set(positions.map(key));\n\t\tconst nextPositions = [...positions];\n\t\tconst moved = new Set<number>();\n\t\tconst moveCount = next() < 0.4 ? 2 : 1;\n\t\tfor (let move = 0; move < moveCount; move++) {\n\t\t\tconst candidates: Array<{ block: number; target: Cell3 }> = [];\n\t\t\tfor (let block = 0; block < positions.length; block++) {\n\t\t\t\tif (moved.has(block)) continue;\n\t\t\t\tconst [x, y, z] = positions[block]!;\n\t\t\t\tfor (const [dx, dy, dz] of PUZZLE_MOVES) {\n\t\t\t\t\tconst target: Cell3 = [x + dx, y + dy, z + dz];\n\t\t\t\t\tif (target[0] < 0 || target[0] > 3 || target[1] < 0 || target[1] > 3) continue;\n\t\t\t\t\tif (target[2] < -1 || target[2] > 1 || occupied.has(key(target))) continue;\n\t\t\t\t\tcandidates.push({ block, target });\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prefer blocks that did not just move, so the puzzle does not look like one block jittering.\n\t\t\tconst fresh = candidates.filter((candidate) => !lastMoved.has(candidate.block));\n\t\t\tconst pool = fresh.length > 0 ? fresh : candidates;\n\t\t\tconst choice = pool[Math.floor(next() * pool.length)];\n\t\t\tif (!choice) break;\n\t\t\toccupied.add(key(choice.target));\n\t\t\tnextPositions[choice.block] = choice.target;\n\t\t\tmoved.add(choice.block);\n\t\t}\n\t\tlastMoved.clear();\n\t\tfor (const block of moved) lastMoved.add(block);\n\t\tpositions = nextPositions;\n\t\tsteps.push(positions);\n\t}\n\treturn steps;\n}\n\nconst FRAME_MS = 1000 / 30;\nconst DUST_DURATION = 0.35;\nconst WAVE_SPREAD = 0.55;\nconst WAVE_JITTER = 0.12;\nconst DISSOLVE_END = FLY_START + WAVE_SPREAD + WAVE_JITTER + DUST_DURATION;\nconst BACKGROUND_FADE = 0.5;\nconst EXIT_DURATION = 1.1;\n// A faint starfield fades in behind the logo once the screen has dissolved.\nconst STARS_START = 2.5;\nconst STARS_FADE = 2;\nconst STAR_DENSITY = 0.018;\n// Star tints: neutral, pale blue, pale gold, and pale rose, each mixed half with the terminal's foreground.\nconst STAR_TINTS: Rgb[] = [\n\t[255, 255, 255],\n\t[170, 195, 255],\n\t[255, 225, 170],\n\t[255, 190, 205],\n];\nconst LOGO_COLOR_STEP = 5;\n// On light backgrounds most of each braille cell shows the bright background, which washes the logo out. There,\n// the logo gets a halo: its colors and coverage blurred into the cell backgrounds, strongest under the logo and\n// fading out over HALO_RADIUS_X columns and HALO_RADIUS_Y rows (cells are about twice as tall as wide).\nconst LIGHT_HALO_STRENGTH = 0.3;\nconst HALO_RADIUS_X = 6;\nconst HALO_RADIUS_Y = 3;\nconst HALO_LEVELS = 32;\nconst STAR_ALPHA_LEVELS = 8;\nconst STAR_FLICKER_LEVELS = 3;\nconst HINT_FADE = 0.5;\n\n// Braille dot bits, indexed by row * 2 + column within the 2x4 cell.\nconst DOT_BITS = [0x01, 0x08, 0x02, 0x10, 0x04, 0x20, 0x40, 0x80];\nconst BRAILLE = Array.from({ length: 256 }, (_, bits) => String.fromCharCode(0x2800 + bits));\nconst LIGHT = normalize([-0.45, -0.6, 0.75]);\nconst HALF_VECTOR = normalize([LIGHT[0], LIGHT[1], LIGHT[2] + 1]);\n\nfunction normalize(v: readonly [number, number, number]): [number, number, number] {\n\tconst length = Math.hypot(v[0], v[1], v[2]);\n\treturn [v[0] / length, v[1] / length, v[2] / length];\n}\n\nfunction clamp01(value: number): number {\n\treturn value < 0 ? 0 : value > 1 ? 1 : value;\n}\n\n/** Quintic smoothstep. */\nfunction smooth(value: number): number {\n\tconst t = clamp01(value);\n\treturn t * t * t * (t * (t * 6 - 15) + 10);\n}\n\nfunction easeOut(value: number): number {\n\tconst t = 1 - clamp01(value);\n\treturn 1 - t * t * t;\n}\n\nfunction mix(a: Rgb, b: Rgb, amount: number): Rgb {\n\treturn [a[0] + (b[0] - a[0]) * amount, a[1] + (b[1] - a[1]) * amount, a[2] + (b[2] - a[2]) * amount];\n}\n\nfunction hash(value: number): number {\n\tlet x = Math.imul(value ^ 0x9e3779b9, 0x85ebca6b);\n\tx ^= x >>> 13;\n\tx = Math.imul(x, 0xc2b2ae35);\n\tx ^= x >>> 16;\n\treturn (x >>> 0) / 0x100000000;\n}\n\n/** Whether a background is light, by relative luminance. */\nfunction isLight([r, g, b]: Rgb): boolean {\n\treturn 0.2126 * r + 0.7152 * g + 0.0722 * b > 128;\n}\n\nfunction toRgb(color: Color): Rgb {\n\tconst { r, g, b } = colorToRgb(color);\n\treturn [r, g, b];\n}\n\n/** Braille dots a glyph turns into, a rough measure of how much ink it has. */\nfunction glyphInk(text: string, seed: number): number {\n\tif (text.trim() === \"\") return 0;\n\tif (/^[.,:;'`\\-_·]$/.test(text)) return 2;\n\tif (/^[\\u2500-\\u257f]$/.test(text)) return 3;\n\treturn 4 + Math.floor(seed * 3);\n}\n\nconst segmenter = new Intl.Segmenter();\n\n/** Parse rendered lines into cells with resolved colors. Other escape sequences (OSC, APC, cursor) are skipped. */\nfunction parseScreen(\n\tlines: readonly string[],\n\twidth: number,\n\tforeground: Rgb,\n\tbackground: Rgb,\n): Array<Array<ScreenCell>> {\n\tconst palette = (index: number): Rgb => toRgb(indexedColor(index));\n\treturn lines.map((line) => {\n\t\tconst cells: ScreenCell[] = [];\n\t\tlet fg: Rgb | undefined;\n\t\tlet bg: Rgb | undefined;\n\t\tlet dim = false;\n\t\tlet inverse = false;\n\t\tconst applySgr = (params: string) => {\n\t\t\tconst codes = params === \"\" ? [\"0\"] : params.split(\";\");\n\t\t\tfor (let i = 0; i < codes.length; i++) {\n\t\t\t\tconst parts = codes[i]!.split(\":\").map((part) => Number.parseInt(part, 10));\n\t\t\t\tconst code = parts[0] ?? 0;\n\t\t\t\tif (code === 38 || code === 48) {\n\t\t\t\t\t// Extended color, either as `38;5;n` / `38;2;r;g;b` or colon sub-parameters.\n\t\t\t\t\tlet args: number[];\n\t\t\t\t\tif (parts.length > 1) {\n\t\t\t\t\t\targs = parts.slice(1).filter((part) => !Number.isNaN(part));\n\t\t\t\t\t\t// `38:2::r:g:b` has an empty color space id, dropped above.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst kind = Number.parseInt(codes[i + 1] ?? \"\", 10);\n\t\t\t\t\t\tconst count = kind === 5 ? 2 : kind === 2 ? 4 : 1;\n\t\t\t\t\t\targs = codes.slice(i + 1, i + 1 + count).map((part) => Number.parseInt(part, 10));\n\t\t\t\t\t\ti += count;\n\t\t\t\t\t}\n\t\t\t\t\tlet color: Rgb | undefined;\n\t\t\t\t\tif (args[0] === 5 && args[1] !== undefined) color = palette(args[1]);\n\t\t\t\t\telse if (args[0] === 2 && args.length >= 4) color = [args[1]!, args[2]!, args[3]!];\n\t\t\t\t\tif (color) {\n\t\t\t\t\t\tif (code === 38) fg = color;\n\t\t\t\t\t\telse bg = color;\n\t\t\t\t\t}\n\t\t\t\t} else if (code === 0) {\n\t\t\t\t\tfg = undefined;\n\t\t\t\t\tbg = undefined;\n\t\t\t\t\tdim = false;\n\t\t\t\t\tinverse = false;\n\t\t\t\t} else if (code === 2) dim = true;\n\t\t\t\telse if (code === 22) dim = false;\n\t\t\t\telse if (code === 7) inverse = true;\n\t\t\t\telse if (code === 27) inverse = false;\n\t\t\t\telse if (code >= 30 && code <= 37) fg = palette(code - 30);\n\t\t\t\telse if (code >= 90 && code <= 97) fg = palette(code - 90 + 8);\n\t\t\t\telse if (code === 39) fg = undefined;\n\t\t\t\telse if (code >= 40 && code <= 47) bg = palette(code - 40);\n\t\t\t\telse if (code >= 100 && code <= 107) bg = palette(code - 100 + 8);\n\t\t\t\telse if (code === 49) bg = undefined;\n\t\t\t}\n\t\t};\n\t\tconst pushText = (text: string) => {\n\t\t\tfor (const { segment } of segmenter.segment(text)) {\n\t\t\t\tconst glyphWidth = visibleWidth(segment);\n\t\t\t\tif (glyphWidth === 0 || cells.length + glyphWidth > width) continue;\n\t\t\t\tlet cellFg = fg ?? foreground;\n\t\t\t\tlet cellBg = bg;\n\t\t\t\tif (inverse) {\n\t\t\t\t\tcellFg = bg ?? background;\n\t\t\t\t\tcellBg = fg ?? foreground;\n\t\t\t\t}\n\t\t\t\tif (dim) cellFg = mix(cellFg, cellBg ?? background, 0.4);\n\t\t\t\tconst cell = { text: segment, width: glyphWidth, fg: cellFg, bg: cellBg, delay: 0, ink: 0, seed: 0 };\n\t\t\t\tcells.push(cell);\n\t\t\t\tif (glyphWidth === 2) cells.push({ ...cell, text: \"\", width: 0 });\n\t\t\t}\n\t\t};\n\t\tlet i = 0;\n\t\twhile (i < line.length) {\n\t\t\tconst sequenceStart = line.indexOf(\"\\x1b\", i);\n\t\t\tif (sequenceStart === -1) {\n\t\t\t\tpushText(line.slice(i));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (sequenceStart > i) pushText(line.slice(i, sequenceStart));\n\t\t\tconst kind = line[sequenceStart + 1];\n\t\t\tif (kind === \"[\") {\n\t\t\t\tlet end = sequenceStart + 2;\n\t\t\t\twhile (end < line.length && (line.charCodeAt(end) < 0x40 || line.charCodeAt(end) > 0x7e)) end++;\n\t\t\t\tif (line[end] === \"m\") applySgr(line.slice(sequenceStart + 2, end));\n\t\t\t\ti = end + 1;\n\t\t\t} else if (kind === \"]\" || kind === \"_\" || kind === \"P\" || kind === \"^\") {\n\t\t\t\t// String sequences end at BEL or ST (ESC \\).\n\t\t\t\tconst bell = line.indexOf(\"\\x07\", sequenceStart + 2);\n\t\t\t\tconst st = line.indexOf(\"\\x1b\\\\\", sequenceStart + 2);\n\t\t\t\tif (bell === -1 && st === -1) break;\n\t\t\t\ti = bell !== -1 && (st === -1 || bell < st) ? bell + 1 : st + 2;\n\t\t\t} else {\n\t\t\t\ti = sequenceStart + 2;\n\t\t\t}\n\t\t}\n\t\treturn cells;\n\t});\n}\n\n/** Row-major 3x3 rotation matrix for yaw (y), then pitch (x), then roll (z). */\nfunction rotation(yaw: number, pitch: number, roll: number): number[] {\n\tconst [sy, cy, sx, cx, sz, cz] = [\n\t\tMath.sin(yaw),\n\t\tMath.cos(yaw),\n\t\tMath.sin(pitch),\n\t\tMath.cos(pitch),\n\t\tMath.sin(roll),\n\t\tMath.cos(roll),\n\t];\n\t// Rz * Rx * Ry\n\tconst ry = [cy, 0, sy, 0, 1, 0, -sy, 0, cy];\n\tconst rx = [1, 0, 0, 0, cx, -sx, 0, sx, cx];\n\tconst rz = [cz, -sz, 0, sz, cz, 0, 0, 0, 1];\n\treturn multiply(rz, multiply(rx, ry));\n}\n\nfunction multiply(a: number[], b: number[]): number[] {\n\tconst result = new Array<number>(9);\n\tfor (let row = 0; row < 3; row++) {\n\t\tfor (let column = 0; column < 3; column++) {\n\t\t\tresult[row * 3 + column] =\n\t\t\t\ta[row * 3]! * b[column]! + a[row * 3 + 1]! * b[3 + column]! + a[row * 3 + 2]! * b[6 + column]!;\n\t\t}\n\t}\n\treturn result;\n}\n\n// The spin is locked to the puzzle: one turn per cycle, facing the camera in the middle of each hold.\nconst SPIN_RAMP = 1.4;\nconst SPIN_SPEED = (Math.PI * 2) / PUZZLE_CYCLE;\n// How much the spin slows down while facing the camera (and speeds up while facing away), from 0 to 1.\nconst SPIN_LINGER = 0.6;\nconst FIRST_FRONT_VIEW = PUZZLE_START + PUZZLE_STEP * PUZZLE_STEPS + PUZZLE_RETURN + PUZZLE_HOLD / 2;\n\n/** Uniform spin that accelerates from rest over SPIN_RAMP, then turns at SPIN_SPEED. */\nfunction baseSpinPhase(time: number): number {\n\tconst elapsed = time - FLY_START;\n\tif (elapsed <= 0) return 0;\n\tconst u = elapsed / SPIN_RAMP;\n\t// Integral of the quintic smoothstep ramp.\n\tif (u < 1) return SPIN_SPEED * SPIN_RAMP * (u ** 6 - 3 * u ** 5 + 2.5 * u ** 4);\n\treturn SPIN_SPEED * (SPIN_RAMP * 0.5 + elapsed - SPIN_RAMP);\n}\n\n// Extra rotation added during the flight, so the phase is a whole number of turns at every assembled front view.\nconst SPIN_ALIGNMENT = Math.PI * 2 - (baseSpinPhase(FIRST_FRONT_VIEW) % (Math.PI * 2));\n\n/** Spin phase: whole turns exactly when the reassembled logo faces the camera. */\nfunction spinPhase(time: number): number {\n\treturn baseSpinPhase(time) + SPIN_ALIGNMENT * smooth((time - FLY_START) / FLY_DURATION);\n}\n\n/** Yaw of the logo. It matches the phase at whole turns but lingers there, so the logo reads from the front. */\nfunction spinAngle(time: number): number {\n\tconst phase = spinPhase(time);\n\treturn phase - SPIN_LINGER * Math.sin(phase);\n}\n\ninterface Face {\n\taxis: number;\n\t/** Plane coordinate on `axis` in object space. */\n\tplane: number;\n\tuMin: number;\n\tuMax: number;\n\tvMin: number;\n\tvMax: number;\n\t/** Projected bounds in braille dots, inclusive. */\n\tminX: number;\n\tminY: number;\n\tmaxX: number;\n\tmaxY: number;\n\tred: number;\n\tgreen: number;\n\tblue: number;\n}\n\n/**\n * Renders the logo blocks into braille cells. Only faces that point at the camera and are not covered by a\n * touching block are drawn. Each face is rasterized over its projected bounds by intersecting each dot's ray\n * with the face's plane, with a depth buffer resolving overlaps. Buffers are reused between frames.\n */\nclass LogoRaster {\n\t/** Braille dot bits per cell. */\n\tbits = new Uint8Array(0);\n\t/** Lit dots per cell. */\n\tcounts = new Uint8Array(0);\n\t/** Summed RGB of the lit dots per cell. */\n\trgb = new Float32Array(0);\n\t/** Halo tint strength per cell, from 0 to 1. Only set when a halo was requested. */\n\thaloAmount = new Float32Array(0);\n\t/** Halo color per cell. */\n\thaloRgb = new Float32Array(0);\n\tprivate width = 0;\n\tprivate height = 0;\n\t/** Ray parameter of the nearest hit per dot; smaller is nearer. */\n\tprivate depth = new Float32Array(0);\n\t/** Face index + 1 of the nearest hit per dot, 0 for none. */\n\tprivate faceIds = new Uint8Array(0);\n\t/** Cells written by the previous frame, cleared before the next one. */\n\tprivate dirty: { minX: number; minY: number; maxX: number; maxY: number } | undefined;\n\t/** Cells with a halo from the previous frame, cleared before the next one. */\n\tprivate haloDirty: { minX: number; minY: number; maxX: number; maxY: number } | undefined;\n\n\trender(\n\t\twidth: number,\n\t\theight: number,\n\t\tpose: Pose,\n\t\tboxes: readonly LogoBox[],\n\t\tbackground: Rgb,\n\t\thaloStrength: number,\n\t): void {\n\t\tconst dotWidth = width * 2;\n\t\tconst dotHeight = height * 4;\n\t\tif (width !== this.width || height !== this.height) {\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.bits = new Uint8Array(width * height);\n\t\t\tthis.counts = new Uint8Array(width * height);\n\t\t\tthis.rgb = new Float32Array(width * height * 3);\n\t\t\tthis.haloAmount = new Float32Array(width * height);\n\t\t\tthis.haloRgb = new Float32Array(width * height * 3);\n\t\t\tthis.haloDirty = undefined;\n\t\t\tthis.depth = new Float32Array(dotWidth * dotHeight).fill(Infinity);\n\t\t\tthis.faceIds = new Uint8Array(dotWidth * dotHeight);\n\t\t\tthis.dirty = undefined;\n\t\t} else if (this.dirty) {\n\t\t\tconst { minX, minY, maxX, maxY } = this.dirty;\n\t\t\tfor (let row = minY; row <= maxY; row++) {\n\t\t\t\tthis.bits.fill(0, row * width + minX, row * width + maxX + 1);\n\t\t\t\tthis.counts.fill(0, row * width + minX, row * width + maxX + 1);\n\t\t\t\tthis.rgb.fill(0, (row * width + minX) * 3, (row * width + maxX + 1) * 3);\n\t\t\t}\n\t\t\tthis.dirty = undefined;\n\t\t}\n\t\tif (this.haloDirty) {\n\t\t\tconst { minX, minY, maxX, maxY } = this.haloDirty;\n\t\t\tfor (let row = minY; row <= maxY; row++) {\n\t\t\t\tthis.haloAmount.fill(0, row * width + minX, row * width + maxX + 1);\n\t\t\t\tthis.haloRgb.fill(0, (row * width + minX) * 3, (row * width + maxX + 1) * 3);\n\t\t\t}\n\t\t\tthis.haloDirty = undefined;\n\t\t}\n\n\t\tconst m = rotation(pose.yaw, pose.pitch, pose.roll);\n\t\tconst { centerX, centerY, scale } = pose;\n\t\t// The camera sits at (0, 0, CAMERA_DISTANCE) in camera space; object space is the transpose rotation.\n\t\tconst origin = [m[6]! * CAMERA_DISTANCE, m[7]! * CAMERA_DISTANCE, m[8]! * CAMERA_DISTANCE];\n\t\tconst light = isLight(background);\n\t\tconst faces = this.visibleFaces(m, origin, pose, boxes, dotWidth, dotHeight, light);\n\t\tif (faces.length === 0) return;\n\t\tlet minX = dotWidth;\n\t\tlet minY = dotHeight;\n\t\tlet maxX = -1;\n\t\tlet maxY = -1;\n\t\tfor (const face of faces) {\n\t\t\tminX = Math.min(minX, face.minX);\n\t\t\tminY = Math.min(minY, face.minY);\n\t\t\tmaxX = Math.max(maxX, face.maxX);\n\t\t\tmaxY = Math.max(maxY, face.maxY);\n\t\t}\n\t\tif (maxX < minX || maxY < minY) return;\n\n\t\tconst depth = this.depth;\n\t\tconst faceIds = this.faceIds;\n\t\tfor (let faceIndex = 0; faceIndex < faces.length; faceIndex++) {\n\t\t\tconst face = faces[faceIndex]!;\n\t\t\tconst a = face.axis;\n\t\t\tconst u = (a + 1) % 3;\n\t\t\tconst v = (a + 2) % 3;\n\t\t\tconst originA = origin[a]!;\n\t\t\tconst originU = origin[u]!;\n\t\t\tconst originV = origin[v]!;\n\t\t\t// The ray direction in object space is linear in the dot position, so it is stepped per dot.\n\t\t\tconst stepA = m[a]! / scale;\n\t\t\tconst stepU = m[u]! / scale;\n\t\t\tconst stepV = m[v]! / scale;\n\t\t\tconst sx = (face.minX + 0.5 - centerX) / scale;\n\t\t\tfor (let dotY = face.minY; dotY <= face.maxY; dotY++) {\n\t\t\t\tconst sy = (dotY + 0.5 - centerY) / scale;\n\t\t\t\tlet directionA = m[a]! * sx + m[3 + a]! * sy - m[6 + a]! * CAMERA_DISTANCE;\n\t\t\t\tlet directionU = m[u]! * sx + m[3 + u]! * sy - m[6 + u]! * CAMERA_DISTANCE;\n\t\t\t\tlet directionV = m[v]! * sx + m[3 + v]! * sy - m[6 + v]! * CAMERA_DISTANCE;\n\t\t\t\tlet index = dotY * dotWidth + face.minX;\n\t\t\t\tfor (let dotX = face.minX; dotX <= face.maxX; dotX++, index++) {\n\t\t\t\t\tconst t = (face.plane - originA) / directionA;\n\t\t\t\t\tif (t > 0 && t < depth[index]!) {\n\t\t\t\t\t\tconst hitU = originU + t * directionU;\n\t\t\t\t\t\tconst hitV = originV + t * directionV;\n\t\t\t\t\t\tif (hitU >= face.uMin && hitU <= face.uMax && hitV >= face.vMin && hitV <= face.vMax) {\n\t\t\t\t\t\t\tdepth[index] = t;\n\t\t\t\t\t\t\tfaceIds[index] = faceIndex + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectionA += stepA;\n\t\t\t\t\tdirectionU += stepU;\n\t\t\t\t\tdirectionV += stepV;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Shade the hit dots, pack them into braille cells, and reset the dot buffers for the next frame.\n\t\tconst bits = this.bits;\n\t\tconst counts = this.counts;\n\t\tconst rgb = this.rgb;\n\t\tlet cellMinX = width;\n\t\tlet cellMinY = height;\n\t\tlet cellMaxX = -1;\n\t\tlet cellMaxY = -1;\n\t\tfor (let dotY = minY; dotY <= maxY; dotY++) {\n\t\t\tlet index = dotY * dotWidth + minX;\n\t\t\tfor (let dotX = minX; dotX <= maxX; dotX++, index++) {\n\t\t\t\tconst id = faceIds[index]!;\n\t\t\t\tif (id === 0) continue;\n\t\t\t\tconst face = faces[id - 1]!;\n\t\t\t\t// Points farther from the camera fade slightly toward the background for depth.\n\t\t\t\tconst fog = clamp01(0.15 - CAMERA_DISTANCE * (1 - depth[index]!) * 0.12) * (light ? 0.5 : 1);\n\t\t\t\tfaceIds[index] = 0;\n\t\t\t\tdepth[index] = Infinity;\n\t\t\t\tconst cellX = dotX >> 1;\n\t\t\t\tconst cellY = dotY >> 2;\n\t\t\t\tconst cell = cellY * width + cellX;\n\t\t\t\tbits[cell]! |= DOT_BITS[(dotY & 3) * 2 + (dotX & 1)];\n\t\t\t\tcounts[cell]!++;\n\t\t\t\trgb[cell * 3] += face.red + (background[0] - face.red) * fog;\n\t\t\t\trgb[cell * 3 + 1] += face.green + (background[1] - face.green) * fog;\n\t\t\t\trgb[cell * 3 + 2] += face.blue + (background[2] - face.blue) * fog;\n\t\t\t\tif (cellX < cellMinX) cellMinX = cellX;\n\t\t\t\tif (cellX > cellMaxX) cellMaxX = cellX;\n\t\t\t\tif (cellY < cellMinY) cellMinY = cellY;\n\t\t\t\tif (cellY > cellMaxY) cellMaxY = cellY;\n\t\t\t}\n\t\t}\n\t\tif (cellMaxX >= 0) this.dirty = { minX: cellMinX, minY: cellMinY, maxX: cellMaxX, maxY: cellMaxY };\n\t\tif (haloStrength > 0) this.renderHalo(haloStrength);\n\t}\n\n\t/**\n\t * Blur the logo's coverage and color over neighboring cells with a separable tent filter, so the tint falls\n\t * off smoothly past the logo's edges.\n\t */\n\tprivate renderHalo(strength: number): void {\n\t\tconst cells = this.dirty;\n\t\tif (!cells) return;\n\t\tconst { width, height, counts, rgb } = this;\n\t\tconst minX = Math.max(0, cells.minX - HALO_RADIUS_X);\n\t\tconst maxX = Math.min(width - 1, cells.maxX + HALO_RADIUS_X);\n\t\tconst minY = Math.max(0, cells.minY - HALO_RADIUS_Y);\n\t\tconst maxY = Math.min(height - 1, cells.maxY + HALO_RADIUS_Y);\n\t\tconst regionWidth = maxX - minX + 1;\n\t\tconst tent = (radius: number) => {\n\t\t\tconst weights = Array.from({ length: radius * 2 + 1 }, (_, i) => radius + 1 - Math.abs(i - radius));\n\t\t\tconst total = weights.reduce((sum, weight) => sum + weight, 0);\n\t\t\treturn weights.map((weight) => weight / total);\n\t\t};\n\t\tconst weightsX = tent(HALO_RADIUS_X);\n\t\tconst weightsY = tent(HALO_RADIUS_Y);\n\n\t\t// Horizontal pass over the rows that contain the logo: coverage and premultiplied color per cell.\n\t\tconst rows = cells.maxY - cells.minY + 1;\n\t\tconst horizontal = new Float32Array(rows * regionWidth * 4);\n\t\tfor (let y = cells.minY; y <= cells.maxY; y++) {\n\t\t\tfor (let x = minX; x <= maxX; x++) {\n\t\t\t\tlet coverage = 0;\n\t\t\t\tlet red = 0;\n\t\t\t\tlet green = 0;\n\t\t\t\tlet blue = 0;\n\t\t\t\tfor (let dx = -HALO_RADIUS_X; dx <= HALO_RADIUS_X; dx++) {\n\t\t\t\t\tconst sourceX = x + dx;\n\t\t\t\t\tif (sourceX < cells.minX || sourceX > cells.maxX) continue;\n\t\t\t\t\tconst source = y * width + sourceX;\n\t\t\t\t\tconst count = counts[source]!;\n\t\t\t\t\tif (count === 0) continue;\n\t\t\t\t\tconst weight = weightsX[dx + HALO_RADIUS_X]! / 8;\n\t\t\t\t\tcoverage += count * weight;\n\t\t\t\t\tred += rgb[source * 3]! * weight;\n\t\t\t\t\tgreen += rgb[source * 3 + 1]! * weight;\n\t\t\t\t\tblue += rgb[source * 3 + 2]! * weight;\n\t\t\t\t}\n\t\t\t\tconst target = ((y - cells.minY) * regionWidth + (x - minX)) * 4;\n\t\t\t\thorizontal[target] = coverage;\n\t\t\t\thorizontal[target + 1] = red;\n\t\t\t\thorizontal[target + 2] = green;\n\t\t\t\thorizontal[target + 3] = blue;\n\t\t\t}\n\t\t}\n\n\t\t// Vertical pass into the halo buffers.\n\t\tfor (let y = minY; y <= maxY; y++) {\n\t\t\tfor (let x = minX; x <= maxX; x++) {\n\t\t\t\tlet coverage = 0;\n\t\t\t\tlet red = 0;\n\t\t\t\tlet green = 0;\n\t\t\t\tlet blue = 0;\n\t\t\t\tfor (let dy = -HALO_RADIUS_Y; dy <= HALO_RADIUS_Y; dy++) {\n\t\t\t\t\tconst sourceY = y + dy;\n\t\t\t\t\tif (sourceY < cells.minY || sourceY > cells.maxY) continue;\n\t\t\t\t\tconst weight = weightsY[dy + HALO_RADIUS_Y]!;\n\t\t\t\t\tconst source = ((sourceY - cells.minY) * regionWidth + (x - minX)) * 4;\n\t\t\t\t\tcoverage += horizontal[source]! * weight;\n\t\t\t\t\tred += horizontal[source + 1]! * weight;\n\t\t\t\t\tgreen += horizontal[source + 2]! * weight;\n\t\t\t\t\tblue += horizontal[source + 3]! * weight;\n\t\t\t\t}\n\t\t\t\tconst target = y * width + x;\n\t\t\t\t// Cells under the logo keep at least their own coverage, so faces stay solidly tinted.\n\t\t\t\tconst count = counts[target]!;\n\t\t\t\tif (count > 0 && count / 8 > coverage) {\n\t\t\t\t\tcoverage = count / 8;\n\t\t\t\t\tred = (rgb[target * 3]! / count) * coverage;\n\t\t\t\t\tgreen = (rgb[target * 3 + 1]! / count) * coverage;\n\t\t\t\t\tblue = (rgb[target * 3 + 2]! / count) * coverage;\n\t\t\t\t}\n\t\t\t\tif (coverage <= 0) continue;\n\t\t\t\t// Quantized so neighboring cells usually share a background and its escape sequence.\n\t\t\t\tconst amount = Math.round(strength * Math.min(1, coverage) ** 0.7 * HALO_LEVELS) / HALO_LEVELS;\n\t\t\t\tif (amount <= 0) continue;\n\t\t\t\tthis.haloAmount[target] = amount;\n\t\t\t\tthis.haloRgb[target * 3] = Math.round(red / coverage / LOGO_COLOR_STEP) * LOGO_COLOR_STEP;\n\t\t\t\tthis.haloRgb[target * 3 + 1] = Math.round(green / coverage / LOGO_COLOR_STEP) * LOGO_COLOR_STEP;\n\t\t\t\tthis.haloRgb[target * 3 + 2] = Math.round(blue / coverage / LOGO_COLOR_STEP) * LOGO_COLOR_STEP;\n\t\t\t}\n\t\t}\n\t\tthis.haloDirty = { minX, minY, maxX, maxY };\n\t}\n\n\tprivate visibleFaces(\n\t\tm: number[],\n\t\torigin: number[],\n\t\tpose: Pose,\n\t\tboxes: readonly LogoBox[],\n\t\tdotWidth: number,\n\t\tdotHeight: number,\n\t\tlightBackground: boolean,\n\t): Face[] {\n\t\tconst faces: Face[] = [];\n\t\tfor (const box of boxes) {\n\t\t\tfor (let a = 0; a < 3; a++) {\n\t\t\t\tconst u = (a + 1) % 3;\n\t\t\t\tconst v = (a + 2) % 3;\n\t\t\t\tfor (const side of [-1, 1]) {\n\t\t\t\t\tconst plane = side > 0 ? box.max[a]! : box.min[a]!;\n\t\t\t\t\t// Back faces point away from the camera.\n\t\t\t\t\tif ((origin[a]! - plane) * side <= 0) continue;\n\t\t\t\t\t// Faces pressed against a neighboring block are hidden. Positions are exact while blocks rest.\n\t\t\t\t\tconst covered = boxes.some(\n\t\t\t\t\t\t(other) =>\n\t\t\t\t\t\t\tother !== box &&\n\t\t\t\t\t\t\t(side > 0 ? other.min[a] : other.max[a]) === plane &&\n\t\t\t\t\t\t\tother.min[u]! <= box.min[u]! &&\n\t\t\t\t\t\t\tother.max[u]! >= box.max[u]! &&\n\t\t\t\t\t\t\tother.min[v]! <= box.min[v]! &&\n\t\t\t\t\t\t\tother.max[v]! >= box.max[v]!,\n\t\t\t\t\t);\n\t\t\t\t\tif (covered) continue;\n\n\t\t\t\t\tlet minX = Infinity;\n\t\t\t\t\tlet minY = Infinity;\n\t\t\t\t\tlet maxX = -Infinity;\n\t\t\t\t\tlet maxY = -Infinity;\n\t\t\t\t\tconst corner = [0, 0, 0];\n\t\t\t\t\tfor (const cornerU of [box.min[u]!, box.max[u]!]) {\n\t\t\t\t\t\tfor (const cornerV of [box.min[v]!, box.max[v]!]) {\n\t\t\t\t\t\t\tcorner[a] = plane;\n\t\t\t\t\t\t\tcorner[u] = cornerU;\n\t\t\t\t\t\t\tcorner[v] = cornerV;\n\t\t\t\t\t\t\tconst x = m[0]! * corner[0]! + m[1]! * corner[1]! + m[2]! * corner[2]!;\n\t\t\t\t\t\t\tconst y = m[3]! * corner[0]! + m[4]! * corner[1]! + m[5]! * corner[2]!;\n\t\t\t\t\t\t\tconst z = m[6]! * corner[0]! + m[7]! * corner[1]! + m[8]! * corner[2]!;\n\t\t\t\t\t\t\tconst perspective = (pose.scale * CAMERA_DISTANCE) / (CAMERA_DISTANCE - z);\n\t\t\t\t\t\t\tconst screenX = pose.centerX + x * perspective;\n\t\t\t\t\t\t\tconst screenY = pose.centerY + y * perspective;\n\t\t\t\t\t\t\tminX = Math.min(minX, screenX);\n\t\t\t\t\t\t\tminY = Math.min(minY, screenY);\n\t\t\t\t\t\t\tmaxX = Math.max(maxX, screenX);\n\t\t\t\t\t\t\tmaxY = Math.max(maxY, screenY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst face = {\n\t\t\t\t\t\tminX: Math.max(0, Math.floor(minX)),\n\t\t\t\t\t\tminY: Math.max(0, Math.floor(minY)),\n\t\t\t\t\t\tmaxX: Math.min(dotWidth - 1, Math.ceil(maxX)),\n\t\t\t\t\t\tmaxY: Math.min(dotHeight - 1, Math.ceil(maxY)),\n\t\t\t\t\t};\n\t\t\t\t\tif (face.maxX < face.minX || face.maxY < face.minY) continue;\n\n\t\t\t\t\t// Faces are flat, so lighting is computed once per face. The normal in camera space is a\n\t\t\t\t\t// column of the rotation matrix.\n\t\t\t\t\tconst nx = m[a]! * side;\n\t\t\t\t\tconst ny = m[3 + a]! * side;\n\t\t\t\t\tconst nz = m[6 + a]! * side;\n\t\t\t\t\tconst diffuse = Math.max(0, nx * LIGHT[0] + ny * LIGHT[1] + nz * LIGHT[2]);\n\t\t\t\t\tconst rim = Math.max(0, nx * 0.8 - nz * 0.3);\n\t\t\t\t\t// On light backgrounds, highlights toward white would vanish, so faces only get darker than\n\t\t\t\t\t// the brand colors there.\n\t\t\t\t\tconst specular = lightBackground\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: Math.max(0, nx * HALF_VECTOR[0] + ny * HALF_VECTOR[1] + nz * HALF_VECTOR[2]) ** 24 * 0.6 * 255;\n\t\t\t\t\tconst light = lightBackground\n\t\t\t\t\t\t? Math.min(1, 0.55 + diffuse * 0.45 + rim * 0.1)\n\t\t\t\t\t\t: 0.45 + diffuse * 0.78 + rim * 0.25;\n\t\t\t\t\tfaces.push({\n\t\t\t\t\t\taxis: a,\n\t\t\t\t\t\tplane,\n\t\t\t\t\t\tuMin: box.min[u]!,\n\t\t\t\t\t\tuMax: box.max[u]!,\n\t\t\t\t\t\tvMin: box.min[v]!,\n\t\t\t\t\t\tvMax: box.max[v]!,\n\t\t\t\t\t\t...face,\n\t\t\t\t\t\tred: Math.min(255, box.color[0] * light + specular),\n\t\t\t\t\t\tgreen: Math.min(255, box.color[1] * light + specular),\n\t\t\t\t\t\tblue: Math.min(255, box.color[2] * light + specular),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn faces;\n\t}\n}\n\nexport interface PiLogoAnimationOptions {\n\t/** The screen to dissolve, as rendered lines. */\n\tscreen: readonly string[];\n\t/** Terminal cell of the header logo's top-left corner. */\n\tlogoColumn: number;\n\tlogoRow: number;\n}\n\nlet playing = false;\n\n/**\n * Show the animation as a fullscreen overlay until it is dismissed. The overlay takes focus and mouse input and\n * returns focus when hidden, so the rest of the UI keeps running underneath untouched.\n */\nexport async function playPiLogoAnimation(tui: TUI, options: PiLogoAnimationOptions): Promise<void> {\n\tif (playing) return;\n\tplaying = true;\n\t// Fading needs the terminal's actual default colors; the theme only knows its own.\n\tconst reported = await tui.queryTerminalColors({ timeoutMs: 100 });\n\tconst dark = theme.appearance === \"dark\";\n\tconst toRgbTuple = (rgb: { r: number; g: number; b: number } | undefined, fallback: Rgb): Rgb =>\n\t\trgb ? [rgb.r, rgb.g, rgb.b] : fallback;\n\tconst colors = {\n\t\tforeground: toRgbTuple(reported.foreground, toRgb(theme.colors.text)),\n\t\tbackground: toRgbTuple(reported.background, dark ? [0, 0, 0] : [255, 255, 255]),\n\t};\n\tif (tui.hasOverlay()) {\n\t\tplaying = false;\n\t\treturn;\n\t}\n\tconst animation = new PiLogoAnimation(tui, options, colors, () => {\n\t\tplaying = false;\n\t\toverlay.hide();\n\t});\n\tconst overlay = tui.showOverlay(animation, { anchor: \"top-left\", width: \"100%\", maxHeight: \"100%\" });\n}\n\nexport class PiLogoAnimation implements Component {\n\tprivate readonly tui: TUI;\n\tprivate readonly options: PiLogoAnimationOptions;\n\tprivate readonly foreground: Rgb;\n\tprivate readonly background: Rgb;\n\tprivate readonly onDone: () => void;\n\tprivate readonly startTime = performance.now();\n\tprivate lastRender = performance.now();\n\tprivate timer: ReturnType<typeof setInterval> | undefined;\n\tprivate exit:\n\t\t| { start: number; time: number; yaw: number; targetYaw: number; offsets: Array<[number, number, number]> }\n\t\t| undefined;\n\tprivate shuffle: { cycle: number; steps: Cell3[][] } | undefined;\n\tprivate screenWidth = -1;\n\tprivate screenHeight = -1;\n\t/** Star per cell index, or undefined. */\n\tprivate stars: Array<Star | undefined> = [];\n\tprivate cells: ScreenCell[][] = [];\n\tprivate readonly ansiCache = new Map<number, string>();\n\tprivate readonly logo = new LogoRaster();\n\n\tconstructor(\n\t\ttui: TUI,\n\t\toptions: PiLogoAnimationOptions,\n\t\tcolors: { foreground: Rgb; background: Rgb },\n\t\tonDone: () => void,\n\t) {\n\t\tthis.tui = tui;\n\t\tthis.options = options;\n\t\tthis.foreground = colors.foreground;\n\t\tthis.background = colors.background;\n\t\tthis.onDone = onDone;\n\t\tthis.timer = setInterval(() => {\n\t\t\t// Also stop when no longer rendered, e.g. when pi hides all overlays on exit.\n\t\t\tif ((this.exit && this.exitProgress() >= 1) || performance.now() - this.lastRender > 1000) this.finish();\n\t\t\telse this.tui.requestRender();\n\t\t}, FRAME_MS);\n\t\tthis.timer.unref?.();\n\t}\n\n\t/** Play the exit animation. A second call skips it. */\n\tclose(): void {\n\t\tif (this.exit) {\n\t\t\tthis.finish();\n\t\t\treturn;\n\t\t}\n\t\tconst time = this.elapsed();\n\t\tconst yaw = spinAngle(time);\n\t\tconst turn = Math.PI * 2;\n\t\tthis.exit = {\n\t\t\tstart: performance.now(),\n\t\t\ttime,\n\t\t\tyaw,\n\t\t\ttargetYaw: Math.ceil(yaw / turn) * turn,\n\t\t\toffsets: this.blockOffsets(time),\n\t\t};\n\t}\n\n\thandleInput(data: string): void {\n\t\tconst keybindings = getKeybindings();\n\t\tif (keybindings.matches(data, \"tui.select.cancel\") || keybindings.matches(data, \"app.clear\")) this.close();\n\t}\n\n\thandleMouse(event: TuiMouseEvent): TuiMouseEventResult {\n\t\tif (event.type === \"click\") this.close();\n\t\treturn { handled: true, render: false };\n\t}\n\n\tinvalidate(): void {\n\t\tthis.screenWidth = -1;\n\t\tthis.screenHeight = -1;\n\t\tthis.ansiCache.clear();\n\t}\n\n\trender(width: number): string[] {\n\t\tconst height = Math.max(1, this.tui.terminal.rows);\n\t\tconst foreground = this.foreground;\n\t\tconst background = this.background;\n\t\tthis.lastRender = performance.now();\n\t\tif (width !== this.screenWidth || height !== this.screenHeight) {\n\t\t\tthis.screenWidth = width;\n\t\t\tthis.screenHeight = height;\n\t\t\tthis.cells = this.prepareCells(width, foreground);\n\t\t\tthis.stars = this.prepareStars(width, height);\n\t\t}\n\n\t\t// Dissolve time runs forward on entry and backward on exit, so the screen reassembles in reverse order.\n\t\tlet dissolveTime: number;\n\t\tlet pose: Pose;\n\t\tlet hintAlpha: number;\n\t\tlet starAlpha: number;\n\t\tlet offsets: Array<[number, number, number]>;\n\t\tif (this.exit) {\n\t\t\tconst progress = this.exitProgress();\n\t\t\tconst landing = clamp01(progress / 0.8);\n\t\t\tconst settle = 1 - smooth(landing);\n\t\t\tdissolveTime = Math.min(this.exit.time, DISSOLVE_END) * (1 - progress);\n\t\t\tpose = this.pose(width, height, this.flyProgress(this.exit.time) * settle, this.exit.time);\n\t\t\tpose.yaw = this.exit.yaw + (this.exit.targetYaw - this.exit.yaw) * easeOut(landing);\n\t\t\tpose.pitch *= settle;\n\t\t\tpose.roll *= settle;\n\t\t\thintAlpha = this.hintAlpha(this.exit.time) * (1 - smooth(progress / 0.2));\n\t\t\tstarAlpha = this.starAlpha(this.exit.time) * (1 - smooth(progress / 0.3));\n\t\t\t// Blocks are home well before the logo lands.\n\t\t\tconst gather = 1 - smooth(progress / 0.5);\n\t\t\toffsets = this.exit.offsets.map(([x, y, z]) => [x * gather, y * gather, z * gather]);\n\t\t} else {\n\t\t\tconst time = this.elapsed();\n\t\t\tdissolveTime = time;\n\t\t\tpose = this.pose(width, height, this.flyProgress(time), time);\n\t\t\thintAlpha = this.hintAlpha(time);\n\t\t\tstarAlpha = this.starAlpha(time);\n\t\t\toffsets = this.blockOffsets(time);\n\t\t}\n\n\t\tconst boxes: LogoBox[] = BLOCKS.map((block, index) => {\n\t\t\tconst [dx, dy, dz] = offsets[index]!;\n\t\t\tconst x = block.home[0] - 2 + dx;\n\t\t\tconst y = block.home[1] - 2 + dy;\n\t\t\treturn { min: [x, y, dz - DEPTH / 2], max: [x + 1, y + 1, dz + DEPTH / 2], color: block.color };\n\t\t});\n\t\tconst logo = this.logo;\n\t\tlogo.render(width, height, pose, boxes, background, isLight(background) ? LIGHT_HALO_STRENGTH : 0);\n\t\tconst halo = (index: number, base: Rgb | undefined): Rgb | undefined => {\n\t\t\tconst amount = logo.haloAmount[index]!;\n\t\t\tif (amount <= 0) return base;\n\t\t\tconst color = logo.haloRgb;\n\t\t\treturn mix(base ?? background, [color[index * 3]!, color[index * 3 + 1]!, color[index * 3 + 2]!], amount);\n\t\t};\n\t\tconst backgroundFade = smooth(dissolveTime / BACKGROUND_FADE);\n\t\tconst textFade = smooth(dissolveTime / 0.6) * 0.3;\n\t\t// Once the screen has fully dissolved, the text layer is empty and can be skipped.\n\t\tconst textActive = dissolveTime < DISSOLVE_END || backgroundFade < 1;\n\t\tconst hint = this.hint(width, height, hintAlpha, background);\n\t\tconst frame = Math.floor(dissolveTime * 14);\n\t\tconst now = this.elapsed();\n\t\t// Star brightness is quantized, so a row only changes when one of its stars steps to another level\n\t\t// instead of on every frame.\n\t\tconst starLevel = Math.round(starAlpha * STAR_ALPHA_LEVELS) / STAR_ALPHA_LEVELS;\n\t\tconst starfield = (index: number): { text: string; fg: Rgb } | undefined => {\n\t\t\tif (starLevel <= 0) return undefined;\n\t\t\tconst star = this.stars[index];\n\t\t\tif (!star) return undefined;\n\t\t\tconst flicker =\n\t\t\t\tMath.round((0.5 + 0.5 * Math.sin(now * star.speed + star.phase)) * STAR_FLICKER_LEVELS) /\n\t\t\t\tSTAR_FLICKER_LEVELS;\n\t\t\treturn {\n\t\t\t\ttext: star.glyph,\n\t\t\t\tfg: mix(background, mix(foreground, star.tint, 0.5), star.strength * (0.7 + 0.3 * flicker) * starLevel),\n\t\t\t};\n\t\t};\n\t\tconst lines: string[] = [];\n\t\tfor (let row = 0; row < height; row++) {\n\t\t\tconst cells = this.cells[row] ?? [];\n\t\t\tlet line = \"\";\n\t\t\tlet currentFg = -1;\n\t\t\tlet currentBg = -1;\n\t\t\tconst emit = (text: string, fg: Rgb | undefined, bg: Rgb | undefined) => {\n\t\t\t\tconst fgKey = fg ? this.pack(fg) : -1;\n\t\t\t\tconst bgKey = bg ? this.pack(bg) : -1;\n\t\t\t\tif (fgKey !== currentFg && text !== \" \") {\n\t\t\t\t\tline += fg ? this.ansi(fgKey, false) : \"\\x1b[39m\";\n\t\t\t\t\tcurrentFg = fgKey;\n\t\t\t\t}\n\t\t\t\tif (bgKey !== currentBg) {\n\t\t\t\t\tline += bg ? this.ansi(bgKey, true) : \"\\x1b[49m\";\n\t\t\t\t\tcurrentBg = bgKey;\n\t\t\t\t}\n\t\t\t\tline += text;\n\t\t\t};\n\t\t\tfor (let column = 0; column < width; column++) {\n\t\t\t\tconst index = row * width + column;\n\t\t\t\tconst cell = textActive ? cells[column] : undefined;\n\t\t\t\tconst cellBg = halo(\n\t\t\t\t\tindex,\n\t\t\t\t\tcell?.bg && backgroundFade < 1 ? mix(cell.bg, background, backgroundFade) : undefined,\n\t\t\t\t);\n\t\t\t\tif (hint && row === hint.row && column >= hint.start && column < hint.start + hint.text.length) {\n\t\t\t\t\tconst offset = column - hint.start;\n\t\t\t\t\temit(hint.text[offset]!, offset < hint.keyLength ? hint.keyColor : hint.color, cellBg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst dots = logo.bits[index]!;\n\t\t\t\tif (dots) {\n\t\t\t\t\t// Quantized so neighboring cells on one face usually share a color and its escape sequence.\n\t\t\t\t\tconst step = LOGO_COLOR_STEP * logo.counts[index]!;\n\t\t\t\t\tconst rgb = logo.rgb;\n\t\t\t\t\tconst color: Rgb = [\n\t\t\t\t\t\tMath.round(rgb[index * 3]! / step) * LOGO_COLOR_STEP,\n\t\t\t\t\t\tMath.round(rgb[index * 3 + 1]! / step) * LOGO_COLOR_STEP,\n\t\t\t\t\t\tMath.round(rgb[index * 3 + 2]! / step) * LOGO_COLOR_STEP,\n\t\t\t\t\t];\n\t\t\t\t\temit(BRAILLE[dots]!, color, cellBg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!cell) {\n\t\t\t\t\tconst star = starfield(index);\n\t\t\t\t\temit(star?.text ?? \" \", star?.fg, cellBg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst dust = (dissolveTime - cell.delay) / DUST_DURATION;\n\t\t\t\tif (dust < 0 && cell.width === 2 && !logo.bits[index + 1]) {\n\t\t\t\t\temit(cell.text, mix(cell.fg, background, textFade), cellBg);\n\t\t\t\t\tcolumn++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (dust < 0 && cell.width === 1) {\n\t\t\t\t\temit(cell.text, mix(cell.fg, background, textFade), cellBg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst dotCount = dust < 0 ? cell.ink : Math.round(cell.ink * (1 - clamp01(dust)));\n\t\t\t\tif (dotCount <= 0) {\n\t\t\t\t\tconst star = starfield(index);\n\t\t\t\t\temit(star?.text ?? \" \", star?.fg, cellBg);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Pick `dotCount` distinct dots; the choice changes a few times per second so the dust shimmers.\n\t\t\t\tlet bits = 0;\n\t\t\t\tlet placed = 0;\n\t\t\t\tfor (let attempt = 0; placed < dotCount && attempt < 32; attempt++) {\n\t\t\t\t\tconst bit = DOT_BITS[Math.floor(hash(cell.seed * 7919 + frame * 131 + attempt) * 8)]!;\n\t\t\t\t\tif (bits & bit) continue;\n\t\t\t\t\tbits |= bit;\n\t\t\t\t\tplaced++;\n\t\t\t\t}\n\t\t\t\tconst fade = textFade + (1 - textFade) * clamp01(dust) ** 0.8;\n\t\t\t\temit(BRAILLE[bits]!, mix(cell.fg, background, fade), cellBg);\n\t\t\t}\n\t\t\tlines.push(`${line}\\x1b[0m`);\n\t\t}\n\t\treturn lines;\n\t}\n\n\tprivate elapsed(): number {\n\t\treturn (performance.now() - this.startTime) / 1000;\n\t}\n\n\tprivate exitProgress(): number {\n\t\treturn this.exit ? clamp01((performance.now() - this.exit.start) / 1000 / EXIT_DURATION) : 0;\n\t}\n\n\tprivate finish(): void {\n\t\tif (!this.timer) return;\n\t\tclearInterval(this.timer);\n\t\tthis.timer = undefined;\n\t\tthis.onDone();\n\t}\n\n\t/** Each block's displacement from its place in the logo at `time`, in grid units. */\n\tprivate blockOffsets(time: number): Array<[number, number, number]> {\n\t\tconst home = (): Array<[number, number, number]> => BLOCKS.map(() => [0, 0, 0]);\n\t\tif (time < PUZZLE_START) return home();\n\t\tconst cycle = Math.floor((time - PUZZLE_START) / PUZZLE_CYCLE);\n\t\tconst local = time - PUZZLE_START - cycle * PUZZLE_CYCLE;\n\t\tif (this.shuffle?.cycle !== cycle) this.shuffle = { cycle, steps: shuffleSteps(cycle) };\n\t\tconst steps = this.shuffle.steps;\n\t\tconst offset = (position: Cell3, index: number): [number, number, number] => {\n\t\t\tconst block = BLOCKS[index]!.home;\n\t\t\treturn [position[0] - block[0], position[1] - block[1], position[2] - block[2]];\n\t\t};\n\t\tconst shuffleEnd = PUZZLE_STEP * PUZZLE_STEPS;\n\t\tif (local < shuffleEnd) {\n\t\t\tconst step = Math.floor(local / PUZZLE_STEP);\n\t\t\tconst progress = smooth((local - step * PUZZLE_STEP) / PUZZLE_STEP);\n\t\t\treturn steps[step]!.map((from, index) => {\n\t\t\t\tconst a = offset(from, index);\n\t\t\t\tconst b = offset(steps[step + 1]![index]!, index);\n\t\t\t\treturn [a[0] + (b[0] - a[0]) * progress, a[1] + (b[1] - a[1]) * progress, a[2] + (b[2] - a[2]) * progress];\n\t\t\t});\n\t\t}\n\t\tif (local < shuffleEnd + PUZZLE_RETURN) {\n\t\t\t// All blocks fly home at once. Alternating arcs in depth keep them from passing through each other.\n\t\t\tconst u = (local - shuffleEnd) / PUZZLE_RETURN;\n\t\t\tconst remaining = 1 - smooth(u);\n\t\t\tconst arc = Math.sin(Math.PI * clamp01(u)) * 0.8;\n\t\t\treturn steps[PUZZLE_STEPS]!.map((position, index) => {\n\t\t\t\tconst [x, y, z] = offset(position, index);\n\t\t\t\treturn [x * remaining, y * remaining, z * remaining + (index % 2 === 0 ? arc : -arc)];\n\t\t\t});\n\t\t}\n\t\treturn home();\n\t}\n\n\tprivate flyProgress(time: number): number {\n\t\treturn smooth((time - FLY_START) / FLY_DURATION);\n\t}\n\n\tprivate starAlpha(time: number): number {\n\t\treturn smooth((time - STARS_START) / STARS_FADE);\n\t}\n\n\tprivate hintAlpha(time: number): number {\n\t\treturn smooth((time - FLY_START - FLY_DURATION) / HINT_FADE);\n\t}\n\n\tprivate pose(width: number, height: number, progress: number, time: number): Pose {\n\t\t// At the start the front face must cover exactly the header logo's 8x8 dots despite the perspective.\n\t\tconst startScale = (2 * (CAMERA_DISTANCE - DEPTH / 2)) / CAMERA_DISTANCE;\n\t\tconst reach = LOGO_RADIUS * (CAMERA_DISTANCE / (CAMERA_DISTANCE - LOGO_RADIUS));\n\t\tconst endScale = Math.max(startScale, Math.min(width * 2 * 0.35, (height * 4 - 8) * 0.48) / reach);\n\t\tconst startX = this.options.logoColumn * 2 + 4;\n\t\tconst startY = this.options.logoRow * 4 + 4;\n\t\tconst endX = width;\n\t\tconst endY = height * 2 - 2;\n\t\treturn {\n\t\t\tcenterX: startX + (endX - startX) * progress,\n\t\t\tcenterY: startY + (endY - startY) * progress,\n\t\t\t// Interpolate the zoom geometrically so it feels uniform.\n\t\t\tscale: startScale * (endScale / startScale) ** progress,\n\t\t\tyaw: spinAngle(time),\n\t\t\t// Tilts are zero at whole turns, so the camera looks straight at the front of the reassembled logo.\n\t\t\tpitch: 0.3 * Math.sin(spinPhase(time)) * progress,\n\t\t\troll: 0.06 * Math.sin(2 * spinPhase(time)) * progress,\n\t\t};\n\t}\n\n\tprivate hint(\n\t\twidth: number,\n\t\theight: number,\n\t\talpha: number,\n\t\tbackground: Rgb,\n\t): { row: number; start: number; text: string; keyLength: number; keyColor: Rgb; color: Rgb } | undefined {\n\t\tif (alpha <= 0) return undefined;\n\t\tconst key = formatKeyText(getKeybindings().getKeys(\"tui.select.cancel\")[0] ?? \"escape\");\n\t\tconst text = `${key} to return`;\n\t\tif (text.length > width) return undefined;\n\t\treturn {\n\t\t\trow: height - 2,\n\t\t\tstart: Math.floor((width - text.length) / 2),\n\t\t\ttext,\n\t\t\tkeyLength: key.length,\n\t\t\tkeyColor: mix(background, toRgb(theme.colors.muted), alpha),\n\t\t\tcolor: mix(background, toRgb(theme.colors.dim), alpha),\n\t\t};\n\t}\n\n\t/** A sparse, deterministic starfield: one braille dot in about STAR_DENSITY of all cells. */\n\tprivate prepareStars(width: number, height: number): Array<Star | undefined> {\n\t\tconst stars = new Array<Star | undefined>(width * height);\n\t\tfor (let index = 0; index < width * height; index++) {\n\t\t\tif (hash(index * 3 + 0x51ed) >= STAR_DENSITY) continue;\n\t\t\tconst random = (salt: number) => hash(index * 7 + salt * 0x9e37);\n\t\t\tstars[index] = {\n\t\t\t\tglyph: BRAILLE[DOT_BITS[Math.floor(random(1) * 8)]!]!,\n\t\t\t\ttint: STAR_TINTS[Math.floor(random(2) * STAR_TINTS.length)]!,\n\t\t\t\tstrength: 0.1 + random(3) * 0.12,\n\t\t\t\tphase: random(4) * Math.PI * 2,\n\t\t\t\tspeed: 0.4 + random(5) * 0.8,\n\t\t\t};\n\t\t}\n\t\treturn stars;\n\t}\n\n\tprivate prepareCells(width: number, foreground: Rgb): ScreenCell[][] {\n\t\tconst cells = parseScreen(this.options.screen, width, foreground, this.background);\n\t\tconst centerX = this.options.logoColumn + 2;\n\t\tconst centerY = this.options.logoRow + 1;\n\t\tconst height = Math.max(1, this.tui.terminal.rows);\n\t\tconst farthest = Math.hypot(Math.max(centerX, width - centerX), Math.max(centerY, height - centerY) * 2);\n\t\tfor (let row = 0; row < cells.length; row++) {\n\t\t\tconst line = cells[row]!;\n\t\t\tfor (let column = 0; column < line.length; column++) {\n\t\t\t\tconst cell = line[column]!;\n\t\t\t\t// Wide graphemes share their first column's timing so both halves change together.\n\t\t\t\tconst owner = cell.width === 0 ? line[column - 1]! : cell;\n\t\t\t\tconst seed = hash(row * 65_537 + column);\n\t\t\t\tif (cell.width !== 0) {\n\t\t\t\t\tconst distance = Math.hypot(column - centerX, (row - centerY) * 2) / farthest;\n\t\t\t\t\tcell.delay = FLY_START + distance * WAVE_SPREAD + seed * WAVE_JITTER;\n\t\t\t\t} else {\n\t\t\t\t\tcell.delay = owner.delay;\n\t\t\t\t}\n\t\t\t\tcell.seed = row * 65_537 + column;\n\t\t\t\tcell.ink = glyphInk(owner.text, seed);\n\t\t\t}\n\t\t}\n\t\t// The 3D logo replaces the header logo.\n\t\tfor (let row = this.options.logoRow; row < this.options.logoRow + 2; row++) {\n\t\t\tconst line = cells[row];\n\t\t\tif (!line) continue;\n\t\t\tfor (let column = this.options.logoColumn; column < this.options.logoColumn + 4; column++) {\n\t\t\t\tconst cell = line[column];\n\t\t\t\tif (cell) {\n\t\t\t\t\tcell.text = \" \";\n\t\t\t\t\tcell.width = 1;\n\t\t\t\t\tcell.ink = 0;\n\t\t\t\t\tcell.bg = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cells;\n\t}\n\n\tprivate pack(color: Rgb): number {\n\t\treturn (Math.round(color[0]) << 16) | (Math.round(color[1]) << 8) | Math.round(color[2]);\n\t}\n\n\tprivate ansi(key: number, isBackground: boolean): string {\n\t\tconst cacheKey = key * 2 + (isBackground ? 1 : 0);\n\t\tlet value = this.ansiCache.get(cacheKey);\n\t\tif (value === undefined) {\n\t\t\tconst color = rgbColor((key >> 16) & 255, (key >> 8) & 255, key & 255);\n\t\t\tconst mode = theme.getColorMode();\n\t\t\tvalue = isBackground ? backgroundAnsi(color, mode) : foregroundAnsi(color, mode);\n\t\t\tthis.ansiCache.set(cacheKey, value);\n\t\t}\n\t\treturn value;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TUI } from "@earendil-works/pi-tui";
|
|
2
|
+
/**
|
|
3
|
+
* Plays the logo easter egg (see pi-logo-animation.ts), which loads on the first click. Only fullscreen mode
|
|
4
|
+
* can show it, because it dissolves the rendered screen. The screen is captured before loading.
|
|
5
|
+
*/
|
|
6
|
+
export declare function playPiLogoAnimation(tui: TUI, logoColumn: number, logoRow: number): void;
|
|
7
|
+
//# sourceMappingURL=pi-logo-animation.lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi-logo-animation.lazy.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo-animation.lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAgB,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAOvF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TuiAltScreen } from "@earendil-works/pi-tui";
|
|
2
|
+
/**
|
|
3
|
+
* Plays the logo easter egg (see pi-logo-animation.ts), which loads on the first click. Only fullscreen mode
|
|
4
|
+
* can show it, because it dissolves the rendered screen. The screen is captured before loading.
|
|
5
|
+
*/
|
|
6
|
+
export function playPiLogoAnimation(tui, logoColumn, logoRow) {
|
|
7
|
+
if (!(tui instanceof TuiAltScreen) || tui.hasOverlay())
|
|
8
|
+
return;
|
|
9
|
+
const screen = tui.getScreenLines();
|
|
10
|
+
import("./pi-logo-animation.js").then((module) => module.playPiLogoAnimation(tui, { screen, logoColumn, logoRow }), () => { });
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=pi-logo-animation.lazy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pi-logo-animation.lazy.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo-animation.lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAQ,EAAE,UAAkB,EAAE,OAAe;IAChF,IAAI,CAAC,CAAC,GAAG,YAAY,YAAY,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE;QAAE,OAAO;IAC/D,MAAM,MAAM,GAAG,GAAG,CAAC,cAAc,EAAE,CAAC;IACpC,MAAM,CAAC,wBAAwB,CAAC,CAAC,IAAI,CACpC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,EAC5E,GAAG,EAAE,GAAE,CAAC,CACR,CAAC;AACH,CAAC","sourcesContent":["import { type TUI, TuiAltScreen } from \"@earendil-works/pi-tui\";\n\n/**\n * Plays the logo easter egg (see pi-logo-animation.ts), which loads on the first click. Only fullscreen mode\n * can show it, because it dissolves the rendered screen. The screen is captured before loading.\n */\nexport function playPiLogoAnimation(tui: TUI, logoColumn: number, logoRow: number): void {\n\tif (!(tui instanceof TuiAltScreen) || tui.hasOverlay()) return;\n\tconst screen = tui.getScreenLines();\n\timport(\"./pi-logo-animation.ts\").then(\n\t\t(module) => module.playPiLogoAnimation(tui, { screen, logoColumn, logoRow }),\n\t\t() => {},\n\t);\n}\n"]}
|
|
@@ -9,4 +9,11 @@
|
|
|
9
9
|
* The brand colors stay fixed across themes; they follow the terminal's color mode.
|
|
10
10
|
*/
|
|
11
11
|
export declare function piLogoLines(): [string, string];
|
|
12
|
+
/**
|
|
13
|
+
* Whether the terminal renders the half-block logo correctly. Apple Terminal draws gaps between rows and
|
|
14
|
+
* misaligns the half blocks, so it gets the text wordmark instead.
|
|
15
|
+
*/
|
|
16
|
+
export declare function supportsPiLogo(): boolean;
|
|
17
|
+
/** Text fallback for the logo: "Pi" with the logo's coral and yellow. */
|
|
18
|
+
export declare function piWordmark(): string;
|
|
12
19
|
//# sourceMappingURL=pi-logo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi-logo.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo.ts"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH,wBAAgB,WAAW,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAO9C"}
|
|
1
|
+
{"version":3,"file":"pi-logo.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo.ts"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH,wBAAgB,WAAW,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAO9C;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED,yEAAyE;AACzE,wBAAgB,UAAU,IAAI,MAAM,CAGnC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { backgroundAnsi, foregroundAnsi, rgbColor } from "@earendil-works/pi-tui";
|
|
1
|
+
import { backgroundAnsi, foregroundAnsi, isAppleTerminalSession, rgbColor } from "@earendil-works/pi-tui";
|
|
2
2
|
import { theme } from "../theme/theme.js";
|
|
3
3
|
const CORAL = rgbColor(228, 138, 122);
|
|
4
4
|
const BLUE = rgbColor(79, 142, 179);
|
|
@@ -22,4 +22,16 @@ export function piLogoLines() {
|
|
|
22
22
|
const bottom = `${fg(BLUE)}█▀${RESET} ${fg(YELLOW)}█${RESET}`;
|
|
23
23
|
return [top, bottom];
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Whether the terminal renders the half-block logo correctly. Apple Terminal draws gaps between rows and
|
|
27
|
+
* misaligns the half blocks, so it gets the text wordmark instead.
|
|
28
|
+
*/
|
|
29
|
+
export function supportsPiLogo() {
|
|
30
|
+
return !isAppleTerminalSession();
|
|
31
|
+
}
|
|
32
|
+
/** Text fallback for the logo: "Pi" with the logo's coral and yellow. */
|
|
33
|
+
export function piWordmark() {
|
|
34
|
+
const mode = theme.getColorMode();
|
|
35
|
+
return `${foregroundAnsi(CORAL, mode)}P${RESET}${foregroundAnsi(YELLOW, mode)}i${RESET}`;
|
|
36
|
+
}
|
|
25
37
|
//# sourceMappingURL=pi-logo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pi-logo.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"pi-logo.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/pi-logo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1G,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACtC,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW;IAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAClC,MAAM,EAAE,GAAG,CAAC,KAAmB,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChE,kGAAkG;IAClG,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC;IACxF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;IAC9D,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AACtB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc;IAC7B,OAAO,CAAC,sBAAsB,EAAE,CAAC;AAClC,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,UAAU;IACzB,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAClC,OAAO,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC;AAC1F,CAAC","sourcesContent":["import { backgroundAnsi, foregroundAnsi, isAppleTerminalSession, rgbColor } from \"@earendil-works/pi-tui\";\nimport { theme } from \"../theme/theme.ts\";\n\nconst CORAL = rgbColor(228, 138, 122);\nconst BLUE = rgbColor(79, 142, 179);\nconst YELLOW = rgbColor(234, 182, 93);\nconst RESET = \"\\x1b[0m\";\n\n/**\n * The pi logo: 4 cells wide and 2 lines tall. Each cell shows two square pixels with half blocks:\n *\n * coral coral coral .\n * blue . coral .\n * blue blue . yellow\n * blue . . yellow\n *\n * The brand colors stay fixed across themes; they follow the terminal's color mode.\n */\nexport function piLogoLines(): [string, string] {\n\tconst mode = theme.getColorMode();\n\tconst fg = (color: typeof CORAL) => foregroundAnsi(color, mode);\n\t// The fourth cell of the top line is empty, so it is padded to the same width as the bottom line.\n\tconst top = `${fg(CORAL)}${backgroundAnsi(BLUE, mode)}▀${RESET}${fg(CORAL)}▀█${RESET} `;\n\tconst bottom = `${fg(BLUE)}█▀${RESET} ${fg(YELLOW)}█${RESET}`;\n\treturn [top, bottom];\n}\n\n/**\n * Whether the terminal renders the half-block logo correctly. Apple Terminal draws gaps between rows and\n * misaligns the half blocks, so it gets the text wordmark instead.\n */\nexport function supportsPiLogo(): boolean {\n\treturn !isAppleTerminalSession();\n}\n\n/** Text fallback for the logo: \"Pi\" with the logo's coral and yellow. */\nexport function piWordmark(): string {\n\tconst mode = theme.getColorMode();\n\treturn `${foregroundAnsi(CORAL, mode)}P${RESET}${foregroundAnsi(YELLOW, mode)}i${RESET}`;\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/login` menu with the animated "Sign in with Radius" option. Internal to the interactive mode: the shimmer
|
|
3
|
+
* is Radius-only and is not exposed to other selectors.
|
|
4
|
+
*/
|
|
5
|
+
import { type TUI } from "@earendil-works/pi-tui";
|
|
6
|
+
import { ExtensionSelectorComponent } from "./extension-selector.ts";
|
|
7
|
+
/** The "Sign in with Radius" option: `label` is the full option, starting with the animated `text`. */
|
|
8
|
+
type RadiusOption = {
|
|
9
|
+
label: string;
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
/** Top-level `/login` selector whose Radius option shimmers in the Radius logo colors while it is selected. */
|
|
13
|
+
export declare function createLoginMenuSelector(tui: TUI, title: string, options: string[], radiusOption: RadiusOption, onSelect: (option: string) => void, onCancel: () => void): ExtensionSelectorComponent;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=radius-login-selector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius-login-selector.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/radius-login-selector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAA2D,KAAK,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAE3G,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AA8BrE,uGAAuG;AACvG,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAiEpD,+GAA+G;AAC/G,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,EAClC,QAAQ,EAAE,MAAM,IAAI,GAClB,0BAA0B,CAE5B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `/login` menu with the animated "Sign in with Radius" option. Internal to the interactive mode: the shimmer
|
|
3
|
+
* is Radius-only and is not exposed to other selectors.
|
|
4
|
+
*/
|
|
5
|
+
import { foregroundAnsi, mixColors, parseColor, Text } from "@earendil-works/pi-tui";
|
|
6
|
+
import { theme } from "../theme/theme.js";
|
|
7
|
+
import { ExtensionSelectorComponent } from "./extension-selector.js";
|
|
8
|
+
/** The four colors of the Radius logo, in the order they stream across the text. */
|
|
9
|
+
const RADIUS_COLORS = ["#4d9abf", "#83ccd2", "#f1be57", "#f09082"].map((hex) => parseColor(hex));
|
|
10
|
+
/** Width of each color band, in characters. */
|
|
11
|
+
const CHARS_PER_COLOR = 4;
|
|
12
|
+
const CHARS_PER_SECOND = 10;
|
|
13
|
+
const ANIMATION_FRAME_MS = 50;
|
|
14
|
+
/** Color `text` with the Radius logo colors flowing left to right; `elapsedMs` is the animation time. */
|
|
15
|
+
function radiusShimmer(text, elapsedMs) {
|
|
16
|
+
const mode = theme.getColorMode();
|
|
17
|
+
const cycle = RADIUS_COLORS.length * CHARS_PER_COLOR;
|
|
18
|
+
const offset = (elapsedMs / 1000) * CHARS_PER_SECOND;
|
|
19
|
+
let result = "";
|
|
20
|
+
let index = 0;
|
|
21
|
+
for (const char of text) {
|
|
22
|
+
const position = (((index - offset) % cycle) + cycle) % cycle;
|
|
23
|
+
const band = Math.floor(position / CHARS_PER_COLOR);
|
|
24
|
+
const t = position / CHARS_PER_COLOR - band;
|
|
25
|
+
// Smoothstep keeps each band recognizable while still blending into the next one.
|
|
26
|
+
const amount = t * t * (3 - 2 * t);
|
|
27
|
+
const from = RADIUS_COLORS[band];
|
|
28
|
+
const to = RADIUS_COLORS[(band + 1) % RADIUS_COLORS.length];
|
|
29
|
+
result += foregroundAnsi(mixColors(from, to, amount, "srgb"), mode) + char;
|
|
30
|
+
index++;
|
|
31
|
+
}
|
|
32
|
+
return `${result}\x1b[39m`;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Swaps the line `ExtensionSelectorComponent` draws for the selected Radius option with the animated one. When the
|
|
36
|
+
* selector's row style changes or the label wraps, the line no longer matches and the option renders normally.
|
|
37
|
+
*/
|
|
38
|
+
class RadiusLoginMenuComponent extends ExtensionSelectorComponent {
|
|
39
|
+
radiusOption;
|
|
40
|
+
animationStart = performance.now();
|
|
41
|
+
animationTimer;
|
|
42
|
+
animating = false;
|
|
43
|
+
constructor(tui, title, options, radiusOption, onSelect, onCancel) {
|
|
44
|
+
super(title, options, (option) => {
|
|
45
|
+
this.stopAnimation();
|
|
46
|
+
onSelect(option);
|
|
47
|
+
}, () => {
|
|
48
|
+
this.stopAnimation();
|
|
49
|
+
onCancel();
|
|
50
|
+
});
|
|
51
|
+
this.radiusOption = radiusOption;
|
|
52
|
+
this.animationTimer = setInterval(() => {
|
|
53
|
+
if (this.animating)
|
|
54
|
+
tui.requestRender();
|
|
55
|
+
}, ANIMATION_FRAME_MS);
|
|
56
|
+
this.animationTimer.unref?.();
|
|
57
|
+
}
|
|
58
|
+
render(width) {
|
|
59
|
+
const lines = super.render(width);
|
|
60
|
+
const { label, text } = this.radiusOption;
|
|
61
|
+
const selectedLine = new Text(theme.fg("accent", "→ ") + theme.fg("accent", label), 1, 0).render(width)[0];
|
|
62
|
+
const index = selectedLine === undefined ? -1 : lines.indexOf(selectedLine);
|
|
63
|
+
this.animating = index >= 0;
|
|
64
|
+
if (this.animating) {
|
|
65
|
+
const shimmer = radiusShimmer(text, performance.now() - this.animationStart);
|
|
66
|
+
const animatedLine = theme.fg("accent", "→ ") + shimmer + label.slice(text.length);
|
|
67
|
+
lines[index] = new Text(animatedLine, 1, 0).render(width)[0] ?? "";
|
|
68
|
+
}
|
|
69
|
+
return lines;
|
|
70
|
+
}
|
|
71
|
+
stopAnimation() {
|
|
72
|
+
clearInterval(this.animationTimer);
|
|
73
|
+
this.animationTimer = undefined;
|
|
74
|
+
this.animating = false;
|
|
75
|
+
}
|
|
76
|
+
dispose() {
|
|
77
|
+
this.stopAnimation();
|
|
78
|
+
super.dispose();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Top-level `/login` selector whose Radius option shimmers in the Radius logo colors while it is selected. */
|
|
82
|
+
export function createLoginMenuSelector(tui, title, options, radiusOption, onSelect, onCancel) {
|
|
83
|
+
return new RadiusLoginMenuComponent(tui, title, options, radiusOption, onSelect, onCancel);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=radius-login-selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radius-login-selector.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/radius-login-selector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAc,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AAC3G,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,oFAAoF;AACpF,MAAM,aAAa,GAAqB,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACnH,+CAA+C;AAC/C,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,yGAAyG;AACzG,S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CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;YAC7E,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACnF,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACpE,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEO,aAAa;QACpB,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACxB,CAAC;IAEQ,OAAO;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD;AAED,+GAA+G;AAC/G,MAAM,UAAU,uBAAuB,CACtC,GAAQ,EACR,KAAa,EACb,OAAiB,EACjB,YAA0B,EAC1B,QAAkC,EAClC,QAAoB;IAEpB,OAAO,IAAI,wBAAwB,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/**\n * The `/login` menu with the animated \"Sign in with Radius\" option. Internal to the interactive mode: the shimmer\n * is Radius-only and is not exposed to other selectors.\n */\n\nimport { type Color, foregroundAnsi, mixColors, parseColor, Text, type TUI } from \"@earendil-works/pi-tui\";\nimport { theme } from \"../theme/theme.ts\";\nimport { ExtensionSelectorComponent } from \"./extension-selector.ts\";\n\n/** The four colors of the Radius logo, in the order they stream across the text. */\nconst RADIUS_COLORS: readonly Color[] = [\"#4d9abf\", \"#83ccd2\", \"#f1be57\", \"#f09082\"].map((hex) => parseColor(hex));\n/** Width of each color band, in characters. */\nconst CHARS_PER_COLOR = 4;\nconst CHARS_PER_SECOND = 10;\nconst ANIMATION_FRAME_MS = 50;\n\n/** Color `text` with the Radius logo colors flowing left to right; `elapsedMs` is the animation time. */\nfunction radiusShimmer(text: string, elapsedMs: number): string {\n\tconst mode = theme.getColorMode();\n\tconst cycle = RADIUS_COLORS.length * CHARS_PER_COLOR;\n\tconst offset = (elapsedMs / 1000) * CHARS_PER_SECOND;\n\tlet result = \"\";\n\tlet index = 0;\n\tfor (const char of text) {\n\t\tconst position = (((index - offset) % cycle) + cycle) % cycle;\n\t\tconst band = Math.floor(position / CHARS_PER_COLOR);\n\t\tconst t = position / CHARS_PER_COLOR - band;\n\t\t// Smoothstep keeps each band recognizable while still blending into the next one.\n\t\tconst amount = t * t * (3 - 2 * t);\n\t\tconst from = RADIUS_COLORS[band] as Color;\n\t\tconst to = RADIUS_COLORS[(band + 1) % RADIUS_COLORS.length] as Color;\n\t\tresult += foregroundAnsi(mixColors(from, to, amount, \"srgb\"), mode) + char;\n\t\tindex++;\n\t}\n\treturn `${result}\\x1b[39m`;\n}\n\n/** The \"Sign in with Radius\" option: `label` is the full option, starting with the animated `text`. */\ntype RadiusOption = { label: string; text: string };\n\n/**\n * Swaps the line `ExtensionSelectorComponent` draws for the selected Radius option with the animated one. When the\n * selector's row style changes or the label wraps, the line no longer matches and the option renders normally.\n */\nclass RadiusLoginMenuComponent extends ExtensionSelectorComponent {\n\tprivate readonly radiusOption: RadiusOption;\n\tprivate readonly animationStart = performance.now();\n\tprivate animationTimer: ReturnType<typeof setInterval> | undefined;\n\tprivate animating = false;\n\n\tconstructor(\n\t\ttui: TUI,\n\t\ttitle: string,\n\t\toptions: string[],\n\t\tradiusOption: RadiusOption,\n\t\tonSelect: (option: string) => void,\n\t\tonCancel: () => void,\n\t) {\n\t\tsuper(\n\t\t\ttitle,\n\t\t\toptions,\n\t\t\t(option) => {\n\t\t\t\tthis.stopAnimation();\n\t\t\t\tonSelect(option);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tthis.stopAnimation();\n\t\t\t\tonCancel();\n\t\t\t},\n\t\t);\n\t\tthis.radiusOption = radiusOption;\n\t\tthis.animationTimer = setInterval(() => {\n\t\t\tif (this.animating) tui.requestRender();\n\t\t}, ANIMATION_FRAME_MS);\n\t\tthis.animationTimer.unref?.();\n\t}\n\n\toverride render(width: number): string[] {\n\t\tconst lines = super.render(width);\n\t\tconst { label, text } = this.radiusOption;\n\t\tconst selectedLine = new Text(theme.fg(\"accent\", \"→ \") + theme.fg(\"accent\", label), 1, 0).render(width)[0];\n\t\tconst index = selectedLine === undefined ? -1 : lines.indexOf(selectedLine);\n\t\tthis.animating = index >= 0;\n\t\tif (this.animating) {\n\t\t\tconst shimmer = radiusShimmer(text, performance.now() - this.animationStart);\n\t\t\tconst animatedLine = theme.fg(\"accent\", \"→ \") + shimmer + label.slice(text.length);\n\t\t\tlines[index] = new Text(animatedLine, 1, 0).render(width)[0] ?? \"\";\n\t\t}\n\t\treturn lines;\n\t}\n\n\tprivate stopAnimation(): void {\n\t\tclearInterval(this.animationTimer);\n\t\tthis.animationTimer = undefined;\n\t\tthis.animating = false;\n\t}\n\n\toverride dispose(): void {\n\t\tthis.stopAnimation();\n\t\tsuper.dispose();\n\t}\n}\n\n/** Top-level `/login` selector whose Radius option shimmers in the Radius logo colors while it is selected. */\nexport function createLoginMenuSelector(\n\ttui: TUI,\n\ttitle: string,\n\toptions: string[],\n\tradiusOption: RadiusOption,\n\tonSelect: (option: string) => void,\n\tonCancel: () => void,\n): ExtensionSelectorComponent {\n\treturn new RadiusLoginMenuComponent(tui, title, options, radiusOption, onSelect, onCancel);\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
2
2
|
import { type Model, type Transport } from "@earendil-works/pi-ai";
|
|
3
3
|
import { Container, type ScrollViewScrollbar, SettingsList, type WheelScrollLines } from "@earendil-works/pi-tui";
|
|
4
|
-
import { type CacheWarmingMode, type DefaultProjectTrust, type FullscreenExitOutput, type MermaidRenderingMode, type TuiMode, type WarningSettings } from "../../../core/settings-manager.ts";
|
|
4
|
+
import { type CacheWarmingMode, type DefaultProjectTrust, type FullscreenExitOutput, type MermaidRenderingMode, type QuietStartup, type TuiMode, type WarningSettings } from "../../../core/settings-manager.ts";
|
|
5
5
|
import { type TerminalTheme } from "../theme/theme.ts";
|
|
6
6
|
export interface SettingsConfig {
|
|
7
7
|
autoCompact: boolean;
|
|
@@ -35,7 +35,7 @@ export interface SettingsConfig {
|
|
|
35
35
|
editorPaddingX: number;
|
|
36
36
|
outputPad: 0 | 1;
|
|
37
37
|
autocompleteMaxVisible: number;
|
|
38
|
-
quietStartup:
|
|
38
|
+
quietStartup: QuietStartup;
|
|
39
39
|
defaultProjectTrust: DefaultProjectTrust;
|
|
40
40
|
clearOnShrink: boolean;
|
|
41
41
|
showTerminalProgress: boolean;
|
|
@@ -73,7 +73,7 @@ export interface SettingsCallbacks {
|
|
|
73
73
|
onEditorPaddingXChange: (padding: number) => void;
|
|
74
74
|
onOutputPadChange: (padding: 0 | 1) => void;
|
|
75
75
|
onAutocompleteMaxVisibleChange: (maxVisible: number) => void;
|
|
76
|
-
onQuietStartupChange: (
|
|
76
|
+
onQuietStartupChange: (quiet: QuietStartup) => void;
|
|
77
77
|
onDefaultProjectTrustChange: (defaultProjectTrust: DefaultProjectTrust) => void;
|
|
78
78
|
onClearOnShrinkChange: (enabled: boolean) => void;
|
|
79
79
|
onShowTerminalProgressChange: (enabled: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-selector.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/settings-selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EA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IAC3B,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,sBAAsB,EAAE,OAAO,CAAC;IAChC,kBAAkB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7C,cAAc,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,KAAK,CAAC;IAC9E,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"settings-selector.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/settings-selector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAA8B,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAEN,SAAS,EAET,KAAK,mBAAmB,EAGxB,YAAY,EAGZ,KAAK,gBAAgB,EACrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEN,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAIN,KAAK,aAAa,EAElB,MAAM,mBAAmB,CAAC;AA2B3B,MAAM,WAAW,cAAc;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1B,sBAAsB,EAAE,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;IAC9C,UAAU,EAAE,OAAO,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,kCAAkC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACtE,gBAAgB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACrB;AA+TD;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACvD,OAAO,CAAC,YAAY,CAAe;IAEnC,YAAY,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EA0gB/D;IAED,eAAe,IAAI,YAAY,CAE9B;CACD"}
|
|
@@ -338,9 +338,9 @@ export class SettingsSelectorComponent extends Container {
|
|
|
338
338
|
{
|
|
339
339
|
id: "quiet-startup",
|
|
340
340
|
label: "Quiet startup",
|
|
341
|
-
description: "Disable verbose printing at startup",
|
|
342
|
-
currentValue: config.quietStartup
|
|
343
|
-
values: ["true", "false"],
|
|
341
|
+
description: "Disable verbose printing at startup (header: keep only the startup header)",
|
|
342
|
+
currentValue: String(config.quietStartup),
|
|
343
|
+
values: ["true", "header", "false"],
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
id: "install-telemetry",
|
|
@@ -478,7 +478,7 @@ export class SettingsSelectorComponent extends Container {
|
|
|
478
478
|
{
|
|
479
479
|
id: "tui-mode",
|
|
480
480
|
label: "TUI mode",
|
|
481
|
-
description: "Interface layout;
|
|
481
|
+
description: "Interface layout; regular mode uses the terminal's normal scrollback",
|
|
482
482
|
currentValue: config.tuiMode,
|
|
483
483
|
values: ["regular", "fullscreen"],
|
|
484
484
|
},
|
|
@@ -676,7 +676,7 @@ export class SettingsSelectorComponent extends Container {
|
|
|
676
676
|
callbacks.onCollapseChangelogChange(newValue === "true");
|
|
677
677
|
break;
|
|
678
678
|
case "quiet-startup":
|
|
679
|
-
callbacks.onQuietStartupChange(newValue === "true");
|
|
679
|
+
callbacks.onQuietStartupChange(newValue === "header" ? "header" : newValue === "true");
|
|
680
680
|
break;
|
|
681
681
|
case "install-telemetry":
|
|
682
682
|
callbacks.onEnableInstallTelemetryChange(newValue === "true");
|