@yudaocode/univer-slides 0.0.0-stage → 1.6.218
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/LICENSE +190 -0
- package/README.md +35 -2
- package/lib/cjs/facade/index.js +390 -0
- package/lib/cjs/facade/index.js.map +1 -0
- package/lib/cjs/index.js +6838 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/es/facade/index.js +390 -0
- package/lib/es/facade/index.js.map +1 -0
- package/lib/es/index.js +6788 -0
- package/lib/es/index.js.map +1 -0
- package/lib/types/facade/index.d.ts +116 -0
- package/lib/types/index.d.ts +803 -0
- package/package.json +61 -3
|
@@ -0,0 +1,803 @@
|
|
|
1
|
+
import * as _univerjs_core from '@univerjs/core';
|
|
2
|
+
import { UnitModel, UniverInstanceType, Disposable, IMutation, ICommand, Plugin, Injector, IUniverInstanceService, ICommandService } from '@univerjs/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
declare const UNIVER_SLIDE_SCHEMA: "univer.slide.v1";
|
|
6
|
+
declare const UNIVER_SLIDE_SCHEMA_VERSION: 1;
|
|
7
|
+
type SlideSizePreset = '16:9' | '4:3' | 'A4' | 'custom';
|
|
8
|
+
interface ISlideSize {
|
|
9
|
+
preset: SlideSizePreset;
|
|
10
|
+
widthPt: number;
|
|
11
|
+
heightPt: number;
|
|
12
|
+
}
|
|
13
|
+
declare const SLIDE_SIZE_PRESETS: Record<Exclude<SlideSizePreset, 'custom'>, ISlideSize>;
|
|
14
|
+
interface ISlideThemeColors {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
accent1: string;
|
|
18
|
+
accent2: string;
|
|
19
|
+
accent3: string;
|
|
20
|
+
accent4: string;
|
|
21
|
+
accent5: string;
|
|
22
|
+
accent6: string;
|
|
23
|
+
background: string;
|
|
24
|
+
text: string;
|
|
25
|
+
}
|
|
26
|
+
interface ISlideTheme {
|
|
27
|
+
name: string;
|
|
28
|
+
colors: ISlideThemeColors;
|
|
29
|
+
majorFont: string;
|
|
30
|
+
minorFont: string;
|
|
31
|
+
}
|
|
32
|
+
declare const SLIDE_THEME_PRESETS: ISlideTheme[];
|
|
33
|
+
type SlideLayoutType = 'title' | 'titleAndContent' | 'sectionHeader' | 'twoColumn' | 'comparison' | 'blank';
|
|
34
|
+
type SlidePlaceholderRole = 'title' | 'subtitle' | 'body' | 'leftColumn' | 'rightColumn' | 'leftHeader' | 'rightHeader' | 'caption';
|
|
35
|
+
interface ISlidePlaceholderSlot {
|
|
36
|
+
id: string;
|
|
37
|
+
role: SlidePlaceholderRole;
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
defaultText?: string;
|
|
43
|
+
fontSize?: number;
|
|
44
|
+
bold?: boolean;
|
|
45
|
+
align?: 'left' | 'center' | 'right';
|
|
46
|
+
}
|
|
47
|
+
interface ISlideBackground {
|
|
48
|
+
type: 'solid' | 'gradient' | 'image';
|
|
49
|
+
color?: string;
|
|
50
|
+
gradientFrom?: string;
|
|
51
|
+
gradientTo?: string;
|
|
52
|
+
gradientAngleDeg?: number;
|
|
53
|
+
imageSrc?: string;
|
|
54
|
+
imageOpacity?: number;
|
|
55
|
+
}
|
|
56
|
+
interface ISlideMaster {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
background?: ISlideBackground;
|
|
60
|
+
accentBar?: boolean;
|
|
61
|
+
footerText?: string;
|
|
62
|
+
}
|
|
63
|
+
interface ISlideLayout {
|
|
64
|
+
id: string;
|
|
65
|
+
masterId: string;
|
|
66
|
+
type: SlideLayoutType;
|
|
67
|
+
name: string;
|
|
68
|
+
placeholders: ISlidePlaceholderSlot[];
|
|
69
|
+
}
|
|
70
|
+
interface ISlideSection {
|
|
71
|
+
id: string;
|
|
72
|
+
title: string;
|
|
73
|
+
slideIds: string[];
|
|
74
|
+
collapsed?: boolean;
|
|
75
|
+
}
|
|
76
|
+
type SlideTransitionType = 'none' | 'fade' | 'push' | 'wipe' | 'split' | 'zoom' | 'morph';
|
|
77
|
+
type SlideDirection = 'left' | 'right' | 'up' | 'down';
|
|
78
|
+
interface ISlideTransition {
|
|
79
|
+
type: SlideTransitionType;
|
|
80
|
+
direction?: SlideDirection;
|
|
81
|
+
durationMs?: number;
|
|
82
|
+
advanceAfterMs?: number;
|
|
83
|
+
}
|
|
84
|
+
type SlideAnimationCategory = 'entrance' | 'emphasis' | 'exit';
|
|
85
|
+
type SlideAnimationEffect = 'appear' | 'fadeIn' | 'flyIn' | 'zoomIn' | 'wipe' | 'pulse' | 'fadeOut';
|
|
86
|
+
type SlideAnimationTrigger = 'onClick' | 'withPrevious' | 'afterPrevious';
|
|
87
|
+
interface ISlideAnimation {
|
|
88
|
+
id: string;
|
|
89
|
+
elementId: string;
|
|
90
|
+
category: SlideAnimationCategory;
|
|
91
|
+
effect: SlideAnimationEffect;
|
|
92
|
+
trigger: SlideAnimationTrigger;
|
|
93
|
+
durationMs: number;
|
|
94
|
+
delayMs: number;
|
|
95
|
+
direction?: SlideDirection;
|
|
96
|
+
}
|
|
97
|
+
type SlideElementType = 'text' | 'shape' | 'connector' | 'image' | 'svg' | 'table' | 'chart' | 'smartArt' | 'codeBlock' | 'sheetEmbed';
|
|
98
|
+
interface ISlideElementBase {
|
|
99
|
+
id: string;
|
|
100
|
+
type: SlideElementType;
|
|
101
|
+
name?: string;
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
width: number;
|
|
105
|
+
height: number;
|
|
106
|
+
rotation?: number;
|
|
107
|
+
opacity?: number;
|
|
108
|
+
locked?: boolean;
|
|
109
|
+
hidden?: boolean;
|
|
110
|
+
placeholderRole?: SlidePlaceholderRole;
|
|
111
|
+
datasetBinding?: string;
|
|
112
|
+
}
|
|
113
|
+
interface ISlideTextRun {
|
|
114
|
+
text: string;
|
|
115
|
+
fontFamily?: string;
|
|
116
|
+
fontSize?: number;
|
|
117
|
+
bold?: boolean;
|
|
118
|
+
italic?: boolean;
|
|
119
|
+
underline?: boolean;
|
|
120
|
+
strikethrough?: boolean;
|
|
121
|
+
color?: string;
|
|
122
|
+
highlightColor?: string;
|
|
123
|
+
}
|
|
124
|
+
interface ISlideParagraph {
|
|
125
|
+
runs: ISlideTextRun[];
|
|
126
|
+
bullet?: boolean | 'disc' | 'number' | 'square';
|
|
127
|
+
level?: number;
|
|
128
|
+
align?: 'left' | 'center' | 'right' | 'justify';
|
|
129
|
+
lineHeight?: number;
|
|
130
|
+
spaceAfterPt?: number;
|
|
131
|
+
}
|
|
132
|
+
interface ISlideWordArtStyle {
|
|
133
|
+
enabled: boolean;
|
|
134
|
+
gradientFrom: string;
|
|
135
|
+
gradientTo: string;
|
|
136
|
+
gradientAngleDeg?: number;
|
|
137
|
+
strokeColor?: string;
|
|
138
|
+
strokeWidth?: number;
|
|
139
|
+
shadowColor?: string;
|
|
140
|
+
shadowBlur?: number;
|
|
141
|
+
shadowOffsetX?: number;
|
|
142
|
+
shadowOffsetY?: number;
|
|
143
|
+
}
|
|
144
|
+
interface ISlideTextElement extends ISlideElementBase {
|
|
145
|
+
type: 'text';
|
|
146
|
+
text: string;
|
|
147
|
+
paragraphs?: ISlideParagraph[];
|
|
148
|
+
fontFamily?: string;
|
|
149
|
+
fontSize?: number;
|
|
150
|
+
fontWeight?: 'normal' | 'bold' | number;
|
|
151
|
+
italic?: boolean;
|
|
152
|
+
underline?: boolean;
|
|
153
|
+
color?: string;
|
|
154
|
+
align?: 'left' | 'center' | 'right' | 'justify';
|
|
155
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
156
|
+
bullet?: boolean | 'disc' | 'number' | 'square';
|
|
157
|
+
lineHeight?: number;
|
|
158
|
+
fillColor?: string;
|
|
159
|
+
strokeColor?: string;
|
|
160
|
+
strokeWidth?: number;
|
|
161
|
+
borderRadius?: number;
|
|
162
|
+
paddingPt?: number;
|
|
163
|
+
wordArt?: ISlideWordArtStyle;
|
|
164
|
+
}
|
|
165
|
+
type SlideShapeKind = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'diamond' | 'parallelogram' | 'pentagon' | 'hexagon' | 'octagon' | 'star5' | 'rightArrow' | 'leftArrow' | 'chevron' | 'callout' | 'cloud' | 'plus';
|
|
166
|
+
interface ISlideShapeElement extends ISlideElementBase {
|
|
167
|
+
type: 'shape';
|
|
168
|
+
shapeType: SlideShapeKind;
|
|
169
|
+
fillColor: string;
|
|
170
|
+
gradientFrom?: string;
|
|
171
|
+
gradientTo?: string;
|
|
172
|
+
strokeColor: string;
|
|
173
|
+
strokeWidth: number;
|
|
174
|
+
strokeDash?: 'solid' | 'dashed' | 'dotted';
|
|
175
|
+
cornerRadius?: number;
|
|
176
|
+
text?: string;
|
|
177
|
+
textColor?: string;
|
|
178
|
+
fontSize?: number;
|
|
179
|
+
fontWeight?: 'normal' | 'bold';
|
|
180
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
181
|
+
}
|
|
182
|
+
type SlideConnectorKind = 'straight' | 'elbow' | 'curved';
|
|
183
|
+
interface ISlideConnectorElement extends ISlideElementBase {
|
|
184
|
+
type: 'connector';
|
|
185
|
+
connectorType: SlideConnectorKind;
|
|
186
|
+
fromElementId?: string;
|
|
187
|
+
toElementId?: string;
|
|
188
|
+
startX?: number;
|
|
189
|
+
startY?: number;
|
|
190
|
+
endX?: number;
|
|
191
|
+
endY?: number;
|
|
192
|
+
startArrow?: boolean;
|
|
193
|
+
endArrow?: boolean;
|
|
194
|
+
strokeColor: string;
|
|
195
|
+
strokeWidth: number;
|
|
196
|
+
strokeDash?: 'solid' | 'dashed' | 'dotted';
|
|
197
|
+
label?: string;
|
|
198
|
+
labelColor?: string;
|
|
199
|
+
}
|
|
200
|
+
interface ISlideImageCrop {
|
|
201
|
+
top: number;
|
|
202
|
+
right: number;
|
|
203
|
+
bottom: number;
|
|
204
|
+
left: number;
|
|
205
|
+
}
|
|
206
|
+
interface ISlideImageElement extends ISlideElementBase {
|
|
207
|
+
type: 'image' | 'svg';
|
|
208
|
+
src: string;
|
|
209
|
+
svgContent?: string;
|
|
210
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
211
|
+
crop?: ISlideImageCrop;
|
|
212
|
+
borderRadius?: number;
|
|
213
|
+
altText?: string;
|
|
214
|
+
}
|
|
215
|
+
interface ISlideTableCell {
|
|
216
|
+
text: string;
|
|
217
|
+
bold?: boolean;
|
|
218
|
+
italic?: boolean;
|
|
219
|
+
color?: string;
|
|
220
|
+
bg?: string;
|
|
221
|
+
fontSize?: number;
|
|
222
|
+
align?: 'left' | 'center' | 'right';
|
|
223
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
224
|
+
rowSpan?: number;
|
|
225
|
+
colSpan?: number;
|
|
226
|
+
mergedInto?: {
|
|
227
|
+
r: number;
|
|
228
|
+
c: number;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
interface ISlideTableElement extends ISlideElementBase {
|
|
232
|
+
type: 'table';
|
|
233
|
+
rows: number;
|
|
234
|
+
cols: number;
|
|
235
|
+
colWidths: number[];
|
|
236
|
+
rowHeights: number[];
|
|
237
|
+
cells: ISlideTableCell[][];
|
|
238
|
+
headerRow?: boolean;
|
|
239
|
+
headerBg?: string;
|
|
240
|
+
headerColor?: string;
|
|
241
|
+
borderColor?: string;
|
|
242
|
+
zebraBg?: string;
|
|
243
|
+
datasetLoopCode?: string;
|
|
244
|
+
}
|
|
245
|
+
type SlideChartType = 'bar' | 'column' | 'line' | 'pie' | 'doughnut' | 'area' | 'radar' | 'scatter' | 'combo';
|
|
246
|
+
interface ISlideChartSeries {
|
|
247
|
+
name: string;
|
|
248
|
+
values: number[];
|
|
249
|
+
color?: string;
|
|
250
|
+
seriesType?: 'column' | 'line';
|
|
251
|
+
}
|
|
252
|
+
interface ISlideChartValueFieldBinding {
|
|
253
|
+
field: string;
|
|
254
|
+
name?: string;
|
|
255
|
+
color?: string;
|
|
256
|
+
seriesType?: 'column' | 'line';
|
|
257
|
+
}
|
|
258
|
+
interface ISlideChartElement extends ISlideElementBase {
|
|
259
|
+
type: 'chart';
|
|
260
|
+
chartType: SlideChartType;
|
|
261
|
+
title?: string;
|
|
262
|
+
categories: string[];
|
|
263
|
+
series: ISlideChartSeries[];
|
|
264
|
+
colors?: string[];
|
|
265
|
+
showLegend?: boolean;
|
|
266
|
+
showGrid?: boolean;
|
|
267
|
+
showValues?: boolean;
|
|
268
|
+
datasetCode?: string;
|
|
269
|
+
categoryField?: string;
|
|
270
|
+
valueFields?: ISlideChartValueFieldBinding[];
|
|
271
|
+
}
|
|
272
|
+
type SlideSmartArtLayout = 'process' | 'cycle' | 'hierarchy' | 'list' | 'pyramid';
|
|
273
|
+
interface ISlideSmartArtItem {
|
|
274
|
+
id: string;
|
|
275
|
+
title: string;
|
|
276
|
+
subtitle?: string;
|
|
277
|
+
color?: string;
|
|
278
|
+
children?: ISlideSmartArtItem[];
|
|
279
|
+
}
|
|
280
|
+
interface ISlideSmartArtElement extends ISlideElementBase {
|
|
281
|
+
type: 'smartArt';
|
|
282
|
+
layout: SlideSmartArtLayout;
|
|
283
|
+
items: ISlideSmartArtItem[];
|
|
284
|
+
title?: string;
|
|
285
|
+
accentColor?: string;
|
|
286
|
+
}
|
|
287
|
+
interface ISlideCodeBlockElement extends ISlideElementBase {
|
|
288
|
+
type: 'codeBlock';
|
|
289
|
+
language: string;
|
|
290
|
+
code: string;
|
|
291
|
+
codeTheme?: 'dark' | 'light';
|
|
292
|
+
fontSize?: number;
|
|
293
|
+
title?: string;
|
|
294
|
+
}
|
|
295
|
+
interface ISlideSheetEmbedElement extends ISlideElementBase {
|
|
296
|
+
type: 'sheetEmbed';
|
|
297
|
+
title?: string;
|
|
298
|
+
headers: string[];
|
|
299
|
+
rows: Array<Array<string | number>>;
|
|
300
|
+
sourceUnitId?: string;
|
|
301
|
+
accentColor?: string;
|
|
302
|
+
}
|
|
303
|
+
type ISlideElement = ISlideTextElement | ISlideShapeElement | ISlideConnectorElement | ISlideImageElement | ISlideTableElement | ISlideChartElement | ISlideSmartArtElement | ISlideCodeBlockElement | ISlideSheetEmbedElement;
|
|
304
|
+
interface ISlidePage {
|
|
305
|
+
id: string;
|
|
306
|
+
title: string;
|
|
307
|
+
layoutId: string;
|
|
308
|
+
hidden?: boolean;
|
|
309
|
+
showSlideNumber?: boolean;
|
|
310
|
+
speakerNotes?: string;
|
|
311
|
+
background?: ISlideBackground;
|
|
312
|
+
transition?: ISlideTransition;
|
|
313
|
+
animations: ISlideAnimation[];
|
|
314
|
+
elementOrder: string[];
|
|
315
|
+
elements: Record<string, ISlideElement>;
|
|
316
|
+
}
|
|
317
|
+
interface ISlideUnitData {
|
|
318
|
+
schema?: string;
|
|
319
|
+
schemaVersion?: number;
|
|
320
|
+
id: string;
|
|
321
|
+
name: string;
|
|
322
|
+
rev: number;
|
|
323
|
+
activeSlideId: string;
|
|
324
|
+
slideSize: ISlideSize;
|
|
325
|
+
theme: ISlideTheme;
|
|
326
|
+
masters: ISlideMaster[];
|
|
327
|
+
layouts: ISlideLayout[];
|
|
328
|
+
sections: ISlideSection[];
|
|
329
|
+
slideOrder: string[];
|
|
330
|
+
slides: Record<string, ISlidePage>;
|
|
331
|
+
metadata?: Record<string, unknown>;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
declare function createDefaultSlideMasters(theme?: ISlideTheme): ISlideMaster[];
|
|
335
|
+
declare function createDefaultSlideLayouts(masterId?: string): ISlideLayout[];
|
|
336
|
+
declare function syncTextAndParagraphs(el: ISlideTextElement): ISlideTextElement;
|
|
337
|
+
declare function createElementsFromLayout(layout: ISlideLayout, theme: ISlideTheme, slideSize?: ISlideSize): {
|
|
338
|
+
elements: Record<string, ISlideElement>;
|
|
339
|
+
elementOrder: string[];
|
|
340
|
+
};
|
|
341
|
+
declare function findLayoutByTypeOrId(layouts: ISlideLayout[], layoutIdOrType?: string | SlideLayoutType): ISlideLayout;
|
|
342
|
+
declare function createDefaultSlideUnitData(partial?: Partial<ISlideUnitData>): ISlideUnitData;
|
|
343
|
+
/**
|
|
344
|
+
* Rich Executive & Automated Report Sample Deck showcasing WordArt, KPI cards, connectors,
|
|
345
|
+
* native charts, SmartArt diagrams, `${}` / `#{}` dataset template tables, transitions, animations, and speaker notes.
|
|
346
|
+
*/
|
|
347
|
+
declare function createSampleExecutiveDeckData(options?: {
|
|
348
|
+
id?: string;
|
|
349
|
+
name?: string;
|
|
350
|
+
}): ISlideUnitData;
|
|
351
|
+
declare class SlideUnitModel extends UnitModel<ISlideUnitData, UniverInstanceType.UNIVER_SLIDE> {
|
|
352
|
+
readonly type = UniverInstanceType.UNIVER_SLIDE;
|
|
353
|
+
private _snapshot;
|
|
354
|
+
private readonly _name$;
|
|
355
|
+
readonly name$: Observable<string>;
|
|
356
|
+
private readonly _activeSlideId$;
|
|
357
|
+
readonly activeSlideId$: Observable<string>;
|
|
358
|
+
private readonly _snapshotChanged$;
|
|
359
|
+
readonly snapshotChanged$: Observable<ISlideUnitData>;
|
|
360
|
+
constructor(snapshot?: Partial<ISlideUnitData>);
|
|
361
|
+
dispose(): void;
|
|
362
|
+
getUnitId(): string;
|
|
363
|
+
setName(name: string): void;
|
|
364
|
+
getName(): string;
|
|
365
|
+
getSnapshot(): ISlideUnitData;
|
|
366
|
+
save(): ISlideUnitData;
|
|
367
|
+
getRev(): number;
|
|
368
|
+
incrementRev(): void;
|
|
369
|
+
setRev(rev: number): void;
|
|
370
|
+
getSlideSize(): ISlideSize;
|
|
371
|
+
getTheme(): ISlideTheme;
|
|
372
|
+
getMasters(): ISlideMaster[];
|
|
373
|
+
getLayouts(): ISlideLayout[];
|
|
374
|
+
getSections(): ISlideSection[];
|
|
375
|
+
getSlideOrder(): string[];
|
|
376
|
+
getSlidesOrdered(): ISlidePage[];
|
|
377
|
+
getSlide(slideId: string): ISlidePage | undefined;
|
|
378
|
+
getActiveSlideId(): string;
|
|
379
|
+
getActiveSlide(): ISlidePage | undefined;
|
|
380
|
+
getSlideElementsOrdered(slideId: string): ISlideElement[];
|
|
381
|
+
getElement(slideId: string, elementId: string): ISlideElement | undefined;
|
|
382
|
+
/** Internal synchronous mutators invoked exclusively by IMutation handlers */
|
|
383
|
+
__replaceSnapshot(nextSnapshot: ISlideUnitData, preserveUnitId?: boolean): void;
|
|
384
|
+
__setActiveSlideId(slideId: string): boolean;
|
|
385
|
+
private _notifyChange;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
declare function escapeSvgXml(str: string): string;
|
|
389
|
+
declare function svgToDataUri(svg: string): string;
|
|
390
|
+
declare function resolveChartPalette(chartColors?: string[], theme?: ISlideTheme): string[];
|
|
391
|
+
declare function getShapePolygonPoints(shapeType: SlideShapeKind, w: number, h: number): Array<{
|
|
392
|
+
x: number;
|
|
393
|
+
y: number;
|
|
394
|
+
}>;
|
|
395
|
+
declare function getShapeSvgPath(shapeType: SlideShapeKind, width: number, height: number, cornerRadius?: number): string;
|
|
396
|
+
interface IResolvedConnectorGeometry {
|
|
397
|
+
x1: number;
|
|
398
|
+
y1: number;
|
|
399
|
+
x2: number;
|
|
400
|
+
y2: number;
|
|
401
|
+
midX: number;
|
|
402
|
+
midY: number;
|
|
403
|
+
pathD: string;
|
|
404
|
+
endAngleRad: number;
|
|
405
|
+
startAngleRad: number;
|
|
406
|
+
}
|
|
407
|
+
declare function resolveConnectorEndpoints(connector: ISlideConnectorElement, elementsMap?: Record<string, ISlideElement>): IResolvedConnectorGeometry;
|
|
408
|
+
/**
|
|
409
|
+
* Pure-TS crisp vector SVG renderer for Slide Charts (`bar`, `column`, `line`, `pie`, `doughnut`, `area`, `radar`, `scatter`, `combo`).
|
|
410
|
+
*/
|
|
411
|
+
declare function renderSlideChartToSvg(chart: ISlideChartElement, theme?: ISlideTheme): string;
|
|
412
|
+
declare function renderSlideChartToSvgDataUri(chart: ISlideChartElement, theme?: ISlideTheme): string;
|
|
413
|
+
/**
|
|
414
|
+
* Pure-TS crisp vector SVG renderer for Slide SmartArt (`process`, `cycle`, `hierarchy`, `list`, `pyramid`).
|
|
415
|
+
*/
|
|
416
|
+
declare function renderSlideSmartArtToSvg(smartArt: ISlideSmartArtElement, theme?: ISlideTheme): string;
|
|
417
|
+
declare function renderSlideSmartArtToSvgDataUri(smartArt: ISlideSmartArtElement, theme?: ISlideTheme): string;
|
|
418
|
+
/**
|
|
419
|
+
* Renders a complete `ISlidePage` to standalone vector SVG markup (used for thumbnails, SSR, and previews).
|
|
420
|
+
*/
|
|
421
|
+
declare function renderSlidePageToSvg(page: ISlidePage, unitData: Pick<ISlideUnitData, 'slideSize' | 'theme' | 'masters'>, slideNumber?: number): string;
|
|
422
|
+
|
|
423
|
+
type SlideInspectorTab = 'page' | 'element' | 'animation';
|
|
424
|
+
type SlidePresenterMode = 'presenter' | 'fullscreen';
|
|
425
|
+
interface ISlideSelectionState {
|
|
426
|
+
unitId: string | null;
|
|
427
|
+
activeSlideId: string | null;
|
|
428
|
+
selectedElementIds: string[];
|
|
429
|
+
editingElementId: string | null;
|
|
430
|
+
editingTableCell: {
|
|
431
|
+
elementId: string;
|
|
432
|
+
row: number;
|
|
433
|
+
col: number;
|
|
434
|
+
} | null;
|
|
435
|
+
zoom: number;
|
|
436
|
+
showGrid: boolean;
|
|
437
|
+
snapEnabled: boolean;
|
|
438
|
+
showSpeakerNotes: boolean;
|
|
439
|
+
speakerNotesHeight: number;
|
|
440
|
+
findReplaceOpen: boolean;
|
|
441
|
+
presenterOpen: boolean;
|
|
442
|
+
presenterMode: SlidePresenterMode;
|
|
443
|
+
presenterSlideIndex: number;
|
|
444
|
+
inspectorTab: SlideInspectorTab;
|
|
445
|
+
lastFindReplaceCount: number;
|
|
446
|
+
}
|
|
447
|
+
interface ISlideSelectionService {
|
|
448
|
+
readonly state$: Observable<ISlideSelectionState>;
|
|
449
|
+
getState(): ISlideSelectionState;
|
|
450
|
+
setActiveSlide(unitId: string | null, slideId: string | null): void;
|
|
451
|
+
getActiveSlideId(): string | null;
|
|
452
|
+
selectElements(elementIds: string[]): void;
|
|
453
|
+
getSelectedElementIds(): string[];
|
|
454
|
+
setEditingElement(elementId: string | null): void;
|
|
455
|
+
setEditingTableCell(cell: {
|
|
456
|
+
elementId: string;
|
|
457
|
+
row: number;
|
|
458
|
+
col: number;
|
|
459
|
+
} | null): void;
|
|
460
|
+
setZoom(zoom: number): void;
|
|
461
|
+
setShowGrid(show: boolean): void;
|
|
462
|
+
setSnapEnabled(enabled: boolean): void;
|
|
463
|
+
setShowSpeakerNotes(show: boolean): void;
|
|
464
|
+
setSpeakerNotesHeight(height: number): void;
|
|
465
|
+
setFindReplaceOpen(open: boolean): void;
|
|
466
|
+
setLastFindReplaceCount(count: number): void;
|
|
467
|
+
openPresenter(mode?: SlidePresenterMode, startIndex?: number): void;
|
|
468
|
+
closePresenter(): void;
|
|
469
|
+
setPresenterSlideIndex(index: number): void;
|
|
470
|
+
setInspectorTab(tab: SlideInspectorTab): void;
|
|
471
|
+
}
|
|
472
|
+
declare const ISlideSelectionService: _univerjs_core.IdentifierDecorator<ISlideSelectionService>;
|
|
473
|
+
declare class SlideSelectionService extends Disposable implements ISlideSelectionService {
|
|
474
|
+
private readonly _state$;
|
|
475
|
+
readonly state$: Observable<ISlideSelectionState>;
|
|
476
|
+
dispose(): void;
|
|
477
|
+
getState(): ISlideSelectionState;
|
|
478
|
+
private _patch;
|
|
479
|
+
setActiveSlide(unitId: string | null, slideId: string | null): void;
|
|
480
|
+
getActiveSlideId(): string | null;
|
|
481
|
+
selectElements(elementIds: string[]): void;
|
|
482
|
+
getSelectedElementIds(): string[];
|
|
483
|
+
setEditingElement(elementId: string | null): void;
|
|
484
|
+
setEditingTableCell(cell: {
|
|
485
|
+
elementId: string;
|
|
486
|
+
row: number;
|
|
487
|
+
col: number;
|
|
488
|
+
} | null): void;
|
|
489
|
+
setZoom(zoom: number): void;
|
|
490
|
+
setShowGrid(show: boolean): void;
|
|
491
|
+
setSnapEnabled(enabled: boolean): void;
|
|
492
|
+
setShowSpeakerNotes(show: boolean): void;
|
|
493
|
+
setSpeakerNotesHeight(height: number): void;
|
|
494
|
+
setFindReplaceOpen(open: boolean): void;
|
|
495
|
+
setLastFindReplaceCount(count: number): void;
|
|
496
|
+
openPresenter(mode?: SlidePresenterMode, startIndex?: number): void;
|
|
497
|
+
closePresenter(): void;
|
|
498
|
+
setPresenterSlideIndex(index: number): void;
|
|
499
|
+
setInspectorTab(tab: SlideInspectorTab): void;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
interface ISlideDatasetExtractionResult {
|
|
503
|
+
codes: string[];
|
|
504
|
+
scalarExpressions: string[];
|
|
505
|
+
tableLoopCodes: string[];
|
|
506
|
+
chartDatasetCodes: string[];
|
|
507
|
+
}
|
|
508
|
+
interface ICompileSlideTemplateOptions {
|
|
509
|
+
/**
|
|
510
|
+
* Maximum number of expanded detail rows per slide before cloning continuation slides (`(续 2/N)`).
|
|
511
|
+
* When omitted, automatically computes available rows based on `slideSize.heightPt - table.y - bottomMarginPt`
|
|
512
|
+
* if `autoPaginateOverflow !== false`.
|
|
513
|
+
*/
|
|
514
|
+
maxRowsPerSlide?: number;
|
|
515
|
+
/** Bottom margin reserved when auto-calculating pagination (default `36` pt) */
|
|
516
|
+
bottomMarginPt?: number;
|
|
517
|
+
/** Whether to automatically paginate overflowing `#{}` tables when `maxRowsPerSlide` is omitted (default `true`) */
|
|
518
|
+
autoPaginateOverflow?: boolean;
|
|
519
|
+
/** Custom formatter for continuation slide title suffix, defaults to `(page, total) => \` (续 ${page}/${total})\`` */
|
|
520
|
+
continuationTitleSuffix?: (pageIndexOneBased: number, totalPages: number) => string;
|
|
521
|
+
/** Value rendered when a `${...}` or `#{...}` path resolves to `undefined` or `null` (default `''`) */
|
|
522
|
+
missingValueFallback?: string;
|
|
523
|
+
}
|
|
524
|
+
declare function extractSlideDatasetCodes(snapshot: ISlideUnitData): ISlideDatasetExtractionResult;
|
|
525
|
+
/**
|
|
526
|
+
* Compiles a slide presentation template with live `datasets`:
|
|
527
|
+
* - Substitutes `${meta.quarter}`, `${kpi.revenue}` scalars across titles, text boxes, shapes, connectors, SmartArt, and speaker notes
|
|
528
|
+
* - Populates `chart` elements bound via `datasetCode` / `categoryField` / `valueFields`
|
|
529
|
+
* - Expands `#{sales.region}` detail rows inside slide tables and automatically clones continuation slides (`(续 2/3)`) on overflow!
|
|
530
|
+
*/
|
|
531
|
+
declare function compileSlidesWithDataset(snapshot: ISlideUnitData, datasets: Record<string, unknown>, options?: ICompileSlideTemplateOptions): ISlideUnitData;
|
|
532
|
+
|
|
533
|
+
declare const EMU_PER_PT = 12700;
|
|
534
|
+
declare function ptToEmu(pt: number): number;
|
|
535
|
+
declare function emuToPt(emu: number): number;
|
|
536
|
+
interface IPptxExportOptions {
|
|
537
|
+
/** Optional datasets compiled via `compileSlidesWithDataset` prior to OpenXML serialization */
|
|
538
|
+
datasets?: Record<string, unknown>;
|
|
539
|
+
templateOptions?: ICompileSlideTemplateOptions;
|
|
540
|
+
/** Document author written to `docProps/core.xml` */
|
|
541
|
+
author?: string;
|
|
542
|
+
}
|
|
543
|
+
interface IPptxImportOptions {
|
|
544
|
+
unitId?: string;
|
|
545
|
+
name?: string;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Synchronous Pure-TS OpenXML `.pptx` writer.
|
|
549
|
+
*/
|
|
550
|
+
declare function exportPptxBytesSync(rawSnapshot: ISlideUnitData, options?: IPptxExportOptions): Uint8Array;
|
|
551
|
+
declare function exportPptxBytes(snapshot: ISlideUnitData, options?: IPptxExportOptions): Promise<Uint8Array>;
|
|
552
|
+
/**
|
|
553
|
+
* Synchronous Pure-TS OpenXML `.pptx` reader returning a rich editable `ISlideUnitData` snapshot.
|
|
554
|
+
*/
|
|
555
|
+
declare function importPptxBytesSync(pptxBytes: Uint8Array, options?: IPptxImportOptions): ISlideUnitData;
|
|
556
|
+
declare function importPptxBytes(source: Uint8Array | ArrayBuffer | Blob, options?: IPptxImportOptions): Promise<ISlideUnitData>;
|
|
557
|
+
|
|
558
|
+
interface ISlidePdfExportOptions {
|
|
559
|
+
/** Whether to include slides marked `hidden: true` (default `false`) */
|
|
560
|
+
includeHiddenSlides?: boolean;
|
|
561
|
+
/**
|
|
562
|
+
* When `true`, exports A4 portrait speaker handout pages (`595.28 x 841.89 pt`)
|
|
563
|
+
* with the vector slide rendered on top and `speakerNotes` printed below.
|
|
564
|
+
*/
|
|
565
|
+
handoutNotesMode?: boolean;
|
|
566
|
+
/** Optional datasets compiled via `compileSlidesWithDataset` before rendering */
|
|
567
|
+
datasets?: Record<string, unknown>;
|
|
568
|
+
templateOptions?: ICompileSlideTemplateOptions;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Exports an `ISlideUnitData` presentation snapshot directly to crisp vector PDF bytes (`Uint8Array`) using `pdf-lib`.
|
|
572
|
+
*/
|
|
573
|
+
declare function exportSlidesToPdfBytes(rawSnapshot: ISlideUnitData, options?: ISlidePdfExportOptions): Promise<Uint8Array>;
|
|
574
|
+
|
|
575
|
+
interface ISlideIoAdapter {
|
|
576
|
+
importPptx?: (source: Uint8Array | ArrayBuffer | Blob, options?: IPptxImportOptions) => Promise<ISlideUnitData>;
|
|
577
|
+
exportPptx?: (snapshot: ISlideUnitData, options?: IPptxExportOptions) => Promise<Uint8Array>;
|
|
578
|
+
exportPdf?: (snapshot: ISlideUnitData, options?: ISlidePdfExportOptions) => Promise<Uint8Array>;
|
|
579
|
+
onSave?: (snapshot: ISlideUnitData) => Promise<void> | void;
|
|
580
|
+
}
|
|
581
|
+
interface ISlideExportedEvent {
|
|
582
|
+
unitId: string;
|
|
583
|
+
format: 'pptx' | 'pdf';
|
|
584
|
+
bytes: Uint8Array;
|
|
585
|
+
byteLength: number;
|
|
586
|
+
}
|
|
587
|
+
interface ISlideIoService {
|
|
588
|
+
readonly exported$: Observable<ISlideExportedEvent>;
|
|
589
|
+
setAdapter(adapter: ISlideIoAdapter): void;
|
|
590
|
+
getAdapter(): ISlideIoAdapter;
|
|
591
|
+
importPptx(source: Uint8Array | ArrayBuffer | Blob, options?: IPptxImportOptions): Promise<ISlideUnitData>;
|
|
592
|
+
exportPptx(snapshot: ISlideUnitData, options?: IPptxExportOptions): Promise<Uint8Array>;
|
|
593
|
+
exportPdf(snapshot: ISlideUnitData, options?: ISlidePdfExportOptions): Promise<Uint8Array>;
|
|
594
|
+
compileTemplate(snapshot: ISlideUnitData, datasets: Record<string, unknown>, options?: ICompileSlideTemplateOptions): ISlideUnitData;
|
|
595
|
+
saveToHost(snapshot: ISlideUnitData): Promise<void>;
|
|
596
|
+
}
|
|
597
|
+
declare const ISlideIoService: _univerjs_core.IdentifierDecorator<ISlideIoService>;
|
|
598
|
+
declare class SlideIoService extends Disposable implements ISlideIoService {
|
|
599
|
+
private _adapter;
|
|
600
|
+
private readonly _exported$;
|
|
601
|
+
readonly exported$: Observable<ISlideExportedEvent>;
|
|
602
|
+
dispose(): void;
|
|
603
|
+
setAdapter(adapter: ISlideIoAdapter): void;
|
|
604
|
+
getAdapter(): ISlideIoAdapter;
|
|
605
|
+
importPptx(source: Uint8Array | ArrayBuffer | Blob, options?: IPptxImportOptions): Promise<ISlideUnitData>;
|
|
606
|
+
exportPptx(snapshot: ISlideUnitData, options?: IPptxExportOptions): Promise<Uint8Array>;
|
|
607
|
+
exportPdf(snapshot: ISlideUnitData, options?: ISlidePdfExportOptions): Promise<Uint8Array>;
|
|
608
|
+
compileTemplate(snapshot: ISlideUnitData, datasets: Record<string, unknown>, options?: ICompileSlideTemplateOptions): ISlideUnitData;
|
|
609
|
+
saveToHost(snapshot: ISlideUnitData): Promise<void>;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
interface IApplySlideSnapshotMutationParams {
|
|
613
|
+
unitId: string;
|
|
614
|
+
snapshot: ISlideUnitData;
|
|
615
|
+
preserveUnitId?: boolean;
|
|
616
|
+
}
|
|
617
|
+
declare const ApplySlideSnapshotMutation: IMutation<IApplySlideSnapshotMutationParams>;
|
|
618
|
+
interface ISetActiveSlideMutationParams {
|
|
619
|
+
unitId: string;
|
|
620
|
+
slideId: string;
|
|
621
|
+
}
|
|
622
|
+
declare const SetActiveSlideMutation: IMutation<ISetActiveSlideMutationParams>;
|
|
623
|
+
|
|
624
|
+
declare function createDefaultSlideElement(elementType: SlideElementType, partial?: Partial<ISlideElement>, theme?: ISlideTheme): ISlideElement;
|
|
625
|
+
interface IAddSlidePageCommandParams {
|
|
626
|
+
unitId?: string;
|
|
627
|
+
layoutId?: string | SlideLayoutType;
|
|
628
|
+
title?: string;
|
|
629
|
+
index?: number;
|
|
630
|
+
sectionId?: string;
|
|
631
|
+
slide?: Partial<ISlidePage>;
|
|
632
|
+
}
|
|
633
|
+
declare const AddSlidePageCommand: ICommand<IAddSlidePageCommandParams>;
|
|
634
|
+
interface IDuplicateSlidePageCommandParams {
|
|
635
|
+
unitId?: string;
|
|
636
|
+
slideId?: string;
|
|
637
|
+
}
|
|
638
|
+
declare const DuplicateSlidePageCommand: ICommand<IDuplicateSlidePageCommandParams>;
|
|
639
|
+
interface IDeleteSlidePageCommandParams {
|
|
640
|
+
unitId?: string;
|
|
641
|
+
slideId?: string;
|
|
642
|
+
}
|
|
643
|
+
declare const DeleteSlidePageCommand: ICommand<IDeleteSlidePageCommandParams>;
|
|
644
|
+
interface IReorderSlidePagesCommandParams {
|
|
645
|
+
unitId?: string;
|
|
646
|
+
slideOrder?: string[];
|
|
647
|
+
slideId?: string;
|
|
648
|
+
direction?: 'up' | 'down';
|
|
649
|
+
toIndex?: number;
|
|
650
|
+
}
|
|
651
|
+
declare const ReorderSlidePagesCommand: ICommand<IReorderSlidePagesCommandParams>;
|
|
652
|
+
interface IUpdateSlidePagePropsCommandParams {
|
|
653
|
+
unitId?: string;
|
|
654
|
+
slideId?: string;
|
|
655
|
+
applyToAllSlides?: boolean;
|
|
656
|
+
applyLayoutPlaceholders?: boolean;
|
|
657
|
+
patch: {
|
|
658
|
+
title?: string;
|
|
659
|
+
layoutId?: string | SlideLayoutType;
|
|
660
|
+
hidden?: boolean;
|
|
661
|
+
showSlideNumber?: boolean;
|
|
662
|
+
speakerNotes?: string;
|
|
663
|
+
background?: ISlideBackground;
|
|
664
|
+
transition?: ISlideTransition;
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
declare const UpdateSlidePagePropsCommand: ICommand<IUpdateSlidePagePropsCommandParams>;
|
|
668
|
+
interface ISetActiveSlidePageCommandParams {
|
|
669
|
+
unitId?: string;
|
|
670
|
+
slideId: string;
|
|
671
|
+
}
|
|
672
|
+
declare const SetActiveSlidePageCommand: ICommand<ISetActiveSlidePageCommandParams>;
|
|
673
|
+
interface IAddSlideSectionCommandParams {
|
|
674
|
+
unitId?: string;
|
|
675
|
+
title?: string;
|
|
676
|
+
slideIds?: string[];
|
|
677
|
+
}
|
|
678
|
+
declare const AddSlideSectionCommand: ICommand<IAddSlideSectionCommandParams>;
|
|
679
|
+
interface IUpdateSlideSectionCommandParams {
|
|
680
|
+
unitId?: string;
|
|
681
|
+
sectionId: string;
|
|
682
|
+
patch: Partial<Pick<ISlideSection, 'title' | 'collapsed' | 'slideIds'>>;
|
|
683
|
+
}
|
|
684
|
+
declare const UpdateSlideSectionCommand: ICommand<IUpdateSlideSectionCommandParams>;
|
|
685
|
+
interface IDeleteSlideSectionCommandParams {
|
|
686
|
+
unitId?: string;
|
|
687
|
+
sectionId: string;
|
|
688
|
+
}
|
|
689
|
+
declare const DeleteSlideSectionCommand: ICommand<IDeleteSlideSectionCommandParams>;
|
|
690
|
+
interface IAddSlideElementCommandParams {
|
|
691
|
+
unitId?: string;
|
|
692
|
+
slideId?: string;
|
|
693
|
+
elementType?: SlideElementType;
|
|
694
|
+
element?: Partial<ISlideElement>;
|
|
695
|
+
index?: number;
|
|
696
|
+
}
|
|
697
|
+
declare const AddSlideElementCommand: ICommand<IAddSlideElementCommandParams>;
|
|
698
|
+
interface IUpdateSlideElementsCommandParams {
|
|
699
|
+
unitId?: string;
|
|
700
|
+
slideId?: string;
|
|
701
|
+
updates: Array<{
|
|
702
|
+
id: string;
|
|
703
|
+
patch?: Partial<ISlideElement>;
|
|
704
|
+
element?: ISlideElement;
|
|
705
|
+
}>;
|
|
706
|
+
}
|
|
707
|
+
declare const UpdateSlideElementsCommand: ICommand<IUpdateSlideElementsCommandParams>;
|
|
708
|
+
interface IDeleteSlideElementsCommandParams {
|
|
709
|
+
unitId?: string;
|
|
710
|
+
slideId?: string;
|
|
711
|
+
elementIds?: string[];
|
|
712
|
+
}
|
|
713
|
+
declare const DeleteSlideElementsCommand: ICommand<IDeleteSlideElementsCommandParams>;
|
|
714
|
+
type SlideElementAlignMode = 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom' | 'distributeH' | 'distributeV';
|
|
715
|
+
interface IAlignSlideElementsCommandParams {
|
|
716
|
+
unitId?: string;
|
|
717
|
+
slideId?: string;
|
|
718
|
+
elementIds?: string[];
|
|
719
|
+
mode: SlideElementAlignMode;
|
|
720
|
+
}
|
|
721
|
+
declare const AlignSlideElementsCommand: ICommand<IAlignSlideElementsCommandParams>;
|
|
722
|
+
interface IReorderSlideElementLayerCommandParams {
|
|
723
|
+
unitId?: string;
|
|
724
|
+
slideId?: string;
|
|
725
|
+
elementId?: string;
|
|
726
|
+
action?: 'front' | 'back' | 'forward' | 'backward';
|
|
727
|
+
elementOrder?: string[];
|
|
728
|
+
}
|
|
729
|
+
declare const ReorderSlideElementLayerCommand: ICommand<IReorderSlideElementLayerCommandParams>;
|
|
730
|
+
interface ISetSlideAnimationsCommandParams {
|
|
731
|
+
unitId?: string;
|
|
732
|
+
slideId?: string;
|
|
733
|
+
animations: ISlideAnimation[];
|
|
734
|
+
}
|
|
735
|
+
declare const SetSlideAnimationsCommand: ICommand<ISetSlideAnimationsCommandParams>;
|
|
736
|
+
interface IUpdateSlideThemeCommandParams {
|
|
737
|
+
unitId?: string;
|
|
738
|
+
theme: ISlideTheme;
|
|
739
|
+
applyBackgroundToSlides?: boolean;
|
|
740
|
+
}
|
|
741
|
+
declare const UpdateSlideThemeCommand: ICommand<IUpdateSlideThemeCommandParams>;
|
|
742
|
+
interface ISetSlideSizeCommandParams {
|
|
743
|
+
unitId?: string;
|
|
744
|
+
preset?: SlideSizePreset;
|
|
745
|
+
widthPt?: number;
|
|
746
|
+
heightPt?: number;
|
|
747
|
+
scaleElements?: boolean;
|
|
748
|
+
}
|
|
749
|
+
declare const SetSlideSizeCommand: ICommand<ISetSlideSizeCommandParams>;
|
|
750
|
+
declare function countSlideTextMatches(snapshot: ISlideUnitData, query: string, options?: {
|
|
751
|
+
matchCase?: boolean;
|
|
752
|
+
slideId?: string;
|
|
753
|
+
}): number;
|
|
754
|
+
interface IFindAndReplaceSlideTextCommandParams {
|
|
755
|
+
unitId?: string;
|
|
756
|
+
slideId?: string;
|
|
757
|
+
findText: string;
|
|
758
|
+
replaceText: string;
|
|
759
|
+
matchCase?: boolean;
|
|
760
|
+
includeSpeakerNotes?: boolean;
|
|
761
|
+
}
|
|
762
|
+
declare const FindAndReplaceSlideTextCommand: ICommand<IFindAndReplaceSlideTextCommandParams>;
|
|
763
|
+
interface IReplaceSlideSnapshotCommandParams {
|
|
764
|
+
unitId?: string;
|
|
765
|
+
snapshot: ISlideUnitData;
|
|
766
|
+
}
|
|
767
|
+
declare const ReplaceSlideSnapshotCommand: ICommand<IReplaceSlideSnapshotCommandParams>;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Browser-safe & Node-safe Pure-TS RFC 1951 Raw DEFLATE Compressor / Decompressor + ZIP Container Codec.
|
|
771
|
+
* Zero external dependencies and zero Node `fs` / `zlib` imports.
|
|
772
|
+
*/
|
|
773
|
+
declare function crc32Bytes(bytes: Uint8Array): number;
|
|
774
|
+
declare function deflateRawSyncPure(src: Uint8Array): Uint8Array;
|
|
775
|
+
declare function inflateRawSyncPure(src: Uint8Array): Uint8Array;
|
|
776
|
+
interface IZipFileEntry {
|
|
777
|
+
name: string;
|
|
778
|
+
content: string | Uint8Array;
|
|
779
|
+
}
|
|
780
|
+
declare function packZipSync(files: IZipFileEntry[]): Uint8Array;
|
|
781
|
+
declare function unpackZipSync(zipBytes: Uint8Array): Map<string, Uint8Array>;
|
|
782
|
+
|
|
783
|
+
interface IUniverSlidesConfig {
|
|
784
|
+
/** Optional pluggable PPTX / PDF Import-Export-Save IO adapter */
|
|
785
|
+
io?: ISlideIoAdapter;
|
|
786
|
+
/** Default stage zoom scale (`0.25..2.5`, default `0.85`) */
|
|
787
|
+
defaultZoom?: number;
|
|
788
|
+
}
|
|
789
|
+
declare const UNIVER_SLIDES_PLUGIN_NAME = "UNIVER_SLIDES_PLUGIN";
|
|
790
|
+
declare class UniverSlidesPlugin extends Plugin {
|
|
791
|
+
private readonly _config;
|
|
792
|
+
protected readonly _injector: Injector;
|
|
793
|
+
private readonly _univerInstanceService;
|
|
794
|
+
private readonly _commandService;
|
|
795
|
+
static pluginName: string;
|
|
796
|
+
static packageName: string;
|
|
797
|
+
constructor(_config: Partial<IUniverSlidesConfig> | undefined, _injector: Injector, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
|
|
798
|
+
onStarting(): void;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
declare const VERSION = "1.6.218";
|
|
802
|
+
|
|
803
|
+
export { AddSlideElementCommand, AddSlidePageCommand, AddSlideSectionCommand, AlignSlideElementsCommand, ApplySlideSnapshotMutation, DeleteSlideElementsCommand, DeleteSlidePageCommand, DeleteSlideSectionCommand, DuplicateSlidePageCommand, EMU_PER_PT, FindAndReplaceSlideTextCommand, type IAddSlideElementCommandParams, type IAddSlidePageCommandParams, type IAddSlideSectionCommandParams, type IAlignSlideElementsCommandParams, type IApplySlideSnapshotMutationParams, type ICompileSlideTemplateOptions, type IDeleteSlideElementsCommandParams, type IDeleteSlidePageCommandParams, type IDeleteSlideSectionCommandParams, type IDuplicateSlidePageCommandParams, type IFindAndReplaceSlideTextCommandParams, type IPptxExportOptions, type IPptxImportOptions, type IReorderSlideElementLayerCommandParams, type IReorderSlidePagesCommandParams, type IReplaceSlideSnapshotCommandParams, type IResolvedConnectorGeometry, type ISetActiveSlideMutationParams, type ISetActiveSlidePageCommandParams, type ISetSlideAnimationsCommandParams, type ISetSlideSizeCommandParams, type ISlideAnimation, type ISlideBackground, type ISlideChartElement, type ISlideChartSeries, type ISlideChartValueFieldBinding, type ISlideCodeBlockElement, type ISlideConnectorElement, type ISlideDatasetExtractionResult, type ISlideElement, type ISlideElementBase, type ISlideExportedEvent, type ISlideImageCrop, type ISlideImageElement, type ISlideIoAdapter, ISlideIoService, type ISlideLayout, type ISlideMaster, type ISlidePage, type ISlideParagraph, type ISlidePdfExportOptions, type ISlidePlaceholderSlot, type ISlideSection, ISlideSelectionService, type ISlideSelectionState, type ISlideShapeElement, type ISlideSheetEmbedElement, type ISlideSize, type ISlideSmartArtElement, type ISlideSmartArtItem, type ISlideTableCell, type ISlideTableElement, type ISlideTextElement, type ISlideTextRun, type ISlideTheme, type ISlideThemeColors, type ISlideTransition, type ISlideUnitData, type ISlideWordArtStyle, type IUniverSlidesConfig, type IUpdateSlideElementsCommandParams, type IUpdateSlidePagePropsCommandParams, type IUpdateSlideSectionCommandParams, type IUpdateSlideThemeCommandParams, type IZipFileEntry, ReorderSlideElementLayerCommand, ReorderSlidePagesCommand, ReplaceSlideSnapshotCommand, SLIDE_SIZE_PRESETS, SLIDE_THEME_PRESETS, SetActiveSlideMutation, SetActiveSlidePageCommand, SetSlideAnimationsCommand, SetSlideSizeCommand, type SlideAnimationCategory, type SlideAnimationEffect, type SlideAnimationTrigger, type SlideChartType, type SlideConnectorKind, type SlideDirection, type SlideElementAlignMode, type SlideElementType, type SlideInspectorTab, SlideIoService, type SlideLayoutType, type SlidePlaceholderRole, type SlidePresenterMode, SlideSelectionService, type SlideShapeKind, type SlideSizePreset, type SlideSmartArtLayout, type SlideTransitionType, SlideUnitModel, UNIVER_SLIDES_PLUGIN_NAME, UNIVER_SLIDE_SCHEMA, UNIVER_SLIDE_SCHEMA_VERSION, UniverSlidesPlugin, UpdateSlideElementsCommand, UpdateSlidePagePropsCommand, UpdateSlideSectionCommand, UpdateSlideThemeCommand, VERSION, compileSlidesWithDataset, countSlideTextMatches, crc32Bytes, createDefaultSlideElement, createDefaultSlideLayouts, createDefaultSlideMasters, createDefaultSlideUnitData, createElementsFromLayout, createSampleExecutiveDeckData, deflateRawSyncPure, emuToPt, escapeSvgXml, exportPptxBytes, exportPptxBytesSync, exportSlidesToPdfBytes, extractSlideDatasetCodes, findLayoutByTypeOrId, getShapePolygonPoints, getShapeSvgPath, importPptxBytes, importPptxBytesSync, inflateRawSyncPure, packZipSync, ptToEmu, renderSlideChartToSvg, renderSlideChartToSvgDataUri, renderSlidePageToSvg, renderSlideSmartArtToSvg, renderSlideSmartArtToSvgDataUri, resolveChartPalette, resolveConnectorEndpoints, svgToDataUri, syncTextAndParagraphs, unpackZipSync };
|