@8wave/ai-elements 0.122.0 → 0.123.0-beta.2

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 (56) hide show
  1. package/dist/_chunks/PkFilePreview-eKok4xdc.js +211 -0
  2. package/dist/_chunks/PkFilePreview-eKok4xdc.js.map +1 -0
  3. package/dist/_chunks/PkStreamingMarkdown-Dc0R0GHe.js.map +1 -1
  4. package/dist/_chunks/PkToolChatFile-3fYhbFSi.js +222 -0
  5. package/dist/_chunks/PkToolChatFile-3fYhbFSi.js.map +1 -0
  6. package/dist/ai-elements.es.js +99 -27
  7. package/dist/ai-elements.es.js.map +1 -1
  8. package/dist-vue/PkChatbot.js +1 -1
  9. package/dist-vue/PkChatbotViewChat.js +1 -1
  10. package/dist-vue/PkChatbotViewConversations.js +1 -1
  11. package/dist-vue/PkChatbotViewFiles.js +1 -1
  12. package/dist-vue/PkChatbotViewProfile.js +1 -1
  13. package/dist-vue/_chunks/{PkChatbot-CxbPkjhQ.js → PkChatbot-D3KGDerg.js} +6 -6
  14. package/dist-vue/_chunks/{PkChatbot-CxbPkjhQ.js.map → PkChatbot-D3KGDerg.js.map} +1 -1
  15. package/dist-vue/_chunks/{PkChatbotViewChat-gcim5jsW.js → PkChatbotViewChat-BNaSv86u.js} +373 -329
  16. package/dist-vue/_chunks/PkChatbotViewChat-BNaSv86u.js.map +1 -0
  17. package/dist-vue/_chunks/{PkChatbotViewConversations-ZdDraX9c.js → PkChatbotViewConversations-C1vl8z4o.js} +2 -2
  18. package/dist-vue/_chunks/{PkChatbotViewConversations-ZdDraX9c.js.map → PkChatbotViewConversations-C1vl8z4o.js.map} +1 -1
  19. package/dist-vue/_chunks/{PkChatbotViewFiles-BqZ3CJm5.js → PkChatbotViewFiles-DiKHsdPE.js} +2 -2
  20. package/dist-vue/_chunks/{PkChatbotViewFiles-BqZ3CJm5.js.map → PkChatbotViewFiles-DiKHsdPE.js.map} +1 -1
  21. package/dist-vue/_chunks/{PkChatbotViewProfile-CANtq-SY.js → PkChatbotViewProfile-CuQ0MAX7.js} +2 -2
  22. package/dist-vue/_chunks/{PkChatbotViewProfile-CANtq-SY.js.map → PkChatbotViewProfile-CuQ0MAX7.js.map} +1 -1
  23. package/dist-vue/_chunks/PkFilePreview-Cx6jmJCD.js +200 -0
  24. package/dist-vue/_chunks/PkFilePreview-Cx6jmJCD.js.map +1 -0
  25. package/dist-vue/_chunks/PkToolChatFile-BJsDSu1Q.js +220 -0
  26. package/dist-vue/_chunks/PkToolChatFile-BJsDSu1Q.js.map +1 -0
  27. package/dist-vue/_chunks/{createChatbotApiClient-Cu1nDV3E.js → createChatbotApiClient-DAh91HyT.js} +2 -2
  28. package/dist-vue/_chunks/{createChatbotApiClient-Cu1nDV3E.js.map → createChatbotApiClient-DAh91HyT.js.map} +1 -1
  29. package/dist-vue/_chunks/{useChatbotStore-CPl6KHny.js → useChatbotStore-D1U24qc8.js} +2 -2
  30. package/dist-vue/_chunks/{useChatbotStore-CPl6KHny.js.map → useChatbotStore-D1U24qc8.js.map} +1 -1
  31. package/dist-vue/_chunks/utils-DaAIWTtt.js.map +1 -1
  32. package/dist-vue/api.js +1 -1
  33. package/dist-vue/composables.js +30 -2
  34. package/dist-vue/composables.js.map +1 -1
  35. package/dist-vue/index.js +6 -6
  36. package/dist-vue/locales.js +32 -4
  37. package/dist-vue/packages/components/src/chat/PkFilePreview.d.ts +28 -0
  38. package/dist-vue/packages/components/src/chat/PkSpreadsheetPreview.d.ts +15 -0
  39. package/dist-vue/packages/components/src/chat/PkToolChatFile.d.ts +11 -1
  40. package/dist-vue/packages/components/src/chat/PkWordPreview.d.ts +5 -18
  41. package/dist-vue/packages/components/src/chat/utils.d.ts +2 -1
  42. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +3 -3
  43. package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +137 -0
  44. package/dist-vue/packages/models/src/schema/WordPreview.d.ts +1 -0
  45. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  46. package/dist-vue/style.css +1 -1
  47. package/package.json +1 -1
  48. package/dist/_chunks/PkToolChatFile-CScP_O0D.js +0 -193
  49. package/dist/_chunks/PkToolChatFile-CScP_O0D.js.map +0 -1
  50. package/dist/_chunks/PkWordPreview-COVeYzqX.js +0 -120
  51. package/dist/_chunks/PkWordPreview-COVeYzqX.js.map +0 -1
  52. package/dist-vue/_chunks/PkChatbotViewChat-gcim5jsW.js.map +0 -1
  53. package/dist-vue/_chunks/PkToolChatFile-iOyeQBp6.js +0 -191
  54. package/dist-vue/_chunks/PkToolChatFile-iOyeQBp6.js.map +0 -1
  55. package/dist-vue/_chunks/PkWordPreview-azW8wfJe.js +0 -115
  56. package/dist-vue/_chunks/PkWordPreview-azW8wfJe.js.map +0 -1
package/dist-vue/index.js CHANGED
@@ -5,18 +5,18 @@ import { t as v } from "./_chunks/PkChatbotMessages-qkodgdDE.js";
5
5
  import { a as y, i as b, l as x, n as S, r as C } from "./_chunks/Media-DylqhvaF.js";
6
6
  import { C as w, E as ee, F as te, G as ne, H as re, I as ie, J as ae, K as oe, L as se, M as ce, N as le, P as ue, R as de, T as fe, X as pe, Y as me, a as he, at as ge, b as _e, ct as ve, d as ye, f as be, ft as xe, i as Se, it as Ce, lt as we, nt as Te, ot as Ee, p as De, q as Oe, r as T, rt as ke, s as Ae, st as je, t as Me, v as Ne, w as Pe, x as Fe, z as Ie } from "./_chunks/Agent-BWwjGG2f.js";
7
7
  import { c as Le, d as Re, l as ze, r as Be, s as Ve, t as He, u as Ue } from "./_chunks/Document-DvRaziIf.js";
8
- import { a as We, i as Ge, n as Ke } from "./_chunks/createChatbotApiClient-Cu1nDV3E.js";
8
+ import { a as We, i as Ge, n as Ke } from "./_chunks/createChatbotApiClient-DAh91HyT.js";
9
9
  import { t as qe } from "./_chunks/PkChatbotAuth-Btxg3TF0.js";
10
10
  import { t as Je } from "./_chunks/VvButtonLocalized-C-vx25u4.js";
11
11
  import { n as Ye, t as Xe } from "./_chunks/PkStreamingMarkdown-B-sEx8BP.js";
12
- import { a as Ze, i as Qe, n as $e, r as et } from "./_chunks/useChatbotStore-CPl6KHny.js";
12
+ import { a as Ze, i as Qe, n as $e, r as et } from "./_chunks/useChatbotStore-D1U24qc8.js";
13
13
  import "./_chunks/src-B-ZKEhTU.js";
14
14
  import { a as tt, l as nt, u as rt } from "./_chunks/message-DuibQyHy.js";
15
15
  import { A as it, D as at, F as ot, I as st, N as ct, P as lt, f as ut, g as dt, m as ft, w as pt } from "./_chunks/utils-DaAIWTtt.js";
16
16
  import { t as mt } from "./_chunks/useSafeLocalStorage-a2eHEqAi.js";
17
17
  import { t as ht } from "./_chunks/useDialogConfirm-fn7iV-iE.js";
18
- import { i as gt, n as _t, r as vt, t as yt } from "./_chunks/PkChatbotViewConversations-ZdDraX9c.js";
19
- import { i as bt, n as xt, r as St, t as Ct } from "./_chunks/PkChatbotViewChat-gcim5jsW.js";
18
+ import { i as gt, n as _t, r as vt, t as yt } from "./_chunks/PkChatbotViewConversations-C1vl8z4o.js";
19
+ import { i as bt, n as xt, r as St, t as Ct } from "./_chunks/PkChatbotViewChat-BNaSv86u.js";
20
20
  import { t as wt } from "./_chunks/PkChatbotError-BS84xuiu.js";
21
21
  import { t as Tt } from "./_chunks/useImageFallback-HUe4GHah.js";
22
22
  import { t as Et } from "./_chunks/useLocalizedString-Dmn92nix.js";
@@ -36,8 +36,8 @@ import { t as Zn } from "./_chunks/PkChatbotStepPayload-BYChvULZ.js";
36
36
  import { t as Qn } from "./_chunks/PkChatbotStepToolDetail-BysPl2ko.js";
37
37
  import { n as $n, t as er } from "./_chunks/PkChatbotInput-BT51V-v4.js";
38
38
  import { t as tr } from "./_chunks/PkChatbotEmptyState-B76oD7fB.js";
39
- import { t as nr } from "./_chunks/PkChatbotViewProfile-CANtq-SY.js";
40
- import { t as rr } from "./_chunks/PkChatbot-CxbPkjhQ.js";
39
+ import { t as nr } from "./_chunks/PkChatbotViewProfile-CuQ0MAX7.js";
40
+ import { t as rr } from "./_chunks/PkChatbot-D3KGDerg.js";
41
41
  import { i as ir, r as ar, t as or } from "./_chunks/PkToolShowSources-C4rKpypf.js";
42
42
  import { t as sr } from "./_chunks/mcpOAuthReport-aR-W09MX.js";
43
43
  import { t as cr } from "./_chunks/PkToolShowEmail-BehvoNsz.js";
@@ -633,11 +633,14 @@ var e = {
633
633
  steps: "Processing",
634
634
  stepCount: "{n} step | {n} steps",
635
635
  stepError: "Error",
636
+ chatFileRestoreRequest: "Restore version {version} of {filename}",
636
637
  pageControlActive: "The agent is using the page",
637
638
  chatFileParagraphAdded: "Added",
638
639
  chatFileParagraphDeleted: "Deleted",
639
640
  chatFileTableRowAdded: "Row added",
640
641
  chatFileTableRowDeleted: "Row deleted",
642
+ chatFileRevisionAccepted: "Revision accepted",
643
+ chatFileRevisionRejected: "Revision rejected",
641
644
  chatFileParagraphChanged: "Changed",
642
645
  chatFileNewSheet: "New sheet, with {count} row | New sheet, with {count} rows",
643
646
  chatFileRow: "Row {row}",
@@ -647,6 +650,8 @@ var e = {
647
650
  chatFileRefreshPivots: "The pivot tables still show the old figures: refresh them in Excel with Data, Refresh All.",
648
651
  chatFileUpdateTableOfContents: "The table of contents does not update by itself: in Word, right click it and choose Update Field.",
649
652
  chatFileVersionSummary: "Version {version}: {changed}",
653
+ chatFileRestored: "Version {version}: version {restored} restored",
654
+ chatFileRestore: "Restore",
650
655
  chatFileCell: "Cell",
651
656
  chatFileBefore: "Before",
652
657
  chatFileAfter: "After",
@@ -789,14 +794,23 @@ var e = {
789
794
  },
790
795
  chatFilePreview: {
791
796
  close: "Close the preview",
792
- preview: "Preview",
797
+ versionFirstRows: "Version {version}, the first rows of each sheet",
798
+ firstRows: "The first rows of each sheet",
793
799
  versionUnpaged: "Version {version}, preview not paginated",
794
800
  unpaged: "Preview, not paginated",
795
801
  download: "Download",
802
+ unavailable: "This document has no preview: download it to open it in Word.",
803
+ true: "TRUE",
804
+ false: "FALSE",
805
+ staleFormulas: "Values shown with a dash update when you open the file in Excel.",
806
+ missingValue: "Computed when you open the file in Excel",
807
+ emptySheet: "This sheet is empty.",
808
+ moreRows: "The file holds one more row. | The file holds {count} more rows.",
809
+ moreColumns: "The file holds one more column. | The file holds {count} more columns.",
810
+ preview: "Preview",
796
811
  revisionsOf: "Tracked changes by {authors}, not accepted yet:",
797
812
  removed: "removed",
798
813
  added: "added",
799
- unavailable: "This document has no preview: download it to open it in Word.",
800
814
  truncated: "The preview stops here: the rest of the document is in the file to download.",
801
815
  revisionBy: "Tracked change by {author}",
802
816
  image: "Image"
@@ -1484,11 +1498,14 @@ var e = {
1484
1498
  steps: "Elaborazione",
1485
1499
  stepCount: "{n} passaggio | {n} passaggi",
1486
1500
  stepError: "Errore",
1501
+ chatFileRestoreRequest: "Ripristina la versione {version} di {filename}",
1487
1502
  pageControlActive: "L'agente sta usando la pagina",
1488
1503
  chatFileParagraphAdded: "Aggiunto",
1489
1504
  chatFileParagraphDeleted: "Eliminato",
1490
1505
  chatFileTableRowAdded: "Riga aggiunta",
1491
1506
  chatFileTableRowDeleted: "Riga eliminata",
1507
+ chatFileRevisionAccepted: "Revisione accettata",
1508
+ chatFileRevisionRejected: "Revisione rifiutata",
1492
1509
  chatFileParagraphChanged: "Modificato",
1493
1510
  chatFileNewSheet: "Foglio nuovo, con {count} riga | Foglio nuovo, con {count} righe",
1494
1511
  chatFileRow: "Riga {row}",
@@ -1498,6 +1515,8 @@ var e = {
1498
1515
  chatFileRefreshPivots: "Le tabelle pivot mostrano ancora i dati di prima: aggiornale in Excel con Dati, Aggiorna tutto.",
1499
1516
  chatFileUpdateTableOfContents: "L'indice non si aggiorna da solo: in Word fai clic destro sull'indice e scegli Aggiorna campo.",
1500
1517
  chatFileVersionSummary: "Versione {version}: {changed}",
1518
+ chatFileRestored: "Versione {version}: ripristinata la versione {restored}",
1519
+ chatFileRestore: "Ripristina",
1501
1520
  chatFileCell: "Cella",
1502
1521
  chatFileBefore: "Prima",
1503
1522
  chatFileAfter: "Dopo",
@@ -1640,14 +1659,23 @@ var e = {
1640
1659
  },
1641
1660
  chatFilePreview: {
1642
1661
  close: "Chiudi l'anteprima",
1643
- preview: "Anteprima",
1662
+ versionFirstRows: "Versione {version}, le prime righe di ogni foglio",
1663
+ firstRows: "Le prime righe di ogni foglio",
1644
1664
  versionUnpaged: "Versione {version}, anteprima non impaginata",
1645
1665
  unpaged: "Anteprima non impaginata",
1646
1666
  download: "Scarica",
1667
+ unavailable: "L'anteprima di questo documento non è disponibile: scaricalo per aprirlo in Word.",
1668
+ true: "VERO",
1669
+ false: "FALSO",
1670
+ staleFormulas: "I valori con il trattino si aggiornano quando apri il file in Excel.",
1671
+ missingValue: "Calcolato quando apri il file in Excel",
1672
+ emptySheet: "Questo foglio è vuoto.",
1673
+ moreRows: "Nel file c'è un'altra riga. | Nel file ci sono altre {count} righe.",
1674
+ moreColumns: "Nel file c'è un'altra colonna. | Nel file ci sono altre {count} colonne.",
1675
+ preview: "Anteprima",
1647
1676
  revisionsOf: "Revisioni da accettare di {authors}:",
1648
1677
  removed: "tolto",
1649
1678
  added: "aggiunto",
1650
- unavailable: "L'anteprima di questo documento non è disponibile: scaricalo per aprirlo in Word.",
1651
1679
  truncated: "L'anteprima si ferma qui: il resto del documento è nel file da scaricare.",
1652
1680
  revisionBy: "Revisione di {author}",
1653
1681
  image: "Immagine"
@@ -0,0 +1,28 @@
1
+ import { ChatFilePreview } from '../../../models/src';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ /**
4
+ * The preview of a Word document or a spreadsheet stored in the chat
5
+ * (spec `chat-office-files.md`, F6, items 3 and 4): its name, version and
6
+ * download over the content, which scrolls. The same frame goes in a
7
+ * dialog (its title and close are the dialog's) and in the panel beside
8
+ * the chat (`closable`).
9
+ */
10
+ type __VLS_Props = {
11
+ kind: 'word' | 'spreadsheet';
12
+ filename: string;
13
+ version?: number;
14
+ /** The authenticated download URL of the same version. */
15
+ downloadUrl: string;
16
+ preview?: ChatFilePreview;
17
+ loading?: boolean;
18
+ error?: boolean;
19
+ /** Draws its own title and close button, for the panel. */
20
+ closable?: boolean;
21
+ };
22
+ declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
23
+ close: () => any;
24
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onClose?: (() => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { SpreadsheetPreview } from '../../../models/src';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ /**
4
+ * The content of the preview of a spreadsheet (spec
5
+ * `chat-office-files.md`, F6, item 4): the first rows of each sheet, one
6
+ * sheet at a time, its cells formatted in the reader's language as the
7
+ * file's number formats ask. A formula whose result the file does not
8
+ * hold yet shows a dash. Framed by `PkFilePreview`.
9
+ */
10
+ type __VLS_Props = {
11
+ preview: SpreadsheetPreview;
12
+ };
13
+ declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -13,8 +13,18 @@ type __VLS_Props = {
13
13
  part: unknown;
14
14
  /** The authenticated download URL of a file stored in this chat. */
15
15
  fileUrl: (storedFileName: string) => string;
16
- /** Opens the preview of a Word document, where the chat has one. */
16
+ /** Opens the preview of the file, where the chat has one. */
17
17
  preview?: (file: ChatFilePreviewTarget) => void;
18
+ /** The latest version of each file the conversation shows, by fileId. */
19
+ latestVersions?: ReadonlyMap<string, number>;
20
+ /**
21
+ * Asks the agent to write an earlier version again as the newest one,
22
+ * where the chat can send a message.
23
+ */
24
+ restore?: (file: {
25
+ version: number;
26
+ filename: string;
27
+ }) => void;
18
28
  };
19
29
  declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
20
30
  declare const _default: typeof __VLS_export;
@@ -1,29 +1,16 @@
1
1
  import { WordPreview } from '../../../models/src';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  /**
4
- * The preview of a Word document stored in the chat (spec
4
+ * The content of the preview of a Word document (spec
5
5
  * `chat-office-files.md`, F6, item 3): the blocks the server read from
6
6
  * the document, drawn as text, never as HTML. Tracked changes not
7
7
  * accepted yet carry the marks of the card of an edit, struck where words
8
- * went and underlined where they came. Not paginated: no pages, images
9
- * as placeholders. The same content goes in a dialog (its title and close
10
- * are the dialog's) and in the panel beside the chat (`closable`).
8
+ * went and underlined where they came. Not paginated: no pages, images as
9
+ * placeholders. Framed by `PkFilePreview`.
11
10
  */
12
11
  type __VLS_Props = {
13
- filename: string;
14
- version?: number;
15
- /** The authenticated download URL of the same version. */
16
- downloadUrl: string;
17
- preview?: WordPreview;
18
- loading?: boolean;
19
- error?: boolean;
20
- /** Draws its own title and close button, for the panel. */
21
- closable?: boolean;
12
+ preview: WordPreview;
22
13
  };
23
- declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
24
- close: () => any;
25
- }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
26
- onClose?: (() => any) | undefined;
27
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
28
15
  declare const _default: typeof __VLS_export;
29
16
  export default _default;
@@ -214,8 +214,9 @@ export declare function localizeSummaryLabels<T extends string | null | undefine
214
214
  export declare function getToolPartLabel($t: (key: string) => string, part?: UIMessage['parts'][number] | null,
215
215
  /** The live titles of the page's steps, by call: they win when present. */
216
216
  hostStepTitles?: Record<string, string>): string | undefined;
217
- /** The version of a Word document stored in the chat that a preview opens. */
217
+ /** The version of a file stored in the chat that a preview opens. */
218
218
  export type ChatFilePreviewTarget = {
219
+ kind: 'word' | 'spreadsheet';
219
220
  storedFileName: string;
220
221
  filename: string;
221
222
  version?: number;
@@ -1,4 +1,4 @@
1
- import { AgentAccess, Chat, ChatWakeupState, DeviceContext, MessageFeedback, AgentPublic, MediaSource, UserFileKind, VoiceSession, WordPreview } from '../../../../models/src';
1
+ import { AgentAccess, Chat, ChatWakeupState, DeviceContext, MessageFeedback, AgentPublic, MediaSource, UserFileKind, VoiceSession, ChatFilePreview } from '../../../../models/src';
2
2
  export interface ChatbotApiClientOptions {
3
3
  baseUrl: string;
4
4
  basePath?: string;
@@ -71,8 +71,8 @@ export interface ChatbotApiClient {
71
71
  getMediaUrl(agentId: string, chatId: string, storedFileName: string): string;
72
72
  /** Like {@link getMediaUrl}, served as an attachment: the browser saves it. */
73
73
  getMediaDownloadUrl(agentId: string, chatId: string, storedFileName: string): string;
74
- /** The preview of a Word document stored in the chat, as blocks to draw. */
75
- getWordPreview(agentId: string, chatId: string, storedFileName: string): Promise<WordPreview>;
74
+ /** The preview of a Word document or a spreadsheet stored in the chat. */
75
+ getChatFilePreview(agentId: string, chatId: string, storedFileName: string): Promise<ChatFilePreview>;
76
76
  appendAuthToken(url: string): string;
77
77
  uploadMedia(agentId: string, chatId: string, file: File): Promise<MediaSource>;
78
78
  getChatEndpoint(agentId: string, type?: 'chat' | 'reasoning'): string;
@@ -0,0 +1,137 @@
1
+ import * as z from 'zod';
2
+ export declare const SpreadsheetPreviewCellSchema: z.ZodObject<{
3
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
4
+ format: z.ZodOptional<z.ZodEnum<{
5
+ date: "date";
6
+ error: "error";
7
+ currency: "currency";
8
+ percent: "percent";
9
+ }>>;
10
+ decimals: z.ZodOptional<z.ZodNumber>;
11
+ maxDecimals: z.ZodOptional<z.ZodNumber>;
12
+ currency: z.ZodOptional<z.ZodString>;
13
+ missing: z.ZodOptional<z.ZodLiteral<true>>;
14
+ }, z.core.$strip>;
15
+ export declare const SpreadsheetPreviewSheetSchema: z.ZodObject<{
16
+ name: z.ZodString;
17
+ rows: z.ZodArray<z.ZodArray<z.ZodObject<{
18
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
19
+ format: z.ZodOptional<z.ZodEnum<{
20
+ date: "date";
21
+ error: "error";
22
+ currency: "currency";
23
+ percent: "percent";
24
+ }>>;
25
+ decimals: z.ZodOptional<z.ZodNumber>;
26
+ maxDecimals: z.ZodOptional<z.ZodNumber>;
27
+ currency: z.ZodOptional<z.ZodString>;
28
+ missing: z.ZodOptional<z.ZodLiteral<true>>;
29
+ }, z.core.$strip>>>;
30
+ header: z.ZodBoolean;
31
+ moreRows: z.ZodNumber;
32
+ moreColumns: z.ZodNumber;
33
+ }, z.core.$strip>;
34
+ export declare const SpreadsheetPreviewSchema: z.ZodObject<{
35
+ kind: z.ZodLiteral<"spreadsheet">;
36
+ sheets: z.ZodArray<z.ZodObject<{
37
+ name: z.ZodString;
38
+ rows: z.ZodArray<z.ZodArray<z.ZodObject<{
39
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
40
+ format: z.ZodOptional<z.ZodEnum<{
41
+ date: "date";
42
+ error: "error";
43
+ currency: "currency";
44
+ percent: "percent";
45
+ }>>;
46
+ decimals: z.ZodOptional<z.ZodNumber>;
47
+ maxDecimals: z.ZodOptional<z.ZodNumber>;
48
+ currency: z.ZodOptional<z.ZodString>;
49
+ missing: z.ZodOptional<z.ZodLiteral<true>>;
50
+ }, z.core.$strip>>>;
51
+ header: z.ZodBoolean;
52
+ moreRows: z.ZodNumber;
53
+ moreColumns: z.ZodNumber;
54
+ }, z.core.$strip>>;
55
+ staleFormulas: z.ZodBoolean;
56
+ }, z.core.$strip>;
57
+ /** What the preview route answers, by the kind of file. */
58
+ export declare const ChatFilePreviewSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
+ kind: z.ZodLiteral<"word">;
60
+ blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
61
+ kind: z.ZodLiteral<"heading">;
62
+ level: z.ZodNumber;
63
+ label: z.ZodOptional<z.ZodString>;
64
+ runs: z.ZodArray<z.ZodObject<{
65
+ text: z.ZodString;
66
+ change: z.ZodOptional<z.ZodEnum<{
67
+ deleted: "deleted";
68
+ inserted: "inserted";
69
+ }>>;
70
+ author: z.ZodOptional<z.ZodString>;
71
+ bold: z.ZodOptional<z.ZodLiteral<true>>;
72
+ italic: z.ZodOptional<z.ZodLiteral<true>>;
73
+ underline: z.ZodOptional<z.ZodLiteral<true>>;
74
+ image: z.ZodOptional<z.ZodLiteral<true>>;
75
+ }, z.core.$strip>>;
76
+ }, z.core.$strip>, z.ZodObject<{
77
+ kind: z.ZodLiteral<"paragraph">;
78
+ label: z.ZodOptional<z.ZodString>;
79
+ runs: z.ZodArray<z.ZodObject<{
80
+ text: z.ZodString;
81
+ change: z.ZodOptional<z.ZodEnum<{
82
+ deleted: "deleted";
83
+ inserted: "inserted";
84
+ }>>;
85
+ author: z.ZodOptional<z.ZodString>;
86
+ bold: z.ZodOptional<z.ZodLiteral<true>>;
87
+ italic: z.ZodOptional<z.ZodLiteral<true>>;
88
+ underline: z.ZodOptional<z.ZodLiteral<true>>;
89
+ image: z.ZodOptional<z.ZodLiteral<true>>;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>, z.ZodObject<{
92
+ kind: z.ZodLiteral<"table">;
93
+ rows: z.ZodArray<z.ZodArray<z.ZodObject<{
94
+ runs: z.ZodArray<z.ZodObject<{
95
+ text: z.ZodString;
96
+ change: z.ZodOptional<z.ZodEnum<{
97
+ deleted: "deleted";
98
+ inserted: "inserted";
99
+ }>>;
100
+ author: z.ZodOptional<z.ZodString>;
101
+ bold: z.ZodOptional<z.ZodLiteral<true>>;
102
+ italic: z.ZodOptional<z.ZodLiteral<true>>;
103
+ underline: z.ZodOptional<z.ZodLiteral<true>>;
104
+ image: z.ZodOptional<z.ZodLiteral<true>>;
105
+ }, z.core.$strip>>;
106
+ span: z.ZodOptional<z.ZodNumber>;
107
+ }, z.core.$strip>>>;
108
+ }, z.core.$strip>], "kind">>;
109
+ truncated: z.ZodBoolean;
110
+ revisionAuthors: z.ZodArray<z.ZodString>;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ kind: z.ZodLiteral<"spreadsheet">;
113
+ sheets: z.ZodArray<z.ZodObject<{
114
+ name: z.ZodString;
115
+ rows: z.ZodArray<z.ZodArray<z.ZodObject<{
116
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
117
+ format: z.ZodOptional<z.ZodEnum<{
118
+ date: "date";
119
+ error: "error";
120
+ currency: "currency";
121
+ percent: "percent";
122
+ }>>;
123
+ decimals: z.ZodOptional<z.ZodNumber>;
124
+ maxDecimals: z.ZodOptional<z.ZodNumber>;
125
+ currency: z.ZodOptional<z.ZodString>;
126
+ missing: z.ZodOptional<z.ZodLiteral<true>>;
127
+ }, z.core.$strip>>>;
128
+ header: z.ZodBoolean;
129
+ moreRows: z.ZodNumber;
130
+ moreColumns: z.ZodNumber;
131
+ }, z.core.$strip>>;
132
+ staleFormulas: z.ZodBoolean;
133
+ }, z.core.$strip>], "kind">;
134
+ export type SpreadsheetPreviewCell = z.infer<typeof SpreadsheetPreviewCellSchema>;
135
+ export type SpreadsheetPreviewSheet = z.infer<typeof SpreadsheetPreviewSheetSchema>;
136
+ export type SpreadsheetPreview = z.infer<typeof SpreadsheetPreviewSchema>;
137
+ export type ChatFilePreview = z.infer<typeof ChatFilePreviewSchema>;
@@ -76,6 +76,7 @@ export declare const WordPreviewBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
76
76
  }, z.core.$strip>>>;
77
77
  }, z.core.$strip>], "kind">;
78
78
  export declare const WordPreviewSchema: z.ZodObject<{
79
+ kind: z.ZodLiteral<"word">;
79
80
  blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
80
81
  kind: z.ZodLiteral<"heading">;
81
82
  level: z.ZodNumber;
@@ -42,6 +42,7 @@ export * from './RevisedAnswer';
42
42
  export * from './SignInSecurity';
43
43
  export * from './StreamError';
44
44
  export * from './SubAgent';
45
+ export * from './SpreadsheetPreview';
45
46
  export * from './Tabular';
46
47
  export * from './TimingLog';
47
48
  export * from './DocumentFolder';