@mast-ai/react-ui 0.2.0 → 0.4.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.
@@ -16,40 +16,47 @@
16
16
  *
17
17
  * Two non-obvious tricks this preset relies on:
18
18
  *
19
- * 1. Listing all three selectors with equal specificity so source order
19
+ * 1. Listing every theme variant with equal specificity so source order
20
20
  * tie-breaks in the consumer's favor. A bare [data-mast-root] block loses
21
- * to the library's [data-mast-root][data-mast-theme='dark'] block in dark
22
- * mode and the dark theme would keep the library's hardcoded colors.
21
+ * to the library's [data-mast-root][data-mast-theme='dark'] (and the
22
+ * OS-following [data-mast-theme='auto']) blocks, so explicit dark mode
23
+ * and OS-following users would keep the library's hardcoded colors. The
24
+ * preset declares its rules inside the same `@layer mast-ai` block as the
25
+ * default stylesheet, so the source-order tie-break is preserved when
26
+ * both files are loaded.
23
27
  *
24
28
  * 2. Setting data-mast-theme={theme} on the panel root in your app keeps the
25
29
  * library's dark detection in sync with shadcn's class-based dark mode
26
- * (.dark on <html>). Without it, the library follows OS preference and
27
- * can mismatch the app theme.
30
+ * (.dark on <html>). Without it, the library defaults to the light theme
31
+ * and can mismatch an app forced into dark.
28
32
  *
29
33
  * See docs/react-ui/USAGE.md §5 for the full integration guide.
30
34
  */
31
35
 
32
- [data-mast-root],
33
- [data-mast-root][data-mast-theme='dark'],
34
- [data-mast-root][data-mast-theme='light'] {
35
- --mast-bg: hsl(var(--background));
36
- --mast-bg-subtle: hsl(var(--muted) / 0.2);
37
- --mast-fg: hsl(var(--foreground));
38
- --mast-fg-muted: hsl(var(--muted-foreground));
39
- --mast-border: hsl(var(--border));
40
- --mast-accent: hsl(var(--primary));
41
- --mast-accent-fg: hsl(var(--primary-foreground));
42
- --mast-thinking-bg: hsl(var(--muted));
43
- --mast-thinking-fg: hsl(var(--muted-foreground));
44
- --mast-tool-bg: hsl(var(--muted) / 0.4);
45
- --mast-tool-fg: hsl(var(--muted-foreground));
46
- --mast-tool-pending: hsl(var(--primary));
47
- --mast-tool-error-bg: hsl(var(--destructive) / 0.1);
48
- --mast-tool-error-fg: hsl(var(--destructive));
49
- --mast-tool-cancelled-bg: hsl(var(--muted));
50
- --mast-tool-cancelled-fg: hsl(var(--muted-foreground));
51
- --mast-user-bubble: hsl(var(--primary));
52
- --mast-user-fg: hsl(var(--primary-foreground));
53
- --mast-mention-chip-bg: hsl(var(--primary) / 0.1);
54
- --mast-mention-chip-fg: hsl(var(--primary));
55
- }
36
+ @layer mast-ai {
37
+ [data-mast-root],
38
+ [data-mast-root][data-mast-theme='dark'],
39
+ [data-mast-root][data-mast-theme='light'],
40
+ [data-mast-root][data-mast-theme='auto'] {
41
+ --mast-bg: hsl(var(--background));
42
+ --mast-bg-subtle: hsl(var(--muted) / 0.2);
43
+ --mast-fg: hsl(var(--foreground));
44
+ --mast-fg-muted: hsl(var(--muted-foreground));
45
+ --mast-border: hsl(var(--border));
46
+ --mast-accent: hsl(var(--primary));
47
+ --mast-accent-fg: hsl(var(--primary-foreground));
48
+ --mast-thinking-bg: hsl(var(--muted));
49
+ --mast-thinking-fg: hsl(var(--muted-foreground));
50
+ --mast-tool-bg: hsl(var(--muted) / 0.4);
51
+ --mast-tool-fg: hsl(var(--muted-foreground));
52
+ --mast-tool-pending: hsl(var(--primary));
53
+ --mast-tool-error-bg: hsl(var(--destructive) / 0.1);
54
+ --mast-tool-error-fg: hsl(var(--destructive));
55
+ --mast-tool-cancelled-bg: hsl(var(--muted));
56
+ --mast-tool-cancelled-fg: hsl(var(--muted-foreground));
57
+ --mast-user-bubble: hsl(var(--primary));
58
+ --mast-user-fg: hsl(var(--primary-foreground));
59
+ --mast-mention-chip-bg: hsl(var(--primary) / 0.1);
60
+ --mast-mention-chip-fg: hsl(var(--primary));
61
+ }
62
+ } /* @layer mast-ai */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mast-ai/react-ui",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "format": "prettier --write src"
36
36
  },
37
37
  "peerDependencies": {
38
- "@mast-ai/core": "^0.2.0",
38
+ "@mast-ai/core": "^0.4.0",
39
39
  "@tanstack/react-virtual": ">=3.0.0",
40
40
  "react": ">=19.0.0",
41
41
  "react-dom": ">=19.0.0"