@8wave/ai-elements 0.99.0 → 0.100.0-beta.1
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/PkLazyImg-BhLarH2R.js +34 -0
- package/dist/_chunks/PkLazyImg-BhLarH2R.js.map +1 -0
- package/{dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js → dist/_chunks/PkStreamingMarkdown-CHhH4FdH.js} +407 -385
- package/dist/_chunks/PkStreamingMarkdown-CHhH4FdH.js.map +1 -0
- package/dist/_chunks/{PkToolShowArtifact-bYYaMGxq.js → PkToolShowArtifact-BRYd-YSp.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-bYYaMGxq.js.map → PkToolShowArtifact-BRYd-YSp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-DtjVW-n6.js → PkToolShowContactForm-vZTYDdfX.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-DtjVW-n6.js.map → PkToolShowContactForm-vZTYDdfX.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BP8asXtz.js → PkToolShowForm-DMmZ34is.js} +2 -2
- package/dist/_chunks/{PkToolShowForm-BP8asXtz.js.map → PkToolShowForm-DMmZ34is.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-WQL3T4Hr.js → PkToolShowImageGallery-B7dClMBr.js} +28 -27
- package/dist/_chunks/PkToolShowImageGallery-B7dClMBr.js.map +1 -0
- package/dist/_chunks/{PkToolShowProductList-BbY4ni7Y.js → PkToolShowProductList-BGqOPGVe.js} +10 -8
- package/dist/_chunks/PkToolShowProductList-BGqOPGVe.js.map +1 -0
- package/dist/_chunks/{PkToolShowSources-D2tBcx7n.js → PkToolShowSources-DwhjDoSn.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-D2tBcx7n.js.map → PkToolShowSources-DwhjDoSn.js.map} +1 -1
- package/dist/_chunks/PkToolShowWebPages-Co1LHj17.js +78 -0
- package/dist/_chunks/PkToolShowWebPages-Co1LHj17.js.map +1 -0
- package/dist/_chunks/useImageFallback-CaxDKce2.js +19 -0
- package/dist/_chunks/useImageFallback-CaxDKce2.js.map +1 -0
- package/dist/ai-elements.es.js +3049 -3015
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.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/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/PkAvatar-paEJByEA.js +42 -0
- package/dist-vue/_chunks/PkAvatar-paEJByEA.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-Bf5uY3cO.js → PkChatbot-Cs3GOau6.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-Bf5uY3cO.js.map → PkChatbot-Cs3GOau6.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotAuth-DV83Fen2.js +349 -0
- package/dist-vue/_chunks/PkChatbotAuth-DV83Fen2.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-CPqLqXek.js → PkChatbotEmptyState-Cxv79prz.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotEmptyState-CPqLqXek.js.map → PkChatbotEmptyState-Cxv79prz.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotFilePreview-DyrszALJ.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-jvb0vuak.js → PkChatbotInput-BSm3BI7D.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-jvb0vuak.js.map → PkChatbotInput-BSm3BI7D.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B3G12zah.js → PkChatbotMessages-BDRnBwzT.js} +11 -11
- package/dist-vue/_chunks/{PkChatbotMessages-B3G12zah.js.map → PkChatbotMessages-BDRnBwzT.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-BdU6YC_N.js → PkChatbotSteps-BdycCDRx.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotSteps-BdU6YC_N.js.map → PkChatbotSteps-BdycCDRx.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-c0Ecpzoc.js → PkChatbotViewChat-DwfZGp9d.js} +6 -6
- package/dist-vue/_chunks/{PkChatbotViewChat-c0Ecpzoc.js.map → PkChatbotViewChat-DwfZGp9d.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-BipRoidH.js → PkChatbotViewFiles-DwrKKSjU.js} +26 -25
- package/dist-vue/_chunks/PkChatbotViewFiles-DwrKKSjU.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewProfile-DuLwYpGZ.js → PkChatbotViewProfile-B7yqkE-h.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-DuLwYpGZ.js.map → PkChatbotViewProfile-B7yqkE-h.js.map} +1 -1
- package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js +34 -0
- package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js.map +1 -0
- package/{dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js → dist-vue/_chunks/PkStreamingMarkdown-B3OallmC.js} +331 -329
- package/dist-vue/_chunks/PkStreamingMarkdown-B3OallmC.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowArtifact-COwSXmF4.js → PkToolShowArtifact-N7we3fbM.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-COwSXmF4.js.map → PkToolShowArtifact-N7we3fbM.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-DRRtCCxB.js → PkToolShowContactForm-DgVlnLkC.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-DRRtCCxB.js.map → PkToolShowContactForm-DgVlnLkC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-j7Ha-0X3.js → PkToolShowForm-dp0-LYl1.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowForm-j7Ha-0X3.js.map → PkToolShowForm-dp0-LYl1.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-CoC46nGb.js +75 -0
- package/dist-vue/_chunks/PkToolShowImageGallery-CoC46nGb.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowProductList-DXMN2UuE.js → PkToolShowProductList-C6YoC3sD.js} +25 -23
- package/dist-vue/_chunks/PkToolShowProductList-C6YoC3sD.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowSources-BVLw4W5l.js → PkToolShowSources-DJwpImlN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-BVLw4W5l.js.map → PkToolShowSources-DJwpImlN.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowWebPages-B9UeUWfJ.js +79 -0
- package/dist-vue/_chunks/PkToolShowWebPages-B9UeUWfJ.js.map +1 -0
- package/dist-vue/_chunks/useImageFallback-5vQIO0pC.js +18 -0
- package/dist-vue/_chunks/useImageFallback-5vQIO0pC.js.map +1 -0
- package/dist-vue/index.js +3952 -3966
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +2 -2
- package/dist-vue/packages/components/src/PkLazyImg.d.ts +6 -1
- package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +8 -1
- package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
- package/dist-vue/packages/composable/src/index.d.ts +1 -0
- package/dist-vue/packages/composable/src/useImageFallback.d.ts +19 -0
- package/dist-vue/packages/models/src/schema/UserOverview.d.ts +96 -0
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +0 -1
- package/dist/_chunks/PkToolShowImageGallery-WQL3T4Hr.js.map +0 -1
- package/dist/_chunks/PkToolShowProductList-BbY4ni7Y.js.map +0 -1
- package/dist/_chunks/PkToolShowWebPages-DkMJrWmT.js +0 -76
- package/dist/_chunks/PkToolShowWebPages-DkMJrWmT.js.map +0 -1
- package/dist-vue/_chunks/PkAvatar-CyIgsndA.js +0 -31
- package/dist-vue/_chunks/PkAvatar-CyIgsndA.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-BGn2MDYD.js +0 -347
- package/dist-vue/_chunks/PkChatbotAuth-BGn2MDYD.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewFiles-BipRoidH.js.map +0 -1
- package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowImageGallery-Bj7YlqbP.js +0 -74
- package/dist-vue/_chunks/PkToolShowImageGallery-Bj7YlqbP.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowProductList-DXMN2UuE.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowWebPages-CsACREOH.js +0 -77
- package/dist-vue/_chunks/PkToolShowWebPages-CsACREOH.js.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { A as e, C as t, T as n, at as r, b as i, g as a, xt as o, y as s, z as c } from "./vue.runtime.esm-bundler-DbhD_IvR.js";
|
|
2
|
+
import { f as l } from "./index.es-_oXVRjHy.js";
|
|
3
|
+
import { t as u } from "./useImageFallback-CaxDKce2.js";
|
|
4
|
+
e(), r();
|
|
5
|
+
var d = ["src"], f = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "flex items-center justify-center text-18 text-word-4"
|
|
8
|
+
}, p = /* @__PURE__ */ n({
|
|
9
|
+
__name: "PkLazyImg",
|
|
10
|
+
props: {
|
|
11
|
+
src: { type: String },
|
|
12
|
+
altSrc: { type: String },
|
|
13
|
+
fallbackIcon: { type: String }
|
|
14
|
+
},
|
|
15
|
+
setup(e) {
|
|
16
|
+
let n = e, { canShowImage: r, onImageError: p } = u(), m = a(() => {
|
|
17
|
+
if (r(n.src)) return n.src;
|
|
18
|
+
if (r(n.altSrc)) return n.altSrc;
|
|
19
|
+
});
|
|
20
|
+
return (n, r) => {
|
|
21
|
+
let a = l;
|
|
22
|
+
return m.value ? (c(), i("img", {
|
|
23
|
+
key: 0,
|
|
24
|
+
src: m.value,
|
|
25
|
+
loading: "lazy",
|
|
26
|
+
onError: r[0] ||= (e) => o(p)(m.value)
|
|
27
|
+
}, null, 40, d)) : e.fallbackIcon ? (c(), i("span", f, [t(a, { name: e.fallbackIcon }, null, 8, ["name"])])) : s("", !0);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { p as t };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=PkLazyImg-BhLarH2R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkLazyImg-BhLarH2R.js","names":[],"sources":["../../../../packages/components/src/PkLazyImg.vue","../../../../packages/components/src/PkLazyImg.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed } from 'vue'\n import { useImageFallback } from 'composables'\n\n const props = defineProps<{\n src: string\n /** Second-best source, tried when `src` fails (e.g. og:image -> favicon). */\n altSrc?: string\n /**\n * Icon rendered in place of the image once every source has failed.\n * Without it the element is dropped, leaving no gap in the layout.\n */\n fallbackIcon?: string\n }>()\n\n // Degrade src -> altSrc -> icon. The failure is tracked per url, so a\n // re-render keeps the fallback instead of re-requesting a dead source.\n const { canShowImage, onImageError } = useImageFallback()\n const currentSrc = computed(() => {\n if (canShowImage(props.src)) {\n return props.src\n }\n if (canShowImage(props.altSrc)) {\n return props.altSrc\n }\n return undefined\n })\n</script>\n\n<template>\n <img\n v-if=\"currentSrc\"\n :src=\"currentSrc\"\n loading=\"lazy\"\n @error=\"onImageError(currentSrc)\" />\n <span\n v-else-if=\"fallbackIcon\"\n class=\"flex items-center justify-center text-18 text-word-4\">\n <VvIcon :name=\"fallbackIcon\" />\n </span>\n</template>\n","<script lang=\"ts\" setup>\n import { computed } from 'vue'\n import { useImageFallback } from 'composables'\n\n const props = defineProps<{\n src: string\n /** Second-best source, tried when `src` fails (e.g. og:image -> favicon). */\n altSrc?: string\n /**\n * Icon rendered in place of the image once every source has failed.\n * Without it the element is dropped, leaving no gap in the layout.\n */\n fallbackIcon?: string\n }>()\n\n // Degrade src -> altSrc -> icon. The failure is tracked per url, so a\n // re-render keeps the fallback instead of re-requesting a dead source.\n const { canShowImage, onImageError } = useImageFallback()\n const currentSrc = computed(() => {\n if (canShowImage(props.src)) {\n return props.src\n }\n if (canShowImage(props.altSrc)) {\n return props.altSrc\n }\n return undefined\n })\n</script>\n\n<template>\n <img\n v-if=\"currentSrc\"\n :src=\"currentSrc\"\n loading=\"lazy\"\n @error=\"onImageError(currentSrc)\" />\n <span\n v-else-if=\"fallbackIcon\"\n class=\"flex items-center justify-center text-18 text-word-4\">\n <VvIcon :name=\"fallbackIcon\" />\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAaR,EAAE,iBAAc,oBAAiB,EAAiB,GAClD,IAAa,QAAe;GAC9B,IAAI,EAAa,EAAM,GAAG,GACtB,OAAO,EAAM;GAEjB,IAAI,EAAa,EAAM,MAAM,GACzB,OAAO,EAAM;EAGrB,CAAC;;;UAKS,EAAA,SAAA,EAAA,GADV,EAIwC,OAAA;;IAFnC,KAAK,EAAA;IACN,SAAQ;IACP,SAAK,AAAA,EAAA,QAAA,MAAE,EAAA,CAAA,CAAY,CAAC,EAAA,KAAU;sBAEpB,EAAA,gBAAA,EAAA,GADf,EAIO,QAJP,GAIO,CADH,EAA+B,GAAA,EAAtB,MAAM,EAAA,aAAY,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA,CAAA,CAAA,KAAA,EAAA,IAAA,EAAA"}
|