@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
@@ -261,6 +261,7 @@ var e = {
261
261
  includeThoughts: "View reasoning",
262
262
  thinking: "Thinking",
263
263
  enabled: "Enabled",
264
+ imageLoadError: "Image not available",
264
265
  toolApprovalBadge: "User confirm",
265
266
  calendarEvent: "Event",
266
267
  comparison: "Comparison",
@@ -270,7 +271,6 @@ var e = {
270
271
  subject: "Subject",
271
272
  body: "Body",
272
273
  gallery: "Gallery ({count} images)",
273
- imageLoadError: "Image not available",
274
274
  location: "Location",
275
275
  message: "Message",
276
276
  qrCode: "QR Code",
@@ -748,6 +748,7 @@ var e = {
748
748
  includeThoughts: "Visualizza ragionamento",
749
749
  thinking: "Pensiero",
750
750
  enabled: "Abilitato",
751
+ imageLoadError: "Immagine non disponibile",
751
752
  toolApprovalBadge: "Conferma utente",
752
753
  calendarEvent: "Evento",
753
754
  comparison: "Confronto",
@@ -757,7 +758,6 @@ var e = {
757
758
  subject: "Oggetto",
758
759
  body: "Testo",
759
760
  gallery: "Galleria ({count} immagini)",
760
- imageLoadError: "Immagine non disponibile",
761
761
  location: "Posizione",
762
762
  message: "Messaggio",
763
763
  qrCode: "Codice QR",
@@ -1,8 +1,13 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  type __VLS_Props = {
3
3
  src: string;
4
+ /** Second-best source, tried when `src` fails (e.g. og:image -> favicon). */
4
5
  altSrc?: string;
5
- blankOnError?: boolean;
6
+ /**
7
+ * Icon rendered in place of the image once every source has failed.
8
+ * Without it the element is dropped, leaving no gap in the layout.
9
+ */
10
+ fallbackIcon?: string;
6
11
  };
7
12
  declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
8
13
  declare const _default: typeof __VLS_export;
@@ -3,7 +3,14 @@ type __VLS_Props = {
3
3
  name?: string;
4
4
  imgSrc?: string | null;
5
5
  modifiers?: string;
6
+ /** Shown when there is no image (or it is broken) and no name. */
7
+ fallbackIcon?: string;
6
8
  };
7
- declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ modifiers: string;
11
+ name: string;
12
+ fallbackIcon: string;
13
+ imgSrc: string | null;
14
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
8
15
  declare const _default: typeof __VLS_export;
9
16
  export default _default;
@@ -10,8 +10,8 @@ type __VLS_ModelProps = {
10
10
  };
11
11
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
12
12
  declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
13
- delete: () => any;
14
13
  files: () => any;
14
+ delete: () => any;
15
15
  "update:editingTitle": (value: string) => any;
16
16
  select: () => any;
17
17
  "edit-start": () => any;
@@ -19,8 +19,8 @@ declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, C
19
19
  "edit-cancel": () => any;
20
20
  "edit-keydown": (event: KeyboardEvent) => any;
21
21
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
- onDelete?: (() => any) | undefined;
23
22
  onFiles?: (() => any) | undefined;
23
+ onDelete?: (() => any) | undefined;
24
24
  "onUpdate:editingTitle"?: ((value: string) => any) | undefined;
25
25
  onSelect?: (() => any) | undefined;
26
26
  "onEdit-start"?: (() => any) | undefined;
@@ -4,6 +4,7 @@ export * from './useConnectivity';
4
4
  export * from './useDialog';
5
5
  export * from './useDialogConfirm';
6
6
  export * from './useFileRow';
7
+ export * from './useImageFallback';
7
8
  export * from './useJsonDiff';
8
9
  export * from './useJsonSchemaEditor';
9
10
  export * from './useLocalizedString';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Tracks image sources that failed to load, so a template can swap in a
3
+ * placeholder (icon, initials, next-best image) instead of leaving the
4
+ * browser's broken-image glyph.
5
+ *
6
+ * Any `<img>` pointing at a url we don't control needs this: OAuth avatar urls
7
+ * expire, uploaded logos get deleted, og:images and favicons rot, and preview
8
+ * blobs may not be generated yet.
9
+ *
10
+ * ```vue
11
+ * <img v-if="canShowImage(page.image)" :src="page.image" @error="onImageError(page.image)" />
12
+ * <VvIcon v-else name="ri:image-off-line" />
13
+ * ```
14
+ */
15
+ export declare function useImageFallback(): {
16
+ canShowImage: (src?: string | null) => boolean;
17
+ onImageError: (src?: string | null) => void;
18
+ resetImageError: (src?: string | null) => void;
19
+ };
@@ -0,0 +1,96 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * Aggregate stats for the system user detail page
4
+ * (docs/specs/released/system-user-detail-page.md). One overview call feeds the whole
5
+ * stats row; every metric here must stay on an indexed per-user access path
6
+ * (see the coverage note in userOverview.service.ts).
7
+ */
8
+ export declare const UserOverviewSchema: z.ZodObject<{
9
+ chats: z.ZodObject<{
10
+ total: z.ZodNumber;
11
+ blocked: z.ZodNumber;
12
+ warnings: z.ZodNumber;
13
+ totalCostUsd: z.ZodNumber;
14
+ totalTokens: z.ZodNumber;
15
+ lastMessageAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
16
+ }, z.core.$strip>;
17
+ reasoningChats: z.ZodObject<{
18
+ total: z.ZodNumber;
19
+ }, z.core.$strip>;
20
+ leads: z.ZodObject<{
21
+ total: z.ZodNumber;
22
+ }, z.core.$strip>;
23
+ files: z.ZodObject<{
24
+ documents: z.ZodNumber;
25
+ attachments: z.ZodNumber;
26
+ bytes: z.ZodNumber;
27
+ }, z.core.$strip>;
28
+ memories: z.ZodObject<{
29
+ total: z.ZodNumber;
30
+ explicit: z.ZodNumber;
31
+ extracted: z.ZodNumber;
32
+ unsynced: z.ZodNumber;
33
+ }, z.core.$strip>;
34
+ memoryAgents: z.ZodArray<z.ZodObject<{
35
+ id: z.ZodString;
36
+ name: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ sessions: z.ZodObject<{
39
+ active: z.ZodNumber;
40
+ }, z.core.$strip>;
41
+ feedbacks: z.ZodObject<{
42
+ upvotes: z.ZodNumber;
43
+ downvotes: z.ZodNumber;
44
+ }, z.core.$strip>;
45
+ organizations: z.ZodArray<z.ZodObject<{
46
+ id: z.ZodString;
47
+ memberId: z.ZodString;
48
+ name: z.ZodString;
49
+ slug: z.ZodNullable<z.ZodString>;
50
+ logo: z.ZodNullable<z.ZodString>;
51
+ role: z.ZodString;
52
+ memberSince: z.ZodCoercedDate<unknown>;
53
+ }, z.core.$strip>>;
54
+ gdprRequests: z.ZodArray<z.ZodObject<{
55
+ id: z.ZodString;
56
+ type: z.ZodString;
57
+ status: z.ZodString;
58
+ requestedAt: z.ZodCoercedDate<unknown>;
59
+ completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
60
+ performedBy: z.ZodString;
61
+ }, z.core.$strip>>;
62
+ }, z.core.$strip>;
63
+ export type UserOverview = z.infer<typeof UserOverviewSchema>;
64
+ /**
65
+ * One row of the admin memories table. Pre-v3 rows have a null `content`
66
+ * and the legacy `key`/`value` pair instead.
67
+ */
68
+ export declare const UserMemoryAdminItemSchema: z.ZodObject<{
69
+ id: z.ZodString;
70
+ content: z.ZodNullable<z.ZodString>;
71
+ key: z.ZodNullable<z.ZodString>;
72
+ value: z.ZodNullable<z.ZodString>;
73
+ source: z.ZodString;
74
+ scope: z.ZodString;
75
+ agentId: z.ZodNullable<z.ZodString>;
76
+ agentName: z.ZodNullable<z.ZodString>;
77
+ qdrantSynced: z.ZodBoolean;
78
+ lastRecalledAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
79
+ createdAt: z.ZodCoercedDate<unknown>;
80
+ updatedAt: z.ZodCoercedDate<unknown>;
81
+ }, z.core.$strip>;
82
+ export type UserMemoryAdminItem = z.infer<typeof UserMemoryAdminItemSchema>;
83
+ /** One row of the admin cross-agent conversations table. */
84
+ export declare const UserChatListItemSchema: z.ZodObject<{
85
+ id: z.ZodString;
86
+ title: z.ZodNullable<z.ZodString>;
87
+ agentId: z.ZodNullable<z.ZodString>;
88
+ agentName: z.ZodNullable<z.ZodString>;
89
+ messageCount: z.ZodNumber;
90
+ totalCostUsd: z.ZodNumber;
91
+ blocked: z.ZodBoolean;
92
+ anonymized: z.ZodBoolean;
93
+ createdAt: z.ZodCoercedDate<unknown>;
94
+ lastMessageAt: z.ZodCoercedDate<unknown>;
95
+ }, z.core.$strip>;
96
+ export type UserChatListItem = z.infer<typeof UserChatListItemSchema>;
@@ -35,4 +35,5 @@ export * from './StreamError';
35
35
  export * from './SubAgent';
36
36
  export * from './DocumentFolder';
37
37
  export * from './User';
38
+ export * from './UserOverview';
38
39
  export * from './Weather';