@xdev-asia/ui 4.15.0 → 4.15.2
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 +5 -15
- package/dist/ai-manifest.json +18 -18
- package/dist/fonts.css +2 -2
- package/dist/llms-full.txt +14 -14
- package/dist/llms.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.layered.css +1 -1
- package/dist/tokens.css +8 -12
- package/dist/tokens.json +9 -11
- package/package.json +1 -1
- package/skills/xdev-ui-admin/templates/admin/_npmrc +1 -2
- package/skills/xdev-ui-build-app/references/setup.md +1 -1
- package/skills/xdev-ui-build-app/templates/app/_npmrc +1 -2
package/README.md
CHANGED
|
@@ -1,27 +1,17 @@
|
|
|
1
1
|
# xdev-ui
|
|
2
2
|
|
|
3
|
-
Design tokens and React components for the xDev agent workspace. Published as **`@xdev-asia/ui`** on GitHub Packages.
|
|
3
|
+
Design tokens and React components for the xDev agent workspace. Published as **`@xdev-asia/ui`** on npmjs.com (and GitHub Packages).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```ini
|
|
10
|
-
@xdev-asia:registry=https://npm.pkg.github.com
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
The token needs `read:packages`, even though the package is public. pnpm ignores `${VAR}` in repo-level credentials, so put the token line in the user `~/.npmrc` (or a file named by `NPM_CONFIG_USERCONFIG` in CI):
|
|
14
|
-
|
|
15
|
-
```ini
|
|
16
|
-
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
In GitHub Actions of another `xdev-asia` repo, give the job `permissions: packages: read`, pass `GITHUB_TOKEN: ${{ github.token }}`, and if install returns 403, grant that repo read access under *Package settings → Manage Actions access*.
|
|
7
|
+
`@xdev-asia/ui` is on npmjs.com, so no registry line or token is needed:
|
|
20
8
|
|
|
21
9
|
```bash
|
|
22
10
|
pnpm add @xdev-asia/ui
|
|
23
11
|
```
|
|
24
12
|
|
|
13
|
+
Each release is also on GitHub Packages (`@xdev-asia:registry=https://npm.pkg.github.com` in `.npmrc`, with a token that has `read:packages`), for setups that already read from there.
|
|
14
|
+
|
|
25
15
|
## Use
|
|
26
16
|
|
|
27
17
|
```tsx
|
|
@@ -143,7 +133,7 @@ Commits on `main` follow [Conventional Commits](https://www.conventionalcommits.
|
|
|
143
133
|
| `feat!: …` / `BREAKING CHANGE:` | major |
|
|
144
134
|
| `chore:`, `docs:`, `ci:` | none |
|
|
145
135
|
|
|
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>.
|
|
136
|
+
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), or, without that secret, npm trusted publishing (OIDC) set up on npmjs.com for `release.yml`. 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
137
|
|
|
148
138
|
## License
|
|
149
139
|
|
package/dist/ai-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@xdev-asia/ui",
|
|
3
|
-
"version": "4.15.
|
|
4
|
-
"setup": "pnpm add @xdev-asia/ui #
|
|
3
|
+
"version": "4.15.2",
|
|
4
|
+
"setup": "pnpm add @xdev-asia/ui # from npmjs.com, no token needed\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": [
|
|
7
7
|
"docs",
|
|
@@ -806,7 +806,7 @@
|
|
|
806
806
|
"ws-stat-add",
|
|
807
807
|
"ws-stat-del"
|
|
808
808
|
],
|
|
809
|
-
"readme": "# DiffStat\n\nMono `+added −removed` line count for a change, a file or a session row.\n\n## Rules\n- Added in `--ok`, removed in `--danger`,
|
|
809
|
+
"readme": "# DiffStat\n\nMono `+added −removed` line count for a change, a file or a session row.\n\n## Rules\n- Added in `--ok`, removed in `--danger`, 12px mono.\n- Show both numbers even when one is zero, so rows align.\n- The minus is U+2212, not a hyphen.\n- `labels` (`DiffStatLabels`: `diffStat(added, removed)`) overrides the accessible English summary.\n"
|
|
810
810
|
},
|
|
811
811
|
{
|
|
812
812
|
"name": "Disclosure",
|
|
@@ -1744,7 +1744,7 @@
|
|
|
1744
1744
|
"ws-footer-item",
|
|
1745
1745
|
"ws-footer-spacer"
|
|
1746
1746
|
],
|
|
1747
|
-
"readme": "# StatusBar\n\n26px footer bar (`--h-footer`) for session counts, meters and the current branch.\n\n## Rules\n- `items` renders left to right; the string `\"spacer\"` pushes the rest to the right.\n- Left: session counts. Right: meters, branch, encoding.\n- Text is
|
|
1747
|
+
"readme": "# StatusBar\n\n26px footer bar (`--h-footer`) for session counts, meters and the current branch.\n\n## Rules\n- `items` renders left to right; the string `\"spacer\"` pushes the rest to the right.\n- Left: session counts. Right: meters, branch, encoding.\n- Text is 12px `--text-2`. Nothing here is a primary action.\n- `hidden` renders nothing (the bar leaves the layout); absent or `false` renders as before.\n"
|
|
1748
1748
|
},
|
|
1749
1749
|
{
|
|
1750
1750
|
"name": "StatusDot",
|
|
@@ -1984,7 +1984,7 @@
|
|
|
1984
1984
|
"classes": [
|
|
1985
1985
|
"ws-bulk-bar"
|
|
1986
1986
|
],
|
|
1987
|
-
"readme": "# Toolbar\n\nHead of a pane with its title, a count and a group of actions, or the bar shown while rows are selected.\n\n## Anatomy\n`div.pane-head[data-variant]` > `span.pane-title` (+ `span.pane-count`) + `div.pane-tools[role=toolbar]`.\n\n## Rules\n- `head`:
|
|
1987
|
+
"readme": "# Toolbar\n\nHead of a pane with its title, a count and a group of actions, or the bar shown while rows are selected.\n\n## Anatomy\n`div.pane-head[data-variant]` > `span.pane-title` (+ `span.pane-count`) + `div.pane-tools[role=toolbar]`.\n\n## Rules\n- `head`: 12px uppercase muted title; the count stays in normal case. Use it at the top of every side pane.\n- `bulk`: a 10% `--accent` tint bar that replaces the head while rows are selected; title is the summary (\"3 selected\").\n- Actions are IconButtons (with labels) or small Buttons, at most four; put the rest in a `Menu` behind \"More\".\n- The actions group has `role=\"toolbar\"`, is named by `label`, a string `title`, or `labels.actions`, and Left/Right move focus inside it.\n- Each action stays in the Tab order too; the group does not manage tabindex.\n\n## Responsive\n- The title and the actions wrap onto two lines when they do not fit; the actions also wrap among themselves. The bulk variant behaves the same.\n"
|
|
1988
1988
|
},
|
|
1989
1989
|
{
|
|
1990
1990
|
"name": "Tooltip",
|
|
@@ -2176,7 +2176,7 @@
|
|
|
2176
2176
|
"css": "var(--accent)",
|
|
2177
2177
|
"category": "color",
|
|
2178
2178
|
"value": {
|
|
2179
|
-
"dark": "#
|
|
2179
|
+
"dark": "#3a6be7",
|
|
2180
2180
|
"light": "#2453d6"
|
|
2181
2181
|
},
|
|
2182
2182
|
"usage": "Brand blue in the workspace: selected-tab top rule, on switches, merged PR dot, the mark."
|
|
@@ -2416,7 +2416,7 @@
|
|
|
2416
2416
|
"css": "var(--x-color-accent)",
|
|
2417
2417
|
"category": "color",
|
|
2418
2418
|
"value": {
|
|
2419
|
-
"dark": "#
|
|
2419
|
+
"dark": "#3a6be7",
|
|
2420
2420
|
"light": "#2453d6"
|
|
2421
2421
|
},
|
|
2422
2422
|
"usage": "Primary button fill, pressed segment, current activity."
|
|
@@ -2436,7 +2436,7 @@
|
|
|
2436
2436
|
"css": "var(--x-color-accent-soft)",
|
|
2437
2437
|
"category": "color",
|
|
2438
2438
|
"value": {
|
|
2439
|
-
"dark": "#
|
|
2439
|
+
"dark": "#3a6be72e",
|
|
2440
2440
|
"light": "#e1e9fb"
|
|
2441
2441
|
},
|
|
2442
2442
|
"usage": "Selected rows and soft accent wells."
|
|
@@ -3101,7 +3101,7 @@
|
|
|
3101
3101
|
"css": "font: var(--type-section)",
|
|
3102
3102
|
"category": "type",
|
|
3103
3103
|
"value": {
|
|
3104
|
-
"fontSize": "
|
|
3104
|
+
"fontSize": "12px",
|
|
3105
3105
|
"lineHeight": 1.4,
|
|
3106
3106
|
"fontWeight": 600
|
|
3107
3107
|
},
|
|
@@ -3112,7 +3112,7 @@
|
|
|
3112
3112
|
"css": "font: var(--type-badge)",
|
|
3113
3113
|
"category": "type",
|
|
3114
3114
|
"value": {
|
|
3115
|
-
"fontSize": "
|
|
3115
|
+
"fontSize": "12px",
|
|
3116
3116
|
"lineHeight": 1.5,
|
|
3117
3117
|
"fontWeight": 600
|
|
3118
3118
|
},
|
|
@@ -3123,7 +3123,7 @@
|
|
|
3123
3123
|
"css": "font: var(--type-tag)",
|
|
3124
3124
|
"category": "type",
|
|
3125
3125
|
"value": {
|
|
3126
|
-
"fontSize": "
|
|
3126
|
+
"fontSize": "12px",
|
|
3127
3127
|
"fontWeight": 400
|
|
3128
3128
|
},
|
|
3129
3129
|
"usage": "Tags, skipped-tab pill, activity count."
|
|
@@ -3176,7 +3176,7 @@
|
|
|
3176
3176
|
"css": "font: var(--type-mono-stat)",
|
|
3177
3177
|
"category": "type",
|
|
3178
3178
|
"value": {
|
|
3179
|
-
"fontSize": "
|
|
3179
|
+
"fontSize": "12px",
|
|
3180
3180
|
"fontWeight": 400
|
|
3181
3181
|
},
|
|
3182
3182
|
"usage": "+N / -N line counts, agent chip letter (700)."
|
|
@@ -3208,7 +3208,7 @@
|
|
|
3208
3208
|
"css": "font: var(--type-kbd)",
|
|
3209
3209
|
"category": "type",
|
|
3210
3210
|
"value": {
|
|
3211
|
-
"fontSize": "
|
|
3211
|
+
"fontSize": "12px",
|
|
3212
3212
|
"fontWeight": 400
|
|
3213
3213
|
},
|
|
3214
3214
|
"usage": "Key caps."
|
|
@@ -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.",
|
|
@@ -3345,7 +3345,7 @@
|
|
|
3345
3345
|
},
|
|
3346
3346
|
{
|
|
3347
3347
|
"path": "templates/admin/_npmrc",
|
|
3348
|
-
"text": "@xdev-asia
|
|
3348
|
+
"text": "# @xdev-asia/ui is on npmjs.com: no registry line or token is needed.\n"
|
|
3349
3349
|
},
|
|
3350
3350
|
{
|
|
3351
3351
|
"path": "templates/admin/index.html",
|
|
@@ -3484,7 +3484,7 @@
|
|
|
3484
3484
|
},
|
|
3485
3485
|
{
|
|
3486
3486
|
"path": "references/setup.md",
|
|
3487
|
-
"text": "# Setup\n\n## Install\n\n```bash\npnpm add @xdev-asia/ui react react-dom\n```\n\nThe package is on
|
|
3487
|
+
"text": "# Setup\n\n## Install\n\n```bash\npnpm add @xdev-asia/ui react react-dom\n```\n\nThe package is on npmjs.com, so the install needs no registry line and no token. Never commit a token. `xdev-ui-skills create` pins `@xdev-asia/ui` to the release that ships the template (`^x.y.z`); if you copy the template by hand, replace `latest` with the version you install.\n\n## Entry file\n\n```tsx\nimport \"@xdev-asia/ui/fonts.css\";\nimport \"@xdev-asia/ui/styles.css\";\nimport \"./app.css\";\n```\n\n- `styles.css` carries tokens and every component; import it once, before `app.css`.\n- `fonts.css` is optional; without it the system stack is used.\n- `index.html` sets `<html lang=\"en\" data-theme=\"dark\">`.\n\n## App CSS\n\nUse tokens only: `var(--x-space-4)`, `var(--text-2)`, `font: var(--type-status)`. Find a token with `xdevui_search_tokens`.\n"
|
|
3488
3488
|
},
|
|
3489
3489
|
{
|
|
3490
3490
|
"path": "references/states.md",
|
|
@@ -3504,7 +3504,7 @@
|
|
|
3504
3504
|
},
|
|
3505
3505
|
{
|
|
3506
3506
|
"path": "templates/app/_npmrc",
|
|
3507
|
-
"text": "@xdev-asia
|
|
3507
|
+
"text": "# @xdev-asia/ui is on npmjs.com: no registry line or token is needed.\n"
|
|
3508
3508
|
},
|
|
3509
3509
|
{
|
|
3510
3510
|
"path": "templates/app/index.html",
|
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
|
@@ -7,7 +7,7 @@ Dark-first React 19 components and CSS tokens. Import `styles.css` once, set `da
|
|
|
7
7
|
## Setup
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
pnpm add @xdev-asia/ui #
|
|
10
|
+
pnpm add @xdev-asia/ui # from npmjs.com, no token needed
|
|
11
11
|
import "@xdev-asia/ui/styles.css";
|
|
12
12
|
import "@xdev-asia/ui/fonts.css"; // optional
|
|
13
13
|
<html data-theme="dark"> // or "light"
|
|
@@ -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.
|
|
@@ -1599,7 +1599,7 @@ export function navigate(to: string): void
|
|
|
1599
1599
|
pnpm add @xdev-asia/ui react react-dom
|
|
1600
1600
|
```
|
|
1601
1601
|
|
|
1602
|
-
The package is on
|
|
1602
|
+
The package is on npmjs.com, so the install needs no registry line and no token. Never commit a token. `xdev-ui-skills create` pins `@xdev-asia/ui` to the release that ships the template (`^x.y.z`); if you copy the template by hand, replace `latest` with the version you install.
|
|
1603
1603
|
|
|
1604
1604
|
## Entry file
|
|
1605
1605
|
|
|
@@ -5929,7 +5929,7 @@ export interface DialogProps {
|
|
|
5929
5929
|
Mono `+added −removed` line count for a change, a file or a session row.
|
|
5930
5930
|
|
|
5931
5931
|
## Rules
|
|
5932
|
-
- Added in `--ok`, removed in `--danger`,
|
|
5932
|
+
- Added in `--ok`, removed in `--danger`, 12px mono.
|
|
5933
5933
|
- Show both numbers even when one is zero, so rows align.
|
|
5934
5934
|
- The minus is U+2212, not a hyphen.
|
|
5935
5935
|
- `labels` (`DiffStatLabels`: `diffStat(added, removed)`) overrides the accessible English summary.
|
|
@@ -8677,7 +8677,7 @@ export interface StatTileProps {
|
|
|
8677
8677
|
## Rules
|
|
8678
8678
|
- `items` renders left to right; the string `"spacer"` pushes the rest to the right.
|
|
8679
8679
|
- Left: session counts. Right: meters, branch, encoding.
|
|
8680
|
-
- Text is
|
|
8680
|
+
- Text is 12px `--text-2`. Nothing here is a primary action.
|
|
8681
8681
|
- `hidden` renders nothing (the bar leaves the layout); absent or `false` renders as before.
|
|
8682
8682
|
|
|
8683
8683
|
```ts
|
|
@@ -9381,7 +9381,7 @@ Head of a pane with its title, a count and a group of actions, or the bar shown
|
|
|
9381
9381
|
`div.pane-head[data-variant]` > `span.pane-title` (+ `span.pane-count`) + `div.pane-tools[role=toolbar]`.
|
|
9382
9382
|
|
|
9383
9383
|
## Rules
|
|
9384
|
-
- `head`:
|
|
9384
|
+
- `head`: 12px uppercase muted title; the count stays in normal case. Use it at the top of every side pane.
|
|
9385
9385
|
- `bulk`: a 10% `--accent` tint bar that replaces the head while rows are selected; title is the summary ("3 selected").
|
|
9386
9386
|
- Actions are IconButtons (with labels) or small Buttons, at most four; put the rest in a `Menu` behind "More".
|
|
9387
9387
|
- The actions group has `role="toolbar"`, is named by `label`, a string `title`, or `labels.actions`, and Left/Right move focus inside it.
|
|
@@ -9663,7 +9663,7 @@ export interface ZoomBarProps {
|
|
|
9663
9663
|
| `--text-3` | color | dark: #8f909b; light: #666974 | Tertiary meta text: palette section labels, placeholders, timestamps, counts. At least 4.5:1 on bg-0 to bg-3, term and side-tint in both themes; still the quietest text step, below text-2. |
|
|
9664
9664
|
| `--side-tint` | color | dark: #161a26; light: #f1f4fb | Left sidebar ground when Appearance > Sidebar is Tinted: bg-1 with a faint accent wash. Text-1 and text-2 keep their contrast on it. |
|
|
9665
9665
|
| `--term` | color | dark: #111215; light: #ffffff | Terminal and editor ground; the selected tab takes it so the tab joins its pane. White in light, between bg-0 and bg-1 in dark. |
|
|
9666
|
-
| `--accent` | color | dark: #
|
|
9666
|
+
| `--accent` | color | dark: #3a6be7; light: #2453d6 | Brand blue in the workspace: selected-tab top rule, on switches, merged PR dot, the mark. |
|
|
9667
9667
|
| `--signal` | color | dark: #5bd8ff; light: #06699a | Agent working state, meter fill, Codex chip. Text on bg-0 to bg-2. |
|
|
9668
9668
|
| `--signal-bg` | color | dark: rgba(91, 216, 255, 0.12); light: rgba(6, 112, 160, 0.1) | Tint behind signal text (Codex chip). |
|
|
9669
9669
|
| `--warn` | color | dark: #f2b544; light: #8a5200 | Needs-you state, pending checks, warn tag, meter over threshold. Text on bg-0 to bg-2. |
|
|
@@ -9687,9 +9687,9 @@ export interface ZoomBarProps {
|
|
|
9687
9687
|
| `--x-color-muted` | color | dark: #9aa8c7; light: #4f5b78 | Semantic secondary text on x-color-bg, panel and surface. |
|
|
9688
9688
|
| `--x-color-line` | color | dark: #24314f; light: #d6deed | Semantic hairline: secondary buttons, segmented, dialog edge. |
|
|
9689
9689
|
| `--x-color-line-strong` | color | dark: #64718d; light: #76839d | Control edge: 3:1 or more on x-color-bg, panel, surface and surface-2 and on bg-0 to bg-3 (SC 1.4.11). Use it where a border alone marks a field, checkbox, radio or switch; keep x-color-line for decorative dividers. |
|
|
9690
|
-
| `--x-color-accent` | color | dark: #
|
|
9690
|
+
| `--x-color-accent` | color | dark: #3a6be7; light: #2453d6 | Primary button fill, pressed segment, current activity. |
|
|
9691
9691
|
| `--x-color-on-accent` | color | dark: #ffffff; light: #ffffff | Text and glyphs on x-color-accent (5.2:1 dark, 6.6:1 light). |
|
|
9692
|
-
| `--x-color-accent-soft` | color | dark: #
|
|
9692
|
+
| `--x-color-accent-soft` | color | dark: #3a6be72e; light: #e1e9fb | Selected rows and soft accent wells. |
|
|
9693
9693
|
| `--x-color-signal` | color | dark: #5bd8ff; light: #0670a0 | Focus ring (2px solid, offset 2px) and changed badge text. |
|
|
9694
9694
|
| `--x-color-focus` | color | dark: {x-color-signal}; light: {x-color-signal} | Focus ring colour; always equal to x-color-signal. |
|
|
9695
9695
|
| `--x-color-signal-soft` | color | dark: #5bd8ff1f; light: #e1f2fa | Changed badge ground. |
|
|
@@ -9773,14 +9773,14 @@ export interface ZoomBarProps {
|
|
|
9773
9773
|
| `--type-label` | type | fontSize: 12px; fontWeight: 600 | Field labels, segmented options, select. |
|
|
9774
9774
|
| `--type-tab` | type | fontSize: 13px; fontWeight: 400 | Tab names, file tree rows, sidebar rows; unread tabs go to 700. |
|
|
9775
9775
|
| `--type-status` | type | fontSize: 12px; fontWeight: 400 | Footer status bar, field hints. |
|
|
9776
|
-
| `--type-section` | type | fontSize:
|
|
9777
|
-
| `--type-badge` | type | fontSize:
|
|
9778
|
-
| `--type-tag` | type | fontSize:
|
|
9776
|
+
| `--type-section` | type | fontSize: 12px; lineHeight: 1.4; fontWeight: 600 | Section and group headers in sidebars and panels; uppercase with 0.06em tracking, text-2. |
|
|
9777
|
+
| `--type-badge` | type | fontSize: 12px; lineHeight: 1.5; fontWeight: 600 | Badges, menu group labels, palette section labels. |
|
|
9778
|
+
| `--type-tag` | type | fontSize: 12px; fontWeight: 400 | Tags, skipped-tab pill, activity count. |
|
|
9779
9779
|
| `--type-avatar-sm` | type | fontSize: 8px; lineHeight: 1; fontWeight: 600 | Initials in a small Avatar. |
|
|
9780
9780
|
| `--type-avatar-md` | type | fontSize: 13px; lineHeight: 1; fontWeight: 600 | Initials in a medium Avatar. |
|
|
9781
9781
|
| `--type-avatar-lg` | type | fontSize: 19px; lineHeight: 1; fontWeight: 600 | Initials in a large Avatar. |
|
|
9782
9782
|
| `--type-mono` | type | fontSize: 12px; fontWeight: 400 | Crash detail, paths in fields, snippets. |
|
|
9783
|
-
| `--type-mono-stat` | type | fontSize:
|
|
9783
|
+
| `--type-mono-stat` | type | fontSize: 12px; fontWeight: 400 | +N / -N line counts, agent chip letter (700). |
|
|
9784
9784
|
| `--type-stat` | type | fontSize: 22px; lineHeight: 1.2; fontWeight: 600 | Headline number in StatTile. |
|
|
9785
9785
|
| `--type-display` | type | fontSize: 40px; lineHeight: 1.1; fontWeight: 600 | Wall clock or the one big number of a screen: StatTile size lg. |
|
|
9786
|
-
| `--type-kbd` | type | fontSize:
|
|
9786
|
+
| `--type-kbd` | type | fontSize: 12px; fontWeight: 400 | Key caps. |
|
package/dist/llms.txt
CHANGED
|
@@ -7,7 +7,7 @@ Dark-first React 19 components and CSS tokens. Import `styles.css` once, set `da
|
|
|
7
7
|
## Setup
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
pnpm add @xdev-asia/ui #
|
|
10
|
+
pnpm add @xdev-asia/ui # from npmjs.com, no token needed
|
|
11
11
|
import "@xdev-asia/ui/styles.css";
|
|
12
12
|
import "@xdev-asia/ui/fonts.css"; // optional
|
|
13
13
|
<html data-theme="dark"> // or "light"
|