@8wave/ai-elements 0.99.0-beta.2 → 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.
Files changed (100) hide show
  1. package/dist/_chunks/PkLazyImg-BhLarH2R.js +34 -0
  2. package/dist/_chunks/PkLazyImg-BhLarH2R.js.map +1 -0
  3. package/{dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js → dist/_chunks/PkStreamingMarkdown-CHhH4FdH.js} +407 -385
  4. package/dist/_chunks/PkStreamingMarkdown-CHhH4FdH.js.map +1 -0
  5. package/dist/_chunks/{PkToolShowArtifact-bYYaMGxq.js → PkToolShowArtifact-BRYd-YSp.js} +2 -2
  6. package/dist/_chunks/{PkToolShowArtifact-bYYaMGxq.js.map → PkToolShowArtifact-BRYd-YSp.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowContactForm-DtjVW-n6.js → PkToolShowContactForm-vZTYDdfX.js} +2 -2
  8. package/dist/_chunks/{PkToolShowContactForm-DtjVW-n6.js.map → PkToolShowContactForm-vZTYDdfX.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowForm-BP8asXtz.js → PkToolShowForm-DMmZ34is.js} +2 -2
  10. package/dist/_chunks/{PkToolShowForm-BP8asXtz.js.map → PkToolShowForm-DMmZ34is.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowImageGallery-WQL3T4Hr.js → PkToolShowImageGallery-B7dClMBr.js} +28 -27
  12. package/dist/_chunks/PkToolShowImageGallery-B7dClMBr.js.map +1 -0
  13. package/dist/_chunks/{PkToolShowProductList-BbY4ni7Y.js → PkToolShowProductList-BGqOPGVe.js} +10 -8
  14. package/dist/_chunks/PkToolShowProductList-BGqOPGVe.js.map +1 -0
  15. package/dist/_chunks/{PkToolShowSources-D2tBcx7n.js → PkToolShowSources-DwhjDoSn.js} +2 -2
  16. package/dist/_chunks/{PkToolShowSources-D2tBcx7n.js.map → PkToolShowSources-DwhjDoSn.js.map} +1 -1
  17. package/dist/_chunks/PkToolShowWebPages-Co1LHj17.js +78 -0
  18. package/dist/_chunks/PkToolShowWebPages-Co1LHj17.js.map +1 -0
  19. package/dist/_chunks/useImageFallback-CaxDKce2.js +19 -0
  20. package/dist/_chunks/useImageFallback-CaxDKce2.js.map +1 -0
  21. package/dist/ai-elements.es.js +3049 -3015
  22. package/dist/ai-elements.es.js.map +1 -1
  23. package/dist-vue/PkChatbot.js +1 -1
  24. package/dist-vue/PkChatbotAuth.js +1 -1
  25. package/dist-vue/PkChatbotEmptyState.js +1 -1
  26. package/dist-vue/PkChatbotInput.js +1 -1
  27. package/dist-vue/PkChatbotMessages.js +1 -1
  28. package/dist-vue/PkChatbotSteps.js +1 -1
  29. package/dist-vue/PkChatbotViewChat.js +1 -1
  30. package/dist-vue/PkChatbotViewFiles.js +1 -1
  31. package/dist-vue/PkChatbotViewProfile.js +1 -1
  32. package/dist-vue/_chunks/PkAvatar-paEJByEA.js +42 -0
  33. package/dist-vue/_chunks/PkAvatar-paEJByEA.js.map +1 -0
  34. package/dist-vue/_chunks/{PkChatbot-Bf5uY3cO.js → PkChatbot-Cs3GOau6.js} +6 -6
  35. package/dist-vue/_chunks/{PkChatbot-Bf5uY3cO.js.map → PkChatbot-Cs3GOau6.js.map} +1 -1
  36. package/dist-vue/_chunks/PkChatbotAuth-DV83Fen2.js +349 -0
  37. package/dist-vue/_chunks/PkChatbotAuth-DV83Fen2.js.map +1 -0
  38. package/dist-vue/_chunks/{PkChatbotEmptyState-CPqLqXek.js → PkChatbotEmptyState-Cxv79prz.js} +3 -3
  39. package/dist-vue/_chunks/{PkChatbotEmptyState-CPqLqXek.js.map → PkChatbotEmptyState-Cxv79prz.js.map} +1 -1
  40. package/dist-vue/_chunks/PkChatbotFilePreview-DyrszALJ.js.map +1 -1
  41. package/dist-vue/_chunks/{PkChatbotInput-jvb0vuak.js → PkChatbotInput-BSm3BI7D.js} +2 -2
  42. package/dist-vue/_chunks/{PkChatbotInput-jvb0vuak.js.map → PkChatbotInput-BSm3BI7D.js.map} +1 -1
  43. package/dist-vue/_chunks/{PkChatbotMessages-B3G12zah.js → PkChatbotMessages-BDRnBwzT.js} +11 -11
  44. package/dist-vue/_chunks/{PkChatbotMessages-B3G12zah.js.map → PkChatbotMessages-BDRnBwzT.js.map} +1 -1
  45. package/dist-vue/_chunks/{PkChatbotSteps-BdU6YC_N.js → PkChatbotSteps-BdycCDRx.js} +2 -2
  46. package/dist-vue/_chunks/{PkChatbotSteps-BdU6YC_N.js.map → PkChatbotSteps-BdycCDRx.js.map} +1 -1
  47. package/dist-vue/_chunks/{PkChatbotViewChat-c0Ecpzoc.js → PkChatbotViewChat-DwfZGp9d.js} +6 -6
  48. package/dist-vue/_chunks/{PkChatbotViewChat-c0Ecpzoc.js.map → PkChatbotViewChat-DwfZGp9d.js.map} +1 -1
  49. package/dist-vue/_chunks/{PkChatbotViewFiles-BipRoidH.js → PkChatbotViewFiles-DwrKKSjU.js} +26 -25
  50. package/dist-vue/_chunks/PkChatbotViewFiles-DwrKKSjU.js.map +1 -0
  51. package/dist-vue/_chunks/{PkChatbotViewProfile-DuLwYpGZ.js → PkChatbotViewProfile-B7yqkE-h.js} +2 -2
  52. package/dist-vue/_chunks/{PkChatbotViewProfile-DuLwYpGZ.js.map → PkChatbotViewProfile-B7yqkE-h.js.map} +1 -1
  53. package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js +34 -0
  54. package/dist-vue/_chunks/PkLazyImg-CDxX9xnq.js.map +1 -0
  55. package/{dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js → dist-vue/_chunks/PkStreamingMarkdown-B3OallmC.js} +331 -329
  56. package/dist-vue/_chunks/PkStreamingMarkdown-B3OallmC.js.map +1 -0
  57. package/dist-vue/_chunks/{PkToolShowArtifact-COwSXmF4.js → PkToolShowArtifact-N7we3fbM.js} +2 -2
  58. package/dist-vue/_chunks/{PkToolShowArtifact-COwSXmF4.js.map → PkToolShowArtifact-N7we3fbM.js.map} +1 -1
  59. package/dist-vue/_chunks/{PkToolShowContactForm-DRRtCCxB.js → PkToolShowContactForm-DgVlnLkC.js} +2 -2
  60. package/dist-vue/_chunks/{PkToolShowContactForm-DRRtCCxB.js.map → PkToolShowContactForm-DgVlnLkC.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkToolShowForm-j7Ha-0X3.js → PkToolShowForm-dp0-LYl1.js} +2 -2
  62. package/dist-vue/_chunks/{PkToolShowForm-j7Ha-0X3.js.map → PkToolShowForm-dp0-LYl1.js.map} +1 -1
  63. package/dist-vue/_chunks/PkToolShowImageGallery-CoC46nGb.js +75 -0
  64. package/dist-vue/_chunks/PkToolShowImageGallery-CoC46nGb.js.map +1 -0
  65. package/dist-vue/_chunks/{PkToolShowProductList-DXMN2UuE.js → PkToolShowProductList-C6YoC3sD.js} +25 -23
  66. package/dist-vue/_chunks/PkToolShowProductList-C6YoC3sD.js.map +1 -0
  67. package/dist-vue/_chunks/{PkToolShowSources-BVLw4W5l.js → PkToolShowSources-DJwpImlN.js} +2 -2
  68. package/dist-vue/_chunks/{PkToolShowSources-BVLw4W5l.js.map → PkToolShowSources-DJwpImlN.js.map} +1 -1
  69. package/dist-vue/_chunks/PkToolShowWebPages-B9UeUWfJ.js +79 -0
  70. package/dist-vue/_chunks/PkToolShowWebPages-B9UeUWfJ.js.map +1 -0
  71. package/dist-vue/_chunks/useImageFallback-5vQIO0pC.js +18 -0
  72. package/dist-vue/_chunks/useImageFallback-5vQIO0pC.js.map +1 -0
  73. package/dist-vue/index.js +3951 -3965
  74. package/dist-vue/index.js.map +1 -1
  75. package/dist-vue/locales.js +2 -2
  76. package/dist-vue/packages/components/src/PkLazyImg.d.ts +6 -1
  77. package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +8 -1
  78. package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
  79. package/dist-vue/packages/composable/src/index.d.ts +1 -0
  80. package/dist-vue/packages/composable/src/useImageFallback.d.ts +19 -0
  81. package/dist-vue/packages/models/src/schema/UserOverview.d.ts +96 -0
  82. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  83. package/dist-vue/style.css +1 -1
  84. package/package.json +1 -1
  85. package/dist/_chunks/PkStreamingMarkdown-6Xx9n1ue.js.map +0 -1
  86. package/dist/_chunks/PkToolShowImageGallery-WQL3T4Hr.js.map +0 -1
  87. package/dist/_chunks/PkToolShowProductList-BbY4ni7Y.js.map +0 -1
  88. package/dist/_chunks/PkToolShowWebPages-DkMJrWmT.js +0 -76
  89. package/dist/_chunks/PkToolShowWebPages-DkMJrWmT.js.map +0 -1
  90. package/dist-vue/_chunks/PkAvatar-CyIgsndA.js +0 -31
  91. package/dist-vue/_chunks/PkAvatar-CyIgsndA.js.map +0 -1
  92. package/dist-vue/_chunks/PkChatbotAuth-BGn2MDYD.js +0 -347
  93. package/dist-vue/_chunks/PkChatbotAuth-BGn2MDYD.js.map +0 -1
  94. package/dist-vue/_chunks/PkChatbotViewFiles-BipRoidH.js.map +0 -1
  95. package/dist-vue/_chunks/PkStreamingMarkdown-CjBMQ18U.js.map +0 -1
  96. package/dist-vue/_chunks/PkToolShowImageGallery-Bj7YlqbP.js +0 -74
  97. package/dist-vue/_chunks/PkToolShowImageGallery-Bj7YlqbP.js.map +0 -1
  98. package/dist-vue/_chunks/PkToolShowProductList-DXMN2UuE.js.map +0 -1
  99. package/dist-vue/_chunks/PkToolShowWebPages-CsACREOH.js +0 -77
  100. package/dist-vue/_chunks/PkToolShowWebPages-CsACREOH.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"PkToolShowWebPages-CsACREOH.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowWebPages.vue","../../../../packages/components/src/chat/PkToolShowWebPages.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref } from 'vue'\n import { isSameSite } from 'utils'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n pages: Array<{\n title: string\n url: string\n image?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model often passes the same URL several times (e.g. multiple KB\n // chunks from one page), so collapse duplicates, keeping the first (richest)\n // entry. Normalize by dropping the hash and any trailing slash.\n const normalizeUrl = (url: string) => {\n try {\n const u = new URL(url)\n u.hash = ''\n return u.toString().replace(/\\/$/, '')\n } catch {\n return url.trim().replace(/\\/$/, '')\n }\n }\n const uniquePages = computed(() => {\n const seen = new Set<string>()\n const result: NonNullable<typeof toolPart.value.input>['pages'] = []\n for (const page of toolPart.value.input?.pages || []) {\n const key = normalizeUrl(page.url)\n if (seen.has(key)) {\n continue\n }\n seen.add(key)\n result.push(page)\n }\n return result\n })\n\n const showMore = ref(false)\n const pages = computed(() => {\n if (showMore.value) {\n return uniquePages.value\n }\n return uniquePages.value.slice(0, 2)\n })\n const hasMore = computed(() => uniquePages.value.length > 2)\n</script>\n\n<template>\n <ul v-if=\"pages?.length\" class=\"flex flex-col gap-xs w-full\">\n <li\n v-for=\"(page, index) in pages\"\n :key=\"index\"\n class=\"border border-surface-3 rounded-xl overflow-hidden hover:border-surface-4 transition-colors shrink-0\">\n <a\n :href=\"page.url\"\n :title=\"$t('action.open')\"\n :target=\"isSameSite(page.url) ? undefined : '_blank'\"\n :rel=\"isSameSite(page.url) ? undefined : 'noopener noreferrer'\"\n class=\"flex gap-8 p-8 hover:bg-surface-1 transition-colors\">\n <img\n v-if=\"page.image\"\n :src=\"page.image\"\n :alt=\"page.title\"\n class=\"w-48 h-48 object-contain rounded shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ page.title }}\n </strong>\n <span\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"page.url\" />\n </span>\n <p\n v-if=\"page.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ page.description }}\n </p>\n </div>\n </a>\n </li>\n <li v-if=\"hasMore\" class=\"text-center\">\n <button\n class=\"text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto\"\n @click=\"showMore = !showMore\">\n <VvIcon\n :name=\"\n showMore ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\n \"\n class=\"text-16\" />\n {{\n showMore\n ? $t('action.showLess')\n : $t('action.showMore', {\n count: uniquePages.length - 2,\n })\n }}\n </button>\n </li>\n </ul>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref } from 'vue'\n import { isSameSite } from 'utils'\n import PkUrl from '../PkUrl.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n pages: Array<{\n title: string\n url: string\n image?: string\n description?: string\n }>\n }\n }\n return part\n })\n\n // The model often passes the same URL several times (e.g. multiple KB\n // chunks from one page), so collapse duplicates, keeping the first (richest)\n // entry. Normalize by dropping the hash and any trailing slash.\n const normalizeUrl = (url: string) => {\n try {\n const u = new URL(url)\n u.hash = ''\n return u.toString().replace(/\\/$/, '')\n } catch {\n return url.trim().replace(/\\/$/, '')\n }\n }\n const uniquePages = computed(() => {\n const seen = new Set<string>()\n const result: NonNullable<typeof toolPart.value.input>['pages'] = []\n for (const page of toolPart.value.input?.pages || []) {\n const key = normalizeUrl(page.url)\n if (seen.has(key)) {\n continue\n }\n seen.add(key)\n result.push(page)\n }\n return result\n })\n\n const showMore = ref(false)\n const pages = computed(() => {\n if (showMore.value) {\n return uniquePages.value\n }\n return uniquePages.value.slice(0, 2)\n })\n const hasMore = computed(() => uniquePages.value.length > 2)\n</script>\n\n<template>\n <ul v-if=\"pages?.length\" class=\"flex flex-col gap-xs w-full\">\n <li\n v-for=\"(page, index) in pages\"\n :key=\"index\"\n class=\"border border-surface-3 rounded-xl overflow-hidden hover:border-surface-4 transition-colors shrink-0\">\n <a\n :href=\"page.url\"\n :title=\"$t('action.open')\"\n :target=\"isSameSite(page.url) ? undefined : '_blank'\"\n :rel=\"isSameSite(page.url) ? undefined : 'noopener noreferrer'\"\n class=\"flex gap-8 p-8 hover:bg-surface-1 transition-colors\">\n <img\n v-if=\"page.image\"\n :src=\"page.image\"\n :alt=\"page.title\"\n class=\"w-48 h-48 object-contain rounded shrink-0 border border-surface-3 bg-surface\" />\n <div class=\"flex flex-col gap-4 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate\">\n {{ page.title }}\n </strong>\n <span\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-12\" />\n <PkUrl :url=\"page.url\" />\n </span>\n <p\n v-if=\"page.description\"\n class=\"text-12 text-word-3 line-clamp-2\">\n {{ page.description }}\n </p>\n </div>\n </a>\n </li>\n <li v-if=\"hasMore\" class=\"text-center\">\n <button\n class=\"text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto\"\n @click=\"showMore = !showMore\">\n <VvIcon\n :name=\"\n showMore ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\n \"\n class=\"text-16\" />\n {{\n showMore\n ? $t('action.showLess')\n : $t('action.showMore', {\n count: uniquePages.length - 2,\n })\n }}\n </button>\n </li>\n </ul>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAKI,IAAM,IAAQ,GAIR,IAAW,QACA,EAAM,IAWtB,GAKK,KAAgB,MAAgB;GAClC,IAAI;IACA,IAAM,IAAI,IAAI,IAAI,CAAG;IAErB,OADA,EAAE,OAAO,IACF,EAAE,SAAS,CAAC,CAAC,QAAQ,OAAO,EAAE;GACzC,QAAQ;IACJ,OAAO,EAAI,KAAK,CAAC,CAAC,QAAQ,OAAO,EAAE;GACvC;EACJ,GACM,IAAc,QAAe;GAC/B,IAAM,oBAAO,IAAI,IAAY,GACvB,IAA4D,CAAC;GACnE,KAAK,IAAM,KAAQ,EAAS,MAAM,OAAO,SAAS,C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