@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.
- package/dist/components/ConversationPanel.d.ts +10 -6
- package/dist/components/MessageList.d.ts +4 -2
- package/dist/context.d.ts +26 -11
- package/dist/index.js +526 -493
- package/dist/styles.css +670 -629
- package/dist/themes/tailwind-shadcn.css +36 -29
- package/package.json +2 -2
|
@@ -16,40 +16,47 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Two non-obvious tricks this preset relies on:
|
|
18
18
|
*
|
|
19
|
-
* 1. Listing
|
|
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']
|
|
22
|
-
*
|
|
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
|
|
27
|
-
* can mismatch
|
|
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
|
-
|
|
33
|
-
[data-mast-root]
|
|
34
|
-
[data-mast-root][data-mast-theme='
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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.
|
|
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.
|
|
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"
|