@assistant-ui/react 0.4.5 → 0.4.6
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 +101 -24
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +101 -24
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +58 -14
- package/dist/index.d.ts +58 -14
- package/dist/index.js +59 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -29
- 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 +7 -4
- package/dist/tailwindcss/index.js.map +1 -1
- package/dist/tailwindcss/index.mjs +7 -4
- package/dist/tailwindcss/index.mjs.map +1 -1
- package/package.json +1 -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"': ""
|
@@ -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(--aui-secondary))\",\n // foreground: \"hsl(var(--aui-secondary-foreground))\",\n // },\n // destructive: {\n // DEFAULT: \"hsl(var(--aui-destructive))\",\n // foreground: \"hsl(var(--aui-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,c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,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"': ""
|
@@ -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(--aui-secondary))\",\n // foreground: \"hsl(var(--aui-secondary-foreground))\",\n // },\n // destructive: {\n // DEFAULT: \"hsl(var(--aui-destructive))\",\n // foreground: \"hsl(var(--aui-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,gBA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