@r2digisolutions/components 0.21.21 → 0.21.23
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.
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
LoaderCircle,
|
|
13
13
|
RotateCcw,
|
|
14
14
|
Copy,
|
|
15
|
-
Check
|
|
15
|
+
Check,
|
|
16
|
+
ChevronLeft
|
|
16
17
|
} from '@lucide/svelte';
|
|
17
18
|
|
|
18
19
|
export interface AssistantMessage {
|
|
@@ -52,12 +53,16 @@
|
|
|
52
53
|
voiceOffLabel?: string;
|
|
53
54
|
copyChatLabel?: string;
|
|
54
55
|
copiedChatLabel?: string;
|
|
56
|
+
/** Optional back control (e.g. return to conversation list). */
|
|
57
|
+
backLabel?: string;
|
|
58
|
+
subtitle?: string;
|
|
55
59
|
class?: string;
|
|
56
60
|
result?: Snippet<[AssistantMessage]>;
|
|
57
61
|
footerExtra?: Snippet;
|
|
58
62
|
onsend?: () => void;
|
|
59
63
|
onclose?: () => void;
|
|
60
64
|
onnewchat?: () => void;
|
|
65
|
+
onback?: () => void;
|
|
61
66
|
oncopychat?: () => void | Promise<void>;
|
|
62
67
|
onmicclick?: () => void;
|
|
63
68
|
onvoiceoutputchange?: (on: boolean) => void;
|
|
@@ -92,12 +97,15 @@
|
|
|
92
97
|
voiceOffLabel = 'Voz desactivada',
|
|
93
98
|
copyChatLabel = 'Copiar chat',
|
|
94
99
|
copiedChatLabel = 'Copiado',
|
|
100
|
+
backLabel = 'Volver',
|
|
101
|
+
subtitle = '',
|
|
95
102
|
class: className = '',
|
|
96
103
|
result,
|
|
97
104
|
footerExtra,
|
|
98
105
|
onsend,
|
|
99
106
|
onclose,
|
|
100
107
|
onnewchat,
|
|
108
|
+
onback,
|
|
101
109
|
oncopychat,
|
|
102
110
|
onmicclick,
|
|
103
111
|
onvoiceoutputchange,
|
|
@@ -201,16 +209,24 @@
|
|
|
201
209
|
>
|
|
202
210
|
<!-- Header -->
|
|
203
211
|
<header class="gap-2 border-border px-3 py-2.5 flex shrink-0 items-center border-b">
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
212
|
+
{#if onback}
|
|
213
|
+
<IconButton variant="ghost" size="xs" label={backLabel} onclick={() => onback()}>
|
|
214
|
+
<ChevronLeft size={16} strokeWidth={2} />
|
|
215
|
+
</IconButton>
|
|
216
|
+
{:else}
|
|
217
|
+
<span
|
|
218
|
+
class="h-7 w-7 rounded-lg bg-brand-100 text-brand-600 dark:bg-brand-900/40 dark:text-brand-400 flex shrink-0 items-center justify-center"
|
|
219
|
+
aria-hidden="true"
|
|
220
|
+
>
|
|
221
|
+
<Sparkles size={15} strokeWidth={2} />
|
|
222
|
+
</span>
|
|
223
|
+
{/if}
|
|
210
224
|
<div class="min-w-0 flex-1">
|
|
211
225
|
<p class="text-sm font-semibold text-primary truncate">{title}</p>
|
|
212
226
|
{#if statusLabel}
|
|
213
227
|
<p class="text-xs text-muted truncate">{statusLabel}</p>
|
|
228
|
+
{:else if subtitle}
|
|
229
|
+
<p class="text-xs text-muted truncate">{subtitle}</p>
|
|
214
230
|
{/if}
|
|
215
231
|
</div>
|
|
216
232
|
<IconButton
|
|
@@ -35,12 +35,16 @@ interface AssistantChatProps {
|
|
|
35
35
|
voiceOffLabel?: string;
|
|
36
36
|
copyChatLabel?: string;
|
|
37
37
|
copiedChatLabel?: string;
|
|
38
|
+
/** Optional back control (e.g. return to conversation list). */
|
|
39
|
+
backLabel?: string;
|
|
40
|
+
subtitle?: string;
|
|
38
41
|
class?: string;
|
|
39
42
|
result?: Snippet<[AssistantMessage]>;
|
|
40
43
|
footerExtra?: Snippet;
|
|
41
44
|
onsend?: () => void;
|
|
42
45
|
onclose?: () => void;
|
|
43
46
|
onnewchat?: () => void;
|
|
47
|
+
onback?: () => void;
|
|
44
48
|
oncopychat?: () => void | Promise<void>;
|
|
45
49
|
onmicclick?: () => void;
|
|
46
50
|
onvoiceoutputchange?: (on: boolean) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r2digisolutions/components",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
81
81
|
"@tailwindcss/vite": "^4.3.3",
|
|
82
82
|
"@types/node": "^26.5.1",
|
|
83
|
-
"@vitest/browser-playwright": "^5.0.
|
|
83
|
+
"@vitest/browser-playwright": "^5.0.1",
|
|
84
84
|
"bumpp": "~12.3.0",
|
|
85
85
|
"eslint": "^10.10.0",
|
|
86
86
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"globals": "^17.12.0",
|
|
89
89
|
"mdsvex": "^0.12.8",
|
|
90
90
|
"playwright": "^1.63.0",
|
|
91
|
-
"prettier": "^3.9.
|
|
91
|
+
"prettier": "^3.9.7",
|
|
92
92
|
"prettier-plugin-svelte": "^4.1.1",
|
|
93
93
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
94
94
|
"publint": "^0.3.24",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"typescript": "6.0.3",
|
|
100
100
|
"typescript-eslint": "^8.70.0",
|
|
101
101
|
"vite": "^8.3.0",
|
|
102
|
-
"vitest": "^5.0.
|
|
102
|
+
"vitest": "^5.0.1",
|
|
103
103
|
"vitest-browser-svelte": "^3.1.0"
|
|
104
104
|
},
|
|
105
105
|
"keywords": [
|