@8wave/ai-elements 0.125.0-beta.10 → 0.125.0-beta.11
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.
- package/dist/_chunks/{PkChatbotFilePreview-DuvRnOes.js → PkChatbotFilePreview-fbgRmR9n.js} +58 -55
- package/dist/_chunks/PkChatbotFilePreview-fbgRmR9n.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-BM-DSTPr.js → PkStreamingMarkdown-CfdkyZqP.js} +803 -799
- package/dist/_chunks/PkStreamingMarkdown-CfdkyZqP.js.map +1 -0
- package/dist/_chunks/{PkToolChatFile-DbeOmRPh.js → PkToolChatFile-ClZrtYIz.js} +2 -2
- package/dist/_chunks/{PkToolChatFile-DbeOmRPh.js.map → PkToolChatFile-ClZrtYIz.js.map} +1 -1
- package/dist/_chunks/{PkToolShareDocument-Buzu27rQ.js → PkToolShareDocument-DLRwzPaL.js} +2 -2
- package/dist/_chunks/{PkToolShareDocument-Buzu27rQ.js.map → PkToolShareDocument-DLRwzPaL.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-utxGuLLt.js → PkToolShowArtifact-Dc4YM786.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-utxGuLLt.js.map → PkToolShowArtifact-Dc4YM786.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DTtE93D3.js → PkToolShowContactForm-CU1Sv3DA.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DTtE93D3.js.map → PkToolShowContactForm-CU1Sv3DA.js.map} +1 -1
- package/dist/_chunks/{PkToolShowDiagram-BHd-C_cx.js → PkToolShowDiagram-BDrdT_AB.js} +4 -2
- package/dist/_chunks/PkToolShowDiagram-BDrdT_AB.js.map +1 -0
- package/dist/_chunks/{PkToolShowForm-I4pKopEI.js → PkToolShowForm-DDgEmFRc.js} +2 -2
- package/dist/_chunks/{PkToolShowForm-I4pKopEI.js.map → PkToolShowForm-DDgEmFRc.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-skV87BlD.js → PkToolShowImageGallery-BCSO1iSG.js} +9 -4
- package/dist/_chunks/PkToolShowImageGallery-BCSO1iSG.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-DLmVS3bL.js → PkToolShowSources-DDI2s76O.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-DLmVS3bL.js.map → PkToolShowSources-DDI2s76O.js.map} +1 -1
- package/dist/_chunks/{useLightbox-BigL4WLe.js → useLightbox-BEEzZ0qT.js} +112 -41
- package/dist/_chunks/useLightbox-BEEzZ0qT.js.map +1 -0
- package/dist/ai-elements.es.js +2420 -2409
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFilePreview.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-CLOfTLQy.js → PkChatbot-D4SNWH_2.js} +3 -3
- package/dist-vue/_chunks/{PkChatbot-CLOfTLQy.js.map → PkChatbot-D4SNWH_2.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-C9aUiynZ.js → PkChatbotEmptyState-BnCCmm10.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-C9aUiynZ.js.map → PkChatbotEmptyState-BnCCmm10.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotFilePreview-BpVM850N.js +291 -0
- package/dist-vue/_chunks/PkChatbotFilePreview-BpVM850N.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotInput-Bs8nn-Jz.js → PkChatbotInput-COjn57UP.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotInput-Bs8nn-Jz.js.map → PkChatbotInput-COjn57UP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BxkCGmqV.js → PkChatbotMessages-D-m0cOqM.js} +282 -279
- package/dist-vue/_chunks/PkChatbotMessages-D-m0cOqM.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotSteps-MTSA_RrY.js → PkChatbotSteps-BWKjM1Z4.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotSteps-MTSA_RrY.js.map → PkChatbotSteps-BWKjM1Z4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-BwXOt2WW.js → PkChatbotViewChat-DIh2wVa_.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotViewChat-BwXOt2WW.js.map → PkChatbotViewChat-DIh2wVa_.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-DlcTV5je.js → PkStreamingMarkdown-BZPAHAni.js} +760 -757
- package/dist-vue/_chunks/PkStreamingMarkdown-BZPAHAni.js.map +1 -0
- package/dist-vue/_chunks/{PkSvgViewer-DBYr0CUi.js → PkSvgViewer-DmkElalq.js} +4 -2
- package/dist-vue/_chunks/PkSvgViewer-DmkElalq.js.map +1 -0
- package/dist-vue/_chunks/{PkToolChatFile-HWGjtuaT.js → PkToolChatFile-BGH2cQuM.js} +2 -2
- package/dist-vue/_chunks/{PkToolChatFile-HWGjtuaT.js.map → PkToolChatFile-BGH2cQuM.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShareDocument-CsS5OTDj.js → PkToolShareDocument-BIZkgcJ3.js} +2 -2
- package/dist-vue/_chunks/{PkToolShareDocument-CsS5OTDj.js.map → PkToolShareDocument-BIZkgcJ3.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-C8OIF_sy.js → PkToolShowArtifact-DCe8yizN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-C8OIF_sy.js.map → PkToolShowArtifact-DCe8yizN.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-K6Z5MUXk.js → PkToolShowContactForm-4bO4fM5O.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-K6Z5MUXk.js.map → PkToolShowContactForm-4bO4fM5O.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-DrlGh_v6.js → PkToolShowDiagram-DNRUCCt8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-DrlGh_v6.js.map → PkToolShowDiagram-DNRUCCt8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DzsXJfOl.js → PkToolShowForm-CQwXQwgt.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowForm-DzsXJfOl.js.map → PkToolShowForm-CQwXQwgt.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-sCyrPOIT.js → PkToolShowImageGallery-CgDng1Gr.js} +17 -12
- package/dist-vue/_chunks/PkToolShowImageGallery-CgDng1Gr.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowLocation-DAQEuCuQ.js → PkToolShowLocation-DCPaDtBI.js} +3 -3
- package/dist-vue/_chunks/PkToolShowLocation-DCPaDtBI.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowProductList-DPDDeVu4.js → PkToolShowProductList-DyPyz1pU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-DPDDeVu4.js.map → PkToolShowProductList-DyPyz1pU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-D4zjssdh.js → PkToolShowSources-C3JjevRj.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-D4zjssdh.js.map → PkToolShowSources-C3JjevRj.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-C77DAqoZ.js → PkToolShowVideo--qiiAK7R.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-C77DAqoZ.js.map → PkToolShowVideo--qiiAK7R.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-D_tqGI6o.js → PkToolShowWebPages-Cw9FPQuL.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-D_tqGI6o.js.map → PkToolShowWebPages-Cw9FPQuL.js.map} +1 -1
- package/dist-vue/_chunks/useLightbox-gSzoBgNv.js +190 -0
- package/dist-vue/_chunks/useLightbox-gSzoBgNv.js.map +1 -0
- package/dist-vue/composables.js +8 -0
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +2899 -2898
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +10 -0
- package/dist-vue/packages/components/src/composables/useLightbox.d.ts +33 -3
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkChatbotFilePreview-DuvRnOes.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-BM-DSTPr.js.map +0 -1
- package/dist/_chunks/PkToolShowDiagram-BHd-C_cx.js.map +0 -1
- package/dist/_chunks/PkToolShowImageGallery-skV87BlD.js.map +0 -1
- package/dist/_chunks/useLightbox-BigL4WLe.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotFilePreview-KxVpL0UT.js +0 -391
- package/dist-vue/_chunks/PkChatbotFilePreview-KxVpL0UT.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-BxkCGmqV.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-DlcTV5je.js.map +0 -1
- package/dist-vue/_chunks/PkSvgViewer-DBYr0CUi.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-sCyrPOIT.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowLocation-DAQEuCuQ.js.map +0 -1
- package/dist-vue/_chunks/cdn-css-C3_zuSx6.js +0 -15
- package/dist-vue/_chunks/cdn-css-C3_zuSx6.js.map +0 -1
package/dist-vue/locales.js
CHANGED
|
@@ -95,6 +95,7 @@ var e = {
|
|
|
95
95
|
hangUp: "End the call",
|
|
96
96
|
unmute: "Unmute the microphone",
|
|
97
97
|
mute: "Mute the microphone",
|
|
98
|
+
previous: "Previous",
|
|
98
99
|
prev: "Previous",
|
|
99
100
|
closeChat: "Close the chat",
|
|
100
101
|
openChat: "Open the chat",
|
|
@@ -919,6 +920,10 @@ var e = {
|
|
|
919
920
|
topicsCovered: "Topics covered",
|
|
920
921
|
keyFacts: "Key facts",
|
|
921
922
|
openQuestions: "Open questions"
|
|
923
|
+
},
|
|
924
|
+
lightbox: {
|
|
925
|
+
zoom: "Zoom in or out",
|
|
926
|
+
openInNewTab: "Open in a new tab"
|
|
922
927
|
}
|
|
923
928
|
}, t = {
|
|
924
929
|
agentType: {
|
|
@@ -1016,6 +1021,7 @@ var e = {
|
|
|
1016
1021
|
hangUp: "Chiudi la chiamata",
|
|
1017
1022
|
unmute: "Riattiva il microfono",
|
|
1018
1023
|
mute: "Disattiva il microfono",
|
|
1024
|
+
previous: "Indietro",
|
|
1019
1025
|
prev: "Indietro",
|
|
1020
1026
|
closeChat: "Chiudi la chat",
|
|
1021
1027
|
openChat: "Apri la chat",
|
|
@@ -1840,6 +1846,10 @@ var e = {
|
|
|
1840
1846
|
topicsCovered: "Argomenti trattati",
|
|
1841
1847
|
keyFacts: "Fatti principali",
|
|
1842
1848
|
openQuestions: "Domande aperte"
|
|
1849
|
+
},
|
|
1850
|
+
lightbox: {
|
|
1851
|
+
zoom: "Ingrandisci o riduci",
|
|
1852
|
+
openInNewTab: "Apri in una nuova scheda"
|
|
1843
1853
|
}
|
|
1844
1854
|
};
|
|
1845
1855
|
export { e as messagesEn, t as messagesIt };
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { Ref, ShallowRef } from 'vue';
|
|
2
2
|
import { default as PhotoSwipeLightbox } from 'photoswipe/lightbox';
|
|
3
|
+
/** The shared lightbox of a container, as the components inside see it. */
|
|
4
|
+
export interface SharedLightbox {
|
|
5
|
+
/** An item joined: the first one starts the lightbox. */
|
|
6
|
+
join: () => void;
|
|
7
|
+
}
|
|
3
8
|
export interface LightboxImage {
|
|
4
9
|
url: string;
|
|
5
10
|
caption?: string;
|
|
6
11
|
alt?: string;
|
|
7
|
-
/** Natural width in px
|
|
12
|
+
/** Natural width in px, used by PhotoSwipe for proper sizing. */
|
|
8
13
|
width?: number;
|
|
9
|
-
/** Natural height in px
|
|
14
|
+
/** Natural height in px, used by PhotoSwipe for proper sizing. */
|
|
10
15
|
height?: number;
|
|
11
16
|
}
|
|
12
17
|
export interface LightboxOptions {
|
|
13
18
|
/** Container element whose child anchors are the gallery items */
|
|
14
|
-
gallery: Ref<HTMLElement | undefined
|
|
19
|
+
gallery: Readonly<Ref<HTMLElement | null | undefined>>;
|
|
15
20
|
/** CSS selector for gallery items inside the container (default: `'a[data-pswp-src]'`) */
|
|
16
21
|
children?: string;
|
|
17
22
|
loop?: boolean;
|
|
@@ -19,11 +24,21 @@ export interface LightboxOptions {
|
|
|
19
24
|
downloadable?: boolean;
|
|
20
25
|
/** Show an open-in-new-tab button in the lightbox toolbar */
|
|
21
26
|
openInNewTab?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Hands the items to the shared lightbox of a container above
|
|
29
|
+
* (`provideSharedLightbox`), when there is one.
|
|
30
|
+
*/
|
|
31
|
+
shared?: boolean;
|
|
22
32
|
}
|
|
23
33
|
export interface UseLightboxReturn {
|
|
24
34
|
lightbox: ShallowRef<PhotoSwipeLightbox | null>;
|
|
25
35
|
/** Initialises PhotoSwipe. Call this inside `onMounted`. */
|
|
26
36
|
init: () => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* The items went to a shared lightbox: their anchors carry
|
|
39
|
+
* `data-pswp-shared`, and `init` starts that lightbox instead.
|
|
40
|
+
*/
|
|
41
|
+
shared: boolean;
|
|
27
42
|
}
|
|
28
43
|
/**
|
|
29
44
|
* Encapsulates PhotoSwipe 5 initialisation, toolbar customisation, and lifecycle cleanup.
|
|
@@ -36,6 +51,21 @@ export interface UseLightboxReturn {
|
|
|
36
51
|
* ```
|
|
37
52
|
*/
|
|
38
53
|
export declare function useLightbox(options: LightboxOptions): UseLightboxReturn;
|
|
54
|
+
/**
|
|
55
|
+
* The shared lightbox above that takes this component's images, if any: a
|
|
56
|
+
* markdown marks its container with `data-pswp-images` and joins when it
|
|
57
|
+
* shows an image.
|
|
58
|
+
*/
|
|
59
|
+
export declare function useSharedLightbox(): SharedLightbox | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* One lightbox over the images of a container, a conversation: the arrows go
|
|
62
|
+
* through all of them in page order instead of stopping at the card that was
|
|
63
|
+
* clicked. The components inside that pass `shared` to `useLightbox` skip a
|
|
64
|
+
* lightbox of their own and mark their anchors with `data-pswp-shared`; the
|
|
65
|
+
* others, such as a diagram's, keep theirs. It starts when the first image
|
|
66
|
+
* joins, so a conversation without images loads no PhotoSwipe.
|
|
67
|
+
*/
|
|
68
|
+
export declare function provideSharedLightbox(container: Readonly<Ref<HTMLElement | null | undefined>>): void;
|
|
39
69
|
export interface UseImageSizesReturn {
|
|
40
70
|
preload: (images: Array<{
|
|
41
71
|
url: string;
|