@baukit/ui-tokens 0.1.0 → 0.1.1

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 (2) hide show
  1. package/README.md +12 -5
  2. package/package.json +9 -8
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  A dependency-free design-token schema, validator, accessibility checker, and deterministic compiler for web and React Native.
4
4
 
5
- This package shares semantic values such as `color.background.primary`; it is deliberately not a design system or cross-platform component library. DOM/React Native components, interaction behavior, raw brand-palette decisions, and product-specific themes remain outside the package.
6
-
7
5
  ## Define and validate tokens
8
6
 
9
7
  ```ts
@@ -26,7 +24,7 @@ const css = toCssVariables(tokens);
26
24
  const nativeModule = toReactNative(tokens);
27
25
  ```
28
26
 
29
- `toCssVariables` emits sorted `--bk-*` declarations in `:root`, then dark color overrides under `[data-theme="dark"]`. `toReactNative` emits a sorted nested `tokens` constant with an inferred `Tokens` type. Accessibility declarations are build metadata and are omitted from generated runtime constants. `exampleTokens` is available as a test fixture demonstrating every group; it is intentionally not a Baukit visual language.
27
+ `toCssVariables` emits sorted `--bk-*` declarations in `:root`, then dark color overrides under `[data-theme="dark"]`. `toReactNative` emits a sorted nested `tokens` constant with an inferred `Tokens` type. Accessibility declarations are build metadata and are omitted from generated runtime constants.
30
28
 
31
29
  ## Enforce tokens with `no-raw-color`
32
30
 
@@ -76,5 +74,14 @@ Options:
76
74
  | `additionalStyleProperties` | `[]` | Extra property or attribute names treated as style-like. |
77
75
  | `reportKeywords` | `true` | Set to `false` to report only hex and functional notations. |
78
76
 
79
- eslint is an optional peer dependency. Importing `@baukit/ui-tokens` itself
80
- never loads it.
77
+ ## Boundaries
78
+
79
+ This package shares semantic values such as `color.background.primary`. It is deliberately not a
80
+ design system and not a cross-platform component library: DOM and React Native components,
81
+ interaction behavior, raw brand-palette decisions, and product themes all stay outside it.
82
+
83
+ `exampleTokens` demonstrates every group as a test fixture. It is not a Baukit visual language, and
84
+ copying it into a product as a starting palette is not what it is for.
85
+
86
+ The production entry point has no runtime dependencies. `eslint` is an optional peer dependency
87
+ reached only through the `/eslint` subpath, so importing the package never loads it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baukit/ui-tokens",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Dependency-free design-token schema, validator, accessibility checker, and deterministic compiler for web and React Native.",
5
5
  "license": "MIT",
6
6
  "author": "Patrick Koss",
@@ -36,6 +36,13 @@
36
36
  "README.md",
37
37
  "LICENSE"
38
38
  ],
39
+ "scripts": {
40
+ "build": "tsc -p tsconfig.json",
41
+ "prepare": "pnpm run build",
42
+ "test": "vitest run --config ../../vitest.config.ts",
43
+ "lint": "eslint src --max-warnings=0",
44
+ "format:check": "prettier --check src package.json tsconfig.json"
45
+ },
39
46
  "devDependencies": {
40
47
  "@types/estree": "1.0.9",
41
48
  "eslint": "9.39.5",
@@ -49,11 +56,5 @@
49
56
  "eslint": {
50
57
  "optional": true
51
58
  }
52
- },
53
- "scripts": {
54
- "build": "tsc -p tsconfig.json",
55
- "test": "vitest run --config ../../vitest.config.ts",
56
- "lint": "eslint src --max-warnings=0",
57
- "format:check": "prettier --check src package.json tsconfig.json"
58
59
  }
59
- }
60
+ }