ZGUI-CORE // ENGINEERING REPORT

// module map · extraction provenance · consumption model

Home Source

zgui-core is a webui-only shared component — JavaScript modules plus CSS, no Rust crate and no build step of its own. It is consumed the same way as zpwr-i18n and zpwr-file-browser: added as a submodule at frontend/lib/zgui-core and loaded directly from the submodule path — never copied into the app (copies drift and partial-sync, so a missed file silently 404s). This page describes the module surface and where each component came from. Every component is the generic kernel of something one or more apps had already shipped.

Module groups

groupmodules
Structural chromemodal, modal-drag, toast, table, tabs, drawer, header, logo, splash, status-bar, split-pane, breadcrumb, segmented, accordion, tiles
Interactioncommand-palette, context-menu, keyboard-nav, shortcuts, help-overlay, drag, file-drag, dock, tooltip, popover, tray-popover, ui-idle
Controls / widgetswidgets (button · textfield · checkbox · toggle · range · select · badge · chip), color-picker, pager, progress, alert, spinner, settings scaffold
Theme / statecolorscheme (5 schemes + custom builder), fzf matcher, export-dialog
Helpersutil (escapeHtml · debounce · throttle · clamp · formatBytes · formatDuration · slugify · copyToClipboard · createETA · …), DOM-free esm/util.mjs
Stylesbase.css, cyberpunk.css, widgets.css, widgets-extra.css, components.css, toast.css, modal.css, table.css, shell.css, controls.css, dock.css, file-drag.css, util.css, shortcuts.css, spinner.css

Extraction provenance

componentextracted from
fzf matcher, palette, context-menu, drag, tiles, export-dialog, header/logo, toast, modal, table toolkit, keyboard-nav, shortcuts, file-drag, dock, utilAudio-Haxor
cyberpunk.css design tokenszpwr-patch-core
drawerzpwr-clip-engine
breadcrumb, split-panezpwr-file-browser
segmented (inline pill view-switcher)zcontainer / zreq sub-tabs

Consumption model

A consuming app adds zgui-core as a submodule at frontend/lib/zgui-core and loads the modules directly from the submodule path — never a copy (the same submodule pattern zpwr-i18n uses); updates are a pointer bump, not a re-copy. Modules attach to window.ZGui; stateful widgets (table column widths, sort, shortcut bindings, drag order, color scheme, dock corners) persist per scope so multiple consumers coexist. The library carries no host-specific assumptions — Tauri-specific paths (native file drag, tray-popover resize) degrade where the host doesn't provide them.