base-themes 0.1.2 → 0.1.3

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.
Files changed (262) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/CODE_OF_CONDUCT.md +22 -0
  3. package/CONTRIBUTING.md +98 -0
  4. package/LICENSE +21 -0
  5. package/README.md +316 -3
  6. package/RELEASE.md +80 -0
  7. package/SECURITY.md +49 -0
  8. package/bin/base-themes.mjs +143 -0
  9. package/dist/base-themes.css +1 -1
  10. package/dist/base-themes.js +857 -302
  11. package/dist/llms-full.txt +288 -0
  12. package/dist/llms.txt +79 -0
  13. package/dist/types/blocks/AuthCard.d.ts +2 -0
  14. package/dist/types/blocks/CommandPaletteBlock.d.ts +2 -0
  15. package/dist/types/blocks/DashboardShell.d.ts +2 -0
  16. package/dist/types/blocks/DataTableBlock.d.ts +2 -0
  17. package/dist/types/blocks/PricingPanel.d.ts +2 -0
  18. package/dist/types/blocks/SettingsForm.d.ts +2 -0
  19. package/dist/types/blocks/TeamActivityFeed.d.ts +2 -0
  20. package/dist/types/blocks/ThemeShowcaseCard.d.ts +2 -0
  21. package/dist/types/blocks/index.d.ts +8 -0
  22. package/dist/types/components/ui/Input.d.ts +3 -0
  23. package/dist/types/components/ui/index.d.ts +1 -1
  24. package/dist/types/lib.d.ts +1 -0
  25. package/docs/adoption-dashboard.md +149 -0
  26. package/docs/analytics-setup.md +145 -0
  27. package/docs/community-gallery-proposal.md +64 -0
  28. package/docs/community-proof-telemetry.md +47 -0
  29. package/docs/contributor-issue-seeds.md +240 -0
  30. package/docs/registry-access-telemetry.md +87 -0
  31. package/docs/release-announcement-kit.md +229 -0
  32. package/docs/search-console-setup.md +111 -0
  33. package/docs/theme-token-contract.md +113 -0
  34. package/examples/dashboard/README.md +24 -0
  35. package/examples/dashboard/index.html +12 -0
  36. package/examples/dashboard/package-lock.json +1212 -0
  37. package/examples/dashboard/package.json +24 -0
  38. package/examples/dashboard/src/App.tsx +115 -0
  39. package/examples/dashboard/src/main.tsx +11 -0
  40. package/examples/dashboard/src/styles.css +129 -0
  41. package/examples/dashboard/src/vite-env.d.ts +4 -0
  42. package/examples/dashboard/tsconfig.app.json +23 -0
  43. package/examples/dashboard/tsconfig.json +7 -0
  44. package/examples/dashboard/tsconfig.node.json +15 -0
  45. package/examples/dashboard/vite.config.ts +6 -0
  46. package/examples/next/README.md +29 -0
  47. package/examples/next/app/base-themes-demo.tsx +70 -0
  48. package/examples/next/app/layout.tsx +16 -0
  49. package/examples/next/app/page.tsx +9 -0
  50. package/examples/next/app/styles.css +106 -0
  51. package/examples/next/next-env.d.ts +6 -0
  52. package/examples/next/next.config.ts +5 -0
  53. package/examples/next/package-lock.json +1199 -0
  54. package/examples/next/package.json +27 -0
  55. package/examples/next/tsconfig.json +36 -0
  56. package/examples/registry-copy/README.md +73 -0
  57. package/examples/registry-copy/plan-copy.mjs +130 -0
  58. package/examples/theme-customization/README.md +26 -0
  59. package/examples/theme-customization/index.html +12 -0
  60. package/examples/theme-customization/package-lock.json +1212 -0
  61. package/examples/theme-customization/package.json +24 -0
  62. package/examples/theme-customization/src/App.tsx +138 -0
  63. package/examples/theme-customization/src/main.tsx +11 -0
  64. package/examples/theme-customization/src/styles.css +138 -0
  65. package/examples/theme-customization/src/vite-env.d.ts +4 -0
  66. package/examples/theme-customization/tsconfig.app.json +23 -0
  67. package/examples/theme-customization/tsconfig.json +7 -0
  68. package/examples/theme-customization/tsconfig.node.json +15 -0
  69. package/examples/theme-customization/vite.config.ts +6 -0
  70. package/examples/vite/README.md +32 -0
  71. package/examples/vite/index.html +12 -0
  72. package/examples/vite/package-lock.json +1200 -0
  73. package/examples/vite/package.json +24 -0
  74. package/examples/vite/src/App.tsx +101 -0
  75. package/examples/vite/src/main.tsx +11 -0
  76. package/examples/vite/src/styles.css +125 -0
  77. package/examples/vite/src/vite-env.d.ts +4 -0
  78. package/examples/vite/tsconfig.app.json +23 -0
  79. package/examples/vite/tsconfig.json +7 -0
  80. package/examples/vite/tsconfig.node.json +15 -0
  81. package/examples/vite/vite.config.ts +6 -0
  82. package/llms-full.txt +288 -0
  83. package/llms.txt +79 -0
  84. package/package.json +157 -14
  85. package/registry/items/accordion.json +101 -0
  86. package/registry/items/alert-dialog.json +107 -0
  87. package/registry/items/autocomplete.json +106 -0
  88. package/registry/items/avatar.json +101 -0
  89. package/registry/items/block-auth-card.json +105 -0
  90. package/registry/items/block-command-palette.json +99 -0
  91. package/registry/items/block-dashboard-shell.json +101 -0
  92. package/registry/items/block-data-table.json +99 -0
  93. package/registry/items/block-pricing-panel.json +99 -0
  94. package/registry/items/block-settings-form.json +107 -0
  95. package/registry/items/block-team-activity-feed.json +99 -0
  96. package/registry/items/block-theme-showcase-card.json +99 -0
  97. package/registry/items/button.json +102 -0
  98. package/registry/items/checkbox-group.json +106 -0
  99. package/registry/items/checkbox.json +102 -0
  100. package/registry/items/collapsible.json +101 -0
  101. package/registry/items/combobox.json +101 -0
  102. package/registry/items/context-menu.json +106 -0
  103. package/registry/items/csp-provider.json +96 -0
  104. package/registry/items/dialog.json +102 -0
  105. package/registry/items/direction-provider.json +101 -0
  106. package/registry/items/drawer.json +101 -0
  107. package/registry/items/field.json +101 -0
  108. package/registry/items/fieldset.json +101 -0
  109. package/registry/items/form.json +101 -0
  110. package/registry/items/input.json +102 -0
  111. package/registry/items/menu.json +101 -0
  112. package/registry/items/menubar.json +106 -0
  113. package/registry/items/meter.json +101 -0
  114. package/registry/items/navigation-menu.json +101 -0
  115. package/registry/items/number-field.json +101 -0
  116. package/registry/items/otp-field.json +101 -0
  117. package/registry/items/popover.json +102 -0
  118. package/registry/items/preview-card.json +101 -0
  119. package/registry/items/progress.json +101 -0
  120. package/registry/items/radio-group.json +102 -0
  121. package/registry/items/radio.json +101 -0
  122. package/registry/items/scroll-area.json +101 -0
  123. package/registry/items/select.json +102 -0
  124. package/registry/items/separator.json +101 -0
  125. package/registry/items/slider.json +102 -0
  126. package/registry/items/switch.json +102 -0
  127. package/registry/items/tabs.json +101 -0
  128. package/registry/items/theme-bauhaus.json +107 -0
  129. package/registry/items/theme-bento.json +107 -0
  130. package/registry/items/theme-calm.json +107 -0
  131. package/registry/items/theme-cyberpunk.json +108 -0
  132. package/registry/items/theme-data-dense.json +107 -0
  133. package/registry/items/theme-editorial.json +107 -0
  134. package/registry/items/theme-enterprise.json +108 -0
  135. package/registry/items/theme-fluent.json +107 -0
  136. package/registry/items/theme-glass.json +107 -0
  137. package/registry/items/theme-linear.json +107 -0
  138. package/registry/items/theme-luxury.json +107 -0
  139. package/registry/items/theme-material.json +107 -0
  140. package/registry/items/theme-minimal.json +107 -0
  141. package/registry/items/theme-mono.json +107 -0
  142. package/registry/items/theme-neo-brutalism.json +107 -0
  143. package/registry/items/theme-playful.json +107 -0
  144. package/registry/items/theme-retro.json +107 -0
  145. package/registry/items/theme-shadcn.json +107 -0
  146. package/registry/items/theme-soft-ui.json +107 -0
  147. package/registry/items/theme-terminal.json +107 -0
  148. package/registry/items/toast.json +106 -0
  149. package/registry/items/toggle-group.json +101 -0
  150. package/registry/items/toggle.json +101 -0
  151. package/registry/items/toolbar.json +101 -0
  152. package/registry/items/tooltip.json +102 -0
  153. package/registry/registry.json +564 -49
  154. package/registry/shadcn-registry.json +415 -0
  155. package/research/telemetry-fixtures/analytics-events.jsonl +9 -0
  156. package/research/telemetry-fixtures/bundle-report.json +44 -0
  157. package/research/telemetry-fixtures/community-proof.csv +5 -0
  158. package/research/telemetry-fixtures/registry-access.jsonl +10 -0
  159. package/research/telemetry-fixtures/search-console-export.csv +4 -0
  160. package/scripts/registry-plan.mjs +434 -0
  161. package/scripts/render-launch-actions.mjs +405 -0
  162. package/scripts/render-launch-status.mjs +373 -0
  163. package/scripts/render-release-announcement.mjs +329 -0
  164. package/scripts/verify-launch-readiness.mjs +415 -0
  165. package/scripts/verify-telemetry-fixtures.mjs +85 -0
  166. package/scripts/verify-telemetry-report.mjs +89 -0
  167. package/skills/base-themes/SKILL.md +151 -47
  168. package/src/blocks/AuthCard.tsx +29 -0
  169. package/src/blocks/Blocks.css +182 -0
  170. package/src/blocks/CommandPaletteBlock.tsx +32 -0
  171. package/src/blocks/DashboardShell.tsx +36 -0
  172. package/src/blocks/DataTableBlock.tsx +44 -0
  173. package/src/blocks/PricingPanel.tsx +28 -0
  174. package/src/blocks/SettingsForm.tsx +37 -0
  175. package/src/blocks/TeamActivityFeed.tsx +38 -0
  176. package/src/blocks/ThemeShowcaseCard.tsx +32 -0
  177. package/src/blocks/index.ts +8 -0
  178. package/src/components/ui/Accordion.css +42 -0
  179. package/src/components/ui/Accordion.tsx +41 -0
  180. package/src/components/ui/AlertDialog.css +40 -0
  181. package/src/components/ui/AlertDialog.tsx +52 -0
  182. package/src/components/ui/Autocomplete.css +3 -0
  183. package/src/components/ui/Autocomplete.tsx +50 -0
  184. package/src/components/ui/Avatar.css +45 -0
  185. package/src/components/ui/Avatar.tsx +36 -0
  186. package/src/components/ui/Button.css +79 -0
  187. package/src/components/ui/Button.tsx +20 -0
  188. package/src/components/ui/Checkbox.css +37 -0
  189. package/src/components/ui/Checkbox.tsx +32 -0
  190. package/src/components/ui/CheckboxGroup.tsx +21 -0
  191. package/src/components/ui/Collapsible.css +34 -0
  192. package/src/components/ui/Collapsible.tsx +29 -0
  193. package/src/components/ui/Combobox.css +75 -0
  194. package/src/components/ui/Combobox.tsx +53 -0
  195. package/src/components/ui/ContextMenu.css +9 -0
  196. package/src/components/ui/ContextMenu.tsx +47 -0
  197. package/src/components/ui/CspProvider.tsx +10 -0
  198. package/src/components/ui/Dialog.css +41 -0
  199. package/src/components/ui/Dialog.tsx +45 -0
  200. package/src/components/ui/DirectionProvider.tsx +17 -0
  201. package/src/components/ui/Drawer.css +77 -0
  202. package/src/components/ui/Drawer.tsx +56 -0
  203. package/src/components/ui/Field.css +19 -0
  204. package/src/components/ui/Field.tsx +24 -0
  205. package/src/components/ui/Fieldset.css +16 -0
  206. package/src/components/ui/Fieldset.tsx +19 -0
  207. package/src/components/ui/Form.css +5 -0
  208. package/src/components/ui/Form.tsx +12 -0
  209. package/src/components/ui/Input.css +50 -0
  210. package/src/components/ui/Input.tsx +62 -0
  211. package/src/components/ui/Menu.css +59 -0
  212. package/src/components/ui/Menu.tsx +50 -0
  213. package/src/components/ui/Menubar.css +26 -0
  214. package/src/components/ui/Menubar.tsx +42 -0
  215. package/src/components/ui/Meter.css +45 -0
  216. package/src/components/ui/Meter.tsx +37 -0
  217. package/src/components/ui/NavigationMenu.css +103 -0
  218. package/src/components/ui/NavigationMenu.tsx +64 -0
  219. package/src/components/ui/NumberField.css +38 -0
  220. package/src/components/ui/NumberField.tsx +28 -0
  221. package/src/components/ui/OtpField.css +28 -0
  222. package/src/components/ui/OtpField.tsx +24 -0
  223. package/src/components/ui/Popover.css +25 -0
  224. package/src/components/ui/Popover.tsx +37 -0
  225. package/src/components/ui/PreviewCard.css +33 -0
  226. package/src/components/ui/PreviewCard.tsx +43 -0
  227. package/src/components/ui/Progress.css +33 -0
  228. package/src/components/ui/Progress.tsx +28 -0
  229. package/src/components/ui/Radio.tsx +22 -0
  230. package/src/components/ui/RadioGroup.css +42 -0
  231. package/src/components/ui/RadioGroup.tsx +29 -0
  232. package/src/components/ui/ScrollArea.css +42 -0
  233. package/src/components/ui/ScrollArea.tsx +22 -0
  234. package/src/components/ui/Select.css +86 -0
  235. package/src/components/ui/Select.tsx +39 -0
  236. package/src/components/ui/Separator.css +14 -0
  237. package/src/components/ui/Separator.tsx +12 -0
  238. package/src/components/ui/Slider.css +39 -0
  239. package/src/components/ui/Slider.tsx +21 -0
  240. package/src/components/ui/Switch.css +45 -0
  241. package/src/components/ui/Switch.tsx +29 -0
  242. package/src/components/ui/Tabs.css +72 -0
  243. package/src/components/ui/Tabs.tsx +44 -0
  244. package/src/components/ui/Toast.css +75 -0
  245. package/src/components/ui/Toast.tsx +48 -0
  246. package/src/components/ui/Toggle.tsx +12 -0
  247. package/src/components/ui/ToggleGroup.css +35 -0
  248. package/src/components/ui/ToggleGroup.tsx +30 -0
  249. package/src/components/ui/Toolbar.css +60 -0
  250. package/src/components/ui/Toolbar.tsx +36 -0
  251. package/src/components/ui/Tooltip.css +14 -0
  252. package/src/components/ui/Tooltip.tsx +31 -0
  253. package/src/components/ui/index.ts +83 -0
  254. package/src/components/ui/useDirection.ts +1 -0
  255. package/src/components/ui/useToastManager.ts +11 -0
  256. package/src/docs/blockMeta.json +66 -0
  257. package/src/docs/componentMeta.json +322 -0
  258. package/src/docs/staticPageMeta.json +143 -0
  259. package/src/docs/themeMeta.json +22 -0
  260. package/src/styles/tokenContract.json +61 -0
  261. package/workers/analytics-receiver.mjs +170 -0
  262. package/wrangler.analytics.jsonc +12 -0
@@ -1,32 +1,34 @@
1
1
  ---
2
2
  name: base-themes
3
- description: Install and extend the Base Themes React component kit built on Base UI primitives, with Bento, shadcn, and neo brutalism styles, blocks, theme tokens, and registry metadata. Use when adding Base Themes components, blocks, custom themes, or installation guidance to a React app.
3
+ description: Install, inspect, customize, and verify the Base Themes React component kit built on Base UI primitives. Use when adding Base Themes components, blocks, theme styles, registry/source-copy plans, or agent-safe UI customization to a React app.
4
4
  ---
5
5
 
6
6
  # Base Themes
7
7
 
8
- ## Quick Start
8
+ Base Themes is a package-first React component system built on `@base-ui/react`. It ships typed component wrappers, CSS token themes, 20 visual styles, product blocks, registry metadata, CLI helpers, and agent-readable docs.
9
9
 
10
- Install the package and peer dependencies in the target React app. Prefer this npm package flow for normal usage:
10
+ ## Prefer Package Installs
11
+
12
+ Install the package and peer dependencies in the target React app:
11
13
 
12
14
  ```bash
13
15
  npm install base-themes @base-ui/react react react-dom
14
16
  ```
15
17
 
16
- Import the styles once:
18
+ Import the bundled CSS once at app startup:
17
19
 
18
20
  ```tsx
19
21
  import 'base-themes/styles.css'
20
22
  ```
21
23
 
22
- Use a packaged component:
24
+ Render components inside a themed root. Use `data-style` for the visual system and `data-theme` for light or dark mode:
23
25
 
24
26
  ```tsx
25
27
  import { Button, Select } from 'base-themes'
26
28
 
27
- export function Example() {
29
+ export function SettingsPanel() {
28
30
  return (
29
- <div data-style="bento" data-theme="light">
31
+ <section data-style="bento" data-theme="light">
30
32
  <Button>Save changes</Button>
31
33
  <Select
32
34
  id="density"
@@ -34,83 +36,185 @@ export function Example() {
34
36
  defaultValue="comfortable"
35
37
  items={{ compact: 'Compact', comfortable: 'Comfortable', spacious: 'Spacious' }}
36
38
  />
37
- </div>
39
+ </section>
38
40
  )
39
41
  }
40
42
  ```
41
43
 
42
- Registry metadata is available from the package when an agent or script needs to inspect components, blocks, dependencies, or required files:
44
+ React 18.2+ and React 19 are supported by peer dependencies. The Vite, dashboard, and theme-customization examples build against React 18; the Next.js example builds against React 19.
45
+
46
+ ## Machine-Readable Metadata
47
+
48
+ Use package exports before scraping docs:
43
49
 
44
50
  ```ts
45
51
  import registry from 'base-themes/registry.json'
52
+ import shadcnRegistry from 'base-themes/shadcn-registry.json'
53
+ import buttonItem from 'base-themes/registry/items/button.json'
54
+ import blockMeta from 'base-themes/block-meta.json'
55
+ import componentMeta from 'base-themes/component-meta.json'
56
+ import staticPageMeta from 'base-themes/static-page-meta.json'
57
+ import themeMeta from 'base-themes/theme-meta.json'
58
+ import tokenContract from 'base-themes/token-contract.json'
46
59
  ```
47
60
 
48
- This skill markdown is included in the installed package at `node_modules/base-themes/skills/base-themes/SKILL.md` and exposed as `base-themes/skill` for tools that read package exports.
61
+ The same metadata is hosted when the docs site is deployed:
62
+
63
+ - `/registry/registry.json`
64
+ - `/registry/shadcn-registry.json`
65
+ - `/registry/items/button.json`
66
+ - `/registry/block-meta.json`
67
+ - `/registry/component-meta.json`
68
+ - `/registry/static-page-meta.json`
69
+ - `/registry/theme-meta.json`
70
+ - `/llms.txt`
71
+ - `/llms-full.txt`
72
+
73
+ This skill markdown is included at `node_modules/base-themes/skills/base-themes/SKILL.md` and exported as `base-themes/skill` for tools that read package exports.
49
74
 
50
- For source-copy installs only, copy the component wrappers and styles:
75
+ ## CLI Workflows
76
+
77
+ Use the CLI to inspect coverage, generate source-copy plans, and diagnose real apps:
51
78
 
52
79
  ```bash
53
- cp -R src/components/ui ./target-app/src/components/ui
54
- cp -R src/styles ./target-app/src/styles
80
+ npx base-themes list
81
+ npx base-themes list --json
82
+ npx base-themes plan button select block:dashboard-shell theme:enterprise
83
+ npx base-themes plan button select block:dashboard-shell theme:enterprise --json
84
+ npx base-themes add button select block:dashboard-shell theme:enterprise --target . --dry-run
85
+ npx base-themes add button select block:dashboard-shell theme:enterprise --target . --dry-run --json
86
+ npx base-themes doctor .
87
+ npx base-themes doctor . --json
55
88
  ```
56
89
 
57
- Import the tokens once from app CSS:
90
+ Use `base-themes/registry.json` for the internal source-copy manifest. Use `base-themes/shadcn-registry.json`, package item exports such as `base-themes/registry/items/button.json`, or hosted `/registry/items/*.json` when a shadcn-compatible catalog or item-level `meta.agent` guidance is more useful.
58
91
 
59
- ```css
60
- @import './styles/tokens.css';
61
- ```
92
+ Use `plan --json` before source-copying. It resolves package dependencies, all registry style files, block files, component files, available styles, missing names, package item imports such as `base-themes/registry/items/button.json`, hosted item URLs, block `meta.agent.registryItems`, theme `data-style` steps from requests such as `theme:enterprise`, and generated `meta.agent.packageInstall` / `meta.agent.sourceCopy` steps. The CLI is intentionally a planner, not a file copier; agents should make target paths, import rewrites, formatting, and lockfile changes explicitly in the destination app.
93
+
94
+ Use `add --dry-run --json` when the user explicitly wants source files copied from the package registry. `add` copies only registry-listed style, block, and component files into `--target`, skips existing files by default, and requires `--force` before overwriting. After copying, review imports and run the target app's formatter, lint, tests, and build.
62
95
 
63
- ## Workflows
96
+ Use `list --json` before choosing components, blocks, or themes. Use `doctor --json` after installation. It checks package dependencies, the `base-themes/styles.css` side-effect import, and `data-style` / `data-theme` wiring. WARN output includes concrete fixes, docs URLs, and bug-report guidance.
64
97
 
65
- ### Add A Component
98
+ Use `base-themes/token-contract.json` before generating theme overrides. The stable public customization surface is `data-style`, `data-theme`, and the `--bt-*` tokens; legacy variables without the prefix remain 0.x compatibility aliases.
66
99
 
67
- 1. For package installs, import the component from `base-themes` and import `base-themes/styles.css` once.
68
- 2. For source-copy installs, check `registry/registry.json` or `base-themes/registry.json` for the component entry.
69
- 3. Copy every file listed in the entry's `files` array.
70
- 4. Ensure `src/styles/tokens.css`, `src/styles/shadcn.css`, `src/styles/neo-brutalism.css`, and `src/styles/themes.css` are imported by the target app when source-copying.
71
- 5. Install dependencies from the registry `dependencies` array.
72
- 6. Import the component from `src/components/ui`.
100
+ ## Add Components
73
101
 
74
- ### Add A Block
102
+ 1. For package consumers, import components from `base-themes` and keep `base-themes/styles.css` imported once.
103
+ 2. For source-copy consumers, run `npx base-themes plan <component...>` or read `base-themes/registry.json`.
104
+ 3. Copy every file from the plan's component files and style files.
105
+ 4. Install dependencies from the plan.
106
+ 5. Preserve labels, focus behavior, disabled states, and keyboard interactions from the docs.
107
+ 6. Run registry, lint, test, build, and package smoke checks before returning the change.
75
108
 
76
- 1. Open `registry/registry.json` and find the block under `blocks`.
77
- 2. Copy the components listed in the block's `components` array.
78
- 3. Recreate the block layout from `/blocks` or adapt it into the target route.
79
- 4. Keep block styles token-based; avoid hard-coded one-off colors.
109
+ ## Add Blocks
80
110
 
81
- ### Customize Theme
111
+ 1. Run `npx base-themes plan block:<block-name>` to resolve block source and component dependencies.
112
+ 2. Copy the block files and required component files together.
113
+ 3. Keep block styles token-based and responsive; do not hard-code one-off colors when semantic tokens exist.
114
+ 4. Link users to `/blocks/<block-name>` or registry metadata when explaining what was copied.
82
115
 
83
- Override variables in `src/styles/tokens.css`, or add style-specific overrides under `[data-style='shadcn']` and `[data-style='neo-brutalism']`:
116
+ Useful block requests include:
117
+
118
+ ```bash
119
+ npx base-themes plan block:dashboard-shell
120
+ npx base-themes plan block:data-table
121
+ npx base-themes plan block:theme-showcase-card
122
+ ```
123
+
124
+ ## Customize Themes
125
+
126
+ Start from an existing `data-style` and override semantic CSS variables in app CSS. Avoid a JavaScript theme runtime unless the target app already has one.
84
127
 
85
128
  ```css
86
129
  :root {
87
- --bg: #f8fafc;
88
- --surface: #ffffff;
89
- --text-strong: #111827;
90
- --accent: #f97316;
130
+ --bt-primary: #2563eb;
131
+ --bt-secondary: #0f766e;
132
+ --bt-radius: 10px;
133
+ --bt-radius-sm: 8px;
134
+ --bt-font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
91
135
  }
92
136
 
93
137
  [data-theme='dark'] {
94
- --bg: #0b1120;
95
- --surface: #111827;
96
- --text-strong: #f1f5f9;
97
- --accent: #fb923c;
138
+ --bt-bg: #0b1120;
139
+ --bt-surface: #111827;
140
+ --bt-fg: #f8fafc;
141
+ --bt-primary: #60a5fa;
98
142
  }
99
143
  ```
100
144
 
145
+ For current 0.x builds, mirror a `--bt-*` override to the matching legacy token when the target component still reads the legacy variable directly, for example `--accent: var(--bt-primary)`.
146
+
147
+ Use `examples/theme-customization` when validating brand color, radius, font, density, and copyable CSS-variable workflows.
148
+
149
+ ## Runnable Examples
150
+
151
+ Use examples to verify real package integration paths:
152
+
153
+ ```bash
154
+ npm run example:vite:build
155
+ npm run example:dashboard:build
156
+ npm run example:theme-customization:build
157
+ npm run example:next:build
158
+ npm run example:registry-copy -- button select block:dashboard-shell theme:enterprise
159
+ npm run example:registry-copy -- plan button select block:dashboard-shell theme:enterprise --json
160
+ ```
161
+
162
+ Choose the example by question:
163
+
164
+ - `examples/vite`: fresh React 18 Vite install with package CSS, components, `useTheme`, and registry JSON.
165
+ - `examples/dashboard`: product dashboard composed from shipped blocks, controls, registry metadata, and theme switching.
166
+ - `examples/theme-customization`: token overrides for brand color, radius, font, density, and copyable variables.
167
+ - `examples/next`: Next.js App Router / React 19 integration.
168
+ - `examples/registry-copy`: CLI-aligned list, plan, add dry-run, and doctor proof for source-copy tools.
169
+
101
170
  ## Verification
102
171
 
103
- Run these checks after changing components, registry, blocks, or theme tokens:
172
+ Run these after changing package exports, components, registry, docs, blocks, theme tokens, examples, or agent workflow docs:
104
173
 
105
174
  ```bash
106
- node scripts/validate-registry.mjs
175
+ npm run registry:check
176
+ npm run tokens:check
107
177
  npm run lint
178
+ npm run test
108
179
  npm run build
180
+ npm run seo:check
181
+ npm run bundle:report
182
+ npm run bundle:report -- --json
183
+ npm run telemetry:check
184
+ npm run telemetry:check -- --live
185
+ npm run telemetry:fixtures
186
+ npm run launch:status
187
+ npm run launch:status -- --live
188
+ npm run launch:actions
189
+ npm run launch:actions -- --live
190
+ npm run launch:campaign
191
+ npm run package:smoke
192
+ ```
193
+
194
+ Run targeted checks when relevant:
195
+
196
+ ```bash
197
+ npm run community:check
198
+ npm run community:issues -- --json
199
+ npm run analytics:check
200
+ npm run telemetry:collect -- --json
201
+ npm run themes:e2e
202
+ npm run previews:check
203
+ npm run example:theme-customization:build
109
204
  ```
110
205
 
111
- Use the docs app for manual verification:
206
+ `themes:e2e` and `previews:check` require `agent-browser`. Use `npm run community:check` when editing issue templates, contributor seed issues, gallery wording, or `.github/labels.json`. Use `npm run community:issues` before announcements to render good-first issue URLs or GitHub CLI commands; it does not publish issues by itself.
207
+
208
+ Use `npm run telemetry:check` before claiming adoption progress. It validates the latest saved telemetry report: four public signals, a three-signal completion threshold, `externallyValidated` derived from the score, and no telemetry collection errors. Use `npm run telemetry:check -- --live` to validate a fresh no-write GitHub/npm collection. A release can be ready while adoption remains unvalidated.
209
+
210
+ Use `npm run telemetry:fixtures` when editing telemetry import logic or adoption docs. It imports bundled sanitized Search Console, website analytics, registry access, community proof, and bundle report exports from `research/telemetry-fixtures` so private-provider parsing stays covered without real credentials.
211
+
212
+ Use `npm run launch:status` after `npm run telemetry:collect` to read the latest telemetry JSON and summarize the public adoption score, missing signals, recommended good-first issue URLs, telemetry collection errors, supporting evidence, and next launch actions. Use `npm run launch:status -- --live` before external promotion when the latest saved report may be stale.
213
+
214
+ Use `npm run launch:actions` while the public adoption gate is still unmet. It converts missing star, fork, external issue/PR, or download signals into a concrete action list with links, commands, recommended good-first issue URLs, share assets, a promotion wave, and a campaign checklist. Use `npm run launch:actions -- --live` to build that action list from current GitHub/npm data without writing a telemetry report. Use `npm run launch:campaign` before external promotion to write the live campaign JSON and Markdown pack to `research/`.
215
+
216
+ Use `npm run bundle:report -- --json` when checking website performance budgets. It emits app JS, largest JS, total JS, gzip sizes, and budget results for CI or telemetry-style consumption. Import that output with `BUNDLE_REPORT_EXPORT=path/to/bundle-report.json npm run telemetry:collect` when comparing performance budgets with adoption-funnel telemetry.
217
+
218
+ ## Adoption Feedback
112
219
 
113
- - `/components/button` for component pages
114
- - `/blocks` for block examples
115
- - `/themes` for token customization
116
- - `/docs/installation` for install instructions
220
+ If installation, doctor, registry-copy, example, or customization flows fail in a real app, open the smallest useful GitHub signal: bug report with WARN output, feature request for a missing component/block/theme, or community gallery submission for real usage.
@@ -0,0 +1,29 @@
1
+ import { Button } from '../components/ui/Button'
2
+ import { Field } from '../components/ui/Field'
3
+ import { Input } from '../components/ui/Input'
4
+ import { Separator } from '../components/ui/Separator'
5
+ import { Switch } from '../components/ui/Switch'
6
+ import './Blocks.css'
7
+
8
+ export function AuthCard() {
9
+ return (
10
+ <section className="base-block" aria-label="Authentication card block">
11
+ <div>
12
+ <h2 className="base-block-title">Sign in to workspace</h2>
13
+ <p className="base-block-copy">A focused authentication card with remembered-device controls.</p>
14
+ </div>
15
+ <div className="base-block-form">
16
+ <Field label="Email">
17
+ <Input id="block-auth-email" type="email" placeholder="you@example.com" />
18
+ </Field>
19
+ <Field label="Password">
20
+ <Input id="block-auth-password" type="password" placeholder="Enter password" />
21
+ </Field>
22
+ <Switch id="block-auth-remember" label="Remember this device" />
23
+ <Button type="button">Continue</Button>
24
+ <Separator />
25
+ <Button type="button" variant="outline">Continue with SSO</Button>
26
+ </div>
27
+ </section>
28
+ )
29
+ }
@@ -0,0 +1,182 @@
1
+ .base-block {
2
+ display: grid;
3
+ gap: 16px;
4
+ padding: 18px;
5
+ border: 1px solid var(--bt-border);
6
+ border-radius: var(--bt-radius);
7
+ color: var(--bt-text);
8
+ background: var(--bt-surface);
9
+ box-shadow: var(--bt-shadow-strong);
10
+ }
11
+
12
+ .base-block-header,
13
+ .base-block-row,
14
+ .base-block-actions {
15
+ display: flex;
16
+ align-items: center;
17
+ gap: 12px;
18
+ }
19
+
20
+ .base-block-header,
21
+ .base-block-row {
22
+ justify-content: space-between;
23
+ }
24
+
25
+ .base-block-title {
26
+ margin: 0;
27
+ color: var(--bt-fg);
28
+ font-size: 16px;
29
+ font-weight: 760;
30
+ }
31
+
32
+ .base-block-copy {
33
+ margin: 4px 0 0;
34
+ color: var(--bt-muted-fg);
35
+ font-size: 13px;
36
+ line-height: 1.5;
37
+ }
38
+
39
+ .base-block-grid {
40
+ display: grid;
41
+ grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
42
+ gap: 12px;
43
+ }
44
+
45
+ .base-block-stat,
46
+ .base-block-panel,
47
+ .base-block-list-item {
48
+ padding: 12px;
49
+ border: 1px solid var(--bt-border);
50
+ border-radius: var(--bt-radius-sm);
51
+ background: var(--bt-surface-muted);
52
+ }
53
+
54
+ .base-block-stat strong,
55
+ .base-block-metric {
56
+ display: block;
57
+ color: var(--bt-fg);
58
+ font-size: 24px;
59
+ font-weight: 780;
60
+ }
61
+
62
+ .base-block-stat span,
63
+ .base-block-muted {
64
+ color: var(--bt-muted-fg);
65
+ font-size: 12px;
66
+ }
67
+
68
+ .base-block-list {
69
+ display: grid;
70
+ gap: 10px;
71
+ }
72
+
73
+ .base-block-list-item {
74
+ display: flex;
75
+ align-items: center;
76
+ justify-content: space-between;
77
+ gap: 12px;
78
+ }
79
+
80
+ .base-block-list-main {
81
+ min-width: 0;
82
+ }
83
+
84
+ .base-block-list-main strong {
85
+ display: block;
86
+ overflow: hidden;
87
+ color: var(--bt-fg);
88
+ font-size: 14px;
89
+ text-overflow: ellipsis;
90
+ white-space: nowrap;
91
+ }
92
+
93
+ .base-block-list-main span {
94
+ display: block;
95
+ margin-top: 2px;
96
+ color: var(--bt-muted-fg);
97
+ font-size: 12px;
98
+ }
99
+
100
+ .base-block-table {
101
+ width: 100%;
102
+ border-collapse: collapse;
103
+ overflow: hidden;
104
+ border: 1px solid var(--bt-border);
105
+ border-radius: var(--bt-radius-sm);
106
+ font-size: 13px;
107
+ }
108
+
109
+ .base-block-table th,
110
+ .base-block-table td {
111
+ padding: 10px 12px;
112
+ border-bottom: 1px solid var(--bt-border);
113
+ text-align: left;
114
+ }
115
+
116
+ .base-block-table th {
117
+ color: var(--bt-muted-fg);
118
+ background: var(--bt-surface-muted);
119
+ font-size: 12px;
120
+ font-weight: 720;
121
+ }
122
+
123
+ .base-block-table td {
124
+ color: var(--bt-text);
125
+ }
126
+
127
+ .base-block-table tr:last-child td {
128
+ border-bottom: 0;
129
+ }
130
+
131
+ .base-block-pill {
132
+ display: inline-flex;
133
+ align-items: center;
134
+ min-height: 22px;
135
+ padding: 0 8px;
136
+ border: 1px solid var(--bt-border);
137
+ border-radius: 999px;
138
+ color: var(--bt-fg);
139
+ background: var(--bt-surface);
140
+ font-size: 12px;
141
+ font-weight: 700;
142
+ }
143
+
144
+ .base-block-form {
145
+ display: grid;
146
+ gap: 12px;
147
+ }
148
+
149
+ .base-block-split {
150
+ display: grid;
151
+ grid-template-columns: minmax(0, 1fr) auto;
152
+ gap: 16px;
153
+ align-items: start;
154
+ }
155
+
156
+ .base-block-price {
157
+ color: var(--bt-fg);
158
+ font-size: 30px;
159
+ font-weight: 820;
160
+ }
161
+
162
+ .base-block-price span {
163
+ color: var(--bt-muted-fg);
164
+ font-size: 13px;
165
+ font-weight: 600;
166
+ }
167
+
168
+ @media (max-width: 640px) {
169
+ .base-block-header,
170
+ .base-block-row,
171
+ .base-block-actions,
172
+ .base-block-list-item,
173
+ .base-block-split {
174
+ align-items: stretch;
175
+ flex-direction: column;
176
+ grid-template-columns: 1fr;
177
+ }
178
+
179
+ .base-block-actions {
180
+ display: grid;
181
+ }
182
+ }
@@ -0,0 +1,32 @@
1
+ import { Button } from '../components/ui/Button'
2
+ import { Combobox } from '../components/ui/Combobox'
3
+ import './Blocks.css'
4
+
5
+ const commands = [
6
+ { value: 'create-theme', label: 'Create theme' },
7
+ { value: 'open-registry', label: 'Open registry' },
8
+ { value: 'view-components', label: 'View components' },
9
+ ]
10
+
11
+ export function CommandPaletteBlock() {
12
+ return (
13
+ <section className="base-block" aria-label="Command palette block">
14
+ <div>
15
+ <h2 className="base-block-title">Command Palette</h2>
16
+ <p className="base-block-copy">A quick-action panel for product navigation, search, and agent-oriented commands.</p>
17
+ </div>
18
+ <Combobox label="Jump to" placeholder="Search commands..." options={commands} />
19
+ <div className="base-block-list">
20
+ {commands.map((command) => (
21
+ <div className="base-block-list-item" key={command.value}>
22
+ <div className="base-block-list-main">
23
+ <strong>{command.label}</strong>
24
+ <span>{command.value}</span>
25
+ </div>
26
+ <Button type="button" variant="ghost">Run</Button>
27
+ </div>
28
+ ))}
29
+ </div>
30
+ </section>
31
+ )
32
+ }
@@ -0,0 +1,36 @@
1
+ import { Button } from '../components/ui/Button'
2
+ import { Meter } from '../components/ui/Meter'
3
+ import { Progress } from '../components/ui/Progress'
4
+ import './Blocks.css'
5
+
6
+ const stats = [
7
+ { label: 'Revenue', value: '$48.2k' },
8
+ { label: 'Active seats', value: '1,248' },
9
+ { label: 'Deploys', value: '36' },
10
+ ]
11
+
12
+ export function DashboardShell() {
13
+ return (
14
+ <section className="base-block" aria-label="Dashboard shell block">
15
+ <div className="base-block-header">
16
+ <div>
17
+ <h2 className="base-block-title">Operations Dashboard</h2>
18
+ <p className="base-block-copy">A compact dashboard header with metrics, progress, and a primary action.</p>
19
+ </div>
20
+ <Button variant="outline">Export</Button>
21
+ </div>
22
+ <div className="base-block-grid">
23
+ {stats.map((stat) => (
24
+ <div className="base-block-stat" key={stat.label}>
25
+ <strong>{stat.value}</strong>
26
+ <span>{stat.label}</span>
27
+ </div>
28
+ ))}
29
+ </div>
30
+ <div className="base-block-panel">
31
+ <Progress value={72} showValue aria-label="Quarterly target" />
32
+ </div>
33
+ <Meter value={84} showValue aria-label="System health" />
34
+ </section>
35
+ )
36
+ }
@@ -0,0 +1,44 @@
1
+ import { Button } from '../components/ui/Button'
2
+ import { Select } from '../components/ui/Select'
3
+ import './Blocks.css'
4
+
5
+ const statusItems = {
6
+ all: 'All statuses',
7
+ active: 'Active',
8
+ pending: 'Pending',
9
+ }
10
+
11
+ const rows = [
12
+ { project: 'Checkout refresh', owner: 'Ava', status: 'Active' },
13
+ { project: 'Theme QA', owner: 'Mina', status: 'Pending' },
14
+ { project: 'Registry docs', owner: 'Noah', status: 'Active' },
15
+ ]
16
+
17
+ export function DataTableBlock() {
18
+ return (
19
+ <section className="base-block" aria-label="Data table block">
20
+ <div className="base-block-header">
21
+ <div>
22
+ <h2 className="base-block-title">Projects</h2>
23
+ <p className="base-block-copy">A small operational table with filters and row status badges.</p>
24
+ </div>
25
+ <Select id="block-project-status" defaultValue="all" items={statusItems} />
26
+ </div>
27
+ <table className="base-block-table">
28
+ <thead>
29
+ <tr><th>Project</th><th>Owner</th><th>Status</th></tr>
30
+ </thead>
31
+ <tbody>
32
+ {rows.map((row) => (
33
+ <tr key={row.project}>
34
+ <td>{row.project}</td>
35
+ <td>{row.owner}</td>
36
+ <td><span className="base-block-pill">{row.status}</span></td>
37
+ </tr>
38
+ ))}
39
+ </tbody>
40
+ </table>
41
+ <Button type="button" variant="outline">View all projects</Button>
42
+ </section>
43
+ )
44
+ }
@@ -0,0 +1,28 @@
1
+ import { Button } from '../components/ui/Button'
2
+ import { Checkbox } from '../components/ui/Checkbox'
3
+ import './Blocks.css'
4
+
5
+ const features = ['Unlimited themes', 'Registry metadata', 'Agent workflow docs']
6
+
7
+ export function PricingPanel() {
8
+ return (
9
+ <section className="base-block" aria-label="Pricing panel block">
10
+ <div className="base-block-split">
11
+ <div>
12
+ <h2 className="base-block-title">Team plan</h2>
13
+ <p className="base-block-copy">A compact pricing panel for SaaS settings, upgrade, or billing screens.</p>
14
+ </div>
15
+ <div className="base-block-price">$29<span>/seat</span></div>
16
+ </div>
17
+ <div className="base-block-list">
18
+ {features.map((feature) => (
19
+ <div className="base-block-list-item" key={feature}>
20
+ <Checkbox defaultChecked aria-label={feature} />
21
+ <div className="base-block-list-main"><strong>{feature}</strong></div>
22
+ </div>
23
+ ))}
24
+ </div>
25
+ <Button type="button">Upgrade plan</Button>
26
+ </section>
27
+ )
28
+ }
@@ -0,0 +1,37 @@
1
+ import { Button } from '../components/ui/Button'
2
+ import { Field } from '../components/ui/Field'
3
+ import { Fieldset } from '../components/ui/Fieldset'
4
+ import { Input } from '../components/ui/Input'
5
+ import { Select } from '../components/ui/Select'
6
+ import { Switch } from '../components/ui/Switch'
7
+ import './Blocks.css'
8
+
9
+ const densityItems = {
10
+ compact: 'Compact',
11
+ comfortable: 'Comfortable',
12
+ spacious: 'Spacious',
13
+ }
14
+
15
+ export function SettingsForm() {
16
+ return (
17
+ <section className="base-block" aria-label="Settings form block">
18
+ <div>
19
+ <h2 className="base-block-title">Workspace Settings</h2>
20
+ <p className="base-block-copy">A production-style settings form for team preferences and workspace defaults.</p>
21
+ </div>
22
+ <Fieldset legend="Workspace">
23
+ <div className="base-block-form">
24
+ <Field label="Workspace name" description="Visible to invited team members.">
25
+ <Input id="block-workspace-name" defaultValue="Product Operations" />
26
+ </Field>
27
+ <Select id="block-density" label="Interface density" defaultValue="comfortable" items={densityItems} />
28
+ <Switch id="block-weekly-summary" defaultChecked label="Send weekly summary" />
29
+ <div className="base-block-actions">
30
+ <Button type="button">Save settings</Button>
31
+ <Button type="button" variant="outline">Cancel</Button>
32
+ </div>
33
+ </div>
34
+ </Fieldset>
35
+ </section>
36
+ )
37
+ }