@a3s-lab/office 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -8
- package/dist/0~3539.js +2 -2
- package/dist/0~3557.js +1 -1
- package/dist/0~3635.js +1 -1
- package/dist/0~5809.js +123 -0
- package/dist/0~7048.js +1 -2
- package/dist/{0~7614.js → 0~7828.js} +376 -5
- package/dist/{0~6090.js → 0~8136.js} +71 -2
- package/dist/{0~4595.js → 0~9073.js} +3 -72
- package/dist/0~9445.js +1 -1
- package/dist/0~document-editor.js +2 -2
- package/dist/0~markdown-editor.js +2 -2
- package/dist/0~pdf-page-organization-engine.js +187 -0
- package/dist/0~pdf-viewer.js +1018 -30
- package/dist/0~presentation-editor.js +580 -68
- package/dist/0~spreadsheet-editor.js +2 -2
- package/dist/0~work-pptx-export.js +50 -14
- package/dist/0~work-pptx-import.js +21 -9
- package/dist/4121.js +122 -1
- package/dist/4560.js +33 -0
- package/dist/core.d.ts +1 -0
- package/dist/internal/features/work/editors/pdf-editor-extensions.d.ts +11 -0
- package/dist/internal/features/work/editors/pdf-page-organization-engine.d.ts +2 -0
- package/dist/internal/features/work/editors/pdf-page-organization-plan.d.ts +10 -0
- package/dist/internal/features/work/editors/pdf-page-organization-types.d.ts +68 -0
- package/dist/internal/features/work/editors/pdf-page-organization-worker-client.d.ts +2 -0
- package/dist/internal/features/work/editors/pdf-page-organization-worker-protocol.d.ts +13 -0
- package/dist/internal/features/work/editors/pdf-page-organization.d.ts +3 -0
- package/dist/internal/features/work/editors/pdf-page-organization.worker.d.ts +1 -0
- package/dist/internal/features/work/editors/pdf-page-organizer-dialog.d.ts +17 -0
- package/dist/internal/features/work/editors/pdf-thumbnail-rail.d.ts +4 -0
- package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/pdf-viewer.d.ts +3 -1
- package/dist/internal/features/work/editors/presentation-animation-panel.d.ts +11 -0
- package/dist/internal/features/work/editors/presentation-command-types.d.ts +16 -1
- package/dist/internal/features/work/editors/presentation-presenter-view.d.ts +2 -1
- package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +11 -3
- package/dist/internal/features/work/editors/use-pdf-page-organization.d.ts +38 -0
- package/dist/internal/features/work/editors/use-presentation-animation-commands.d.ts +15 -0
- package/dist/internal/features/work/work-pptx-animation.d.ts +13 -0
- package/dist/internal/features/work/work-pptx-groups.d.ts +4 -0
- package/dist/internal/features/work/work-presentation-animation-constraints.d.ts +4 -0
- package/dist/internal/features/work/work-presentation-animation.d.ts +20 -0
- package/dist/internal/features/work/work-presentation-clipboard.d.ts +10 -3
- package/dist/internal/features/work/work-types.d.ts +17 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/pdf-page-organization.worker.js +19667 -0
- package/dist/pdf-page-organization.worker.js.LICENSE.txt +14 -0
- package/dist/react.d.ts +1 -0
- package/dist/styles.css +438 -0
- package/dist/vue.d.ts +3 -1
- package/dist/vue.js +2 -0
- package/dist/web-component.d.ts +3 -1
- package/dist/web-component.js +9 -0
- package/docs/latest/en/browser-editor-architecture.md +29 -6
- package/package.json +8 -1
- package/dist/0~work-presentation-transition.js +0 -38
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PdfPageOrganizationErrorCode, PdfPageOrganizationJob, PdfPageOrganizationResult } from './pdf-page-organization-types';
|
|
2
|
+
export interface PdfPageOrganizationWorkerRequest {
|
|
3
|
+
job: PdfPageOrganizationJob;
|
|
4
|
+
kind: 'run';
|
|
5
|
+
}
|
|
6
|
+
export type PdfPageOrganizationWorkerResponse = {
|
|
7
|
+
kind: 'success';
|
|
8
|
+
result: PdfPageOrganizationResult;
|
|
9
|
+
} | {
|
|
10
|
+
code: PdfPageOrganizationErrorCode;
|
|
11
|
+
kind: 'failure';
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { applyPdfPageOrganizationJob } from './pdf-page-organization-engine';
|
|
2
|
+
export { reorderedPdfPageIndexes, validatedPdfInsertionIndex, validatedPdfPageIndexes, validatedPdfPageOrder, validatedPdfPageSize, validatedPdfSplitBoundaries, } from './pdf-page-organization-plan';
|
|
3
|
+
export * from './pdf-page-organization-types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PluginRegistry } from '@embedpdf/react-pdf-viewer';
|
|
2
|
+
import type { PdfEditorCanCommands, PdfEditorCommands } from './pdf-editor-extensions';
|
|
3
|
+
import type { PdfPageOrganizationControllerError, PdfPageOrganizationControllerState } from './use-pdf-page-organization';
|
|
4
|
+
export interface PdfPageOrganizerDialogProps {
|
|
5
|
+
busy: boolean;
|
|
6
|
+
can: PdfEditorCanCommands;
|
|
7
|
+
commands: PdfEditorCommands;
|
|
8
|
+
currentPage: number;
|
|
9
|
+
diagnostics: PdfPageOrganizationControllerState['diagnostics'];
|
|
10
|
+
error: PdfPageOrganizationControllerError | null;
|
|
11
|
+
registry: PluginRegistry;
|
|
12
|
+
restoreFocusTarget: () => HTMLElement | null;
|
|
13
|
+
totalPages: number;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
onDismissError: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function PdfPageOrganizerDialog({ busy, can, commands, currentPage, diagnostics, error, registry, restoreFocusTarget, totalPages, onClose, onDismissError, }: PdfPageOrganizerDialogProps): import("react").JSX.Element;
|
|
@@ -23,4 +23,8 @@ export declare function calculatePdfThumbnailRange({ anchorIndex, itemHeight, to
|
|
|
23
23
|
totalPages: number;
|
|
24
24
|
viewportHeight: number;
|
|
25
25
|
}): PdfThumbnailRange;
|
|
26
|
+
export declare function usePdfThumbnailSource(registry: PluginRegistry, page: number): {
|
|
27
|
+
sourceUrl: string | null;
|
|
28
|
+
state: 'error' | 'loading' | 'ready';
|
|
29
|
+
};
|
|
26
30
|
export {};
|
|
@@ -9,11 +9,12 @@ interface PdfPageNavigationControl {
|
|
|
9
9
|
onOpen: () => void;
|
|
10
10
|
toggleRef: RefObject<HTMLButtonElement | null>;
|
|
11
11
|
}
|
|
12
|
-
export declare function PdfToolbar({ annotationState, can, commands, editable, pageNavigation, saveAvailable, saveLabel, saveState, searchInputRef, state, }: {
|
|
12
|
+
export declare function PdfToolbar({ annotationState, can, commands, editable, pageOrganizationAvailable, pageNavigation, saveAvailable, saveLabel, saveState, searchInputRef, state, }: {
|
|
13
13
|
annotationState: PdfAnnotationControllerState;
|
|
14
14
|
can: PdfEditorCanCommands;
|
|
15
15
|
commands: PdfEditorCommands;
|
|
16
16
|
editable: boolean;
|
|
17
|
+
pageOrganizationAvailable?: boolean;
|
|
17
18
|
pageNavigation?: PdfPageNavigationControl;
|
|
18
19
|
saveAvailable?: boolean;
|
|
19
20
|
saveLabel: string;
|
|
@@ -2,6 +2,7 @@ import { type UISchema } from '@embedpdf/react-pdf-viewer';
|
|
|
2
2
|
import type { WorkOfficeCollaborationSession } from '../../../collaboration/office-collaboration';
|
|
3
3
|
import type { WorkPdfCollaborationContent } from '../../../collaboration/office-pdf-collaboration-types';
|
|
4
4
|
import type { PdfEvidenceOverlay, PdfEvidenceRegion } from './pdf-evidence-contract';
|
|
5
|
+
import { type PdfPageOrganizationExport } from './use-pdf-page-organization';
|
|
5
6
|
export declare const a3sPdfUiSchema: UISchema;
|
|
6
7
|
export interface PdfViewerProps {
|
|
7
8
|
collaboration?: WorkOfficeCollaborationSession;
|
|
@@ -11,6 +12,7 @@ export interface PdfViewerProps {
|
|
|
11
12
|
onCollaborationChange?: (content: WorkPdfCollaborationContent) => void;
|
|
12
13
|
onEvidenceRegionSelect?: (region: PdfEvidenceRegion) => void;
|
|
13
14
|
onPageChange?: (pageNumber: number) => void;
|
|
15
|
+
onPageExport?: (files: readonly PdfPageOrganizationExport[]) => boolean | Promise<boolean>;
|
|
14
16
|
onSave?: (pdf: Blob) => Promise<boolean>;
|
|
15
17
|
saveLabel?: string;
|
|
16
18
|
selectedEvidenceRegionId?: string;
|
|
@@ -18,4 +20,4 @@ export interface PdfViewerProps {
|
|
|
18
20
|
wasmUrl?: string;
|
|
19
21
|
worker?: boolean;
|
|
20
22
|
}
|
|
21
|
-
export declare function PdfViewer({ collaboration, evidenceOverlay, fileName, loadSource, onCollaborationChange, onEvidenceRegionSelect, onPageChange, onSave, saveLabel, selectedEvidenceRegionId, sourceKey, wasmUrl, worker, }: PdfViewerProps): import("react").JSX.Element;
|
|
23
|
+
export declare function PdfViewer({ collaboration, evidenceOverlay, fileName, loadSource, onCollaborationChange, onEvidenceRegionSelect, onPageChange, onPageExport, onSave, saveLabel, selectedEvidenceRegionId, sourceKey, wasmUrl, worker, }: PdfViewerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WorkSlideAnimation, WorkSlideAnimationEffect } from '../work-types';
|
|
2
|
+
export declare function PresentationAnimationPanel({ animation, canMove, canPreview, editable, onMove, onPreview, onSetEffect, onUpdate, }: {
|
|
3
|
+
animation: WorkSlideAnimation | undefined;
|
|
4
|
+
canMove: (direction: -1 | 1) => boolean;
|
|
5
|
+
canPreview: boolean;
|
|
6
|
+
editable: boolean;
|
|
7
|
+
onMove: (direction: -1 | 1) => void;
|
|
8
|
+
onPreview: () => void;
|
|
9
|
+
onSetEffect: (effect: WorkSlideAnimationEffect | undefined) => void;
|
|
10
|
+
onUpdate: (patch: Partial<WorkSlideAnimation>) => void;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OfficeKernelPresentationAlignment } from '../../../kernel/office-kernel-protocol';
|
|
2
|
-
import type { WorkPresentationContent, WorkSlideElement, WorkSlideTransition, WorkSlideTextRun } from '../work-types';
|
|
2
|
+
import type { WorkPresentationContent, WorkSlideAnimation, WorkSlideAnimationEffect, WorkSlideElement, WorkSlideTransition, WorkSlideTextRun } from '../work-types';
|
|
3
3
|
import type { OfficeEditorCanCommands } from './office-editor-extension';
|
|
4
4
|
import type { PresentationDesignMode } from './presentation-editor-types';
|
|
5
5
|
import type { PresentationDistribution } from './presentation-selection';
|
|
@@ -37,9 +37,11 @@ export interface PresentationEditorCommands {
|
|
|
37
37
|
groupElements: () => boolean;
|
|
38
38
|
instantiatePlaceholder: (definition: WorkSlideElement) => PresentationCommandResult;
|
|
39
39
|
locatePresentationComment: (slideId: string, commentId: string) => PresentationCommandResult;
|
|
40
|
+
moveEntranceAnimation: (direction: -1 | 1) => PresentationCommandResult;
|
|
40
41
|
nudgeSelection: (key: string, distance: number) => boolean;
|
|
41
42
|
openComment: (commentId: string) => PresentationCommandResult;
|
|
42
43
|
pasteSelection: () => boolean;
|
|
44
|
+
previewAnimations: () => PresentationCommandResult;
|
|
43
45
|
redo: () => boolean;
|
|
44
46
|
renamePresentationLayout: (name: string) => PresentationCommandResult;
|
|
45
47
|
renamePresentationMaster: (name: string) => PresentationCommandResult;
|
|
@@ -50,6 +52,7 @@ export interface PresentationEditorCommands {
|
|
|
50
52
|
selectSlide: (slideId: string, returnToSlideMode?: boolean) => PresentationCommandResult;
|
|
51
53
|
setPresentationContent: (content: WorkPresentationContent) => PresentationCommandResult;
|
|
52
54
|
setBackground: (color: string) => PresentationCommandResult;
|
|
55
|
+
setEntranceAnimation: (effect: WorkSlideAnimationEffect | undefined) => PresentationCommandResult;
|
|
53
56
|
setPresentationLayoutBackground: (color: string | undefined) => PresentationCommandResult;
|
|
54
57
|
setPresentationMasterBackground: (color: string) => PresentationCommandResult;
|
|
55
58
|
setTransition: (transition: WorkSlideTransition | undefined) => PresentationCommandResult;
|
|
@@ -66,6 +69,7 @@ export interface PresentationEditorCommands {
|
|
|
66
69
|
updateElement: (patch: Partial<WorkSlideElement>, options?: {
|
|
67
70
|
restoreTextFocus?: boolean;
|
|
68
71
|
}) => PresentationCommandResult;
|
|
72
|
+
updateEntranceAnimation: (patch: Partial<WorkSlideAnimation>) => PresentationCommandResult;
|
|
69
73
|
updateNotes: (notes: string) => PresentationCommandResult;
|
|
70
74
|
updatePresentationComment: (slideId: string, commentId: string, text: string) => PresentationCommandResult;
|
|
71
75
|
updateTextElement: (elementId: string, value: {
|
|
@@ -107,6 +111,16 @@ export interface PresentationSlideCommandPort {
|
|
|
107
111
|
setTransition: (transition: WorkSlideTransition | undefined) => PresentationCommandResult;
|
|
108
112
|
updateNotes: (notes: string) => PresentationCommandResult;
|
|
109
113
|
}
|
|
114
|
+
export interface PresentationAnimationCommandPort {
|
|
115
|
+
canMoveEntranceAnimation: (direction: -1 | 1) => boolean;
|
|
116
|
+
canPreviewAnimations: boolean;
|
|
117
|
+
canSetEntranceAnimation: boolean;
|
|
118
|
+
canUpdateEntranceAnimation: boolean;
|
|
119
|
+
moveEntranceAnimation: (direction: -1 | 1) => PresentationCommandResult;
|
|
120
|
+
previewAnimations: () => PresentationCommandResult;
|
|
121
|
+
setEntranceAnimation: (effect: WorkSlideAnimationEffect | undefined) => PresentationCommandResult;
|
|
122
|
+
updateEntranceAnimation: (patch: Partial<WorkSlideAnimation>) => PresentationCommandResult;
|
|
123
|
+
}
|
|
110
124
|
export interface PresentationInsertCommandPort {
|
|
111
125
|
enabled: boolean;
|
|
112
126
|
addChart: () => PresentationCommandResult;
|
|
@@ -192,6 +206,7 @@ export interface PresentationKeyboardCommandPort {
|
|
|
192
206
|
selectedElementCount: number;
|
|
193
207
|
}
|
|
194
208
|
export interface PresentationCommandContext {
|
|
209
|
+
animations: PresentationAnimationCommandPort;
|
|
195
210
|
clipboard: PresentationClipboardCommandPort;
|
|
196
211
|
design: PresentationDesignCommandPort;
|
|
197
212
|
document: PresentationDocumentCommandPort;
|
|
@@ -4,7 +4,8 @@ export interface PresentationTimerController {
|
|
|
4
4
|
runningSinceMilliseconds: number | null;
|
|
5
5
|
}
|
|
6
6
|
export declare function createPresentationTimerController(now?: number): PresentationTimerController;
|
|
7
|
-
export declare function PresentationPresenterView({ content, slide, nextSlide, index, total, aspectRatio, timer, }: {
|
|
7
|
+
export declare function PresentationPresenterView({ animationCueIndex, content, slide, nextSlide, index, total, aspectRatio, timer, }: {
|
|
8
|
+
animationCueIndex?: number;
|
|
8
9
|
content: WorkPresentationContent;
|
|
9
10
|
slide: WorkSlide;
|
|
10
11
|
nextSlide?: WorkSlide;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { type WorkPresentationDesignContent } from '../work-presentation-layouts';
|
|
2
|
-
import type { WorkPresentationContent, WorkSlide, WorkSlideElement } from '../work-types';
|
|
3
|
-
export declare function SlideCanvas({ content, designContent, slide, interactive, aspectRatio, showPlaceholders, }: {
|
|
2
|
+
import type { WorkPresentationContent, WorkSlide, WorkSlideAnimation, WorkSlideElement } from '../work-types';
|
|
3
|
+
export declare function SlideCanvas({ content, designContent, slide, interactive, aspectRatio, animationCueIndex, showPlaceholders, }: {
|
|
4
4
|
content?: WorkPresentationContent;
|
|
5
5
|
designContent?: WorkPresentationDesignContent;
|
|
6
6
|
slide: WorkSlide;
|
|
7
7
|
interactive: boolean;
|
|
8
8
|
aspectRatio: string;
|
|
9
|
+
animationCueIndex?: number;
|
|
9
10
|
showPlaceholders?: boolean;
|
|
10
11
|
}): import("react").JSX.Element;
|
|
11
|
-
export declare function SlideElementPreview({ element, origin, showPlaceholder, }: {
|
|
12
|
+
export declare function SlideElementPreview({ animationPlayback, element, origin, showPlaceholder, }: {
|
|
13
|
+
animationPlayback?: SlideElementAnimationPlayback;
|
|
12
14
|
element: WorkSlideElement;
|
|
13
15
|
origin: 'inherited' | 'slide';
|
|
14
16
|
showPlaceholder?: boolean;
|
|
@@ -18,6 +20,11 @@ export declare function EditableSlideTable({ element, onChange, }: {
|
|
|
18
20
|
onChange: (rows: string[][]) => void;
|
|
19
21
|
}): import("react").JSX.Element | null;
|
|
20
22
|
export declare function slideElementStyle(element: WorkSlideElement): React.CSSProperties;
|
|
23
|
+
interface SlideElementAnimationPlayback {
|
|
24
|
+
animation: WorkSlideAnimation;
|
|
25
|
+
startOffsetMs: number;
|
|
26
|
+
state: 'finished' | 'pending' | 'playing';
|
|
27
|
+
}
|
|
21
28
|
export declare function slideTextStyle(element: WorkSlideElement): React.CSSProperties;
|
|
22
29
|
export declare function SlideElementTextPreview({ element, showPlaceholder, }: {
|
|
23
30
|
element: WorkSlideElement;
|
|
@@ -26,3 +33,4 @@ export declare function SlideElementTextPreview({ element, showPlaceholder, }: {
|
|
|
26
33
|
export declare function SlideTablePreview({ element }: {
|
|
27
34
|
element: WorkSlideElement;
|
|
28
35
|
}): import("react").JSX.Element | null;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PdfPageOrganizationDiagnostic, PdfPageOrganizationErrorCode, PdfPageOrganizationExportOperation, PdfPageOrganizationJob, PdfPageOrganizationMutation, PdfPageOrganizationResult } from './pdf-page-organization';
|
|
2
|
+
export interface PdfPageOrganizationExport {
|
|
3
|
+
fileName: string;
|
|
4
|
+
pageCount: number;
|
|
5
|
+
pdf: Blob;
|
|
6
|
+
}
|
|
7
|
+
export interface PdfPageOrganizationControllerError {
|
|
8
|
+
code: PdfPageOrganizationErrorCode;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PdfPageOrganizationControllerState {
|
|
12
|
+
available: boolean;
|
|
13
|
+
busy: boolean;
|
|
14
|
+
canRedo: boolean;
|
|
15
|
+
canUndo: boolean;
|
|
16
|
+
diagnostics: readonly PdfPageOrganizationDiagnostic[];
|
|
17
|
+
error: PdfPageOrganizationControllerError | null;
|
|
18
|
+
revision: number;
|
|
19
|
+
}
|
|
20
|
+
export interface PdfPageOrganizationController {
|
|
21
|
+
state: PdfPageOrganizationControllerState;
|
|
22
|
+
dismissError: () => void;
|
|
23
|
+
exportPages: (operation: PdfPageOrganizationExportOperation) => Promise<boolean>;
|
|
24
|
+
mutate: (mutation: PdfPageOrganizationMutation, importSource?: Blob) => Promise<boolean>;
|
|
25
|
+
redo: () => void;
|
|
26
|
+
undo: () => void;
|
|
27
|
+
}
|
|
28
|
+
interface UsePdfPageOrganizationOptions {
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
fileName: string;
|
|
31
|
+
onExport?: (files: readonly PdfPageOrganizationExport[]) => boolean | Promise<boolean>;
|
|
32
|
+
readCurrentSource: () => Promise<Blob>;
|
|
33
|
+
replaceSource: (source: Blob) => void;
|
|
34
|
+
resetKey?: string;
|
|
35
|
+
}
|
|
36
|
+
type RunPdfPageOrganizationJob = (job: PdfPageOrganizationJob, signal?: AbortSignal) => Promise<PdfPageOrganizationResult>;
|
|
37
|
+
export declare function usePdfPageOrganization(options: UsePdfPageOrganizationOptions, runJob?: RunPdfPageOrganizationJob): PdfPageOrganizationController;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WorkPresentationContent, WorkSlide, WorkSlideAnimation, WorkSlideAnimationEffect } from '../work-types';
|
|
2
|
+
export interface PresentationAnimationCommands {
|
|
3
|
+
canMoveEntranceAnimation: (direction: -1 | 1) => boolean;
|
|
4
|
+
canSetEntranceAnimation: boolean;
|
|
5
|
+
canUpdateEntranceAnimation: boolean;
|
|
6
|
+
moveEntranceAnimation: (direction: -1 | 1) => boolean;
|
|
7
|
+
setEntranceAnimation: (effect: WorkSlideAnimationEffect | undefined) => boolean;
|
|
8
|
+
updateEntranceAnimation: (patch: Partial<WorkSlideAnimation>) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function usePresentationAnimationCommands({ content, onChange, selectedElementId, selectedSlide, }: {
|
|
11
|
+
content: WorkPresentationContent;
|
|
12
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
13
|
+
selectedElementId: string | undefined;
|
|
14
|
+
selectedSlide: WorkSlide;
|
|
15
|
+
}): PresentationAnimationCommands;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PptxGroupExportRegistry } from './work-pptx-groups';
|
|
2
|
+
import type { WorkSlide, WorkSlideAnimation } from './work-types';
|
|
3
|
+
interface PptxAnimationDiagnostic {
|
|
4
|
+
code: string;
|
|
5
|
+
message: string;
|
|
6
|
+
}
|
|
7
|
+
interface PptxAnimationReadResult {
|
|
8
|
+
animations: WorkSlideAnimation[];
|
|
9
|
+
diagnostics: PptxAnimationDiagnostic[];
|
|
10
|
+
}
|
|
11
|
+
export declare function readPptxAnimations(document: Document, elementIdByPptxShapeId: ReadonlyMap<string, string>): PptxAnimationReadResult;
|
|
12
|
+
export declare function patchPptxAnimations(buffer: ArrayBuffer, slides: readonly WorkSlide[], registry: PptxGroupExportRegistry): Promise<ArrayBuffer>;
|
|
13
|
+
export {};
|
|
@@ -7,11 +7,15 @@ interface PptxExportBinding {
|
|
|
7
7
|
marker: string;
|
|
8
8
|
}
|
|
9
9
|
export declare class PptxGroupExportRegistry {
|
|
10
|
+
private readonly animatedElementKeys;
|
|
10
11
|
private readonly bindings;
|
|
12
|
+
private readonly bindingsByElement;
|
|
11
13
|
private readonly roleCounts;
|
|
12
14
|
private markerSequence;
|
|
13
15
|
get size(): number;
|
|
16
|
+
registerAnimatedElements(scope: string, elementIds: Iterable<string>): void;
|
|
14
17
|
objectName(scope: string, element: WorkSlideElement, role: PptxExportObjectRole): string | undefined;
|
|
18
|
+
markerForElement(scope: string, elementId: string): string | undefined;
|
|
15
19
|
binding(marker: string): PptxExportBinding | undefined;
|
|
16
20
|
values(): IterableIterator<PptxExportBinding>;
|
|
17
21
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkSlide, WorkSlideAnimation, WorkSlideAnimationEffect } from './work-types';
|
|
2
|
+
export { WORK_SLIDE_ANIMATION_LIMIT, WORK_SLIDE_ANIMATION_MAX_DELAY_MS, WORK_SLIDE_ANIMATION_MAX_DURATION_MS, WORK_SLIDE_ANIMATION_MIN_DURATION_MS, } from './work-presentation-animation-constraints';
|
|
3
|
+
export interface WorkSlideAnimationCueItem {
|
|
4
|
+
animation: WorkSlideAnimation;
|
|
5
|
+
endOffsetMs: number;
|
|
6
|
+
startOffsetMs: number;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkSlideAnimationCue {
|
|
9
|
+
automatic: boolean;
|
|
10
|
+
items: WorkSlideAnimationCueItem[];
|
|
11
|
+
totalDurationMs: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function createWorkSlideAnimation(elementId: string, effect: WorkSlideAnimationEffect, previous?: WorkSlideAnimation): WorkSlideAnimation;
|
|
14
|
+
export declare function normalizeWorkSlideAnimation(animation: WorkSlideAnimation): WorkSlideAnimation;
|
|
15
|
+
export declare function workSlideAnimationForElement(slide: WorkSlide, elementId: string | undefined): WorkSlideAnimation | undefined;
|
|
16
|
+
export declare function workSlideAnimationIndex(slide: WorkSlide, animationId: string | undefined): number;
|
|
17
|
+
export declare function workSlideAnimationCues(animations: readonly WorkSlideAnimation[] | undefined): WorkSlideAnimationCue[];
|
|
18
|
+
export declare function initialWorkSlideAnimationCueIndex(cues: readonly WorkSlideAnimationCue[]): number;
|
|
19
|
+
export declare function removeWorkSlideAnimationsForElements(slide: WorkSlide, elementIds: ReadonlySet<string>): WorkSlide;
|
|
20
|
+
export declare function remapWorkSlideAnimations(animations: readonly WorkSlideAnimation[] | undefined, elementIds: ReadonlyMap<string, string>): WorkSlideAnimation[] | undefined;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type { WorkSlide, WorkSlideElement } from './work-types';
|
|
1
|
+
import type { WorkSlide, WorkSlideAnimation, WorkSlideElement } from './work-types';
|
|
2
2
|
export declare const PRESENTATION_OBJECT_OFFSET_STEP = 5;
|
|
3
3
|
export type WorkPresentationClipboardPayload = {
|
|
4
4
|
kind: 'element';
|
|
5
5
|
element: WorkSlideElement;
|
|
6
|
+
animation?: WorkSlideAnimation;
|
|
6
7
|
} | {
|
|
7
8
|
kind: 'elements';
|
|
8
9
|
elements: WorkSlideElement[];
|
|
10
|
+
animations?: WorkSlideAnimation[];
|
|
9
11
|
} | {
|
|
10
12
|
kind: 'slide';
|
|
11
13
|
slide: WorkSlide;
|
|
@@ -14,13 +16,18 @@ export interface WorkPresentationClipboardRead {
|
|
|
14
16
|
payload: WorkPresentationClipboardPayload;
|
|
15
17
|
offset: number;
|
|
16
18
|
}
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
+
export interface WorkPresentationElementPaste {
|
|
20
|
+
animations?: WorkSlideAnimation[];
|
|
21
|
+
elements: WorkSlideElement[];
|
|
22
|
+
}
|
|
23
|
+
export declare function copyPresentationElement(element: WorkSlideElement, animation?: WorkSlideAnimation): void;
|
|
24
|
+
export declare function copyPresentationElements(elements: readonly WorkSlideElement[], animations?: readonly WorkSlideAnimation[]): void;
|
|
19
25
|
export declare function copyPresentationSlide(slide: WorkSlide): void;
|
|
20
26
|
export declare function takePresentationClipboard(): WorkPresentationClipboardRead | null;
|
|
21
27
|
export declare function hasPresentationClipboard(): boolean;
|
|
22
28
|
export declare function clearPresentationClipboard(): void;
|
|
23
29
|
export declare function clonePresentationElementForPaste(element: WorkSlideElement, offset: number): WorkSlideElement;
|
|
24
30
|
export declare function clonePresentationElementsForPaste(elements: readonly WorkSlideElement[], offset: number): WorkSlideElement[];
|
|
31
|
+
export declare function clonePresentationElementsAndAnimationsForPaste(elements: readonly WorkSlideElement[], animations: readonly WorkSlideAnimation[], offset: number): WorkPresentationElementPaste;
|
|
25
32
|
export declare function clonePresentationSlideForPaste(slide: WorkSlide, existingSlideNames?: readonly string[]): WorkSlide;
|
|
26
33
|
export declare function nextPresentationSlideCopyName(sourceName: string, existingSlideNames: readonly string[]): string;
|
|
@@ -543,6 +543,22 @@ export interface WorkSlideTransition {
|
|
|
543
543
|
advanceOnClick: boolean;
|
|
544
544
|
advanceAfterMs?: number;
|
|
545
545
|
}
|
|
546
|
+
export type WorkSlideAnimationEffect = 'appear' | 'fade' | 'fly-in' | 'zoom';
|
|
547
|
+
export type WorkSlideAnimationTrigger = 'on-click' | 'with-previous' | 'after-previous';
|
|
548
|
+
export type WorkSlideAnimationDirection = 'left' | 'right' | 'up' | 'down';
|
|
549
|
+
/**
|
|
550
|
+
* One bounded entrance animation applied to one slide-owned element.
|
|
551
|
+
* Array order on `WorkSlide.animations` is the canonical playback order.
|
|
552
|
+
*/
|
|
553
|
+
export interface WorkSlideAnimation {
|
|
554
|
+
id: string;
|
|
555
|
+
elementId: string;
|
|
556
|
+
effect: WorkSlideAnimationEffect;
|
|
557
|
+
trigger: WorkSlideAnimationTrigger;
|
|
558
|
+
durationMs: number;
|
|
559
|
+
delayMs: number;
|
|
560
|
+
direction?: WorkSlideAnimationDirection;
|
|
561
|
+
}
|
|
546
562
|
export interface WorkSlideElement {
|
|
547
563
|
id: string;
|
|
548
564
|
type: WorkSlideElementType;
|
|
@@ -587,6 +603,7 @@ export interface WorkSlide {
|
|
|
587
603
|
notes?: string;
|
|
588
604
|
comments?: WorkSlideComment[];
|
|
589
605
|
transition?: WorkSlideTransition;
|
|
606
|
+
animations?: WorkSlideAnimation[];
|
|
590
607
|
}
|
|
591
608
|
export interface WorkSlideComment {
|
|
592
609
|
id: string;
|
package/dist/office-kernel.wasm
CHANGED
|
Binary file
|