@iota-uz/sdk 0.3.1 → 0.3.2

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.
@@ -0,0 +1,93 @@
1
+ 'use strict';
2
+
3
+ var path = require('path');
4
+ var module$1 = require('module');
5
+
6
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var path__default = /*#__PURE__*/_interopDefault(path);
10
+
11
+ // ui/src/bichat/tailwind.ts
12
+ var bichatTailwindPreset = {
13
+ darkMode: "selector",
14
+ theme: {
15
+ extend: {
16
+ colors: {
17
+ red: {
18
+ 50: "#fef2f2",
19
+ 100: "#fee2e2",
20
+ 200: "#fecaca",
21
+ 300: "#fca5a5",
22
+ 400: "#f87171",
23
+ 500: "#ef4444",
24
+ 600: "#dc2626",
25
+ 700: "#b91c1c",
26
+ 800: "#991b1b",
27
+ 900: "#7f1d1d"
28
+ },
29
+ gray: {
30
+ 50: "#f9fafb",
31
+ 100: "#f3f4f6",
32
+ 200: "#e5e7eb",
33
+ 300: "#d1d5db",
34
+ 400: "#9ca3af",
35
+ 500: "#6b7280",
36
+ 600: "#4b5563",
37
+ 700: "#374151",
38
+ 800: "#1f2937",
39
+ 900: "#111827",
40
+ 950: "#0d1117"
41
+ },
42
+ primary: {
43
+ 50: "var(--primary-50, var(--bichat-color-primary-50, #eff6ff))",
44
+ 100: "var(--primary-100, var(--bichat-color-primary-100, #dbeafe))",
45
+ 200: "var(--primary-200, var(--bichat-color-primary-200, #bfdbfe))",
46
+ 300: "var(--primary-300, var(--bichat-color-primary-300, #93c5fd))",
47
+ 400: "var(--primary-400, var(--bichat-color-primary-400, #60a5fa))",
48
+ 500: "var(--primary-500, var(--bichat-color-primary-500, #3b82f6))",
49
+ 600: "var(--primary-600, var(--bichat-color-primary-600, #2563eb))",
50
+ 700: "var(--primary-700, var(--bichat-color-primary-700, #1d4ed8))",
51
+ 800: "var(--primary-800, var(--bichat-color-primary-800, #1e40af))",
52
+ 900: "var(--primary-900, var(--bichat-color-primary-900, #1e3a8a))"
53
+ }
54
+ },
55
+ fontFamily: {
56
+ sans: ['"Gilroy"', "system-ui", "-apple-system", "sans-serif"]
57
+ },
58
+ boxShadow: {
59
+ xs: "var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05))",
60
+ sm: "var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1))",
61
+ md: "var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1))",
62
+ lg: "var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1))",
63
+ xl: "var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1))"
64
+ },
65
+ borderRadius: {
66
+ "2xl": "1rem",
67
+ "3xl": "1.5rem"
68
+ }
69
+ }
70
+ },
71
+ plugins: []
72
+ };
73
+ function bichatTailwindContent() {
74
+ const require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('tailwind.cjs', document.baseURI).href)));
75
+ let pkgDir;
76
+ try {
77
+ const pkgJsonPath = require2.resolve("@iota-uz/sdk/package.json");
78
+ pkgDir = path__default.default.dirname(pkgJsonPath);
79
+ } catch {
80
+ const entryPath = require2.resolve("@iota-uz/sdk");
81
+ pkgDir = path__default.default.dirname(entryPath);
82
+ }
83
+ const distBichat = pkgDir.endsWith(path__default.default.sep + "dist") || pkgDir.endsWith("/dist") ? path__default.default.join(pkgDir, "bichat") : path__default.default.join(pkgDir, "dist", "bichat");
84
+ return [
85
+ path__default.default.join(distBichat, "index.mjs"),
86
+ path__default.default.join(distBichat, "index.cjs")
87
+ ];
88
+ }
89
+
90
+ exports.bichatTailwindContent = bichatTailwindContent;
91
+ exports.bichatTailwindPreset = bichatTailwindPreset;
92
+ //# sourceMappingURL=tailwind.cjs.map
93
+ //# sourceMappingURL=tailwind.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../ui/src/bichat/tailwind.ts"],"names":["require","createRequire","path"],"mappings":";;;;;;;;;;;AAoBO,IAAM,oBAAA,GAAuC;AAAA,EAClD,QAAA,EAAU,UAAA;AAAA,EACV,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ;AAAA,QACN,GAAA,EAAK;AAAA,UACH,EAAA,EAAI,SAAA;AAAA,UACJ,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK;AAAA,SACP;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,EAAA,EAAI,SAAA;AAAA,UACJ,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK;AAAA,SACP;AAAA,QACA,OAAA,EAAS;AAAA,UACP,EAAA,EAAI,4DAAA;AAAA,UACJ,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;AAAA,UACL,GAAA,EAAK,8DAAA;A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AA,GACnC;AACF","file":"tailwind.cjs","sourcesContent":["/**\n * BiChat Tailwind preset and content helper for downstream applets.\n * Use these so Tailwind generates utilities for SDK BiChat components and so\n * theme tokens stay consistent. Always import @iota-uz/sdk/bichat/styles.css\n * in your applet CSS for design tokens.\n */\nimport path from 'node:path'\nimport { createRequire } from 'node:module'\n\n/** Tailwind v3 config preset type (minimal shape we extend). */\nexport type TailwindPreset = {\n darkMode?: 'class' | 'selector' | 'media'\n theme?: { extend?: Record<string, unknown> }\n plugins?: unknown[]\n}\n\n/**\n * Preset for BiChat UI: theme extensions and dark mode.\n * Stable and minimal; apps can override via their own theme or CSS variables.\n */\nexport const bichatTailwindPreset: TailwindPreset = {\n darkMode: 'selector',\n theme: {\n extend: {\n colors: {\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f3f4f6',\n 200: '#e5e7eb',\n 300: '#d1d5db',\n 400: '#9ca3af',\n 500: '#6b7280',\n 600: '#4b5563',\n 700: '#374151',\n 800: '#1f2937',\n 900: '#111827',\n 950: '#0d1117',\n },\n primary: {\n 50: 'var(--primary-50, var(--bichat-color-primary-50, #eff6ff))',\n 100: 'var(--primary-100, var(--bichat-color-primary-100, #dbeafe))',\n 200: 'var(--primary-200, var(--bichat-color-primary-200, #bfdbfe))',\n 300: 'var(--primary-300, var(--bichat-color-primary-300, #93c5fd))',\n 400: 'var(--primary-400, var(--bichat-color-primary-400, #60a5fa))',\n 500: 'var(--primary-500, var(--bichat-color-primary-500, #3b82f6))',\n 600: 'var(--primary-600, var(--bichat-color-primary-600, #2563eb))',\n 700: 'var(--primary-700, var(--bichat-color-primary-700, #1d4ed8))',\n 800: 'var(--primary-800, var(--bichat-color-primary-800, #1e40af))',\n 900: 'var(--primary-900, var(--bichat-color-primary-900, #1e3a8a))',\n },\n },\n fontFamily: {\n sans: ['\"Gilroy\"', 'system-ui', '-apple-system', 'sans-serif'],\n },\n boxShadow: {\n xs: 'var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05))',\n sm: 'var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1))',\n md: 'var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1))',\n lg: 'var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1))',\n xl: 'var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1))',\n },\n borderRadius: {\n '2xl': '1rem',\n '3xl': '1.5rem',\n },\n },\n },\n plugins: [],\n}\n\n/**\n * Returns absolute paths to SDK BiChat bundle files so Tailwind can scan them\n * for class names. Include the result in your Tailwind config content array.\n * Resolves via @iota-uz/sdk/package.json when available so the package root is unambiguous.\n */\nexport function bichatTailwindContent(): string[] {\n const require = createRequire(import.meta.url)\n let pkgDir: string\n try {\n const pkgJsonPath = require.resolve('@iota-uz/sdk/package.json')\n pkgDir = path.dirname(pkgJsonPath)\n } catch {\n const entryPath = require.resolve('@iota-uz/sdk')\n pkgDir = path.dirname(entryPath) // when \".\" resolves to dist/index.mjs, dirname is dist\n }\n const distBichat = pkgDir.endsWith(path.sep + 'dist') || pkgDir.endsWith('/dist')\n ? path.join(pkgDir, 'bichat')\n : path.join(pkgDir, 'dist', 'bichat')\n return [\n path.join(distBichat, 'index.mjs'),\n path.join(distBichat, 'index.cjs'),\n ]\n}\n"]}
@@ -0,0 +1,21 @@
1
+ /** Tailwind v3 config preset type (minimal shape we extend). */
2
+ type TailwindPreset = {
3
+ darkMode?: 'class' | 'selector' | 'media';
4
+ theme?: {
5
+ extend?: Record<string, unknown>;
6
+ };
7
+ plugins?: unknown[];
8
+ };
9
+ /**
10
+ * Preset for BiChat UI: theme extensions and dark mode.
11
+ * Stable and minimal; apps can override via their own theme or CSS variables.
12
+ */
13
+ declare const bichatTailwindPreset: TailwindPreset;
14
+ /**
15
+ * Returns absolute paths to SDK BiChat bundle files so Tailwind can scan them
16
+ * for class names. Include the result in your Tailwind config content array.
17
+ * Resolves via @iota-uz/sdk/package.json when available so the package root is unambiguous.
18
+ */
19
+ declare function bichatTailwindContent(): string[];
20
+
21
+ export { type TailwindPreset, bichatTailwindContent, bichatTailwindPreset };
@@ -0,0 +1,21 @@
1
+ /** Tailwind v3 config preset type (minimal shape we extend). */
2
+ type TailwindPreset = {
3
+ darkMode?: 'class' | 'selector' | 'media';
4
+ theme?: {
5
+ extend?: Record<string, unknown>;
6
+ };
7
+ plugins?: unknown[];
8
+ };
9
+ /**
10
+ * Preset for BiChat UI: theme extensions and dark mode.
11
+ * Stable and minimal; apps can override via their own theme or CSS variables.
12
+ */
13
+ declare const bichatTailwindPreset: TailwindPreset;
14
+ /**
15
+ * Returns absolute paths to SDK BiChat bundle files so Tailwind can scan them
16
+ * for class names. Include the result in your Tailwind config content array.
17
+ * Resolves via @iota-uz/sdk/package.json when available so the package root is unambiguous.
18
+ */
19
+ declare function bichatTailwindContent(): string[];
20
+
21
+ export { type TailwindPreset, bichatTailwindContent, bichatTailwindPreset };
@@ -0,0 +1,85 @@
1
+ import path from 'path';
2
+ import { createRequire } from 'module';
3
+
4
+ // ui/src/bichat/tailwind.ts
5
+ var bichatTailwindPreset = {
6
+ darkMode: "selector",
7
+ theme: {
8
+ extend: {
9
+ colors: {
10
+ red: {
11
+ 50: "#fef2f2",
12
+ 100: "#fee2e2",
13
+ 200: "#fecaca",
14
+ 300: "#fca5a5",
15
+ 400: "#f87171",
16
+ 500: "#ef4444",
17
+ 600: "#dc2626",
18
+ 700: "#b91c1c",
19
+ 800: "#991b1b",
20
+ 900: "#7f1d1d"
21
+ },
22
+ gray: {
23
+ 50: "#f9fafb",
24
+ 100: "#f3f4f6",
25
+ 200: "#e5e7eb",
26
+ 300: "#d1d5db",
27
+ 400: "#9ca3af",
28
+ 500: "#6b7280",
29
+ 600: "#4b5563",
30
+ 700: "#374151",
31
+ 800: "#1f2937",
32
+ 900: "#111827",
33
+ 950: "#0d1117"
34
+ },
35
+ primary: {
36
+ 50: "var(--primary-50, var(--bichat-color-primary-50, #eff6ff))",
37
+ 100: "var(--primary-100, var(--bichat-color-primary-100, #dbeafe))",
38
+ 200: "var(--primary-200, var(--bichat-color-primary-200, #bfdbfe))",
39
+ 300: "var(--primary-300, var(--bichat-color-primary-300, #93c5fd))",
40
+ 400: "var(--primary-400, var(--bichat-color-primary-400, #60a5fa))",
41
+ 500: "var(--primary-500, var(--bichat-color-primary-500, #3b82f6))",
42
+ 600: "var(--primary-600, var(--bichat-color-primary-600, #2563eb))",
43
+ 700: "var(--primary-700, var(--bichat-color-primary-700, #1d4ed8))",
44
+ 800: "var(--primary-800, var(--bichat-color-primary-800, #1e40af))",
45
+ 900: "var(--primary-900, var(--bichat-color-primary-900, #1e3a8a))"
46
+ }
47
+ },
48
+ fontFamily: {
49
+ sans: ['"Gilroy"', "system-ui", "-apple-system", "sans-serif"]
50
+ },
51
+ boxShadow: {
52
+ xs: "var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05))",
53
+ sm: "var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1))",
54
+ md: "var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1))",
55
+ lg: "var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1))",
56
+ xl: "var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1))"
57
+ },
58
+ borderRadius: {
59
+ "2xl": "1rem",
60
+ "3xl": "1.5rem"
61
+ }
62
+ }
63
+ },
64
+ plugins: []
65
+ };
66
+ function bichatTailwindContent() {
67
+ const require2 = createRequire(import.meta.url);
68
+ let pkgDir;
69
+ try {
70
+ const pkgJsonPath = require2.resolve("@iota-uz/sdk/package.json");
71
+ pkgDir = path.dirname(pkgJsonPath);
72
+ } catch {
73
+ const entryPath = require2.resolve("@iota-uz/sdk");
74
+ pkgDir = path.dirname(entryPath);
75
+ }
76
+ const distBichat = pkgDir.endsWith(path.sep + "dist") || pkgDir.endsWith("/dist") ? path.join(pkgDir, "bichat") : path.join(pkgDir, "dist", "bichat");
77
+ return [
78
+ path.join(distBichat, "index.mjs"),
79
+ path.join(distBichat, "index.cjs")
80
+ ];
81
+ }
82
+
83
+ export { bichatTailwindContent, bichatTailwindPreset };
84
+ //# sourceMappingURL=tailwind.mjs.map
85
+ //# sourceMappingURL=tailwind.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../ui/src/bichat/tailwind.ts"],"names":["require"],"mappings":";;;;AAoBO,IAAM,oBAAA,GAAuC;AAAA,EAClD,QAAA,EAAU,UAAA;AAAA,EACV,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ;AAAA,QACN,GAAA,EAAK;AAAA,UACH,EAAA,EAAI,SAAA;AAAA,UACJ,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK;AAAA,SACP;AAAA,QACA,IAAA,EAAM;AAAA,UACJ,EAAA,EAAI,SAAA;AAAA,UACJ,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK,SAAA;AAAA,UACL,GAAA,EAAK;AAAA,SACP;AAAA,QACA,OAAA,EAAS;AAAA,UACP,EAAA,EAAI,4DAAA;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OAAO,IAC5E,IAAA,CAAK,IAAA,CAAK,QAAQ,QAAQ,CAAA,GAC1B,KAAK,IAAA,CAAK,MAAA,EAAQ,QAAQ,QAAQ,CAAA;AACtC,EAAA,OAAO;AAAA,IACL,IAAA,CAAK,IAAA,CAAK,UAAA,EAAY,WAAW,CAAA;AAAA,IACjC,IAAA,CAAK,IAAA,CAAK,UAAA,EAAY,WAAW;AAAA,GACnC;AACF","file":"tailwind.mjs","sourcesContent":["/**\n * BiChat Tailwind preset and content helper for downstream applets.\n * Use these so Tailwind generates utilities for SDK BiChat components and so\n * theme tokens stay consistent. Always import @iota-uz/sdk/bichat/styles.css\n * in your applet CSS for design tokens.\n */\nimport path from 'node:path'\nimport { createRequire } from 'node:module'\n\n/** Tailwind v3 config preset type (minimal shape we extend). */\nexport type TailwindPreset = {\n darkMode?: 'class' | 'selector' | 'media'\n theme?: { extend?: Record<string, unknown> }\n plugins?: unknown[]\n}\n\n/**\n * Preset for BiChat UI: theme extensions and dark mode.\n * Stable and minimal; apps can override via their own theme or CSS variables.\n */\nexport const bichatTailwindPreset: TailwindPreset = {\n darkMode: 'selector',\n theme: {\n extend: {\n colors: {\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f3f4f6',\n 200: '#e5e7eb',\n 300: '#d1d5db',\n 400: '#9ca3af',\n 500: '#6b7280',\n 600: '#4b5563',\n 700: '#374151',\n 800: '#1f2937',\n 900: '#111827',\n 950: '#0d1117',\n },\n primary: {\n 50: 'var(--primary-50, var(--bichat-color-primary-50, #eff6ff))',\n 100: 'var(--primary-100, var(--bichat-color-primary-100, #dbeafe))',\n 200: 'var(--primary-200, var(--bichat-color-primary-200, #bfdbfe))',\n 300: 'var(--primary-300, var(--bichat-color-primary-300, #93c5fd))',\n 400: 'var(--primary-400, var(--bichat-color-primary-400, #60a5fa))',\n 500: 'var(--primary-500, var(--bichat-color-primary-500, #3b82f6))',\n 600: 'var(--primary-600, var(--bichat-color-primary-600, #2563eb))',\n 700: 'var(--primary-700, var(--bichat-color-primary-700, #1d4ed8))',\n 800: 'var(--primary-800, var(--bichat-color-primary-800, #1e40af))',\n 900: 'var(--primary-900, var(--bichat-color-primary-900, #1e3a8a))',\n },\n },\n fontFamily: {\n sans: ['\"Gilroy\"', 'system-ui', '-apple-system', 'sans-serif'],\n },\n boxShadow: {\n xs: 'var(--shadow-xs, 0 1px 2px 0 rgb(0 0 0 / 0.05))',\n sm: 'var(--shadow-sm, 0 1px 3px 0 rgb(0 0 0 / 0.1))',\n md: 'var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1))',\n lg: 'var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1))',\n xl: 'var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1))',\n },\n borderRadius: {\n '2xl': '1rem',\n '3xl': '1.5rem',\n },\n },\n },\n plugins: [],\n}\n\n/**\n * Returns absolute paths to SDK BiChat bundle files so Tailwind can scan them\n * for class names. Include the result in your Tailwind config content array.\n * Resolves via @iota-uz/sdk/package.json when available so the package root is unambiguous.\n */\nexport function bichatTailwindContent(): string[] {\n const require = createRequire(import.meta.url)\n let pkgDir: string\n try {\n const pkgJsonPath = require.resolve('@iota-uz/sdk/package.json')\n pkgDir = path.dirname(pkgJsonPath)\n } catch {\n const entryPath = require.resolve('@iota-uz/sdk')\n pkgDir = path.dirname(entryPath) // when \".\" resolves to dist/index.mjs, dirname is dist\n }\n const distBichat = pkgDir.endsWith(path.sep + 'dist') || pkgDir.endsWith('/dist')\n ? path.join(pkgDir, 'bichat')\n : path.join(pkgDir, 'dist', 'bichat')\n return [\n path.join(distBichat, 'index.mjs'),\n path.join(distBichat, 'index.cjs'),\n ]\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iota-uz/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "IOTA SDK UI utilities, Tailwind configuration, and React components for building IOTA SDK applets.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -22,6 +22,7 @@
22
22
  "LICENSE"
23
23
  ],
24
24
  "exports": {
25
+ "./package.json": "./package.json",
25
26
  ".": {
26
27
  "types": "./dist/index.d.ts",
27
28
  "import": "./dist/index.mjs",
@@ -33,6 +34,16 @@
33
34
  "require": "./dist/bichat/index.cjs"
34
35
  },
35
36
  "./bichat/styles.css": "./dist/bichat/styles.css",
37
+ "./bichat/tailwind": {
38
+ "types": "./dist/bichat/tailwind.d.ts",
39
+ "import": "./dist/bichat/tailwind.mjs",
40
+ "require": "./dist/bichat/tailwind.cjs"
41
+ },
42
+ "./applet/vite": {
43
+ "types": "./dist/applet/vite.d.ts",
44
+ "import": "./dist/applet/vite.mjs",
45
+ "require": "./dist/applet/vite.cjs"
46
+ },
36
47
  "./tailwind/main.css": "./tailwind/main.css",
37
48
  "./tailwind/iota.css": "./tailwind/iota.css",
38
49
  "./tailwind/compiled.css": "./tailwind/compiled.css",