[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-117425":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":18,"hasPages":20,"topics":21,"createdAt":10,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":10,"trendingCount":15,"starSnapshotCount":15,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},117425,"monohud","jshguo-labs\u002Fmonohud","jshguo-labs","Sci-fi React components for game and immersive interfaces, built on Base UI","https:\u002F\u002Fjshguo-labs.github.io\u002Fmonohud\u002F",null,"TypeScript",51,8,1,0,42.86,"MIT License",false,"main",true,[],"2026-11-18 04:58:46","2026-11-21 13:02:42","# Monohud\n\nSci-fi React components for game and immersive interfaces. Behaviour, keyboard support and accessibility come from [Base UI](https:\u002F\u002Fbase-ui.com).\n\n[Live demo — try the cockpit and browse the components](https:\u002F\u002Fjshguo-labs.github.io\u002Fmonohud\u002F)\n\n## Install\n\n```bash\nnpm install @monohud\u002Freact @monohud\u002Fcss\n```\n\nRequires React 18 or 19.\n\n## Usage\n\n```tsx\nimport '@monohud\u002Fcss';\nimport { Button, Panel, MonohudProvider } from '@monohud\u002Freact';\n\nexport function App() {\n  return (\n    \u003CMonohudProvider motion=\"full\">\n      \u003CPanel title=\"Ship systems\">\n        \u003CButton variant=\"primary\">Start jump\u003C\u002FButton>\n      \u003C\u002FPanel>\n    \u003C\u002FMonohudProvider>\n  );\n}\n```\n\nThe default theme is monochrome, with colour reserved for status. Pass `theme=\"sodium\"`, `\"ion\"` or `\"ember\"` for a coloured accent. Overlays render inside `MonohudProvider`, so theme and motion settings reach them too. Fonts are not bundled: load Geist Mono (for example from `@fontsource-variable\u002Fgeist-mono`), or the system monospace fallback applies.\n\n`distortion` on `MonohudProvider` sets a signal fault across the whole interface, from `0` (off) to `1`, and defaults to `0.15`. It is a number so game state can drive it, for example `distortion={1 - hull}`. `alert` sets the ship condition to `none`, `caution` or `red`, and tints the frame lines and display edge everywhere. While the filter runs, `position: fixed` elements inside your own content are positioned against the provider's direct child; `Dialog`, other overlays and `Starfield` are not affected.\n\nA full scene puts `Starfield` first inside the provider, then wraps the layout in `Cockpit`:\n\n```tsx\n\u003CMonohudProvider alert={underFire ? 'red' : 'none'}>\n  \u003CStarfield warp={jumping ? 1 : 0} body={1} flash={arrivals} \u002F>\n  \u003CCockpit>\n    \u003CWing side=\"left\">{\u002F* panels *\u002F}\u003C\u002FWing>\n    \u003CTacticalVolume contacts={contacts} label=\"Tactical volume\" selected={target} onSelect={select} \u002F>\n    \u003CWing side=\"right\">\n      \u003CHologram model=\"corvette\" integrity={0.7} label=\"Target scan\" \u002F>\n    \u003C\u002FWing>\n  \u003C\u002FCockpit>\n\u003C\u002FMonohudProvider>\n```\n\n`Starfield` needs WebGL2 and shows a plain dark surface without it. `Hologram` accepts a built-in hull (`corvette`, `frigate`, `freighter`, `swarm`) or your own `{ vertices, edges }`. `TacticalVolume` contacts stay real buttons, and the view orbits by drag or arrow keys. It starts tilted to show the stalks; `defaultView=\"top\"` starts face-on.\n\n`Progress` and `Meter` draw real cells. `cells=\"auto\"` is the default: the count fits the width, and the value lights whole cells only, so nothing shows part-filled. Only an empty bar shows no cells, and only a complete one shows them all. Pass a number for a fixed count, which fills smoothly through its cells. `gap` sets the space between cells in pixels in both modes, and `cellWidth` sets the smallest cell in `auto`.\n\n```tsx\n\u003CProgress label=\"Jump charge\" value={64} cells={12} gap={4} \u002F>\n\u003CProgress label=\"Jump charge\" value={64} gap={1} \u002F>\n```\n\n## Accessibility\n\nBase UI handles keyboard support and focus. The kit adds the visual layer on top, so motion is the part to check for your players:\n\n- `prefers-reduced-motion` always wins and turns motion off.\n- `Starfield`'s white-out only runs at `motion=\"full\"`, and the red alert only pulses at `motion=\"full\"`.\n- Your code decides how often `flash` and `alert` fire. Keep full-screen flashes under three per second, and offer a setting for `motion` and `distortion` in your game.\n- Tears make text briefly unreadable. Do not put the only copy of critical information behind a high `distortion`.\n\n## Development\n\n```bash\npnpm install\n```\n\n```bash\npnpm dev\n```\n\n```bash\npnpm test\n```\n\n```bash\npnpm typecheck\n```\n\n```bash\npnpm build\n```\n\nThe demo runs at `http:\u002F\u002F127.0.0.1:5180`, with a playable bridge screen and a component catalog.\n\n## Packages\n\n| Package | Contents |\n|---|---|\n| `@monohud\u002Ftokens` | Design tokens and themes |\n| `@monohud\u002Fcss` | Plain CSS with no framework dependency |\n| `@monohud\u002Ffx` | Zero-dependency engine: WebGL starfield, wireframe 3D, chamfer paths, signal distortion, decode text, waveform, synthesised sound |\n| `@monohud\u002Freact` | React components |\n\n## Components\n\n- **Core:** Button, Input, Field, Form, Checkbox, Switch, Radio, RadioGroup, Slider, Select, Tabs, Dialog, Tooltip, Menu, Progress, Meter, and toasts through `useToast`.\n- **HUD:** Frame, Panel, DecodeText, Readout, Status, Gauge, Radar, Waveform, LogStream, Reticle, GridBackground.\n- **Scene and volume:** Starfield, TacticalVolume, Hologram, Tape, Cockpit, Wing.\n- **Detail primitives:** Ruler, Hatch, Barcode, Tag, DataList.\n\n## License\n\n[MIT](LICENSE)\n",2,"2026-11-24 04:55:39","CREATED_QUERY"]