base-themes 0.1.1 → 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 (282) 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 +324 -5
  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/public/previews/base-themes-bauhaus.png +0 -0
  86. package/public/previews/base-themes-bento.png +0 -0
  87. package/public/previews/base-themes-calm.png +0 -0
  88. package/public/previews/base-themes-cyberpunk.png +0 -0
  89. package/public/previews/base-themes-data-dense.png +0 -0
  90. package/public/previews/base-themes-editorial.png +0 -0
  91. package/public/previews/base-themes-enterprise.png +0 -0
  92. package/public/previews/base-themes-fluent.png +0 -0
  93. package/public/previews/base-themes-glass.png +0 -0
  94. package/public/previews/base-themes-linear.png +0 -0
  95. package/public/previews/base-themes-luxury.png +0 -0
  96. package/public/previews/base-themes-material.png +0 -0
  97. package/public/previews/base-themes-minimal.png +0 -0
  98. package/public/previews/base-themes-mono.png +0 -0
  99. package/public/previews/base-themes-neo-brutalism.png +0 -0
  100. package/public/previews/base-themes-playful.png +0 -0
  101. package/public/previews/base-themes-retro.png +0 -0
  102. package/public/previews/base-themes-shadcn.png +0 -0
  103. package/public/previews/base-themes-soft-ui.png +0 -0
  104. package/public/previews/base-themes-terminal.png +0 -0
  105. package/registry/items/accordion.json +101 -0
  106. package/registry/items/alert-dialog.json +107 -0
  107. package/registry/items/autocomplete.json +106 -0
  108. package/registry/items/avatar.json +101 -0
  109. package/registry/items/block-auth-card.json +105 -0
  110. package/registry/items/block-command-palette.json +99 -0
  111. package/registry/items/block-dashboard-shell.json +101 -0
  112. package/registry/items/block-data-table.json +99 -0
  113. package/registry/items/block-pricing-panel.json +99 -0
  114. package/registry/items/block-settings-form.json +107 -0
  115. package/registry/items/block-team-activity-feed.json +99 -0
  116. package/registry/items/block-theme-showcase-card.json +99 -0
  117. package/registry/items/button.json +102 -0
  118. package/registry/items/checkbox-group.json +106 -0
  119. package/registry/items/checkbox.json +102 -0
  120. package/registry/items/collapsible.json +101 -0
  121. package/registry/items/combobox.json +101 -0
  122. package/registry/items/context-menu.json +106 -0
  123. package/registry/items/csp-provider.json +96 -0
  124. package/registry/items/dialog.json +102 -0
  125. package/registry/items/direction-provider.json +101 -0
  126. package/registry/items/drawer.json +101 -0
  127. package/registry/items/field.json +101 -0
  128. package/registry/items/fieldset.json +101 -0
  129. package/registry/items/form.json +101 -0
  130. package/registry/items/input.json +102 -0
  131. package/registry/items/menu.json +101 -0
  132. package/registry/items/menubar.json +106 -0
  133. package/registry/items/meter.json +101 -0
  134. package/registry/items/navigation-menu.json +101 -0
  135. package/registry/items/number-field.json +101 -0
  136. package/registry/items/otp-field.json +101 -0
  137. package/registry/items/popover.json +102 -0
  138. package/registry/items/preview-card.json +101 -0
  139. package/registry/items/progress.json +101 -0
  140. package/registry/items/radio-group.json +102 -0
  141. package/registry/items/radio.json +101 -0
  142. package/registry/items/scroll-area.json +101 -0
  143. package/registry/items/select.json +102 -0
  144. package/registry/items/separator.json +101 -0
  145. package/registry/items/slider.json +102 -0
  146. package/registry/items/switch.json +102 -0
  147. package/registry/items/tabs.json +101 -0
  148. package/registry/items/theme-bauhaus.json +107 -0
  149. package/registry/items/theme-bento.json +107 -0
  150. package/registry/items/theme-calm.json +107 -0
  151. package/registry/items/theme-cyberpunk.json +108 -0
  152. package/registry/items/theme-data-dense.json +107 -0
  153. package/registry/items/theme-editorial.json +107 -0
  154. package/registry/items/theme-enterprise.json +108 -0
  155. package/registry/items/theme-fluent.json +107 -0
  156. package/registry/items/theme-glass.json +107 -0
  157. package/registry/items/theme-linear.json +107 -0
  158. package/registry/items/theme-luxury.json +107 -0
  159. package/registry/items/theme-material.json +107 -0
  160. package/registry/items/theme-minimal.json +107 -0
  161. package/registry/items/theme-mono.json +107 -0
  162. package/registry/items/theme-neo-brutalism.json +107 -0
  163. package/registry/items/theme-playful.json +107 -0
  164. package/registry/items/theme-retro.json +107 -0
  165. package/registry/items/theme-shadcn.json +107 -0
  166. package/registry/items/theme-soft-ui.json +107 -0
  167. package/registry/items/theme-terminal.json +107 -0
  168. package/registry/items/toast.json +106 -0
  169. package/registry/items/toggle-group.json +101 -0
  170. package/registry/items/toggle.json +101 -0
  171. package/registry/items/toolbar.json +101 -0
  172. package/registry/items/tooltip.json +102 -0
  173. package/registry/registry.json +564 -49
  174. package/registry/shadcn-registry.json +415 -0
  175. package/research/telemetry-fixtures/analytics-events.jsonl +9 -0
  176. package/research/telemetry-fixtures/bundle-report.json +44 -0
  177. package/research/telemetry-fixtures/community-proof.csv +5 -0
  178. package/research/telemetry-fixtures/registry-access.jsonl +10 -0
  179. package/research/telemetry-fixtures/search-console-export.csv +4 -0
  180. package/scripts/registry-plan.mjs +434 -0
  181. package/scripts/render-launch-actions.mjs +405 -0
  182. package/scripts/render-launch-status.mjs +373 -0
  183. package/scripts/render-release-announcement.mjs +329 -0
  184. package/scripts/verify-launch-readiness.mjs +415 -0
  185. package/scripts/verify-telemetry-fixtures.mjs +85 -0
  186. package/scripts/verify-telemetry-report.mjs +89 -0
  187. package/skills/base-themes/SKILL.md +156 -43
  188. package/src/blocks/AuthCard.tsx +29 -0
  189. package/src/blocks/Blocks.css +182 -0
  190. package/src/blocks/CommandPaletteBlock.tsx +32 -0
  191. package/src/blocks/DashboardShell.tsx +36 -0
  192. package/src/blocks/DataTableBlock.tsx +44 -0
  193. package/src/blocks/PricingPanel.tsx +28 -0
  194. package/src/blocks/SettingsForm.tsx +37 -0
  195. package/src/blocks/TeamActivityFeed.tsx +38 -0
  196. package/src/blocks/ThemeShowcaseCard.tsx +32 -0
  197. package/src/blocks/index.ts +8 -0
  198. package/src/components/ui/Accordion.css +42 -0
  199. package/src/components/ui/Accordion.tsx +41 -0
  200. package/src/components/ui/AlertDialog.css +40 -0
  201. package/src/components/ui/AlertDialog.tsx +52 -0
  202. package/src/components/ui/Autocomplete.css +3 -0
  203. package/src/components/ui/Autocomplete.tsx +50 -0
  204. package/src/components/ui/Avatar.css +45 -0
  205. package/src/components/ui/Avatar.tsx +36 -0
  206. package/src/components/ui/Button.css +79 -0
  207. package/src/components/ui/Button.tsx +20 -0
  208. package/src/components/ui/Checkbox.css +37 -0
  209. package/src/components/ui/Checkbox.tsx +32 -0
  210. package/src/components/ui/CheckboxGroup.tsx +21 -0
  211. package/src/components/ui/Collapsible.css +34 -0
  212. package/src/components/ui/Collapsible.tsx +29 -0
  213. package/src/components/ui/Combobox.css +75 -0
  214. package/src/components/ui/Combobox.tsx +53 -0
  215. package/src/components/ui/ContextMenu.css +9 -0
  216. package/src/components/ui/ContextMenu.tsx +47 -0
  217. package/src/components/ui/CspProvider.tsx +10 -0
  218. package/src/components/ui/Dialog.css +41 -0
  219. package/src/components/ui/Dialog.tsx +45 -0
  220. package/src/components/ui/DirectionProvider.tsx +17 -0
  221. package/src/components/ui/Drawer.css +77 -0
  222. package/src/components/ui/Drawer.tsx +56 -0
  223. package/src/components/ui/Field.css +19 -0
  224. package/src/components/ui/Field.tsx +24 -0
  225. package/src/components/ui/Fieldset.css +16 -0
  226. package/src/components/ui/Fieldset.tsx +19 -0
  227. package/src/components/ui/Form.css +5 -0
  228. package/src/components/ui/Form.tsx +12 -0
  229. package/src/components/ui/Input.css +50 -0
  230. package/src/components/ui/Input.tsx +62 -0
  231. package/src/components/ui/Menu.css +59 -0
  232. package/src/components/ui/Menu.tsx +50 -0
  233. package/src/components/ui/Menubar.css +26 -0
  234. package/src/components/ui/Menubar.tsx +42 -0
  235. package/src/components/ui/Meter.css +45 -0
  236. package/src/components/ui/Meter.tsx +37 -0
  237. package/src/components/ui/NavigationMenu.css +103 -0
  238. package/src/components/ui/NavigationMenu.tsx +64 -0
  239. package/src/components/ui/NumberField.css +38 -0
  240. package/src/components/ui/NumberField.tsx +28 -0
  241. package/src/components/ui/OtpField.css +28 -0
  242. package/src/components/ui/OtpField.tsx +24 -0
  243. package/src/components/ui/Popover.css +25 -0
  244. package/src/components/ui/Popover.tsx +37 -0
  245. package/src/components/ui/PreviewCard.css +33 -0
  246. package/src/components/ui/PreviewCard.tsx +43 -0
  247. package/src/components/ui/Progress.css +33 -0
  248. package/src/components/ui/Progress.tsx +28 -0
  249. package/src/components/ui/Radio.tsx +22 -0
  250. package/src/components/ui/RadioGroup.css +42 -0
  251. package/src/components/ui/RadioGroup.tsx +29 -0
  252. package/src/components/ui/ScrollArea.css +42 -0
  253. package/src/components/ui/ScrollArea.tsx +22 -0
  254. package/src/components/ui/Select.css +86 -0
  255. package/src/components/ui/Select.tsx +39 -0
  256. package/src/components/ui/Separator.css +14 -0
  257. package/src/components/ui/Separator.tsx +12 -0
  258. package/src/components/ui/Slider.css +39 -0
  259. package/src/components/ui/Slider.tsx +21 -0
  260. package/src/components/ui/Switch.css +45 -0
  261. package/src/components/ui/Switch.tsx +29 -0
  262. package/src/components/ui/Tabs.css +72 -0
  263. package/src/components/ui/Tabs.tsx +44 -0
  264. package/src/components/ui/Toast.css +75 -0
  265. package/src/components/ui/Toast.tsx +48 -0
  266. package/src/components/ui/Toggle.tsx +12 -0
  267. package/src/components/ui/ToggleGroup.css +35 -0
  268. package/src/components/ui/ToggleGroup.tsx +30 -0
  269. package/src/components/ui/Toolbar.css +60 -0
  270. package/src/components/ui/Toolbar.tsx +36 -0
  271. package/src/components/ui/Tooltip.css +14 -0
  272. package/src/components/ui/Tooltip.tsx +31 -0
  273. package/src/components/ui/index.ts +83 -0
  274. package/src/components/ui/useDirection.ts +1 -0
  275. package/src/components/ui/useToastManager.ts +11 -0
  276. package/src/docs/blockMeta.json +66 -0
  277. package/src/docs/componentMeta.json +322 -0
  278. package/src/docs/staticPageMeta.json +143 -0
  279. package/src/docs/themeMeta.json +22 -0
  280. package/src/styles/tokenContract.json +61 -0
  281. package/workers/analytics-receiver.mjs +170 -0
  282. package/wrangler.analytics.jsonc +12 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to `base-themes` should be documented here.
4
+
5
+ This project follows semantic versioning before `1.0.0` with extra care: minor versions may still include breaking changes, but every breaking API, token, CSS class, registry schema, or peer dependency change must be called out in release notes.
6
+
7
+ ## Unreleased
8
+
9
+ ## 0.1.3 - 2026-06-01
10
+
11
+ - Added release announcement and adoption-measurement kit with GitHub release copy, social drafts, shareable routes, calls to action, telemetry schedule, and external validation thresholds.
12
+ - Added adoption dashboard that separates release readiness from public user-willingness evidence and records the current adoption gate.
13
+ - Added contributor issue seeds for publishing adoption-focused good-first issues around docs, accessibility, theme customization, registry planning, blocks, and gallery submissions.
14
+ - Added optional privacy-light analytics receiver and setup guide for measuring docs funnel events after release announcements.
15
+ - Added landing page community calls to action for GitHub stars, feature requests, and gallery submissions with outbound analytics source/target properties.
16
+ - Added hosted registry artifacts under `/registry/registry.json`, `/registry/component-meta.json`, and `/registry/theme-meta.json` for HTTPS-based tool and agent consumption.
17
+ - Added generated `/llms.txt` discovery file for AI and agent tools to find install, registry, CLI, component, theme, and block entry points.
18
+ - Added CLI package surface with `base-themes list`, `base-themes plan`, and `base-themes doctor` for registry discovery, source-copy planning, and integration checks.
19
+ - Expanded registry-backed docs and SEO coverage across installation, positioning, comparison, tokens, accessibility, migration, design handoff, theming, theme customization, registry, CLI, agent usage, contribution, component, theme, and block routes.
20
+ - Added package-source blocks, block detail routes, and block registry entries for dashboard, settings, auth, pricing, data table, command palette, activity feed, and theme showcase workflows.
21
+ - Added Vite, Next.js, and registry-copy examples that exercise the public package surface.
22
+ - Added package smoke, SEO coverage, axe accessibility, theme e2e, and preview screenshot-diff checks for release confidence.
23
+ - Added telemetry collection for public GitHub and npm adoption signals, with explicit gaps for GitHub traffic, website analytics, Search Console, and registry usage.
24
+ - Added open-source readiness documentation: contributing guide, security policy, code of conduct, release checklist, issue templates, PR template, and Dependabot configuration.
25
+ - Updated project GitHub CTAs to point at `markbang/base-themes` while keeping Base UI as the upstream documentation reference.
@@ -0,0 +1,22 @@
1
+ # Code of Conduct
2
+
3
+ Base Themes uses the [Contributor Covenant](https://www.contributor-covenant.org/) as the baseline for project participation.
4
+
5
+ ## Expected Behavior
6
+
7
+ - Be respectful and direct.
8
+ - Assume good intent while still asking for clear evidence.
9
+ - Keep technical discussions focused on the work.
10
+ - Make contribution feedback actionable.
11
+ - Credit upstream projects such as Base UI and related ecosystem work.
12
+
13
+ ## Unacceptable Behavior
14
+
15
+ - Harassment, threats, insults, or discriminatory language.
16
+ - Publishing private information without permission.
17
+ - Repeated off-topic disruption.
18
+ - Bad-faith vulnerability reports or spam.
19
+
20
+ ## Enforcement
21
+
22
+ Maintainers may edit, hide, or remove comments; close issues; block users; or report severe behavior to GitHub. Security-sensitive issues should follow [SECURITY.md](./SECURITY.md).
@@ -0,0 +1,98 @@
1
+ # Contributing to base-themes
2
+
3
+ Thanks for helping improve Base Themes. The project is a Base UI-first React component library with CSS token themes, registry metadata, docs, and agent-friendly workflows. Contributions should keep those surfaces in sync.
4
+
5
+ ## Local Setup
6
+
7
+ ```bash
8
+ npm install
9
+ npm run dev
10
+ ```
11
+
12
+ Useful routes while developing:
13
+
14
+ ```text
15
+ http://localhost:5175/components/button
16
+ http://localhost:5175/themes
17
+ http://localhost:5175/blocks
18
+ http://localhost:5175/docs/installation
19
+ ```
20
+
21
+ ## Required Checks
22
+
23
+ Run these before opening a pull request:
24
+
25
+ ```bash
26
+ npm run registry:check
27
+ npm run lint
28
+ npm run build
29
+ npm run bundle:report
30
+ npm run package:smoke
31
+ npm run community:check
32
+ npm run example:vite:build
33
+ npm run example:dashboard:build
34
+ npm run example:theme-customization:build
35
+ npm run example:next:build
36
+ npm run example:registry-copy -- button select dialog
37
+ ```
38
+
39
+ Run these when changing theme tokens, component styles, or previews:
40
+
41
+ ```bash
42
+ npm run themes:e2e
43
+ npm run previews:generate
44
+ ```
45
+
46
+ `themes:e2e` and `previews:generate` require `agent-browser` in the local environment.
47
+
48
+ ## Contribution Paths
49
+
50
+ ### Add or Change a Component
51
+
52
+ - Add or update `src/components/ui/<Name>.tsx`.
53
+ - Add or update the matching CSS file when the component needs styles.
54
+ - Export the component and public types from `src/components/ui/index.ts`.
55
+ - Add or update docs examples in the docs app.
56
+ - Update `registry/registry.json` with required files and dependencies.
57
+ - Run `npm run registry:check`, `npm run lint`, and `npm run build`.
58
+
59
+ ### Add or Change a Theme Style
60
+
61
+ - Update `src/styles/themeList.ts` when adding a new style.
62
+ - Add token overrides in `src/styles/tokens.css` and derived behavior in `src/styles/themes.css` when needed.
63
+ - Verify both `data-theme="light"` and `data-theme="dark"`.
64
+ - Update `registry/registry.json` theme variants.
65
+ - Regenerate preview assets with `npm run previews:generate` when visuals change.
66
+ - Run `npm run themes:e2e` before release-level changes.
67
+
68
+ ### Add a Block
69
+
70
+ - Build the block from existing Base Themes components.
71
+ - Keep the block responsive and keyboard-accessible.
72
+ - Add a docs preview and copyable usage example.
73
+ - Add a registry entry with component dependencies and source files.
74
+ - Include a screenshot or preview asset when the block is intended for discovery.
75
+
76
+ ### Improve Docs
77
+
78
+ - Keep installation snippets runnable in a fresh app.
79
+ - Keep component docs, registry entries, and source exports in sync.
80
+ - Prefer concrete examples over marketing copy.
81
+ - If a docs route should be indexed, make sure the SEO generation path covers it.
82
+
83
+ ## Pull Request Expectations
84
+
85
+ - Keep changes focused on one component, theme, block, or docs area.
86
+ - Include screenshots for visual changes.
87
+ - Mention which checks were run.
88
+ - Call out registry schema changes, token changes, or breaking API changes explicitly.
89
+
90
+ ## Issues and Labels
91
+
92
+ The public issue workflow uses [.github/labels.json](./.github/labels.json) as the label vocabulary for bugs, features, docs, themes, components, blocks, registry work, accessibility, performance, good-first issues, and community gallery submissions.
93
+
94
+ Run `npm run community:check` when changing issue templates, PR templates, contributor seed issues, or the label manifest. The check keeps `.github/ISSUE_TEMPLATE/*`, [docs/contributor-issue-seeds.md](./docs/contributor-issue-seeds.md), and gallery permission language aligned so first-time contributors see a consistent path from issue to PR.
95
+
96
+ ## Release Discipline
97
+
98
+ Releases should follow [RELEASE.md](./RELEASE.md). Public package trust matters: registry validation, reproducible builds, npm provenance, and clear release notes are part of the product.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Bang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,9 +1,75 @@
1
1
  # base-themes
2
2
 
3
+ [![CI](https://github.com/markbang/base-themes/actions/workflows/ci.yml/badge.svg)](https://github.com/markbang/base-themes/actions/workflows/ci.yml)
4
+ [![npm provenance](https://img.shields.io/badge/npm-provenance-0a7)](https://docs.npmjs.com/generating-provenance-statements)
5
+ [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
6
+
3
7
  Themeable React components built on [Base UI](https://base-ui.com/), with ready-to-use Bento, shadcn, neo brutalism, and broader product UI visual styles.
4
8
 
5
9
  `base-themes` gives you typed component wrappers, shared CSS tokens, shadcn/ui-style component docs, installable registry metadata, and block examples.
6
10
 
11
+ React support: React 18.2+ and React 19 are supported through peer dependencies. The Vite, dashboard, and theme-customization examples build against React 18, and the Next.js example builds against React 19.
12
+
13
+ ## Why Base Themes
14
+
15
+ - **Base UI-first:** accessible behavior, focus management, keyboard interaction, and overlay primitives come from `@base-ui/react`.
16
+ - **CSS-token themes:** switch visual systems through `data-style` and `data-theme` without a heavy JavaScript theme runtime.
17
+ - **20 curated styles:** Bento, shadcn, enterprise, terminal, glass, data-dense, luxury, mono, and more.
18
+ - **Registry-ready:** components, blocks, pages, files, dependencies, and theme variants are discoverable through `base-themes/registry.json`.
19
+ - **Agent-friendly:** the package includes `base-themes/skill` so coding agents can install, inspect, customize, and verify changes consistently.
20
+
21
+ Project links:
22
+
23
+ - Repository: <https://github.com/markbang/base-themes>
24
+ - Issues: <https://github.com/markbang/base-themes/issues>
25
+ - Upstream primitives: <https://base-ui.com/>
26
+
27
+ ## Quick Start
28
+
29
+ ```bash
30
+ npm install base-themes @base-ui/react react react-dom
31
+ ```
32
+
33
+ ```tsx
34
+ import 'base-themes/styles.css'
35
+ import { Button } from 'base-themes'
36
+
37
+ export function App() {
38
+ return (
39
+ <main data-style="bento" data-theme="light">
40
+ <Button>Ship it</Button>
41
+ </main>
42
+ )
43
+ }
44
+ ```
45
+
46
+ After trying it in a real app, leave the smallest useful public signal:
47
+
48
+ - Star the repo: <https://github.com/markbang/base-themes>
49
+ - Fork and try a theme, block, or docs change: <https://github.com/markbang/base-themes/fork>
50
+ - Share what worked or what was missing: <https://github.com/markbang/base-themes/discussions/new?category=show-and-tell>
51
+ - Request the component, block, or theme that would make it usable: <https://github.com/markbang/base-themes/issues/new?template=feature_request.yml>
52
+ - Submit a real screenshot or repository for the future gallery: <https://github.com/markbang/base-themes/issues/new?template=gallery_submission.yml>
53
+
54
+ ## Fork-To-First-Change
55
+
56
+ If you want to test whether Base Themes fits your product, fork the repo and make one visible change before opening an issue or PR:
57
+
58
+ ```bash
59
+ git clone https://github.com/<your-user>/base-themes.git
60
+ cd base-themes
61
+ npm install
62
+ npm run example:theme-customization:build
63
+ npm run example:registry-copy -- plan button select block:dashboard-shell theme:enterprise --json
64
+ npm run package:smoke
65
+ ```
66
+
67
+ Good first fork experiments:
68
+
69
+ - Change a few brand tokens in `examples/theme-customization/src/App.tsx`, then submit a gallery issue with the result if it maps to a real app.
70
+ - Adapt one block in `src/blocks` or `examples/dashboard/src/App.tsx`, then open a Show and tell Discussion with what was missing.
71
+ - Run `npm run community:issues` and comment on one good-first issue before opening a focused PR.
72
+
7
73
  ## Preview
8
74
 
9
75
  | Theme | Preview |
@@ -35,12 +101,18 @@ Themeable React components built on [Base UI](https://base-ui.com/), with ready-
35
101
  npm install base-themes @base-ui/react react react-dom
36
102
  ```
37
103
 
38
- Import the component CSS once:
104
+ Import the bundled CSS once at app startup:
39
105
 
40
106
  ```tsx
41
107
  import 'base-themes/styles.css'
42
108
  ```
43
109
 
110
+ Strict TypeScript projects may need a CSS side-effect declaration:
111
+
112
+ ```ts
113
+ declare module 'base-themes/styles.css'
114
+ ```
115
+
44
116
  Use components:
45
117
 
46
118
  ```tsx
@@ -124,24 +196,104 @@ The package includes a shadcn/ui-style registry:
124
196
 
125
197
  ```ts
126
198
  import registry from 'base-themes/registry.json'
199
+ import shadcnRegistry from 'base-themes/shadcn-registry.json'
200
+ import buttonItem from 'base-themes/registry/items/button.json'
201
+ import blockMeta from 'base-themes/block-meta.json'
202
+ import componentMeta from 'base-themes/component-meta.json'
203
+ import staticPageMeta from 'base-themes/static-page-meta.json'
204
+ import themeMeta from 'base-themes/theme-meta.json'
205
+ ```
206
+
207
+ The internal source-copy registry is [registry/registry.json](./registry/registry.json). It lists components, required files, blocks, pages, dependencies, and theme variants. The generated [registry/shadcn-registry.json](./registry/shadcn-registry.json) catalog and [registry/items](./registry/items) item files expose shadcn-compatible `registry:ui`, `registry:block`, and `registry:theme` entries with `meta.agent` guidance for tools that prefer item-level metadata. Package consumers can import item JSON through `base-themes/registry/items/<name>.json`, such as `base-themes/registry/items/button.json` or `base-themes/registry/items/block-dashboard-shell.json`.
208
+
209
+ When the docs site is deployed, the same machine-readable artifacts are available at stable HTTPS URLs for tools and agents that prefer remote metadata:
210
+
211
+ ```text
212
+ https://base-themes.bangwu.me/registry/registry.json
213
+ https://base-themes.bangwu.me/registry/shadcn-registry.json
214
+ https://base-themes.bangwu.me/registry/items/button.json
215
+ https://base-themes.bangwu.me/registry/block-meta.json
216
+ https://base-themes.bangwu.me/registry/component-meta.json
217
+ https://base-themes.bangwu.me/registry/theme-meta.json
127
218
  ```
128
219
 
129
- The source file is [registry/registry.json](./registry/registry.json). It lists components, required files, blocks, pages, dependencies, and theme variants.
220
+ The docs deployment also publishes agent-oriented discovery files at `https://base-themes.bangwu.me/llms.txt` and `https://base-themes.bangwu.me/llms-full.txt` with install, registry, CLI, component, theme, block, token, and verification entry points.
221
+
222
+ Block docs metadata is available at [src/docs/blockMeta.json](./src/docs/blockMeta.json) and through the `base-themes/block-meta.json` export. Component SEO/docs metadata is available at [src/docs/componentMeta.json](./src/docs/componentMeta.json) and through the `base-themes/component-meta.json` export. Static docs route metadata is available at [src/docs/staticPageMeta.json](./src/docs/staticPageMeta.json) and through `base-themes/static-page-meta.json`. The docs app, SEO generator, and registry validation use this shared metadata so routes do not depend on parsing JSX.
223
+
224
+ Theme SEO/docs metadata is available at [src/docs/themeMeta.json](./src/docs/themeMeta.json) and through the `base-themes/theme-meta.json` export. The docs app publishes shareable theme routes such as `/themes/bento`, `/themes/enterprise`, and `/themes/terminal` from that metadata.
225
+
226
+ The public theme token contract is available at [src/styles/tokenContract.json](./src/styles/tokenContract.json), documented in [docs/theme-token-contract.md](./docs/theme-token-contract.md), and exported as `base-themes/token-contract.json`. Prefer the stable `--bt-*` tokens for new theme customization while keeping legacy variables compatible during the 0.x line.
227
+
228
+ Standalone docs pages cover install, positioning, comparison, token architecture, accessibility, migration, design handoff, security and release trust, theming, theme customization, registry/source-copy, CLI usage, agent usage, runnable examples, and contribution workflows at `/docs/installation`, `/docs/why-base-themes`, `/docs/base-ui-vs-shadcn`, `/docs/token-system`, `/docs/accessibility`, `/docs/migration-guide`, `/docs/design-handoff`, `/docs/security`, `/docs/theming`, `/docs/theme-customization`, `/docs/registry`, `/docs/cli`, `/docs/agent-usage`, `/docs/examples`, and `/docs/contributing`.
130
229
 
131
230
  Validate it locally:
132
231
 
133
232
  ```bash
134
233
  npm run registry:check
234
+ npm run tokens:check
235
+ ```
236
+
237
+ Inspect the package registry or generate a source-copy plan from npm:
238
+
239
+ ```bash
240
+ npx base-themes list
241
+ npx base-themes list --json
242
+ npx base-themes plan button select block:dashboard-shell theme:enterprise
243
+ npx base-themes plan button select block:dashboard-shell theme:enterprise --json
244
+ npx base-themes add button select block:dashboard-shell theme:enterprise --target . --dry-run
245
+ npx base-themes add button select block:dashboard-shell theme:enterprise --target . --dry-run --json
246
+ npx base-themes doctor .
247
+ npx base-themes doctor . --json
135
248
  ```
136
249
 
250
+ `plan` resolves source files plus item-level registry guidance: package JSON import paths such as `base-themes/registry/items/button.json`, hosted item URLs such as `/registry/items/block-dashboard-shell.json` and `/registry/items/theme-enterprise.json`, block `meta.agent.registryItems`, theme `data-style` steps, and the generated `meta.agent.packageInstall` / `meta.agent.sourceCopy` steps. Use `--json` when an agent or internal tool needs structured output instead of terminal text.
251
+
252
+ `add` executes the conservative source-copy path from the same plan. It copies registry-listed style, block, and component files into `--target`, leaves existing files untouched by default, supports `--dry-run`, and requires `--force` before overwriting local files.
253
+
254
+ `doctor` checks dependencies, the CSS side-effect import, and `data-style` / `data-theme` wiring. Failed checks include a concrete fix and a bug-report link so first-time integration issues can become actionable feedback.
255
+
256
+ Registry consumers should treat component files, CSS token files, dependencies, pages, blocks, and theme variants as one contract. When adding public components, blocks, or styles, update the registry in the same change.
257
+
137
258
  ## Blocks
138
259
 
139
- The docs app includes block examples at `/blocks`:
260
+ The docs app includes block examples at `/blocks` and shareable block detail routes such as `/blocks/dashboard-shell`, `/blocks/auth-card`, and `/blocks/data-table`. The package ships source-copyable block files under [src/blocks](./src/blocks):
140
261
 
141
262
  - Dashboard Shell
142
263
  - Settings Form
264
+ - Auth Card
265
+ - Pricing Panel
266
+ - Data Table
267
+ - Command Palette
268
+ - Team Activity Feed
269
+ - Theme Showcase Card
270
+
271
+ Blocks are listed in `registry/registry.json` with categories, descriptions, SEO routes, source files, shared CSS, and component dependencies. They are also exported from `base-themes` for package consumers:
272
+
273
+ ```tsx
274
+ import { DashboardShell, SettingsForm } from 'base-themes'
275
+ ```
276
+
277
+ ## Examples
143
278
 
144
- Blocks are also listed in `registry/registry.json` so agents and scripts can discover their component dependencies.
279
+ Runnable examples provide fresh-install confidence and registry workflow proof:
280
+
281
+ - [examples/vite](./examples/vite): Vite React 18 app importing `base-themes`, `base-themes/styles.css`, and `base-themes/registry.json` from the public package surface.
282
+ - [examples/next](./examples/next): Next.js App Router / React 19 example that imports Base Themes CSS in `app/layout.tsx` and renders package components on a server-rendered page.
283
+ - [examples/dashboard](./examples/dashboard): Vite React 18 product dashboard example composed from shipped blocks, controls, registry metadata, and theme switching.
284
+ - [examples/theme-customization](./examples/theme-customization): Vite React 18 theme customization example for CSS token overrides, brand color, radius, font, density, and copyable variables.
285
+ - [examples/registry-copy](./examples/registry-copy): CLI-aligned registry workflow that lists items, plans source-copy installs, previews copied files, and runs install diagnostics for copy-based tools.
286
+
287
+ Verify them locally:
288
+
289
+ ```bash
290
+ npm run example:vite:build
291
+ npm run example:next:build
292
+ npm run example:dashboard:build
293
+ npm run example:theme-customization:build
294
+ npm run example:registry-copy -- button select block:dashboard-shell theme:enterprise
295
+ npm run example:registry-copy -- plan button select block:dashboard-shell theme:enterprise --json
296
+ ```
145
297
 
146
298
  ## Development
147
299
 
@@ -156,18 +308,47 @@ Open:
156
308
  http://localhost:5175/components/button
157
309
  http://localhost:5175/blocks
158
310
  http://localhost:5175/themes
311
+ http://localhost:5175/themes/enterprise
159
312
  http://localhost:5175/docs/installation
313
+ http://localhost:5175/docs/why-base-themes
314
+ http://localhost:5175/docs/base-ui-vs-shadcn
315
+ http://localhost:5175/docs/token-system
316
+ http://localhost:5175/docs/accessibility
317
+ http://localhost:5175/docs/migration-guide
318
+ http://localhost:5175/docs/design-handoff
319
+ http://localhost:5175/docs/security
320
+ http://localhost:5175/docs/theming
321
+ http://localhost:5175/docs/theme-customization
322
+ http://localhost:5175/docs/registry
323
+ http://localhost:5175/docs/cli
324
+ http://localhost:5175/docs/agent-usage
325
+ http://localhost:5175/docs/examples
326
+ http://localhost:5175/docs/contributing
160
327
  ```
161
328
 
162
329
  Verify:
163
330
 
164
331
  ```bash
165
332
  npm run registry:check
333
+ npm run tokens:check
166
334
  npm run lint
335
+ npm run test
167
336
  npm run build
337
+ npm run seo:check
338
+ npm run bundle:report
339
+ npm run bundle:report -- --json
340
+ npm run package:smoke
341
+ npm run example:vite:build
342
+ npm run example:next:build
343
+ npm run example:dashboard:build
344
+ npm run example:theme-customization:build
345
+ npm run example:registry-copy -- button select block:dashboard-shell theme:enterprise
346
+ npm run previews:check
168
347
  npm run previews:generate
169
348
  ```
170
349
 
350
+ `npm run test` covers core Button rendering, Select option selection, Dialog open/close behavior, `useTheme` persistence, and axe accessibility regressions for common controls, dialogs, and tabs. `npm run bundle:report -- --json` emits machine-readable app JS, largest JS, total JS, gzip sizes, and budget checks so website performance can be tracked as a growth-health signal. `npm run themes:e2e` and `npm run previews:check` are available for release-level theme, interaction, contrast, and screenshot-diff checks. They require `agent-browser`.
351
+
171
352
  Build outputs:
172
353
 
173
354
  - Docs app: `dist/index.html`
@@ -196,9 +377,147 @@ Manual local dry run:
196
377
  npm pack --dry-run
197
378
  ```
198
379
 
380
+ See [RELEASE.md](./RELEASE.md) for the full release checklist.
381
+ Use [docs/release-announcement-kit.md](./docs/release-announcement-kit.md) after publish to turn each release into a measurable adoption push with announcement copy, channel checklist, calls to action, and follow-up telemetry.
382
+ Use `npm run release:announce` before sharing a release so social, forum, directory, GitHub release, command, and call-to-action copy reflects current registry counts.
383
+ Use [docs/search-console-setup.md](./docs/search-console-setup.md) after the docs deploy to submit the sitemap, inspect high-intent routes, and track search queries for theme, component, registry, and Base UI comparison pages.
384
+
385
+ ## Contributing
386
+
387
+ Contributions are welcome when they keep source, docs, registry metadata, and theme behavior aligned.
388
+
389
+ Start with [CONTRIBUTING.md](./CONTRIBUTING.md) for local setup and checklists for components, themes, blocks, and docs. Use the GitHub issue templates for bug reports, feature requests, and component/theme/block proposals.
390
+
391
+ Maintainers can use [docs/contributor-issue-seeds.md](./docs/contributor-issue-seeds.md) to publish a small set of good-first issues before release announcements. The seeds focus on adoption-funnel work: installation clarity, accessibility examples, theme customization, registry planning, block variants, and community gallery guidance.
392
+
393
+ The GitHub label vocabulary lives in [.github/labels.json](./.github/labels.json). Run `npm run community:check` after changing issue templates, contributor seed issues, or gallery submission wording so public contribution paths stay consistent. Maintainers can run `npm run community:issues` before announcements to render prefilled good-first issue URLs or GitHub CLI commands from the seed backlog.
394
+
395
+ The community gallery plan lives in [docs/community-gallery-proposal.md](./docs/community-gallery-proposal.md). It defines the discussion-first feedback path, issue-based submission model, and launch criteria for featuring external Base Themes usage. Real projects can start in the `Show and tell` Discussion template, then move to the Community gallery issue template when the submitter grants permission to feature the work.
396
+
397
+ ## Built with Base Themes
398
+
399
+ The project accepts real usage examples through GitHub Discussions and the Community gallery issue template. A useful discussion or submission includes a product screenshot, public URL or repository when available, the Base Themes version, the selected `data-style`, and the components or blocks used.
400
+
401
+ The gallery is intentionally issue-first until there is enough external usage to publish a curated docs page. Accepted examples may be featured in README, docs, or a future `/showcase` route after permission is confirmed in the issue.
402
+
403
+ Good first contribution areas:
404
+
405
+ - Add focused component examples and accessibility notes.
406
+ - Improve registry metadata and docs parity.
407
+ - Add real blocks built from existing components.
408
+ - Improve theme token coverage and preview quality.
409
+ - Add fresh Vite or Next.js examples.
410
+
411
+ ## Security and Release Trust
412
+
413
+ - Security reports follow [SECURITY.md](./SECURITY.md).
414
+ - The docs site publishes the same trust posture at `/docs/security`.
415
+ - Releases are published from GitHub Actions with npm provenance.
416
+ - CI runs registry validation, lint, and build on pull requests and pushes to `main`.
417
+ - Dependabot is configured for npm and GitHub Actions updates.
418
+ - Runtime dependencies are intentionally small: `clsx` and `lucide-react`, with React and Base UI as peer dependencies.
419
+
420
+ ## Semver Policy
421
+
422
+ Base Themes follows semver for package consumers and registry consumers.
423
+
424
+ - Patch releases fix bugs, docs, metadata, examples, tests, and theme contrast issues without changing public APIs.
425
+ - Minor releases may add components, blocks, theme styles, props, registry entries, docs routes, and non-breaking token aliases.
426
+ - Major releases are required for removing exports, changing required peer dependency ranges, renaming public CSS classes or tokens, changing component prop meaning, deleting registry fields, or changing the `data-style` / `data-theme` contract.
427
+
428
+ Visual refinements inside an existing theme can ship as patch or minor changes when the public token names and component contracts stay compatible. Release notes should call out any visible theme changes so users can decide whether to update screenshots or visual baselines.
429
+
430
+ ## Telemetry
431
+
432
+ Adoption should be measured with repeatable public signals instead of guesses:
433
+
434
+ ```bash
435
+ npm run telemetry:collect
436
+ npm run telemetry:check
437
+ npm run telemetry:check -- --live
438
+ npm run telemetry:fixtures
439
+ npm run launch:status
440
+ npm run launch:status -- --live
441
+ npm run launch:actions
442
+ npm run launch:actions -- --live
443
+ npm run launch:campaign
444
+ ```
445
+
446
+ The script writes `research/telemetry-YYYY-MM-DD.md` and `research/telemetry-YYYY-MM-DD.json` with public GitHub and npm metrics. `telemetry:check` validates the latest saved machine-readable adoption gate: four public signals, a three-signal completion threshold, `externallyValidated` derived from the score, and no telemetry collection errors; use `telemetry:check -- --live` to validate a fresh no-write GitHub/npm collection. `telemetry:fixtures` imports sample Search Console, website analytics, registry access, community proof, and bundle performance exports from `research/telemetry-fixtures` so provider-export parsing stays mechanically tested. `launch:status` reads the latest telemetry JSON and summarizes the current public score, previous-report signal trend, missing signals, recommended good-first issue URLs, telemetry collection errors, and next launch actions; use `launch:status -- --live` before external promotion to pull current GitHub/npm signals without writing a report. `launch:actions` turns the missing signals into a concrete star, fork, external issue/PR, or download action list with links, commands, recommended good-first issue URLs, share assets, previous-report signal trend, a promotion wave, and a campaign checklist. `launch:campaign` writes the live campaign JSON and Markdown action pack to `research/` for external posting and T+1/T+7/T+30 follow-up. When `GITHUB_TOKEN` has repository traffic permission, telemetry also collects GitHub views, clones, top referrers, and popular paths. The report keeps explicit gaps for website analytics, Search Console, registry usage, and bundle performance that need provider or build output access. Search Console setup and route inspection are covered in [docs/search-console-setup.md](./docs/search-console-setup.md).
447
+
448
+ For automation, read the JSON output directly:
449
+
450
+ ```bash
451
+ node scripts/collect-telemetry.mjs --json
452
+ ```
453
+
454
+ Search Console exports can be included without Google API credentials:
455
+
456
+ ```bash
457
+ SEARCH_CONSOLE_EXPORT=path/to/search-console-export.csv npm run telemetry:collect
458
+ ```
459
+
460
+ Sanitized website analytics exports can be included the same way:
461
+
462
+ ```bash
463
+ ANALYTICS_EXPORT=path/to/analytics-events.jsonl npm run telemetry:collect
464
+ ```
465
+
466
+ Registry and agent access logs can be summarized when CDN/server exports are available:
467
+
468
+ ```bash
469
+ REGISTRY_ACCESS_EXPORT=path/to/registry-access.jsonl npm run telemetry:collect
470
+ ```
471
+
472
+ See [docs/registry-access-telemetry.md](./docs/registry-access-telemetry.md) for the tracked registry, `llms.txt`, `llms-full.txt`, CLI, and agent workflow routes.
473
+
474
+ Community proof exports can be included after users open Show and tell Discussions, gallery submissions, external repos, or public project URLs:
475
+
476
+ ```bash
477
+ COMMUNITY_PROOF_EXPORT=path/to/community-proof.csv npm run telemetry:collect
478
+ ```
479
+
480
+ See [docs/community-proof-telemetry.md](./docs/community-proof-telemetry.md) for the supported CSV/JSON fields and interpretation rules.
481
+
482
+ Bundle performance can be included after a docs build:
483
+
484
+ ```bash
485
+ npm run build
486
+ npm run bundle:report -- --json > path/to/bundle-report.json
487
+ BUNDLE_REPORT_EXPORT=path/to/bundle-report.json npm run telemetry:collect
488
+ ```
489
+
490
+ The adoption completion gate is tracked in [docs/adoption-dashboard.md](./docs/adoption-dashboard.md) and summarized in [docs/release-announcement-kit.md](./docs/release-announcement-kit.md): treat the strategy as externally validated only when at least three public signals pass across npm downloads, GitHub stars, external issues or PRs, and forks. Local checks prove release readiness, not user willingness.
491
+
492
+ The docs site can also emit privacy-light product-funnel events when `VITE_ANALYTICS_ENDPOINT` is configured at build time. No events are sent by default. Event payloads contain only event name, path, timestamp, and small non-identifying properties.
493
+
494
+ See [docs/analytics-setup.md](./docs/analytics-setup.md) for the optional Cloudflare Worker receiver, deployment model, privacy boundary, and local verification command:
495
+
496
+ ```bash
497
+ npm run analytics:check
498
+ ```
499
+
500
+ Tracked event names:
501
+
502
+ - `route_view`
503
+ - `internal_navigation`
504
+ - `install_command_copy`
505
+ - `github_outbound_click`
506
+ - `theme_style_cycle`
507
+ - `theme_style_select`
508
+ - `theme_snippet_copy`
509
+ - `color_theme_toggle`
510
+ - `block_share_copy`
511
+
199
512
  ## Agent Skill
200
513
 
201
- An agent skill is included at [skills/base-themes/SKILL.md](./skills/base-themes/SKILL.md). It describes how to install components, add blocks, customize themes, and verify the registry.
514
+ An agent skill is included in the npm package and in this repo at [skills/base-themes/SKILL.md](./skills/base-themes/SKILL.md). After installing the package, the same markdown is available at:
515
+
516
+ ```text
517
+ node_modules/base-themes/skills/base-themes/SKILL.md
518
+ ```
519
+
520
+ The package also exposes it as `base-themes/skill` for tools that read package exports. It describes how to install from npm, add blocks, customize themes, and verify registry-driven changes.
202
521
 
203
522
  ## License
204
523
 
package/RELEASE.md ADDED
@@ -0,0 +1,80 @@
1
+ # Release Checklist
2
+
3
+ Use this checklist for every public npm release.
4
+
5
+ ## Before Cutting a Release
6
+
7
+ - Confirm `package.json` version is correct.
8
+ - Review changes for breaking API, token, CSS class, registry schema, or peer dependency changes.
9
+ - Apply the semver policy from README: patches for compatible fixes, minors for additive components/themes/registry entries, majors for removed exports, peer range changes, renamed tokens/classes, or changed `data-style` / `data-theme` behavior.
10
+ - Update release notes or changelog content.
11
+ - Confirm README install examples still match the package API.
12
+ - Confirm `registry/registry.json` includes all public components, blocks, pages, files, dependencies, and theme variants.
13
+
14
+ ## Required Local Checks
15
+
16
+ ```bash
17
+ npm ci
18
+ npm run registry:check
19
+ npm run tokens:check
20
+ npm run lint
21
+ npm run build
22
+ npm run seo:check
23
+ npm run bundle:report
24
+ npm run bundle:report -- --json
25
+ npm run release:announce -- --json
26
+ npm run community:check
27
+ npm run community:issues -- --json
28
+ npm run telemetry:check
29
+ npm run telemetry:check -- --live
30
+ npm run telemetry:fixtures
31
+ npm run launch:check
32
+ npm run launch:status
33
+ npm run launch:status -- --live
34
+ npm run launch:actions
35
+ npm run launch:actions -- --live
36
+ npm run launch:campaign
37
+ npm run package:smoke
38
+ npm run example:vite:build
39
+ npm run example:dashboard:build
40
+ npm run example:theme-customization:build
41
+ npm run example:next:build
42
+ npm run example:registry-copy -- button select block:dashboard-shell theme:enterprise
43
+ npm pack --dry-run
44
+ ```
45
+
46
+ ## Visual and Theme Checks
47
+
48
+ Run when component styles, theme tokens, previews, or docs demos changed:
49
+
50
+ ```bash
51
+ npm run themes:e2e
52
+ npm run previews:check
53
+ npm run previews:generate
54
+ ```
55
+
56
+ `previews:check` compares fresh screenshots against `public/previews` baselines. Commit regenerated preview assets when visual changes are intentional.
57
+
58
+ ## Publish Flow
59
+
60
+ Publishing is handled by `.github/workflows/publish.yml` through GitHub Actions and npm provenance.
61
+
62
+ 1. Create a GitHub release for the package version, or run the publish workflow manually.
63
+ 2. Confirm the workflow used the `npm` environment and GitHub OIDC.
64
+ 3. Confirm the package was not already published.
65
+ 4. Confirm `npm publish --access public --provenance` completed successfully.
66
+
67
+ ## After Publish
68
+
69
+ - Install the published package in a fresh app.
70
+ - Import `base-themes/styles.css` and render at least `Button` and `Select`.
71
+ - Build the Vite, dashboard, theme-customization, and Next examples when package exports, CSS, registry metadata, theme tokens, blocks, or peer dependencies changed.
72
+ - Verify `base-themes/registry.json` and `base-themes/skill` resolve from the package.
73
+ - Check the docs site deployment if the release includes docs or preview changes.
74
+ - Check `.github/labels.json`, issue templates, and contributor seed issues with `npm run community:check`, then run `npm run community:issues` and publish two or three good-first issues before asking for stars, forks, issues, PRs, or gallery submissions.
75
+ - Link the release notes from any relevant issue or discussion.
76
+ - Use `npm run release:announce` and [docs/release-announcement-kit.md](./docs/release-announcement-kit.md) to publish current-count announcement copy, share screenshots/routes, ask for one concrete community action, and schedule T+1 day, T+7 day, and T+30 day telemetry checks.
77
+ - Run `npm run launch:check` before the first announcement wave to verify release copy, contributor seed issue URLs, community links, telemetry docs, and the public adoption gate are still aligned.
78
+ - Run `npm run telemetry:collect` after the release and after each announcement wave. Do not treat a release as adoption-validated until the public adoption gate in the announcement kit passes.
79
+ - Run `npm run launch:status` after each telemetry pass to summarize missing public signals and the next concrete adoption action; use `npm run launch:status -- --live` before an announcement when the latest report may be stale.
80
+ - Run `npm run launch:actions` after `launch:status` when the gate is still unmet, or `npm run launch:actions -- --live` before promotion, then execute the generated star, fork, and external issue/PR actions before the next telemetry pass. Use `npm run launch:campaign` to write the live campaign JSON and Markdown pack to `research/` before posting externally.