@assistant-ui/react 0.4.5 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/edge.d.mts +31 -17
- package/dist/edge.d.ts +31 -17
- package/dist/edge.js +104 -26
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +104 -26
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +328 -23
- package/dist/index.d.ts +328 -23
- package/dist/index.js +547 -469
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +556 -488
- package/dist/index.mjs.map +1 -1
- package/dist/tailwindcss/index.d.mts +1 -1
- package/dist/tailwindcss/index.d.ts +1 -1
- package/dist/tailwindcss/index.js +15 -12
- package/dist/tailwindcss/index.js.map +1 -1
- package/dist/tailwindcss/index.mjs +15 -12
- package/dist/tailwindcss/index.mjs.map +1 -1
- package/package.json +2 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
2
2
|
|
3
3
|
type AssisstantTailwindPluginOptions = {
|
4
|
-
components?: ("thread" | "assistant-modal")[];
|
4
|
+
components?: ("base" | "thread" | "assistant-modal")[];
|
5
5
|
shadcn?: boolean;
|
6
6
|
};
|
7
7
|
declare const auiPlugin: {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
2
2
|
|
3
3
|
type AssisstantTailwindPluginOptions = {
|
4
|
-
components?: ("thread" | "assistant-modal")[];
|
4
|
+
components?: ("base" | "thread" | "assistant-modal")[];
|
5
5
|
shadcn?: boolean;
|
6
6
|
};
|
7
7
|
declare const auiPlugin: {
|
@@ -38,19 +38,22 @@ var auiPlugin = import_plugin.default.withOptions(
|
|
38
38
|
({ components = ["assistant-modal", "thread"], shadcn = false } = {}) => ({ addComponents }) => {
|
39
39
|
const assistantModal = components.includes("assistant-modal");
|
40
40
|
const thread = assistantModal || components.includes("thread");
|
41
|
-
|
41
|
+
const base = thread || components.includes("base");
|
42
|
+
if (base) {
|
42
43
|
addComponents({
|
43
44
|
'@import "@assistant-ui/react/styles/tailwindcss/base-components.css"': ""
|
44
45
|
});
|
45
|
-
addComponents({
|
46
|
-
'@import "@assistant-ui/react/styles/tailwindcss/thread.css"': ""
|
47
|
-
});
|
48
46
|
if (!shadcn) {
|
49
47
|
addComponents({
|
50
48
|
'@import "@assistant-ui/react/styles/themes/default.css"': ""
|
51
49
|
});
|
52
50
|
}
|
53
51
|
}
|
52
|
+
if (thread) {
|
53
|
+
addComponents({
|
54
|
+
'@import "@assistant-ui/react/styles/tailwindcss/thread.css"': ""
|
55
|
+
});
|
56
|
+
}
|
54
57
|
if (assistantModal) {
|
55
58
|
addComponents({
|
56
59
|
'@import "@assistant-ui/react/styles/tailwindcss/modal.css"': ""
|
@@ -73,14 +76,14 @@ var auiPlugin = import_plugin.default.withOptions(
|
|
73
76
|
DEFAULT: `hsl(var(${prefix}primary))`,
|
74
77
|
foreground: `hsl(var(${prefix}primary-foreground))`
|
75
78
|
},
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
secondary: {
|
80
|
+
DEFAULT: `hsl(var(${prefix}secondary))`,
|
81
|
+
foreground: `hsl(var(${prefix}secondary-foreground))`
|
82
|
+
},
|
83
|
+
destructive: {
|
84
|
+
DEFAULT: `hsl(var(${prefix}destructive))`,
|
85
|
+
foreground: `hsl(var(${prefix}destructive-foreground))`
|
86
|
+
},
|
84
87
|
muted: {
|
85
88
|
DEFAULT: `hsl(var(${prefix}muted))`,
|
86
89
|
foreground: `hsl(var(${prefix}muted-foreground))`
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"thread\" | \"assistant-modal\")[];\n shadcn?: boolean;\n};\n\nconst auiPlugin = plugin.withOptions<AssisstantTailwindPluginOptions>(\n ({ components = [\"assistant-modal\", \"thread\"], shadcn = false } = {}) =>\n ({ addComponents }) => {\n const assistantModal = components.includes(\"assistant-modal\");\n const thread = assistantModal || components.includes(\"thread\");\n\n if (
|
1
|
+
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"base\" | \"thread\" | \"assistant-modal\")[];\n shadcn?: boolean;\n};\n\nconst auiPlugin = plugin.withOptions<AssisstantTailwindPluginOptions>(\n ({ components = [\"assistant-modal\", \"thread\"], shadcn = false } = {}) =>\n ({ addComponents }) => {\n const assistantModal = components.includes(\"assistant-modal\");\n const thread = assistantModal || components.includes(\"thread\");\n const base = thread || components.includes(\"base\");\n\n if (base) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/base-components.css\"':\n \"\",\n });\n\n if (!shadcn) {\n addComponents({\n '@import \"@assistant-ui/react/styles/themes/default.css\"': \"\",\n });\n }\n }\n\n if (thread) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/thread.css\"': \"\",\n });\n }\n\n if (assistantModal) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/modal.css\"': \"\",\n });\n }\n },\n ({ shadcn = false } = {}) => {\n const prefix = !shadcn ? \"--aui-\" : \"--\";\n return {\n theme: {\n extend: {\n colors: {\n aui: {\n border: `hsl(var(${prefix}border))`,\n input: `hsl(var(${prefix}input))`,\n ring: `hsl(var(${prefix}ring))`,\n background: `hsl(var(${prefix}background))`,\n foreground: `hsl(var(${prefix}foreground))`,\n primary: {\n DEFAULT: `hsl(var(${prefix}primary))`,\n foreground: `hsl(var(${prefix}primary-foreground))`,\n },\n secondary: {\n DEFAULT: `hsl(var(${prefix}secondary))`,\n foreground: `hsl(var(${prefix}secondary-foreground))`,\n },\n destructive: {\n DEFAULT: `hsl(var(${prefix}destructive))`,\n foreground: `hsl(var(${prefix}destructive-foreground))`,\n },\n muted: {\n DEFAULT: `hsl(var(${prefix}muted))`,\n foreground: `hsl(var(${prefix}muted-foreground))`,\n },\n accent: {\n DEFAULT: `hsl(var(${prefix}accent))`,\n foreground: `hsl(var(${prefix}accent-foreground))`,\n },\n popover: {\n DEFAULT: `hsl(var(${prefix}popover))`,\n foreground: `hsl(var(${prefix}popover-foreground))`,\n },\n card: {\n DEFAULT: `hsl(var(${prefix}card))`,\n foreground: `hsl(var(${prefix}card-foreground))`,\n },\n },\n },\n },\n },\n };\n },\n);\n\nexport default auiPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAmB;AAOnB,IAAM,YAAY,cAAAA,QAAO;AAAA,EACvB,CAAC,EAAE,aAAa,CAAC,mBAAmB,QAAQ,GAAG,SAAS,MAAM,IAAI,CAAC,MACjE,CAAC,EAAE,cAAc,MAAM;AACrB,UAAM,iBAAiB,WAAW,SAAS,iBAAiB;AAC5D,UAAM,SAAS,kBAAkB,WAAW,SAAS,QAAQ;AAC7D,UAAM,OAAO,UAAU,WAAW,SAAS,MAAM;AAEjD,QAAI,MAAM;AACR,oBAAc;AAAA,QACZ,wEACE;AAAA,MACJ,CAAC;AAED,UAAI,CAAC,QAAQ;AACX,sBAAc;AAAA,UACZ,2DAA2D;AAAA,QAC7D,CAAC;AAAA,MACH;AAAA,IACF;AAEA,QAAI,QAAQ;AACV,oBAAc;AAAA,QACZ,+DAA+D;AAAA,MACjE,CAAC;AAAA,IACH;AAEA,QAAI,gBAAgB;AAClB,oBAAc;AAAA,QACZ,8DAA8D;AAAA,MAChE,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACF,CAAC,EAAE,SAAS,MAAM,IAAI,CAAC,MAAM;AAC3B,UAAM,SAAS,CAAC,SAAS,WAAW;AACpC,WAAO;AAAA,MACL,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,QAAQ;AAAA,YACN,KAAK;AAAA,cACH,QAAQ,WAAW,MAAM;AAAA,cACzB,OAAO,WAAW,MAAM;AAAA,cACxB,MAAM,WAAW,MAAM;AAAA,cACvB,YAAY,WAAW,MAAM;AAAA,cAC7B,YAAY,WAAW,MAAM;AAAA,cAC7B,SAAS;AAAA,gBACP,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,WAAW;AAAA,gBACT,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,aAAa;AAAA,gBACX,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,OAAO;AAAA,gBACL,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,QAAQ;AAAA,gBACN,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,SAAS;AAAA,gBACP,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,MAAM;AAAA,gBACJ,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,sBAAQ;","names":["plugin"]}
|
@@ -4,19 +4,22 @@ var auiPlugin = plugin.withOptions(
|
|
4
4
|
({ components = ["assistant-modal", "thread"], shadcn = false } = {}) => ({ addComponents }) => {
|
5
5
|
const assistantModal = components.includes("assistant-modal");
|
6
6
|
const thread = assistantModal || components.includes("thread");
|
7
|
-
|
7
|
+
const base = thread || components.includes("base");
|
8
|
+
if (base) {
|
8
9
|
addComponents({
|
9
10
|
'@import "@assistant-ui/react/styles/tailwindcss/base-components.css"': ""
|
10
11
|
});
|
11
|
-
addComponents({
|
12
|
-
'@import "@assistant-ui/react/styles/tailwindcss/thread.css"': ""
|
13
|
-
});
|
14
12
|
if (!shadcn) {
|
15
13
|
addComponents({
|
16
14
|
'@import "@assistant-ui/react/styles/themes/default.css"': ""
|
17
15
|
});
|
18
16
|
}
|
19
17
|
}
|
18
|
+
if (thread) {
|
19
|
+
addComponents({
|
20
|
+
'@import "@assistant-ui/react/styles/tailwindcss/thread.css"': ""
|
21
|
+
});
|
22
|
+
}
|
20
23
|
if (assistantModal) {
|
21
24
|
addComponents({
|
22
25
|
'@import "@assistant-ui/react/styles/tailwindcss/modal.css"': ""
|
@@ -39,14 +42,14 @@ var auiPlugin = plugin.withOptions(
|
|
39
42
|
DEFAULT: `hsl(var(${prefix}primary))`,
|
40
43
|
foreground: `hsl(var(${prefix}primary-foreground))`
|
41
44
|
},
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
secondary: {
|
46
|
+
DEFAULT: `hsl(var(${prefix}secondary))`,
|
47
|
+
foreground: `hsl(var(${prefix}secondary-foreground))`
|
48
|
+
},
|
49
|
+
destructive: {
|
50
|
+
DEFAULT: `hsl(var(${prefix}destructive))`,
|
51
|
+
foreground: `hsl(var(${prefix}destructive-foreground))`
|
52
|
+
},
|
50
53
|
muted: {
|
51
54
|
DEFAULT: `hsl(var(${prefix}muted))`,
|
52
55
|
foreground: `hsl(var(${prefix}muted-foreground))`
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"thread\" | \"assistant-modal\")[];\n shadcn?: boolean;\n};\n\nconst auiPlugin = plugin.withOptions<AssisstantTailwindPluginOptions>(\n ({ components = [\"assistant-modal\", \"thread\"], shadcn = false } = {}) =>\n ({ addComponents }) => {\n const assistantModal = components.includes(\"assistant-modal\");\n const thread = assistantModal || components.includes(\"thread\");\n\n if (
|
1
|
+
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"base\" | \"thread\" | \"assistant-modal\")[];\n shadcn?: boolean;\n};\n\nconst auiPlugin = plugin.withOptions<AssisstantTailwindPluginOptions>(\n ({ components = [\"assistant-modal\", \"thread\"], shadcn = false } = {}) =>\n ({ addComponents }) => {\n const assistantModal = components.includes(\"assistant-modal\");\n const thread = assistantModal || components.includes(\"thread\");\n const base = thread || components.includes(\"base\");\n\n if (base) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/base-components.css\"':\n \"\",\n });\n\n if (!shadcn) {\n addComponents({\n '@import \"@assistant-ui/react/styles/themes/default.css\"': \"\",\n });\n }\n }\n\n if (thread) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/thread.css\"': \"\",\n });\n }\n\n if (assistantModal) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/modal.css\"': \"\",\n });\n }\n },\n ({ shadcn = false } = {}) => {\n const prefix = !shadcn ? \"--aui-\" : \"--\";\n return {\n theme: {\n extend: {\n colors: {\n aui: {\n border: `hsl(var(${prefix}border))`,\n input: `hsl(var(${prefix}input))`,\n ring: `hsl(var(${prefix}ring))`,\n background: `hsl(var(${prefix}background))`,\n foreground: `hsl(var(${prefix}foreground))`,\n primary: {\n DEFAULT: `hsl(var(${prefix}primary))`,\n foreground: `hsl(var(${prefix}primary-foreground))`,\n },\n secondary: {\n DEFAULT: `hsl(var(${prefix}secondary))`,\n foreground: `hsl(var(${prefix}secondary-foreground))`,\n },\n destructive: {\n DEFAULT: `hsl(var(${prefix}destructive))`,\n foreground: `hsl(var(${prefix}destructive-foreground))`,\n },\n muted: {\n DEFAULT: `hsl(var(${prefix}muted))`,\n foreground: `hsl(var(${prefix}muted-foreground))`,\n },\n accent: {\n DEFAULT: `hsl(var(${prefix}accent))`,\n foreground: `hsl(var(${prefix}accent-foreground))`,\n },\n popover: {\n DEFAULT: `hsl(var(${prefix}popover))`,\n foreground: `hsl(var(${prefix}popover-foreground))`,\n },\n card: {\n DEFAULT: `hsl(var(${prefix}card))`,\n foreground: `hsl(var(${prefix}card-foreground))`,\n },\n },\n },\n },\n },\n };\n },\n);\n\nexport default auiPlugin;\n"],"mappings":";AAAA,OAAO,YAAY;AAOnB,IAAM,YAAY,OAAO;AAAA,EACvB,CAAC,EAAE,aAAa,CAAC,mBAAmB,QAAQ,GAAG,SAAS,MAAM,IAAI,CAAC,MACjE,CAAC,EAAE,cAAc,MAAM;AACrB,UAAM,iBAAiB,WAAW,SAAS,iBAAiB;AAC5D,UAAM,SAAS,kBAAkB,WAAW,SAAS,QAAQ;AAC7D,UAAM,OAAO,UAAU,WAAW,SAAS,MAAM;AAEjD,QAAI,MAAM;AACR,oBAAc;AAAA,QACZ,wEACE;AAAA,MACJ,CAAC;AAED,UAAI,CAAC,QAAQ;AACX,sBAAc;AAAA,UACZ,2DAA2D;AAAA,QAC7D,CAAC;AAAA,MACH;AAAA,IACF;AAEA,QAAI,QAAQ;AACV,oBAAc;AAAA,QACZ,+DAA+D;AAAA,MACjE,CAAC;AAAA,IACH;AAEA,QAAI,gBAAgB;AAClB,oBAAc;AAAA,QACZ,8DAA8D;AAAA,MAChE,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EACF,CAAC,EAAE,SAAS,MAAM,IAAI,CAAC,MAAM;AAC3B,UAAM,SAAS,CAAC,SAAS,WAAW;AACpC,WAAO;AAAA,MACL,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,QAAQ;AAAA,YACN,KAAK;AAAA,cACH,QAAQ,WAAW,MAAM;AAAA,cACzB,OAAO,WAAW,MAAM;AAAA,cACxB,MAAM,WAAW,MAAM;AAAA,cACvB,YAAY,WAAW,MAAM;AAAA,cAC7B,YAAY,WAAW,MAAM;AAAA,cAC7B,SAAS;AAAA,gBACP,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,WAAW;AAAA,gBACT,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,aAAa;AAAA,gBACX,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,OAAO;AAAA,gBACL,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,QAAQ;AAAA,gBACN,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,SAAS;AAAA,gBACP,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,cACA,MAAM;AAAA,gBACJ,SAAS,WAAW,MAAM;AAAA,gBAC1B,YAAY,WAAW,MAAM;AAAA,cAC/B;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,sBAAQ;","names":[]}
|
package/package.json
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
"conversational-ui",
|
30
30
|
"conversational-ai"
|
31
31
|
],
|
32
|
-
"version": "0.4.
|
32
|
+
"version": "0.4.7",
|
33
33
|
"license": "MIT",
|
34
34
|
"exports": {
|
35
35
|
".": {
|
@@ -120,6 +120,7 @@
|
|
120
120
|
"@types/json-schema": "^7.0.15",
|
121
121
|
"@types/node": "^20.14.10",
|
122
122
|
"autoprefixer": "^10.4.19",
|
123
|
+
"eslint": "^8",
|
123
124
|
"eslint-config-next": "14.2.5",
|
124
125
|
"postcss": "^8.4.39",
|
125
126
|
"postcss-nested": "^6.0.1",
|