@8wave/ai-elements 0.125.0-beta.42 → 0.125.0-beta.43
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/Chart-1vt0m6l_.js +87 -0
- package/dist/_chunks/Chart-1vt0m6l_.js.map +1 -0
- package/dist/_chunks/{PkChart-CbtMRGWc.js → PkChart-CYFx_UDq.js} +741 -623
- package/dist/_chunks/PkChart-CYFx_UDq.js.map +1 -0
- package/dist/_chunks/PkFilePreview-yjdtArag.js +1745 -0
- package/dist/_chunks/PkFilePreview-yjdtArag.js.map +1 -0
- package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js → PkFilePreviewDialog-Df0Lt40J.js} +2 -2
- package/dist/_chunks/{PkFilePreviewDialog-bcTkTcYk.js.map → PkFilePreviewDialog-Df0Lt40J.js.map} +1 -1
- package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js → PkImageEditorDialog-PVf3IHGB.js} +2 -2
- package/dist/_chunks/{PkImageEditorDialog-FpbyhV3t.js.map → PkImageEditorDialog-PVf3IHGB.js.map} +1 -1
- package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js → PkSelectionActions-CMyg_x8h.js} +2 -2
- package/dist/_chunks/{PkSelectionActions-BbfVZY0R.js.map → PkSelectionActions-CMyg_x8h.js.map} +1 -1
- package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js → PkStreamingMarkdown-BDXbU2tz.js} +2 -2
- package/dist/_chunks/{PkStreamingMarkdown-COSOOhCg.js.map → PkStreamingMarkdown-BDXbU2tz.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js → PkToolChatFile-CMQdMs-9.js} +3 -3
- package/dist/_chunks/{PkToolChatFile-C_gS0X1j.js.map → PkToolChatFile-CMQdMs-9.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js → PkToolShowArtifact-YrC54qxc.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-fpFtKrZo.js.map → PkToolShowArtifact-YrC54qxc.js.map} +1 -1
- package/dist/_chunks/PkToolShowChart-D3E_xBJv.js +138 -0
- package/dist/_chunks/PkToolShowChart-D3E_xBJv.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js → PkToolShowContactForm-Dio2FNkA.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BAM772bm.js.map → PkToolShowContactForm-Dio2FNkA.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js → PkToolShowForm-w9HGhvCy.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DJcL0bgw.js.map → PkToolShowForm-w9HGhvCy.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js → PkToolShowSources-DXFvFHOo.js} +2 -2
- package/dist/_chunks/{PkToolShowSources-GeWAMHYC.js.map → PkToolShowSources-DXFvFHOo.js.map} +1 -1
- package/dist/_chunks/chartFormat-B1T7y-16.js +27 -0
- package/dist/_chunks/chartFormat-B1T7y-16.js.map +1 -0
- package/dist/_chunks/{excelNumberFormat-BhQjife9.js → excelNumberFormat-CcXF_wJK.js} +101 -88
- package/dist/_chunks/excelNumberFormat-CcXF_wJK.js.map +1 -0
- package/dist/_chunks/{utils-DMvy5QRR.js → utils-BBoaLDYF.js} +14 -14
- package/dist/_chunks/utils-BBoaLDYF.js.map +1 -0
- package/dist/ai-elements.es.js +178 -172
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/_chunks/Chart-DsBNs5rS.js +87 -0
- package/dist-vue/_chunks/Chart-DsBNs5rS.js.map +1 -0
- package/dist-vue/_chunks/{PkChart-D-K7nc0g.js → PkChart-CrZqhEpp.js} +112 -74
- package/dist-vue/_chunks/PkChart-CrZqhEpp.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js → PkChatbot-CxkTubw8.js} +6 -6
- package/dist-vue/_chunks/{PkChatbot-DVQ-Bb7n.js.map → PkChatbot-CxkTubw8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js → PkChatbotEmptyState-CUoHkCgO.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-OlgewA4_.js.map → PkChatbotEmptyState-CUoHkCgO.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js → PkChatbotInput-CPf7wqiQ.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotInput-D_I0Gf_u.js.map → PkChatbotInput-CPf7wqiQ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js → PkChatbotMessages-CLNu2dTm.js} +307 -307
- package/dist-vue/_chunks/{PkChatbotMessages-CAXnEfXK.js.map → PkChatbotMessages-CLNu2dTm.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js → PkChatbotStepPayload-Cf7mJPjL.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-EBri1L10.js.map → PkChatbotStepPayload-Cf7mJPjL.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js → PkChatbotStepToolDetail-D6nwNnHv.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DiQEa0UV.js.map → PkChatbotStepToolDetail-D6nwNnHv.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js → PkChatbotSteps-xkxdaX7O.js} +38 -38
- package/dist-vue/_chunks/{PkChatbotSteps-BgLnv2J1.js.map → PkChatbotSteps-xkxdaX7O.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js → PkChatbotViewChat-BkkyjiFl.js} +22 -22
- package/dist-vue/_chunks/{PkChatbotViewChat-CmjD1IXf.js.map → PkChatbotViewChat-BkkyjiFl.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js → PkChatbotViewConversations-hgqSO1hx.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-CVZH5dXx.js.map → PkChatbotViewConversations-hgqSO1hx.js.map} +1 -1
- package/dist-vue/_chunks/{PkFilePreview-k5gEl3n8.js → PkFilePreview-CmsT6lSP.js} +701 -624
- package/dist-vue/_chunks/PkFilePreview-CmsT6lSP.js.map +1 -0
- package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js → PkFilePreviewDialog-DIiTt9iK.js} +2 -2
- package/dist-vue/_chunks/{PkFilePreviewDialog-DUwZPErE.js.map → PkFilePreviewDialog-DIiTt9iK.js.map} +1 -1
- package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js → PkImageEditorDialog-CE0Y5Pwr.js} +2 -2
- package/dist-vue/_chunks/{PkImageEditorDialog-DQPXePae.js.map → PkImageEditorDialog-CE0Y5Pwr.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js → PkStreamingMarkdown-BBvCtDlO.js} +2 -2
- package/dist-vue/_chunks/{PkStreamingMarkdown-ZasabxE0.js.map → PkStreamingMarkdown-BBvCtDlO.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js → PkToolChatFile-DVhunkPS.js} +3 -3
- package/dist-vue/_chunks/{PkToolChatFile-CD26Q2xp.js.map → PkToolChatFile-DVhunkPS.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js → PkToolShowArtifact-DKOTsP9C.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-BhVd_ZQ8.js.map → PkToolShowArtifact-DKOTsP9C.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowChart-CNBUjDc7.js +133 -0
- package/dist-vue/_chunks/PkToolShowChart-CNBUjDc7.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js → PkToolShowContactForm-D1Ff15Zf.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-CackCDGD.js.map → PkToolShowContactForm-D1Ff15Zf.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js → PkToolShowDiagram-CBwqjy6a.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CABPsFi8.js.map → PkToolShowDiagram-CBwqjy6a.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js → PkToolShowForm-D-rzzwJa.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowForm-BStbk4Iu.js.map → PkToolShowForm-D-rzzwJa.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js → PkToolShowImageGallery-Cre2zSGV.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-BeeHsdTp.js.map → PkToolShowImageGallery-Cre2zSGV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js → PkToolShowProductList-D4FAfMS-.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BfUiap9U.js.map → PkToolShowProductList-D4FAfMS-.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js → PkToolShowSources-BC6YJl-O.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSources-CgEkcyRg.js.map → PkToolShowSources-BC6YJl-O.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js → PkToolShowVideo-CxN7z_cZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CqSRnDNC.js.map → PkToolShowVideo-CxN7z_cZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js → PkToolShowWebPages-0Ux6n8G1.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B-qIS8qY.js.map → PkToolShowWebPages-0Ux6n8G1.js.map} +1 -1
- package/dist-vue/_chunks/chartFormat-B1T7y-16.js +27 -0
- package/dist-vue/_chunks/chartFormat-B1T7y-16.js.map +1 -0
- package/dist-vue/_chunks/{excelNumberFormat-C1sCQrOz.js → excelNumberFormat-BxRi0Y3e.js} +101 -88
- package/dist-vue/_chunks/excelNumberFormat-BxRi0Y3e.js.map +1 -0
- package/dist-vue/_chunks/{utils-KBB6SDPn.js → utils-C9l078yb.js} +10 -10
- package/dist-vue/_chunks/utils-C9l078yb.js.map +1 -0
- package/dist-vue/composables.js +9 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +42 -42
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +6 -0
- package/dist-vue/packages/components/src/chat/PkChart.d.ts +8 -0
- package/dist-vue/packages/components/src/chat/PkFileChart.d.ts +14 -0
- package/dist-vue/packages/components/src/chat/PkWordPreviewRuns.d.ts +4 -1
- package/dist-vue/packages/components/src/chat/useChatFilePreview.d.ts +240 -0
- package/dist-vue/packages/components/src/chat/utils.d.ts +6 -1
- package/dist-vue/packages/models/src/schema/Chart.d.ts +91 -0
- package/dist-vue/packages/models/src/schema/SpreadsheetPreview.d.ts +381 -0
- package/dist-vue/packages/models/src/schema/WordPreview.d.ts +304 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkChart-CbtMRGWc.js.map +0 -1
- package/dist/_chunks/PkFilePreview-DC4iX7Yc.js +0 -1665
- package/dist/_chunks/PkFilePreview-DC4iX7Yc.js.map +0 -1
- package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js +0 -224
- package/dist/_chunks/PkToolShowChart-DZWu3Yuo.js.map +0 -1
- package/dist/_chunks/excelNumberFormat-BhQjife9.js.map +0 -1
- package/dist/_chunks/utils-DMvy5QRR.js.map +0 -1
- package/dist-vue/_chunks/PkChart-D-K7nc0g.js.map +0 -1
- package/dist-vue/_chunks/PkFilePreview-k5gEl3n8.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js +0 -217
- package/dist-vue/_chunks/PkToolShowChart-BQXxaPIO.js.map +0 -1
- package/dist-vue/_chunks/excelNumberFormat-C1sCQrOz.js.map +0 -1
- package/dist-vue/_chunks/utils-KBB6SDPn.js.map +0 -1
package/dist-vue/locales.js
CHANGED
|
@@ -631,6 +631,7 @@ var e = {
|
|
|
631
631
|
eager: "Eager"
|
|
632
632
|
},
|
|
633
633
|
chart: {
|
|
634
|
+
series: "Series {n}",
|
|
634
635
|
showChart: "Chart",
|
|
635
636
|
showTable: "Table",
|
|
636
637
|
copyData: "Copy data",
|
|
@@ -855,6 +856,8 @@ var e = {
|
|
|
855
856
|
chatFilePreview: {
|
|
856
857
|
restore: "Restore this version",
|
|
857
858
|
open: "Open",
|
|
859
|
+
chart: "Chart",
|
|
860
|
+
chartNotDrawn: "The preview does not draw this kind of chart.",
|
|
858
861
|
modeMarkup: "With changes",
|
|
859
862
|
modeAccepted: "Accepted",
|
|
860
863
|
modeOriginal: "Original",
|
|
@@ -1649,6 +1652,7 @@ var e = {
|
|
|
1649
1652
|
eager: "Pronto"
|
|
1650
1653
|
},
|
|
1651
1654
|
chart: {
|
|
1655
|
+
series: "Serie {n}",
|
|
1652
1656
|
showChart: "Grafico",
|
|
1653
1657
|
showTable: "Tabella",
|
|
1654
1658
|
copyData: "Copia dati",
|
|
@@ -1873,6 +1877,8 @@ var e = {
|
|
|
1873
1877
|
chatFilePreview: {
|
|
1874
1878
|
restore: "Ripristina questa versione",
|
|
1875
1879
|
open: "Apri",
|
|
1880
|
+
chart: "Grafico",
|
|
1881
|
+
chartNotDrawn: "L'anteprima non disegna questo tipo di grafico.",
|
|
1876
1882
|
modeMarkup: "Con le revisioni",
|
|
1877
1883
|
modeAccepted: "Accettate",
|
|
1878
1884
|
modeOriginal: "Originale",
|
|
@@ -6,10 +6,18 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
6
6
|
* design system's graphic roles, the tones from its semantic ones. The
|
|
7
7
|
* colors are read inside this element, so in the widget they are the
|
|
8
8
|
* widget's own and not the host page's.
|
|
9
|
+
*
|
|
10
|
+
* On `paper` it draws a chart of a file in the file's viewer (F4): on the
|
|
11
|
+
* white of the sheet or the page in both themes, in Office's grey ink,
|
|
12
|
+
* with the file's `colors` (one per series, or one per slice), its
|
|
13
|
+
* `legend` where the file puts one, and its title inside.
|
|
9
14
|
*/
|
|
10
15
|
type __VLS_Props = {
|
|
11
16
|
chart: Chart;
|
|
12
17
|
isDark?: boolean;
|
|
18
|
+
paper?: boolean;
|
|
19
|
+
colors?: string[];
|
|
20
|
+
legend?: 'top' | 'bottom' | 'left' | 'right';
|
|
13
21
|
};
|
|
14
22
|
declare const __VLS_export: DefineComponent<__VLS_Props, {
|
|
15
23
|
toBlob: () => Promise<Blob | null>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PreviewChart } from '../../../models/src';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* A native chart of an Excel or a Word file in its viewer (spec
|
|
5
|
+
* `chat-charts.md`, F4), at the size its box gives it: drawn on the
|
|
6
|
+
* file's white, in its colors, as Office draws it; a kind the chat does
|
|
7
|
+
* not draw is a placeholder with its title.
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
preview: PreviewChart;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -12,7 +12,10 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
12
12
|
* Word positions it from its paragraph; one positioned on the page is
|
|
13
13
|
* the page's to draw. Without the page (in a cell, or where the text
|
|
14
14
|
* flows) every image sits in the text. An image the preview could not
|
|
15
|
-
* read is a placeholder. A
|
|
15
|
+
* read is a placeholder. A native chart is drawn at its size where an
|
|
16
|
+
* image would be (spec `chat-charts.md`, F4); one Word positions on the
|
|
17
|
+
* page sits in its paragraph. A page number field shows the page's
|
|
18
|
+
* number.
|
|
16
19
|
*/
|
|
17
20
|
type __VLS_Props = {
|
|
18
21
|
runs: WordPreviewRun[];
|
|
@@ -46,6 +46,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
46
46
|
wrap: "behind" | "front" | "around" | "block";
|
|
47
47
|
} | undefined;
|
|
48
48
|
} | undefined;
|
|
49
|
+
chart?: {
|
|
50
|
+
ref: string;
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
anchor?: {
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
xFrom: "page" | "margin";
|
|
57
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
58
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
59
|
+
} | undefined;
|
|
60
|
+
} | undefined;
|
|
49
61
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
50
62
|
label?: true | undefined;
|
|
51
63
|
}[];
|
|
@@ -96,6 +108,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
96
108
|
wrap: "behind" | "front" | "around" | "block";
|
|
97
109
|
} | undefined;
|
|
98
110
|
} | undefined;
|
|
111
|
+
chart?: {
|
|
112
|
+
ref: string;
|
|
113
|
+
width: number;
|
|
114
|
+
height: number;
|
|
115
|
+
anchor?: {
|
|
116
|
+
x: number;
|
|
117
|
+
y: number;
|
|
118
|
+
xFrom: "page" | "margin";
|
|
119
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
120
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
121
|
+
} | undefined;
|
|
122
|
+
} | undefined;
|
|
99
123
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
100
124
|
label?: true | undefined;
|
|
101
125
|
}[];
|
|
@@ -147,6 +171,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
147
171
|
wrap: "behind" | "front" | "around" | "block";
|
|
148
172
|
} | undefined;
|
|
149
173
|
} | undefined;
|
|
174
|
+
chart?: {
|
|
175
|
+
ref: string;
|
|
176
|
+
width: number;
|
|
177
|
+
height: number;
|
|
178
|
+
anchor?: {
|
|
179
|
+
x: number;
|
|
180
|
+
y: number;
|
|
181
|
+
xFrom: "page" | "margin";
|
|
182
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
183
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
184
|
+
} | undefined;
|
|
185
|
+
} | undefined;
|
|
150
186
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
151
187
|
label?: true | undefined;
|
|
152
188
|
}[];
|
|
@@ -235,6 +271,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
235
271
|
wrap: "behind" | "front" | "around" | "block";
|
|
236
272
|
} | undefined;
|
|
237
273
|
} | undefined;
|
|
274
|
+
chart?: {
|
|
275
|
+
ref: string;
|
|
276
|
+
width: number;
|
|
277
|
+
height: number;
|
|
278
|
+
anchor?: {
|
|
279
|
+
x: number;
|
|
280
|
+
y: number;
|
|
281
|
+
xFrom: "page" | "margin";
|
|
282
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
283
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
284
|
+
} | undefined;
|
|
285
|
+
} | undefined;
|
|
238
286
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
239
287
|
label?: true | undefined;
|
|
240
288
|
}[];
|
|
@@ -285,6 +333,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
285
333
|
wrap: "behind" | "front" | "around" | "block";
|
|
286
334
|
} | undefined;
|
|
287
335
|
} | undefined;
|
|
336
|
+
chart?: {
|
|
337
|
+
ref: string;
|
|
338
|
+
width: number;
|
|
339
|
+
height: number;
|
|
340
|
+
anchor?: {
|
|
341
|
+
x: number;
|
|
342
|
+
y: number;
|
|
343
|
+
xFrom: "page" | "margin";
|
|
344
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
345
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
346
|
+
} | undefined;
|
|
347
|
+
} | undefined;
|
|
288
348
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
289
349
|
label?: true | undefined;
|
|
290
350
|
}[];
|
|
@@ -336,6 +396,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
336
396
|
wrap: "behind" | "front" | "around" | "block";
|
|
337
397
|
} | undefined;
|
|
338
398
|
} | undefined;
|
|
399
|
+
chart?: {
|
|
400
|
+
ref: string;
|
|
401
|
+
width: number;
|
|
402
|
+
height: number;
|
|
403
|
+
anchor?: {
|
|
404
|
+
x: number;
|
|
405
|
+
y: number;
|
|
406
|
+
xFrom: "page" | "margin";
|
|
407
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
408
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
409
|
+
} | undefined;
|
|
410
|
+
} | undefined;
|
|
339
411
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
340
412
|
label?: true | undefined;
|
|
341
413
|
}[];
|
|
@@ -353,6 +425,26 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
353
425
|
})[]> | undefined;
|
|
354
426
|
evenAndOddHeaders?: true | undefined;
|
|
355
427
|
images?: Record<string, string> | undefined;
|
|
428
|
+
charts?: Record<string, {
|
|
429
|
+
chart?: {
|
|
430
|
+
type: "line" | "bar" | "pie" | "doughnut";
|
|
431
|
+
categories: string[];
|
|
432
|
+
series: {
|
|
433
|
+
name: string;
|
|
434
|
+
values: (number | null)[];
|
|
435
|
+
tone?: "warning" | "positive" | "negative" | "critical" | "neutral" | undefined;
|
|
436
|
+
}[];
|
|
437
|
+
title?: string | undefined;
|
|
438
|
+
horizontal?: boolean | undefined;
|
|
439
|
+
stacked?: boolean | undefined;
|
|
440
|
+
valueLabel?: string | undefined;
|
|
441
|
+
categoryLabel?: string | undefined;
|
|
442
|
+
format?: "number" | "percent" | "currency" | undefined;
|
|
443
|
+
} | undefined;
|
|
444
|
+
colors?: string[] | undefined;
|
|
445
|
+
legend?: "left" | "right" | "top" | "bottom" | undefined;
|
|
446
|
+
title?: string | undefined;
|
|
447
|
+
}> | undefined;
|
|
356
448
|
} | {
|
|
357
449
|
kind: "spreadsheet";
|
|
358
450
|
sheets: {
|
|
@@ -394,6 +486,34 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
394
486
|
rows: number;
|
|
395
487
|
cols: number;
|
|
396
488
|
} | undefined;
|
|
489
|
+
charts?: {
|
|
490
|
+
col: number;
|
|
491
|
+
row: number;
|
|
492
|
+
x: number;
|
|
493
|
+
y: number;
|
|
494
|
+
width: number;
|
|
495
|
+
height: number;
|
|
496
|
+
lastCol: number;
|
|
497
|
+
lastRow: number;
|
|
498
|
+
chart?: {
|
|
499
|
+
type: "line" | "bar" | "pie" | "doughnut";
|
|
500
|
+
categories: string[];
|
|
501
|
+
series: {
|
|
502
|
+
name: string;
|
|
503
|
+
values: (number | null)[];
|
|
504
|
+
tone?: "warning" | "positive" | "negative" | "critical" | "neutral" | undefined;
|
|
505
|
+
}[];
|
|
506
|
+
title?: string | undefined;
|
|
507
|
+
horizontal?: boolean | undefined;
|
|
508
|
+
stacked?: boolean | undefined;
|
|
509
|
+
valueLabel?: string | undefined;
|
|
510
|
+
categoryLabel?: string | undefined;
|
|
511
|
+
format?: "number" | "percent" | "currency" | undefined;
|
|
512
|
+
} | undefined;
|
|
513
|
+
colors?: string[] | undefined;
|
|
514
|
+
legend?: "left" | "right" | "top" | "bottom" | undefined;
|
|
515
|
+
title?: string | undefined;
|
|
516
|
+
}[] | undefined;
|
|
397
517
|
}[];
|
|
398
518
|
styles: {
|
|
399
519
|
bold?: true | undefined;
|
|
@@ -462,6 +582,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
462
582
|
wrap: "behind" | "front" | "around" | "block";
|
|
463
583
|
} | undefined;
|
|
464
584
|
} | undefined;
|
|
585
|
+
chart?: {
|
|
586
|
+
ref: string;
|
|
587
|
+
width: number;
|
|
588
|
+
height: number;
|
|
589
|
+
anchor?: {
|
|
590
|
+
x: number;
|
|
591
|
+
y: number;
|
|
592
|
+
xFrom: "page" | "margin";
|
|
593
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
594
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
595
|
+
} | undefined;
|
|
596
|
+
} | undefined;
|
|
465
597
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
466
598
|
label?: true | undefined;
|
|
467
599
|
}[];
|
|
@@ -512,6 +644,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
512
644
|
wrap: "behind" | "front" | "around" | "block";
|
|
513
645
|
} | undefined;
|
|
514
646
|
} | undefined;
|
|
647
|
+
chart?: {
|
|
648
|
+
ref: string;
|
|
649
|
+
width: number;
|
|
650
|
+
height: number;
|
|
651
|
+
anchor?: {
|
|
652
|
+
x: number;
|
|
653
|
+
y: number;
|
|
654
|
+
xFrom: "page" | "margin";
|
|
655
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
656
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
657
|
+
} | undefined;
|
|
658
|
+
} | undefined;
|
|
515
659
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
516
660
|
label?: true | undefined;
|
|
517
661
|
}[];
|
|
@@ -563,6 +707,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
563
707
|
wrap: "behind" | "front" | "around" | "block";
|
|
564
708
|
} | undefined;
|
|
565
709
|
} | undefined;
|
|
710
|
+
chart?: {
|
|
711
|
+
ref: string;
|
|
712
|
+
width: number;
|
|
713
|
+
height: number;
|
|
714
|
+
anchor?: {
|
|
715
|
+
x: number;
|
|
716
|
+
y: number;
|
|
717
|
+
xFrom: "page" | "margin";
|
|
718
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
719
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
720
|
+
} | undefined;
|
|
721
|
+
} | undefined;
|
|
566
722
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
567
723
|
label?: true | undefined;
|
|
568
724
|
}[];
|
|
@@ -651,6 +807,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
651
807
|
wrap: "behind" | "front" | "around" | "block";
|
|
652
808
|
} | undefined;
|
|
653
809
|
} | undefined;
|
|
810
|
+
chart?: {
|
|
811
|
+
ref: string;
|
|
812
|
+
width: number;
|
|
813
|
+
height: number;
|
|
814
|
+
anchor?: {
|
|
815
|
+
x: number;
|
|
816
|
+
y: number;
|
|
817
|
+
xFrom: "page" | "margin";
|
|
818
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
819
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
820
|
+
} | undefined;
|
|
821
|
+
} | undefined;
|
|
654
822
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
655
823
|
label?: true | undefined;
|
|
656
824
|
}[];
|
|
@@ -701,6 +869,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
701
869
|
wrap: "behind" | "front" | "around" | "block";
|
|
702
870
|
} | undefined;
|
|
703
871
|
} | undefined;
|
|
872
|
+
chart?: {
|
|
873
|
+
ref: string;
|
|
874
|
+
width: number;
|
|
875
|
+
height: number;
|
|
876
|
+
anchor?: {
|
|
877
|
+
x: number;
|
|
878
|
+
y: number;
|
|
879
|
+
xFrom: "page" | "margin";
|
|
880
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
881
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
882
|
+
} | undefined;
|
|
883
|
+
} | undefined;
|
|
704
884
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
705
885
|
label?: true | undefined;
|
|
706
886
|
}[];
|
|
@@ -752,6 +932,18 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
752
932
|
wrap: "behind" | "front" | "around" | "block";
|
|
753
933
|
} | undefined;
|
|
754
934
|
} | undefined;
|
|
935
|
+
chart?: {
|
|
936
|
+
ref: string;
|
|
937
|
+
width: number;
|
|
938
|
+
height: number;
|
|
939
|
+
anchor?: {
|
|
940
|
+
x: number;
|
|
941
|
+
y: number;
|
|
942
|
+
xFrom: "page" | "margin";
|
|
943
|
+
yFrom: "page" | "paragraph" | "margin";
|
|
944
|
+
wrap: "behind" | "front" | "around" | "block";
|
|
945
|
+
} | undefined;
|
|
946
|
+
} | undefined;
|
|
755
947
|
field?: "page" | "pages" | "sectionPages" | undefined;
|
|
756
948
|
label?: true | undefined;
|
|
757
949
|
}[];
|
|
@@ -769,6 +961,26 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
769
961
|
})[]> | undefined;
|
|
770
962
|
evenAndOddHeaders?: true | undefined;
|
|
771
963
|
images?: Record<string, string> | undefined;
|
|
964
|
+
charts?: Record<string, {
|
|
965
|
+
chart?: {
|
|
966
|
+
type: "line" | "bar" | "pie" | "doughnut";
|
|
967
|
+
categories: string[];
|
|
968
|
+
series: {
|
|
969
|
+
name: string;
|
|
970
|
+
values: (number | null)[];
|
|
971
|
+
tone?: "warning" | "positive" | "negative" | "critical" | "neutral" | undefined;
|
|
972
|
+
}[];
|
|
973
|
+
title?: string | undefined;
|
|
974
|
+
horizontal?: boolean | undefined;
|
|
975
|
+
stacked?: boolean | undefined;
|
|
976
|
+
valueLabel?: string | undefined;
|
|
977
|
+
categoryLabel?: string | undefined;
|
|
978
|
+
format?: "number" | "percent" | "currency" | undefined;
|
|
979
|
+
} | undefined;
|
|
980
|
+
colors?: string[] | undefined;
|
|
981
|
+
legend?: "left" | "right" | "top" | "bottom" | undefined;
|
|
982
|
+
title?: string | undefined;
|
|
983
|
+
}> | undefined;
|
|
772
984
|
} | {
|
|
773
985
|
kind: "spreadsheet";
|
|
774
986
|
sheets: {
|
|
@@ -810,6 +1022,34 @@ export declare function useChatFilePreview(read: (storedFileName: string) => Pro
|
|
|
810
1022
|
rows: number;
|
|
811
1023
|
cols: number;
|
|
812
1024
|
} | undefined;
|
|
1025
|
+
charts?: {
|
|
1026
|
+
col: number;
|
|
1027
|
+
row: number;
|
|
1028
|
+
x: number;
|
|
1029
|
+
y: number;
|
|
1030
|
+
width: number;
|
|
1031
|
+
height: number;
|
|
1032
|
+
lastCol: number;
|
|
1033
|
+
lastRow: number;
|
|
1034
|
+
chart?: {
|
|
1035
|
+
type: "line" | "bar" | "pie" | "doughnut";
|
|
1036
|
+
categories: string[];
|
|
1037
|
+
series: {
|
|
1038
|
+
name: string;
|
|
1039
|
+
values: (number | null)[];
|
|
1040
|
+
tone?: "warning" | "positive" | "negative" | "critical" | "neutral" | undefined;
|
|
1041
|
+
}[];
|
|
1042
|
+
title?: string | undefined;
|
|
1043
|
+
horizontal?: boolean | undefined;
|
|
1044
|
+
stacked?: boolean | undefined;
|
|
1045
|
+
valueLabel?: string | undefined;
|
|
1046
|
+
categoryLabel?: string | undefined;
|
|
1047
|
+
format?: "number" | "percent" | "currency" | undefined;
|
|
1048
|
+
} | undefined;
|
|
1049
|
+
colors?: string[] | undefined;
|
|
1050
|
+
legend?: "left" | "right" | "top" | "bottom" | undefined;
|
|
1051
|
+
title?: string | undefined;
|
|
1052
|
+
}[] | undefined;
|
|
813
1053
|
}[];
|
|
814
1054
|
styles: {
|
|
815
1055
|
bold?: true | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIMessage } from 'ai';
|
|
2
2
|
import { CSSProperties, InjectionKey, Ref } from 'vue';
|
|
3
|
-
import { WordPreviewBlock, WordPreviewPage, WordPreviewPicture, WordPreviewRun } from '../../../models/src';
|
|
3
|
+
import { PreviewChart, WordPreviewBlock, WordPreviewPage, WordPreviewPicture, WordPreviewRun } from '../../../models/src';
|
|
4
4
|
import { isTextPart, isFilePart, isToolPart, isReasoningPart, hasPartText, hasTextPart, getTextPart, getMessageText } from 'utils';
|
|
5
5
|
export { isTextPart, isFilePart, isToolPart, isReasoningPart, hasPartText, hasTextPart, getTextPart, getMessageText, };
|
|
6
6
|
/**
|
|
@@ -286,6 +286,11 @@ export declare const wordFontStack: (font: string) => string;
|
|
|
286
286
|
* runs draw (`PkWordPreview` provides them).
|
|
287
287
|
*/
|
|
288
288
|
export declare const WORD_PREVIEW_IMAGES: InjectionKey<Ref<Record<string, string> | undefined>>;
|
|
289
|
+
/**
|
|
290
|
+
* The native charts of the Word document in the viewer, by reference, which
|
|
291
|
+
* its runs draw (`PkWordPreview` provides them; spec `chat-charts.md`, F4).
|
|
292
|
+
*/
|
|
293
|
+
export declare const WORD_PREVIEW_CHARTS: InjectionKey<Ref<Record<string, PreviewChart> | undefined>>;
|
|
289
294
|
/**
|
|
290
295
|
* The image a run draws, only a WebP the server wrote: anything else in the
|
|
291
296
|
* map is not drawn.
|
|
@@ -145,3 +145,94 @@ export declare const ShowChartInputSchema: z.ZodObject<{
|
|
|
145
145
|
caption: z.ZodOptional<z.ZodString>;
|
|
146
146
|
}, z.core.$strip>;
|
|
147
147
|
export type ShowChartInput = z.infer<typeof ShowChartInputSchema>;
|
|
148
|
+
/**
|
|
149
|
+
* A chart read from an Excel or a Word file holds as many points as the file
|
|
150
|
+
* does: a year of days is a line chart. Past these the viewer leaves it
|
|
151
|
+
* undrawn.
|
|
152
|
+
*/
|
|
153
|
+
export declare const FILE_CHART_LIMITS: {
|
|
154
|
+
readonly maxCategories: 500;
|
|
155
|
+
readonly maxSeries: 24;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* The chart the viewer draws from a file (spec `chat-charts.md`, F4): the
|
|
159
|
+
* fields of {@link ChartFieldsSchema}, as many points as
|
|
160
|
+
* {@link FILE_CHART_LIMITS} allows, and a series the file leaves unnamed.
|
|
161
|
+
*/
|
|
162
|
+
export declare const FileChartSchema: z.ZodObject<{
|
|
163
|
+
type: z.ZodEnum<{
|
|
164
|
+
line: "line";
|
|
165
|
+
bar: "bar";
|
|
166
|
+
pie: "pie";
|
|
167
|
+
doughnut: "doughnut";
|
|
168
|
+
}>;
|
|
169
|
+
title: z.ZodOptional<z.ZodString>;
|
|
170
|
+
horizontal: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
stacked: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
valueLabel: z.ZodOptional<z.ZodString>;
|
|
173
|
+
categoryLabel: z.ZodOptional<z.ZodString>;
|
|
174
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
175
|
+
number: "number";
|
|
176
|
+
percent: "percent";
|
|
177
|
+
currency: "currency";
|
|
178
|
+
}>>;
|
|
179
|
+
categories: z.ZodArray<z.ZodString>;
|
|
180
|
+
series: z.ZodArray<z.ZodObject<{
|
|
181
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
182
|
+
warning: "warning";
|
|
183
|
+
positive: "positive";
|
|
184
|
+
negative: "negative";
|
|
185
|
+
critical: "critical";
|
|
186
|
+
neutral: "neutral";
|
|
187
|
+
}>>;
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
values: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
export type FileChart = z.infer<typeof FileChartSchema>;
|
|
193
|
+
/**
|
|
194
|
+
* A chart of a file in the viewer: drawn with the file's colors and legend,
|
|
195
|
+
* or, for a kind the chat cannot draw (area, scatter, a combination), a
|
|
196
|
+
* placeholder named by its title.
|
|
197
|
+
*/
|
|
198
|
+
export declare const PreviewChartSchema: z.ZodObject<{
|
|
199
|
+
chart: z.ZodOptional<z.ZodObject<{
|
|
200
|
+
type: z.ZodEnum<{
|
|
201
|
+
line: "line";
|
|
202
|
+
bar: "bar";
|
|
203
|
+
pie: "pie";
|
|
204
|
+
doughnut: "doughnut";
|
|
205
|
+
}>;
|
|
206
|
+
title: z.ZodOptional<z.ZodString>;
|
|
207
|
+
horizontal: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
stacked: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
valueLabel: z.ZodOptional<z.ZodString>;
|
|
210
|
+
categoryLabel: z.ZodOptional<z.ZodString>;
|
|
211
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
212
|
+
number: "number";
|
|
213
|
+
percent: "percent";
|
|
214
|
+
currency: "currency";
|
|
215
|
+
}>>;
|
|
216
|
+
categories: z.ZodArray<z.ZodString>;
|
|
217
|
+
series: z.ZodArray<z.ZodObject<{
|
|
218
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
219
|
+
warning: "warning";
|
|
220
|
+
positive: "positive";
|
|
221
|
+
negative: "negative";
|
|
222
|
+
critical: "critical";
|
|
223
|
+
neutral: "neutral";
|
|
224
|
+
}>>;
|
|
225
|
+
name: z.ZodString;
|
|
226
|
+
values: z.ZodArray<z.ZodNullable<z.ZodNumber>>;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
}, z.core.$strip>>;
|
|
229
|
+
colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
230
|
+
legend: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
left: "left";
|
|
232
|
+
right: "right";
|
|
233
|
+
top: "top";
|
|
234
|
+
bottom: "bottom";
|
|
235
|
+
}>>;
|
|
236
|
+
title: z.ZodOptional<z.ZodString>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
export type PreviewChart = z.infer<typeof PreviewChartSchema>;
|