@assistant-ui/react 0.4.6 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/edge.d.mts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +6 -5
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +6 -5
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +280 -19
- package/dist/index.d.ts +280 -19
- package/dist/index.js +493 -445
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +430 -392
- 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 +16 -13
- package/dist/tailwindcss/index.js.map +1 -1
- package/dist/tailwindcss/index.mjs +16 -13
- 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?: ("base" | "thread" | "assistant-modal")[];
|
4
|
+
components?: ("default-theme" | "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?: ("base" | "thread" | "assistant-modal")[];
|
4
|
+
components?: ("default-theme" | "base" | "thread" | "assistant-modal")[];
|
5
5
|
shadcn?: boolean;
|
6
6
|
};
|
7
7
|
declare const auiPlugin: {
|
@@ -39,15 +39,18 @@ var auiPlugin = import_plugin.default.withOptions(
|
|
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
|
+
const defaultTheme = components.includes("default-theme");
|
43
|
+
if (defaultTheme && shadcn)
|
44
|
+
throw new Error("default-theme cannot be used with shadcn");
|
45
|
+
if (defaultTheme || base && !shadcn) {
|
46
|
+
addComponents({
|
47
|
+
'@import "@assistant-ui/react/styles/themes/default.css"': ""
|
48
|
+
});
|
49
|
+
}
|
42
50
|
if (base) {
|
43
51
|
addComponents({
|
44
52
|
'@import "@assistant-ui/react/styles/tailwindcss/base-components.css"': ""
|
45
53
|
});
|
46
|
-
if (!shadcn) {
|
47
|
-
addComponents({
|
48
|
-
'@import "@assistant-ui/react/styles/themes/default.css"': ""
|
49
|
-
});
|
50
|
-
}
|
51
54
|
}
|
52
55
|
if (thread) {
|
53
56
|
addComponents({
|
@@ -76,14 +79,14 @@ var auiPlugin = import_plugin.default.withOptions(
|
|
76
79
|
DEFAULT: `hsl(var(${prefix}primary))`,
|
77
80
|
foreground: `hsl(var(${prefix}primary-foreground))`
|
78
81
|
},
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
82
|
+
secondary: {
|
83
|
+
DEFAULT: `hsl(var(${prefix}secondary))`,
|
84
|
+
foreground: `hsl(var(${prefix}secondary-foreground))`
|
85
|
+
},
|
86
|
+
destructive: {
|
87
|
+
DEFAULT: `hsl(var(${prefix}destructive))`,
|
88
|
+
foreground: `hsl(var(${prefix}destructive-foreground))`
|
89
|
+
},
|
87
90
|
muted: {
|
88
91
|
DEFAULT: `hsl(var(${prefix}muted))`,
|
89
92
|
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?: (\"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/
|
1
|
+
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"default-theme\" | \"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 const defaultTheme = components.includes(\"default-theme\");\n\n if (defaultTheme && shadcn)\n throw new Error(\"default-theme cannot be used with shadcn\");\n\n if (defaultTheme || (base && !shadcn)) {\n addComponents({\n '@import \"@assistant-ui/react/styles/themes/default.css\"': \"\",\n });\n }\n\n if (base) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/base-components.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;AACjD,UAAM,eAAe,WAAW,SAAS,eAAe;AAExD,QAAI,gBAAgB;AAClB,YAAM,IAAI,MAAM,0CAA0C;AAE5D,QAAI,gBAAiB,QAAQ,CAAC,QAAS;AACrC,oBAAc;AAAA,QACZ,2DAA2D;AAAA,MAC7D,CAAC;AAAA,IACH;AAEA,QAAI,MAAM;AACR,oBAAc;AAAA,QACZ,wEACE;AAAA,MACJ,CAAC;AAAA,IACH;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"]}
|
@@ -5,15 +5,18 @@ var auiPlugin = plugin.withOptions(
|
|
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
|
+
const defaultTheme = components.includes("default-theme");
|
9
|
+
if (defaultTheme && shadcn)
|
10
|
+
throw new Error("default-theme cannot be used with shadcn");
|
11
|
+
if (defaultTheme || base && !shadcn) {
|
12
|
+
addComponents({
|
13
|
+
'@import "@assistant-ui/react/styles/themes/default.css"': ""
|
14
|
+
});
|
15
|
+
}
|
8
16
|
if (base) {
|
9
17
|
addComponents({
|
10
18
|
'@import "@assistant-ui/react/styles/tailwindcss/base-components.css"': ""
|
11
19
|
});
|
12
|
-
if (!shadcn) {
|
13
|
-
addComponents({
|
14
|
-
'@import "@assistant-ui/react/styles/themes/default.css"': ""
|
15
|
-
});
|
16
|
-
}
|
17
20
|
}
|
18
21
|
if (thread) {
|
19
22
|
addComponents({
|
@@ -42,14 +45,14 @@ var auiPlugin = plugin.withOptions(
|
|
42
45
|
DEFAULT: `hsl(var(${prefix}primary))`,
|
43
46
|
foreground: `hsl(var(${prefix}primary-foreground))`
|
44
47
|
},
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
secondary: {
|
49
|
+
DEFAULT: `hsl(var(${prefix}secondary))`,
|
50
|
+
foreground: `hsl(var(${prefix}secondary-foreground))`
|
51
|
+
},
|
52
|
+
destructive: {
|
53
|
+
DEFAULT: `hsl(var(${prefix}destructive))`,
|
54
|
+
foreground: `hsl(var(${prefix}destructive-foreground))`
|
55
|
+
},
|
53
56
|
muted: {
|
54
57
|
DEFAULT: `hsl(var(${prefix}muted))`,
|
55
58
|
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?: (\"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/
|
1
|
+
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"default-theme\" | \"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 const defaultTheme = components.includes(\"default-theme\");\n\n if (defaultTheme && shadcn)\n throw new Error(\"default-theme cannot be used with shadcn\");\n\n if (defaultTheme || (base && !shadcn)) {\n addComponents({\n '@import \"@assistant-ui/react/styles/themes/default.css\"': \"\",\n });\n }\n\n if (base) {\n addComponents({\n '@import \"@assistant-ui/react/styles/tailwindcss/base-components.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;AACjD,UAAM,eAAe,WAAW,SAAS,eAAe;AAExD,QAAI,gBAAgB;AAClB,YAAM,IAAI,MAAM,0CAA0C;AAE5D,QAAI,gBAAiB,QAAQ,CAAC,QAAS;AACrC,oBAAc;AAAA,QACZ,2DAA2D;AAAA,MAC7D,CAAC;AAAA,IACH;AAEA,QAAI,MAAM;AACR,oBAAc;AAAA,QACZ,wEACE;AAAA,MACJ,CAAC;AAAA,IACH;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.8",
|
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",
|