@8wave/ai-elements 0.121.0-beta.57 → 0.121.0-beta.59

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 (71) hide show
  1. package/README.md +16 -1
  2. package/dist/_chunks/Agent-FDL4Wq0B.js.map +1 -1
  3. package/dist/ai-elements.es.js +3039 -2713
  4. package/dist/ai-elements.es.js.map +1 -1
  5. package/dist-vue/PkChatbot.js +1 -1
  6. package/dist-vue/PkChatbotEmptyState.js +1 -1
  7. package/dist-vue/PkChatbotInput.js +1 -1
  8. package/dist-vue/PkChatbotViewChat.js +1 -1
  9. package/dist-vue/PkChatbotViewConversations.js +1 -1
  10. package/dist-vue/PkChatbotViewFiles.js +1 -1
  11. package/dist-vue/PkChatbotViewProfile.js +1 -1
  12. package/dist-vue/_chunks/Agent-CZUFbLo7.js.map +1 -1
  13. package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js +38 -0
  14. package/dist-vue/_chunks/PkAvatar-DwtZWSW4.js.map +1 -0
  15. package/dist-vue/_chunks/{PkChatbot-BjD_4yaD.js → PkChatbot-DtyJG8HB.js} +7 -8
  16. package/dist-vue/_chunks/PkChatbot-DtyJG8HB.js.map +1 -0
  17. package/dist-vue/_chunks/{PkChatbotEmptyState-CMNmmQdu.js → PkChatbotEmptyState-CivaIYxu.js} +2 -3
  18. package/dist-vue/_chunks/PkChatbotEmptyState-CivaIYxu.js.map +1 -0
  19. package/dist-vue/_chunks/{PkChatbotInput-CdpjDIzr.js → PkChatbotInput-mBl1PWIU.js} +88 -88
  20. package/dist-vue/_chunks/PkChatbotInput-mBl1PWIU.js.map +1 -0
  21. package/dist-vue/_chunks/{PkChatbotViewChat-BqFY0Evp.js → PkChatbotViewChat-ZOpF5REL.js} +248 -243
  22. package/dist-vue/_chunks/PkChatbotViewChat-ZOpF5REL.js.map +1 -0
  23. package/dist-vue/_chunks/{PkChatbotViewConversations-DF_c4X6k.js → PkChatbotViewConversations-THKK5wGp.js} +52 -34
  24. package/dist-vue/_chunks/PkChatbotViewConversations-THKK5wGp.js.map +1 -0
  25. package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js → PkChatbotViewFiles-BOGd3r0o.js} +3 -3
  26. package/dist-vue/_chunks/{PkChatbotViewFiles-B76IwGGP.js.map → PkChatbotViewFiles-BOGd3r0o.js.map} +1 -1
  27. package/dist-vue/_chunks/{PkChatbotViewProfile-Bt0eH8fO.js → PkChatbotViewProfile-XtL9RfC7.js} +3 -4
  28. package/dist-vue/_chunks/PkChatbotViewProfile-XtL9RfC7.js.map +1 -0
  29. package/dist-vue/_chunks/{createChatbotApiClient-BYGLKd_e.js → createChatbotApiClient-Bt387Z64.js} +6 -5
  30. package/dist-vue/_chunks/createChatbotApiClient-Bt387Z64.js.map +1 -0
  31. package/dist-vue/_chunks/{useChatbotStore-O0u7mVit.js → useChatbotStore-pnj_3y4N.js} +718 -687
  32. package/dist-vue/_chunks/useChatbotStore-pnj_3y4N.js.map +1 -0
  33. package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js +86 -0
  34. package/dist-vue/_chunks/useDialogConfirm-fn7iV-iE.js.map +1 -0
  35. package/dist-vue/api.js +1 -1
  36. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
  37. package/dist-vue/apps/web-component/src/composables/usePagePresence.d.ts +17 -0
  38. package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +4 -3
  39. package/dist-vue/apps/web-component/src/pageTools/index.d.ts +11 -1
  40. package/dist-vue/composables.js +14 -6
  41. package/dist-vue/composables.js.map +1 -1
  42. package/dist-vue/index.js +4252 -4009
  43. package/dist-vue/index.js.map +1 -1
  44. package/dist-vue/locales.js +24 -14
  45. package/dist-vue/packages/components/src/chat/PkAgentPresence.d.ts +34 -0
  46. package/dist-vue/packages/components/src/chat/PkAvatar.d.ts +6 -7
  47. package/dist-vue/packages/components/src/chat/PkChatSearchDialog.d.ts +19 -0
  48. package/dist-vue/packages/components/src/chat/{PkAgentSelectorInline.d.ts → PkChatShortcutsDialog.d.ts} +8 -5
  49. package/dist-vue/packages/components/src/chat/PkChatSidebar.d.ts +7 -8
  50. package/dist-vue/packages/components/src/chat/PkChatSidebarConversationItem.d.ts +2 -2
  51. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +4 -1
  52. package/dist-vue/packages/components/src/chat/PkWorkingAurora.d.ts +25 -0
  53. package/dist-vue/packages/components/src/chat/index.d.ts +1 -2
  54. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +11 -1
  55. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +21 -3
  56. package/dist-vue/packages/composable/src/chatbot/useConversationActions.d.ts +54 -1
  57. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
  58. package/dist-vue/style.css +1 -1
  59. package/package.json +1 -1
  60. package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js +0 -43
  61. package/dist-vue/_chunks/PkAvatar-uVRs_DD9.js.map +0 -1
  62. package/dist-vue/_chunks/PkChatbot-BjD_4yaD.js.map +0 -1
  63. package/dist-vue/_chunks/PkChatbotEmptyState-CMNmmQdu.js.map +0 -1
  64. package/dist-vue/_chunks/PkChatbotInput-CdpjDIzr.js.map +0 -1
  65. package/dist-vue/_chunks/PkChatbotViewChat-BqFY0Evp.js.map +0 -1
  66. package/dist-vue/_chunks/PkChatbotViewConversations-DF_c4X6k.js.map +0 -1
  67. package/dist-vue/_chunks/PkChatbotViewProfile-Bt0eH8fO.js.map +0 -1
  68. package/dist-vue/_chunks/createChatbotApiClient-BYGLKd_e.js.map +0 -1
  69. package/dist-vue/_chunks/useChatbotStore-O0u7mVit.js.map +0 -1
  70. package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js +0 -84
  71. package/dist-vue/_chunks/useDialogConfirm-CyD9VTKg.js.map +0 -1
@@ -1,84 +0,0 @@
1
- import { VvButton as e, VvButtonGroup as t, VvDialog as n, VvInputText as r } from "@volverjs/ui-vue/components";
2
- import { defineComponent as i, h as a, nextTick as o, ref as s } from "vue";
3
- import { useI18n as c } from "vue-i18n";
4
- // ../../packages/composable/src/useDialog.ts
5
- var l = s(!1), u = s(), d = s(), f = s(), p = s(), m = s(!1), h = s(), g = s(), _ = () => {
6
- let e = (e) => {
7
- l.value = e;
8
- }, t = () => {
9
- u.value = void 0, d.value = void 0, f.value = void 0, p.value = void 0, m.value = void 0, h.value = void 0, g.value = void 0;
10
- };
11
- return {
12
- PkGlobalDialog: i({
13
- name: "PkGlobalDialog",
14
- render: () => a(n, {
15
- modelValue: l.value,
16
- title: u.value,
17
- transition: d.value,
18
- modifiers: f.value,
19
- size: p.value,
20
- keepOpen: m.value,
21
- role: h.value,
22
- "onUpdate:modelValue": e,
23
- onAfterLeave: t
24
- }, g.value)
25
- }),
26
- openDialog: (e, t) => (u.value = e?.title, d.value = e?.transition, f.value = e?.modifiers, p.value = e?.size, m.value = e?.keepOpen ?? !1, h.value = e?.role, g.value = t, o(() => {
27
- l.value = !0;
28
- }), l),
29
- isOpen: l
30
- };
31
- }, v = () => {
32
- let { openDialog: n } = _(), { t: i } = c({ useScope: "global" });
33
- return { openDialogConfirm: ({ emitReject: o = !1, confirmLabel: c, cancelLabel: l, questionLabel: u, descriptionLabel: d, onlyConfirm: f = !1, passphrase: p, passphraseLabel: m, passphraseHint: h, title: g, danger: _ = !1 } = {}) => new Promise((v, y) => {
34
- let b = s(), x = n({
35
- role: "alertdialog",
36
- size: "small",
37
- keepOpen: !0,
38
- title: g
39
- }, {
40
- default: () => a("div", [
41
- a("div", {
42
- class: d ? "" : "mb-sm",
43
- style: "white-space: pre-line"
44
- }, u ?? i("message.confirm")),
45
- d ? a("p", {
46
- class: "text-14 text-word-2 mt-xs mb-sm",
47
- style: "white-space: pre-line"
48
- }, d) : void 0,
49
- p ? a(r, {
50
- modelValue: b.value,
51
- "onUpdate:modelValue": (e) => {
52
- b.value = e;
53
- },
54
- type: "text",
55
- name: "passphrase",
56
- class: "mb-0",
57
- floating: !0,
58
- label: m ?? i("label.passphrase"),
59
- hintLabel: h ?? i("hint.passphrase", { passphrase: p })
60
- }) : void 0
61
- ]),
62
- footer: () => a(t, () => {
63
- let t = [];
64
- return f || t.push(a(e, {
65
- label: l ?? i("action.cancel"),
66
- modifiers: "ghost",
67
- onClick: () => {
68
- o && y(), v(!1), x.value = !1;
69
- }
70
- })), t.push(a(e, {
71
- label: c ?? i("action.proceed"),
72
- modifiers: _ ? "danger" : void 0,
73
- disabled: p ? p !== b.value : !1,
74
- onClick: () => {
75
- v(!0), x.value = !1;
76
- }
77
- })), t;
78
- })
79
- });
80
- }) };
81
- };
82
- export { v as t };
83
-
84
- //# sourceMappingURL=useDialogConfirm-CyD9VTKg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogConfirm-CyD9VTKg.js","names":["isOpen","ref","title","transition","modifiers","size","keepOpen","role","slots","useDialog","onUpdateModelValue","value","onAfterLeave","defineComponent","h","VvDialog","newProps","newSlots","nextTick","useDialogConfirm","$t","useI18n","passphraseText","openDialog","descriptionLabel","questionLabel","passphrase","VvInputText","passphraseLabel","passphraseHint","VvButtonGroup","toReturn","onlyConfirm","VvButton","cancelLabel","emitReject","reject","resolve","confirmLabel","danger"],"sources":["../../../../packages/composable/src/useDialog.ts","../../../../packages/composable/src/useDialogConfirm.ts"],"sourcesContent":["import { VvDialog } from '@volverjs/ui-vue/components'\nimport { defineComponent, h, nextTick, ref, type VNode } from 'vue'\n\ntype DialogProps = {\n title?: string\n transition?: string\n modifiers?: string | string[]\n /** @deprecated use modifiers instead */\n size?: 'small' | 'standard' | 'fullscreen'\n role?: 'alert' | 'alertdialog'\n keepOpen?: boolean\n}\n\ntype DialogSlots = {\n footer?: () => VNode | string\n header?: () => VNode | string\n default?: () => VNode | string | VNode[] | string[]\n}\n\nconst isOpen = ref(false)\nconst title = ref<DialogProps['title']>()\nconst transition = ref<DialogProps['transition']>()\nconst modifiers = ref<DialogProps['modifiers']>()\nconst size = ref<DialogProps['size']>()\nconst keepOpen = ref<DialogProps['keepOpen']>(false)\nconst role = ref<DialogProps['role']>()\nconst slots = ref<DialogSlots>()\n\nexport const useDialog = () => {\n const onUpdateModelValue = (value: boolean) => {\n isOpen.value = value\n }\n\n const onAfterLeave = () => {\n title.value = undefined\n transition.value = undefined\n modifiers.value = undefined\n size.value = undefined\n keepOpen.value = undefined\n role.value = undefined\n slots.value = undefined\n }\n\n const PkGlobalDialog = defineComponent({\n name: 'PkGlobalDialog',\n render: () =>\n h(\n VvDialog,\n {\n modelValue: isOpen.value,\n title: title.value,\n transition: transition.value,\n modifiers: modifiers.value,\n size: size.value,\n keepOpen: keepOpen.value,\n role: role.value,\n 'onUpdate:modelValue': onUpdateModelValue,\n onAfterLeave: onAfterLeave,\n },\n slots.value,\n ),\n })\n\n const openDialog = (newProps: DialogProps, newSlots?: DialogSlots) => {\n title.value = newProps?.title\n transition.value = newProps?.transition\n modifiers.value = newProps?.modifiers\n size.value = newProps?.size\n keepOpen.value = newProps?.keepOpen ?? false\n role.value = newProps?.role\n slots.value = newSlots\n nextTick(() => {\n isOpen.value = true\n })\n return isOpen\n }\n\n return { PkGlobalDialog, openDialog, isOpen }\n}\n","import type { VNode } from 'vue'\nimport { h, ref } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport {\n VvButton,\n VvButtonGroup,\n VvInputText,\n} from '@volverjs/ui-vue/components'\nimport { useDialog } from './useDialog'\n\nexport const useDialogConfirm = () => {\n const { openDialog } = useDialog()\n const { t: $t } = useI18n({\n useScope: 'global',\n })\n\n /**\n * Ask before doing something, in three parts that a person reads in order.\n *\n * `title` is what is about to happen, short, in the dialog header.\n * `questionLabel` is the question itself. `descriptionLabel` is what it\n * costs: the consequences, secondary, under the question. Splitting them\n * is the whole point: a confirm that puts question and consequences in one\n * paragraph is read as a wall and answered without being read, which is\n * the opposite of what a confirm is for.\n *\n * `danger` draws the confirm button red, for an action that cannot be\n * undone (DESIGN.md, principle 1): the one strong button of the dialog\n * stays one, and its color says what it costs.\n */\n const openDialogConfirm = ({\n emitReject = false,\n confirmLabel,\n cancelLabel,\n questionLabel,\n descriptionLabel,\n onlyConfirm = false,\n passphrase,\n passphraseLabel,\n passphraseHint,\n title,\n danger = false,\n }: {\n emitReject?: boolean\n confirmLabel?: string\n cancelLabel?: string\n questionLabel?: string\n descriptionLabel?: string\n onlyConfirm?: boolean\n passphrase?: string\n passphraseLabel?: string\n passphraseHint?: string\n title?: string\n danger?: boolean\n } = {}) => {\n return new Promise<boolean>((resolve, reject) => {\n const passphraseText = ref<string>()\n const isOpen = openDialog(\n {\n role: 'alertdialog',\n size: 'small',\n keepOpen: true,\n title,\n },\n {\n default: () =>\n h('div', [\n h(\n 'div',\n {\n class: descriptionLabel ? '' : 'mb-sm',\n style: 'white-space: pre-line',\n },\n questionLabel ?? $t('message.confirm'),\n ),\n descriptionLabel\n ? h(\n 'p',\n {\n class: 'text-14 text-word-2 mt-xs mb-sm',\n style: 'white-space: pre-line',\n },\n descriptionLabel,\n )\n : undefined,\n passphrase\n ? h(VvInputText, {\n modelValue: passphraseText.value,\n 'onUpdate:modelValue': (\n value: string,\n ) => {\n passphraseText.value = value\n },\n type: 'text',\n name: 'passphrase',\n class: 'mb-0',\n floating: true,\n label:\n passphraseLabel ??\n $t('label.passphrase'),\n hintLabel:\n passphraseHint ??\n $t('hint.passphrase', { passphrase }),\n })\n : undefined,\n ]),\n footer: () =>\n h(VvButtonGroup, () => {\n const toReturn: VNode[] = []\n if (!onlyConfirm) {\n toReturn.push(\n h(VvButton, {\n label:\n cancelLabel ?? $t('action.cancel'),\n modifiers: 'ghost',\n onClick: () => {\n if (emitReject) {\n reject()\n }\n resolve(false)\n isOpen.value = false\n },\n }),\n )\n }\n toReturn.push(\n h(VvButton, {\n label: confirmLabel ?? $t('action.proceed'),\n modifiers: danger ? 'danger' : undefined,\n disabled: passphrase\n ? passphrase !== passphraseText.value\n : false,\n onClick: () => {\n resolve(true)\n isOpen.value = false\n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