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.
- package/CHANGELOG.md +25 -0
- package/CODE_OF_CONDUCT.md +22 -0
- package/CONTRIBUTING.md +98 -0
- package/LICENSE +21 -0
- package/README.md +324 -5
- package/RELEASE.md +80 -0
- package/SECURITY.md +49 -0
- package/bin/base-themes.mjs +143 -0
- package/dist/base-themes.css +1 -1
- package/dist/base-themes.js +857 -302
- package/dist/llms-full.txt +288 -0
- package/dist/llms.txt +79 -0
- package/dist/types/blocks/AuthCard.d.ts +2 -0
- package/dist/types/blocks/CommandPaletteBlock.d.ts +2 -0
- package/dist/types/blocks/DashboardShell.d.ts +2 -0
- package/dist/types/blocks/DataTableBlock.d.ts +2 -0
- package/dist/types/blocks/PricingPanel.d.ts +2 -0
- package/dist/types/blocks/SettingsForm.d.ts +2 -0
- package/dist/types/blocks/TeamActivityFeed.d.ts +2 -0
- package/dist/types/blocks/ThemeShowcaseCard.d.ts +2 -0
- package/dist/types/blocks/index.d.ts +8 -0
- package/dist/types/components/ui/Input.d.ts +3 -0
- package/dist/types/components/ui/index.d.ts +1 -1
- package/dist/types/lib.d.ts +1 -0
- package/docs/adoption-dashboard.md +149 -0
- package/docs/analytics-setup.md +145 -0
- package/docs/community-gallery-proposal.md +64 -0
- package/docs/community-proof-telemetry.md +47 -0
- package/docs/contributor-issue-seeds.md +240 -0
- package/docs/registry-access-telemetry.md +87 -0
- package/docs/release-announcement-kit.md +229 -0
- package/docs/search-console-setup.md +111 -0
- package/docs/theme-token-contract.md +113 -0
- package/examples/dashboard/README.md +24 -0
- package/examples/dashboard/index.html +12 -0
- package/examples/dashboard/package-lock.json +1212 -0
- package/examples/dashboard/package.json +24 -0
- package/examples/dashboard/src/App.tsx +115 -0
- package/examples/dashboard/src/main.tsx +11 -0
- package/examples/dashboard/src/styles.css +129 -0
- package/examples/dashboard/src/vite-env.d.ts +4 -0
- package/examples/dashboard/tsconfig.app.json +23 -0
- package/examples/dashboard/tsconfig.json +7 -0
- package/examples/dashboard/tsconfig.node.json +15 -0
- package/examples/dashboard/vite.config.ts +6 -0
- package/examples/next/README.md +29 -0
- package/examples/next/app/base-themes-demo.tsx +70 -0
- package/examples/next/app/layout.tsx +16 -0
- package/examples/next/app/page.tsx +9 -0
- package/examples/next/app/styles.css +106 -0
- package/examples/next/next-env.d.ts +6 -0
- package/examples/next/next.config.ts +5 -0
- package/examples/next/package-lock.json +1199 -0
- package/examples/next/package.json +27 -0
- package/examples/next/tsconfig.json +36 -0
- package/examples/registry-copy/README.md +73 -0
- package/examples/registry-copy/plan-copy.mjs +130 -0
- package/examples/theme-customization/README.md +26 -0
- package/examples/theme-customization/index.html +12 -0
- package/examples/theme-customization/package-lock.json +1212 -0
- package/examples/theme-customization/package.json +24 -0
- package/examples/theme-customization/src/App.tsx +138 -0
- package/examples/theme-customization/src/main.tsx +11 -0
- package/examples/theme-customization/src/styles.css +138 -0
- package/examples/theme-customization/src/vite-env.d.ts +4 -0
- package/examples/theme-customization/tsconfig.app.json +23 -0
- package/examples/theme-customization/tsconfig.json +7 -0
- package/examples/theme-customization/tsconfig.node.json +15 -0
- package/examples/theme-customization/vite.config.ts +6 -0
- package/examples/vite/README.md +32 -0
- package/examples/vite/index.html +12 -0
- package/examples/vite/package-lock.json +1200 -0
- package/examples/vite/package.json +24 -0
- package/examples/vite/src/App.tsx +101 -0
- package/examples/vite/src/main.tsx +11 -0
- package/examples/vite/src/styles.css +125 -0
- package/examples/vite/src/vite-env.d.ts +4 -0
- package/examples/vite/tsconfig.app.json +23 -0
- package/examples/vite/tsconfig.json +7 -0
- package/examples/vite/tsconfig.node.json +15 -0
- package/examples/vite/vite.config.ts +6 -0
- package/llms-full.txt +288 -0
- package/llms.txt +79 -0
- package/package.json +157 -14
- package/public/previews/base-themes-bauhaus.png +0 -0
- package/public/previews/base-themes-bento.png +0 -0
- package/public/previews/base-themes-calm.png +0 -0
- package/public/previews/base-themes-cyberpunk.png +0 -0
- package/public/previews/base-themes-data-dense.png +0 -0
- package/public/previews/base-themes-editorial.png +0 -0
- package/public/previews/base-themes-enterprise.png +0 -0
- package/public/previews/base-themes-fluent.png +0 -0
- package/public/previews/base-themes-glass.png +0 -0
- package/public/previews/base-themes-linear.png +0 -0
- package/public/previews/base-themes-luxury.png +0 -0
- package/public/previews/base-themes-material.png +0 -0
- package/public/previews/base-themes-minimal.png +0 -0
- package/public/previews/base-themes-mono.png +0 -0
- package/public/previews/base-themes-neo-brutalism.png +0 -0
- package/public/previews/base-themes-playful.png +0 -0
- package/public/previews/base-themes-retro.png +0 -0
- package/public/previews/base-themes-shadcn.png +0 -0
- package/public/previews/base-themes-soft-ui.png +0 -0
- package/public/previews/base-themes-terminal.png +0 -0
- package/registry/items/accordion.json +101 -0
- package/registry/items/alert-dialog.json +107 -0
- package/registry/items/autocomplete.json +106 -0
- package/registry/items/avatar.json +101 -0
- package/registry/items/block-auth-card.json +105 -0
- package/registry/items/block-command-palette.json +99 -0
- package/registry/items/block-dashboard-shell.json +101 -0
- package/registry/items/block-data-table.json +99 -0
- package/registry/items/block-pricing-panel.json +99 -0
- package/registry/items/block-settings-form.json +107 -0
- package/registry/items/block-team-activity-feed.json +99 -0
- package/registry/items/block-theme-showcase-card.json +99 -0
- package/registry/items/button.json +102 -0
- package/registry/items/checkbox-group.json +106 -0
- package/registry/items/checkbox.json +102 -0
- package/registry/items/collapsible.json +101 -0
- package/registry/items/combobox.json +101 -0
- package/registry/items/context-menu.json +106 -0
- package/registry/items/csp-provider.json +96 -0
- package/registry/items/dialog.json +102 -0
- package/registry/items/direction-provider.json +101 -0
- package/registry/items/drawer.json +101 -0
- package/registry/items/field.json +101 -0
- package/registry/items/fieldset.json +101 -0
- package/registry/items/form.json +101 -0
- package/registry/items/input.json +102 -0
- package/registry/items/menu.json +101 -0
- package/registry/items/menubar.json +106 -0
- package/registry/items/meter.json +101 -0
- package/registry/items/navigation-menu.json +101 -0
- package/registry/items/number-field.json +101 -0
- package/registry/items/otp-field.json +101 -0
- package/registry/items/popover.json +102 -0
- package/registry/items/preview-card.json +101 -0
- package/registry/items/progress.json +101 -0
- package/registry/items/radio-group.json +102 -0
- package/registry/items/radio.json +101 -0
- package/registry/items/scroll-area.json +101 -0
- package/registry/items/select.json +102 -0
- package/registry/items/separator.json +101 -0
- package/registry/items/slider.json +102 -0
- package/registry/items/switch.json +102 -0
- package/registry/items/tabs.json +101 -0
- package/registry/items/theme-bauhaus.json +107 -0
- package/registry/items/theme-bento.json +107 -0
- package/registry/items/theme-calm.json +107 -0
- package/registry/items/theme-cyberpunk.json +108 -0
- package/registry/items/theme-data-dense.json +107 -0
- package/registry/items/theme-editorial.json +107 -0
- package/registry/items/theme-enterprise.json +108 -0
- package/registry/items/theme-fluent.json +107 -0
- package/registry/items/theme-glass.json +107 -0
- package/registry/items/theme-linear.json +107 -0
- package/registry/items/theme-luxury.json +107 -0
- package/registry/items/theme-material.json +107 -0
- package/registry/items/theme-minimal.json +107 -0
- package/registry/items/theme-mono.json +107 -0
- package/registry/items/theme-neo-brutalism.json +107 -0
- package/registry/items/theme-playful.json +107 -0
- package/registry/items/theme-retro.json +107 -0
- package/registry/items/theme-shadcn.json +107 -0
- package/registry/items/theme-soft-ui.json +107 -0
- package/registry/items/theme-terminal.json +107 -0
- package/registry/items/toast.json +106 -0
- package/registry/items/toggle-group.json +101 -0
- package/registry/items/toggle.json +101 -0
- package/registry/items/toolbar.json +101 -0
- package/registry/items/tooltip.json +102 -0
- package/registry/registry.json +564 -49
- package/registry/shadcn-registry.json +415 -0
- package/research/telemetry-fixtures/analytics-events.jsonl +9 -0
- package/research/telemetry-fixtures/bundle-report.json +44 -0
- package/research/telemetry-fixtures/community-proof.csv +5 -0
- package/research/telemetry-fixtures/registry-access.jsonl +10 -0
- package/research/telemetry-fixtures/search-console-export.csv +4 -0
- package/scripts/registry-plan.mjs +434 -0
- package/scripts/render-launch-actions.mjs +405 -0
- package/scripts/render-launch-status.mjs +373 -0
- package/scripts/render-release-announcement.mjs +329 -0
- package/scripts/verify-launch-readiness.mjs +415 -0
- package/scripts/verify-telemetry-fixtures.mjs +85 -0
- package/scripts/verify-telemetry-report.mjs +89 -0
- package/skills/base-themes/SKILL.md +156 -43
- package/src/blocks/AuthCard.tsx +29 -0
- package/src/blocks/Blocks.css +182 -0
- package/src/blocks/CommandPaletteBlock.tsx +32 -0
- package/src/blocks/DashboardShell.tsx +36 -0
- package/src/blocks/DataTableBlock.tsx +44 -0
- package/src/blocks/PricingPanel.tsx +28 -0
- package/src/blocks/SettingsForm.tsx +37 -0
- package/src/blocks/TeamActivityFeed.tsx +38 -0
- package/src/blocks/ThemeShowcaseCard.tsx +32 -0
- package/src/blocks/index.ts +8 -0
- package/src/components/ui/Accordion.css +42 -0
- package/src/components/ui/Accordion.tsx +41 -0
- package/src/components/ui/AlertDialog.css +40 -0
- package/src/components/ui/AlertDialog.tsx +52 -0
- package/src/components/ui/Autocomplete.css +3 -0
- package/src/components/ui/Autocomplete.tsx +50 -0
- package/src/components/ui/Avatar.css +45 -0
- package/src/components/ui/Avatar.tsx +36 -0
- package/src/components/ui/Button.css +79 -0
- package/src/components/ui/Button.tsx +20 -0
- package/src/components/ui/Checkbox.css +37 -0
- package/src/components/ui/Checkbox.tsx +32 -0
- package/src/components/ui/CheckboxGroup.tsx +21 -0
- package/src/components/ui/Collapsible.css +34 -0
- package/src/components/ui/Collapsible.tsx +29 -0
- package/src/components/ui/Combobox.css +75 -0
- package/src/components/ui/Combobox.tsx +53 -0
- package/src/components/ui/ContextMenu.css +9 -0
- package/src/components/ui/ContextMenu.tsx +47 -0
- package/src/components/ui/CspProvider.tsx +10 -0
- package/src/components/ui/Dialog.css +41 -0
- package/src/components/ui/Dialog.tsx +45 -0
- package/src/components/ui/DirectionProvider.tsx +17 -0
- package/src/components/ui/Drawer.css +77 -0
- package/src/components/ui/Drawer.tsx +56 -0
- package/src/components/ui/Field.css +19 -0
- package/src/components/ui/Field.tsx +24 -0
- package/src/components/ui/Fieldset.css +16 -0
- package/src/components/ui/Fieldset.tsx +19 -0
- package/src/components/ui/Form.css +5 -0
- package/src/components/ui/Form.tsx +12 -0
- package/src/components/ui/Input.css +50 -0
- package/src/components/ui/Input.tsx +62 -0
- package/src/components/ui/Menu.css +59 -0
- package/src/components/ui/Menu.tsx +50 -0
- package/src/components/ui/Menubar.css +26 -0
- package/src/components/ui/Menubar.tsx +42 -0
- package/src/components/ui/Meter.css +45 -0
- package/src/components/ui/Meter.tsx +37 -0
- package/src/components/ui/NavigationMenu.css +103 -0
- package/src/components/ui/NavigationMenu.tsx +64 -0
- package/src/components/ui/NumberField.css +38 -0
- package/src/components/ui/NumberField.tsx +28 -0
- package/src/components/ui/OtpField.css +28 -0
- package/src/components/ui/OtpField.tsx +24 -0
- package/src/components/ui/Popover.css +25 -0
- package/src/components/ui/Popover.tsx +37 -0
- package/src/components/ui/PreviewCard.css +33 -0
- package/src/components/ui/PreviewCard.tsx +43 -0
- package/src/components/ui/Progress.css +33 -0
- package/src/components/ui/Progress.tsx +28 -0
- package/src/components/ui/Radio.tsx +22 -0
- package/src/components/ui/RadioGroup.css +42 -0
- package/src/components/ui/RadioGroup.tsx +29 -0
- package/src/components/ui/ScrollArea.css +42 -0
- package/src/components/ui/ScrollArea.tsx +22 -0
- package/src/components/ui/Select.css +86 -0
- package/src/components/ui/Select.tsx +39 -0
- package/src/components/ui/Separator.css +14 -0
- package/src/components/ui/Separator.tsx +12 -0
- package/src/components/ui/Slider.css +39 -0
- package/src/components/ui/Slider.tsx +21 -0
- package/src/components/ui/Switch.css +45 -0
- package/src/components/ui/Switch.tsx +29 -0
- package/src/components/ui/Tabs.css +72 -0
- package/src/components/ui/Tabs.tsx +44 -0
- package/src/components/ui/Toast.css +75 -0
- package/src/components/ui/Toast.tsx +48 -0
- package/src/components/ui/Toggle.tsx +12 -0
- package/src/components/ui/ToggleGroup.css +35 -0
- package/src/components/ui/ToggleGroup.tsx +30 -0
- package/src/components/ui/Toolbar.css +60 -0
- package/src/components/ui/Toolbar.tsx +36 -0
- package/src/components/ui/Tooltip.css +14 -0
- package/src/components/ui/Tooltip.tsx +31 -0
- package/src/components/ui/index.ts +83 -0
- package/src/components/ui/useDirection.ts +1 -0
- package/src/components/ui/useToastManager.ts +11 -0
- package/src/docs/blockMeta.json +66 -0
- package/src/docs/componentMeta.json +322 -0
- package/src/docs/staticPageMeta.json +143 -0
- package/src/docs/themeMeta.json +22 -0
- package/src/styles/tokenContract.json +61 -0
- package/workers/analytics-receiver.mjs +170 -0
- package/wrangler.analytics.jsonc +12 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Registry Access Telemetry
|
|
2
|
+
|
|
3
|
+
Use this checklist after the docs site is deployed to measure whether registry metadata, `llms.txt`, `llms-full.txt`, CLI docs, and agent workflow pages are actually being consumed.
|
|
4
|
+
|
|
5
|
+
Registry access is supporting evidence for adoption. It does not replace the public completion gate in [adoption-dashboard.md](./adoption-dashboard.md), but it shows whether the agent-native and source-copy parts of the strategy are getting real traffic.
|
|
6
|
+
|
|
7
|
+
## Routes To Track
|
|
8
|
+
|
|
9
|
+
Track these production paths in CDN, Cloudflare, or server access logs:
|
|
10
|
+
|
|
11
|
+
| Route | Signal |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `/registry/registry.json` | Tools or users are fetching the full source-copy registry. |
|
|
14
|
+
| `/registry/shadcn-registry.json` | Tools or users are fetching the shadcn-compatible catalog. |
|
|
15
|
+
| `/registry/items/*.json` | Tools or users are fetching item-level component, block, theme, or `meta.agent` metadata. |
|
|
16
|
+
| `/registry/block-meta.json` | Tools or docs consumers are reading block route, title, category, description, and export metadata. |
|
|
17
|
+
| `/registry/component-meta.json` | Tools or docs consumers are reading component metadata. |
|
|
18
|
+
| `/registry/theme-meta.json` | Tools or docs consumers are reading theme metadata. |
|
|
19
|
+
| `/llms.txt` | AI agents, search tools, or humans are discovering agent-readable entry points. |
|
|
20
|
+
| `/llms-full.txt` | AI agents or search tools are fetching the full component, theme, block, registry, and verification context. |
|
|
21
|
+
| `/docs/registry` | Users are evaluating source-copy registry usage. |
|
|
22
|
+
| `/docs/cli` | Users are evaluating CLI workflows such as `list`, `plan`, and `doctor`. |
|
|
23
|
+
| `/docs/agent-usage` | Users are evaluating the agent-native workflow. |
|
|
24
|
+
|
|
25
|
+
## Export Format
|
|
26
|
+
|
|
27
|
+
Export sanitized access rows as JSON, JSONL, or CSV. Useful fields are:
|
|
28
|
+
|
|
29
|
+
| Field | Accepted Names |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Path or URL | `path`, `Path`, `uri`, `URI`, `url`, `URL`, `requestUrl` |
|
|
32
|
+
| Status | `status`, `Status` |
|
|
33
|
+
| Referrer | `referer`, `referrer`, `Referer`, `Referrer` |
|
|
34
|
+
| User agent | `userAgent`, `user_agent`, `User-Agent` |
|
|
35
|
+
| Timestamp | `timestamp`, `datetime`, `date` |
|
|
36
|
+
|
|
37
|
+
Keep exports sanitized. Do not include IP addresses, cookies, request headers, emails, or full query strings. The telemetry importer only needs the path-level signal.
|
|
38
|
+
|
|
39
|
+
Example JSONL:
|
|
40
|
+
|
|
41
|
+
```jsonl
|
|
42
|
+
{"path":"/registry/registry.json","status":200,"referer":"https://base-themes.bangwu.me/docs/registry","userAgent":"curl/8"}
|
|
43
|
+
{"path":"/registry/shadcn-registry.json","status":200,"referer":"https://base-themes.bangwu.me/llms.txt","userAgent":"agent-discovery"}
|
|
44
|
+
{"path":"/registry/items/button.json","status":200,"referer":"https://base-themes.bangwu.me/llms.txt","userAgent":"agent-discovery"}
|
|
45
|
+
{"path":"/registry/items/block-dashboard-shell.json","status":200,"referer":"https://base-themes.bangwu.me/docs/agent-usage","userAgent":"agent-discovery"}
|
|
46
|
+
{"path":"/registry/block-meta.json","status":200,"referer":"https://base-themes.bangwu.me/docs/registry","userAgent":"agent-discovery"}
|
|
47
|
+
{"path":"/registry/items/theme-enterprise.json","status":200,"referer":"https://base-themes.bangwu.me/themes/enterprise","userAgent":"agent-discovery"}
|
|
48
|
+
{"url":"https://base-themes.bangwu.me/llms.txt","status":200,"userAgent":"agent-discovery"}
|
|
49
|
+
{"url":"https://base-themes.bangwu.me/llms-full.txt","status":200,"userAgent":"agent-discovery"}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Import Command
|
|
53
|
+
|
|
54
|
+
Run telemetry with the access export:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
REGISTRY_ACCESS_EXPORT=path/to/registry-access.jsonl npm run telemetry:collect
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
You can combine it with other provider exports:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
REGISTRY_ACCESS_EXPORT=path/to/registry-access.jsonl ANALYTICS_EXPORT=path/to/analytics-events.jsonl SEARCH_CONSOLE_EXPORT=path/to/search-console-export.csv npm run telemetry:collect
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The report summarizes total matched registry/agent requests, requests for each registry artifact, standard registry item requests, component/block/theme item request breakdowns, block/component/theme metadata requests, `/llms.txt`, `/llms-full.txt`, registry docs, CLI docs, agent docs, top paths, top item paths, top referrers, and top user agents.
|
|
67
|
+
|
|
68
|
+
Before trusting a new export shape, run the bundled fixture check:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm run telemetry:fixtures
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The checked registry fixture lives at `research/telemetry-fixtures/registry-access.jsonl` and covers full registry, shadcn registry, component item, block item, theme item, metadata, `llms.txt`, `llms-full.txt`, and CLI-doc access rows.
|
|
75
|
+
|
|
76
|
+
## Decision Rules
|
|
77
|
+
|
|
78
|
+
- If `/registry/registry.json` has traffic but npm downloads do not move, improve registry install examples and source-copy docs.
|
|
79
|
+
- If `/registry/shadcn-registry.json` or `/registry/items/*.json` has traffic, prioritize deterministic item metadata, `meta.agent` quality, and stable shadcn-compatible paths before adding more decorative docs.
|
|
80
|
+
- If theme item requests lead block or component item requests, improve theme-to-component install examples and route users toward `examples/theme-customization`.
|
|
81
|
+
- If block item requests lead component item requests, improve block copy plans, block screenshots, and product-screen examples.
|
|
82
|
+
- If `/registry/block-meta.json` has traffic but block item requests do not, make registry block item URLs and `npx base-themes plan block:<name>` examples more visible from block routes.
|
|
83
|
+
- If `/llms.txt` has traffic but `/docs/agent-usage` does not, make the agent workflow route easier to discover from the discovery file and README.
|
|
84
|
+
- If `/llms-full.txt` has traffic but item JSON does not, move registry item examples higher in the full agent context.
|
|
85
|
+
- If `/docs/cli` has traffic but few install command copies or GitHub clicks, improve `npx base-themes doctor .` placement and troubleshooting examples.
|
|
86
|
+
- If registry artifacts have no traffic after announcements, include direct registry and `llms.txt` links in release posts and docs CTAs.
|
|
87
|
+
- If user agents show known coding agents or package tools, prioritize deterministic metadata, stable URLs, and source-copy planning over decorative docs changes.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
# Release Announcement Kit
|
|
2
|
+
|
|
3
|
+
Base Themes needs public adoption evidence, not just local release readiness. Use this kit after a verified release to turn the package, docs, blocks, CLI, and registry work into measurable external signals.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Drive real users from discovery to installation, feedback, stars, forks, issues, pull requests, and gallery submissions.
|
|
8
|
+
|
|
9
|
+
The current completion gate for the strategy is external evidence that enough users are willing to use the project. Local checks can prove readiness, but they cannot prove adoption.
|
|
10
|
+
|
|
11
|
+
## Shareable Positioning
|
|
12
|
+
|
|
13
|
+
Short version:
|
|
14
|
+
|
|
15
|
+
> Accessible Base UI components. 20 themes. Registry-ready. Agent-friendly.
|
|
16
|
+
|
|
17
|
+
Long version:
|
|
18
|
+
|
|
19
|
+
> Base Themes is a type-safe React component system built on Base UI. It ships accessible component wrappers, CSS-token themes, 20 curated visual styles, source-copyable registry metadata, blocks, examples, and an agent-friendly workflow for customizing product UI.
|
|
20
|
+
|
|
21
|
+
Use these points consistently:
|
|
22
|
+
|
|
23
|
+
- Built on `@base-ui/react` accessible primitives.
|
|
24
|
+
- Supports React 18.2+ and React 19.
|
|
25
|
+
- Includes 20 visual styles through `data-style` and `data-theme`.
|
|
26
|
+
- Ships 40 components, 8 blocks, 18 pages, and registry metadata.
|
|
27
|
+
- Includes `npx base-themes list`, `plan`, `add`, and `doctor`.
|
|
28
|
+
- Provides Vite, dashboard, theme-customization, Next.js, and registry-copy examples.
|
|
29
|
+
- Published from GitHub Actions with npm provenance.
|
|
30
|
+
|
|
31
|
+
## Release Checklist Extension
|
|
32
|
+
|
|
33
|
+
Run the normal [release checklist](../RELEASE.md) first. After publish and docs deploy, complete these adoption steps:
|
|
34
|
+
|
|
35
|
+
1. Confirm the new package version is visible on npm.
|
|
36
|
+
2. Confirm the docs site deploy includes current SEO routes, theme pages, block pages, and CLI docs.
|
|
37
|
+
3. Submit and inspect search entry points with [search-console-setup.md](./search-console-setup.md) so SEO routes can produce measurable discovery signals.
|
|
38
|
+
4. If website funnel measurement is enabled, validate the receiver with `npm run analytics:check` and build the docs site with `VITE_ANALYTICS_ENDPOINT` from [analytics-setup.md](./analytics-setup.md).
|
|
39
|
+
5. If CDN or server access logs are available, prepare registry and agent-route exports with [registry-access-telemetry.md](./registry-access-telemetry.md).
|
|
40
|
+
6. Run `npm run build` and `npm run bundle:report -- --json > path/to/bundle-report.json` if you want the telemetry report to compare campaign conversion with bundle budgets.
|
|
41
|
+
7. Run `npm run telemetry:collect` or `BUNDLE_REPORT_EXPORT=path/to/bundle-report.json npm run telemetry:collect` and save the report.
|
|
42
|
+
8. Run `npm run launch:status -- --live` to confirm whether the public adoption gate is still unmet or externally validated against current GitHub/npm data before writing announcement copy.
|
|
43
|
+
9. Run `npm run launch:actions -- --live` when the gate is still unmet, or `npm run launch:campaign` when you want to write the live campaign JSON and Markdown pack to `research/`, then use the generated star, fork, and external issue/PR actions to choose the next announcement wave.
|
|
44
|
+
10. Run `npm run community:issues` and publish two or three seed issues from [contributor-issue-seeds.md](./contributor-issue-seeds.md), so external users have an immediate good-first action after starring or forking.
|
|
45
|
+
11. Enable or verify GitHub Discussions with a `Show and tell` category that uses [.github/DISCUSSION_TEMPLATE/show-and-tell.yml](../.github/DISCUSSION_TEMPLATE/show-and-tell.yml), so lightweight usage posts do not need to become permissioned gallery issues immediately.
|
|
46
|
+
12. Run `npm run release:announce` to render current-count release, social, forum, directory, command, and call-to-action copy from `package.json` and `registry/registry.json`.
|
|
47
|
+
13. Run `npm run launch:check` to verify release copy, contributor seed issue URLs, community links, telemetry docs, and the public adoption gate before sharing externally.
|
|
48
|
+
14. Create a GitHub release with the announcement copy below or the generated copy, then link one or two published seed issues.
|
|
49
|
+
15. Pin or feature one screenshot that shows a real block, not only swatches.
|
|
50
|
+
16. Share the release in at least three external channels.
|
|
51
|
+
17. Ask for one concrete action in each post: star the repo after trying it, fork it and run the Fork-to-first-change workflow, try `npx base-themes add button select --target . --dry-run`, run `npx base-themes doctor .`, open a Show and tell Discussion, submit a gallery issue, or comment on a good-first issue.
|
|
52
|
+
18. Re-run `npm run telemetry:collect` and `npm run launch:status` after 24 hours, 7 days, and 30 days.
|
|
53
|
+
19. Record which channels produced stars, forks, issues, PRs, discussions, gallery submissions, npm download slope, search impressions, registry/agent requests, docs traffic, or bundle-performance-related conversion changes.
|
|
54
|
+
|
|
55
|
+
The generated channel checklist and channel copy include `utm_campaign`, `utm_source`, `utm_medium`, and `utm_content` on each `primaryLink`. Use the attributed links from the copy instead of replacing them with bare repo or docs URLs when website analytics is enabled, so `npm run telemetry:collect` can summarize top campaigns, sources, mediums, and campaign/source conversion funnels from route views, install command copies, and GitHub outbound clicks.
|
|
56
|
+
|
|
57
|
+
The generated announcement and launch-action JSON also include `shareAssets`: attributed block, theme, comparison, and CLI routes paired with preview image URLs and usage guidance for social posts, forums, and devtool directories. Each generated channel checklist entry includes `shareAssetIds` so the launch-action output maps every promotion channel to the exact screenshots or routes to use. `launch:status` and `launch:actions` include `signalTrends` from the previous telemetry report when one exists, including older Markdown-only reports, so each wave can compare public signal slope instead of only one snapshot. `launch:actions` also emits a `promotionWave` that binds each channel to its ready-to-post copy, target adoption signals, attributed primary link, share assets, action, and measurement plan, plus a `campaignChecklist` for pre-promotion checks, channel execution, and T+1/T+7/T+30 telemetry follow-up. Each checklist item includes record fields for post URLs, publish timestamps, telemetry report paths, status scores, and decision notes.
|
|
58
|
+
|
|
59
|
+
`launch:campaign` writes dated files under `research/`. If a campaign Markdown file already contains filled record fields such as `Post URL:` or `Telemetry report path:`, the command refuses to overwrite it. Move filled evidence to a separate ledger or rerun with `--force` only when replacing the filled evidence is intentional.
|
|
60
|
+
|
|
61
|
+
The write path also refuses to save a campaign pack when telemetry is incomplete. Rerun after GitHub/npm telemetry succeeds, or pass `--allow-incomplete` only when intentionally saving a diagnostic pack that must not be used as complete adoption evidence.
|
|
62
|
+
|
|
63
|
+
## Announcement Assets
|
|
64
|
+
|
|
65
|
+
Recommended screenshots or routes to share:
|
|
66
|
+
|
|
67
|
+
- `/themes/bento` for the default visual system.
|
|
68
|
+
- `/themes/enterprise` for operational product UI.
|
|
69
|
+
- `/themes/terminal` for a distinctive developer-tool style.
|
|
70
|
+
- `/blocks/dashboard-shell` for a product-screen proof point.
|
|
71
|
+
- `/blocks/data-table` for dense workflow credibility.
|
|
72
|
+
- `examples/dashboard` for a runnable product-screen package integration.
|
|
73
|
+
- `examples/theme-customization` for token override, brand color, radius, font, and density customization.
|
|
74
|
+
- `/docs/cli` for registry and source-copy workflow proof.
|
|
75
|
+
|
|
76
|
+
Recommended commands to include:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install base-themes @base-ui/react react react-dom
|
|
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
|
|
88
|
+
npm run example:theme-customization:build
|
|
89
|
+
npm run example:registry-copy -- plan button select block:dashboard-shell theme:enterprise --json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Render current release copy from source data:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm run release:announce
|
|
96
|
+
npm run release:announce -- --json
|
|
97
|
+
npm run launch:check
|
|
98
|
+
npm run telemetry:check -- --live
|
|
99
|
+
npm run launch:status
|
|
100
|
+
npm run launch:status -- --live
|
|
101
|
+
npm run launch:actions
|
|
102
|
+
npm run launch:actions -- --live
|
|
103
|
+
npm run launch:actions -- --live --write
|
|
104
|
+
npm run launch:campaign
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## GitHub Release Draft
|
|
108
|
+
|
|
109
|
+
```md
|
|
110
|
+
Base Themes now ships as a Base UI-first React theme component system with:
|
|
111
|
+
|
|
112
|
+
- 40 typed React components built on `@base-ui/react`
|
|
113
|
+
- 20 CSS-token visual styles with light and dark modes
|
|
114
|
+
- 8 source-copyable product blocks
|
|
115
|
+
- shadcn-style registry metadata for components, blocks, pages, and themes
|
|
116
|
+
- CLI helpers: `list`, `plan`, `add`, and `doctor`
|
|
117
|
+
- Vite, dashboard, theme-customization, Next.js, and registry-copy examples
|
|
118
|
+
- axe, package smoke, SEO, registry, and theme preview checks
|
|
119
|
+
|
|
120
|
+
Try it:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npm install base-themes @base-ui/react react react-dom
|
|
124
|
+
npx base-themes doctor .
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Useful links:
|
|
128
|
+
|
|
129
|
+
- Docs: https://base-themes.bangwu.me
|
|
130
|
+
- Registry: https://base-themes.bangwu.me/registry/registry.json
|
|
131
|
+
- Agent discovery: https://base-themes.bangwu.me/llms.txt
|
|
132
|
+
- Full agent context: https://base-themes.bangwu.me/llms-full.txt
|
|
133
|
+
- Blocks: https://base-themes.bangwu.me/blocks
|
|
134
|
+
- CLI: https://base-themes.bangwu.me/docs/cli
|
|
135
|
+
|
|
136
|
+
If you try it, please star or fork the repo, open an issue for missing components or rough edges, start a Show and tell Discussion, or submit a real usage example through the community gallery issue template.
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Social Drafts
|
|
140
|
+
|
|
141
|
+
### X / Bluesky
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
I shipped a stronger Base Themes release:
|
|
145
|
+
|
|
146
|
+
- Base UI-first React components
|
|
147
|
+
- 20 CSS-token visual styles
|
|
148
|
+
- 8 product blocks
|
|
149
|
+
- shadcn-style registry metadata
|
|
150
|
+
- CLI: list, plan, add, doctor, and JSON output for agents
|
|
151
|
+
- React 18 + 19 support
|
|
152
|
+
|
|
153
|
+
Try:
|
|
154
|
+
npx base-themes doctor .
|
|
155
|
+
|
|
156
|
+
https://github.com/markbang/base-themes
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Hacker News / Reddit
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
Show HN: Base Themes - accessible Base UI React components with 20 themes
|
|
163
|
+
|
|
164
|
+
Base Themes is an open-source React component system built on @base-ui/react. It provides typed wrappers, CSS-variable themes, 20 curated visual styles, source-copyable registry metadata, product blocks, and CLI helpers for checking integration.
|
|
165
|
+
|
|
166
|
+
The project is package-first rather than template-first: install from npm, import one CSS file, set data-style/data-theme, and use the components or blocks. It also ships registry metadata for tools that prefer source-copy workflows.
|
|
167
|
+
|
|
168
|
+
The part I am most interested in getting feedback on: does the Base UI-first + registry + agent-friendly workflow solve a real gap for teams that like shadcn-style ownership but want a packaged multi-theme system?
|
|
169
|
+
|
|
170
|
+
Repo: https://github.com/markbang/base-themes
|
|
171
|
+
Docs: https://base-themes.bangwu.me
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Product Hunt / Directory Submission
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
Base Themes is a React component system built on Base UI. It ships accessible typed components, 20 CSS-token visual styles, source-copyable registry metadata, product blocks, and CLI checks for integrating the package into Vite or Next.js apps.
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Calls To Action
|
|
181
|
+
|
|
182
|
+
Rotate calls to action instead of asking for everything at once:
|
|
183
|
+
|
|
184
|
+
- Star the repo if the Base UI-first direction is useful.
|
|
185
|
+
- In social, forum, and directory posts, phrase the star ask as evidence after trying the package, not as generic promotion.
|
|
186
|
+
- Run `npx base-themes add button select --target . --dry-run` or `npx base-themes doctor .` in a Vite or Next.js app and report rough edges.
|
|
187
|
+
- Pick one published good-first issue from `npm run community:issues` output and comment before opening a PR.
|
|
188
|
+
- Open an issue for the component, block, or theme that would make the package usable in a real project.
|
|
189
|
+
- Open a Show and tell Discussion with what worked, what was missing, and which `data-style` you used.
|
|
190
|
+
- Submit a screenshot or repo through the community gallery template after using Base Themes.
|
|
191
|
+
- Fork the repo if you want to add a theme, block, or docs example, then run the Fork-to-first-change workflow with `npm run example:theme-customization:build` or `npm run example:registry-copy -- plan button select block:dashboard-shell theme:enterprise --json` before sharing the result.
|
|
192
|
+
|
|
193
|
+
## Adoption Completion Gate
|
|
194
|
+
|
|
195
|
+
Treat the strategy as externally validated only when at least three of these four public signals pass in a telemetry report:
|
|
196
|
+
|
|
197
|
+
| Signal | Threshold | Source |
|
|
198
|
+
| --- | --- | --- |
|
|
199
|
+
| npm weekly downloads | `>= 100` and stable or growing | `npm run telemetry:collect` |
|
|
200
|
+
| GitHub stars | `>= 10` | `npm run telemetry:collect` |
|
|
201
|
+
| External issues or PRs | At least one non-maintainer issue or PR beyond release automation | `npm run telemetry:collect` plus issue review |
|
|
202
|
+
| Forks | `>= 1` | `npm run telemetry:collect` |
|
|
203
|
+
|
|
204
|
+
Use private analytics as supporting evidence when available:
|
|
205
|
+
|
|
206
|
+
- Cloudflare unique visitors and route views.
|
|
207
|
+
- GitHub outbound clicks from docs, grouped by `repo-star`, `repo-fork`, `show-and-tell`, `feature-request`, `bug-report`, and `gallery-submission` targets.
|
|
208
|
+
- Install command copies.
|
|
209
|
+
- Theme, block, and CLI page depth.
|
|
210
|
+
- Registry artifact requests, `/llms.txt` requests, and `/llms-full.txt` requests.
|
|
211
|
+
- Search Console impressions and queries.
|
|
212
|
+
- Community gallery submissions.
|
|
213
|
+
|
|
214
|
+
## Follow-Up Telemetry Schedule
|
|
215
|
+
|
|
216
|
+
Collect and compare telemetry at:
|
|
217
|
+
|
|
218
|
+
- T+0: immediately after publish and docs deploy.
|
|
219
|
+
- T+1 day: early social response.
|
|
220
|
+
- T+7 days: npm weekly download slope and GitHub activity.
|
|
221
|
+
- T+30 days: sustained interest, search indexing, and community submissions.
|
|
222
|
+
|
|
223
|
+
Each pass should answer:
|
|
224
|
+
|
|
225
|
+
- Which channel produced measurable activity?
|
|
226
|
+
- Which route or screenshot earned the most interest?
|
|
227
|
+
- What blocked installation or first use?
|
|
228
|
+
- What component, block, or theme did users ask for repeatedly?
|
|
229
|
+
- Should the next iteration improve package reliability, blocks, docs SEO, or agent-native registry workflow?
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Search Console Setup
|
|
2
|
+
|
|
3
|
+
Use this checklist after the docs site is deployed. It turns the SEO route work into measurable search evidence for the adoption dashboard.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Prove that Base Themes can be discovered from search, not only from direct links or npm.
|
|
8
|
+
|
|
9
|
+
Search evidence is supporting evidence for adoption. It does not replace the public completion gate in [adoption-dashboard.md](./adoption-dashboard.md), but it helps explain why npm downloads, stars, forks, and issues are moving or stalled.
|
|
10
|
+
|
|
11
|
+
## Property Setup
|
|
12
|
+
|
|
13
|
+
1. Add `https://base-themes.bangwu.me` as a URL-prefix property in Google Search Console.
|
|
14
|
+
2. Verify ownership with the Cloudflare-recommended method available to the maintainer account.
|
|
15
|
+
3. Submit the sitemap:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
https://base-themes.bangwu.me/sitemap.xml
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
4. Confirm the generated robots file is reachable:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
https://base-themes.bangwu.me/robots.txt
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
5. Confirm the agent discovery file is reachable:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
https://base-themes.bangwu.me/llms.txt
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## URL Inspection Queue
|
|
34
|
+
|
|
35
|
+
Request indexing for the routes most likely to convert searchers into users:
|
|
36
|
+
|
|
37
|
+
| Route | Why It Matters |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `/` | Primary package positioning and install path. |
|
|
40
|
+
| `/docs/installation` | Highest-intent install query target. |
|
|
41
|
+
| `/docs/base-ui-vs-shadcn` | Comparison query target for Base UI and shadcn users. |
|
|
42
|
+
| `/docs/registry` | Registry/source-copy workflow target. |
|
|
43
|
+
| `/docs/cli` | CLI and integration-check workflow target. |
|
|
44
|
+
| `/docs/agent-usage` | Agent-native workflow target. |
|
|
45
|
+
| `/docs/examples` | Fresh-install examples and framework integration target. |
|
|
46
|
+
| `/themes` | Theme discovery hub. |
|
|
47
|
+
| `/themes/bento` | Default visual system and social preview route. |
|
|
48
|
+
| `/themes/enterprise` | Operational SaaS/product UI query target. |
|
|
49
|
+
| `/themes/terminal` | Distinctive developer-tool style query target. |
|
|
50
|
+
| `/blocks` | Blocks discovery hub. |
|
|
51
|
+
| `/blocks/dashboard-shell` | Product-screen proof point. |
|
|
52
|
+
| `/blocks/data-table` | Dense workflow proof point. |
|
|
53
|
+
| `/components/button` | Common component query target. |
|
|
54
|
+
| `/components/select` | Accessibility and form-control query target. |
|
|
55
|
+
| `/components/dialog` | Overlay/focus-management query target. |
|
|
56
|
+
|
|
57
|
+
## Query Categories
|
|
58
|
+
|
|
59
|
+
Track queries by intent instead of only watching total impressions:
|
|
60
|
+
|
|
61
|
+
| Category | Example Queries | Useful When |
|
|
62
|
+
| --- | --- | --- |
|
|
63
|
+
| Brand | `base themes`, `base-themes`, `markbang base themes` | Confirms announcements create branded demand. |
|
|
64
|
+
| Base UI | `base ui themes`, `base ui react components`, `base ui component library` | Confirms the primary positioning is discoverable. |
|
|
65
|
+
| shadcn comparison | `base ui vs shadcn`, `shadcn base ui`, `shadcn registry themes` | Confirms comparison content reaches high-intent users. |
|
|
66
|
+
| Registry | `react component registry`, `shadcn style registry`, `llms.txt ui library` | Confirms source-copy and agent metadata work as acquisition hooks. |
|
|
67
|
+
| Theme styles | `react terminal theme`, `enterprise react ui theme`, `data dense dashboard ui` | Confirms visual styles create long-tail discovery. |
|
|
68
|
+
| Components | `base ui button theme`, `accessible react select`, `react dialog base ui` | Confirms component docs are discoverable. |
|
|
69
|
+
|
|
70
|
+
## Metrics To Record
|
|
71
|
+
|
|
72
|
+
Record these values beside each telemetry pass in `research/telemetry-YYYY-MM-DD.md` or in the release notes:
|
|
73
|
+
|
|
74
|
+
| Metric | Healthy Early Signal |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| Indexed pages | Sitemap routes start appearing as indexed instead of discovered-only. |
|
|
77
|
+
| Total impressions | Growing week over week after announcements and indexing. |
|
|
78
|
+
| Clicks | Any non-zero clicks for install, comparison, registry, CLI, theme, or block pages. |
|
|
79
|
+
| CTR | Pages with impressions but low CTR need title and description adjustments. |
|
|
80
|
+
| Average position | Long-tail pages moving into top 30 are candidates for deeper examples. |
|
|
81
|
+
| Top queries | Queries should map to Base UI, shadcn comparison, registry, theme, or component intent. |
|
|
82
|
+
| Top pages | Clicks should not land only on the homepage; docs, themes, blocks, and components should earn depth. |
|
|
83
|
+
|
|
84
|
+
To include exported Search Console rows in the telemetry report, export a query or page performance CSV/JSON from Search Console and run:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
SEARCH_CONSOLE_EXPORT=path/to/search-console-export.csv npm run telemetry:collect
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The importer accepts common columns such as `Query`, `Page`, `Clicks`, `Impressions`, `CTR`, and `Position`, plus Search Console API-style JSON rows with `keys`, `clicks`, `impressions`, `ctr`, and `position`.
|
|
91
|
+
|
|
92
|
+
## Launch-Day Checklist
|
|
93
|
+
|
|
94
|
+
After each release announcement:
|
|
95
|
+
|
|
96
|
+
1. Run `npm run build && npm run seo:check` before deploy.
|
|
97
|
+
2. Deploy the docs site.
|
|
98
|
+
3. Open `/sitemap.xml`, `/robots.txt`, `/llms.txt`, `/llms-full.txt`, `/registry/registry.json`, and one theme page from production.
|
|
99
|
+
4. Submit the sitemap in Search Console.
|
|
100
|
+
5. Request indexing for the URL inspection queue above.
|
|
101
|
+
6. Share the routes listed in [release-announcement-kit.md](./release-announcement-kit.md) so Search Console can correlate announcement demand with landing pages.
|
|
102
|
+
7. Check Search Console again at T+1 day, T+7 days, and T+30 days.
|
|
103
|
+
8. Record whether search produced clicks, impressions, or new queries that should become docs pages.
|
|
104
|
+
|
|
105
|
+
## Decision Rules
|
|
106
|
+
|
|
107
|
+
- If pages are not indexed after a week, inspect canonical URLs, sitemap entries, robots rules, response status, and duplicate titles.
|
|
108
|
+
- If impressions grow but clicks stay flat, rewrite titles/descriptions for the affected route group and rerun `npm run seo:check`.
|
|
109
|
+
- If query demand clusters around a missing comparison, component, block, or framework workflow, create a focused docs page instead of broad homepage copy.
|
|
110
|
+
- If search clicks appear but npm downloads, stars, issues, or forks do not move, improve install snippets, examples, and page-level CTAs on those landing routes.
|
|
111
|
+
- If Search Console shows only branded queries, keep external sharing active and add deeper non-brand content around Base UI, registry, themes, and migration workflows.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Theme Token Contract
|
|
2
|
+
|
|
3
|
+
Base Themes uses this document and `src/styles/tokenContract.json` as the public theme token contract for the 0.x line.
|
|
4
|
+
|
|
5
|
+
## Version
|
|
6
|
+
|
|
7
|
+
- Contract version: `0.1.0`
|
|
8
|
+
- Stable public prefix: `--bt-`
|
|
9
|
+
- Required theme attributes: `data-style` and `data-theme`
|
|
10
|
+
- Supported style variants are listed in `registry/registry.json` and mirrored in the standard registry artifacts under `registry/shadcn-registry.json` and `registry/items/theme-*.json`.
|
|
11
|
+
|
|
12
|
+
The package still keeps legacy variables such as `--bg`, `--surface`, `--accent`, and `--theme-focus` for compatibility. New docs, examples, registry metadata, and agent workflows should prefer the `--bt-*` tokens below.
|
|
13
|
+
|
|
14
|
+
## Public Tokens
|
|
15
|
+
|
|
16
|
+
Semantic tokens:
|
|
17
|
+
|
|
18
|
+
- `--bt-bg`: page background.
|
|
19
|
+
- `--bt-fg`: primary foreground text.
|
|
20
|
+
- `--bt-text`: default body text.
|
|
21
|
+
- `--bt-muted-fg`: secondary text and labels.
|
|
22
|
+
- `--bt-surface`: default panel or control surface.
|
|
23
|
+
- `--bt-surface-muted`: subtle grouped surface.
|
|
24
|
+
- `--bt-surface-strong`: high-contrast surface used for inverse controls.
|
|
25
|
+
- `--bt-border`: default border color.
|
|
26
|
+
- `--bt-border-strong`: higher emphasis border color.
|
|
27
|
+
- `--bt-primary`: primary action color.
|
|
28
|
+
- `--bt-primary-hover`: primary action hover or pressed color.
|
|
29
|
+
- `--bt-primary-fg`: text/icon color on primary actions.
|
|
30
|
+
- `--bt-secondary`: secondary action color.
|
|
31
|
+
- `--bt-secondary-fg`: text/icon color on secondary actions.
|
|
32
|
+
- `--bt-info`: informational accent color.
|
|
33
|
+
- `--bt-success`: success accent color.
|
|
34
|
+
- `--bt-danger`: danger/error accent color.
|
|
35
|
+
- `--bt-danger-fg`: text/icon color on danger actions.
|
|
36
|
+
- `--bt-ring`: focus ring color.
|
|
37
|
+
|
|
38
|
+
Shape and typography tokens:
|
|
39
|
+
|
|
40
|
+
- `--bt-radius`: default large radius.
|
|
41
|
+
- `--bt-radius-sm`: compact control radius.
|
|
42
|
+
- `--bt-font-sans`: sans-serif font stack.
|
|
43
|
+
- `--bt-font-mono`: monospace font stack.
|
|
44
|
+
- `--bt-shadow`: default elevated shadow.
|
|
45
|
+
- `--bt-shadow-strong`: high emphasis shadow.
|
|
46
|
+
|
|
47
|
+
Component alias tokens:
|
|
48
|
+
|
|
49
|
+
- `--bt-button-bg`: default button background.
|
|
50
|
+
- `--bt-button-fg`: default button foreground.
|
|
51
|
+
- `--bt-button-border`: button border color.
|
|
52
|
+
- `--bt-input-bg`: input background.
|
|
53
|
+
- `--bt-input-fg`: input foreground.
|
|
54
|
+
- `--bt-input-border`: input border color.
|
|
55
|
+
- `--bt-select-popup-bg`: select/menu popup background.
|
|
56
|
+
- `--bt-select-popup-fg`: select/menu popup foreground.
|
|
57
|
+
- `--bt-tabs-active-bg`: active tab background.
|
|
58
|
+
- `--bt-tabs-active-fg`: active tab foreground.
|
|
59
|
+
|
|
60
|
+
Motion and density tokens:
|
|
61
|
+
|
|
62
|
+
- `--bt-border-width`: default control border width.
|
|
63
|
+
- `--bt-font-weight`: default control font weight.
|
|
64
|
+
- `--bt-duration`: default interaction transition duration.
|
|
65
|
+
- `--bt-letter-spacing`: default control letter spacing.
|
|
66
|
+
- `--bt-control-height`: default control height for dense customization.
|
|
67
|
+
|
|
68
|
+
## Public Boundary
|
|
69
|
+
|
|
70
|
+
Treat the tokens above, `data-style`, and `data-theme` as the stable public surface. Theme-specific implementation variables without the `--bt-` prefix are compatibility aliases in the 0.x line and may be normalized before a future stable release.
|
|
71
|
+
|
|
72
|
+
Docs-only tokens such as `--topbar-bg`, `--card-bg`, and `--hero-text` belong to the documentation site shell. They are not a package component API and should not be required by consumer apps.
|
|
73
|
+
|
|
74
|
+
## Customization
|
|
75
|
+
|
|
76
|
+
Override tokens on a themed root or in app CSS after importing `base-themes/styles.css`:
|
|
77
|
+
|
|
78
|
+
```css
|
|
79
|
+
.brand-shell {
|
|
80
|
+
--bt-primary: #2563eb;
|
|
81
|
+
--bt-primary-hover: #1d4ed8;
|
|
82
|
+
--bt-radius: 10px;
|
|
83
|
+
--bt-radius-sm: 8px;
|
|
84
|
+
--bt-font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
|
|
85
|
+
--bt-control-height: 36px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.brand-shell[data-theme='dark'] {
|
|
89
|
+
--bt-bg: #0b1120;
|
|
90
|
+
--bt-surface: #111827;
|
|
91
|
+
--bt-fg: #f8fafc;
|
|
92
|
+
--bt-primary: #60a5fa;
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For current 0.x builds, the shipped CSS maps each `--bt-*` token to the matching legacy implementation token. If a component still reads a legacy token directly, override both names during migration:
|
|
97
|
+
|
|
98
|
+
```css
|
|
99
|
+
.brand-shell {
|
|
100
|
+
--bt-primary: #2563eb;
|
|
101
|
+
--accent: var(--bt-primary);
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Validation
|
|
106
|
+
|
|
107
|
+
Run the token contract check after editing theme variables, theme metadata, registry style variants, or token docs:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npm run tokens:check
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The check verifies that every public `--bt-*` token exists in `src/styles/tokens.css`, maps to a legacy compatibility token, every registry style has token coverage plus a light or dark mode override where needed, and this documentation covers the public names.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Base Themes Dashboard Example
|
|
2
|
+
|
|
3
|
+
This Vite example shows a product-style dashboard assembled from the public `base-themes` package surface. It combines shipped blocks, components, registry metadata, theme switching, and package CSS in one app-like screen.
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm run dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Open `http://localhost:5177`.
|
|
13
|
+
|
|
14
|
+
## Verify
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The example intentionally imports only documented package paths:
|
|
21
|
+
|
|
22
|
+
- `base-themes`
|
|
23
|
+
- `base-themes/styles.css`
|
|
24
|
+
- `base-themes/registry.json`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en" data-theme="light" data-style="enterprise">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Base Themes Dashboard Example</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|