@elia-assistant/chatui 1.0.0

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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +348 -0
  3. package/dist/App.d.ts +3 -0
  4. package/dist/assets/avatars/index.d.ts +4 -0
  5. package/dist/chat-store.js +96 -0
  6. package/dist/chatui.css +3 -0
  7. package/dist/chatui.css.d.ts +1 -0
  8. package/dist/chatui.iife.css +3 -0
  9. package/dist/chatui.iife.js +66 -0
  10. package/dist/chunks/i18n-BySVyBiz.js +2 -0
  11. package/dist/chunks/i18n-oL80Kbbg.js +1304 -0
  12. package/dist/chunks/middleware-DgE1WAsA.js +137 -0
  13. package/dist/chunks/settingsStore-BqlYxczg.js +254 -0
  14. package/dist/chunks/translation-B1sKHGC8.js +81 -0
  15. package/dist/chunks/translation-DYf8xjwU.js +81 -0
  16. package/dist/components/ChatView.d.ts +5 -0
  17. package/dist/components/CtaPopup.d.ts +6 -0
  18. package/dist/components/FaqTab.d.ts +7 -0
  19. package/dist/components/InputArea.d.ts +8 -0
  20. package/dist/components/MessageBubble.d.ts +7 -0
  21. package/dist/components/NotificationsTab.d.ts +7 -0
  22. package/dist/components/SettingsModal.d.ts +5 -0
  23. package/dist/components/Sidebar.d.ts +5 -0
  24. package/dist/components/Tabs.d.ts +12 -0
  25. package/dist/components/ThemePicker.d.ts +1 -0
  26. package/dist/createChat.d.ts +23 -0
  27. package/dist/hooks/useChat.d.ts +4 -0
  28. package/dist/hooks/useCta.d.ts +6 -0
  29. package/dist/hooks/useFeedJson.d.ts +11 -0
  30. package/dist/hooks/useTheme.d.ts +4 -0
  31. package/dist/i18n.d.ts +2 -0
  32. package/dist/index.d.ts +4 -0
  33. package/dist/index.js +10012 -0
  34. package/dist/lib/n8nClient.d.ts +18 -0
  35. package/dist/lib/storage.d.ts +3 -0
  36. package/dist/shims/use-sync-external-store-shim.d.ts +1 -0
  37. package/dist/store/chatStore.d.ts +37 -0
  38. package/dist/store/settingsStore.d.ts +23 -0
  39. package/dist/store.js +2 -0
  40. package/dist/themes.d.ts +4 -0
  41. package/dist/types/index.d.ts +138 -0
  42. package/dist/types.js +0 -0
  43. package/package.json +79 -0
@@ -0,0 +1,137 @@
1
+ import e from "react";
2
+ //#region node_modules/zustand/esm/vanilla.mjs
3
+ var t = (e) => {
4
+ let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
5
+ let i = typeof e == "function" ? e(t) : e;
6
+ if (!Object.is(i, t)) {
7
+ let e = t;
8
+ t = r ?? (typeof i != "object" || !i) ? i : Object.assign({}, t, i), n.forEach((n) => n(t, e));
9
+ }
10
+ }, i = () => t, a = {
11
+ setState: r,
12
+ getState: i,
13
+ getInitialState: () => o,
14
+ subscribe: (e) => (n.add(e), () => n.delete(e))
15
+ }, o = t = e(r, i, a);
16
+ return a;
17
+ }, n = ((e) => e ? t(e) : t), r = (e) => e;
18
+ function i(t, n = r) {
19
+ let i = e.useSyncExternalStore(t.subscribe, e.useCallback(() => n(t.getState()), [t, n]), e.useCallback(() => n(t.getInitialState()), [t, n]));
20
+ return e.useDebugValue(i), i;
21
+ }
22
+ var a = (e) => {
23
+ let t = n(e), r = (e) => i(t, e);
24
+ return Object.assign(r, t), r;
25
+ }, o = ((e) => e ? a(e) : a);
26
+ //#endregion
27
+ //#region node_modules/zustand/esm/middleware.mjs
28
+ function s(e, t) {
29
+ let n;
30
+ try {
31
+ n = e();
32
+ } catch {
33
+ return;
34
+ }
35
+ return {
36
+ getItem: (e) => {
37
+ let r = (e) => e === null ? null : JSON.parse(e, t?.reviver), i = n.getItem(e) ?? null;
38
+ return i instanceof Promise ? i.then(r) : r(i);
39
+ },
40
+ setItem: (e, r) => n.setItem(e, JSON.stringify(r, t?.replacer)),
41
+ removeItem: (e) => n.removeItem(e)
42
+ };
43
+ }
44
+ var c = (e) => (t) => {
45
+ try {
46
+ let n = e(t);
47
+ return n instanceof Promise ? n : {
48
+ then(e) {
49
+ return c(e)(n);
50
+ },
51
+ catch(e) {
52
+ return this;
53
+ }
54
+ };
55
+ } catch (e) {
56
+ return {
57
+ then(e) {
58
+ return this;
59
+ },
60
+ catch(t) {
61
+ return c(t)(e);
62
+ }
63
+ };
64
+ }
65
+ }, l = (e, t) => (n, r, i) => {
66
+ let a = {
67
+ storage: s(() => window.localStorage),
68
+ partialize: (e) => e,
69
+ version: 0,
70
+ merge: (e, t) => ({
71
+ ...t,
72
+ ...e
73
+ }),
74
+ ...t
75
+ }, o = !1, l = 0, u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), f = a.storage;
76
+ if (!f) return e((...e) => {
77
+ console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`), n(...e);
78
+ }, r, i);
79
+ let p = () => {
80
+ let e = a.partialize({ ...r() });
81
+ return f.setItem(a.name, {
82
+ state: e,
83
+ version: a.version
84
+ });
85
+ }, m = i.setState;
86
+ i.setState = (e, t) => (m(e, t), p());
87
+ let h = e((...e) => (n(...e), p()), r, i);
88
+ i.getInitialState = () => h;
89
+ let g, _ = () => {
90
+ if (!f) return;
91
+ let e = ++l;
92
+ o = !1, u.forEach((e) => e(r() ?? h));
93
+ let t = a.onRehydrateStorage?.call(a, r() ?? h) || void 0;
94
+ return c(f.getItem.bind(f))(a.name).then((e) => {
95
+ if (e) if (typeof e.version == "number" && e.version !== a.version) {
96
+ if (a.migrate) {
97
+ let t = a.migrate(e.state, e.version);
98
+ return t instanceof Promise ? t.then((e) => [!0, e]) : [!0, t];
99
+ }
100
+ console.error("State loaded from storage couldn't be migrated since no migrate function was provided");
101
+ } else return [!1, e.state];
102
+ return [!1, void 0];
103
+ }).then((t) => {
104
+ if (e !== l) return;
105
+ let [i, o] = t;
106
+ if (g = a.merge(o, r() ?? h), n(g, !0), i) return p();
107
+ }).then(() => {
108
+ e === l && (t?.(r(), void 0), g = r(), o = !0, d.forEach((e) => e(g)));
109
+ }).catch((n) => {
110
+ e === l && t?.(void 0, n);
111
+ });
112
+ };
113
+ return i.persist = {
114
+ setOptions: (e) => {
115
+ a = {
116
+ ...a,
117
+ ...e
118
+ }, e.storage && (f = e.storage);
119
+ },
120
+ clearStorage: () => {
121
+ f?.removeItem(a.name);
122
+ },
123
+ getOptions: () => a,
124
+ rehydrate: () => _(),
125
+ hasHydrated: () => o,
126
+ onHydrate: (e) => (u.add(e), () => {
127
+ u.delete(e);
128
+ }),
129
+ onFinishHydration: (e) => (d.add(e), () => {
130
+ d.delete(e);
131
+ })
132
+ }, a.skipHydration || _(), g || h;
133
+ };
134
+ //#endregion
135
+ export { o as n, l as t };
136
+
137
+ //# sourceMappingURL=middleware-DgE1WAsA.js.map
@@ -0,0 +1,254 @@
1
+ import { n as e, t } from "./middleware-DgE1WAsA.js";
2
+ //#region src/themes.ts
3
+ var n = [
4
+ {
5
+ id: "midnight",
6
+ label: "Midnight",
7
+ scheme: "dark",
8
+ vars: {
9
+ bgBase: "#0f1117",
10
+ bgSurface: "#1a1d27",
11
+ bgSurface2: "#22263a",
12
+ bgBorder: "#2d3142",
13
+ accent: "#6366f1",
14
+ accentFg: "#ffffff",
15
+ fgPrimary: "#ffffff",
16
+ fgSecondary: "#94a3b8",
17
+ fgMuted: "#64748b",
18
+ userBubble: "#6366f1",
19
+ userBubbleFg: "#ffffff"
20
+ }
21
+ },
22
+ {
23
+ id: "ivory",
24
+ label: "Ivory",
25
+ scheme: "light",
26
+ vars: {
27
+ bgBase: "#ffffff",
28
+ bgSurface: "#f1f5f9",
29
+ bgSurface2: "#e2e8f0",
30
+ bgBorder: "#cbd5e1",
31
+ accent: "#4338ca",
32
+ accentFg: "#ffffff",
33
+ fgPrimary: "#0f172a",
34
+ fgSecondary: "#334155",
35
+ fgMuted: "#64748b",
36
+ userBubble: "#4338ca",
37
+ userBubbleFg: "#ffffff"
38
+ }
39
+ },
40
+ {
41
+ id: "sunrise",
42
+ label: "Sunrise",
43
+ scheme: "light",
44
+ vars: {
45
+ bgBase: "#ffffff",
46
+ bgSurface: "#fff7ed",
47
+ bgSurface2: "#ffedd5",
48
+ bgBorder: "#fed7aa",
49
+ accent: "#f97316",
50
+ accentFg: "#ffffff",
51
+ fgPrimary: "#1c0a00",
52
+ fgSecondary: "#431407",
53
+ fgMuted: "#9a3412",
54
+ userBubble: "#f97316",
55
+ userBubbleFg: "#ffffff"
56
+ }
57
+ },
58
+ {
59
+ id: "cosmos",
60
+ label: "Cosmos",
61
+ scheme: "dark",
62
+ vars: {
63
+ bgBase: "#0d0a1a",
64
+ bgSurface: "#15102b",
65
+ bgSurface2: "#1e1840",
66
+ bgBorder: "#2e2555",
67
+ accent: "#a855f7",
68
+ accentFg: "#ffffff",
69
+ fgPrimary: "#f3e8ff",
70
+ fgSecondary: "#c4b5fd",
71
+ fgMuted: "#7c3aed",
72
+ userBubble: "#a855f7",
73
+ userBubbleFg: "#ffffff"
74
+ }
75
+ },
76
+ {
77
+ id: "forest",
78
+ label: "Forest",
79
+ scheme: "dark",
80
+ vars: {
81
+ bgBase: "#0a1410",
82
+ bgSurface: "#111f18",
83
+ bgSurface2: "#162b1f",
84
+ bgBorder: "#1e3a2a",
85
+ accent: "#22c55e",
86
+ accentFg: "#ffffff",
87
+ fgPrimary: "#dcfce7",
88
+ fgSecondary: "#86efac",
89
+ fgMuted: "#4ade80",
90
+ userBubble: "#16a34a",
91
+ userBubbleFg: "#ffffff"
92
+ }
93
+ },
94
+ {
95
+ id: "ocean",
96
+ label: "Ocean",
97
+ scheme: "dark",
98
+ vars: {
99
+ bgBase: "#060f1a",
100
+ bgSurface: "#0c1b2e",
101
+ bgSurface2: "#112440",
102
+ bgBorder: "#163354",
103
+ accent: "#06b6d4",
104
+ accentFg: "#ffffff",
105
+ fgPrimary: "#e0f7fa",
106
+ fgSecondary: "#67e8f9",
107
+ fgMuted: "#0891b2",
108
+ userBubble: "#0891b2",
109
+ userBubbleFg: "#ffffff"
110
+ }
111
+ },
112
+ {
113
+ id: "cherry",
114
+ label: "Cherry",
115
+ scheme: "dark",
116
+ vars: {
117
+ bgBase: "#120608",
118
+ bgSurface: "#1e0c10",
119
+ bgSurface2: "#2a1016",
120
+ bgBorder: "#3d1520",
121
+ accent: "#ef4444",
122
+ accentFg: "#ffffff",
123
+ fgPrimary: "#ffe4e6",
124
+ fgSecondary: "#fca5a5",
125
+ fgMuted: "#f87171",
126
+ userBubble: "#dc2626",
127
+ userBubbleFg: "#ffffff"
128
+ }
129
+ },
130
+ {
131
+ id: "navy",
132
+ label: "Navy",
133
+ scheme: "dark",
134
+ vars: {
135
+ bgBase: "#080f1e",
136
+ bgSurface: "#0f1a33",
137
+ bgSurface2: "#162348",
138
+ bgBorder: "#1e3060",
139
+ accent: "#3b82f6",
140
+ accentFg: "#ffffff",
141
+ fgPrimary: "#dbeafe",
142
+ fgSecondary: "#93c5fd",
143
+ fgMuted: "#60a5fa",
144
+ userBubble: "#2563eb",
145
+ userBubbleFg: "#ffffff"
146
+ }
147
+ },
148
+ {
149
+ id: "lavender",
150
+ label: "Lavender",
151
+ scheme: "light",
152
+ vars: {
153
+ bgBase: "#faf5ff",
154
+ bgSurface: "#f3e8ff",
155
+ bgSurface2: "#e9d5ff",
156
+ bgBorder: "#d8b4fe",
157
+ accent: "#8b5cf6",
158
+ accentFg: "#ffffff",
159
+ fgPrimary: "#2e1065",
160
+ fgSecondary: "#4c1d95",
161
+ fgMuted: "#7c3aed",
162
+ userBubble: "#7c3aed",
163
+ userBubbleFg: "#ffffff"
164
+ }
165
+ },
166
+ {
167
+ id: "amber",
168
+ label: "Amber",
169
+ scheme: "dark",
170
+ vars: {
171
+ bgBase: "#0f0a00",
172
+ bgSurface: "#1c1400",
173
+ bgSurface2: "#2a1d00",
174
+ bgBorder: "#3d2c00",
175
+ accent: "#f59e0b",
176
+ accentFg: "#000000",
177
+ fgPrimary: "#fef3c7",
178
+ fgSecondary: "#fcd34d",
179
+ fgMuted: "#d97706",
180
+ userBubble: "#d97706",
181
+ userBubbleFg: "#000000"
182
+ }
183
+ }
184
+ ], r = "midnight";
185
+ function i(e) {
186
+ return n.find((t) => t.id === e) ?? n[0];
187
+ }
188
+ //#endregion
189
+ //#region src/store/settingsStore.ts
190
+ var a = {
191
+ webhookUrl: "",
192
+ chatInputKey: "chatInput",
193
+ chatSessionKey: "sessionId",
194
+ mode: "fullscreen",
195
+ showSidebar: !1,
196
+ showWelcomeScreen: !0,
197
+ streaming: !1,
198
+ botName: "Assistant",
199
+ showCta: !0,
200
+ ctaText: "Hi! How can I help you today?",
201
+ ctaDelay: 5e3,
202
+ ctaSound: !0,
203
+ hideSettings: !0,
204
+ poweredByLabel: "ELIA AI Assistant",
205
+ poweredByUrl: "https://www.elia-asistent.com",
206
+ poweredByHide: !1,
207
+ fullscreenSheet: !1,
208
+ fullscreenSheetHeight: "75vh",
209
+ i18n: {
210
+ en: {
211
+ initialMessages: [],
212
+ ctaText: "Hi! How can I help you today?"
213
+ },
214
+ sk: {
215
+ initialMessages: [],
216
+ ctaText: "Dobrý deň! Ako vám môžem pomôcť?"
217
+ }
218
+ }
219
+ }, o = e()(t((e) => ({
220
+ config: a,
221
+ activeTheme: r,
222
+ language: "en",
223
+ setConfig(t) {
224
+ e((e) => ({ config: {
225
+ ...e.config,
226
+ ...t
227
+ } }));
228
+ },
229
+ setTheme(t) {
230
+ e({ activeTheme: t });
231
+ },
232
+ setLanguage(t) {
233
+ e({ language: t }), import("./i18n-BySVyBiz.js").then((e) => {
234
+ e.default.changeLanguage(t);
235
+ });
236
+ }
237
+ }), {
238
+ name: "chatui-settings",
239
+ merge: (e, t) => {
240
+ let n = e;
241
+ return {
242
+ ...t,
243
+ ...n,
244
+ config: {
245
+ ...t.config,
246
+ ...n.config ?? {}
247
+ }
248
+ };
249
+ }
250
+ }));
251
+ //#endregion
252
+ export { i as n, n as r, o as t };
253
+
254
+ //# sourceMappingURL=settingsStore-BqlYxczg.js.map
@@ -0,0 +1,81 @@
1
+ //#region src/locales/en/translation.json
2
+ var e = { subtitle: "Start a conversation. I'm here to help." }, t = {
3
+ placeholder: "Type a message… (Enter to send)",
4
+ placeholderUnconfigured: "Configure webhook URL in settings…"
5
+ }, n = {
6
+ assistant: "Assistant",
7
+ online: "online",
8
+ notConfigured: "Not configured"
9
+ }, r = {
10
+ title: "Conversations",
11
+ empty: "No conversations yet.",
12
+ newChat: "New conversation",
13
+ settings: "Settings"
14
+ }, i = { poweredBy: "Powered by <a>{{label}}</a>" }, a = {
15
+ notifications: "Tips",
16
+ help: "Help",
17
+ chat: "Chat",
18
+ faqSearch: "Search FAQ…",
19
+ loading: "Loading…",
20
+ error: "Couldn't load",
21
+ empty: {
22
+ notifications: "No notifications yet.",
23
+ faq: "No matching entries."
24
+ }
25
+ }, o = {
26
+ title: "Settings",
27
+ language: "Interface language",
28
+ webhookUrl: "Webhook URL",
29
+ chatInputKey: "Chat input key",
30
+ sessionKey: "Session key",
31
+ botName: "Bot name (global fallback)",
32
+ metadata: "Metadata (JSON)",
33
+ streaming: "Enable streaming (SSE)",
34
+ welcomeScreen: "Show welcome screen",
35
+ sidebar: "Show conversation sidebar",
36
+ fileUploads: "Allow file uploads",
37
+ mode: "Display mode",
38
+ fullscreenSheet: "Bottom-sheet style (don't cover full screen)",
39
+ fullscreenSheetHeight: "Sheet height (CSS length, e.g. 75vh, 600px)",
40
+ tabsSection: "Tabs (notifications + FAQ)",
41
+ tabsNotificationsTitle: "Notifications tab title",
42
+ tabsNotificationsFeedUrl: "Notifications feed URL",
43
+ tabsHelpTitle: "FAQ tab title",
44
+ tabsHelpFeedUrl: "FAQ feed URL",
45
+ tabsChatTitle: "Chat tab title",
46
+ cta: "Show CTA popup",
47
+ ctaSound: "Play notification sound",
48
+ ctaDelay: "CTA delay (ms)",
49
+ perLanguage: "Per-language content",
50
+ addLanguage: "Add language",
51
+ botNameOverride: "Bot name override",
52
+ welcomeSubtitle: "Welcome subtitle",
53
+ initialMessages: "Initial messages (one per line)",
54
+ initialMessagesPlaceholder: "Hello! How can I help you today?\nI speak your language.",
55
+ ctaTextLabel: "CTA popup text",
56
+ botAvatar: "Bot avatar",
57
+ toggleButtonIcon: "Popup button icon",
58
+ avatarNone: "None",
59
+ avatarClear: "Clear",
60
+ avatarUpload: "Upload…",
61
+ avatarUrlPlaceholder: "or paste a URL",
62
+ avatarErrorType: "Please choose an image file.",
63
+ avatarErrorSize: "Image is too large (max 500 KB).",
64
+ poweredByLabel: "\"Powered by\" link text",
65
+ poweredByUrl: "\"Powered by\" link URL",
66
+ poweredByHide: "Hide \"Powered by\" footer",
67
+ save: "Save",
68
+ cancel: "Cancel"
69
+ }, s = {
70
+ welcome: e,
71
+ input: t,
72
+ header: n,
73
+ sidebar: r,
74
+ footer: i,
75
+ tabs: a,
76
+ settings: o
77
+ };
78
+ //#endregion
79
+ export { s as default, i as footer, n as header, t as input, o as settings, r as sidebar, a as tabs, e as welcome };
80
+
81
+ //# sourceMappingURL=translation-B1sKHGC8.js.map
@@ -0,0 +1,81 @@
1
+ //#region src/locales/sk/translation.json
2
+ var e = { subtitle: "Začnite konverzáciu. Som tu pre vás." }, t = {
3
+ placeholder: "Napíšte správu… (Enter = odoslať)",
4
+ placeholderUnconfigured: "Nastavte webhook URL v nastaveniach…"
5
+ }, n = {
6
+ assistant: "Asistent",
7
+ online: "online",
8
+ notConfigured: "Nenakonfigurované"
9
+ }, r = {
10
+ title: "Konverzácie",
11
+ empty: "Zatiaľ žiadne konverzácie.",
12
+ newChat: "Nová konverzácia",
13
+ settings: "Nastavenia"
14
+ }, i = { poweredBy: "Poháňa <a>{{label}}</a>" }, a = {
15
+ notifications: "Tipy",
16
+ help: "Pomoc",
17
+ chat: "Chat",
18
+ faqSearch: "Hľadať vo FAQ…",
19
+ loading: "Načítavam…",
20
+ error: "Nepodarilo sa načítať",
21
+ empty: {
22
+ notifications: "Zatiaľ žiadne oznámenia.",
23
+ faq: "Žiadne zhodné položky."
24
+ }
25
+ }, o = {
26
+ title: "Nastavenia",
27
+ language: "Jazyk rozhrania",
28
+ webhookUrl: "Webhook URL",
29
+ chatInputKey: "Kľúč vstupu chatu",
30
+ sessionKey: "Kľúč relácie",
31
+ botName: "Meno bota (globálna záloha)",
32
+ metadata: "Metadáta (JSON)",
33
+ streaming: "Povoliť streaming (SSE)",
34
+ welcomeScreen: "Zobraziť uvítaciu obrazovku",
35
+ sidebar: "Zobraziť históriu konverzácií",
36
+ fileUploads: "Povoliť nahrávanie súborov",
37
+ mode: "Režim zobrazenia",
38
+ fullscreenSheet: "Štýl spodného panela (nepokryje celú obrazovku)",
39
+ fullscreenSheetHeight: "Výška panela (CSS dĺžka, napr. 75vh, 600px)",
40
+ tabsSection: "Záložky (oznámenia + FAQ)",
41
+ tabsNotificationsTitle: "Názov záložky oznámení",
42
+ tabsNotificationsFeedUrl: "URL feedu oznámení",
43
+ tabsHelpTitle: "Názov záložky FAQ",
44
+ tabsHelpFeedUrl: "URL feedu FAQ",
45
+ tabsChatTitle: "Názov záložky chatu",
46
+ cta: "Zobraziť CTA popup",
47
+ ctaSound: "Prehrať zvuk notifikácie",
48
+ ctaDelay: "Oneskorenie CTA (ms)",
49
+ perLanguage: "Obsah podľa jazyka",
50
+ addLanguage: "Pridať jazyk",
51
+ botNameOverride: "Prepísať meno bota",
52
+ welcomeSubtitle: "Uvítací podtitul",
53
+ initialMessages: "Úvodné správy (jedna za riadok)",
54
+ initialMessagesPlaceholder: "Dobrý deň! Ako vám môžem pomôcť?\nHovorím vaším jazykom.",
55
+ ctaTextLabel: "Text CTA popupu",
56
+ botAvatar: "Avatar bota",
57
+ toggleButtonIcon: "Ikona tlačidla popupu",
58
+ avatarNone: "Žiadny",
59
+ avatarClear: "Vymazať",
60
+ avatarUpload: "Nahrať…",
61
+ avatarUrlPlaceholder: "alebo vložte URL",
62
+ avatarErrorType: "Vyberte súbor obrázka.",
63
+ avatarErrorSize: "Obrázok je príliš veľký (max 500 KB).",
64
+ poweredByLabel: "Text odkazu \"Poháňa\"",
65
+ poweredByUrl: "URL odkazu \"Poháňa\"",
66
+ poweredByHide: "Skryť pätičku \"Poháňa\"",
67
+ save: "Uložiť",
68
+ cancel: "Zrušiť"
69
+ }, s = {
70
+ welcome: e,
71
+ input: t,
72
+ header: n,
73
+ sidebar: r,
74
+ footer: i,
75
+ tabs: a,
76
+ settings: o
77
+ };
78
+ //#endregion
79
+ export { s as default, i as footer, n as header, t as input, o as settings, r as sidebar, a as tabs, e as welcome };
80
+
81
+ //# sourceMappingURL=translation-DYf8xjwU.js.map
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ onOpenSettings: () => void;
3
+ }
4
+ export declare function ChatView({ onOpenSettings }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ text: string;
3
+ onDismiss: () => void;
4
+ }
5
+ export declare function CtaPopup({ text, onDismiss }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { FaqItem } from '../types/index.ts';
2
+ interface Props {
3
+ feedUrl: string | undefined;
4
+ inlineItems: FaqItem[] | undefined;
5
+ }
6
+ export declare function FaqTab({ feedUrl, inlineItems }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ interface Props {
2
+ onSend: (text: string) => void;
3
+ disabled?: boolean;
4
+ placeholder?: string;
5
+ allowFileUploads?: boolean;
6
+ }
7
+ export declare function InputArea({ onSend, disabled, placeholder, allowFileUploads }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Message } from '../types/index.ts';
2
+ interface Props {
3
+ message: Message;
4
+ }
5
+ export declare function MessageBubble({ message }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export declare function TypingIndicator(): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { NotificationItem } from '../types/index.ts';
2
+ interface Props {
3
+ feedUrl: string | undefined;
4
+ inlineItems: NotificationItem[] | undefined;
5
+ }
6
+ export declare function NotificationsTab({ feedUrl, inlineItems }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ onClose: () => void;
3
+ }
4
+ export declare function SettingsModal({ onClose }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ onOpenSettings: () => void;
3
+ }
4
+ export declare function Sidebar({ onOpenSettings }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,12 @@
1
+ interface Tab {
2
+ id: string;
3
+ label: string;
4
+ icon?: 'bulb' | 'book' | 'chat';
5
+ }
6
+ interface Props {
7
+ tabs: Tab[];
8
+ activeId: string;
9
+ onChange: (id: string) => void;
10
+ }
11
+ export declare function Tabs({ tabs, activeId, onChange }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare function ThemePicker(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import type { ChatConfig } from './types/index.ts';
2
+ export interface CreateChatOptions extends Partial<ChatConfig> {
3
+ /** CSS selector or DOM element where the chat will mount. */
4
+ target: string | HTMLElement;
5
+ /** Initial UI language code (e.g. 'en', 'sk'). Same as setting `defaultLanguage` but applied immediately. */
6
+ language?: string;
7
+ }
8
+ export interface ChatInstance {
9
+ /** Unmount the chat and detach React. */
10
+ unmount(): void;
11
+ }
12
+ /**
13
+ * Mount the chat widget into the page without writing any React code.
14
+ * Drop-in API mirrored on @n8n/chat for vanilla-JS / CDN consumers.
15
+ *
16
+ * @example
17
+ * createChat({
18
+ * target: '#chat',
19
+ * webhookUrl: 'https://your-n8n.example.com/webhook/abc',
20
+ * mode: 'window',
21
+ * })
22
+ */
23
+ export declare function createChat(opts: CreateChatOptions): ChatInstance;
@@ -0,0 +1,4 @@
1
+ export declare function useChat(): {
2
+ send: (text: string) => Promise<void>;
3
+ isStreaming: boolean;
4
+ };
@@ -0,0 +1,6 @@
1
+ import type { ChatConfig } from '../types/index.ts';
2
+ export declare function useCta(config: ChatConfig, language: string): {
3
+ showCta: boolean;
4
+ ctaText: string;
5
+ dismiss: () => void;
6
+ };
@@ -0,0 +1,11 @@
1
+ interface FeedState<T> {
2
+ data: T[];
3
+ loading: boolean;
4
+ error: string | undefined;
5
+ }
6
+ /**
7
+ * Fetch a JSON feed in the shape `{ items: T[] }` from `url`. If `url` is unset,
8
+ * falls back to `inline` synchronously. URL wins when both are provided.
9
+ */
10
+ export declare function useFeedJson<T>(url: string | undefined, inline: T[] | undefined): FeedState<T>;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function useTheme(): {
2
+ activeTheme: string;
3
+ setTheme: (id: string) => void;
4
+ };
package/dist/i18n.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import i18n from 'i18next';
2
+ export default i18n;