@flam-ai/tokens 0.0.0-stage → 0.1.0

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 (3) hide show
  1. package/README.md +41 -2
  2. package/package.json +22 -3
  3. package/theme.css +89 -0
package/README.md CHANGED
@@ -1,3 +1,42 @@
1
- # Temporary Holding Version
1
+ # Flam tokens
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Flam's colour tokens as CSS variables, for shadcn/ui projects on Tailwind v4.
4
+
5
+ ```bash
6
+ npm install @flam-ai/tokens
7
+ ```
8
+
9
+ In the project's global CSS, import it after Tailwind and remove the project's own `:root` and `.dark` token blocks:
10
+
11
+ ```css
12
+ @import "tailwindcss";
13
+ @import "@flam-ai/tokens/theme.css";
14
+ ```
15
+
16
+ A version bump of this package is then all a project needs to pick up new token values.
17
+
18
+ Token names follow shadcn/ui. `--brand` and `--brand-foreground` are the only additions.
19
+
20
+ ## One route per project
21
+
22
+ Use this package or the registry copy (`npx shadcn add @flam/theme`), never both. With both, the project holds two sets of token values that can disagree.
23
+
24
+ - **Product apps:** this package.
25
+ - **Prototypes and one-off projects:** the registry copy.
26
+
27
+ ## Staying up to date
28
+
29
+ Let Dependabot raise the version bump. In the project's `.github/dependabot.yml`:
30
+
31
+ ```yaml
32
+ version: 2
33
+ updates:
34
+ - package-ecosystem: npm
35
+ directory: /
36
+ schedule:
37
+ interval: weekly
38
+ groups:
39
+ flam-design:
40
+ patterns:
41
+ - "@flam-ai/*"
42
+ ```
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "@flam-ai/tokens",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Flam design tokens as CSS variables for shadcn/ui and Tailwind v4 projects.",
5
+ "license": "UNLICENSED",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/FlamDesign/fuse-design.git",
9
+ "directory": "packages/tokens"
10
+ },
11
+ "files": [
12
+ "theme.css",
13
+ "README.md"
14
+ ],
15
+ "exports": {
16
+ "./theme.css": "./theme.css"
17
+ },
18
+ "style": "./theme.css",
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ }
6
25
  }
package/theme.css ADDED
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Flam design tokens. This file is the single source of truth.
3
+ *
4
+ * - The kit imports it from src/index.css.
5
+ * - `npm run registry:build` copies the values into the @flam/theme registry item.
6
+ * - It is published to npm as the tokens package, so projects that import it
7
+ * pick up new values with a version bump.
8
+ *
9
+ * Token names follow shadcn/ui and must not be renamed. `--brand` and
10
+ * `--brand-foreground` are the only additions.
11
+ */
12
+
13
+ :root {
14
+ --background: oklch(0.988 0.004 84);
15
+ --foreground: oklch(0.216 0.006 56.043);
16
+ --card: oklch(1 0 0);
17
+ --card-foreground: oklch(0.216 0.006 56.043);
18
+ --popover: oklch(1 0 0);
19
+ --popover-foreground: oklch(0.216 0.006 56.043);
20
+ --primary: oklch(0.216 0.006 56.043);
21
+ --primary-foreground: oklch(0.988 0.004 84);
22
+ --secondary: oklch(0.954 0.008 84);
23
+ --secondary-foreground: oklch(0.216 0.006 56.043);
24
+ --muted: oklch(0.954 0.008 84);
25
+ --muted-foreground: oklch(0.5 0.013 58.071);
26
+ --accent: oklch(0.954 0.008 84);
27
+ --accent-foreground: oklch(0.216 0.006 56.043);
28
+ --destructive: oklch(0.505 0.213 27.5);
29
+ --border: oklch(0.915 0.008 80);
30
+ --input: oklch(0.915 0.008 80);
31
+ --ring: oklch(0.709 0.01 56.259);
32
+ --chart-1: oklch(0.837 0.128 66.29);
33
+ --chart-2: oklch(0.705 0.213 47.604);
34
+ --chart-3: oklch(0.646 0.222 41.116);
35
+ --chart-4: oklch(0.553 0.195 38.402);
36
+ --chart-5: oklch(0.47 0.157 37.304);
37
+ --radius: 0.625rem;
38
+ --brand: oklch(0.555 0.163 48.998);
39
+ --brand-foreground: oklch(0.987 0.022 95.277);
40
+ --sidebar: oklch(0.943 0.008 84);
41
+ --sidebar-foreground: oklch(0.216 0.006 56.043);
42
+ --sidebar-primary: oklch(0.216 0.006 56.043);
43
+ --sidebar-primary-foreground: oklch(0.988 0.004 84);
44
+ --sidebar-accent: oklch(0.905 0.011 80);
45
+ --sidebar-accent-foreground: oklch(0.216 0.006 56.043);
46
+ --sidebar-border: oklch(0.9 0.01 80);
47
+ --sidebar-ring: oklch(0.709 0.01 56.259);
48
+ }
49
+
50
+ .dark {
51
+ --background: oklch(0.235 0.006 56);
52
+ --foreground: oklch(0.97 0.002 84);
53
+ --card: oklch(0.265 0.007 56);
54
+ --card-foreground: oklch(0.97 0.002 84);
55
+ --popover: oklch(0.275 0.007 56);
56
+ --popover-foreground: oklch(0.97 0.002 84);
57
+ --primary: oklch(0.94 0.004 84);
58
+ --primary-foreground: oklch(0.216 0.006 56.043);
59
+ --secondary: oklch(0.33 0.008 56);
60
+ --secondary-foreground: oklch(0.97 0.002 84);
61
+ --muted: oklch(0.33 0.008 56);
62
+ --muted-foreground: oklch(0.72 0.012 70);
63
+ --accent: oklch(0.38 0.009 56);
64
+ --accent-foreground: oklch(0.97 0.002 84);
65
+ --destructive: oklch(0.8 0.125 22.2);
66
+ --border: oklch(1 0 0 / 10%);
67
+ --input: oklch(1 0 0 / 14%);
68
+ --ring: oklch(0.553 0.013 58.071);
69
+ --chart-1: oklch(0.837 0.128 66.29);
70
+ --chart-2: oklch(0.705 0.213 47.604);
71
+ --chart-3: oklch(0.646 0.222 41.116);
72
+ --chart-4: oklch(0.553 0.195 38.402);
73
+ --chart-5: oklch(0.47 0.157 37.304);
74
+ --brand: oklch(0.56 0.16 47.5);
75
+ --brand-foreground: oklch(0.987 0.022 95.277);
76
+ --sidebar: oklch(0.2 0.006 56);
77
+ --sidebar-foreground: oklch(0.97 0.002 84);
78
+ --sidebar-primary: oklch(0.94 0.004 84);
79
+ --sidebar-primary-foreground: oklch(0.216 0.006 56.043);
80
+ --sidebar-accent: oklch(0.29 0.008 56);
81
+ --sidebar-accent-foreground: oklch(0.97 0.002 84);
82
+ --sidebar-border: oklch(1 0 0 / 8%);
83
+ --sidebar-ring: oklch(0.553 0.013 58.071);
84
+ }
85
+
86
+ @theme inline {
87
+ --color-brand: var(--brand);
88
+ --color-brand-foreground: var(--brand-foreground);
89
+ }