pptx-react-viewer 1.13.1 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{Model3DScene-C5O6LDSN.js → Model3DScene-E2FDY2TX.js} +3 -3
- package/dist/Model3DScene-E2FDY2TX.js.br +0 -0
- package/dist/Model3DScene-E2FDY2TX.js.gz +0 -0
- package/dist/{Model3DScene-SGFNVFB2.mjs → Model3DScene-JUJB4MJX.mjs} +2 -2
- package/dist/{Model3DScene-SGFNVFB2.mjs.br → Model3DScene-JUJB4MJX.mjs.br} +0 -0
- package/dist/Model3DScene-JUJB4MJX.mjs.gz +0 -0
- package/dist/{PowerPointViewer-C2a7iXAK.d.ts → PowerPointViewer-BsaUH3ZT.d.ts} +3 -3
- package/dist/{PowerPointViewer-BzsjqMzg.d.mts → PowerPointViewer-Nxku67uL.d.mts} +3 -3
- package/dist/{SurfaceChart3DScene-CDWIMU7C.mjs → SurfaceChart3DScene-2DEB7NMW.mjs} +2 -2
- package/dist/SurfaceChart3DScene-2DEB7NMW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-2DEB7NMW.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-NWZ2GCPS.js → SurfaceChart3DScene-Z64TSGR5.js} +3 -3
- package/dist/SurfaceChart3DScene-Z64TSGR5.js.br +0 -0
- package/dist/SurfaceChart3DScene-Z64TSGR5.js.gz +0 -0
- package/dist/{chunk-LARZRLKB.js → chunk-6CNJINIT.js} +322 -27
- package/dist/chunk-6CNJINIT.js.br +0 -0
- package/dist/chunk-6CNJINIT.js.gz +0 -0
- package/dist/{chunk-AMFNG44P.js → chunk-CHG7GPGB.js} +471 -626
- package/dist/chunk-CHG7GPGB.js.br +0 -0
- package/dist/chunk-CHG7GPGB.js.gz +0 -0
- package/dist/{chunk-ASB757HI.mjs → chunk-CZOMQPLZ.mjs} +65 -220
- package/dist/chunk-CZOMQPLZ.mjs.br +0 -0
- package/dist/chunk-CZOMQPLZ.mjs.gz +0 -0
- package/dist/{chunk-4ZYUPWYP.mjs → chunk-MAXS6AU7.mjs} +38 -18
- package/dist/chunk-MAXS6AU7.mjs.br +0 -0
- package/dist/chunk-MAXS6AU7.mjs.gz +0 -0
- package/dist/{chunk-S52XBUDM.js → chunk-OBLHB72P.js} +10 -0
- package/dist/chunk-OBLHB72P.js.br +0 -0
- package/dist/{chunk-S52XBUDM.js.gz → chunk-OBLHB72P.js.gz} +0 -0
- package/dist/{chunk-XBOHG5BO.mjs → chunk-QFRXMAFR.mjs} +10 -0
- package/dist/chunk-QFRXMAFR.mjs.br +0 -0
- package/dist/{chunk-XBOHG5BO.mjs.gz → chunk-QFRXMAFR.mjs.gz} +0 -0
- package/dist/{chunk-3VVUDMB7.js → chunk-RXIGJGJN.js} +856 -836
- package/dist/chunk-RXIGJGJN.js.br +0 -0
- package/dist/chunk-RXIGJGJN.js.gz +0 -0
- package/dist/{chunk-KULOGKNE.mjs → chunk-ZK4SPHDQ.mjs} +291 -3
- package/dist/chunk-ZK4SPHDQ.mjs.br +0 -0
- package/dist/chunk-ZK4SPHDQ.mjs.gz +0 -0
- package/dist/{dist-JVXXDMU7.mjs → dist-D5LQ7PW7.mjs} +1 -1
- package/dist/dist-D5LQ7PW7.mjs.br +0 -0
- package/dist/dist-D5LQ7PW7.mjs.gz +0 -0
- package/dist/{dist-TRWOWXDT.js → dist-MVSQ6PWP.js} +505 -505
- package/dist/dist-MVSQ6PWP.js.br +0 -0
- package/dist/dist-MVSQ6PWP.js.gz +0 -0
- package/dist/hooks-unstable.d.mts +127 -121
- package/dist/hooks-unstable.d.ts +127 -121
- package/dist/hooks-unstable.js +74 -74
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +18 -18
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/pptx-viewer.css +2 -2
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{types-ui-DlsqFx7_.d.mts → types-ui-NG29h55h.d.mts} +31 -20
- package/dist/{types-ui-DlsqFx7_.d.ts → types-ui-NG29h55h.d.ts} +31 -20
- package/dist/{usePresenterWindow-BKx5DLJy.d.ts → usePresenterWindow-DToCijGy.d.ts} +44 -44
- package/dist/{usePresenterWindow-BQwzr87T.d.mts → usePresenterWindow-DeTm-unp.d.mts} +44 -44
- package/dist/viewer/index.d.mts +6 -6
- package/dist/viewer/index.d.ts +6 -6
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/y-webrtc-6CRYHAXH.mjs +2 -2
- package/dist/y-webrtc-6CRYHAXH.mjs.br +0 -0
- package/dist/y-webrtc-6CRYHAXH.mjs.gz +0 -0
- package/dist/y-webrtc-QCZF75JW.js +2 -2
- package/dist/y-webrtc-QCZF75JW.js.br +0 -0
- package/dist/y-webrtc-QCZF75JW.js.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-C5O6LDSN.js.br +0 -0
- package/dist/Model3DScene-C5O6LDSN.js.gz +0 -0
- package/dist/Model3DScene-SGFNVFB2.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-CDWIMU7C.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-CDWIMU7C.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-NWZ2GCPS.js.br +0 -0
- package/dist/SurfaceChart3DScene-NWZ2GCPS.js.gz +0 -0
- package/dist/chunk-3VVUDMB7.js.br +0 -0
- package/dist/chunk-3VVUDMB7.js.gz +0 -0
- package/dist/chunk-4ZYUPWYP.mjs.br +0 -0
- package/dist/chunk-4ZYUPWYP.mjs.gz +0 -0
- package/dist/chunk-AMFNG44P.js.br +0 -0
- package/dist/chunk-AMFNG44P.js.gz +0 -0
- package/dist/chunk-ASB757HI.mjs.br +0 -0
- package/dist/chunk-ASB757HI.mjs.gz +0 -0
- package/dist/chunk-KULOGKNE.mjs.br +0 -0
- package/dist/chunk-KULOGKNE.mjs.gz +0 -0
- package/dist/chunk-LARZRLKB.js.br +0 -0
- package/dist/chunk-LARZRLKB.js.gz +0 -0
- package/dist/chunk-S52XBUDM.js.br +0 -0
- package/dist/chunk-XBOHG5BO.mjs.br +0 -0
- package/dist/dist-JVXXDMU7.mjs.br +0 -0
- package/dist/dist-JVXXDMU7.mjs.gz +0 -0
- package/dist/dist-TRWOWXDT.js.br +0 -0
- package/dist/dist-TRWOWXDT.js.gz +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { P, a, $, U, g, j, X, R, i } from './presentation-BfnrtJV1.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { ViewerTheme } from './theme/index.js';
|
|
4
4
|
|
|
@@ -56,11 +56,11 @@ interface PowerPointViewerAPI {
|
|
|
56
56
|
* animations, etc.). The returned reference is a snapshot; mutations are
|
|
57
57
|
* not reflected back unless done via the manipulation methods.
|
|
58
58
|
*/
|
|
59
|
-
getSlides: () => readonly
|
|
59
|
+
getSlides: () => readonly P[];
|
|
60
60
|
/** Get a single slide by zero-based index, or undefined if out of range. */
|
|
61
|
-
getSlide: (index: number) =>
|
|
61
|
+
getSlide: (index: number) => P | undefined;
|
|
62
62
|
/** Get the currently active slide. */
|
|
63
|
-
getActiveSlide: () =>
|
|
63
|
+
getActiveSlide: () => P | undefined;
|
|
64
64
|
/** Add a blank slide after the given index (or at end if omitted). */
|
|
65
65
|
addSlide: (afterIndex?: number) => void;
|
|
66
66
|
/** Delete slides at the given zero-based indexes. At least one slide is kept. */
|
|
@@ -76,14 +76,14 @@ interface PowerPointViewerAPI {
|
|
|
76
76
|
* `slideIndex` is omitted. Returns the full `PptxElement[]` with
|
|
77
77
|
* all type-specific properties intact.
|
|
78
78
|
*/
|
|
79
|
-
getElements: (slideIndex?: number) => readonly
|
|
79
|
+
getElements: (slideIndex?: number) => readonly a[];
|
|
80
80
|
/** Get a single element by ID from the active slide (or a specified slide). */
|
|
81
|
-
getElementById: (elementId: string, slideIndex?: number) =>
|
|
81
|
+
getElementById: (elementId: string, slideIndex?: number) => a | undefined;
|
|
82
82
|
/**
|
|
83
83
|
* Update one or more properties of an element by ID on the active slide.
|
|
84
84
|
* Accepts a `Partial<PptxElement>` patch (e.g. `{ x: 100, width: 300 }`).
|
|
85
85
|
*/
|
|
86
|
-
updateElement: (elementId: string, updates: Partial<
|
|
86
|
+
updateElement: (elementId: string, updates: Partial<a>) => void;
|
|
87
87
|
/** Delete elements by their IDs from the active slide. */
|
|
88
88
|
deleteElements: (elementIds: string[]) => void;
|
|
89
89
|
/**
|
|
@@ -166,6 +166,16 @@ interface ElementAnimationState {
|
|
|
166
166
|
cssAnimation: string | undefined;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* "Change Case" text mutation (PowerPoint's Aa dropdown: Sentence case, lower,
|
|
171
|
+
* UPPER, Capitalize Each Word, tOGGLE cASE). Unlike `textCaps` (a purely
|
|
172
|
+
* visual `text-transform`-style render hint), these modes rewrite the actual
|
|
173
|
+
* characters, matching PowerPoint's own behaviour. Framework-agnostic; no
|
|
174
|
+
* framework imports.
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
type ChangeCaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';
|
|
178
|
+
|
|
169
179
|
/**
|
|
170
180
|
* slide-compare — pure, framework-agnostic slide-diff engine shared by every
|
|
171
181
|
* binding (React / Vue / Angular).
|
|
@@ -195,9 +205,9 @@ interface SlideDiff {
|
|
|
195
205
|
/** Index in the compare (other) presentation, or -1 for removed slides. */
|
|
196
206
|
compareIndex: number;
|
|
197
207
|
/** The base slide data (undefined for added slides). */
|
|
198
|
-
baseSlide?:
|
|
208
|
+
baseSlide?: P;
|
|
199
209
|
/** The compare slide data (undefined for removed slides). */
|
|
200
|
-
compareSlide?:
|
|
210
|
+
compareSlide?: P;
|
|
201
211
|
/** Per-element changes when status is `changed`. */
|
|
202
212
|
changes: ElementChange[];
|
|
203
213
|
}
|
|
@@ -238,6 +248,11 @@ interface TouchGestureCallbacks {
|
|
|
238
248
|
/** Called when a long-press is detected, with the press coordinates. */
|
|
239
249
|
onLongPress?: (clientX: number, clientY: number) => void;
|
|
240
250
|
}
|
|
251
|
+
/** In-memory clipboard payload stored when an element is copied or cut. */
|
|
252
|
+
interface ElementClipboardPayload {
|
|
253
|
+
element: a;
|
|
254
|
+
isTemplate: boolean;
|
|
255
|
+
}
|
|
241
256
|
|
|
242
257
|
/**
|
|
243
258
|
* Pure handout layout calculations, shared by every binding's print path.
|
|
@@ -398,11 +413,7 @@ interface ShapeAdjustmentDragState {
|
|
|
398
413
|
startHeight: number;
|
|
399
414
|
moved: boolean;
|
|
400
415
|
}
|
|
401
|
-
|
|
402
|
-
interface ElementClipboardPayload {
|
|
403
|
-
element: P;
|
|
404
|
-
isTemplate: boolean;
|
|
405
|
-
}
|
|
416
|
+
|
|
406
417
|
/**
|
|
407
418
|
* A snapshot of editor state captured for undo/redo history.
|
|
408
419
|
* Contains the full slide deck state at a point in time so that
|
|
@@ -412,8 +423,8 @@ interface EditorHistorySnapshot {
|
|
|
412
423
|
width: number;
|
|
413
424
|
height: number;
|
|
414
425
|
activeSlideIndex: number;
|
|
415
|
-
slides:
|
|
416
|
-
templateElementsBySlideId: Record<string,
|
|
426
|
+
slides: P[];
|
|
427
|
+
templateElementsBySlideId: Record<string, a[]>;
|
|
417
428
|
actionLabel?: string;
|
|
418
429
|
}
|
|
419
430
|
/** Axis-aligned bounding box for an element, used for hit-testing and alignment. */
|
|
@@ -554,12 +565,12 @@ interface ConnectorGeometryOption {
|
|
|
554
565
|
}
|
|
555
566
|
/** Dropdown option for selecting a connector arrowhead style. */
|
|
556
567
|
interface ConnectorArrowOption {
|
|
557
|
-
value:
|
|
568
|
+
value: j;
|
|
558
569
|
label: string;
|
|
559
570
|
}
|
|
560
571
|
/** Dropdown option for selecting a stroke dash pattern. */
|
|
561
572
|
interface StrokeDashOption {
|
|
562
|
-
value:
|
|
573
|
+
value: i;
|
|
563
574
|
label: string;
|
|
564
575
|
}
|
|
565
576
|
/** Dropdown option for selecting a slide transition type. */
|
|
@@ -569,7 +580,7 @@ interface SlideTransitionOption {
|
|
|
569
580
|
}
|
|
570
581
|
/** Dropdown option for selecting an animation effect preset. */
|
|
571
582
|
interface AnimationPresetOption {
|
|
572
|
-
value: Exclude<
|
|
583
|
+
value: Exclude<g, 'none'>;
|
|
573
584
|
label: string;
|
|
574
585
|
}
|
|
575
586
|
interface PowerPointViewerProps {
|
|
@@ -698,4 +709,4 @@ interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI {
|
|
|
698
709
|
getContent: () => Promise<Uint8Array>;
|
|
699
710
|
}
|
|
700
711
|
|
|
701
|
-
export { type AccessibilityIssue as A, type SupportedShapeType as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type ToolbarSection as G, type ElementAnimationState as H, type
|
|
712
|
+
export { type AccessibilityIssue as A, type SupportedShapeType as B, type CollaborationConfig as C, type DragState as D, type EditorHistorySnapshot as E, type FileViewerHandle as F, type ToolbarSection as G, type ElementAnimationState as H, type ChangeCaseMode as I, type PrintSettings as J, type CompareResult as K, type DeviceOrientation as L, type MarqueeSelectionState as M, type TouchGestureCallbacks as N, MOBILE_BREAKPOINT as O, type PowerPointViewerAPI as P, TABLET_BREAKPOINT as Q, type ResizeHandle as R, type ShapeAdjustmentDragState as S, type TableCellEditorState as T, type ViewerMode as V, type PowerPointViewerHandle as a, type PowerPointViewerProps as b, type AnimationPresetOption as c, type CanvasSize as d, type CollaborationRole as e, type ConnectorArrowOption as f, type ConnectorGeometryOption as g, type ConnectorGeometryType as h, type ConnectorPathGeometry as i, type DrawingTool as j, type ElementBounds as k, type ElementClipboardPayload as l, type ElementContextMenuAction as m, type ElementContextMenuState as n, type ParsedTableCell as o, type ParsedTableData as p, type PresentationAnimationRuntime as q, type ResizeState as r, type ShapeAdjustmentHandleDescriptor as s, type ShapePreset as t, type ShapeQuickStyle as u, type ShortcutReferenceItem as v, type SlideAlignment as w, type SlideSectionGroup as x, type SlideTransitionOption as y, type StrokeDashOption as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n, o, m,
|
|
1
|
+
import { n, o, m, P, a, e, f, X, p, q, r, s, t, u, v, w, x, y, z, A, B, D, E, F, G, H, J, K, L, i, j, l, k, g, h } from './presentation-BfnrtJV1.js';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
|
-
import { e as CollaborationRole, C as CollaborationConfig } from './types-ui-
|
|
3
|
+
import { e as CollaborationRole, C as CollaborationConfig } from './types-ui-NG29h55h.js';
|
|
4
4
|
import { Awareness } from 'y-protocols/awareness';
|
|
5
5
|
import { Doc } from 'yjs';
|
|
6
6
|
|
|
@@ -36,9 +36,9 @@ interface PptxThemePreset {
|
|
|
36
36
|
/** Human-readable display name. */
|
|
37
37
|
name: string;
|
|
38
38
|
/** The 12-colour scheme. */
|
|
39
|
-
colorScheme:
|
|
39
|
+
colorScheme: e;
|
|
40
40
|
/** Heading and body font families. */
|
|
41
|
-
fontScheme:
|
|
41
|
+
fontScheme: f;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -89,7 +89,7 @@ type FillInput = {
|
|
|
89
89
|
interface StrokeInput {
|
|
90
90
|
color?: string;
|
|
91
91
|
width?: number;
|
|
92
|
-
dash?:
|
|
92
|
+
dash?: i;
|
|
93
93
|
opacity?: number;
|
|
94
94
|
join?: 'round' | 'bevel' | 'miter';
|
|
95
95
|
cap?: 'flat' | 'rnd' | 'sq';
|
|
@@ -194,8 +194,8 @@ interface ChartOptions extends Partial<ElementPosition> {
|
|
|
194
194
|
interface ConnectorOptions extends Partial<ElementPosition> {
|
|
195
195
|
type?: 'straight' | 'bent' | 'curved';
|
|
196
196
|
stroke?: StrokeInput;
|
|
197
|
-
startArrow?:
|
|
198
|
-
endArrow?:
|
|
197
|
+
startArrow?: j;
|
|
198
|
+
endArrow?: j;
|
|
199
199
|
from?: {
|
|
200
200
|
elementId: string;
|
|
201
201
|
site: number;
|
|
@@ -230,14 +230,14 @@ type BackgroundInput = {
|
|
|
230
230
|
source: string;
|
|
231
231
|
};
|
|
232
232
|
interface TransitionInput {
|
|
233
|
-
type:
|
|
233
|
+
type: k;
|
|
234
234
|
duration?: number;
|
|
235
235
|
direction?: string;
|
|
236
236
|
advanceAfterMs?: number;
|
|
237
237
|
}
|
|
238
238
|
interface AnimationInput {
|
|
239
|
-
preset:
|
|
240
|
-
trigger?:
|
|
239
|
+
preset: g;
|
|
240
|
+
trigger?: h;
|
|
241
241
|
duration?: number;
|
|
242
242
|
delay?: number;
|
|
243
243
|
}
|
|
@@ -321,13 +321,13 @@ declare class SlideBuilder {
|
|
|
321
321
|
/** Add a table to the slide. */
|
|
322
322
|
addTable(input: TableInput, options?: TableOptions): this;
|
|
323
323
|
/** Add a chart to the slide. */
|
|
324
|
-
addChart(chartType:
|
|
324
|
+
addChart(chartType: l, input: ChartInput, options?: ChartOptions): this;
|
|
325
325
|
/** Add a media element (video or audio) to the slide. */
|
|
326
326
|
addMedia(mediaType: 'video' | 'audio', source: string, options?: MediaOptions): this;
|
|
327
327
|
/** Add a group of elements to the slide. */
|
|
328
|
-
addGroup(children:
|
|
328
|
+
addGroup(children: a[], options?: GroupOptions): this;
|
|
329
329
|
/** Add a pre-built element directly. */
|
|
330
|
-
addElement(element:
|
|
330
|
+
addElement(element: a): this;
|
|
331
331
|
/** Set slide background. */
|
|
332
332
|
setBackground(bg: BackgroundInput): this;
|
|
333
333
|
/** Set slide transition. */
|
|
@@ -376,7 +376,7 @@ declare class SlideBuilder {
|
|
|
376
376
|
* ```
|
|
377
377
|
*/
|
|
378
378
|
addBuilderElement(builder: {
|
|
379
|
-
build():
|
|
379
|
+
build(): a;
|
|
380
380
|
}): this;
|
|
381
381
|
/**
|
|
382
382
|
* Remove an element by its ID.
|
|
@@ -410,7 +410,7 @@ declare class SlideBuilder {
|
|
|
410
410
|
* console.log(builder.getElements().length); // 1
|
|
411
411
|
* ```
|
|
412
412
|
*/
|
|
413
|
-
getElements(): readonly
|
|
413
|
+
getElements(): readonly a[];
|
|
414
414
|
/**
|
|
415
415
|
* Get the number of elements on this slide.
|
|
416
416
|
*
|
|
@@ -440,7 +440,7 @@ declare class SlideBuilder {
|
|
|
440
440
|
* }
|
|
441
441
|
* ```
|
|
442
442
|
*/
|
|
443
|
-
getLastElement():
|
|
443
|
+
getLastElement(): a | undefined;
|
|
444
444
|
/**
|
|
445
445
|
* Set the slide name/title for organizational purposes.
|
|
446
446
|
*
|
|
@@ -460,7 +460,7 @@ declare class SlideBuilder {
|
|
|
460
460
|
*/
|
|
461
461
|
setName(name: string): this;
|
|
462
462
|
/** Return the built {@link PptxSlide}. */
|
|
463
|
-
build():
|
|
463
|
+
build(): P;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
/**
|
|
@@ -545,7 +545,7 @@ declare class PptxSlideBuilder {
|
|
|
545
545
|
* @param slideValue - The slide data.
|
|
546
546
|
* @param rootBuilder - The parent builder.
|
|
547
547
|
*/
|
|
548
|
-
constructor(slideValue:
|
|
548
|
+
constructor(slideValue: P, rootBuilder: PptxXmlBuilder);
|
|
549
549
|
/** Navigate to the slide's notes builder (getter). */
|
|
550
550
|
get Notes(): PptxSlideNotesBuilder;
|
|
551
551
|
/** Navigate to the slide's notes builder. */
|
|
@@ -553,9 +553,9 @@ declare class PptxSlideBuilder {
|
|
|
553
553
|
/** Navigate to the slide's elements builder. */
|
|
554
554
|
elements(): PptxSlideElementsBuilder;
|
|
555
555
|
/** Return the underlying slide data. */
|
|
556
|
-
project():
|
|
556
|
+
project(): P;
|
|
557
557
|
/** Pascal-case alias for {@link project}. */
|
|
558
|
-
Project():
|
|
558
|
+
Project(): P;
|
|
559
559
|
/** Navigate back to the root builder. */
|
|
560
560
|
done(): PptxXmlBuilder;
|
|
561
561
|
/** Pascal-case alias for {@link done}. */
|
|
@@ -572,13 +572,13 @@ declare class PptxSlideElementsBuilder {
|
|
|
572
572
|
* @param slideValue - The slide whose elements are being modified.
|
|
573
573
|
* @param slideBuilder - The parent slide builder for chaining.
|
|
574
574
|
*/
|
|
575
|
-
constructor(slideValue:
|
|
575
|
+
constructor(slideValue: P, slideBuilder: PptxSlideBuilder);
|
|
576
576
|
/**
|
|
577
577
|
* Append an element to the slide's element list.
|
|
578
578
|
* @param element - The element to add.
|
|
579
579
|
* @returns This builder for chaining.
|
|
580
580
|
*/
|
|
581
|
-
add(element:
|
|
581
|
+
add(element: a): this;
|
|
582
582
|
/**
|
|
583
583
|
* Remove an element from the slide by its ID.
|
|
584
584
|
* @param elementId - The ID of the element to remove.
|
|
@@ -591,9 +591,9 @@ declare class PptxSlideElementsBuilder {
|
|
|
591
591
|
* @param updater - A function that receives the current element and returns the replacement.
|
|
592
592
|
* @returns This builder for chaining.
|
|
593
593
|
*/
|
|
594
|
-
updateById(elementId: string, updater: (current:
|
|
594
|
+
updateById(elementId: string, updater: (current: a) => a): this;
|
|
595
595
|
/** Return the current elements array. */
|
|
596
|
-
project():
|
|
596
|
+
project(): a[];
|
|
597
597
|
/** Navigate back to the slide builder. */
|
|
598
598
|
done(): PptxSlideBuilder;
|
|
599
599
|
}
|
|
@@ -608,7 +608,7 @@ declare class PptxSlideNotesBuilder {
|
|
|
608
608
|
* @param slideValue - The slide whose notes are being modified.
|
|
609
609
|
* @param slideBuilder - The parent slide builder for chaining.
|
|
610
610
|
*/
|
|
611
|
-
constructor(slideValue:
|
|
611
|
+
constructor(slideValue: P, slideBuilder: PptxSlideBuilder);
|
|
612
612
|
/**
|
|
613
613
|
* Append text to existing notes (separated by newline).
|
|
614
614
|
* @param text - The text to append.
|
|
@@ -757,10 +757,10 @@ interface IPptxHandlerRuntime {
|
|
|
757
757
|
setTemplateBackground(path: string, backgroundColor: string | undefined): void;
|
|
758
758
|
setPresentationTheme(themePath: string, applyToAllMasters?: boolean): Promise<void>;
|
|
759
759
|
getTemplateBackgroundColor(path: string): string | undefined;
|
|
760
|
-
updateThemeColorScheme(colorScheme:
|
|
761
|
-
updateThemeFontScheme(fontScheme:
|
|
760
|
+
updateThemeColorScheme(colorScheme: e): Promise<void>;
|
|
761
|
+
updateThemeFontScheme(fontScheme: f): Promise<void>;
|
|
762
762
|
updateThemeName(name: string): Promise<void>;
|
|
763
|
-
applyTheme(colorScheme:
|
|
763
|
+
applyTheme(colorScheme: e, fontScheme: f, themeName?: string): Promise<void>;
|
|
764
764
|
load(data: ArrayBuffer, options?: PptxHandlerLoadOptions): Promise<m>;
|
|
765
765
|
getChartDataForGraphicFrame(slidePath: string, graphicFrame: X | undefined): Promise<p | undefined>;
|
|
766
766
|
getSmartArtDataForGraphicFrame(slidePath: string, graphicFrame: X | undefined): Promise<q | undefined>;
|
|
@@ -770,8 +770,8 @@ interface IPptxHandlerRuntime {
|
|
|
770
770
|
* Returns undefined if the file is not found.
|
|
771
771
|
*/
|
|
772
772
|
getMediaArrayBuffer(mediaPath: string): Promise<ArrayBuffer | undefined>;
|
|
773
|
-
save(slides:
|
|
774
|
-
exportSlides(slides:
|
|
773
|
+
save(slides: P[], options?: PptxHandlerSaveOptions): Promise<Uint8Array>;
|
|
774
|
+
exportSlides(slides: P[], options: L): Promise<Map<number, Uint8Array>>;
|
|
775
775
|
/**
|
|
776
776
|
* Get the available slide layouts for a specific slide, based on the
|
|
777
777
|
* slide's master. Scans the slide master's relationships to find all
|
|
@@ -781,7 +781,7 @@ interface IPptxHandlerRuntime {
|
|
|
781
781
|
* @param slides - Current slides array.
|
|
782
782
|
* @returns Array of layout options belonging to the same slide master.
|
|
783
783
|
*/
|
|
784
|
-
getAvailableLayoutsForSlide(slideIndex: number, slides:
|
|
784
|
+
getAvailableLayoutsForSlide(slideIndex: number, slides: P[]): Promise<o[]>;
|
|
785
785
|
/**
|
|
786
786
|
* Resolve the editable template (master + layout) elements a slide
|
|
787
787
|
* inherits, each carrying a `master-` / `layout-` prefixed id. Excludes
|
|
@@ -789,7 +789,7 @@ interface IPptxHandlerRuntime {
|
|
|
789
789
|
*
|
|
790
790
|
* @param slideId - The slide's archive path (`PptxSlide.id`).
|
|
791
791
|
*/
|
|
792
|
-
getTemplateElementsForSlide(slideId: string): Promise<
|
|
792
|
+
getTemplateElementsForSlide(slideId: string): Promise<a[]>;
|
|
793
793
|
/**
|
|
794
794
|
* Scan the loaded PPTX archive for all theme parts.
|
|
795
795
|
*/
|
|
@@ -808,7 +808,7 @@ interface IPptxHandlerRuntime {
|
|
|
808
808
|
* @param slides - Current slides array.
|
|
809
809
|
* @returns The updated slide with new layout path, name, and background.
|
|
810
810
|
*/
|
|
811
|
-
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides:
|
|
811
|
+
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides: P[]): Promise<P>;
|
|
812
812
|
}
|
|
813
813
|
|
|
814
814
|
/**
|
|
@@ -997,7 +997,7 @@ declare class PptxHandlerCore {
|
|
|
997
997
|
* // => void — colour scheme updated in the in-memory theme XML
|
|
998
998
|
* ```
|
|
999
999
|
*/
|
|
1000
|
-
updateThemeColorScheme(colorScheme:
|
|
1000
|
+
updateThemeColorScheme(colorScheme: e): Promise<void>;
|
|
1001
1001
|
/**
|
|
1002
1002
|
* Update the theme’s font scheme (heading + body typefaces).
|
|
1003
1003
|
*
|
|
@@ -1012,7 +1012,7 @@ declare class PptxHandlerCore {
|
|
|
1012
1012
|
* // => void — font scheme updated in the in-memory theme XML
|
|
1013
1013
|
* ```
|
|
1014
1014
|
*/
|
|
1015
|
-
updateThemeFontScheme(fontScheme:
|
|
1015
|
+
updateThemeFontScheme(fontScheme: f): Promise<void>;
|
|
1016
1016
|
/**
|
|
1017
1017
|
* Rename the presentation theme.
|
|
1018
1018
|
*
|
|
@@ -1039,7 +1039,7 @@ declare class PptxHandlerCore {
|
|
|
1039
1039
|
* // => void — colour scheme, font scheme, and name applied atomically
|
|
1040
1040
|
* ```
|
|
1041
1041
|
*/
|
|
1042
|
-
applyTheme(colorScheme:
|
|
1042
|
+
applyTheme(colorScheme: e, fontScheme: f, themeName?: string): Promise<void>;
|
|
1043
1043
|
/**
|
|
1044
1044
|
* Switch the presentation's theme, updating both the underlying XML and
|
|
1045
1045
|
* re-resolving all element colours in-place.
|
|
@@ -1070,7 +1070,7 @@ declare class PptxHandlerCore {
|
|
|
1070
1070
|
* // => PptxData with all colours updated to the Ion theme
|
|
1071
1071
|
* ```
|
|
1072
1072
|
*/
|
|
1073
|
-
switchTheme(data: m, colorScheme:
|
|
1073
|
+
switchTheme(data: m, colorScheme: e, fontScheme?: f, themeName?: string): Promise<m>;
|
|
1074
1074
|
/**
|
|
1075
1075
|
* Apply a built-in theme preset to the presentation.
|
|
1076
1076
|
*
|
|
@@ -1155,7 +1155,7 @@ declare class PptxHandlerCore {
|
|
|
1155
1155
|
* // => Uint8Array written to disk as a valid .pptx file
|
|
1156
1156
|
* ```
|
|
1157
1157
|
*/
|
|
1158
|
-
save(slides:
|
|
1158
|
+
save(slides: P[], options?: PptxHandlerSaveOptions): Promise<Uint8Array>;
|
|
1159
1159
|
/**
|
|
1160
1160
|
* Serialise slides and then encrypt the output with a password.
|
|
1161
1161
|
*
|
|
@@ -1175,7 +1175,7 @@ declare class PptxHandlerCore {
|
|
|
1175
1175
|
* // => Encrypted OLE2 file requiring password to open
|
|
1176
1176
|
* ```
|
|
1177
1177
|
*/
|
|
1178
|
-
saveEncrypted(slides:
|
|
1178
|
+
saveEncrypted(slides: P[], password: string, options?: PptxHandlerSaveOptions & {
|
|
1179
1179
|
encryption?: EncryptionOptions;
|
|
1180
1180
|
}): Promise<Uint8Array>;
|
|
1181
1181
|
/**
|
|
@@ -1196,7 +1196,7 @@ declare class PptxHandlerCore {
|
|
|
1196
1196
|
* // => ["Title Slide", "Title and Content", "Blank", ...]
|
|
1197
1197
|
* ```
|
|
1198
1198
|
*/
|
|
1199
|
-
getAvailableLayoutsForSlide(slideIndex: number, slides:
|
|
1199
|
+
getAvailableLayoutsForSlide(slideIndex: number, slides: P[]): Promise<o[]>;
|
|
1200
1200
|
/**
|
|
1201
1201
|
* Resolve the editable template (master + layout) elements a slide
|
|
1202
1202
|
* inherits, each carrying a `master-` / `layout-` prefixed id.
|
|
@@ -1227,7 +1227,7 @@ declare class PptxHandlerCore {
|
|
|
1227
1227
|
* }
|
|
1228
1228
|
* ```
|
|
1229
1229
|
*/
|
|
1230
|
-
getTemplateElementsForSlide(slideId: string): Promise<
|
|
1230
|
+
getTemplateElementsForSlide(slideId: string): Promise<a[]>;
|
|
1231
1231
|
/**
|
|
1232
1232
|
* Apply a different layout to an existing slide.
|
|
1233
1233
|
*
|
|
@@ -1253,7 +1253,7 @@ declare class PptxHandlerCore {
|
|
|
1253
1253
|
* // => "Two Content"
|
|
1254
1254
|
* ```
|
|
1255
1255
|
*/
|
|
1256
|
-
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides:
|
|
1256
|
+
applyLayoutToSlide(slideIndex: number, layoutPath: string, slides: P[]): Promise<P>;
|
|
1257
1257
|
/**
|
|
1258
1258
|
* Scan the loaded PPTX archive for all theme parts (`ppt/theme/theme*.xml`)
|
|
1259
1259
|
* and return their paths and display names.
|
|
@@ -1283,7 +1283,7 @@ declare class PptxHandlerCore {
|
|
|
1283
1283
|
* // => Map<number, Uint8Array> — one standalone .pptx per exported slide
|
|
1284
1284
|
* ```
|
|
1285
1285
|
*/
|
|
1286
|
-
exportSlides(slides:
|
|
1286
|
+
exportSlides(slides: P[], options: L): Promise<Map<number, Uint8Array>>;
|
|
1287
1287
|
}
|
|
1288
1288
|
|
|
1289
1289
|
/**
|
|
@@ -1438,7 +1438,7 @@ interface ThemeSwitchingResult {
|
|
|
1438
1438
|
* Apply a custom colour scheme (and optional font scheme) to the
|
|
1439
1439
|
* current presentation.
|
|
1440
1440
|
*/
|
|
1441
|
-
switchToCustom: (colorScheme:
|
|
1441
|
+
switchToCustom: (colorScheme: e, fontScheme?: f, themeName?: string) => Promise<void>;
|
|
1442
1442
|
/**
|
|
1443
1443
|
* Get the preset matching the current presentation theme (if any).
|
|
1444
1444
|
* Returns undefined if the current theme does not match a built-in preset.
|