@assistant-ui/react 0.5.20 → 0.5.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{ModelConfigTypes-ComYH1b6.d.mts → AssistantTypes-D93BmqD5.d.mts} +64 -60
- package/dist/{ModelConfigTypes-ComYH1b6.d.ts → AssistantTypes-D93BmqD5.d.ts} +64 -60
- package/dist/Thread-BbLf1cc4.d.mts +156 -0
- package/dist/Thread-jfAlPLli.d.ts +156 -0
- package/dist/chunk-2RKUKZSZ.mjs +761 -0
- package/dist/chunk-2RKUKZSZ.mjs.map +1 -0
- package/dist/chunk-BJPOCE4O.mjs +11 -0
- package/dist/chunk-BJPOCE4O.mjs.map +1 -0
- package/dist/{chunk-BV6Y7C43.mjs → chunk-QBS6JLLN.mjs} +3 -1
- package/dist/{chunk-BV6Y7C43.mjs.map → chunk-QBS6JLLN.mjs.map} +1 -1
- package/dist/chunk-V66MVXBH.mjs +608 -0
- package/dist/chunk-V66MVXBH.mjs.map +1 -0
- package/dist/edge.d.mts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +1 -0
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +10 -748
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +11 -309
- package/dist/index.d.ts +11 -309
- package/dist/index.mjs +324 -1677
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.mts +7 -126
- package/dist/internal.d.ts +7 -126
- package/dist/internal.js +1 -0
- package/dist/internal.js.map +1 -1
- package/dist/internal.mjs +12 -519
- package/dist/internal.mjs.map +1 -1
- package/dist/tailwindcss/index.js +1 -0
- package/dist/tailwindcss/index.js.map +1 -1
- package/dist/tailwindcss/index.mjs +3 -0
- package/dist/tailwindcss/index.mjs.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssistantTailwindPluginColors = {\n border: string;\n input: string;\n ring: string;\n background: string;\n foreground: string;\n primary: {\n DEFAULT: string;\n foreground: string;\n };\n secondary: {\n DEFAULT: string;\n foreground: string;\n };\n destructive: {\n DEFAULT: string;\n foreground: string;\n };\n muted: {\n DEFAULT: string;\n foreground: string;\n };\n accent: {\n DEFAULT: string;\n foreground: string;\n };\n popover: {\n DEFAULT: string;\n foreground: string;\n };\n card: {\n DEFAULT: string;\n foreground: string;\n };\n};\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"default-theme\" | \"base\" | \"thread\" | \"assistant-modal\")[];\n colors?: AssistantTailwindPluginColors;\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, colors = {} } = {}) => {\n const prefix = !shadcn ? \"--aui-\" : \"--\";\n return {\n theme: {\n extend: {\n colors: {\n aui: {\n border: colors.border ?? `hsl(var(${prefix}border))`,\n input: colors.input ?? `hsl(var(${prefix}input))`,\n ring: colors.ring ?? `hsl(var(${prefix}ring))`,\n background: colors.background ?? `hsl(var(${prefix}background))`,\n foreground: colors.foreground ?? `hsl(var(${prefix}foreground))`,\n primary: {\n DEFAULT:\n colors.primary?.DEFAULT ?? `hsl(var(${prefix}primary))`,\n foreground:\n colors.primary?.foreground ??\n `hsl(var(${prefix}primary-foreground))`,\n },\n secondary: {\n DEFAULT:\n colors.secondary?.DEFAULT ?? `hsl(var(${prefix}secondary))`,\n foreground:\n colors.secondary?.foreground ??\n `hsl(var(${prefix}secondary-foreground))`,\n },\n destructive: {\n DEFAULT:\n colors.destructive?.DEFAULT ??\n `hsl(var(${prefix}destructive))`,\n foreground: `hsl(var(${prefix}destructive-foreground))`,\n },\n muted: {\n DEFAULT: `hsl(var(${prefix}muted))`,\n foreground:\n colors.muted?.foreground ??\n `hsl(var(${prefix}muted-foreground))`,\n },\n accent: {\n DEFAULT: colors.accent?.DEFAULT ?? `hsl(var(${prefix}accent))`,\n foreground:\n colors.accent?.foreground ??\n `hsl(var(${prefix}accent-foreground))`,\n },\n popover: {\n DEFAULT:\n colors.popover?.DEFAULT ?? `hsl(var(${prefix}popover))`,\n foreground:\n colors.popover?.foreground ??\n `hsl(var(${prefix}popover-foreground))`,\n },\n card: {\n DEFAULT: colors.card?.DEFAULT ?? `hsl(var(${prefix}card))`,\n foreground:\n colors.card?.foreground ??\n `hsl(var(${prefix}card-foreground))`,\n },\n },\n },\n },\n },\n };\n },\n);\n\nexport default auiPlugin;\n"],"mappings":"
|
1
|
+
{"version":3,"sources":["../../src/tailwindcss/index.ts"],"sourcesContent":["import plugin from \"tailwindcss/plugin\";\n\ntype AssistantTailwindPluginColors = {\n border: string;\n input: string;\n ring: string;\n background: string;\n foreground: string;\n primary: {\n DEFAULT: string;\n foreground: string;\n };\n secondary: {\n DEFAULT: string;\n foreground: string;\n };\n destructive: {\n DEFAULT: string;\n foreground: string;\n };\n muted: {\n DEFAULT: string;\n foreground: string;\n };\n accent: {\n DEFAULT: string;\n foreground: string;\n };\n popover: {\n DEFAULT: string;\n foreground: string;\n };\n card: {\n DEFAULT: string;\n foreground: string;\n };\n};\n\ntype AssisstantTailwindPluginOptions = {\n components?: (\"default-theme\" | \"base\" | \"thread\" | \"assistant-modal\")[];\n colors?: AssistantTailwindPluginColors;\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, colors = {} } = {}) => {\n const prefix = !shadcn ? \"--aui-\" : \"--\";\n return {\n theme: {\n extend: {\n colors: {\n aui: {\n border: colors.border ?? `hsl(var(${prefix}border))`,\n input: colors.input ?? `hsl(var(${prefix}input))`,\n ring: colors.ring ?? `hsl(var(${prefix}ring))`,\n background: colors.background ?? `hsl(var(${prefix}background))`,\n foreground: colors.foreground ?? `hsl(var(${prefix}foreground))`,\n primary: {\n DEFAULT:\n colors.primary?.DEFAULT ?? `hsl(var(${prefix}primary))`,\n foreground:\n colors.primary?.foreground ??\n `hsl(var(${prefix}primary-foreground))`,\n },\n secondary: {\n DEFAULT:\n colors.secondary?.DEFAULT ?? `hsl(var(${prefix}secondary))`,\n foreground:\n colors.secondary?.foreground ??\n `hsl(var(${prefix}secondary-foreground))`,\n },\n destructive: {\n DEFAULT:\n colors.destructive?.DEFAULT ??\n `hsl(var(${prefix}destructive))`,\n foreground: `hsl(var(${prefix}destructive-foreground))`,\n },\n muted: {\n DEFAULT: `hsl(var(${prefix}muted))`,\n foreground:\n colors.muted?.foreground ??\n `hsl(var(${prefix}muted-foreground))`,\n },\n accent: {\n DEFAULT: colors.accent?.DEFAULT ?? `hsl(var(${prefix}accent))`,\n foreground:\n colors.accent?.foreground ??\n `hsl(var(${prefix}accent-foreground))`,\n },\n popover: {\n DEFAULT:\n colors.popover?.DEFAULT ?? `hsl(var(${prefix}popover))`,\n foreground:\n colors.popover?.foreground ??\n `hsl(var(${prefix}popover-foreground))`,\n },\n card: {\n DEFAULT: colors.card?.DEFAULT ?? `hsl(var(${prefix}card))`,\n foreground:\n colors.card?.foreground ??\n `hsl(var(${prefix}card-foreground))`,\n },\n },\n },\n },\n },\n };\n },\n);\n\nexport default auiPlugin;\n"],"mappings":";;;;AAAA,OAAO,YAAY;AA4CnB,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,I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