oficina / estilo Public

Clone
git clone https://amadan.net/oficina/estilo

Plain git — no account needed to clone.

Download

Estilo

Estilo is the CARLOS suite's shared design system, at amadan.net/oficina/estilo.git. It's a public Go module under the Mozilla Public License 2.0 (LICENSE).

theme is Calma, the suite's look (AGENTS.md, "Theme"): theme.CSS() is the suite's theme and theme.ForApp(slug) an app's, with its accent from the colour ring in theme/apps.go. The chrome is set in the system UI face and downloads no font (AGENTS.md row 9); theme.FontHandler only keeps the retired Onest files of fonts/v1/ answering for old pages, and nothing should link them. brand holds the marks, and sky the seeded nebula for the sign-in, the team's home and the front page — never inside an app.

savestatus is a save-status indicator, already adopted by Docs and Slides. It renders state (saved, saving, retrying, failed) inside a polite status region for screen readers; callers supply the localized message text for each state.

homeconnect holds templates and data for Home account-connection and OAuth screens, being adopted by the shared home/connect flow and other apps. It carries no authentication logic — callers validate the destination and supply translated labels. The screens run without scripts.

base, menu and chrome are the shared chrome from the round-2 spec (docs/superpowers/specs/2026-09-23-shared-chrome.md on spec/shared-chrome): link styling; the one floating menu panel and the document menu bar, with menu.Shortcut for platform-correct shortcut labels; and the top bar, account menu, app switcher, error page and sign-in pages, with the per-app Appearance preference. Link the three stylesheets in that order, after tokens.css, the theme and brand.css. brand serves the app icons from Go. Docs adopted first and Sheets second, and Sheets' corrections are in: a menu row or bar action can be a link, a POST (menu.Item.Action) or a dialog opened by the platform's invoker command (menu.Item.Dialog); Bar.Actions is []chrome.Action; <div estilo-shell="fill"> is the full-height layout (the viewport less the 52px bar); and chrome.js closes every member of the one estilo-menus group, menubar menus included, on Escape (in the capture phase) and an outside click.

Docs' I2 editor added two slots to chrome.Bar (spec docs/superpowers/specs/2026-11-11-editor-i2-design.md in Docs). Menubar takes the app's own estilo-menubar markup and makes the bar stacked (estilo-bar~="stacked"): from 800px a 56px header with the title over the menus, below it the one-row bar with the menus as a second row; --estilo-bar-block-size is published either way. Lead takes app markup for the start of the end group (Docs' undo/redo), which the app must hide on narrow screens itself. A bar with either slot draws its end group as one set of controls; a bar with neither is unchanged, byte for byte. Action.WideOnly hides an action below 64rem and keeps it out of the Menu sheet, and menu.Item.Controls is a toggle (aria-expanded, aria-controls, disabled until the app binds it). The account menu's Appearance is a three-way segmented selector that chrome.js switches in place.

Docs' phone web design (Paul, 2026-11-28) added Bar.Compact (estilo-bar~="compact"): below 704px, or on a phone held sideways, the bar is one 52px row of Back (the brand: a chevron and the app's name), the title, the lead and the app's Compact.Trail (Docs' Aa and •••); the menu row, the actions, the switcher and the account are not shown there, and the Menu sheet is drawn only for Nav. From 704px a compact stacked bar is the 56px header, which every other stacked bar keeps from 800px (Mapa's and Fichas' layouts change there); the 704px band is a copy of the header's rules that CSS() makes, scoped to a compact bar. Compact.Title replaces the bar's title for a page with a large title of its own: it shows once the app's script sets estilo-bar-folded on the header. In the trail, [estilo-bar-tool] is a 44px round control and a <details> panel is a drop-down from the bar's inline end with 44px rows. menu.Item.Icon draws a glyph before a row's label. On a coarse pointer, in every app, the bar's triggers, the rail's account row, every menu row and every menubar title are 44px, and where nothing hovers menus show no shortcut hints. savestatus takes a third placement, subtitle, for the state under a large title.

The smart door (spec docs/superpowers/specs/2026-11-19-smart-door.md in Home, step 2) is estilo-signin-screen with chrome.SignInScreen: rastrillo's sign-in screen, its ui signin partial (the remembered way in, Other ways to sign in and the chooser), drawn inside the door, with the sky behind and the app's mark and name at the card's head. It is duck-typed, because estilo pins the old rastrillo path: the app passes its auth.SigninState and *ui.Localizer as State and L, and parses its own rastrillo's ui.Templates() alongside estilo's. With State.Unavailable it draws nothing. chrome.OficinaGlyph is the icon for the Oficina ID door (auth.FederatedDoor.Icon), and SignInNotice.Forgetting adds "Forget me on this device" to the signed-out page. estilo-signin stays for apps that haven't moved; the door carries no footer links.

desk is the grey desk an editor sits on (--estilo-desk), the floating glass card (estilo-card), the inspector built on it (estilo-inspector, with estilo-inspector-group and estilo-inspector-label) and the segmented control (estilo-seg, estilo-seg-item: a button with aria-pressed, or a label around a radio or checkbox). The values are Docs' own, copied; Slides is the first other app to use them. It is styling only, so it works with scripts off; the app places the card.

side is an app's side panel, Mapa's, moved here when Contra became its second user. <div estilo-side-frame> puts nav[estilo-side] under the bar, beside <main>; its rows are estilo-side-item (an icon, estilo-side-label, an optional kbd[estilo-side-key]), page rows sit under estilo-side-head headings, and estilo-side-foot is pinned to the bottom with the fold. The fold turns the side into a rail of icons, with the labels as tooltips: from 80rem it is open unless folded, below that a rail, and below 800px it is gone, because its places are in the bar's Menu sheet. The fold is a form, so it works with scripts off (side.SetState keeps it in the app's cookie); side.js folds in place and adds ⌘\. Link side.css after chrome.css.

colophon is the suite's Colophon, reached from Help: every open-source project an app is made with, in sections (typefaces, libraries by runtime, icons and artwork, data, tools), each with a sentence or two on what it is and what the app uses it for, who made it, its licence (linked to the text the app serves) and its home and source. projects.json is the one catalog of those words, so every app describes Yjs the same way. An app never lists projects by hand: it collects what it ships (Go modules through credits/catalog, npm packages from esbuild's metafile with CollectNPM, crates from cargo metadata with CollectCargo, plus its fonts and vendored files) and colophon.Build refuses a package the catalog does not know, a usage note for something no longer shipped, or a shipped package without its licence text. No script, no webfont. Docs adopted first.

Permission and session logic stay app-owned. There is no shared component gallery yet.

Building

make test is the gate: a module-cache check (go mod verify, re-fetching anything damaged), go vet, a gofmt check, go build, then go test. savestatus's own tests run under Node.

Licence

Estilo is licensed under the Mozilla Public License 2.0; see LICENSE. The licence covers the code, styles and artwork in this repository. It does not grant rights in the Oficina, CARLOS or app names, or permission to present a modified build as the suite (MPL-2.0 section 2.3). Third-party parts keep their own licences: Lucide (brand/LICENSE.lucide) and Onest (credits/notices/onest-OFL.txt).