@xdev-asia/ui 4.15.0 → 4.15.1
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/README.md +1 -1
- package/dist/ai-manifest.json +3 -3
- package/dist/fonts.css +2 -2
- package/dist/llms-full.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.layered.css +1 -1
- package/dist/tokens.css +0 -4
- package/dist/tokens.json +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -143,7 +143,7 @@ Commits on `main` follow [Conventional Commits](https://www.conventionalcommits.
|
|
|
143
143
|
| `feat!: …` / `BREAKING CHANGE:` | major |
|
|
144
144
|
| `chore:`, `docs:`, `ci:` | none |
|
|
145
145
|
|
|
146
|
-
It tags `vX.Y.Z`, publishes to GitHub Packages and writes the GitHub release. `pages.yml` deploys the demo to GitHub Pages at <https://ui.xdev.asia>.
|
|
146
|
+
It tags `vX.Y.Z`, publishes to GitHub Packages and writes the GitHub release. Then `npmjs.yml` builds that tag with its version and publishes it to npmjs.com with provenance, using the repo secret `NPMJS_TOKEN` (an npmjs.com granular access token with read and write on the `@xdev-asia` scope); without the secret it warns and skips. To copy an older release, run *Actions → Publish to npmjs* with its version. `pages.yml` deploys the demo to GitHub Pages at <https://ui.xdev.asia>.
|
|
147
147
|
|
|
148
148
|
## License
|
|
149
149
|
|
package/dist/ai-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@xdev-asia/ui",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.1",
|
|
4
4
|
"setup": "pnpm add @xdev-asia/ui # registry: @xdev-asia:registry=https://npm.pkg.github.com\nimport \"@xdev-asia/ui/styles.css\";\nimport \"@xdev-asia/ui/fonts.css\"; // optional\n<html data-theme=\"dark\"> // or \"light\"",
|
|
5
5
|
"sharedTypes": "export type SessionState = \"working\" | \"failed\" | \"waiting\" | \"done\" | \"idle\" | \"exited\";\nexport type PrState = \"open\" | \"draft\" | \"merged\" | \"closed\";\nexport type CheckState = \"pass\" | \"skipping\" | \"fail\" | \"cancel\" | \"pending\";\nexport type AgentProfile = \"claude\" | \"codex\" | \"custom\";\n/** 1–10 → --x-tab-color-N. 5, 7, 9 are color-mix blends in base.css. */\nexport type TabColor = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;\n",
|
|
6
6
|
"icons": [
|
|
@@ -3228,14 +3228,14 @@
|
|
|
3228
3228
|
{
|
|
3229
3229
|
"id": "ocean",
|
|
3230
3230
|
"name": "Ocean",
|
|
3231
|
-
"usage": "Opt-in ground with a bright azure accent on blue-grey greys and a white light mode (the look of the MUI site): set data-ground=\"ocean\" next to data-theme on <html>. Unlike navy it also moves the accent (#0073e6, white text 4.57:1), the semantic x-color surfaces,
|
|
3231
|
+
"usage": "Opt-in ground with a bright azure accent on blue-grey greys and a white light mode (the look of the MUI site): set data-ground=\"ocean\" next to data-theme on <html>. Unlike navy it also moves the accent (#0073e6, white text 4.57:1), the semantic x-color surfaces, larger radii (buttons 10px, menus 12px) and a soft inset highlight on buttons; the body font (Roboto), status colours, the cyan focus ring and the brand stay as they are. Text-3 keeps 4.5:1 and line-strong 3:1 on every step.",
|
|
3232
3232
|
"attribute": "data-ground=\"ocean\""
|
|
3233
3233
|
}
|
|
3234
3234
|
],
|
|
3235
3235
|
"guidelines": {
|
|
3236
3236
|
"xdev-ui": "# xdev-ui\n\nDesign system and React component package (`@xdev-asia/ui`) for xDev: the desktop workspace where coding agents (Claude, Codex, custom profiles) run in local terminals beside docs, changes, tasks and kits. Built from `xdev-asia/xdev`: `apps/desktop/src/styles/*.css`, `apps/desktop/src/components/ActivityBar.tsx`, `packages/ui/tokens.json` and `docs/brand/`.",
|
|
3237
3237
|
"content-fundamentals": "## Content fundamentals\n\n- **Terse and technical.** Labels are verbs or nouns, sentence case: \"Create session\", \"Kill session\", \"Changes (7)\".\n- **Name the object.** \"Kill session fix-auth-redirect?\", not \"Are you sure?\".\n- **Say the consequence, not the mechanism.** \"Uncommitted changes stay in the worktree.\"\n- **Bilingual.** Every string ships in English and Vietnamese (`en`, `vi`). Roboto carries Vietnamese diacritics; keep labels short enough to survive a 30% longer translation.\n- **Identifiers stay literal.** Branches, paths, commands and counts are set in mono and never translated; wrap brand names, paths and codes in `translate=\"no\"` so browser translation leaves them alone.\n- **No exclamation marks, no emoji in UI chrome.**\n- **Speak to the person.** Second person and active voice: \"Get a link by email\", not \"We will email you\" or \"A link will be sent\".\n- **Typography marks.** The ellipsis is one character, `…`, never three dots. Text for a wait ends with it (\"Loading…\", \"Saving…\"), and so does a placeholder, which shows an example rather than repeating the label (\"Name, path or code…\"). Keep a number and its unit together with a no-break space (\"10 MB\").\n- **Where other guides differ.** Some guides (Vercel's Web Interface Guidelines, Chicago style) ask for Title Case on buttons and headings; xDev keeps sentence case everywhere.",
|
|
3238
|
-
"visual-foundations": "## Visual foundations\n\n### Two token layers\n| layer | names | where |\n|---|---|---|\n| Graphite (workspace) | `bg-0…bg-3`, `line`, `text-1…3`, `accent`, `ok`, `warn`, `danger`, `signal`, `violet`, `orange` | the desktop shell: panes, tabs, terminals, menus |\n| Semantic (`@xdev/ui`) | `x-color-bg`, `x-color-panel`, `x-color-surface`, `x-color-ink`, `x-color-accent`, … | docs app, site, dialogs, shared components |\n\nInside a workspace surface, `.x-ws` remaps the semantic layer onto graphite, so one component works in both places.\n\n### Grounds (opt-in)\nA product with its own look sets `data-ground=\"<id>\"` next to `data-theme` on `<html>`. A ground re-points tokens (colours, and for `ocean` also font, radii and button depth) in both themes; set it on `<html>` so the `--type-*` shorthands pick up its font; a pane that sets its own `data-theme` inside it (a light sidebar, a dark preview) keeps the ground's values for that theme. Status colours, the cyan focus ring and the brand never move. Grounds live in `tokens.json` under `color.grounds`.\n\n| ground | for | values |\n|---|---|---|\n| `navy` | ai-router | greys point at the `x-color-*` navy ramp (`bg-0` = `x-color-bg`, `bg-2` = `x-color-surface`, `line` = `x-color-line`); `text-3` is 4.5:1 or more on every step in both themes |\n| `ocean` | ui.xdev.asia, the admin showcase | the look of the MUI site: azure accent `#0073e6` (white text 4.57:1), blue-grey greys (hue 210, 14% saturation), a white light mode with `x-color-bg` `#ffffff`. Moves the workspace greys, `accent` and the semantic `x-color-*` surfaces, ink, lines and accent; text 4.5:1, `line-strong` 3:1 and links 4.5:1 on every step (tested).
|
|
3238
|
+
"visual-foundations": "## Visual foundations\n\n### Two token layers\n| layer | names | where |\n|---|---|---|\n| Graphite (workspace) | `bg-0…bg-3`, `line`, `text-1…3`, `accent`, `ok`, `warn`, `danger`, `signal`, `violet`, `orange` | the desktop shell: panes, tabs, terminals, menus |\n| Semantic (`@xdev/ui`) | `x-color-bg`, `x-color-panel`, `x-color-surface`, `x-color-ink`, `x-color-accent`, … | docs app, site, dialogs, shared components |\n\nInside a workspace surface, `.x-ws` remaps the semantic layer onto graphite, so one component works in both places.\n\n### Grounds (opt-in)\nA product with its own look sets `data-ground=\"<id>\"` next to `data-theme` on `<html>`. A ground re-points tokens (colours, and for `ocean` also font, radii and button depth) in both themes; set it on `<html>` so the `--type-*` shorthands pick up its font; a pane that sets its own `data-theme` inside it (a light sidebar, a dark preview) keeps the ground's values for that theme. Status colours, the cyan focus ring and the brand never move. Grounds live in `tokens.json` under `color.grounds`.\n\n| ground | for | values |\n|---|---|---|\n| `navy` | ai-router | greys point at the `x-color-*` navy ramp (`bg-0` = `x-color-bg`, `bg-2` = `x-color-surface`, `line` = `x-color-line`); `text-3` is 4.5:1 or more on every step in both themes |\n| `ocean` | ui.xdev.asia, the admin showcase | the look of the MUI site: azure accent `#0073e6` (white text 4.57:1), blue-grey greys (hue 210, 14% saturation), a white light mode with `x-color-bg` `#ffffff`. Moves the workspace greys, `accent` and the semantic `x-color-*` surfaces, ink, lines and accent; text 4.5:1, `line-strong` 3:1 and links 4.5:1 on every step (tested). Keeps the body font (Roboto). Also sets radii `x-radius-md` 10px / `radius-l` 12px, and a soft inset highlight on buttons (`--x-shadow-btn`, `--x-shadow-btn-quiet`; `none` by default) |\n\n### Rules\n- **Dark first.** `dark` is the default theme; `light` mirrors every token. Previews render dark; toggle the theme to check light.\n- **Hairlines, not shadows.** Separation is a 1px `--line`. Shadows (`--shadow-menu`, `--shadow-dialog`) are only for floating layers: menus, dialogs, the palette.\n- **Tint, border or dot for state.** Never a coloured left stripe on a rounded card or row.\n- **4px grid.** Spacing `--x-space-1…8` = 4, 8, 12, 16, 24, 32px. Fixed chrome: header 38px, footer 26px, sidebar 296px, side panel 300px.\n- **Radius.** Small and quiet. Workspace: `radius-s` 4px (tags, chips, menu items), `radius-m` 6px (icon buttons, fields, palette), `radius-l` 8px (menus, toasts). Semantic: `x-radius-sm` 4px (keys, dialog inputs), `x-radius-md` 8px (buttons), `x-radius-lg` 12px (banners, activity items).\n- **One accent.** `--accent` / `--x-color-accent` blue marks the current thing: primary button, pressed segment, selected tab, current app. Cyan `--x-color-signal` is the focus ring only.\n- **Motion.** Only the `working` dot pulses (off under `prefers-reduced-motion`). Apart from short positional transitions (0.12s), state changes are instant.\n- **Type.** Roboto for interface text (13px controls and menus, 14px body, 18px dialog titles); JetBrains Mono for code, paths, counts and keys (10–12px).\n- **Contrast.** `text-3` is the quietest text step (timestamps, counts, placeholders, hints). It is still 4.5:1 on every workspace ground in both themes, so it may carry text a user reads. Use `--line-strong` (at least 3:1) for the edge of a control that has no other boundary; `--line` stays a decorative hairline between regions.",
|
|
3239
3239
|
"iconography": "## Iconography\n\n- Line icons on a 24 grid, stroke `currentColor` 1.75, round caps and joins, no fills.\n- 16px in controls, 20px in banners, 22px in the activity bar.\n- The set: `docs changes tasks squads agents kit accounts terminal` (from ActivityBar.tsx) plus `warn close plus search more branch chevron-left chevron-right magnifier prompt folder file check alert warn-dash restore history bot download copy plug lock swap list-checks workflow`.\n- Shell icons: `board` (kanban columns), `automation` (loop with a play mark), `panel-right` (right-docked panel), `split` (two panes), `inbox`, and `zap` (the bolt) for quick actions.\n- Forms, feedback, media and tools: `save`, `thumbs-up`, `thumbs-down`, `volume`, `mic`, `paperclip`, `palette`, `hand` (pan), `cursor` (select), `wrench`, `building`, `pip` (picture-in-picture, a floating window). A group of people is `squads`.\n- The brand mark (logo v12) is two folded blades that cross into an `x`. Your blade follows the surface colour; the agent side is always `--brand-agent` `#ff7a3d`; the core where they overlap is white. Sub-systems keep your blade and swap the agent side for their own shape (`BrandMark system=\"ui\"`).",
|
|
3240
3240
|
"layout": "## Layout\n\n- **One shell per app.** `AppShell` holds the brand, the `NavList` groups, the `Breadcrumb` and account actions in the top bar, and the page in `<main>`. `ActivityBar` is for the xDev workspace rail, not for page navigation.\n- **Drawer below 768px.** The sidebar becomes a drawer: control it with `navOpen` and `onNavOpenChange`, close it when an item is chosen, and let Escape close it.\n- **One `PageHeader` per page.** It renders the page's only `h1`; actions sit at the end with the primary one last, and wrap under the title on narrow screens.\n- **`FormSection` groups fields.** A heading, an optional description, fields in one column (two above 480px with `columns={2}`) and the Save and Cancel actions at the end.\n- **Design for 360px.** No horizontal page scroll (see Responsive). Widths come from `%`, `ch`, `rem` and the space tokens; rows of controls use `flex-wrap`. A `DataTable` scrolls inside its own wrapper and drops its `hideNarrow` columns.\n- **Hairlines divide regions.** Cards and rows are separated by 1px `--line`, not by shadows or coloured edges.\n- **Page layout.** Sign-in, sign-up and reset pages sit in `AuthShell` (a showcase side next to the form); other public web pages (account portal, legal) sit in `SiteShell`; the desktop app uses `AppShell`. `Container` caps the width (`size` sm 640 to 2xl 1536, default xl) with a 16px gutter. `Stack` spaces children on one axis with a space step (`gap` 1, 2, 3, 4, 6, 8). `Grid` sets columns per breakpoint (`columns={{ base: 1, md: 2, xl: 4 }}`) or fits cells of `minItemWidth`; `responsive=\"container\"` measures the grid's own width, for grids inside a panel or a `Drawer`.\n- **Breakpoints.** sm 640, md 768, lg 1024, xl 1280, 2xl 1536 (`--x-bp-*`, `BREAKPOINTS`), the same as Tailwind. Mobile first: a value applies from its breakpoint up. Lay out with CSS; `useBreakpoint()` is for behaviour CSS cannot express and renders \"base\" on the server.\n- **Stacking.** z-index comes from `--x-z-*`: raised 1, sticky 5, dropdown 21, nav 30, modal 40, toast 50, skip 60. Never write a number.\n\n### Layout with Tailwind\n\nAn app that already uses Tailwind v4 imports the generated theme, so utilities speak the xdev tokens:\n\n```css\n@import \"tailwindcss\";\n@import \"@xdev-asia/ui/styles.css\";\n@import \"@xdev-asia/ui/tailwind.css\";\n```\n\n- Colours: `bg-panel`, `text-ink`, `text-muted`, `border-line`, `bg-accent text-on-accent`, `bg-danger-soft`. They follow the theme because they point at `--x-color-*`.\n- Radii `rounded-sm|md|lg`, fonts `font-sans|mono`, breakpoints `sm:` to `2xl:` match the tokens. Tailwind's spacing step is 4px, the same as `--x-space-1`, so `p-4` is 16px.\n- Shadows and z-index have no utility names: use `shadow-(--shadow-menu)` and `z-(--x-z-modal)`.\n- Use the components for anything they cover; utilities are for page glue (spacing, a flex row, a one-off grid).",
|
|
3241
3241
|
"responsive": "## Responsive\n\nA page built from the library has no horizontal page scroll from 320px up, and looks the same at 1440px as before these rules. `src/styles/responsive.css` (imported last by `styles.css`) adds the phone and tablet behaviour; the desktop rules stay in each component's file.\n\n**What the library does**\n\n| width | behaviour |\n|---|---|\n| every width | Toolbar, BulkBar, PageHeader, Card head, SettingRow, SaveBar, Composer, EmptyState, Dialog and Drawer footers wrap. Buttons keep their label on one line. `.ws-mono` text breaks anywhere. Menus and popovers stay inside the window. TabStrip, StatusBar and the `.ws-header` row scroll sideways inside themselves. |\n| every width | `DataTable` scrolls inside `.x-table-wrap`; the select column and `sticky` columns stay pinned. `stack` turns rows into label/value cards below a 480px container. |\n| below 768px (`--x-bp-md`) | The AppShell sidebar is a drawer. `Tabs` and `Segmented` scroll sideways inside themselves and fade the edge that hides more. A long `ShellTitle` wraps to two lines and `Card` subtitles wrap. |\n| below 640px (`--x-bp-sm`) | Modal `Dialog` and `FormDialog` open as a bottom sheet with stacked actions, primary on top. `Drawer` takes the full width. Toasts span the width. An empty top-bar `SearchInput` collapses to an icon. |\n| `pointer: coarse` | Buttons, icon buttons, tabs, segments, menu items and inputs get a 44px hit area; inputs use 16px text so iOS does not zoom. |\n\n**What the app must still do**\n\n- No fixed widths over 320px: use `max-width`, `min(30rem, 100%)`, `%`, `ch` or a `Grid` with per-breakpoint `columns` / `minItemWidth`. The audit warns on `fixed-width` and `nowrap`.\n- Give page actions to `PageHeader actions`, not a hand-made flex row; keep at most three icon actions in the AppShell top bar on a phone.\n- Put the row-actions column of a `DataTable` on `sticky=\"end\"`, or pass `stack` for tables people read on a phone.\n- Check every screen at 375, 768 and 1440px (and 320px for overflow), dark and light, and take a screenshot at 375 too.\n\nMedia queries cannot read `var()`, so the CSS writes 639.98px and 767.98px; `test/responsive-css.test.ts` checks them against the breakpoint tokens.",
|
package/dist/fonts.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* Optional: Roboto + JetBrains Mono from Google Fonts
|
|
2
|
-
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800&family=
|
|
1
|
+
/* Optional: Roboto + JetBrains Mono from Google Fonts. Both carry Vietnamese diacritics. The browser downloads a family only when a page uses it. Self-host for offline apps. */
|
|
2
|
+
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap");
|
package/dist/llms-full.txt
CHANGED
|
@@ -193,7 +193,7 @@ A product with its own look sets `data-ground="<id>"` next to `data-theme` on `<
|
|
|
193
193
|
| ground | for | values |
|
|
194
194
|
|---|---|---|
|
|
195
195
|
| `navy` | ai-router | greys point at the `x-color-*` navy ramp (`bg-0` = `x-color-bg`, `bg-2` = `x-color-surface`, `line` = `x-color-line`); `text-3` is 4.5:1 or more on every step in both themes |
|
|
196
|
-
| `ocean` | ui.xdev.asia, the admin showcase | the look of the MUI site: azure accent `#0073e6` (white text 4.57:1), blue-grey greys (hue 210, 14% saturation), a white light mode with `x-color-bg` `#ffffff`. Moves the workspace greys, `accent` and the semantic `x-color-*` surfaces, ink, lines and accent; text 4.5:1, `line-strong` 3:1 and links 4.5:1 on every step (tested).
|
|
196
|
+
| `ocean` | ui.xdev.asia, the admin showcase | the look of the MUI site: azure accent `#0073e6` (white text 4.57:1), blue-grey greys (hue 210, 14% saturation), a white light mode with `x-color-bg` `#ffffff`. Moves the workspace greys, `accent` and the semantic `x-color-*` surfaces, ink, lines and accent; text 4.5:1, `line-strong` 3:1 and links 4.5:1 on every step (tested). Keeps the body font (Roboto). Also sets radii `x-radius-md` 10px / `radius-l` 12px, and a soft inset highlight on buttons (`--x-shadow-btn`, `--x-shadow-btn-quiet`; `none` by default) |
|
|
197
197
|
|
|
198
198
|
### Rules
|
|
199
199
|
- **Dark first.** `dark` is the default theme; `light` mirrors every token. Previews render dark; toggle the theme to check light.
|