@8wave/ai-elements 0.122.0-beta.8 → 0.122.0
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.
- package/dist/_chunks/PkStreamingMarkdown-Dc0R0GHe.js.map +1 -1
- package/dist/_chunks/PkToolChatFile-CScP_O0D.js +193 -0
- package/dist/_chunks/PkToolChatFile-CScP_O0D.js.map +1 -0
- package/dist/_chunks/PkWordPreview-COVeYzqX.js +120 -0
- package/dist/_chunks/PkWordPreview-COVeYzqX.js.map +1 -0
- package/dist/ai-elements.es.js +520 -402
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-B7JaLUZw.js → PkChatbot-CxbPkjhQ.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-B7JaLUZw.js.map → PkChatbot-CxbPkjhQ.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotViewChat-gcim5jsW.js +1003 -0
- package/dist-vue/_chunks/PkChatbotViewChat-gcim5jsW.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-4ZJF-y5q.js → PkChatbotViewConversations-ZdDraX9c.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-4ZJF-y5q.js.map → PkChatbotViewConversations-ZdDraX9c.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-CfPwNcvf.js → PkChatbotViewFiles-BqZ3CJm5.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-CfPwNcvf.js.map → PkChatbotViewFiles-BqZ3CJm5.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-Dd8EhOx3.js → PkChatbotViewProfile-CANtq-SY.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-Dd8EhOx3.js.map → PkChatbotViewProfile-CANtq-SY.js.map} +1 -1
- package/dist-vue/_chunks/PkToolChatFile-iOyeQBp6.js +191 -0
- package/dist-vue/_chunks/PkToolChatFile-iOyeQBp6.js.map +1 -0
- package/dist-vue/_chunks/PkWordPreview-azW8wfJe.js +115 -0
- package/dist-vue/_chunks/PkWordPreview-azW8wfJe.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-y6jA42S0.js → createChatbotApiClient-Cu1nDV3E.js} +4 -1
- package/dist-vue/_chunks/{createChatbotApiClient-y6jA42S0.js.map → createChatbotApiClient-Cu1nDV3E.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-DCXyql8U.js → useChatbotStore-CPl6KHny.js} +2 -2
- package/dist-vue/_chunks/{useChatbotStore-DCXyql8U.js.map → useChatbotStore-CPl6KHny.js.map} +1 -1
- package/dist-vue/_chunks/utils-DaAIWTtt.js.map +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +1 -3
- package/dist-vue/composables.js +36 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +6 -6
- package/dist-vue/locales.js +28 -0
- package/dist-vue/packages/components/src/chat/PkToolChatFile.d.ts +3 -0
- package/dist-vue/packages/components/src/chat/PkWordPreview.d.ts +29 -0
- package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +13 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +6 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +3 -1
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +134 -0
- package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkToolChatFile-BsvJIdgo.js +0 -181
- package/dist/_chunks/PkToolChatFile-BsvJIdgo.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-Djts78Oq.js +0 -921
- package/dist-vue/_chunks/PkChatbotViewChat-Djts78Oq.js.map +0 -1
- package/dist-vue/_chunks/PkToolChatFile-s46esp0O.js +0 -179
- package/dist-vue/_chunks/PkToolChatFile-s46esp0O.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-
|
|
8
|
+
import { a as We, i as Ge, n as Ke } from "./_chunks/createChatbotApiClient-Cu1nDV3E.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-
|
|
12
|
+
import { a as Ze, i as Qe, n as $e, r as et } from "./_chunks/useChatbotStore-CPl6KHny.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-
|
|
19
|
-
import { i as bt, n as xt, r as St, t as Ct } from "./_chunks/PkChatbotViewChat-
|
|
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";
|
|
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-
|
|
40
|
-
import { t as rr } from "./_chunks/PkChatbot-
|
|
39
|
+
import { t as nr } from "./_chunks/PkChatbotViewProfile-CANtq-SY.js";
|
|
40
|
+
import { t as rr } from "./_chunks/PkChatbot-CxbPkjhQ.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";
|
package/dist-vue/locales.js
CHANGED
|
@@ -787,6 +787,20 @@ var e = {
|
|
|
787
787
|
pageNavigate: "The agent wants to open “{url}”. Allow it?",
|
|
788
788
|
pageNavigateUnknown: "The agent wants to open “{url}”, which the page does not show. Allow it?"
|
|
789
789
|
},
|
|
790
|
+
chatFilePreview: {
|
|
791
|
+
close: "Close the preview",
|
|
792
|
+
preview: "Preview",
|
|
793
|
+
versionUnpaged: "Version {version}, preview not paginated",
|
|
794
|
+
unpaged: "Preview, not paginated",
|
|
795
|
+
download: "Download",
|
|
796
|
+
revisionsOf: "Tracked changes by {authors}, not accepted yet:",
|
|
797
|
+
removed: "removed",
|
|
798
|
+
added: "added",
|
|
799
|
+
unavailable: "This document has no preview: download it to open it in Word.",
|
|
800
|
+
truncated: "The preview stops here: the rest of the document is in the file to download.",
|
|
801
|
+
revisionBy: "Tracked change by {author}",
|
|
802
|
+
image: "Image"
|
|
803
|
+
},
|
|
790
804
|
confirmTitle: {
|
|
791
805
|
deleteMyConversations: "Delete all your conversations?",
|
|
792
806
|
deleteWordDocument: "Delete this Word document?",
|
|
@@ -1624,6 +1638,20 @@ var e = {
|
|
|
1624
1638
|
pageNavigate: "L'agente vuole aprire «{url}». Consenti?",
|
|
1625
1639
|
pageNavigateUnknown: "L'agente vuole aprire «{url}», che la pagina non mostra. Consenti?"
|
|
1626
1640
|
},
|
|
1641
|
+
chatFilePreview: {
|
|
1642
|
+
close: "Chiudi l'anteprima",
|
|
1643
|
+
preview: "Anteprima",
|
|
1644
|
+
versionUnpaged: "Versione {version}, anteprima non impaginata",
|
|
1645
|
+
unpaged: "Anteprima non impaginata",
|
|
1646
|
+
download: "Scarica",
|
|
1647
|
+
revisionsOf: "Revisioni da accettare di {authors}:",
|
|
1648
|
+
removed: "tolto",
|
|
1649
|
+
added: "aggiunto",
|
|
1650
|
+
unavailable: "L'anteprima di questo documento non è disponibile: scaricalo per aprirlo in Word.",
|
|
1651
|
+
truncated: "L'anteprima si ferma qui: il resto del documento è nel file da scaricare.",
|
|
1652
|
+
revisionBy: "Revisione di {author}",
|
|
1653
|
+
image: "Immagine"
|
|
1654
|
+
},
|
|
1627
1655
|
confirmTitle: {
|
|
1628
1656
|
deleteMyConversations: "Eliminare tutte le vostre conversazioni?",
|
|
1629
1657
|
deleteWordDocument: "Eliminare questo documento Word?",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChatFilePreviewTarget } from './utils';
|
|
1
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
3
|
/**
|
|
3
4
|
* The file a call of `editSpreadsheet`, `editWordDocument`,
|
|
@@ -12,6 +13,8 @@ type __VLS_Props = {
|
|
|
12
13
|
part: unknown;
|
|
13
14
|
/** The authenticated download URL of a file stored in this chat. */
|
|
14
15
|
fileUrl: (storedFileName: string) => string;
|
|
16
|
+
/** Opens the preview of a Word document, where the chat has one. */
|
|
17
|
+
preview?: (file: ChatFilePreviewTarget) => void;
|
|
15
18
|
};
|
|
16
19
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
17
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { WordPreview } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The preview of a Word document stored in the chat (spec
|
|
5
|
+
* `chat-office-files.md`, F6, item 3): the blocks the server read from
|
|
6
|
+
* the document, drawn as text, never as HTML. Tracked changes not
|
|
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`).
|
|
11
|
+
*/
|
|
12
|
+
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;
|
|
22
|
+
};
|
|
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>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WordPreviewRun } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* The runs of a paragraph or a cell of a Word preview, as text: a tracked
|
|
5
|
+
* change struck where words went and underlined where they came, its
|
|
6
|
+
* author said on hover, an image as a placeholder.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
runs: WordPreviewRun[];
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -214,3 +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. */
|
|
218
|
+
export type ChatFilePreviewTarget = {
|
|
219
|
+
storedFileName: string;
|
|
220
|
+
filename: string;
|
|
221
|
+
version?: number;
|
|
222
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentAccess, Chat, ChatWakeupState, DeviceContext, MessageFeedback, AgentPublic, MediaSource, UserFileKind, VoiceSession } from '../../../../models/src';
|
|
1
|
+
import { AgentAccess, Chat, ChatWakeupState, DeviceContext, MessageFeedback, AgentPublic, MediaSource, UserFileKind, VoiceSession, WordPreview } from '../../../../models/src';
|
|
2
2
|
export interface ChatbotApiClientOptions {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
basePath?: string;
|
|
@@ -71,6 +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
76
|
appendAuthToken(url: string): string;
|
|
75
77
|
uploadMedia(agentId: string, chatId: string, file: File): Promise<MediaSource>;
|
|
76
78
|
getChatEndpoint(agentId: string, type?: 'chat' | 'reasoning'): string;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
export declare const WordPreviewRunSchema: z.ZodObject<{
|
|
3
|
+
text: z.ZodString;
|
|
4
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
5
|
+
deleted: "deleted";
|
|
6
|
+
inserted: "inserted";
|
|
7
|
+
}>>;
|
|
8
|
+
author: z.ZodOptional<z.ZodString>;
|
|
9
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
10
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
11
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
12
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const WordPreviewCellSchema: z.ZodObject<{
|
|
15
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
16
|
+
text: z.ZodString;
|
|
17
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
deleted: "deleted";
|
|
19
|
+
inserted: "inserted";
|
|
20
|
+
}>>;
|
|
21
|
+
author: z.ZodOptional<z.ZodString>;
|
|
22
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
23
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
24
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
25
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const WordPreviewBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
kind: z.ZodLiteral<"heading">;
|
|
31
|
+
level: z.ZodNumber;
|
|
32
|
+
label: z.ZodOptional<z.ZodString>;
|
|
33
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
34
|
+
text: z.ZodString;
|
|
35
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
deleted: "deleted";
|
|
37
|
+
inserted: "inserted";
|
|
38
|
+
}>>;
|
|
39
|
+
author: z.ZodOptional<z.ZodString>;
|
|
40
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
41
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
42
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
43
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
kind: z.ZodLiteral<"paragraph">;
|
|
47
|
+
label: z.ZodOptional<z.ZodString>;
|
|
48
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
49
|
+
text: z.ZodString;
|
|
50
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
deleted: "deleted";
|
|
52
|
+
inserted: "inserted";
|
|
53
|
+
}>>;
|
|
54
|
+
author: z.ZodOptional<z.ZodString>;
|
|
55
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
56
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
57
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
58
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
kind: z.ZodLiteral<"table">;
|
|
62
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
63
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
64
|
+
text: z.ZodString;
|
|
65
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
deleted: "deleted";
|
|
67
|
+
inserted: "inserted";
|
|
68
|
+
}>>;
|
|
69
|
+
author: z.ZodOptional<z.ZodString>;
|
|
70
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
71
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
72
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
73
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
77
|
+
}, z.core.$strip>], "kind">;
|
|
78
|
+
export declare const WordPreviewSchema: z.ZodObject<{
|
|
79
|
+
blocks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
80
|
+
kind: z.ZodLiteral<"heading">;
|
|
81
|
+
level: z.ZodNumber;
|
|
82
|
+
label: z.ZodOptional<z.ZodString>;
|
|
83
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
84
|
+
text: z.ZodString;
|
|
85
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
deleted: "deleted";
|
|
87
|
+
inserted: "inserted";
|
|
88
|
+
}>>;
|
|
89
|
+
author: z.ZodOptional<z.ZodString>;
|
|
90
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
91
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
92
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
93
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
kind: z.ZodLiteral<"paragraph">;
|
|
97
|
+
label: z.ZodOptional<z.ZodString>;
|
|
98
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
99
|
+
text: z.ZodString;
|
|
100
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
deleted: "deleted";
|
|
102
|
+
inserted: "inserted";
|
|
103
|
+
}>>;
|
|
104
|
+
author: z.ZodOptional<z.ZodString>;
|
|
105
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
106
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
107
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
108
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
kind: z.ZodLiteral<"table">;
|
|
112
|
+
rows: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
113
|
+
runs: z.ZodArray<z.ZodObject<{
|
|
114
|
+
text: z.ZodString;
|
|
115
|
+
change: z.ZodOptional<z.ZodEnum<{
|
|
116
|
+
deleted: "deleted";
|
|
117
|
+
inserted: "inserted";
|
|
118
|
+
}>>;
|
|
119
|
+
author: z.ZodOptional<z.ZodString>;
|
|
120
|
+
bold: z.ZodOptional<z.ZodLiteral<true>>;
|
|
121
|
+
italic: z.ZodOptional<z.ZodLiteral<true>>;
|
|
122
|
+
underline: z.ZodOptional<z.ZodLiteral<true>>;
|
|
123
|
+
image: z.ZodOptional<z.ZodLiteral<true>>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
span: z.ZodOptional<z.ZodNumber>;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
}, z.core.$strip>], "kind">>;
|
|
128
|
+
truncated: z.ZodBoolean;
|
|
129
|
+
revisionAuthors: z.ZodArray<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export type WordPreviewRun = z.infer<typeof WordPreviewRunSchema>;
|
|
132
|
+
export type WordPreviewCell = z.infer<typeof WordPreviewCellSchema>;
|
|
133
|
+
export type WordPreviewBlock = z.infer<typeof WordPreviewBlockSchema>;
|
|
134
|
+
export type WordPreview = z.infer<typeof WordPreviewSchema>;
|