@8wave/ai-elements 0.125.0-beta.12 → 0.125.0-beta.13

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 (46) hide show
  1. package/dist/_chunks/{PkFilePreview-COiD99Bn.js → PkFilePreview-rAHDDtGS.js} +318 -269
  2. package/dist/_chunks/PkFilePreview-rAHDDtGS.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreviewDialog-gHN4_C95.js → PkFilePreviewDialog-BBFrC_rn.js} +2 -2
  4. package/dist/_chunks/{PkFilePreviewDialog-gHN4_C95.js.map → PkFilePreviewDialog-BBFrC_rn.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowWeather-C4tqVGFZ.js → PkToolShowWeather-B9HWOU7p.js} +2 -2
  6. package/dist/_chunks/PkToolShowWeather-B9HWOU7p.js.map +1 -0
  7. package/dist/ai-elements.es.js +8 -8
  8. package/dist/ai-elements.es.js.map +1 -1
  9. package/dist-vue/PkChatbot.js +1 -1
  10. package/dist-vue/PkChatbotAudioTranscript.js +1 -1
  11. package/dist-vue/PkChatbotMessages.js +1 -1
  12. package/dist-vue/PkChatbotSteps.js +1 -1
  13. package/dist-vue/PkChatbotViewChat.js +1 -1
  14. package/dist-vue/PkChatbotViewConversations.js +1 -1
  15. package/dist-vue/PkChatbotViewFiles.js +1 -1
  16. package/dist-vue/_chunks/{PkChatbot-BrJxCUeC.js → PkChatbot-D48q-ulR.js} +4 -4
  17. package/dist-vue/_chunks/{PkChatbot-BrJxCUeC.js.map → PkChatbot-D48q-ulR.js.map} +1 -1
  18. package/dist-vue/_chunks/{PkChatbotAudioTranscript-SSTh074Z.js → PkChatbotAudioTranscript-DgmuXalb.js} +2 -2
  19. package/dist-vue/_chunks/PkChatbotAudioTranscript-DgmuXalb.js.map +1 -0
  20. package/dist-vue/_chunks/{PkChatbotMessages-B0erk76c.js → PkChatbotMessages-DftNL5ZQ.js} +4 -4
  21. package/dist-vue/_chunks/{PkChatbotMessages-B0erk76c.js.map → PkChatbotMessages-DftNL5ZQ.js.map} +1 -1
  22. package/dist-vue/_chunks/{PkChatbotSteps-s_Dv4qAx.js → PkChatbotSteps-CY7pN2Gl.js} +3 -3
  23. package/dist-vue/_chunks/PkChatbotSteps-CY7pN2Gl.js.map +1 -0
  24. package/dist-vue/_chunks/{PkChatbotViewChat-CHnOvnMd.js → PkChatbotViewChat-lLX_msKI.js} +3 -3
  25. package/dist-vue/_chunks/{PkChatbotViewChat-CHnOvnMd.js.map → PkChatbotViewChat-lLX_msKI.js.map} +1 -1
  26. package/dist-vue/_chunks/{PkChatbotViewConversations-BUXSz7C7.js → PkChatbotViewConversations-C0KqM_Wq.js} +2 -2
  27. package/dist-vue/_chunks/PkChatbotViewConversations-C0KqM_Wq.js.map +1 -0
  28. package/dist-vue/_chunks/{PkChatbotViewFiles-D4yBDDdC.js → PkChatbotViewFiles-B9mYRoNK.js} +2 -2
  29. package/dist-vue/_chunks/PkChatbotViewFiles-B9mYRoNK.js.map +1 -0
  30. package/dist-vue/_chunks/{PkFilePreview-C_lSOSEW.js → PkFilePreview-Ac_8QIBX.js} +413 -364
  31. package/dist-vue/_chunks/{PkFilePreview-C_lSOSEW.js.map → PkFilePreview-Ac_8QIBX.js.map} +1 -1
  32. package/dist-vue/_chunks/{PkFilePreviewDialog-6ChVRH3u.js → PkFilePreviewDialog-DGBaeZ8y.js} +2 -2
  33. package/dist-vue/_chunks/{PkFilePreviewDialog-6ChVRH3u.js.map → PkFilePreviewDialog-DGBaeZ8y.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkToolShowWeather-BC-Rx-sI.js → PkToolShowWeather-1NJwawC7.js} +2 -2
  35. package/dist-vue/_chunks/PkToolShowWeather-1NJwawC7.js.map +1 -0
  36. package/dist-vue/index.js +8 -8
  37. package/dist-vue/index.js.map +1 -1
  38. package/dist-vue/style.css +1 -1
  39. package/package.json +1 -1
  40. package/dist/_chunks/PkFilePreview-COiD99Bn.js.map +0 -1
  41. package/dist/_chunks/PkToolShowWeather-C4tqVGFZ.js.map +0 -1
  42. package/dist-vue/_chunks/PkChatbotAudioTranscript-SSTh074Z.js.map +0 -1
  43. package/dist-vue/_chunks/PkChatbotSteps-s_Dv4qAx.js.map +0 -1
  44. package/dist-vue/_chunks/PkChatbotViewConversations-BUXSz7C7.js.map +0 -1
  45. package/dist-vue/_chunks/PkChatbotViewFiles-D4yBDDdC.js.map +0 -1
  46. package/dist-vue/_chunks/PkToolShowWeather-BC-Rx-sI.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./rolldown-runtime-CGnMp29N.js";
2
- import { t } from "./PkFilePreview-C_lSOSEW.js";
2
+ import { t } from "./PkFilePreview-Ac_8QIBX.js";
3
3
  import { VvDialog as n } from "@volverjs/ui-vue/components";
4
4
  import { createBlock as r, createVNode as i, defineComponent as a, mergeModels as o, openBlock as s, useModel as c, withCtx as l } from "vue";
5
5
  // ../../packages/components/src/chat/PkFilePreviewDialog.vue?vue&type=script&setup=true&lang.ts
@@ -102,4 +102,4 @@ var u = /*@__PURE__*/ a({
102
102
  }), d = /* @__PURE__ */ e({ default: () => f }), f = u;
103
103
  export { d as n, f as t };
104
104
 
105
- //# sourceMappingURL=PkFilePreviewDialog-6ChVRH3u.js.map
105
+ //# sourceMappingURL=PkFilePreviewDialog-DGBaeZ8y.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PkFilePreviewDialog-6ChVRH3u.js","names":["_useModel","__unplugin_components_0","_openBlock","_createBlock","_withCtx","_createVNode","PkFilePreview","_sfc_main","__exportAll","PkFilePreviewDialog_vue_vue_type_script_setup_true_lang_default","\"mode\"","\"modeModifiers\"","\"sheet\"","\"sheetModifiers\"","\"zoom\"","\"zoomModifiers\"","\"fit\"","\"fitModifiers\"","__emit","emit","mode","useModel","__props","sheet","zoom","fit","_component_VvDialog","VvDialog","openBlock","createBlock","_cache","$event","withCtx","createVNode","PkFilePreview_default","text","pointer","action","PkFilePreviewDialog_exports","PkFilePreviewDialog_default"],"sources":["../../../../packages/components/src/chat/PkFilePreviewDialog.vue","../../../../packages/components/src/chat/PkFilePreviewDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n const fit = defineModel<boolean>('fit')\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n const fit = defineModel<boolean>('fit')\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCI,IAAMmB,IAAOD,GAaPE,IAAOpB,EAA4BsB,GAAC,MAAM,GAC1CC,IAAQvB,EAAmBsB,GAAC,OAAO,GACnCE,IAAOxB,EAAmBsB,GAAC,MAAM,G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","_createVNode","PkFilePreview","_sfc_main","__exportAll","PkFilePreviewDialog_vue_vue_type_script_setup_true_lang_default","\"mode\"","\"modeModifiers\"","\"sheet\"","\"sheetModifiers\"","\"zoom\"","\"zoomModifiers\"","\"fit\"","\"fitModifiers\"","__emit","emit","mode","useModel","__props","sheet","zoom","fit","_component_VvDialog","VvDialog","openBlock","createBlock","_cache","$event","withCtx","createVNode","PkFilePreview_default","text","pointer","action","PkFilePreviewDialog_exports","PkFilePreviewDialog_default"],"sources":["../../../../packages/components/src/chat/PkFilePreviewDialog.vue","../../../../packages/components/src/chat/PkFilePreviewDialog.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n const fit = defineModel<boolean>('fit')\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import type {\n ChatFilePreview,\n FilePointer,\n SelectionGroupCapability,\n } from 'models'\n import PkFilePreview from './PkFilePreview.vue'\n import type { ChatFilePreviewTarget, WordPreviewMode } from './utils'\n\n /**\n * The viewer of a file stored in a chat in a dialog over the page: the\n * chat's when it has no room for the panel beside it or the reader\n * expands it, the chat log's always. Open while it is mounted: `close`\n * asks the host to drop it. The viewer draws its own head, with the file\n * and the close button, so the dialog has no title and takes its name.\n */\n defineProps<{\n target: ChatFilePreviewTarget\n /** The authenticated download URL of the same version. */\n downloadUrl: string\n preview?: ChatFilePreview\n loading?: boolean\n error?: boolean\n /** Covers the screen, for a phone. */\n fullscreen?: boolean\n /** The versions of the file in the conversation, from 1. */\n versions?: number[]\n /** The shown version can be written again as the newest one. */\n restorable?: boolean\n /** Offers to go back to the panel beside the chat. */\n resize?: 'shrink'\n /** The selection bar's actions for this format: absent in the chat logs. */\n selectionActions?: SelectionGroupCapability\n }>()\n\n const emit = defineEmits<{\n close: []\n version: [version: number]\n restore: []\n resize: []\n selectionSend: [\n text: string,\n pointer: FilePointer,\n action: { id: string; size: number },\n ]\n }>()\n\n // How the file is shown, kept by the host across panel and dialog\n const mode = defineModel<WordPreviewMode>('mode')\n const sheet = defineModel<number>('sheet')\n const zoom = defineModel<number>('zoom')\n const fit = defineModel<boolean>('fit')\n</script>\n\n<template>\n <VvDialog\n :model-value=\"true\"\n :aria-label=\"target.filename\"\n :modifiers=\"fullscreen ? 'fullscreen' : undefined\"\n class=\"pk-file-preview-dialog\"\n @update:model-value=\"!$event && emit('close')\">\n <PkFilePreview\n v-model:mode=\"mode\"\n v-model:sheet=\"sheet\"\n v-model:zoom=\"zoom\"\n v-model:fit=\"fit\"\n :kind=\"target.kind\"\n :filename=\"target.filename\"\n :version=\"target.version\"\n :versions\n :download-url\n :preview\n :loading\n :error\n :restorable\n :resize\n :file-id=\"target.fileId\"\n :stored-file-name=\"target.storedFileName\"\n :selection-actions\n @version=\"emit('version', $event)\"\n @restore=\"emit('restore')\"\n @resize=\"emit('resize')\"\n @selection-send=\"\n (text, pointer, action) =>\n emit('selectionSend', text, pointer, action)\n \"\n @close=\"emit('close')\" />\n </VvDialog>\n</template>\n\n<style lang=\"scss\">\n // Almost the whole window, room for a page of Word and a grid of Excel;\n // the viewer scrolls in its own box, so the content does not pad it.\n .pk-file-preview-dialog {\n &:not(.vv-dialog--fullscreen) > article {\n width: min(90rem, 94dvw);\n height: 92dvh;\n }\n\n // The library writes `max-height: auto`, which is no value: the\n // wrapper kept its 90dvh and the phone saw the chat around it\n &.vv-dialog--fullscreen > article {\n max-height: none;\n }\n\n .vv-dialog__content {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-height: 0;\n padding: 0;\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCI,IAAMmB,IAAOD,GAaPE,IAAOpB,EAA4BsB,GAAC,MAAM,GAC1CC,IAAQvB,EAAmBsB,GAAC,OAAO,GACnCE,IAAOxB,EAAmBsB,GAAC,MAAM,GACjCG,IAAMzB,EAAoBsB,GAAC,KAAK;;;GAItC,OAAApB,EAAA,GAAAC,EAgCWuB,GAAA;IA/BN,eAAa;IACb,cAAYJ,EAAA,OAAO;IACnB,WAAWA,EAAA,aAAU,eAAkB,KAAA;IACxC,OAAM;IACL,uBAAkB,AAAAQ,EAAA,QAAA,MAAA,CAAGC,KAAUZ,EAAI,OAAA;;IACpC,SAAAf,QAyB6B,CAzB7BC,EAyB6BC,GAAA;KAxBjB,MAAMc,EAAA;KAAA,iBAAA,AAAAU,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,OAAOR,EAAA;KAAA,kBAAA,AAAAO,EAAA,QAAA,MAAA,EAAK,QAAAC;KACZ,MAAMP,EAAA;KAAA,iBAAA,AAAAM,EAAA,QAAA,MAAA,EAAI,QAAAC;KACV,KAAKN,EAAA;KAAA,gBAAA,AAAAK,EAAA,QAAA,MAAA,EAAG,QAAAC;KACf,MAAMT,EAAA,OAAO;KACb,UAAUA,EAAA,OAAO;KACjB,SAASA,EAAA,OAAO;KAChB,UAAAA,EAAA;KACA,gBAAAA,EAAA;KACA,SAAAA,EAAA;KACA,SAAAA,EAAA;KACA,OAAAA,EAAA;KACA,YAAAA,EAAA;KACA,QAAAA,EAAA;KACA,WAASA,EAAA,OAAO;KAChB,oBAAkBA,EAAA,OAAO;KACzB,qBAAAA,EAAA;KACA,WAAO,AAAAQ,EAAA,QAAA,MAAEX,EAAI,WAAYY,CAAM;KAC/B,WAAO,AAAAD,EAAA,QAAA,MAAEX,EAAI,SAAA;KACb,UAAM,AAAAW,EAAA,QAAA,MAAEX,EAAI,QAAA;KACZ,iBAAc,AAAAW,EAAA,QAAoB,GAAM,GAAS,MAA+BX,EAAI,iBAAkBgB,GAAMC,GAASC,CAAM;KAI3H,SAAK,AAAAP,EAAA,QAAA,MAAEX,EAAI,OAAA"}
@@ -102,7 +102,7 @@ var ae = {
102
102
  }, G = { class: "flex items-center gap-6" }, K = {
103
103
  key: 0,
104
104
  class: "border-t border-surface-3"
105
- }, ce = { class: "flex overflow-x-auto gap-2 px-sm py-8 light-scrollbar" }, le = { class: "text-word-3" }, ue = { class: "font-medium text-word-1" }, de = {
105
+ }, ce = { class: "flex overflow-x-auto gap-2 px-sm py-8" }, le = { class: "text-word-3" }, ue = { class: "font-medium text-word-1" }, de = {
106
106
  key: 0,
107
107
  class: "text-word-5 text-smaller"
108
108
  }, fe = ["onClick"], pe = { class: "w-48 shrink-0 text-word-3 capitalize" }, me = {
@@ -333,4 +333,4 @@ var ae = {
333
333
  });
334
334
  export { q as default };
335
335
 
336
- //# sourceMappingURL=PkToolShowWeather-BC-Rx-sI.js.map
336
+ //# sourceMappingURL=PkToolShowWeather-1NJwawC7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PkToolShowWeather-1NJwawC7.js","names":["z.object","z.number","z.string","z.array","__unplugin_components_0","__unplugin_components_1","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_unref","_createTextVNode","_createCommentVNode","_Transition","_withCtx","_Fragment","_renderList","_createBlock","_normalizeClass","_sfc_main","string","number","array","object","WeatherCurrentSchema","WeatherHourlySchema","WeatherDailySchema","AirQualitySchema","hasWeatherForecast","value","current","hourly","daily","wmoCategory","code","aqiBand","aqi","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","PkToolShowWeather_default","defineComponent","props","__props","$t","$d","$n","useI18n","toolPart","computed","data","output","input","isUnavailable","selectedDayIndex","ref","dailyOpen","index","selectedDay","filteredHourly","dayDate","h","safeDate","direct","withT","timeOnly","today","noon","WMO_ICON","wmoToIcon","formatDay","parsed","isoDate","total","fallback","headerDate","AQI_PRESENTATION","aqiInfo","cssClass","labelKey","windDirectionLabel","deg","_component_VvIcon","VvIcon","_component_VvAccordion","VvAccordion","openBlock","createElementBlock","createVNode","createElementVNode","toDisplayString","unref","createTextVNode","createCommentVNode","Transition","withCtx","Fragment","renderList","hour","createBlock","_cache","$event","day","normalizeClass"],"sources":["../../../../packages/models/src/schema/Weather.ts","../../../../packages/utils/src/weather.ts","../../../../packages/components/src/chat/PkToolShowWeather.vue","../../../../packages/components/src/chat/PkToolShowWeather.vue"],"sourcesContent":["import { z } from 'zod'\n\n/**\n * The weather data contract shared by the `getWeather`/`showWeather` backend\n * tools, the web widget (`PkToolShowWeather.vue`), and the platform card\n * renderer. Single source of truth — do not redeclare these shapes elsewhere.\n */\n\nconst WeatherCurrentSchema = z.object({\n temperature: z.number().describe('Temperature in °C'),\n feelsLike: z.number().describe('Apparent temperature in °C'),\n humidity: z.number().describe('Relative humidity in %'),\n precipitation: z.number().describe('Precipitation in mm'),\n weatherCode: z.number().describe('WMO weather interpretation code'),\n windSpeed: z.number().describe('Wind speed in km/h'),\n windDirection: z.number().describe('Wind direction in degrees'),\n uvIndex: z.number().describe('UV index'),\n})\n\nconst WeatherHourlySchema = z.object({\n time: z.string(),\n temperature: z.number(),\n precipitationProbability: z.number(),\n precipitation: z.number(),\n weatherCode: z.number(),\n windSpeed: z.number(),\n})\n\nconst WeatherDailySchema = z.object({\n date: z.string(),\n maxTemp: z.number(),\n minTemp: z.number(),\n weatherCode: z.number(),\n precipitationSum: z.number(),\n precipitationProbabilityMax: z.number(),\n uvIndexMax: z.number(),\n sunrise: z.string(),\n sunset: z.string(),\n})\n\nconst AirQualitySchema = z.object({\n aqi: z.number().describe('European AQI index'),\n pm10: z.number().describe('PM10 in µg/m³'),\n pm25: z.number().describe('PM2.5 in µg/m³'),\n no2: z.number().describe('NO₂ in µg/m³'),\n ozone: z.number().describe('Ozone in µg/m³'),\n})\n\nexport const WeatherDataSchema = z.object({\n locationName: z.string(),\n latitude: z.number(),\n longitude: z.number(),\n timezone: z.string(),\n current: WeatherCurrentSchema.nullable().describe(\n 'Current conditions — null when viewing a future date range',\n ),\n hourly: z\n .array(WeatherHourlySchema)\n .describe('Hourly forecast for the requested range'),\n daily: z\n .array(WeatherDailySchema)\n .describe('Daily forecast for the requested range'),\n airQuality: AirQualitySchema.nullable(),\n})\n\nexport type WeatherData = z.infer<typeof WeatherDataSchema>\n\n/**\n * Whether a value carries something the weather card can draw: current\n * conditions, or at least one hourly or daily entry. `showWeather` takes only\n * a `weatherKey`, so its input is a forecast only in conversations from before\n * the key, and a call that failed (a mangled key, expired data) has no output.\n */\nexport function hasWeatherForecast(value: unknown): value is WeatherData {\n if (!value || typeof value !== 'object') {\n return false\n }\n const { current, hourly, daily } = value as Partial<WeatherData>\n return (\n typeof current?.temperature === 'number' ||\n (Array.isArray(hourly) && hourly.length > 0) ||\n (Array.isArray(daily) && daily.length > 0)\n )\n}\n","/**\n * Framework-agnostic weather presentation primitives. They classify raw\n * open-meteo values into canonical categories; each consumer (web widget,\n * platform card renderer) maps a category to its own representation (an\n * Iconify name, an emoji, a CSS class, an i18n key). Keeping the classification\n * here means the WMO code bands and AQI thresholds live in exactly one place.\n */\n\n/** Canonical WMO weather-code category (resolution matches the web widget). */\nexport type WmoCategory =\n | 'clear'\n | 'mainlyClear'\n | 'partlyCloudy'\n | 'overcast'\n | 'fog'\n | 'drizzle'\n | 'freezingDrizzle'\n | 'rain'\n | 'freezingRain'\n | 'snow'\n | 'rainShowers'\n | 'snowShowers'\n | 'thunderstorm'\n | 'thunderstormHail'\n | 'unknown'\n\n/** Map a WMO weather interpretation code to a canonical category. */\nexport function wmoCategory(code: number | undefined): WmoCategory {\n if (code === undefined) {\n return 'unknown'\n }\n if (code === 0) {\n return 'clear'\n }\n if (code === 1) {\n return 'mainlyClear'\n }\n if (code === 2) {\n return 'partlyCloudy'\n }\n if (code === 3) {\n return 'overcast'\n }\n if (code === 45 || code === 48) {\n return 'fog'\n }\n if (code >= 51 && code <= 55) {\n return 'drizzle'\n }\n if (code === 56 || code === 57) {\n return 'freezingDrizzle'\n }\n if (code >= 61 && code <= 65) {\n return 'rain'\n }\n if (code === 66 || code === 67) {\n return 'freezingRain'\n }\n if (code >= 71 && code <= 77) {\n return 'snow'\n }\n if (code >= 80 && code <= 82) {\n return 'rainShowers'\n }\n if (code === 85 || code === 86) {\n return 'snowShowers'\n }\n if (code === 95) {\n return 'thunderstorm'\n }\n if (code === 96 || code === 99) {\n return 'thunderstormHail'\n }\n return 'unknown'\n}\n\n/** Emoji per category (used by the language-neutral platform card renderer). */\nconst WMO_EMOJI: Record<WmoCategory, string> = {\n clear: '☀️',\n mainlyClear: '⛅',\n partlyCloudy: '⛅',\n overcast: '⛅',\n fog: '🌫️',\n drizzle: '🌦️',\n freezingDrizzle: '🌦️',\n rain: '🌧️',\n freezingRain: '🌧️',\n snow: '❄️',\n rainShowers: '🌧️',\n snowShowers: '🌨️',\n thunderstorm: '⛈️',\n thunderstormHail: '⛈️',\n unknown: '🌡️',\n}\n\n/** WMO code → emoji (convenience for non-UI consumers). */\nexport function wmoEmoji(code: number | undefined): string {\n return WMO_EMOJI[wmoCategory(code)]\n}\n\n/** Canonical European-AQI band, ordered best → worst. */\nexport type AqiBandKey =\n 'good' | 'fair' | 'moderate' | 'poor' | 'veryPoor' | 'hazardous'\n\n/** Classify a European AQI value into a band (index + canonical key). */\nexport function aqiBand(aqi: number): { index: number; key: AqiBandKey } {\n if (aqi <= 20) {\n return { index: 0, key: 'good' }\n }\n if (aqi <= 40) {\n return { index: 1, key: 'fair' }\n }\n if (aqi <= 60) {\n return { index: 2, key: 'moderate' }\n }\n if (aqi <= 80) {\n return { index: 3, key: 'poor' }\n }\n if (aqi <= 100) {\n return { index: 4, key: 'veryPoor' }\n }\n return { index: 5, key: 'hazardous' }\n}\n\n/** Colored dot per AQI band index (used by the platform card renderer). */\nconst AQI_DOTS = ['🟢', '🟡', '🟠', '🔴', '🟣', '⚫']\n\n/** AQI value → colored dot (convenience for non-UI consumers). */\nexport function aqiDot(aqi: number): string {\n return AQI_DOTS[aqiBand(aqi).index]\n}\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { hasWeatherForecast } from 'models'\n import {\n aqiBand,\n wmoCategory,\n type AqiBandKey,\n type WmoCategory,\n } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { t: $t, d: $d, n: $n } = useI18n({ useScope: 'global' })\n\n const toolPart = computed(() => {\n return props.part as {\n state?: string\n input?: unknown\n output?: unknown\n }\n })\n\n const data = computed(() => {\n const { output, input } = toolPart.value\n if (hasWeatherForecast(output)) {\n return output\n }\n // Conversations from before `weatherKey` passed the whole forecast\n return hasWeatherForecast(input) ? input : null\n })\n\n /**\n * The call is over and left nothing to draw: a mangled or expired key\n * fails the tool, and its input is only the key. Without this the card\n * drew a thermometer and \"Oggi\" around nothing. While the call runs there\n * is nothing to draw yet, and nothing has failed either: the card waits.\n */\n const isUnavailable = computed(\n () =>\n !data.value &&\n toolPart.value.state !== 'input-streaming' &&\n toolPart.value.state !== 'input-available',\n )\n\n const selectedDayIndex = ref(0)\n\n const dailyOpen = ref(!data.value?.current)\n\n watch(selectedDayIndex, (index) => {\n if (index > 0) {\n dailyOpen.value = true\n }\n })\n\n const selectedDay = computed(\n () => data.value?.daily?.[selectedDayIndex.value],\n )\n\n /** Hourly entries filtered to the selected day's date */\n const filteredHourly = computed(() => {\n if (!data.value?.hourly?.length || !selectedDay.value) {\n return data.value?.hourly ?? []\n }\n const dayDate = selectedDay.value.date\n return data.value.hourly.filter((h) => h.time.startsWith(dayDate))\n })\n\n /**\n * Parses a date/time string in various formats the LLM might produce.\n * Tries ISO, space-separated, time-only, and common human-readable formats.\n */\n function safeDate(value: string): Date {\n // 1. Try native parsing (works for ISO 8601 and many standard formats)\n const direct = new Date(value)\n if (!Number.isNaN(direct.getTime())) {\n return direct\n }\n\n // 2. Replace space separator → T (\"2024-04-15 14:00\" → \"2024-04-15T14:00\")\n if (/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}/.test(value)) {\n const withT = new Date(value.replace(' ', 'T'))\n if (!Number.isNaN(withT.getTime())) {\n return withT\n }\n }\n\n // 3. Time-only (\"14:00\" or \"14:00:00\") → today at that hour\n const timeOnly = value.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/)\n if (timeOnly) {\n const today = new Date()\n today.setHours(\n Number(timeOnly[1]),\n Number(timeOnly[2]),\n Number(timeOnly[3] ?? 0),\n 0,\n )\n return today\n }\n\n // 4. Date-only (\"2024-04-15\") → noon to avoid timezone edge\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) {\n const noon = new Date(value + 'T12:00:00')\n if (!Number.isNaN(noon.getTime())) {\n return noon\n }\n }\n\n // Last resort: return an obviously invalid sentinel so callers can handle it\n return new Date(NaN)\n }\n\n /** Iconify `wi:` icon per canonical WMO category. */\n const WMO_ICON: Record<WmoCategory, string> = {\n clear: 'wi:day-sunny',\n mainlyClear: 'wi:day-sunny-overcast',\n partlyCloudy: 'wi:day-cloudy',\n overcast: 'wi:cloudy',\n fog: 'wi:fog',\n drizzle: 'wi:sprinkle',\n freezingDrizzle: 'wi:sleet',\n rain: 'wi:rain',\n freezingRain: 'wi:rain-mix',\n snow: 'wi:snow',\n rainShowers: 'wi:showers',\n snowShowers: 'wi:snow-wind',\n thunderstorm: 'wi:thunderstorm',\n thunderstormHail: 'wi:storm-showers',\n unknown: 'wi:na',\n }\n\n /** Maps WMO weather code to an Iconify wi: icon name */\n function wmoToIcon(code: number): string {\n return WMO_ICON[wmoCategory(code)]\n }\n\n /**\n * Returns a formatted day label for daily forecast.\n * When daily has 1-2 entries, use the date string directly.\n * Otherwise, use index-based computation from today.\n */\n function formatDay(isoDate: string, index: number, total: number): string {\n const parsed = safeDate(isoDate + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n const today = new Date()\n today.setHours(12, 0, 0, 0)\n const diffDays = Math.round(\n (parsed.getTime() - today.getTime()) / 86_400_000,\n )\n if (diffDays === 0) {\n return $t('weather.today')\n }\n return $d(parsed, 'weekday-day')\n }\n if (index === 0 && total <= 7) {\n return $t('weather.today')\n }\n const fallback = new Date()\n fallback.setDate(fallback.getDate() + index)\n return $d(fallback, 'weekday-day')\n }\n\n const headerDate = computed(() => {\n if (selectedDay.value) {\n const parsed = safeDate(selectedDay.value.date + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n return formatDay(\n selectedDay.value.date,\n selectedDayIndex.value,\n data.value?.daily?.length ?? 1,\n )\n }\n }\n return formatDay(new Date().toISOString().slice(0, 10), 0, 1)\n })\n\n /** i18n label key + CSS class per canonical AQI band. */\n const AQI_PRESENTATION: Record<\n AqiBandKey,\n { labelKey: string; class: string }\n > = {\n good: {\n labelKey: 'weather.aqiGood',\n class: 'text-green-600 bg-green-50',\n },\n fair: {\n labelKey: 'weather.aqiFair',\n class: 'text-lime-600 bg-lime-50',\n },\n moderate: {\n labelKey: 'weather.aqiModerate',\n class: 'text-yellow-600 bg-yellow-50',\n },\n poor: {\n labelKey: 'weather.aqiPoor',\n class: 'text-orange-600 bg-orange-50',\n },\n veryPoor: {\n labelKey: 'weather.aqiVeryPoor',\n class: 'text-red-600 bg-red-50',\n },\n hazardous: {\n labelKey: 'weather.aqiHazardous',\n class: 'text-purple-700 bg-purple-50',\n },\n }\n\n /** Returns AQI label and CSS class for European AQI */\n function aqiInfo(aqi: number): { label: string; class: string } {\n const { labelKey, class: cssClass } = AQI_PRESENTATION[aqiBand(aqi).key]\n return { label: $t(labelKey), class: cssClass }\n }\n\n /** Formats wind direction degrees to compass label */\n function windDirectionLabel(deg: number): string {\n const dirs = ['N', 'NE', 'E', 'SE', 'S', 'SO', 'O', 'NO']\n return dirs[Math.round(deg / 45) % 8]\n }\n</script>\n\n<template>\n <div\n v-if=\"isUnavailable\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <VvIcon name=\"ri:error-warning-line\" class=\"w-16 h-16 shrink-0\" />\n <span>{{ $t('weather.unavailable') }}</span>\n </div>\n <div\n v-else-if=\"data\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <!-- Header -->\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:temp-cold-line\" class=\"text-16\" />\n <strong class=\"font-bold truncate\">\n {{ data.locationName }}\n </strong>\n <span class=\"ml-auto shrink-0 capitalize\">\n {{ headerDate }}\n </span>\n </div>\n\n <!-- Current conditions (only when real-time current is available AND first day is selected) -->\n <div\n v-if=\"data.current && selectedDayIndex === 0\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(data.current.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <span class=\"text-48 font-light leading-none text-word-1\">\n {{ $n(data.current.temperature, 'integer') }}&deg;\n </span>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div class=\"flex items-center gap-6\">\n {{ $t('weather.feelsLike') }}\n {{ $n(data.current.feelsLike, 'integer') }}&deg;\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:water-percent-line\" class=\"text-14\" />\n {{ data.current.humidity }}%\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14\" />\n {{ $n(data.current.windSpeed, 'integer') }} km/h\n {{ windDirectionLabel(data.current.windDirection) }}\n </div>\n <div\n v-if=\"data.current.uvIndex > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(data.current.uvIndex, 'integer') }}\n </div>\n </div>\n </div>\n\n <!-- Day summary (when no real-time current, or a non-today day is selected) -->\n <div\n v-else-if=\"selectedDay\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(selectedDay.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <div class=\"flex flex-col leading-none\">\n <span class=\"text-48 font-light text-word-1\">\n {{ $n(selectedDay.maxTemp, 'integer') }}&deg;\n </span>\n <span class=\"text-20 text-word-3\">\n {{ $n(selectedDay.minTemp, 'integer') }}&deg;\n </span>\n </div>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div\n v-if=\"selectedDay.precipitationProbabilityMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:drop-line\" class=\"text-14\" />\n {{ selectedDay.precipitationProbabilityMax }}% ({{\n selectedDay.precipitationSum\n }}\n mm)\n </div>\n <div\n v-if=\"selectedDay.uvIndexMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(selectedDay.uvIndexMax, 'integer') }}\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-foggy-line\" class=\"text-14\" />\n {{ $d(safeDate(selectedDay.sunrise), 'time') }}\n –\n {{ $d(safeDate(selectedDay.sunset), 'time') }}\n </div>\n </div>\n </div>\n\n <!-- Hourly forecast (filtered to selected day) -->\n <transition>\n <div\n v-if=\"filteredHourly.length > 0\"\n class=\"border-t border-surface-3\">\n <div class=\"flex overflow-x-auto gap-2 px-sm py-8\">\n <div\n v-for=\"hour in filteredHourly\"\n :key=\"hour.time\"\n class=\"flex flex-col items-center gap-4 min-w-48 px-4 py-6 rounded-xl text-11 text-word-3 shrink-0\">\n <span class=\"text-word-3\">{{\n Number.isNaN(safeDate(hour.time).getTime())\n ? hour.time\n : $d(safeDate(hour.time), 'time')\n }}</span>\n <VvIcon\n :name=\"wmoToIcon(hour.weatherCode)\"\n class=\"text-20 text-word-2\" />\n <span class=\"font-medium text-word-1\">\n {{ $n(hour.temperature, 'integer') }}&deg;\n </span>\n <span\n v-if=\"hour.precipitationProbability > 0\"\n class=\"text-word-5 text-smaller\">\n {{ hour.precipitationProbability }}%\n </span>\n </div>\n </div>\n </div>\n </transition>\n\n <!-- Daily forecast (clickable, inside accordion) -->\n <transition>\n <VvAccordion\n v-if=\"data.daily?.length > 1\"\n v-model=\"dailyOpen\"\n modifiers=\"details no-padding\"\n :title=\"$t('weather.dailyForecast')\"\n class=\"border-t border-surface-3\">\n <button\n v-for=\"(day, index) in data.daily\"\n :key=\"day.date\"\n type=\"button\"\n class=\"flex items-center gap-sm px-sm py-8 text-12 w-full text-left transition-colors cursor-pointer border-t border-surface-3\"\n :class=\"\n index === selectedDayIndex\n ? 'bg-surface-2'\n : 'hover:bg-surface-1'\n \"\n @click=\"selectedDayIndex = index\">\n <span class=\"w-48 shrink-0 text-word-3 capitalize\">\n {{ formatDay(day.date, index, data.daily.length) }}\n </span>\n <VvIcon\n :name=\"wmoToIcon(day.weatherCode)\"\n class=\"text-18 text-word-2 shrink-0\" />\n <span\n v-if=\"day.precipitationProbabilityMax > 0\"\n class=\"text-word-5 text-11 w-32 shrink-0\">\n {{ day.precipitationProbabilityMax }}%\n </span>\n <span v-else class=\"w-32 shrink-0\" />\n <div class=\"ml-auto flex items-center gap-8 text-word-3\">\n <span class=\"text-word-1 font-semibold\">\n {{ $n(day.maxTemp, 'integer') }}&deg;\n </span>\n <span>{{ $n(day.minTemp, 'integer') }}&deg;</span>\n </div>\n </button>\n </VvAccordion>\n </transition>\n\n <!-- Air quality -->\n <div\n v-if=\"data.airQuality\"\n class=\"border-t border-surface-3 px-sm py-8 flex items-center gap-8 text-12\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14 text-word-3\" />\n <span class=\"text-word-3\">{{ $t('weather.airQuality') }}</span>\n <span\n :class=\"[\n 'ml-auto px-8 py-2 text-11 font-semibold',\n aqiInfo(data.airQuality.aqi).class,\n ]\">\n {{ aqiInfo(data.airQuality.aqi).label }}\n ({{ data.airQuality.aqi }})\n </span>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { hasWeatherForecast } from 'models'\n import {\n aqiBand,\n wmoCategory,\n type AqiBandKey,\n type WmoCategory,\n } from 'utils'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { t: $t, d: $d, n: $n } = useI18n({ useScope: 'global' })\n\n const toolPart = computed(() => {\n return props.part as {\n state?: string\n input?: unknown\n output?: unknown\n }\n })\n\n const data = computed(() => {\n const { output, input } = toolPart.value\n if (hasWeatherForecast(output)) {\n return output\n }\n // Conversations from before `weatherKey` passed the whole forecast\n return hasWeatherForecast(input) ? input : null\n })\n\n /**\n * The call is over and left nothing to draw: a mangled or expired key\n * fails the tool, and its input is only the key. Without this the card\n * drew a thermometer and \"Oggi\" around nothing. While the call runs there\n * is nothing to draw yet, and nothing has failed either: the card waits.\n */\n const isUnavailable = computed(\n () =>\n !data.value &&\n toolPart.value.state !== 'input-streaming' &&\n toolPart.value.state !== 'input-available',\n )\n\n const selectedDayIndex = ref(0)\n\n const dailyOpen = ref(!data.value?.current)\n\n watch(selectedDayIndex, (index) => {\n if (index > 0) {\n dailyOpen.value = true\n }\n })\n\n const selectedDay = computed(\n () => data.value?.daily?.[selectedDayIndex.value],\n )\n\n /** Hourly entries filtered to the selected day's date */\n const filteredHourly = computed(() => {\n if (!data.value?.hourly?.length || !selectedDay.value) {\n return data.value?.hourly ?? []\n }\n const dayDate = selectedDay.value.date\n return data.value.hourly.filter((h) => h.time.startsWith(dayDate))\n })\n\n /**\n * Parses a date/time string in various formats the LLM might produce.\n * Tries ISO, space-separated, time-only, and common human-readable formats.\n */\n function safeDate(value: string): Date {\n // 1. Try native parsing (works for ISO 8601 and many standard formats)\n const direct = new Date(value)\n if (!Number.isNaN(direct.getTime())) {\n return direct\n }\n\n // 2. Replace space separator → T (\"2024-04-15 14:00\" → \"2024-04-15T14:00\")\n if (/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}/.test(value)) {\n const withT = new Date(value.replace(' ', 'T'))\n if (!Number.isNaN(withT.getTime())) {\n return withT\n }\n }\n\n // 3. Time-only (\"14:00\" or \"14:00:00\") → today at that hour\n const timeOnly = value.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/)\n if (timeOnly) {\n const today = new Date()\n today.setHours(\n Number(timeOnly[1]),\n Number(timeOnly[2]),\n Number(timeOnly[3] ?? 0),\n 0,\n )\n return today\n }\n\n // 4. Date-only (\"2024-04-15\") → noon to avoid timezone edge\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) {\n const noon = new Date(value + 'T12:00:00')\n if (!Number.isNaN(noon.getTime())) {\n return noon\n }\n }\n\n // Last resort: return an obviously invalid sentinel so callers can handle it\n return new Date(NaN)\n }\n\n /** Iconify `wi:` icon per canonical WMO category. */\n const WMO_ICON: Record<WmoCategory, string> = {\n clear: 'wi:day-sunny',\n mainlyClear: 'wi:day-sunny-overcast',\n partlyCloudy: 'wi:day-cloudy',\n overcast: 'wi:cloudy',\n fog: 'wi:fog',\n drizzle: 'wi:sprinkle',\n freezingDrizzle: 'wi:sleet',\n rain: 'wi:rain',\n freezingRain: 'wi:rain-mix',\n snow: 'wi:snow',\n rainShowers: 'wi:showers',\n snowShowers: 'wi:snow-wind',\n thunderstorm: 'wi:thunderstorm',\n thunderstormHail: 'wi:storm-showers',\n unknown: 'wi:na',\n }\n\n /** Maps WMO weather code to an Iconify wi: icon name */\n function wmoToIcon(code: number): string {\n return WMO_ICON[wmoCategory(code)]\n }\n\n /**\n * Returns a formatted day label for daily forecast.\n * When daily has 1-2 entries, use the date string directly.\n * Otherwise, use index-based computation from today.\n */\n function formatDay(isoDate: string, index: number, total: number): string {\n const parsed = safeDate(isoDate + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n const today = new Date()\n today.setHours(12, 0, 0, 0)\n const diffDays = Math.round(\n (parsed.getTime() - today.getTime()) / 86_400_000,\n )\n if (diffDays === 0) {\n return $t('weather.today')\n }\n return $d(parsed, 'weekday-day')\n }\n if (index === 0 && total <= 7) {\n return $t('weather.today')\n }\n const fallback = new Date()\n fallback.setDate(fallback.getDate() + index)\n return $d(fallback, 'weekday-day')\n }\n\n const headerDate = computed(() => {\n if (selectedDay.value) {\n const parsed = safeDate(selectedDay.value.date + 'T12:00:00')\n if (!Number.isNaN(parsed.getTime())) {\n return formatDay(\n selectedDay.value.date,\n selectedDayIndex.value,\n data.value?.daily?.length ?? 1,\n )\n }\n }\n return formatDay(new Date().toISOString().slice(0, 10), 0, 1)\n })\n\n /** i18n label key + CSS class per canonical AQI band. */\n const AQI_PRESENTATION: Record<\n AqiBandKey,\n { labelKey: string; class: string }\n > = {\n good: {\n labelKey: 'weather.aqiGood',\n class: 'text-green-600 bg-green-50',\n },\n fair: {\n labelKey: 'weather.aqiFair',\n class: 'text-lime-600 bg-lime-50',\n },\n moderate: {\n labelKey: 'weather.aqiModerate',\n class: 'text-yellow-600 bg-yellow-50',\n },\n poor: {\n labelKey: 'weather.aqiPoor',\n class: 'text-orange-600 bg-orange-50',\n },\n veryPoor: {\n labelKey: 'weather.aqiVeryPoor',\n class: 'text-red-600 bg-red-50',\n },\n hazardous: {\n labelKey: 'weather.aqiHazardous',\n class: 'text-purple-700 bg-purple-50',\n },\n }\n\n /** Returns AQI label and CSS class for European AQI */\n function aqiInfo(aqi: number): { label: string; class: string } {\n const { labelKey, class: cssClass } = AQI_PRESENTATION[aqiBand(aqi).key]\n return { label: $t(labelKey), class: cssClass }\n }\n\n /** Formats wind direction degrees to compass label */\n function windDirectionLabel(deg: number): string {\n const dirs = ['N', 'NE', 'E', 'SE', 'S', 'SO', 'O', 'NO']\n return dirs[Math.round(deg / 45) % 8]\n }\n</script>\n\n<template>\n <div\n v-if=\"isUnavailable\"\n class=\"text-12 text-danger flex items-center gap-6 py-8\">\n <VvIcon name=\"ri:error-warning-line\" class=\"w-16 h-16 shrink-0\" />\n <span>{{ $t('weather.unavailable') }}</span>\n </div>\n <div\n v-else-if=\"data\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <!-- Header -->\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:temp-cold-line\" class=\"text-16\" />\n <strong class=\"font-bold truncate\">\n {{ data.locationName }}\n </strong>\n <span class=\"ml-auto shrink-0 capitalize\">\n {{ headerDate }}\n </span>\n </div>\n\n <!-- Current conditions (only when real-time current is available AND first day is selected) -->\n <div\n v-if=\"data.current && selectedDayIndex === 0\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(data.current.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <span class=\"text-48 font-light leading-none text-word-1\">\n {{ $n(data.current.temperature, 'integer') }}&deg;\n </span>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div class=\"flex items-center gap-6\">\n {{ $t('weather.feelsLike') }}\n {{ $n(data.current.feelsLike, 'integer') }}&deg;\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:water-percent-line\" class=\"text-14\" />\n {{ data.current.humidity }}%\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14\" />\n {{ $n(data.current.windSpeed, 'integer') }} km/h\n {{ windDirectionLabel(data.current.windDirection) }}\n </div>\n <div\n v-if=\"data.current.uvIndex > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(data.current.uvIndex, 'integer') }}\n </div>\n </div>\n </div>\n\n <!-- Day summary (when no real-time current, or a non-today day is selected) -->\n <div\n v-else-if=\"selectedDay\"\n class=\"px-sm py-md flex items-center gap-md flex-wrap\">\n <div class=\"flex items-center gap-8\">\n <VvIcon\n :name=\"wmoToIcon(selectedDay.weatherCode)\"\n class=\"text-48 text-word-2 shrink-0\" />\n <div class=\"flex flex-col leading-none\">\n <span class=\"text-48 font-light text-word-1\">\n {{ $n(selectedDay.maxTemp, 'integer') }}&deg;\n </span>\n <span class=\"text-20 text-word-3\">\n {{ $n(selectedDay.minTemp, 'integer') }}&deg;\n </span>\n </div>\n </div>\n <div class=\"flex flex-col gap-4 text-12 text-word-3\">\n <div\n v-if=\"selectedDay.precipitationProbabilityMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:drop-line\" class=\"text-14\" />\n {{ selectedDay.precipitationProbabilityMax }}% ({{\n selectedDay.precipitationSum\n }}\n mm)\n </div>\n <div\n v-if=\"selectedDay.uvIndexMax > 0\"\n class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-line\" class=\"text-14\" />\n UV {{ $n(selectedDay.uvIndexMax, 'integer') }}\n </div>\n <div class=\"flex items-center gap-6\">\n <VvIcon name=\"ri:sun-foggy-line\" class=\"text-14\" />\n {{ $d(safeDate(selectedDay.sunrise), 'time') }}\n –\n {{ $d(safeDate(selectedDay.sunset), 'time') }}\n </div>\n </div>\n </div>\n\n <!-- Hourly forecast (filtered to selected day) -->\n <transition>\n <div\n v-if=\"filteredHourly.length > 0\"\n class=\"border-t border-surface-3\">\n <div class=\"flex overflow-x-auto gap-2 px-sm py-8\">\n <div\n v-for=\"hour in filteredHourly\"\n :key=\"hour.time\"\n class=\"flex flex-col items-center gap-4 min-w-48 px-4 py-6 rounded-xl text-11 text-word-3 shrink-0\">\n <span class=\"text-word-3\">{{\n Number.isNaN(safeDate(hour.time).getTime())\n ? hour.time\n : $d(safeDate(hour.time), 'time')\n }}</span>\n <VvIcon\n :name=\"wmoToIcon(hour.weatherCode)\"\n class=\"text-20 text-word-2\" />\n <span class=\"font-medium text-word-1\">\n {{ $n(hour.temperature, 'integer') }}&deg;\n </span>\n <span\n v-if=\"hour.precipitationProbability > 0\"\n class=\"text-word-5 text-smaller\">\n {{ hour.precipitationProbability }}%\n </span>\n </div>\n </div>\n </div>\n </transition>\n\n <!-- Daily forecast (clickable, inside accordion) -->\n <transition>\n <VvAccordion\n v-if=\"data.daily?.length > 1\"\n v-model=\"dailyOpen\"\n modifiers=\"details no-padding\"\n :title=\"$t('weather.dailyForecast')\"\n class=\"border-t border-surface-3\">\n <button\n v-for=\"(day, index) in data.daily\"\n :key=\"day.date\"\n type=\"button\"\n class=\"flex items-center gap-sm px-sm py-8 text-12 w-full text-left transition-colors cursor-pointer border-t border-surface-3\"\n :class=\"\n index === selectedDayIndex\n ? 'bg-surface-2'\n : 'hover:bg-surface-1'\n \"\n @click=\"selectedDayIndex = index\">\n <span class=\"w-48 shrink-0 text-word-3 capitalize\">\n {{ formatDay(day.date, index, data.daily.length) }}\n </span>\n <VvIcon\n :name=\"wmoToIcon(day.weatherCode)\"\n class=\"text-18 text-word-2 shrink-0\" />\n <span\n v-if=\"day.precipitationProbabilityMax > 0\"\n class=\"text-word-5 text-11 w-32 shrink-0\">\n {{ day.precipitationProbabilityMax }}%\n </span>\n <span v-else class=\"w-32 shrink-0\" />\n <div class=\"ml-auto flex items-center gap-8 text-word-3\">\n <span class=\"text-word-1 font-semibold\">\n {{ $n(day.maxTemp, 'integer') }}&deg;\n </span>\n <span>{{ $n(day.minTemp, 'integer') }}&deg;</span>\n </div>\n </button>\n </VvAccordion>\n </transition>\n\n <!-- Air quality -->\n <div\n v-if=\"data.airQuality\"\n class=\"border-t border-surface-3 px-sm py-8 flex items-center gap-8 text-12\">\n <VvIcon name=\"ri:windy-line\" class=\"text-14 text-word-3\" />\n <span class=\"text-word-3\">{{ $t('weather.airQuality') }}</span>\n <span\n :class=\"[\n 'ml-auto px-8 py-2 text-11 font-semibold',\n aqiInfo(data.airQuality.aqi).class,\n ]\">\n {{ aqiInfo(data.airQuality.aqi).label }}\n ({{ data.airQuality.aqi }})\n </span>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;AAQA,IAAMyB,IAAuBzB,EAAS;CAClC,aAAaC,EAAS,CAAC,CAAC,SAAS,mBAAmB;CACpD,WAAWA,EAAS,CAAC,CAAC,SAAS,4BAA4B;CAC3D,UAAUA,EAAS,CAAC,CAAC,SAAS,wBAAwB;CACtD,eAAeA,EAAS,CAAC,CAAC,SAAS,qBAAqB;CACxD,aAAaA,EAAS,CAAC,CAAC,SAAS,iCAAiC;CAClE,WAAWA,EAAS,CAAC,CAAC,SAAS,oBAAoB;CACnD,eAAeA,EAAS,CAAC,CAAC,SAAS,2BAA2B;CAC9D,SAASA,EAAS,CAAC,CAAC,SAAS,UAAU;AAC3C,CAAC,GAEKyB,IAAsB1B,EAAS;CACjC,MAAME,EAAS;CACf,aAAaD,EAAS;CACtB,0BAA0BA,EAAS;CACnC,eAAeA,EAAS;CACxB,aAAaA,EAAS;CACtB,WAAWA,EAAS;AACxB,CAAC,GAEK0B,IAAqB3B,EAAS;CAChC,MAAME,EAAS;CACf,SAASD,EAAS;CAClB,SAASA,EAAS;CAClB,aAAaA,EAAS;CACtB,kBAAkBA,EAAS;CAC3B,6BAA6BA,EAAS;CACtC,YAAYA,EAAS;CACrB,SAASC,EAAS;CAClB,QAAQA,EAAS;AACrB,CAAC,GAEK0B,IAAmB5B,EAAS;CAC9B,KAAKC,EAAS,CAAC,CAAC,SAAS,oBAAoB;CAC7C,MAAMA,EAAS,CAAC,CAAC,SAAS,eAAe;CACzC,MAAMA,EAAS,CAAC,CAAC,SAAS,gBAAgB;CAC1C,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AQ3B,EAAA,MAAK,WAAW,GAAG,CAAA,CAAE,KAAK,IAAG,OACvCzE,EAAGyE,EAAA,MAAK,WAAW,GAAG,IAAG,MAC9B,CAAA"}
package/dist-vue/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./_chunks/rolldown-runtime-CGnMp29N.js";
2
2
  import { t } from "./_chunks/PkEditorRadioButtons-Bw576DPQ.js";
3
3
  import { E as n, S as r, T as i, _ as a, f as o, m as s, o as c, r as l, s as u, u as d, v as f, w as p, x as m, y as h } from "./_chunks/schemas-BO5QlXAp.js";
4
- import { t as g } from "./_chunks/PkChatbotMessages-B0erk76c.js";
4
+ import { t as g } from "./_chunks/PkChatbotMessages-DftNL5ZQ.js";
5
5
  import { a as _, i as v, l as y, n as b, r as x } from "./_chunks/Media-DylqhvaF.js";
6
6
  import { B as S, D as C, E as w, F as ee, I as te, J as ne, K as re, L as ie, N as ae, P as oe, R as se, S as ce, T as le, U as ue, X as de, Y as fe, Z as pe, a as me, at as he, ct as ge, d as _e, f as ve, i as ye, it as be, lt as xe, ot as Se, p as Ce, pt as we, q as Te, r as T, rt as Ee, s as De, st as Oe, t as ke, ut as Ae, w as je, x as Me, y as Ne, z as Pe } from "./_chunks/Agent-DmxsItHG.js";
7
7
  import { c as Fe, d as Ie, l as Le, r as Re, s as ze, t as Be, u as Ve } from "./_chunks/Document-CXfJxfu6.js";
@@ -16,8 +16,8 @@ import { a as tt, l as nt, u as rt } from "./_chunks/message-DuibQyHy.js";
16
16
  import { B as it, E as at, F as ot, L as st, M as ct, X as lt, Y as ut, Z as dt, b as ft, c as pt, g as mt, k as ht, v as gt } from "./_chunks/utils-8lO2Gj-m.js";
17
17
  import { t as _t } from "./_chunks/useSafeLocalStorage-Bn4SsL8C.js";
18
18
  import { t as vt } from "./_chunks/useDialogConfirm-fn7iV-iE.js";
19
- import { i as yt, n as bt, r as xt, t as St } from "./_chunks/PkChatbotViewConversations-BUXSz7C7.js";
20
- import { a as Ct, i as wt, n as Tt, o as Et, r as Dt, t as Ot } from "./_chunks/PkChatbotViewChat-CHnOvnMd.js";
19
+ import { i as yt, n as bt, r as xt, t as St } from "./_chunks/PkChatbotViewConversations-C0KqM_Wq.js";
20
+ import { a as Ct, i as wt, n as Tt, o as Et, r as Dt, t as Ot } from "./_chunks/PkChatbotViewChat-lLX_msKI.js";
21
21
  import { t as kt } from "./_chunks/PkChatbotError-BS84xuiu.js";
22
22
  import { t as At } from "./_chunks/useImageFallback-HUe4GHah.js";
23
23
  import { t as jt } from "./_chunks/useLocalizedString-Dmn92nix.js";
@@ -33,13 +33,13 @@ import { t as Yn } from "./_chunks/PkUrl-IFszepUi.js";
33
33
  import { t as Xn } from "./_chunks/PkAvatar-DwtZWSW4.js";
34
34
  import { t as Zn } from "./_chunks/PkChatbotFeedbackForm-Bh3tvNUW.js";
35
35
  import { t as Qn } from "./_chunks/PkChatbotFilePreview-BpVM850N.js";
36
- import { n as $n, t as er } from "./_chunks/PkChatbotSteps-s_Dv4qAx.js";
36
+ import { n as $n, t as er } from "./_chunks/PkChatbotSteps-CY7pN2Gl.js";
37
37
  import { t as tr } from "./_chunks/PkChatbotStepPayload-AiDZPbds.js";
38
38
  import { t as nr } from "./_chunks/PkChatbotStepToolDetail-CALZDpfQ.js";
39
39
  import { n as rr, t as ir } from "./_chunks/PkChatbotInput-BVu1b2Te.js";
40
40
  import { t as ar } from "./_chunks/PkChatbotEmptyState-CQ_Qdkge.js";
41
41
  import { t as or } from "./_chunks/PkChatbotViewProfile-BfNE3d7F.js";
42
- import { t as sr } from "./_chunks/PkChatbot-BrJxCUeC.js";
42
+ import { t as sr } from "./_chunks/PkChatbot-D48q-ulR.js";
43
43
  import { i as cr, r as lr, t as ur } from "./_chunks/PkToolShowSources-BHRNGn4s.js";
44
44
  import { t as dr } from "./_chunks/mcpOAuthReport-D-MtFYwN.js";
45
45
  import { t as fr } from "./_chunks/PkToolShowEmail-BehvoNsz.js";
@@ -55,7 +55,7 @@ import { t as xr } from "./_chunks/PkToolShowImageGallery-Dmr5zXTj.js";
55
55
  import { t as Sr } from "./_chunks/PkToolShowSuggestedReply-DHCqxA1P.js";
56
56
  import { t as Cr } from "./_chunks/PkToolShareDocument-BIZkgcJ3.js";
57
57
  import { t as wr } from "./_chunks/PkToolChatFile-DqLGwJxp.js";
58
- import { t as Tr } from "./_chunks/PkFilePreviewDialog-6ChVRH3u.js";
58
+ import { t as Tr } from "./_chunks/PkFilePreviewDialog-DGBaeZ8y.js";
59
59
  import { t as Er } from "./_chunks/PkToolRequestGeolocation-BnV7A6SW.js";
60
60
  import { VvAccordion as Dr, VvAccordionGroup as Or, VvAlert as kr, VvAlertGroup as Ar, VvBadge as jr, VvButtonGroup as Mr, VvCheckbox as Nr, VvCombobox as Pr, VvDialog as Fr, VvDropdown as Ir, VvDropdownAction as Lr, VvIcon as Rr, VvInputFile as zr, VvInputRange as Br, VvInputText as Vr, VvTab as Hr } from "@volverjs/ui-vue/components";
61
61
  import { Fragment as A, Teleport as Ur, Transition as Wr, TransitionGroup as Gr, cloneVNode as Kr, computed as j, createApp as qr, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createSlots as Jr, createStaticVNode as Yr, createTextVNode as I, createVNode as L, defineComponent as R, guardReactiveProps as Xr, h as Zr, inject as z, isRef as Qr, isVNode as $r, mergeModels as ei, mergeProps as ti, nextTick as ni, normalizeClass as ri, normalizeProps as ii, normalizeStyle as ai, onBeforeUnmount as oi, onMounted as si, onUnmounted as ci, openBlock as B, provide as li, reactive as ui, readonly as di, ref as V, renderList as fi, renderSlot as pi, resolveComponent as mi, resolveDynamicComponent as hi, shallowRef as gi, toDisplayString as H, toRef as _i, toRefs as vi, unref as U, useId as yi, useModel as W, useSlots as bi, useTemplateRef as xi, vModelSelect as Si, vModelText as Ci, watch as G, withCtx as K, withDirectives as wi, withKeys as Ti, withModifiers as Ei } from "vue";
@@ -17702,7 +17702,7 @@ var OT = DT(), kT = /* @__PURE__ */ Yw({
17702
17702
  class: "pk-editor-prompt__wrapper",
17703
17703
  onClick: l[0] ||= Ei(() => {}, ["stop"])
17704
17704
  }, [F("div", {
17705
- class: "pk-editor-prompt__input light-scrollbar",
17705
+ class: "pk-editor-prompt__input",
17706
17706
  role: "textbox",
17707
17707
  "aria-readonly": "true",
17708
17708
  "aria-multiline": "true",
@@ -24425,7 +24425,7 @@ var AM = {
24425
24425
  }
24426
24426
  }), g = j(() => d.value === "asc" ? r("label.sortAscending") : r("label.sortDescending")), _ = () => {
24427
24427
  d.value = d.value === "asc" ? "desc" : "asc";
24428
- }, v = j(() => a.classWrapper ?? (a.flush ? "light-scrollbar" : "light-scrollbar border border-surface-3 rounded-lg")), y = j(() => a.classPagination ?? (a.flush ? "px-md py-sm border-t border-surface-3" : void 0)), b = j(() => a.isLoading || f.value === 0), x = j(() => b.value || a.nextDisabled || l.value === f.value), S = j(() => b.value || l.value === 1);
24428
+ }, v = j(() => a.classWrapper ?? (a.flush ? void 0 : "border border-surface-3 rounded-lg")), y = j(() => a.classPagination ?? (a.flush ? "px-md py-sm border-t border-surface-3" : void 0)), b = j(() => a.isLoading || f.value === 0), x = j(() => b.value || a.nextDisabled || l.value === f.value), S = j(() => b.value || l.value === 1);
24429
24429
  G([
24430
24430
  u,
24431
24431
  d,