opsfuse-ui 0.1.8 → 0.1.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opsfuse-ui",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -45,6 +45,7 @@
45
45
  },
46
46
  "./styles.css": "./dist/style.css",
47
47
  "./styles.layered.css": "./dist/style.layered.css",
48
+ "./theme.css": "./theme.css",
48
49
  "./package.json": "./package.json"
49
50
  },
50
51
  "sideEffects": [
@@ -54,6 +55,7 @@
54
55
  "files": [
55
56
  "dist",
56
57
  "scripts",
58
+ "theme.css",
57
59
  ".claude"
58
60
  ],
59
61
  "scripts": {
package/theme.css ADDED
@@ -0,0 +1,145 @@
1
+ /* ════════════════════════════════════════════════════════════════
2
+ OPSFUSE — Tailwind v4 Theme Map (consumer entrypoint)
3
+
4
+ The SINGLE source of truth that maps every opsfuse design token to a
5
+ Tailwind v4 theme variable, so utilities like `bg-card`, `text-foreground`,
6
+ `border-success`, `bg-success-muted`, `text-ai-muted-foreground`, etc. are
7
+ generated for both the library and any consuming app.
8
+
9
+ ── WHY `@theme inline` (NOT plain `@theme`) ───────────────────────────
10
+ The runtime token VALUES (`--success`, `--card`, …) are scoped to
11
+ `.opsfuse-ui` (see brands.css), NOT to `:root`. A plain `@theme` emits
12
+ `--color-success: var(--success)` onto `:root`, where `--success` is
13
+ undefined → the variable collapses to guaranteed-invalid and every utility
14
+ that depends on it renders with no color. `inline` makes Tailwind substitute
15
+ `var(--success)` DIRECTLY into each utility, so it is resolved per-element
16
+ against the nearest `.opsfuse-ui` ancestor — correct under every brand and in
17
+ dark mode, with zero `:root` leakage.
18
+
19
+ ── HOW TO CONSUME ─────────────────────────────────────────────────────
20
+ In your Tailwind v4 entry CSS, AFTER `@import "tailwindcss"`:
21
+
22
+ @import "tailwindcss";
23
+ @import "opsfuse-ui/theme.css";
24
+
25
+ That is all a host needs to declare — do NOT re-map these tokens locally.
26
+ ════════════════════════════════════════════════════════════════ */
27
+
28
+ @theme inline {
29
+ /* ── Surfaces ───────────────────────────────────────────── */
30
+ --color-background: var(--background);
31
+ --color-foreground: var(--foreground);
32
+ --color-card: var(--card);
33
+ --color-card-foreground: var(--card-foreground);
34
+ --color-popover: var(--popover);
35
+ --color-popover-foreground: var(--popover-foreground);
36
+ --color-muted: var(--muted);
37
+ --color-muted-foreground: var(--muted-foreground);
38
+ --color-accent: var(--accent);
39
+ --color-accent-foreground: var(--accent-foreground);
40
+ --color-secondary: var(--secondary);
41
+ --color-secondary-foreground: var(--secondary-foreground);
42
+
43
+ /* ── Text ───────────────────────────────────────────────── */
44
+ --color-subtle-foreground: var(--subtle-foreground);
45
+ --color-disabled-foreground: var(--disabled-foreground);
46
+ /* legacy aliases kept for back-compat */
47
+ --color-text-disabled: var(--disabled-foreground);
48
+ --color-text-input-placeholder: var(--muted-foreground);
49
+
50
+ /* ── Primary (+ tints) ──────────────────────────────────── */
51
+ --color-primary: var(--primary);
52
+ --color-primary-foreground: var(--primary-foreground);
53
+ --color-primary-hover: var(--primary-hover);
54
+ --color-primary-active: var(--primary-active);
55
+ --color-primary-muted: var(--primary-muted);
56
+ --color-primary-muted-hover: var(--primary-muted-hover);
57
+ --color-primary-border: var(--primary-border);
58
+ --color-primary-muted-foreground: var(--primary-muted-foreground);
59
+
60
+ /* ── AI ─────────────────────────────────────────────────── */
61
+ --color-ai: var(--ai);
62
+ --color-ai-foreground: var(--ai-foreground);
63
+ --color-ai-muted: var(--ai-muted);
64
+ --color-ai-muted-hover: var(--ai-muted-hover);
65
+ --color-ai-border: var(--ai-border);
66
+ --color-ai-muted-foreground: var(--ai-muted-foreground);
67
+
68
+ /* ── Success ────────────────────────────────────────────── */
69
+ --color-success: var(--success);
70
+ --color-success-foreground: var(--success-foreground);
71
+ --color-success-muted: var(--success-muted);
72
+ --color-success-border: var(--success-border);
73
+ --color-success-muted-foreground: var(--success-muted-foreground);
74
+
75
+ /* ── Warning ────────────────────────────────────────────── */
76
+ --color-warning: var(--warning);
77
+ --color-warning-foreground: var(--warning-foreground);
78
+ --color-warning-muted: var(--warning-muted);
79
+ --color-warning-border: var(--warning-border);
80
+ --color-warning-muted-foreground: var(--warning-muted-foreground);
81
+
82
+ /* ── Destructive ────────────────────────────────────────── */
83
+ --color-destructive: var(--destructive);
84
+ --color-destructive-foreground: var(--destructive-foreground);
85
+ --color-destructive-muted: var(--destructive-muted);
86
+ --color-destructive-border: var(--destructive-border);
87
+ --color-destructive-muted-foreground: var(--destructive-muted-foreground);
88
+
89
+ /* ── Info ───────────────────────────────────────────────── */
90
+ --color-info: var(--info);
91
+ --color-info-foreground: var(--info-foreground);
92
+ --color-info-muted: var(--info-muted);
93
+ --color-info-border: var(--info-border);
94
+ --color-info-muted-foreground: var(--info-muted-foreground);
95
+
96
+ /* ── Borders / Input / Ring ─────────────────────────────── */
97
+ --color-border: var(--border);
98
+ --color-border-subtle: var(--border-subtle);
99
+ --color-border-strong: var(--border-strong);
100
+ --color-input: var(--input);
101
+ --color-ring: var(--ring);
102
+
103
+ /* ── Sidebar ────────────────────────────────────────────── */
104
+ --color-sidebar: var(--sidebar);
105
+ --color-sidebar-foreground: var(--sidebar-foreground);
106
+ --color-sidebar-primary: var(--sidebar-primary);
107
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
108
+ --color-sidebar-accent: var(--sidebar-accent);
109
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
110
+ --color-sidebar-border: var(--sidebar-border);
111
+ --color-sidebar-ring: var(--sidebar-ring);
112
+
113
+ /* ── Score ──────────────────────────────────────────────── */
114
+ --color-score-excellent: var(--score-excellent);
115
+ --color-score-good: var(--score-good);
116
+ --color-score-average: var(--score-average);
117
+ --color-score-below: var(--score-below);
118
+ --color-score-poor: var(--score-poor);
119
+
120
+ /* ── Charts ─────────────────────────────────────────────── */
121
+ --color-chart-1: var(--chart-1);
122
+ --color-chart-2: var(--chart-2);
123
+ --color-chart-3: var(--chart-3);
124
+ --color-chart-4: var(--chart-4);
125
+ --color-chart-5: var(--chart-5);
126
+ --color-chart-6: var(--chart-6);
127
+ --color-chart-grid: var(--chart-grid);
128
+ --color-chart-axis: var(--chart-axis);
129
+
130
+ /* ── Typography ─────────────────────────────────────────── */
131
+ --font-heading: "Noto Serif", ui-serif, Georgia, serif;
132
+ --text-caption: 0.75rem;
133
+ --text-caption--line-height: 1.5;
134
+ --text-h4: 1.1rem;
135
+ --text-h4--line-height: 1.4;
136
+
137
+ /* ── Radius scale ───────────────────────────────────────── */
138
+ --radius-xs: var(--radius-xs);
139
+ --radius-sm: var(--radius-sm);
140
+ --radius-md: var(--radius);
141
+ --radius-lg: var(--radius-lg);
142
+ --radius-xl: var(--radius-xl);
143
+ --radius-2xl: var(--radius-2xl);
144
+ --radius-3xl: var(--radius-3xl);
145
+ }