base-themes 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
+ import { type ThemeStyle } from '../styles/themeList';
1
2
  type Theme = 'light' | 'dark' | 'system';
2
- type ThemeStyle = 'bento' | 'shadcn' | 'neo-brutalism';
3
3
  export declare function useTheme(): {
4
4
  theme: Theme;
5
5
  setTheme: (t: Theme) => void;
6
6
  resolved: "light" | "dark";
7
- style: ThemeStyle;
7
+ style: "bento" | "shadcn" | "neo-brutalism" | "minimal" | "enterprise" | "linear" | "glass" | "terminal" | "material" | "fluent" | "retro" | "cyberpunk" | "editorial" | "calm" | "data-dense" | "playful" | "luxury" | "soft-ui" | "bauhaus" | "mono";
8
8
  setStyle: (nextStyle: ThemeStyle) => void;
9
9
  };
10
10
  export type { Theme, ThemeStyle };
@@ -1,3 +1,4 @@
1
+ import './index.css';
1
2
  export * from './components/ui';
2
3
  export { useTheme } from './hooks/useTheme';
3
4
  export type { Theme, ThemeStyle } from './hooks/useTheme';
@@ -0,0 +1,4 @@
1
+ export declare const themeStyles: readonly ["bento", "shadcn", "neo-brutalism", "minimal", "enterprise", "linear", "glass", "terminal", "material", "fluent", "retro", "cyberpunk", "editorial", "calm", "data-dense", "playful", "luxury", "soft-ui", "bauhaus", "mono"];
2
+ export type ThemeStyle = (typeof themeStyles)[number];
3
+ export declare const themeStyleLabels: Record<ThemeStyle, string>;
4
+ export declare const themeStyleDescriptions: Record<ThemeStyle, string>;
package/package.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
2
  "name": "base-themes",
3
3
  "private": false,
4
- "version": "0.1.0",
5
- "description": "Themeable Base UI React components with Bento, shadcn, and neo brutalism styles.",
4
+ "version": "0.1.2",
5
+ "description": "Themeable Base UI React components with Bento, shadcn, neo brutalism, and expressive product UI styles.",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/markbang/base-themes.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/markbang/base-themes/issues"
14
+ },
15
+ "homepage": "https://github.com/markbang/base-themes#readme",
8
16
  "sideEffects": [
9
17
  "**/*.css"
10
18
  ],
@@ -36,6 +44,8 @@
36
44
  "build:lib": "vite build --config vite.lib.config.ts",
37
45
  "lint": "eslint .",
38
46
  "registry:check": "node scripts/validate-registry.mjs",
47
+ "previews:generate": "node scripts/generate-theme-previews.mjs",
48
+ "themes:e2e": "node scripts/verify-themes-e2e.mjs",
39
49
  "prepack": "npm run registry:check && npm run lint && npm run build",
40
50
  "preview": "vite preview"
41
51
  },
@@ -7,7 +7,7 @@
7
7
  "tokens": "src/styles/tokens.css",
8
8
  "global": "src/index.css",
9
9
  "default": "bento",
10
- "variants": ["bento", "shadcn", "neo-brutalism"]
10
+ "variants": ["bento", "shadcn", "neo-brutalism", "minimal", "enterprise", "linear", "glass", "terminal", "material", "fluent", "retro", "cyberpunk", "editorial", "calm", "data-dense", "playful", "luxury", "soft-ui", "bauhaus", "mono"]
11
11
  },
12
12
  "components": [
13
13
  { "name": "accordion", "title": "Accordion", "files": ["src/components/ui/Accordion.tsx", "src/components/ui/Accordion.css"] },
@@ -7,7 +7,7 @@ description: Install and extend the Base Themes React component kit built on Bas
7
7
 
8
8
  ## Quick Start
9
9
 
10
- Install the package and peer dependencies in the target React app:
10
+ Install the package and peer dependencies in the target React app. Prefer this npm package flow for normal usage:
11
11
 
12
12
  ```bash
13
13
  npm install base-themes @base-ui/react react react-dom
@@ -39,7 +39,15 @@ export function Example() {
39
39
  }
40
40
  ```
41
41
 
42
- For source-copy installs, copy the component wrappers and styles:
42
+ Registry metadata is available from the package when an agent or script needs to inspect components, blocks, dependencies, or required files:
43
+
44
+ ```ts
45
+ import registry from 'base-themes/registry.json'
46
+ ```
47
+
48
+ This skill markdown is included in the installed package at `node_modules/base-themes/skills/base-themes/SKILL.md` and exposed as `base-themes/skill` for tools that read package exports.
49
+
50
+ For source-copy installs only, copy the component wrappers and styles:
43
51
 
44
52
  ```bash
45
53
  cp -R src/components/ui ./target-app/src/components/ui
@@ -56,11 +64,12 @@ Import the tokens once from app CSS:
56
64
 
57
65
  ### Add A Component
58
66
 
59
- 1. Check `registry/registry.json` for the component entry.
60
- 2. Copy every file listed in the entry's `files` array.
61
- 3. Ensure `src/styles/tokens.css`, `src/styles/shadcn.css`, and `src/styles/neo-brutalism.css` are imported by the target app when source-copying.
62
- 4. Install dependencies from the registry `dependencies` array.
63
- 5. Import the component from `src/components/ui`.
67
+ 1. For package installs, import the component from `base-themes` and import `base-themes/styles.css` once.
68
+ 2. For source-copy installs, check `registry/registry.json` or `base-themes/registry.json` for the component entry.
69
+ 3. Copy every file listed in the entry's `files` array.
70
+ 4. Ensure `src/styles/tokens.css`, `src/styles/shadcn.css`, `src/styles/neo-brutalism.css`, and `src/styles/themes.css` are imported by the target app when source-copying.
71
+ 5. Install dependencies from the registry `dependencies` array.
72
+ 6. Import the component from `src/components/ui`.
64
73
 
65
74
  ### Add A Block
66
75