pptx-react-viewer 4.25.0 → 4.27.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/CHANGELOG.md +49 -0
- package/dist/{AiChatPanel-2OWWIKF5.mjs → AiChatPanel-3J6XGIJ4.mjs} +3 -7
- package/dist/AiChatPanel-3J6XGIJ4.mjs.br +0 -0
- package/dist/AiChatPanel-3J6XGIJ4.mjs.gz +0 -0
- package/dist/{AiChatPanel-3NUGL5VN.js → AiChatPanel-EGTSK4T5.js} +27 -31
- package/dist/AiChatPanel-EGTSK4T5.js.br +0 -0
- package/dist/AiChatPanel-EGTSK4T5.js.gz +0 -0
- package/dist/{Model3DScene-SKCDIM2U.mjs → Model3DScene-2V2GQ6FY.mjs} +2 -2
- package/dist/Model3DScene-2V2GQ6FY.mjs.br +0 -0
- package/dist/Model3DScene-2V2GQ6FY.mjs.gz +0 -0
- package/dist/{Model3DScene-TXD4IOMU.js → Model3DScene-Q3XEZSWV.js} +3 -3
- package/dist/Model3DScene-Q3XEZSWV.js.br +2 -0
- package/dist/Model3DScene-Q3XEZSWV.js.gz +0 -0
- package/dist/{UTIF-CNNXS5Z5.mjs → UTIF-RPFRSSC5.mjs} +3 -3
- package/dist/UTIF-RPFRSSC5.mjs.br +0 -0
- package/dist/UTIF-RPFRSSC5.mjs.gz +0 -0
- package/dist/{UTIF-6SHLXCNF.js → UTIF-XWCKRN6V.js} +21 -21
- package/dist/UTIF-XWCKRN6V.js.br +0 -0
- package/dist/UTIF-XWCKRN6V.js.gz +0 -0
- package/dist/{chunk-M6FVQI5G.mjs → chunk-34AXBLYH.mjs} +51 -104
- package/dist/chunk-34AXBLYH.mjs.br +0 -0
- package/dist/chunk-34AXBLYH.mjs.gz +0 -0
- package/dist/{chunk-MT33XQSF.js → chunk-5RQTZ376.js} +1207 -1185
- package/dist/chunk-5RQTZ376.js.br +0 -0
- package/dist/chunk-5RQTZ376.js.gz +0 -0
- package/dist/{chunk-XGB3TDIC.mjs → chunk-6DZX6EAA.mjs} +1 -5
- package/dist/chunk-6DZX6EAA.mjs.br +0 -0
- package/dist/chunk-6DZX6EAA.mjs.gz +0 -0
- package/dist/{chunk-XDWL6LNV.js → chunk-MQCBMO6A.js} +909 -923
- package/dist/chunk-MQCBMO6A.js.br +0 -0
- package/dist/chunk-MQCBMO6A.js.gz +0 -0
- package/dist/{chunk-4VNS5WPM.js → chunk-QGM4M3NI.js} +0 -5
- package/dist/chunk-QGM4M3NI.js.br +0 -0
- package/dist/chunk-QGM4M3NI.js.gz +0 -0
- package/dist/{chunk-MRJZIBPQ.js → chunk-TYJZJJZ6.mjs} +13062 -118856
- package/dist/chunk-TYJZJJZ6.mjs.br +0 -0
- package/dist/chunk-TYJZJJZ6.mjs.gz +0 -0
- package/dist/{chunk-5FEQK3MW.mjs → chunk-WK6JBJCT.js} +13430 -117602
- package/dist/chunk-WK6JBJCT.js.br +0 -0
- package/dist/chunk-WK6JBJCT.js.gz +0 -0
- package/dist/{chunk-BP7NMPQE.mjs → chunk-ZK7UEEXE.mjs} +71 -92
- package/dist/chunk-ZK7UEEXE.mjs.br +0 -0
- package/dist/chunk-ZK7UEEXE.mjs.gz +0 -0
- package/dist/i18n/de.cjs +1 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +1 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +1 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +1 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +1 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +1 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +1 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +1 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.d.ts +1 -46
- package/dist/i18n.js +5 -5
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +2 -2
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +11 -3703
- package/dist/index.js +96 -97
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -7
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +5 -3847
- package/dist/internals.js +114 -115
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -5
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/{chunk-NJYF5KTY.mjs → three.module-A6ACXOES.mjs} +2 -0
- package/dist/three.module-A6ACXOES.mjs.br +0 -0
- package/dist/three.module-A6ACXOES.mjs.gz +0 -0
- package/dist/{chunk-QS3GAPPA.js → three.module-IORLGCSX.js} +2 -0
- package/dist/three.module-IORLGCSX.js.br +0 -0
- package/dist/three.module-IORLGCSX.js.gz +0 -0
- package/dist/viewer/index.d.ts +12 -2633
- package/dist/viewer/index.js +35 -37
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -7
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-F2H7BRUK.js → y-webrtc-6LID3XZO.js} +5 -5
- package/dist/y-webrtc-6LID3XZO.js.br +0 -0
- package/dist/y-webrtc-6LID3XZO.js.gz +0 -0
- package/dist/{y-webrtc-GAHCEZSS.mjs → y-webrtc-F5IA7T5S.mjs} +1 -1
- package/dist/y-webrtc-F5IA7T5S.mjs.br +0 -0
- package/dist/y-webrtc-F5IA7T5S.mjs.gz +0 -0
- package/dist/{y-websocket-FBMB63F4.js → y-websocket-HOY2HFMH.js} +1 -1
- package/dist/y-websocket-HOY2HFMH.js.br +0 -0
- package/dist/y-websocket-HOY2HFMH.js.gz +0 -0
- package/dist/{y-websocket-MAGDFVLN.mjs → y-websocket-VGLBV2HJ.mjs} +1 -1
- package/dist/y-websocket-VGLBV2HJ.mjs.br +0 -0
- package/dist/y-websocket-VGLBV2HJ.mjs.gz +0 -0
- package/package.json +3 -4
- package/dist/AiChatPanel-2OWWIKF5.mjs.br +0 -0
- package/dist/AiChatPanel-2OWWIKF5.mjs.gz +0 -0
- package/dist/AiChatPanel-3NUGL5VN.js.br +0 -0
- package/dist/AiChatPanel-3NUGL5VN.js.gz +0 -0
- package/dist/GLTFLoader-O7FNKCHG.mjs +0 -2649
- package/dist/GLTFLoader-O7FNKCHG.mjs.br +0 -0
- package/dist/GLTFLoader-O7FNKCHG.mjs.gz +0 -0
- package/dist/GLTFLoader-UM56GMCK.js +0 -2651
- package/dist/GLTFLoader-UM56GMCK.js.br +0 -0
- package/dist/GLTFLoader-UM56GMCK.js.gz +0 -0
- package/dist/Model3DScene-SKCDIM2U.mjs.br +0 -0
- package/dist/Model3DScene-SKCDIM2U.mjs.gz +0 -0
- package/dist/Model3DScene-TXD4IOMU.js.br +0 -0
- package/dist/Model3DScene-TXD4IOMU.js.gz +0 -0
- package/dist/OrbitControls-EXEHIXFI.js +0 -922
- package/dist/OrbitControls-EXEHIXFI.js.br +0 -0
- package/dist/OrbitControls-EXEHIXFI.js.gz +0 -0
- package/dist/OrbitControls-PZQ4CBVS.mjs +0 -920
- package/dist/OrbitControls-PZQ4CBVS.mjs.br +0 -0
- package/dist/OrbitControls-PZQ4CBVS.mjs.gz +0 -0
- package/dist/UTIF-6SHLXCNF.js.br +0 -0
- package/dist/UTIF-6SHLXCNF.js.gz +0 -0
- package/dist/UTIF-CNNXS5Z5.mjs.br +0 -0
- package/dist/UTIF-CNNXS5Z5.mjs.gz +0 -0
- package/dist/chunk-4VNS5WPM.js.br +0 -0
- package/dist/chunk-4VNS5WPM.js.gz +0 -0
- package/dist/chunk-5FEQK3MW.mjs.br +0 -0
- package/dist/chunk-5FEQK3MW.mjs.gz +0 -0
- package/dist/chunk-7E6EF4GQ.js +0 -3977
- package/dist/chunk-7E6EF4GQ.js.br +0 -0
- package/dist/chunk-7E6EF4GQ.js.gz +0 -0
- package/dist/chunk-BP7NMPQE.mjs.br +0 -0
- package/dist/chunk-BP7NMPQE.mjs.gz +0 -0
- package/dist/chunk-C7SS65W2.mjs +0 -22197
- package/dist/chunk-C7SS65W2.mjs.br +0 -0
- package/dist/chunk-C7SS65W2.mjs.gz +0 -0
- package/dist/chunk-DC67MV5I.mjs +0 -3915
- package/dist/chunk-DC67MV5I.mjs.br +0 -0
- package/dist/chunk-DC67MV5I.mjs.gz +0 -0
- package/dist/chunk-LKL6DQ55.js +0 -4246
- package/dist/chunk-LKL6DQ55.js.br +0 -0
- package/dist/chunk-LKL6DQ55.js.gz +0 -0
- package/dist/chunk-M6FVQI5G.mjs.br +0 -0
- package/dist/chunk-M6FVQI5G.mjs.gz +0 -0
- package/dist/chunk-MRJZIBPQ.js.br +0 -0
- package/dist/chunk-MRJZIBPQ.js.gz +0 -0
- package/dist/chunk-MT33XQSF.js.br +0 -0
- package/dist/chunk-MT33XQSF.js.gz +0 -0
- package/dist/chunk-NJYF5KTY.mjs.br +0 -0
- package/dist/chunk-NJYF5KTY.mjs.gz +0 -0
- package/dist/chunk-Q4HRYUEP.mjs +0 -4242
- package/dist/chunk-Q4HRYUEP.mjs.br +0 -0
- package/dist/chunk-Q4HRYUEP.mjs.gz +0 -0
- package/dist/chunk-QS3GAPPA.js.br +0 -0
- package/dist/chunk-QS3GAPPA.js.gz +0 -0
- package/dist/chunk-QTASICXP.js +0 -22241
- package/dist/chunk-QTASICXP.js.br +0 -0
- package/dist/chunk-QTASICXP.js.gz +0 -0
- package/dist/chunk-XDWL6LNV.js.br +0 -0
- package/dist/chunk-XDWL6LNV.js.gz +0 -0
- package/dist/chunk-XGB3TDIC.mjs.br +0 -0
- package/dist/chunk-XGB3TDIC.mjs.gz +0 -0
- package/dist/three.module-BLHG4FHZ.js +0 -1783
- package/dist/three.module-BLHG4FHZ.js.br +0 -0
- package/dist/three.module-BLHG4FHZ.js.gz +0 -0
- package/dist/three.module-ZSSMKKHW.mjs +0 -2
- package/dist/three.module-ZSSMKKHW.mjs.br +0 -0
- package/dist/three.module-ZSSMKKHW.mjs.gz +0 -0
- package/dist/y-webrtc-F2H7BRUK.js.br +0 -0
- package/dist/y-webrtc-F2H7BRUK.js.gz +0 -0
- package/dist/y-webrtc-GAHCEZSS.mjs.br +0 -0
- package/dist/y-webrtc-GAHCEZSS.mjs.gz +0 -0
- package/dist/y-websocket-FBMB63F4.js.br +0 -0
- package/dist/y-websocket-FBMB63F4.js.gz +0 -0
- package/dist/y-websocket-MAGDFVLN.mjs.br +0 -0
- package/dist/y-websocket-MAGDFVLN.mjs.gz +0 -0
package/dist/internals.d.ts
CHANGED
|
@@ -1,3852 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollaborationRole, CollaborationConfig, PowerPointViewerAPI, ViewerCustomizationApi, ShapeAdjustmentHandleDescriptor, ChangeCaseMode, ResolvedKeyboardCustomization, FindResult, EditorImagePasteOptions, InsertChartKind, PasteSpecialFormat, SlideTemplateId, MorphTransitionPlan, ElementAnimationState, ZoomNavigationTarget, PresentationSnapshot, ViewerMode, ShapeAdjustmentDragState, InlineTextEditSnapshot, InlineListReadResult, FreeformToolKind, CollaborationLivePatcher, SlideSizeEmu, ElementClipboardPayload, CropSession, FontEmbeddingDescriptor, MasterViewTarget, ViewportFitOptions, ToolbarActionId, CollaborationShellState, AnimationApplyGroup, RulerUnit, FieldSubstitutionContext, EditPointsCommandId, EditPointsElementPatch, PresentationPointerTool, RunProgramNotice, BorrowedCollaborationAwareness, CollabLoadOrigin, AuthoredSlideRange, FragmentedLayer, PrintSettings, ThemeEditorEdit, CompareResult, ReadOnlyRecommendation, CompatibilityWarningToast, DeviceOrientation, ResolvedCustomization, DeckSavePurpose, ZoomExcursion, TouchGestureCallbacks, ViewerOptionsStore, ViewerOptions, AutosaveRecoveryPrompt, VirtualizedRange, ToolbarTabId } from 'ooxml-ui/pptx';
|
|
2
|
+
export { CINEMATIC_TRANSITION_KEYFRAMES, CollaborationConfig, DEFAULT_MORPH_DURATION_MS, DEFAULT_TRANSITION_DURATION_MS, DeviceOrientation, EASE, INSTANT, MOBILE_BREAKPOINT, P14_TRANSITION_KEYFRAMES, P14_TRANSITION_KEYFRAMES_2, P14_TRANSITION_KEYFRAMES_ALL, RANDOM_ELIGIBLE_TYPES, ResolvedDirection, ResolvedDirection8, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_KEYFRAMES_CSS, SlideTransitionAnimations, TABLET_BREAKPOINT, TRANSITION_SPEED_DURATION_MS, TouchGestureCallbacks, VirtualizedRange, WHEEL_SPOKE_COUNTS, computeVirtualRange, getCinematicTransitionAnimations, getP14TransitionAnimations, getSlideTransitionAnimations, resolveDirection, resolveDirection8, resolveOrientation, resolveSlideTransition, resolveTransitionDurationMs, resolveWheelSpokeCount } from 'ooxml-ui/pptx';
|
|
3
|
+
import { PptxSlide, PptxElement, PptxElementAnimation, TextStyle, PptxHeaderFooter, ShapeStyle, PptxCommentMention, SmartArtLayout, InkPptxElement, ShapePptxElement, MergeShapeOperation, PptxSlideTransition, PptxAction, PptxSlideMaster, PptxModernCommentAuthor, PptxTheme, ParsedTableStyleMap, PptxThemeOption, PptxCustomShow, PptxSection, PptxPresentationProperties, PptxViewProperties, PptxNotesMaster, PptxHandoutMaster, PptxCustomProperty, PptxTagCollection, PptxCoreProperties, PptxAppProperties, PptxEmbeddedFont, MasterViewTab, PptxSlideLayout, PptxHandler, PptxLayoutOption, PptxLayoutPreview, PptxComment, ConnectorPptxElement, PptxThemePreset, PptxThemeColorScheme, PptxThemeFontScheme, PptxData, PptxHandlerSaveOptions, PptxSaveFormat, TextSegment, PptxModifyVerifier } from 'ooxml-core/pptx';
|
|
2
4
|
import * as Y from 'yjs';
|
|
3
5
|
import { Doc } from 'yjs';
|
|
4
6
|
import React$1, { Dispatch, SetStateAction, MutableRefObject, RefObject, ForwardedRef } from 'react';
|
|
5
7
|
|
|
6
|
-
//#region src/render/collaboration-presence.d.ts
|
|
7
|
-
/** Connection lifecycle states for the Yjs WebSocket provider. */
|
|
8
|
-
type ConnectionStatus$1 = 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
9
|
-
/**
|
|
10
|
-
* Presence data for a remote collaborator, sanitised from the awareness
|
|
11
|
-
* protocol. Returned by {@link sanitizePresence}; coordinates are in unscaled
|
|
12
|
-
* slide pixels, clamped to the supplied canvas bounds.
|
|
13
|
-
*/
|
|
14
|
-
interface SanitizedPresence {
|
|
15
|
-
clientId: number;
|
|
16
|
-
userName: string;
|
|
17
|
-
userAvatar?: string;
|
|
18
|
-
userColor: string;
|
|
19
|
-
activeSlideIndex: number;
|
|
20
|
-
cursorX: number;
|
|
21
|
-
cursorY: number;
|
|
22
|
-
lastUpdated: string;
|
|
23
|
-
selectedElementId?: string;
|
|
24
|
-
role?: CollaborationRole;
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
//#region src/render/collaboration-presence-publisher.d.ts
|
|
28
|
-
/**
|
|
29
|
-
* Structural interface for the lazily-imported Yjs awareness surface. Every
|
|
30
|
-
* binding's live `y-protocols/awareness` `Awareness` instance satisfies this.
|
|
31
|
-
*/
|
|
32
|
-
interface AwarenessLike {
|
|
33
|
-
clientID?: number;
|
|
34
|
-
setLocalStateField: (field: string, value: unknown) => void;
|
|
35
|
-
getStates: () => Map<number, Record<string, unknown>>;
|
|
36
|
-
on: (event: string, cb: () => void) => void;
|
|
37
|
-
off?: (event: string, cb: () => void) => void;
|
|
38
|
-
}
|
|
39
|
-
//#endregion
|
|
40
|
-
//#region src/render/collaboration-external-session.d.ts
|
|
41
|
-
/** Connection state reported by the host, independent of the viewer lifetime. */
|
|
42
|
-
interface ExternalCollaborationSnapshot {
|
|
43
|
-
status: ConnectionStatus$1;
|
|
44
|
-
/**
|
|
45
|
-
* The host has loaded the authoritative document and permits local edits.
|
|
46
|
-
* Keep true while offline to allow ordinary Yjs offline edits, or set false
|
|
47
|
-
* to suspend writes until a fresh sync. The viewer never infers this from
|
|
48
|
-
* `status` and never opens it after a timeout.
|
|
49
|
-
*/
|
|
50
|
-
synced: boolean;
|
|
51
|
-
}
|
|
52
|
-
/** The public y-protocols Awareness surface needed by a borrowed session. */
|
|
53
|
-
interface ExternalCollaborationAwareness extends AwarenessLike {
|
|
54
|
-
clientID: number;
|
|
55
|
-
getLocalState: () => Record<string, unknown> | null;
|
|
56
|
-
setLocalState: (state: Record<string, unknown> | null) => void;
|
|
57
|
-
off: (event: string, callback: () => void) => void;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Host-owned Yjs resources. The host creates, connects and destroys them.
|
|
61
|
-
* Keep this object and its resources stable for a session; report connection
|
|
62
|
-
* changes through subscribe instead of replacing the collaboration config.
|
|
63
|
-
*/
|
|
64
|
-
interface ExternalCollaborationSession {
|
|
65
|
-
readonly doc: Doc;
|
|
66
|
-
/** Awareness must belong to doc. One viewer publishes slide presence at a time. */
|
|
67
|
-
readonly awareness: ExternalCollaborationAwareness;
|
|
68
|
-
getSnapshot: () => ExternalCollaborationSnapshot;
|
|
69
|
-
/** Subscribe to status or synced changes; return an unsubscribe function. */
|
|
70
|
-
subscribe: (listener: () => void) => () => void;
|
|
71
|
-
}
|
|
72
|
-
/** Listener/publisher view, deliberately excluding host lifecycle methods. */
|
|
73
|
-
interface BorrowedCollaborationAwareness extends AwarenessLike {
|
|
74
|
-
clientID: number;
|
|
75
|
-
off: (event: string, callback: () => void) => void;
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/render/element-update-batch.d.ts
|
|
79
|
-
/** A shallow property patch for a top-level element on an ordinary slide. */
|
|
80
|
-
interface ElementUpdate {
|
|
81
|
-
slideId: string;
|
|
82
|
-
elementId: string;
|
|
83
|
-
patch: Partial<PptxElement>;
|
|
84
|
-
}
|
|
85
|
-
interface ElementUpdateOptions {
|
|
86
|
-
/** Optional description for the undo entry. */
|
|
87
|
-
label?: string;
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/types.d.ts
|
|
91
|
-
/** Canvas dimensions in pixels. */
|
|
92
|
-
interface CanvasSize$1 {
|
|
93
|
-
width: number;
|
|
94
|
-
height: number;
|
|
95
|
-
}
|
|
96
|
-
/** Viewer interaction mode: read-only, edit, presentation, or master-view. */
|
|
97
|
-
type ViewerMode = 'preview' | 'edit' | 'present' | 'master';
|
|
98
|
-
/**
|
|
99
|
-
* Framework-agnostic imperative API contract for the PowerPoint viewer.
|
|
100
|
-
*
|
|
101
|
-
* Each binding (React `forwardRef` handle, Vue `defineExpose`, Angular public
|
|
102
|
-
* methods) implements this interface so consumers get a consistent progressive
|
|
103
|
-
* API regardless of framework.
|
|
104
|
-
*/
|
|
105
|
-
interface PowerPointViewerAPI {
|
|
106
|
-
/** Serialise the current presentation to `.pptx` bytes. */
|
|
107
|
-
getContent: () => Promise<Uint8Array>;
|
|
108
|
-
/** Navigate to a specific slide by zero-based index. */
|
|
109
|
-
goTo: (slideIndex: number) => void;
|
|
110
|
-
/** Navigate to the previous slide. */
|
|
111
|
-
goPrev: () => void;
|
|
112
|
-
/** Navigate to the next slide. */
|
|
113
|
-
goNext: () => void;
|
|
114
|
-
/** Undo the last editing action. No-op when nothing to undo. */
|
|
115
|
-
undo: () => void;
|
|
116
|
-
/** Redo the last undone action. No-op when nothing to redo. */
|
|
117
|
-
redo: () => void;
|
|
118
|
-
/** Whether an undo action is available. */
|
|
119
|
-
canUndo: () => boolean;
|
|
120
|
-
/** Whether a redo action is available. */
|
|
121
|
-
canRedo: () => boolean;
|
|
122
|
-
/** Get the current zoom level (1 = 100%). */
|
|
123
|
-
getZoom: () => number;
|
|
124
|
-
/** Set the zoom level (clamped to min/max bounds). */
|
|
125
|
-
setZoom: (level: number) => void;
|
|
126
|
-
/** Zoom in by one step. */
|
|
127
|
-
zoomIn: () => void;
|
|
128
|
-
/** Zoom out by one step. */
|
|
129
|
-
zoomOut: () => void;
|
|
130
|
-
/** Reset zoom to 100%. */
|
|
131
|
-
zoomReset: () => void;
|
|
132
|
-
/** Get the current viewer mode. */
|
|
133
|
-
getMode: () => ViewerMode;
|
|
134
|
-
/** Switch the viewer mode (e.g. 'edit', 'preview', 'present'). */
|
|
135
|
-
setMode: (mode: ViewerMode) => void;
|
|
136
|
-
/** Get the zero-based active slide index. */
|
|
137
|
-
getActiveSlideIndex: () => number;
|
|
138
|
-
/** Set the active slide by zero-based index (alias of goTo). */
|
|
139
|
-
setActiveSlideIndex: (index: number) => void;
|
|
140
|
-
/** Get the total number of slides. */
|
|
141
|
-
getSlideCount: () => number;
|
|
142
|
-
/** Whether the document has unsaved changes. */
|
|
143
|
-
isDirty: () => boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Get the full slide array. Returns the actual `PptxSlide[]` from the
|
|
146
|
-
* internal model with full type information (elements, notes, transitions,
|
|
147
|
-
* animations, etc.). The returned reference is a snapshot; mutations are
|
|
148
|
-
* not reflected back unless done via the manipulation methods.
|
|
149
|
-
*/
|
|
150
|
-
getSlides: () => readonly PptxSlide[];
|
|
151
|
-
/** Get a single slide by zero-based index, or undefined if out of range. */
|
|
152
|
-
getSlide: (index: number) => PptxSlide | undefined;
|
|
153
|
-
/** Get the currently active slide. */
|
|
154
|
-
getActiveSlide: () => PptxSlide | undefined;
|
|
155
|
-
/** Add a blank slide after the given index (or at end if omitted). */
|
|
156
|
-
addSlide: (afterIndex?: number) => void;
|
|
157
|
-
/** Delete slides at the given zero-based indexes. At least one slide is kept. */
|
|
158
|
-
deleteSlides: (indexes: number[]) => void;
|
|
159
|
-
/** Duplicate slides at the given zero-based indexes. */
|
|
160
|
-
duplicateSlides: (indexes: number[]) => void;
|
|
161
|
-
/** Move a slide from one position to another. */
|
|
162
|
-
moveSlide: (fromIndex: number, toIndex: number) => void;
|
|
163
|
-
/** Toggle the hidden flag on slides at the given indexes. */
|
|
164
|
-
toggleHideSlides: (indexes: number[]) => void;
|
|
165
|
-
/**
|
|
166
|
-
* Get the elements on a slide. Defaults to the active slide when
|
|
167
|
-
* `slideIndex` is omitted. Returns the full `PptxElement[]` with
|
|
168
|
-
* all type-specific properties intact.
|
|
169
|
-
*/
|
|
170
|
-
getElements: (slideIndex?: number) => readonly PptxElement[];
|
|
171
|
-
/** Get a single element by ID from the active slide (or a specified slide). */
|
|
172
|
-
getElementById: (elementId: string, slideIndex?: number) => PptxElement | undefined;
|
|
173
|
-
/**
|
|
174
|
-
* Append and select a deep copy on the active ordinary editable slide.
|
|
175
|
-
* Assigns fresh element IDs without offsetting the supplied geometry.
|
|
176
|
-
* Returns the new root ID, or undefined when insertion is unavailable.
|
|
177
|
-
* Uses normal Undo/Redo grouping. Models must be self-contained or refer to
|
|
178
|
-
* assets in this document; this does not import foreign PPTX relationships.
|
|
179
|
-
*/
|
|
180
|
-
addElement: (element: PptxElement) => string | undefined;
|
|
181
|
-
/**
|
|
182
|
-
* Update one or more properties of an element by ID on the active slide.
|
|
183
|
-
* Accepts a `Partial<PptxElement>` patch (e.g. `{ x: 100, width: 300 }`).
|
|
184
|
-
*/
|
|
185
|
-
updateElement: (elementId: string, updates: Partial<PptxElement>) => void;
|
|
186
|
-
/** Atomically patch ordinary slide elements as one independent undo step. Rejects invalid batches. */
|
|
187
|
-
updateElements: (updates: readonly ElementUpdate[], options?: ElementUpdateOptions) => Promise<void>;
|
|
188
|
-
/** Delete elements by their IDs from the active slide. */
|
|
189
|
-
deleteElements: (elementIds: string[]) => void;
|
|
190
|
-
/**
|
|
191
|
-
* Duplicate an element on the active slide.
|
|
192
|
-
* Returns the new element's ID, or undefined if the source was not found.
|
|
193
|
-
*/
|
|
194
|
-
duplicateElement: (elementId: string) => string | undefined;
|
|
195
|
-
/** Get the IDs of currently selected elements. */
|
|
196
|
-
getSelectedElementIds: () => string[];
|
|
197
|
-
/** Programmatically select elements by their IDs. */
|
|
198
|
-
selectElements: (ids: string[]) => void;
|
|
199
|
-
/** Clear the current selection. */
|
|
200
|
-
clearSelection: () => void;
|
|
201
|
-
}
|
|
202
|
-
/** Collaboration role within a session. */
|
|
203
|
-
type CollaborationRole = 'owner' | 'collaborator' | 'viewer';
|
|
204
|
-
/**
|
|
205
|
-
* Collaboration transport.
|
|
206
|
-
*
|
|
207
|
-
* - `'websocket'` (default): y-websocket against `serverUrl`.
|
|
208
|
-
* - `'webrtc'`: y-webrtc peer-to-peer; needs no document server. Peers meet
|
|
209
|
-
* through the `signaling` servers (WebRTC signaling only, no document data)
|
|
210
|
-
* and same-browser tabs additionally sync via BroadcastChannel even without
|
|
211
|
-
* any signaling server, which makes this mode usable from static hosting.
|
|
212
|
-
*/
|
|
213
|
-
type CollaborationTransport = 'websocket' | 'webrtc';
|
|
214
|
-
/** How the local user entered a collaboration session. */
|
|
215
|
-
type CollaborationSessionIntent = 'create' | 'join';
|
|
216
|
-
/**
|
|
217
|
-
* Real-time collaboration configuration.
|
|
218
|
-
*
|
|
219
|
-
* The same shape is accepted by every framework binding.
|
|
220
|
-
*/
|
|
221
|
-
interface CollaborationConfig {
|
|
222
|
-
/** Unique identifier for the collaboration room (alphanumeric, hyphens, underscores). */
|
|
223
|
-
roomId: string;
|
|
224
|
-
/**
|
|
225
|
-
* WebSocket server URL for the Yjs provider (e.g. "wss://collab.example.com").
|
|
226
|
-
* Ignored (may be empty) for `externalSession` or when `transport` is `'webrtc'`.
|
|
227
|
-
*/
|
|
228
|
-
serverUrl: string;
|
|
229
|
-
/** Transport to use. Defaults to `'websocket'`. */
|
|
230
|
-
transport?: CollaborationTransport;
|
|
231
|
-
/**
|
|
232
|
-
* Use the host's document, awareness and transport instead of creating a
|
|
233
|
-
* provider. Transport, serverUrl, signaling and authToken are ignored. The
|
|
234
|
-
* viewer only detaches its listeners and presence on stop; it never destroys
|
|
235
|
-
* these resources. Keep this object stable and report readiness via subscribe.
|
|
236
|
-
*/
|
|
237
|
-
externalSession?: ExternalCollaborationSession;
|
|
238
|
-
/**
|
|
239
|
-
* WebRTC signaling server URLs (only used when `transport` is `'webrtc'`).
|
|
240
|
-
* Defaults to y-webrtc's built-in public signaling list. Same-browser tabs
|
|
241
|
-
* sync via BroadcastChannel regardless of signaling availability.
|
|
242
|
-
*/
|
|
243
|
-
signaling?: string[];
|
|
244
|
-
/** Display name for the local user. */
|
|
245
|
-
userName: string;
|
|
246
|
-
/** Avatar URL for the local user (optional). */
|
|
247
|
-
userAvatar?: string;
|
|
248
|
-
/** Hex colour for the local user's cursor/presence indicator. */
|
|
249
|
-
userColor?: string;
|
|
250
|
-
/** Optional authentication token sent with the WebSocket handshake. */
|
|
251
|
-
authToken?: string;
|
|
252
|
-
/** Role in the session; defaults to `'collaborator'`. */
|
|
253
|
-
role?: CollaborationRole;
|
|
254
|
-
/**
|
|
255
|
-
* Whether this client created the room or joined an existing room. Providers
|
|
256
|
-
* do not use this value, but hosts can use it to avoid publishing local file
|
|
257
|
-
* bytes when handling a join request. Omitted values retain the legacy
|
|
258
|
-
* create-session behaviour.
|
|
259
|
-
*/
|
|
260
|
-
sessionIntent?: CollaborationSessionIntent;
|
|
261
|
-
/**
|
|
262
|
-
* Elected-writer write-back callback (Area 3 of the C3 hardening plan).
|
|
263
|
-
*
|
|
264
|
-
* When the local user has `role: 'owner'`, the binding debounces changes and
|
|
265
|
-
* serializes the current Y.Doc state to a PPTX byte array, then calls this
|
|
266
|
-
* callback so the host can persist the snapshot. Only one writer (the owner)
|
|
267
|
-
* does this; other collaborators never trigger write-back, eliminating the
|
|
268
|
-
* last-save-wins problem.
|
|
269
|
-
*/
|
|
270
|
-
onWriteBack?: (bytes: Uint8Array) => void;
|
|
271
|
-
/**
|
|
272
|
-
* Debounce delay (ms) between the last Y.Doc change and the write-back
|
|
273
|
-
* invocation. Defaults to 5000 ms. Set to 0 to write back on every change
|
|
274
|
-
* (not recommended for large documents).
|
|
275
|
-
*/
|
|
276
|
-
writeBackDebounceMs?: number;
|
|
277
|
-
}
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region src/render/text-run-style.d.ts
|
|
280
|
-
/** A plain CSS style map (keys are CSS properties; binding-agnostic). */
|
|
281
|
-
type RunStyle = Record<string, string | number>;
|
|
282
|
-
/** One script-tagged piece of a run's text, ready for a binding's nested span. */
|
|
283
|
-
interface ScriptFontPiece {
|
|
284
|
-
text: string;
|
|
285
|
-
/**
|
|
286
|
-
* CSS for a nested span wrapping `text`, or `undefined` when this piece
|
|
287
|
-
* needs no span at all (its script's font equals the run's own, so plain
|
|
288
|
-
* text renders identically). When present it carries the `fontFamily`
|
|
289
|
-
* override plus the run's own decoration subset, repeated because
|
|
290
|
-
* `text-decoration-*` does not inherit into a nested span (see
|
|
291
|
-
* `nestedTextDecorationStyle`).
|
|
292
|
-
*/
|
|
293
|
-
style?: RunStyle;
|
|
294
|
-
}
|
|
295
|
-
//#endregion
|
|
296
|
-
//#region src/render/reflection.d.ts
|
|
297
|
-
/**
|
|
298
|
-
* CSS `mask-image`/`-webkit-mask-image` value plus the raw `transform` for a
|
|
299
|
-
* mirrored reflection sibling. Every value is a ready-to-apply CSS string (or
|
|
300
|
-
* `'none'` sentinel avoided - fields are omitted when the browser default
|
|
301
|
-
* already matches), so a binding can spread this directly onto its own style
|
|
302
|
-
* object with no further per-framework logic.
|
|
303
|
-
*/
|
|
304
|
-
interface ReflectionWrapperStyle {
|
|
305
|
-
position: 'absolute';
|
|
306
|
-
left: string;
|
|
307
|
-
/** `calc(100% + <dist>px)`: sits `@dist` px below the source element's box. */
|
|
308
|
-
top: string;
|
|
309
|
-
width: string;
|
|
310
|
-
height: string;
|
|
311
|
-
/** `scale(@sx, @sy)` (the sign of `@sy` IS the mirror) composed with `@kx`/`@ky`/`@rot`. */
|
|
312
|
-
transform: string;
|
|
313
|
-
/** Anchor point for the transform above, from `@algn` (default `center top`). */
|
|
314
|
-
transformOrigin: string;
|
|
315
|
-
maskImage: string;
|
|
316
|
-
WebkitMaskImage: string;
|
|
317
|
-
pointerEvents: 'none';
|
|
318
|
-
}
|
|
319
|
-
//#endregion
|
|
320
|
-
//#region src/render/animation-timeline-build-descriptors.d.ts
|
|
321
|
-
/**
|
|
322
|
-
* `animation-timeline-build-descriptors` - staged-build (`p:bldChart` /
|
|
323
|
-
* `p:bldDgm`) reveal descriptor types, split out of `animation-timeline-types`
|
|
324
|
-
* to keep that module under the file-size limit. Re-exported from
|
|
325
|
-
* `animation-timeline-types` so existing imports are unaffected.
|
|
326
|
-
*
|
|
327
|
-
* @module render/animation-timeline-build-descriptors
|
|
328
|
-
*/
|
|
329
|
-
/**
|
|
330
|
-
* Normalized staged-reveal mode for a chart graphic frame, derived from the
|
|
331
|
-
* OOXML `a:bldChart/@bld` (or `p:bldOleChart/@bld`) token:
|
|
332
|
-
* - `asOne` the whole chart appears at once (`allAtOnce`).
|
|
333
|
-
* - `bySeries` one data series is revealed per stage (`series`).
|
|
334
|
-
* - `byCategory` one category is revealed per stage (`category`).
|
|
335
|
-
* - `byElement` one series/category ELEMENT is revealed per stage
|
|
336
|
-
* (`seriesElement` / `categoryElement`).
|
|
337
|
-
*/
|
|
338
|
-
type ChartBuildMode = 'asOne' | 'bySeries' | 'byCategory' | 'byElement';
|
|
339
|
-
/**
|
|
340
|
-
* Normalized staged-reveal mode for a SmartArt diagram, derived from the OOXML
|
|
341
|
-
* `a:bldDgm/@bld` or `p:bldDgm/@bld` token:
|
|
342
|
-
* - `asOne` the whole diagram appears at once (`whole` / `allAtOnce`).
|
|
343
|
-
* - `byOne` one node is revealed per stage (`one`, and the assorted
|
|
344
|
-
* `depthBy*` / `breadthBy*` / directional traversals).
|
|
345
|
-
* - `byLvl` levels are revealed one element at a time (`lvlOne`).
|
|
346
|
-
* - `byLvlAtOnce` a whole level is revealed per stage (`lvlAtOnce`).
|
|
347
|
-
*/
|
|
348
|
-
type DiagramBuildMode = 'asOne' | 'byOne' | 'byLvl' | 'byLvlAtOnce';
|
|
349
|
-
/**
|
|
350
|
-
* One authored `p:graphicEl` reveal unit resolved onto a chart, per
|
|
351
|
-
* `TimelineStepGraphicElement`'s "both indices set" case: a single (series,
|
|
352
|
-
* category) cell revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect.
|
|
353
|
-
*/
|
|
354
|
-
interface ChartRevealPoint {
|
|
355
|
-
seriesIdx: number;
|
|
356
|
-
categoryIdx: number;
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Playback-time chart reveal state derived from AUTHORED `p:graphicEl`
|
|
360
|
-
* indices (see `chart-reveal-descriptor`'s `resolveChartRevealDescriptor`),
|
|
361
|
-
* rather than from click-count/time progress. Present on
|
|
362
|
-
* {@link import('./animation-timeline-group').ElementAnimationState.chartReveal}
|
|
363
|
-
* only when every fired chart-build step for the element carried index data;
|
|
364
|
-
* a renderer prefers this over the progress-based `build`/`ElementBuildState`
|
|
365
|
-
* path when present, since it reflects the real authored reveal set (correct
|
|
366
|
-
* even for a reversed-order or gapped chart build), and falls back to `build`
|
|
367
|
-
* when absent.
|
|
368
|
-
*/
|
|
369
|
-
interface ChartRevealDescriptor {
|
|
370
|
-
/**
|
|
371
|
-
* Whether the chart's background/axes/gridlines/legend should currently be
|
|
372
|
-
* visible: always `true` when the chart's `animateBackground` is `false`
|
|
373
|
-
* ("shown throughout"), otherwise `true` from the first revealed stage
|
|
374
|
-
* onward.
|
|
375
|
-
*/
|
|
376
|
-
background: boolean;
|
|
377
|
-
/** Whole series revealed by a `bldStep="series"` effect. */
|
|
378
|
-
series: ReadonlySet<number>;
|
|
379
|
-
/** Whole categories revealed by a `bldStep="category"` effect. */
|
|
380
|
-
categories: ReadonlySet<number>;
|
|
381
|
-
/** Individual cells revealed by a `bldStep="seriesEl"`/`"categoryEl"` effect. */
|
|
382
|
-
points: readonly ChartRevealPoint[];
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Playback-time SmartArt diagram reveal state derived from AUTHORED
|
|
386
|
-
* `p:graphicEl/p:dgm/@id` indices (see `diagram-reveal-descriptor`'s
|
|
387
|
-
* `resolveDiagramRevealDescriptor`), rather than from click-count/time
|
|
388
|
-
* progress. Present on
|
|
389
|
-
* {@link import('./animation-timeline-group').ElementAnimationState.diagramReveal}
|
|
390
|
-
* only when every fired diagram-build step for the element carried
|
|
391
|
-
* `p:graphicEl` data. A SmartArt renderer prefers this over the
|
|
392
|
-
* progress-based `build` / {@link ElementBuildState} path when present, since
|
|
393
|
-
* it reflects the real authored reveal set (correct even for a
|
|
394
|
-
* reversed-order or by-branch build), and falls back to `build` when absent.
|
|
395
|
-
*/
|
|
396
|
-
interface DiagramRevealDescriptor {
|
|
397
|
-
/**
|
|
398
|
-
* Whether the diagram's background/connector chrome should currently be
|
|
399
|
-
* visible: `true` once any node-revealing or background-revealing
|
|
400
|
-
* (`bldStep="bg"`) step has fired.
|
|
401
|
-
*/
|
|
402
|
-
background: boolean;
|
|
403
|
-
/** Data-model point ids (`PptxSmartArtNode.id`) revealed so far. */
|
|
404
|
-
nodeIds: ReadonlySet<string>;
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Playback-time staged-build state surfaced on
|
|
408
|
-
* {@link import('./animation-timeline-group').ElementAnimationState}.
|
|
409
|
-
* `progress` is the 0..1 fraction of the build revealed at the current
|
|
410
|
-
* playback time; a consumer maps it to its own item COUNT (see
|
|
411
|
-
* `revealedStageCount`).
|
|
412
|
-
*/
|
|
413
|
-
type ElementBuildState = {
|
|
414
|
-
kind: 'chart';
|
|
415
|
-
mode: ChartBuildMode;
|
|
416
|
-
progress: number;
|
|
417
|
-
} | {
|
|
418
|
-
kind: 'diagram';
|
|
419
|
-
mode: DiagramBuildMode;
|
|
420
|
-
progress: number;
|
|
421
|
-
};
|
|
422
|
-
//#endregion
|
|
423
|
-
//#region src/render/animation-text-style-resolve.d.ts
|
|
424
|
-
/**
|
|
425
|
-
* Framework-neutral text-style override a font-style emphasis effect applies
|
|
426
|
-
* on top of its target's own authored per-run bold/italic/underline/size/
|
|
427
|
-
* colour. Every binding maps this onto its own text container so it OVERRIDES
|
|
428
|
-
* the runs' inline styles (the runs carry explicit inline styles of their
|
|
429
|
-
* own, so plain CSS inheritance cannot reach them).
|
|
430
|
-
*/
|
|
431
|
-
interface TextStyleAnimationDescriptor {
|
|
432
|
-
bold?: boolean;
|
|
433
|
-
italic?: boolean;
|
|
434
|
-
underline?: boolean;
|
|
435
|
-
/** Relative multiplier against each run's own authored font size. */
|
|
436
|
-
fontScale?: number;
|
|
437
|
-
color?: string;
|
|
438
|
-
}
|
|
439
|
-
/** Snapshot of a single element's animation state at a point in the timeline. */
|
|
440
|
-
interface ElementAnimationState {
|
|
441
|
-
/** Whether the element should be visible. */
|
|
442
|
-
visible: boolean;
|
|
443
|
-
/** CSS animation shorthand to apply (undefined = no active animation). */
|
|
444
|
-
cssAnimation: string | undefined;
|
|
445
|
-
/**
|
|
446
|
-
* Staged-build reveal state, present only when the active animation builds a
|
|
447
|
-
* chart or SmartArt diagram in stages (`p:bldChart` / `p:bldDgm`) rather than
|
|
448
|
-
* revealing the whole element at once. A staged renderer multiplies
|
|
449
|
-
* `build.progress` (0..1) by its own series / category / level COUNT to
|
|
450
|
-
* decide how many stages are revealed at the current playback time; see
|
|
451
|
-
* {@link import('./animation-build').revealedStageCount}. Absent for ordinary
|
|
452
|
-
* whole-element entrances, so existing renderers are unaffected.
|
|
453
|
-
*/
|
|
454
|
-
build?: ElementBuildState;
|
|
455
|
-
/**
|
|
456
|
-
* Authored-index chart reveal state (see {@link ChartRevealDescriptor}),
|
|
457
|
-
* present only when every fired chart-build step for this element carried
|
|
458
|
-
* `p:graphicEl` index data. A chart renderer prefers this over `build` when
|
|
459
|
-
* present; `chart-build`'s `resolveRevealedChartData` picks between the two.
|
|
460
|
-
*/
|
|
461
|
-
chartReveal?: {
|
|
462
|
-
mode: ChartBuildMode;
|
|
463
|
-
descriptor: ChartRevealDescriptor;
|
|
464
|
-
};
|
|
465
|
-
/**
|
|
466
|
-
* Authored-index SmartArt diagram reveal state (see
|
|
467
|
-
* {@link DiagramRevealDescriptor}), present only when every fired
|
|
468
|
-
* diagram-build step for this element carried `p:graphicEl` node-id data.
|
|
469
|
-
* `diagram-build`'s `resolveRevealedSmartArtNodes` prefers this over `build`
|
|
470
|
-
* when present.
|
|
471
|
-
*/
|
|
472
|
-
diagramReveal?: {
|
|
473
|
-
mode: DiagramBuildMode;
|
|
474
|
-
descriptor: DiagramRevealDescriptor;
|
|
475
|
-
};
|
|
476
|
-
/**
|
|
477
|
-
* True when an active `p:animClr` color animation targets this shape's fill.
|
|
478
|
-
* A vector renderer should then paint the fill with `fill: inherit` so the
|
|
479
|
-
* wrapper-level colour keyframes cascade to the SVG path. Absent/false means
|
|
480
|
-
* no active fill-colour animation.
|
|
481
|
-
*/
|
|
482
|
-
animatesFill?: boolean;
|
|
483
|
-
/**
|
|
484
|
-
* True when an active `p:animClr` color animation targets this shape's
|
|
485
|
-
* stroke. A vector renderer should then paint the stroke with
|
|
486
|
-
* `stroke: inherit`. Absent/false means no active stroke-colour animation.
|
|
487
|
-
*/
|
|
488
|
-
animatesStroke?: boolean;
|
|
489
|
-
/**
|
|
490
|
-
* Active discrete font-style / colour / size override (see
|
|
491
|
-
* {@link import('./animation-timeline-step').TimelineStep.textStyle}) a
|
|
492
|
-
* font-style emphasis effect currently applies to this element's text,
|
|
493
|
-
* OVERRIDING the runs' own inline bold/italic/underline/size/colour.
|
|
494
|
-
* `animation-playback-engine.ts` writes this on step start and again on
|
|
495
|
-
* cleanup (held in full when the effect's `p:cTn/@fill` holds its end
|
|
496
|
-
* state, otherwise reverted); a text renderer maps it onto its run markup
|
|
497
|
-
* via `buildTextStyleOverrideCss` (`animation-text-style-css.ts`). Absent
|
|
498
|
-
* means no font-style emphasis effect is currently active on this element.
|
|
499
|
-
*/
|
|
500
|
-
textStyle?: TextStyleAnimationDescriptor;
|
|
501
|
-
}
|
|
502
|
-
//#endregion
|
|
503
|
-
//#region src/render/motion-path-authoring.d.ts
|
|
504
|
-
/**
|
|
505
|
-
* The bucket a ribbon gallery click targets. Widens the three preset buckets
|
|
506
|
-
* with `motionPath` so a binding's single "apply animation" callback can carry
|
|
507
|
-
* a motion-path preset id too, instead of every binding growing a second
|
|
508
|
-
* callback threaded through the same six components.
|
|
509
|
-
*/
|
|
510
|
-
type AnimationApplyGroup = 'entrance' | 'emphasis' | 'exit' | 'motionPath';
|
|
511
|
-
//#endregion
|
|
512
|
-
//#region src/render/slide-templates/slide-template-types.d.ts
|
|
513
|
-
/** Discriminated id for every built-in slide template. */
|
|
514
|
-
type SlideTemplateId = 'title' | 'titleAndContent' | 'sectionHeader' | 'agenda' | 'twoContent' | 'comparison' | 'quote' | 'timeline' | 'keyMetrics' | 'titleOnly' | 'blank' | 'closing';
|
|
515
|
-
/** The unit system used for ruler display. */
|
|
516
|
-
type RulerUnit = 'inches' | 'centimetres';
|
|
517
|
-
/** Framework-neutral picture-bullet source, sizing, and accessible fallback. */
|
|
518
|
-
interface PictureBulletMarker {
|
|
519
|
-
src?: string;
|
|
520
|
-
sizePx: number;
|
|
521
|
-
fallbackMarker: string;
|
|
522
|
-
accessibleLabel: string;
|
|
523
|
-
imageRelId?: string;
|
|
524
|
-
}
|
|
525
|
-
//#endregion
|
|
526
|
-
//#region src/render/text-east-asian-breaks.d.ts
|
|
527
|
-
/** Which of the two behaviours a paragraph asks for. */
|
|
528
|
-
interface EastAsianBreakOptions {
|
|
529
|
-
/** `a:pPr/@hangingPunct="1"`. */
|
|
530
|
-
hangingPunctuation: boolean;
|
|
531
|
-
/** `a:pPr/@eaLnBrk="0"`: break between any two East Asian characters. */
|
|
532
|
-
breakAnywhere: boolean;
|
|
533
|
-
}
|
|
534
|
-
//#endregion
|
|
535
|
-
//#region src/render/text-run-meta.d.ts
|
|
536
|
-
/** A run's resolved hyperlink target. */
|
|
537
|
-
interface RunHyperlink {
|
|
538
|
-
/**
|
|
539
|
-
* The URL to hand a click handler. For an internal `ppaction://hlinksldjump`
|
|
540
|
-
* the resolved slide index is appended as a `slideIndex` query parameter, so
|
|
541
|
-
* the target survives a callback whose only argument is the URL (see
|
|
542
|
-
* `parsePpactionUrl`, which reads it back off).
|
|
543
|
-
*/
|
|
544
|
-
url: string;
|
|
545
|
-
/**
|
|
546
|
-
* A safe, renderable `href` for a plain `<a>`, or `undefined` when the target
|
|
547
|
-
* is an internal `ppaction://` action or fails the URL safety check. A
|
|
548
|
-
* binding with no click handler renders the run as text in that case, which
|
|
549
|
-
* is what every binding did for every link before this field existed.
|
|
550
|
-
*/
|
|
551
|
-
href?: string;
|
|
552
|
-
/** `a:hlinkClick/@tooltip`, for the anchor's `title`. */
|
|
553
|
-
tooltip?: string;
|
|
554
|
-
/**
|
|
555
|
-
* `<a target>` for a real (non-`ppaction://`) hyperlink, from
|
|
556
|
-
* `a:hlinkClick/@tgtFrame` when authored, else `_blank` (every binding's
|
|
557
|
-
* pre-existing hardcoded default). Only meaningful alongside {@link href}.
|
|
558
|
-
*/
|
|
559
|
-
target?: string;
|
|
560
|
-
/** `<a rel>` paired with {@link target} (see `resolveHyperlinkTargetAttrs`). */
|
|
561
|
-
rel?: string;
|
|
562
|
-
/** Resolved target slide for an internal slide jump. */
|
|
563
|
-
targetSlideIndex?: number;
|
|
564
|
-
/**
|
|
565
|
-
* True when the target came from `a:hlinkMouseOver` rather than
|
|
566
|
-
* `a:hlinkClick`: PowerPoint follows it on hover, not on click, so a binding
|
|
567
|
-
* that renders a plain anchor should not make it look clickable.
|
|
568
|
-
*/
|
|
569
|
-
onHover?: boolean;
|
|
570
|
-
}
|
|
571
|
-
/** An inline equation run (`m:oMath`), rendered as MathML rather than text. */
|
|
572
|
-
interface RunEquation {
|
|
573
|
-
/** The raw OMML node, for `convertOmmlToMathMl`. */
|
|
574
|
-
xml: Record<string, unknown>;
|
|
575
|
-
/** Display number for a numbered equation, without its parentheses. */
|
|
576
|
-
number?: string;
|
|
577
|
-
}
|
|
578
|
-
//#endregion
|
|
579
|
-
//#region src/render/text-run-ruby.d.ts
|
|
580
|
-
/** A run's phonetic guide, ready to render as `<rt>` above the base text. */
|
|
581
|
-
interface RunRuby {
|
|
582
|
-
/** The annotation itself (`a:ruby/a:rt`), e.g. the furigana reading. */
|
|
583
|
-
text: string;
|
|
584
|
-
/** Inline style for the `<rt>` element (size, family, alignment, colour). */
|
|
585
|
-
style: RunStyle;
|
|
586
|
-
}
|
|
587
|
-
//#endregion
|
|
588
|
-
//#region src/render/text-tab-run-build.d.ts
|
|
589
|
-
/** One tabbed-line piece, ready to spread onto a binding's own span element. */
|
|
590
|
-
interface TabbedRunPiece {
|
|
591
|
-
text: string;
|
|
592
|
-
/**
|
|
593
|
-
* CSS for the span that wraps `text`: inline-block layout, this run's own
|
|
594
|
-
* decoration repeated, and this piece's own PowerPoint advance-width
|
|
595
|
-
* correction as `letter-spacing` (see `buildTabbedLine`). The piece is
|
|
596
|
-
* nested inside the run's own span, and neither property inherits the way a
|
|
597
|
-
* caller would want: `text-decoration-*` does not inherit into a nested
|
|
598
|
-
* element at all (an ancestor's underline is drawn *through* its
|
|
599
|
-
* descendants, but each descendant still computes `none` of its own), so a
|
|
600
|
-
* caller passes the run's decoration subset (`nestedTextDecorationStyle`) to
|
|
601
|
-
* have it repeated here; `letter-spacing` DOES inherit, which is exactly why
|
|
602
|
-
* this piece sets it explicitly rather than only when non-zero - the run's
|
|
603
|
-
* container span carries its own (wrong, whole-text) correction that would
|
|
604
|
-
* otherwise leak in.
|
|
605
|
-
*/
|
|
606
|
-
style: RunStyle;
|
|
607
|
-
/** CSS for the leader-fill span preceding this piece, or `undefined` when there is no gap to fill. */
|
|
608
|
-
leaderStyle?: RunStyle;
|
|
609
|
-
/** Leader glyphs sized to fill `leaderStyle`'s width. Present only alongside `leaderStyle`. */
|
|
610
|
-
leaderText?: string;
|
|
611
|
-
/**
|
|
612
|
-
* `a:rPr/@u="words"` per-word/gap sub-pieces of THIS tab piece's own text
|
|
613
|
-
* (see `splitWordsForUnderline`), present only when the run's underline is
|
|
614
|
-
* `words`. A tab-separated piece is otherwise rendered as a single span
|
|
615
|
-
* (`text` + `style`), which underlines it continuously - correct for a
|
|
616
|
-
* one-word piece, but wrong for a piece like `"Hello World"` between two tab
|
|
617
|
-
* stops, which needs a gap under the space. A binding renders one SIBLING
|
|
618
|
-
* span per entry IN PLACE OF the piece's single `text` span: each entry's
|
|
619
|
-
* `style` is the piece's own `style` (the same inline-block layout and
|
|
620
|
-
* advance-width correction, so the line measures exactly as before), with
|
|
621
|
-
* the underline stripped on a gap entry. They must be siblings, not spans
|
|
622
|
-
* nested inside the piece span: an ancestor's underline is drawn through
|
|
623
|
-
* every inline descendant, so a nested gap could not lose it. `text`/`style`
|
|
624
|
-
* stay the continuous-underline fallback for a binding that does not
|
|
625
|
-
* render this field.
|
|
626
|
-
*/
|
|
627
|
-
words?: Array<{
|
|
628
|
-
text: string;
|
|
629
|
-
style: RunStyle;
|
|
630
|
-
}>;
|
|
631
|
-
}
|
|
632
|
-
/** One `\n`-split line of a run's tabbed text. */
|
|
633
|
-
interface TabbedLineRun {
|
|
634
|
-
pieces: TabbedRunPiece[];
|
|
635
|
-
}
|
|
636
|
-
//#endregion
|
|
637
|
-
//#region src/render/paragraph-types.d.ts
|
|
638
|
-
/** A single rendered run within a paragraph. */
|
|
639
|
-
interface ParagraphRun {
|
|
640
|
-
text: string;
|
|
641
|
-
style: RunStyle;
|
|
642
|
-
/**
|
|
643
|
-
* The run's hyperlink (`a:hlinkClick` / `a:hlinkMouseOver`), when it has one.
|
|
644
|
-
* A binding renders the run inside an `<a href>` when {@link RunHyperlink.href}
|
|
645
|
-
* is set, and routes {@link RunHyperlink.url} to its click handler otherwise
|
|
646
|
-
* (internal `ppaction://` slide jumps).
|
|
647
|
-
*/
|
|
648
|
-
hyperlink?: RunHyperlink;
|
|
649
|
-
/**
|
|
650
|
-
* An inline equation (`m:oMath`) this run renders INSTEAD of `text`, which is
|
|
651
|
-
* empty for it. Emitted in the run sequence so the maths lands at its
|
|
652
|
-
* authored position between the runs around it.
|
|
653
|
-
*/
|
|
654
|
-
equation?: RunEquation;
|
|
655
|
-
/**
|
|
656
|
-
* The run's phonetic guide (`a:ruby`: furigana, pinyin, bopomofo), when it
|
|
657
|
-
* has one. A binding renders `<ruby>{text}<rt style>{ruby.text}</rt></ruby>`;
|
|
658
|
-
* a run carrying one is never split per word, so the annotation appears once
|
|
659
|
-
* over the whole base run.
|
|
660
|
-
*
|
|
661
|
-
* Core parsed and saved ruby from the start, but `buildParagraphs` never read
|
|
662
|
-
* it, so the annotation rendered in React alone.
|
|
663
|
-
*/
|
|
664
|
-
ruby?: RunRuby;
|
|
665
|
-
/**
|
|
666
|
-
* Index of the `textSegments` entry (of the override list when one was
|
|
667
|
-
* supplied) this run was built from.
|
|
668
|
-
*
|
|
669
|
-
* Shared splits one authored run into several per-word runs for PowerPoint's
|
|
670
|
-
* metric tracking, so this is many-to-one. It is the seam a binding uses to
|
|
671
|
-
* reach the facts the neutral model does not carry - React's find-match
|
|
672
|
-
* highlights, per-script font spans, tab stops and ruby all key off the
|
|
673
|
-
* originating segment - without regrouping the segments itself and drifting
|
|
674
|
-
* from the grouping here.
|
|
675
|
-
*/
|
|
676
|
-
segmentIndex?: number;
|
|
677
|
-
/**
|
|
678
|
-
* Offset of this run's `text` within its segment's RENDERED text (after field
|
|
679
|
-
* substitution), so a caller holding per-segment character offsets can map
|
|
680
|
-
* them onto the split runs.
|
|
681
|
-
*/
|
|
682
|
-
charStart?: number;
|
|
683
|
-
/**
|
|
684
|
-
* Per-script (`a:ea`/`a:cs`/`a:sym`) font-fallback pieces for this run's
|
|
685
|
-
* text, when a script it contains needs a font distinct from its own. A
|
|
686
|
-
* binding renders these as nested spans in place of `text` (see
|
|
687
|
-
* `text-script-fonts.ts`); absent for the common single-font case.
|
|
688
|
-
*/
|
|
689
|
-
scriptRuns?: ScriptFontPiece[];
|
|
690
|
-
/**
|
|
691
|
-
* Measured tab-stop layout for this run's text, present when it contains an
|
|
692
|
-
* authored `\t` and the paragraph declares explicit tab stops. A binding
|
|
693
|
-
* renders these lines/pieces in place of `text`, honouring per-stop
|
|
694
|
-
* alignment and leader glyphs a plain CSS `tab-size` cannot express (see
|
|
695
|
-
* `text-tab-run-build.ts`). Absent for the common no-tab case.
|
|
696
|
-
*/
|
|
697
|
-
tabLines?: TabbedLineRun[];
|
|
698
|
-
/**
|
|
699
|
-
* `a:rPr/@u="words"` word/gap pieces of a RUBY run's base text, present only
|
|
700
|
-
* when such a run's underline is `words` (the ordinary per-word split emits
|
|
701
|
-
* sibling runs instead; a tab piece carries its own `words`). Same shape as
|
|
702
|
-
* `scriptRuns` and rendered the same way, in place of `text`: a word entry
|
|
703
|
-
* carries the decoration for its own span, a gap entry is bare text. The
|
|
704
|
-
* run's own `style` has the underline stripped when this is set (see
|
|
705
|
-
* `paragraph-run-build.ts`).
|
|
706
|
-
*/
|
|
707
|
-
underlineWordPieces?: ScriptFontPiece[];
|
|
708
|
-
/** The advance-carrying space after a hanging `、`/`。` (`text-east-asian-breaks`). */
|
|
709
|
-
hangingSpace?: true;
|
|
710
|
-
/**
|
|
711
|
-
* `a:reflection` mirrored-sibling wrapper style for this run (the text-run
|
|
712
|
-
* counterpart of a shape/picture's `ComputedEffectStyle.reflection`), or
|
|
713
|
-
* `undefined` for the common no-reflection case. A binding renders a sibling
|
|
714
|
-
* node just below the run's own, painted with the same text, positioned and
|
|
715
|
-
* masked by this style - see `render/reflection.ts`'s
|
|
716
|
-
* `getTextReflectionWrapperStyle`.
|
|
717
|
-
*/
|
|
718
|
-
reflection?: ReflectionWrapperStyle;
|
|
719
|
-
}
|
|
720
|
-
/** A rendered paragraph: runs plus resolved bullet + hanging-indent metadata. */
|
|
721
|
-
interface RenderParagraph {
|
|
722
|
-
runs: ParagraphRun[];
|
|
723
|
-
/** Bullet glyph / number to render before the runs (or `undefined`). */
|
|
724
|
-
bulletMarker?: string;
|
|
725
|
-
/** Picture marker rendered before runs, or fallback metadata when unresolved. */
|
|
726
|
-
bulletPicture?: PictureBulletMarker;
|
|
727
|
-
/** Inline style for the bullet marker (font / size / colour). */
|
|
728
|
-
bulletStyle: RunStyle;
|
|
729
|
-
/** `margin-left` in px for the whole paragraph (hanging-indent layout). */
|
|
730
|
-
marginLeftPx?: number;
|
|
731
|
-
/** `text-indent` in px (first-line / hanging indent). */
|
|
732
|
-
textIndentPx?: number;
|
|
733
|
-
/**
|
|
734
|
-
* Per-paragraph `line-height` from this paragraph's own `a:pPr > a:lnSpc`.
|
|
735
|
-
* A unitless multiplier for proportional spacing (`a:spcPct`) or a `"<n>pt"`
|
|
736
|
-
* string for exact spacing (`a:spcPts`). Undefined when the paragraph does
|
|
737
|
-
* not override spacing (binding keeps the body-level line-height).
|
|
738
|
-
*/
|
|
739
|
-
lineHeight?: number | string;
|
|
740
|
-
/** `margin-top` in px from this paragraph's `a:pPr > a:spcBef` (space before). */
|
|
741
|
-
spaceBeforePx?: number;
|
|
742
|
-
/** `margin-bottom` in px from this paragraph's `a:pPr > a:spcAft` (space after). */
|
|
743
|
-
spaceAfterPx?: number;
|
|
744
|
-
/**
|
|
745
|
-
* `font-size` in px to set on the paragraph element so its CSS line boxes
|
|
746
|
-
* are built from its OWN runs rather than the text body's default size.
|
|
747
|
-
* Undefined when the paragraph already matches the body default.
|
|
748
|
-
*
|
|
749
|
-
* See `resolveParagraphStrutFontSize` for why this is needed: without it a
|
|
750
|
-
* paragraph of small runs inside a larger-defaulting body is laid out on
|
|
751
|
-
* too-tall lines and overflows its shape.
|
|
752
|
-
*/
|
|
753
|
-
strutFontSizePx?: number;
|
|
754
|
-
/**
|
|
755
|
-
* True when the paragraph has no runs and no bullet: an authored blank line
|
|
756
|
-
* (`<a:p><a:endParaRPr/></a:p>`).
|
|
757
|
-
*
|
|
758
|
-
* PowerPoint gives such a paragraph a full line box, which is how decks
|
|
759
|
-
* space a heading away from the bullet list under it. A binding must render
|
|
760
|
-
* something with height for it (a `<br>`), or the gap disappears and the
|
|
761
|
-
* block reads as one dense run of text (issue #131, slides 13-14).
|
|
762
|
-
*/
|
|
763
|
-
isEmpty?: boolean;
|
|
764
|
-
/**
|
|
765
|
-
* Indices of this paragraph's segments in the rendered segment list (the
|
|
766
|
-
* override list when one was supplied), in authored order and INCLUDING the
|
|
767
|
-
* bullet-marker segment the runs drop.
|
|
768
|
-
*
|
|
769
|
-
* The seam a binding uses to reach paragraph facts the neutral model does not
|
|
770
|
-
* carry, without regrouping the segments itself and drifting from the
|
|
771
|
-
* grouping here - which is exactly how React ended up splitting on every
|
|
772
|
-
* `"\n"` and treating a soft `a:br` as a paragraph break.
|
|
773
|
-
*/
|
|
774
|
-
segmentIndices: number[];
|
|
775
|
-
/**
|
|
776
|
-
* True when this paragraph resolves right-to-left (`a:pPr/@rtl`, or the text
|
|
777
|
-
* body's default). A binding that mirrors its hanging indent for RTL reads
|
|
778
|
-
* this; the direction itself is already in {@link paragraphStyle}.
|
|
779
|
-
*/
|
|
780
|
-
rtl?: boolean;
|
|
781
|
-
/**
|
|
782
|
-
* Extra CSS for the paragraph box, beyond the margin / indent / spacing
|
|
783
|
-
* fields above: this paragraph's own `text-align` (`a:pPr/@algn`), its BiDi
|
|
784
|
-
* `direction`, and the kinsoku line-breaking rules (`@eaLnBrk`,
|
|
785
|
-
* `@latinLnBrk`, `@hangingPunct`). Absent when the paragraph overrides none
|
|
786
|
-
* of them, which is the common case.
|
|
787
|
-
*
|
|
788
|
-
* All three used to be resolved in React's private paragraph renderer only,
|
|
789
|
-
* so a deck that centred one paragraph of a left-aligned body, or set CJK
|
|
790
|
-
* break rules, rendered differently in the other four bindings.
|
|
791
|
-
*/
|
|
792
|
-
paragraphStyle?: RunStyle;
|
|
793
|
-
/**
|
|
794
|
-
* `@hangingPunct` / `@eaLnBrk="0"` as resolved for this paragraph. The runs
|
|
795
|
-
* above already carry their pieces; React, which rebuilds each segment's
|
|
796
|
-
* pieces inside one span, re-applies `splitEastAsianBreaks` from this.
|
|
797
|
-
*/
|
|
798
|
-
eastAsianBreaks?: EastAsianBreakOptions;
|
|
799
|
-
}
|
|
800
|
-
//#endregion
|
|
801
|
-
//#region src/render/inline-list-types.d.ts
|
|
802
|
-
/** Current editor payload. Missing segments explicitly denotes plain-text fallback. */
|
|
803
|
-
interface InlineTextEditSnapshot {
|
|
804
|
-
elementId: string;
|
|
805
|
-
text: string;
|
|
806
|
-
textSegments?: TextSegment[];
|
|
807
|
-
}
|
|
808
|
-
type InlineListReadResult = {
|
|
809
|
-
kind: 'supported';
|
|
810
|
-
snapshot: InlineTextEditSnapshot;
|
|
811
|
-
paragraphs: RenderParagraph[];
|
|
812
|
-
} | {
|
|
813
|
-
kind: 'unsupported';
|
|
814
|
-
reason: string;
|
|
815
|
-
text: string;
|
|
816
|
-
};
|
|
817
|
-
//#endregion
|
|
818
|
-
//#region src/render/text-field-substitution.d.ts
|
|
819
|
-
/**
|
|
820
|
-
* Text-field placeholder substitution, shared by every binding's text
|
|
821
|
-
* renderer.
|
|
822
|
-
*
|
|
823
|
-
* Pure string logic: resolves OOXML field runs (slide number, date/time,
|
|
824
|
-
* header/footer, document properties, slide title) into their display text.
|
|
825
|
-
* Extracted from the React `viewer/utils/text-field-substitution` module so
|
|
826
|
-
* every binding substitutes identically. The locale-aware datetime engine
|
|
827
|
-
* lives in `text-field-datetime.ts`.
|
|
828
|
-
*/
|
|
829
|
-
/** Context for substituting field placeholders (slide number, date/time, header/footer, etc.). */
|
|
830
|
-
interface FieldSubstitutionContext {
|
|
831
|
-
slideNumber?: number;
|
|
832
|
-
dateTimeText?: string;
|
|
833
|
-
/**
|
|
834
|
-
* The deck's master date-field default TYPE (`a:fld/@type` on the slide
|
|
835
|
-
* master's `dt` placeholder, e.g. "datetime2"; see `header-footer-parts.ts`).
|
|
836
|
-
* This is a field TYPE, not a format pattern, and is used ONLY as a
|
|
837
|
-
* fallback for a field authored with the generic, unnumbered `datetime`
|
|
838
|
-
* type - a field that already names its own `datetime1`-`datetime13` type
|
|
839
|
-
* always uses that type, never this one (see `substituteFieldText`).
|
|
840
|
-
*/
|
|
841
|
-
dateFormat?: string;
|
|
842
|
-
/** Footer text from PptxHeaderFooter settings. */
|
|
843
|
-
footerText?: string;
|
|
844
|
-
/** Header text from PptxHeaderFooter settings. */
|
|
845
|
-
headerText?: string;
|
|
846
|
-
/** Custom document properties for `docproperty` field substitution (keyed by property name). */
|
|
847
|
-
customProperties?: ReadonlyArray<{
|
|
848
|
-
name: string;
|
|
849
|
-
value: string;
|
|
850
|
-
}>;
|
|
851
|
-
/** Locale string for date/time formatting (e.g. "en-US"). Falls back to browser default. */
|
|
852
|
-
locale?: string;
|
|
853
|
-
/** Title text extracted from the first title placeholder on the slide. */
|
|
854
|
-
slideTitle?: string;
|
|
855
|
-
}
|
|
856
|
-
//#endregion
|
|
857
|
-
//#region src/render/morph-crossfade-group.d.ts
|
|
858
|
-
/** A matched pair whose two halves are both painted by the overlay. */
|
|
859
|
-
interface MorphCrossfadeGroup {
|
|
860
|
-
/** The outgoing (ghost) half, rendered in the OUTGOING slide's context. */
|
|
861
|
-
outgoing: PptxElement;
|
|
862
|
-
/** The incoming half, rendered in the INCOMING slide's context. */
|
|
863
|
-
incoming: PptxElement;
|
|
864
|
-
/**
|
|
865
|
-
* The dissolve to run on the outgoing half's own WRAPPER, not on the element.
|
|
866
|
-
*
|
|
867
|
-
* A pair that dissolves where it stands never moves, so its journey keyframes
|
|
868
|
-
* are an identity transform and are dropped; what is left is the fade. Put
|
|
869
|
-
* that fade on the element and the element becomes its own compositing layer,
|
|
870
|
-
* whose raster the browser snaps to whole device pixels: the wording is
|
|
871
|
-
* painted up to a third of a pixel from where the live stage paints it, so it
|
|
872
|
-
* visibly twitches as the transition starts and again as it ends. Measured on
|
|
873
|
-
* the wheel deck at four show sizes, moving the fade onto the slide-sized
|
|
874
|
-
* wrapper takes the arriving half from 0.22-0.31px off to under 0.02px - a
|
|
875
|
-
* mean pixel difference of 0.01/255 against the settled slide.
|
|
876
|
-
*
|
|
877
|
-
* Undefined when the pair MOVES: it needs its journey keyframes on the
|
|
878
|
-
* element, and a shape that is travelling cannot be seen to snap.
|
|
879
|
-
*/
|
|
880
|
-
outgoingAnimation?: string;
|
|
881
|
-
/** The arriving half's dissolve. @see MorphCrossfadeGroup.outgoingAnimation */
|
|
882
|
-
incomingAnimation?: string;
|
|
883
|
-
}
|
|
884
|
-
//#endregion
|
|
885
|
-
//#region src/render/morph-plan.d.ts
|
|
886
|
-
/** Everything needed to play one morph transition. */
|
|
887
|
-
interface MorphTransitionPlan {
|
|
888
|
-
/** All `@keyframes` blocks, to inject as a single stylesheet. */
|
|
889
|
-
keyframesCss: string;
|
|
890
|
-
/** Incoming-slide element id -> CSS `animation` shorthand. */
|
|
891
|
-
incomingAnimations: Map<string, string>;
|
|
892
|
-
/** Outgoing-slide element id -> CSS `animation` shorthand. */
|
|
893
|
-
outgoingAnimations: Map<string, string>;
|
|
894
|
-
/**
|
|
895
|
-
* Incoming-slide element id -> CSS `animation` shorthand for the `<img>`
|
|
896
|
-
* INSIDE that element, never for the element's own container.
|
|
897
|
-
*
|
|
898
|
-
* A picture's source crop (`a:srcRect`, which is what PowerPoint's "Scale
|
|
899
|
-
* Height"/"Scale Width" writes) is painted by transforming the img within
|
|
900
|
-
* its frame, and the frame itself is usually identical on both slides - so
|
|
901
|
-
* this is a separate channel rather than another entry in
|
|
902
|
-
* {@link MorphTransitionPlan.incomingAnimations}, which would collide on the
|
|
903
|
-
* same element id. {@link buildMorphScopedCss} emits it as a descendant
|
|
904
|
-
* rule; a binding that applies animations as inline props instead must
|
|
905
|
-
* target the img itself (issue #148).
|
|
906
|
-
*/
|
|
907
|
-
incomingImageAnimations: Map<string, string>;
|
|
908
|
-
/** Outgoing (ghost) counterpart of {@link MorphTransitionPlan.incomingImageAnimations}. */
|
|
909
|
-
outgoingImageAnimations: Map<string, string>;
|
|
910
|
-
/**
|
|
911
|
-
* Incoming-slide element id -> CSS `animation` shorthand for the copy the
|
|
912
|
-
* overlay paints, above every ghost.
|
|
913
|
-
*
|
|
914
|
-
* These are the arriving shapes a ghost would otherwise hide for the whole
|
|
915
|
-
* transition (see {@link MorphTransitionPlan.overlayIncomingElements}). Their
|
|
916
|
-
* entry in {@link MorphTransitionPlan.incomingAnimations} has been replaced
|
|
917
|
-
* by one that holds them invisible, so the stage copy stays out of the way
|
|
918
|
-
* and only this one is seen.
|
|
919
|
-
*/
|
|
920
|
-
overlayIncomingAnimations: Map<string, string>;
|
|
921
|
-
/**
|
|
922
|
-
* The incoming-slide elements to paint in the overlay ON TOP of
|
|
923
|
-
* {@link MorphTransitionPlan.outgoingElements}, in document order.
|
|
924
|
-
*
|
|
925
|
-
* The overlay is one flat layer above the live stage, which is only faithful
|
|
926
|
-
* while every ghost really does belong on top of everything the stage draws.
|
|
927
|
-
* A shape arriving INSIDE a persisting one does not: the wheel deck's centre
|
|
928
|
-
* disc is unchanged between slides, so its ghost is opaque for the whole
|
|
929
|
-
* morph, and the title and body dissolving in within it were invisible until
|
|
930
|
-
* the overlay came down (issue #146). Painting those here restores the order
|
|
931
|
-
* PowerPoint composites in.
|
|
932
|
-
*
|
|
933
|
-
* Usually empty. A binding renders these with the INCOMING slide as their
|
|
934
|
-
* context, applying {@link MorphTransitionPlan.overlayIncomingAnimations}.
|
|
935
|
-
*
|
|
936
|
-
* A lifted half that is one end of a cross-dissolve is NOT here: it moves
|
|
937
|
-
* into {@link MorphTransitionPlan.crossfadeGroups} so it can be composited
|
|
938
|
-
* with its own ghost.
|
|
939
|
-
*/
|
|
940
|
-
overlayIncomingElements: PptxElement[];
|
|
941
|
-
/**
|
|
942
|
-
* Pairs the overlay paints BOTH halves of, to be rendered as one isolated
|
|
943
|
-
* group blending additively (see `morph-crossfade-group`).
|
|
944
|
-
*
|
|
945
|
-
* Their elements are deliberately absent from
|
|
946
|
-
* {@link MorphTransitionPlan.outgoingElements} and
|
|
947
|
-
* {@link MorphTransitionPlan.overlayIncomingElements}: a binding that renders
|
|
948
|
-
* the groups paints each half exactly once, and one that ignored them would
|
|
949
|
-
* drop the pair rather than paint it twice.
|
|
950
|
-
*
|
|
951
|
-
* A pair that dissolves where it stands also has its dissolve moved OFF the
|
|
952
|
-
* two elements and onto {@link MorphCrossfadeGroup.outgoingAnimation} /
|
|
953
|
-
* {@link MorphCrossfadeGroup.incomingAnimation}, for the binding to put on
|
|
954
|
-
* the wrapper it paints each half in; the elements are then absent from
|
|
955
|
-
* `outgoingAnimations` / `overlayIncomingAnimations` too, so no scoped rule
|
|
956
|
-
* animates them. One that MOVES keeps its animations where they were.
|
|
957
|
-
*
|
|
958
|
-
* Painted above {@link MorphTransitionPlan.overlayIncomingElements}, in the
|
|
959
|
-
* incoming slide's document order.
|
|
960
|
-
*/
|
|
961
|
-
crossfadeGroups: MorphCrossfadeGroup[];
|
|
962
|
-
/**
|
|
963
|
-
* The outgoing slide's elements, in document order, for the binding to
|
|
964
|
-
* render in its transition overlay for the duration of the morph. Most carry
|
|
965
|
-
* an entry in {@link MorphTransitionPlan.outgoingAnimations}: they either
|
|
966
|
-
* fade out in place (no counterpart) or glide onto a counterpart, dissolving
|
|
967
|
-
* into it when the appearance changed.
|
|
968
|
-
*
|
|
969
|
-
* A ghost standing in for an INERT pair deliberately has no entry there and
|
|
970
|
-
* is painted statically. Its keyframes would run from itself to itself, and
|
|
971
|
-
* a running animation would put it on its own compositing layer, whose
|
|
972
|
-
* raster the browser snaps to whole device pixels - visibly shifting a shape
|
|
973
|
-
* that is not supposed to move at all (issue #161).
|
|
974
|
-
*
|
|
975
|
-
* This is a SUBSET of the outgoing slide: a shape the live stage already
|
|
976
|
-
* draws identically is left out, because the overlay is opaque above it and
|
|
977
|
-
* would hide the incoming slide's own arrivals. See `resolveMorphGhostIds`.
|
|
978
|
-
*/
|
|
979
|
-
outgoingElements: PptxElement[];
|
|
980
|
-
/** Animation duration in ms, echoed for convenience. */
|
|
981
|
-
durationMs: number;
|
|
982
|
-
}
|
|
983
|
-
//#endregion
|
|
984
|
-
//#region src/render/text-case-transform.d.ts
|
|
985
|
-
type ChangeCaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';
|
|
986
|
-
//#endregion
|
|
987
|
-
//#region src/render/shape-adjustment-model.d.ts
|
|
988
|
-
/**
|
|
989
|
-
* `shape-adjustment-model`: the vocabulary the adjust-handle modules share.
|
|
990
|
-
*
|
|
991
|
-
* The `a:ahLst` work is split three ways for the repo's file-size budget:
|
|
992
|
-
* `shape-adjustment-probe` measures the geometry, `shape-adjustment-handles`
|
|
993
|
-
* derives the handles from those measurements, and `shape-adjustment-solver`
|
|
994
|
-
* turns a pointer position back into guide values. All three need these types
|
|
995
|
-
* and the one rule that operates purely on them, so they live here and the
|
|
996
|
-
* dependency graph stays a DAG rather than a cycle.
|
|
997
|
-
*
|
|
998
|
-
* @module render/shape-adjustment-model
|
|
999
|
-
*/
|
|
1000
|
-
/**
|
|
1001
|
-
* How a pointer position becomes a guide value, captured once when the gesture
|
|
1002
|
-
* starts so `pointermove` stays pure arithmetic.
|
|
1003
|
-
*/
|
|
1004
|
-
interface ShapeAdjustmentSolver {
|
|
1005
|
-
/** `linear`: the handle slides. `angular`: it swings about {@link centerX}. */
|
|
1006
|
-
kind: 'linear' | 'angular';
|
|
1007
|
-
/** Handle position in element-local px at {@link startValue}. */
|
|
1008
|
-
anchorX: number;
|
|
1009
|
-
anchorY: number;
|
|
1010
|
-
/** Element-local px the handle travels per ONE unit of guide value. */
|
|
1011
|
-
dirX: number;
|
|
1012
|
-
dirY: number;
|
|
1013
|
-
/** Pivot for an angular handle (the shape centre). */
|
|
1014
|
-
centerX: number;
|
|
1015
|
-
centerY: number;
|
|
1016
|
-
/** The guide value the anchor was measured at. */
|
|
1017
|
-
startValue: number;
|
|
1018
|
-
/** Guide-space bounds, taken from the preset's own `pin` clamp. */
|
|
1019
|
-
min: number;
|
|
1020
|
-
max: number;
|
|
1021
|
-
}
|
|
1022
|
-
/** One guide a handle drives. */
|
|
1023
|
-
interface AdjustmentAxisSolver {
|
|
1024
|
-
key: string;
|
|
1025
|
-
solver: ShapeAdjustmentSolver;
|
|
1026
|
-
}
|
|
1027
|
-
/** Descriptor for one draggable adjustment handle (the amber diamond). */
|
|
1028
|
-
interface ShapeAdjustmentHandleDescriptor {
|
|
1029
|
-
/** The `a:avLst` guide name this handle writes (`adj`, `adj1`, ...). */
|
|
1030
|
-
key: string;
|
|
1031
|
-
/** Handle x offset in element-local px (origin = element top-left). */
|
|
1032
|
-
left: number;
|
|
1033
|
-
/** Handle y offset in element-local px. */
|
|
1034
|
-
top: number;
|
|
1035
|
-
/**
|
|
1036
|
-
* Current adjustment value in GUIDE units, not a 0-1 fraction. Most presets
|
|
1037
|
-
* range 0..50000 or 0..100000 and the angular ones run to 21,600,000.
|
|
1038
|
-
*/
|
|
1039
|
-
value: number;
|
|
1040
|
-
cursor: string;
|
|
1041
|
-
/**
|
|
1042
|
-
* How this handle's drag resolves, measured off the preset geometry: one
|
|
1043
|
-
* entry per `a:avLst` guide it drives (callouts drive two). Absent only for
|
|
1044
|
-
* a caller that built a descriptor by hand.
|
|
1045
|
-
*/
|
|
1046
|
-
solvers?: AdjustmentAxisSolver[];
|
|
1047
|
-
}
|
|
1048
|
-
/** Live drag state captured when an adjustment gesture starts. */
|
|
1049
|
-
interface ShapeAdjustmentDragState {
|
|
1050
|
-
elementId: string;
|
|
1051
|
-
key: string;
|
|
1052
|
-
shapeType: string;
|
|
1053
|
-
startClientX: number;
|
|
1054
|
-
startClientY: number;
|
|
1055
|
-
startAdjustment: number;
|
|
1056
|
-
startWidth: number;
|
|
1057
|
-
startHeight: number;
|
|
1058
|
-
moved: boolean;
|
|
1059
|
-
/** Copied from the descriptor the gesture started on. */
|
|
1060
|
-
solvers?: AdjustmentAxisSolver[];
|
|
1061
|
-
/**
|
|
1062
|
-
* The element's whole `a:avLst` map at gesture start.
|
|
1063
|
-
*
|
|
1064
|
-
* A binding writes `shapeAdjustments` as one object, so a drag that sent
|
|
1065
|
-
* only the guide it changed would DELETE every other authored adjustment on
|
|
1066
|
-
* a multi-adjust preset (a `quadArrow` would lose two of its three the first
|
|
1067
|
-
* time one was touched).
|
|
1068
|
-
*/
|
|
1069
|
-
startAdjustments?: Record<string, number>;
|
|
1070
|
-
}
|
|
1071
|
-
interface CollaborationShellState {
|
|
1072
|
-
canEdit: boolean;
|
|
1073
|
-
status: ConnectionStatus$1;
|
|
1074
|
-
remoteUsers: readonly SanitizedPresence[];
|
|
1075
|
-
connectedCount: number;
|
|
1076
|
-
}
|
|
1077
|
-
//#endregion
|
|
1078
|
-
//#region src/render/collaboration-text-codec.d.ts
|
|
1079
|
-
/**
|
|
1080
|
-
* collaboration-text-codec.ts: TextSegment[] <-> Y.Text delta codec used by the
|
|
1081
|
-
* collaboration sync layer. Split out of collaboration-sync.ts to keep both
|
|
1082
|
-
* modules focused.
|
|
1083
|
-
*
|
|
1084
|
-
* Exports:
|
|
1085
|
-
* - DeltaOp / YTextLike: structural Yjs text interfaces (no yjs import)
|
|
1086
|
-
* - encodeTextBody: write TextSegment[] into a live YTextLike
|
|
1087
|
-
* - encodeSegmentsToDelta: pure simulation of the delta Y.Text would produce
|
|
1088
|
-
* - decodeDelta / decodeTextBody: delta -> TextSegment[]
|
|
1089
|
-
* - isYTextLike: runtime guard
|
|
1090
|
-
*/
|
|
1091
|
-
interface DeltaOp {
|
|
1092
|
-
insert?: unknown;
|
|
1093
|
-
attributes?: Record<string, unknown>;
|
|
1094
|
-
}
|
|
1095
|
-
interface YTextLike {
|
|
1096
|
-
insert: (index: number, text: string, attrs?: Record<string, string>) => void;
|
|
1097
|
-
toDelta: () => DeltaOp[];
|
|
1098
|
-
toString: () => string;
|
|
1099
|
-
}
|
|
1100
|
-
//#endregion
|
|
1101
|
-
//#region src/render/collaboration-text-merge.d.ts
|
|
1102
|
-
/** Y.Text surface needed for in-place edits (delete/format on top of insert). */
|
|
1103
|
-
interface YTextEditableLike extends YTextLike {
|
|
1104
|
-
delete: (index: number, length: number) => void;
|
|
1105
|
-
format: (index: number, length: number, attributes: Record<string, string | null>) => void;
|
|
1106
|
-
}
|
|
1107
|
-
//#endregion
|
|
1108
|
-
//#region src/render/collaboration-text-positions.d.ts
|
|
1109
|
-
interface TextPositionCell {
|
|
1110
|
-
index: number;
|
|
1111
|
-
left?: TextPositionCell;
|
|
1112
|
-
right?: TextPositionCell;
|
|
1113
|
-
}
|
|
1114
|
-
interface TrackedTextPosition {
|
|
1115
|
-
/** Internal identity, shared by snapshots that observed the same character. */
|
|
1116
|
-
readonly cell: TextPositionCell;
|
|
1117
|
-
readonly association: number;
|
|
1118
|
-
}
|
|
1119
|
-
//#endregion
|
|
1120
|
-
//#region src/render/collaboration-text-session-delta.d.ts
|
|
1121
|
-
/** Browser edit range mapped to the editor's pre-input encoded coordinates. */
|
|
1122
|
-
interface LocalTextReplacement {
|
|
1123
|
-
from: number;
|
|
1124
|
-
to: number;
|
|
1125
|
-
}
|
|
1126
|
-
/** Desired UTF-16 units mapped to the editor's previously observed identities. */
|
|
1127
|
-
interface TextSessionCorrespondence {
|
|
1128
|
-
readonly retainedIndices: readonly (number | null)[];
|
|
1129
|
-
/** Old carriers for known paragraph attributes, independently of character identity. */
|
|
1130
|
-
readonly paragraphSources?: readonly (number | null)[];
|
|
1131
|
-
}
|
|
1132
|
-
type LocalTextEdit = LocalTextReplacement | TextSessionCorrespondence;
|
|
1133
|
-
//#endregion
|
|
1134
|
-
//#region src/render/collaboration-text-session.d.ts
|
|
1135
|
-
/** Supplied by the binding's existing Yjs runtime, bound to this exact Y.Text. */
|
|
1136
|
-
interface TextSessionPositions<Position> {
|
|
1137
|
-
capture: (index: number, association: number) => Position;
|
|
1138
|
-
resolve: (position: Position) => number | null;
|
|
1139
|
-
/** Synchronize tracked positions once per batch, including in-transaction writes. */
|
|
1140
|
-
refresh?: () => boolean | void;
|
|
1141
|
-
/** Release only resources created for this session. */
|
|
1142
|
-
dispose?: () => void;
|
|
1143
|
-
}
|
|
1144
|
-
/** Opaque acknowledgement identity for an exact remote snapshot painted by an adapter. */
|
|
1145
|
-
interface CollaborationTextSnapshot {
|
|
1146
|
-
readonly delta: readonly DeltaOp[];
|
|
1147
|
-
}
|
|
1148
|
-
interface CollaborationTextSession {
|
|
1149
|
-
applyLocalDelta: (delta: readonly DeltaOp[], edit?: LocalTextEdit) => boolean;
|
|
1150
|
-
readMerged: () => CollaborationTextSnapshot | undefined;
|
|
1151
|
-
adoptMerged: (snapshot: CollaborationTextSnapshot) => boolean;
|
|
1152
|
-
/** Capture an offset in the last painted/local draft, not the newer remote string. */
|
|
1153
|
-
bookmark: (index: number, association: number) => () => number | null;
|
|
1154
|
-
dispose: () => void;
|
|
1155
|
-
}
|
|
1156
|
-
//#endregion
|
|
1157
|
-
//#region src/render/collaboration-sync.d.ts
|
|
1158
|
-
interface YMapLike {
|
|
1159
|
-
get: (key: string) => unknown;
|
|
1160
|
-
set: (key: string, value: unknown) => void;
|
|
1161
|
-
delete: (key: string) => void;
|
|
1162
|
-
forEach: (cb: (value: unknown, key: string) => void) => void;
|
|
1163
|
-
}
|
|
1164
|
-
/** Shape of the Yjs transaction passed to (deep) observers. */
|
|
1165
|
-
interface YTransactionLike {
|
|
1166
|
-
origin?: unknown;
|
|
1167
|
-
}
|
|
1168
|
-
type YDeepObserver = (events?: unknown, transaction?: YTransactionLike) => void;
|
|
1169
|
-
interface YArrayLike {
|
|
1170
|
-
readonly length: number;
|
|
1171
|
-
get: (index: number) => unknown;
|
|
1172
|
-
push: (items: unknown[]) => void;
|
|
1173
|
-
delete: (index: number, length?: number) => void;
|
|
1174
|
-
insert: (index: number, items: unknown[]) => void;
|
|
1175
|
-
toArray: () => unknown[];
|
|
1176
|
-
observe: (handler: () => void) => void;
|
|
1177
|
-
unobserve: (handler: () => void) => void;
|
|
1178
|
-
observeDeep: (handler: YDeepObserver) => void;
|
|
1179
|
-
unobserveDeep: (handler: YDeepObserver) => void;
|
|
1180
|
-
}
|
|
1181
|
-
interface YDocLike {
|
|
1182
|
-
getMap: (name: string) => YMapLike;
|
|
1183
|
-
getArray: (name: string) => YArrayLike;
|
|
1184
|
-
transact: (fn: () => void, origin?: unknown) => void;
|
|
1185
|
-
}
|
|
1186
|
-
interface YjsFactories {
|
|
1187
|
-
createMap: () => YMapLike;
|
|
1188
|
-
createArray: () => YArrayLike;
|
|
1189
|
-
createText: () => YTextLike;
|
|
1190
|
-
/** Track character identities using the binding's existing Yjs runtime. */
|
|
1191
|
-
createTextPositions?: (text: YTextEditableLike) => TextSessionPositions<TrackedTextPosition>;
|
|
1192
|
-
}
|
|
1193
|
-
//#endregion
|
|
1194
|
-
//#region src/render/collaboration-live-patch-target.d.ts
|
|
1195
|
-
/** Interim geometry for an element mid-gesture. All fields optional. */
|
|
1196
|
-
interface LiveGeometryPatch {
|
|
1197
|
-
x?: number;
|
|
1198
|
-
y?: number;
|
|
1199
|
-
width?: number;
|
|
1200
|
-
height?: number;
|
|
1201
|
-
rotation?: number;
|
|
1202
|
-
}
|
|
1203
|
-
/** The element's pre-edit rich text, used to remap the interim plain text. */
|
|
1204
|
-
interface LiveTextSource {
|
|
1205
|
-
textSegments?: TextSegment[];
|
|
1206
|
-
textStyle?: TextStyle;
|
|
1207
|
-
}
|
|
1208
|
-
//#endregion
|
|
1209
|
-
//#region src/render/collaboration-text-target.d.ts
|
|
1210
|
-
interface CollaborationInlineSnapshot extends CollaborationTextSnapshot {
|
|
1211
|
-
readonly inline: InlineTextEditSnapshot;
|
|
1212
|
-
}
|
|
1213
|
-
/** A mounted editor owns this handle, never the document or its provider. */
|
|
1214
|
-
interface CollaborationTextTarget extends CollaborationTextSession {
|
|
1215
|
-
readMerged: () => CollaborationInlineSnapshot | undefined;
|
|
1216
|
-
/** A bookmark follows character identity rather than a mutable numeric offset. */
|
|
1217
|
-
bookmark: (index: number, association: number) => () => number | null;
|
|
1218
|
-
}
|
|
1219
|
-
interface CollaborationLivePatcher {
|
|
1220
|
-
/** Bind a mounted native editor; its handle must be disposed on unmount. */
|
|
1221
|
-
beginTextEdit?: (slideId: string | undefined, elementId: string, onChange?: () => void, ownsModel?: (element: PptxElement) => boolean) => CollaborationTextTarget | undefined;
|
|
1222
|
-
/** Attach a live doc (or `null` to go dormant). Pending patches are dropped. */
|
|
1223
|
-
configure: (doc: YDocLike | null, factories: YjsFactories | null,
|
|
1224
|
-
/** Publish synchronously when the host may revoke write readiness at any time. */
|
|
1225
|
-
immediate?: boolean) => void;
|
|
1226
|
-
/** True when a doc + factories are attached, i.e. patches will be written. */
|
|
1227
|
-
isActive: () => boolean;
|
|
1228
|
-
/** Queue interim geometry for an element. */
|
|
1229
|
-
patchGeometry: (slideId: string | undefined, elementId: string, geometry: LiveGeometryPatch) => void;
|
|
1230
|
-
/** Queue interim text for an element (remapped over `source`'s segments). */
|
|
1231
|
-
patchText: (slideId: string | undefined, elementId: string, text: string, source?: LiveTextSource) => void;
|
|
1232
|
-
/** Write everything queued right now (call on gesture end / edit commit). */
|
|
1233
|
-
flush: () => void;
|
|
1234
|
-
/** Drop pending work, cancel timers and detach the doc. */
|
|
1235
|
-
dispose: () => void;
|
|
1236
|
-
}
|
|
1237
|
-
//#endregion
|
|
1238
|
-
//#region src/render/collaboration-load-origin.d.ts
|
|
1239
|
-
/**
|
|
1240
|
-
* Who asked for the deck that just finished loading, and what that means for a
|
|
1241
|
-
* room that already holds slides.
|
|
1242
|
-
*
|
|
1243
|
-
* Every binding brackets its content-load with an adoption check: when a load
|
|
1244
|
-
* lands while a collaboration session is up and the shared doc already has
|
|
1245
|
-
* slides, the ROOM wins and the freshly parsed deck is thrown away. That rule
|
|
1246
|
-
* exists for one case only - a late joiner whose bootstrap deck (the blank or
|
|
1247
|
-
* sample deck the host mounted the viewer with) finishes parsing after the
|
|
1248
|
-
* room's real slides arrived, which would otherwise clobber them with nothing
|
|
1249
|
-
* left to repair it, since the doc itself never changed.
|
|
1250
|
-
*
|
|
1251
|
-
* Applied to EVERY load it also swallows the deck a user deliberately opens
|
|
1252
|
-
* during a session. Joining a room and then opening a file left the viewer on
|
|
1253
|
-
* the room's blank starter deck: the file parsed, was committed, and was
|
|
1254
|
-
* immediately overwritten (reproduced in the vanilla demo - a 7-slide deck
|
|
1255
|
-
* opened in a room settled back to the room's 1 slide, and the bigger the file
|
|
1256
|
-
* the longer the window). Opening a file is an act of authorship, so it is
|
|
1257
|
-
* published to the room instead.
|
|
1258
|
-
*
|
|
1259
|
-
* @module render/collaboration-load-origin
|
|
1260
|
-
*/
|
|
1261
|
-
/**
|
|
1262
|
-
* Why a content load ran.
|
|
1263
|
-
*
|
|
1264
|
-
* - `bootstrap`: the deck the host handed the viewer at mount (`source`), or a
|
|
1265
|
-
* session restore. Nobody chose it during the session.
|
|
1266
|
-
* - `user`: opened during the session - File > Open, a recent file, a dropped
|
|
1267
|
-
* file, or a host calling the load API.
|
|
1268
|
-
*/
|
|
1269
|
-
type CollabLoadOrigin = 'bootstrap' | 'user';
|
|
1270
|
-
//#endregion
|
|
1271
|
-
//#region src/render/slide-compare.d.ts
|
|
1272
|
-
type SlideDiffStatus = 'added' | 'removed' | 'changed' | 'unchanged';
|
|
1273
|
-
type ElementChangeKind = 'added' | 'removed' | 'moved' | 'resized' | 'textChanged';
|
|
1274
|
-
interface ElementChange {
|
|
1275
|
-
elementId: string;
|
|
1276
|
-
label: string;
|
|
1277
|
-
kind: ElementChangeKind;
|
|
1278
|
-
description: string;
|
|
1279
|
-
}
|
|
1280
|
-
interface SlideDiff {
|
|
1281
|
-
status: SlideDiffStatus;
|
|
1282
|
-
/** Index in the base (current) presentation, or -1 for added slides. */
|
|
1283
|
-
baseIndex: number;
|
|
1284
|
-
/** Index in the compare (other) presentation, or -1 for removed slides. */
|
|
1285
|
-
compareIndex: number;
|
|
1286
|
-
/** The base slide data (undefined for added slides). */
|
|
1287
|
-
baseSlide?: PptxSlide;
|
|
1288
|
-
/** The compare slide data (undefined for removed slides). */
|
|
1289
|
-
compareSlide?: PptxSlide;
|
|
1290
|
-
/** Per-element changes when status is `changed`. */
|
|
1291
|
-
changes: ElementChange[];
|
|
1292
|
-
}
|
|
1293
|
-
interface CompareResult {
|
|
1294
|
-
diffs: SlideDiff[];
|
|
1295
|
-
baseSlideCount: number;
|
|
1296
|
-
compareSlideCount: number;
|
|
1297
|
-
addedCount: number;
|
|
1298
|
-
removedCount: number;
|
|
1299
|
-
changedCount: number;
|
|
1300
|
-
unchangedCount: number;
|
|
1301
|
-
}
|
|
1302
|
-
//#endregion
|
|
1303
|
-
//#region src/render/slide-transition-types.d.ts
|
|
1304
|
-
/** Resolved CSS `animation` shorthands for the two transition layers. */
|
|
1305
|
-
interface SlideTransitionAnimations {
|
|
1306
|
-
/** CSS `animation` value for the outgoing (old) slide layer, or `'none'`. */
|
|
1307
|
-
outgoing: string;
|
|
1308
|
-
/** CSS `animation` value for the incoming (new) slide layer, or `'none'`. */
|
|
1309
|
-
incoming: string;
|
|
1310
|
-
/** Whether the outgoing layer should render above the incoming layer. */
|
|
1311
|
-
outgoingOnTop: boolean;
|
|
1312
|
-
}
|
|
1313
|
-
/** The four cardinal directions a transition can resolve to. */
|
|
1314
|
-
type ResolvedDirection = 'left' | 'right' | 'up' | 'down';
|
|
1315
|
-
/** Cardinal directions plus the four diagonals (for cover/uncover/strips). */
|
|
1316
|
-
type ResolvedDirection8 = ResolvedDirection | 'lu' | 'ld' | 'ru' | 'rd';
|
|
1317
|
-
/** Map an OOXML `dir` token (`l`/`r`/`u`/`d`) to a cardinal direction. */
|
|
1318
|
-
declare function resolveDirection(direction: string | undefined, defaultDir: ResolvedDirection): ResolvedDirection;
|
|
1319
|
-
/** Map an OOXML `dir` token to a cardinal **or diagonal** direction. */
|
|
1320
|
-
declare function resolveDirection8(direction: string | undefined, defaultDir: ResolvedDirection): ResolvedDirection8;
|
|
1321
|
-
/** Resolve an orientation from the `orient` or `direction` attribute. */
|
|
1322
|
-
declare function resolveOrientation(direction: string | undefined, orient: string | undefined): 'horz' | 'vert';
|
|
1323
|
-
/** Transition types eligible for `random` selection (kept deterministic-light). */
|
|
1324
|
-
declare const RANDOM_ELIGIBLE_TYPES: readonly PptxTransitionType[];
|
|
1325
|
-
/** No-animation sentinel — used for `none`/`cut` (instant slide swap). */
|
|
1326
|
-
declare const INSTANT: SlideTransitionAnimations;
|
|
1327
|
-
/**
|
|
1328
|
-
* Default transition duration (ms) when the transition omits `durationMs`. This
|
|
1329
|
-
* is the React/Vue default consumed by `resolveSlideTransition`. The Angular
|
|
1330
|
-
* binding uses its own (smaller, floored) duration policy.
|
|
1331
|
-
*/
|
|
1332
|
-
declare const DEFAULT_TRANSITION_DURATION_MS = 1000;
|
|
1333
|
-
/**
|
|
1334
|
-
* Default Morph duration (ms) for a transition that declares NEITHER an
|
|
1335
|
-
* explicit `p14:dur` (which lands in `durationMs` and always wins) NOR a legacy
|
|
1336
|
-
* `spd` speed (see {@link TRANSITION_SPEED_DURATION_MS}).
|
|
1337
|
-
*
|
|
1338
|
-
* A Morph that declares nothing carries no duration hint at all, and desktop
|
|
1339
|
-
* PowerPoint then plays it at its own 0.5s fallback (the Duration box shows
|
|
1340
|
-
* 0.50 for such slides and the transition measures at half a second); the
|
|
1341
|
-
* previous 1.0s/2.0s defaults made those decks play at double PowerPoint
|
|
1342
|
-
* speed.
|
|
1343
|
-
*/
|
|
1344
|
-
declare const DEFAULT_MORPH_DURATION_MS = 500;
|
|
1345
|
-
/**
|
|
1346
|
-
* Duration (ms) for each legacy `p:transition/@spd` speed.
|
|
1347
|
-
*
|
|
1348
|
-
* Measured against PowerPoint itself: the issue #131 deck's morph slides carry
|
|
1349
|
-
* `spd="slow"` and no `p14:dur`, and PowerPoint reports
|
|
1350
|
-
* `SlideShowTransition.Duration = 1.0`. Re-authoring that attribute and
|
|
1351
|
-
* re-reading it through COM gives fast=0.5s, med=0.75s, slow=1.0s - and the
|
|
1352
|
-
* same values for Morph as for every other effect, contradicting the earlier
|
|
1353
|
-
* assumption that Morph ignores `spd`.
|
|
1354
|
-
*/
|
|
1355
|
-
declare const TRANSITION_SPEED_DURATION_MS: Readonly<Record<string, number>>;
|
|
1356
|
-
/** Easing applied to every transition animation. */
|
|
1357
|
-
declare const EASE = "ease-in-out";
|
|
1358
|
-
/**
|
|
1359
|
-
* `p:wheel/@spokes` (CT_WheelTransition): PowerPoint's Wheel dialog offers
|
|
1360
|
-
* exactly these five spoke counts. Any other authored value (or absence, the
|
|
1361
|
-
* schema default) snaps to the nearest one so the keyframe lookup always
|
|
1362
|
-
* resolves to a real `pptx-tr-wheel-in-N` block.
|
|
1363
|
-
*/
|
|
1364
|
-
declare const WHEEL_SPOKE_COUNTS: readonly number[];
|
|
1365
|
-
/** Resolve an authored `spokes` count to the nearest PowerPoint-offered value. */
|
|
1366
|
-
declare function resolveWheelSpokeCount(spokes: number | undefined): number;
|
|
1367
|
-
//#endregion
|
|
1368
|
-
//#region src/render/slide-transition-keyframes.d.ts
|
|
1369
|
-
/**
|
|
1370
|
-
* `slide-transition-keyframes` — the full `@keyframes` block backing every
|
|
1371
|
-
* resolved slide transition. Inject it once per overlay via a `<style>` element
|
|
1372
|
-
* (the same pattern the element-animation engine uses for
|
|
1373
|
-
* `ANIMATION_KEYFRAMES_CSS`).
|
|
1374
|
-
*
|
|
1375
|
-
* Keyframe names are `pptx-tr-*`-prefixed so they never collide with the
|
|
1376
|
-
* element-animation keyframes (`pptx-vue-*`) or the native-animation timeline
|
|
1377
|
-
* keyframes (`pptx-tl-*`).
|
|
1378
|
-
*
|
|
1379
|
-
* Both {@link SLIDE_TRANSITION_KEYFRAMES} and the `*_CSS` alias point at the
|
|
1380
|
-
* same string — the bindings historically exported it under both names, so the
|
|
1381
|
-
* alias preserves their public surface.
|
|
1382
|
-
*
|
|
1383
|
-
* The faithful Office 2010 (`p14`) keyframes are appended (via
|
|
1384
|
-
* {@link P14_TRANSITION_KEYFRAMES_ALL}) so the exotic / 3-D transitions routed
|
|
1385
|
-
* through `getP14TransitionAnimations` animate wherever this block is injected,
|
|
1386
|
-
* with no per-binding wiring. {@link FRAGMENT_TRANSITION_KEYFRAMES} is appended
|
|
1387
|
-
* last, backing the seven multi-fragment cinematic presets resolved by
|
|
1388
|
-
* `getFragmentedTransitionDescriptor` (`slide-transition-fragments.ts`).
|
|
1389
|
-
*
|
|
1390
|
-
* @module render/slide-transition-keyframes
|
|
1391
|
-
*/
|
|
1392
|
-
/**
|
|
1393
|
-
* The full slide-transition `@keyframes` block: the classic set plus the
|
|
1394
|
-
* faithful Office 2010 (`p14`) keyframes, so both the classic and exotic / 3-D
|
|
1395
|
-
* transitions animate wherever this single string is injected.
|
|
1396
|
-
*/
|
|
1397
|
-
declare const SLIDE_TRANSITION_KEYFRAMES: string;
|
|
1398
|
-
/**
|
|
1399
|
-
* Alias of {@link SLIDE_TRANSITION_KEYFRAMES} under the `_CSS` name the Vue
|
|
1400
|
-
* binding historically exported.
|
|
1401
|
-
*/
|
|
1402
|
-
declare const SLIDE_TRANSITION_KEYFRAMES_CSS: string;
|
|
1403
|
-
//#endregion
|
|
1404
|
-
//#region src/render/slide-transition-css.d.ts
|
|
1405
|
-
/**
|
|
1406
|
-
* Map a {@link PptxTransitionType} (+ duration/direction/orient/spokes) to the
|
|
1407
|
-
* concrete CSS `animation` descriptors for the outgoing and incoming layers.
|
|
1408
|
-
*
|
|
1409
|
-
* Unknown types fall back to a symmetrical cross-fade.
|
|
1410
|
-
*/
|
|
1411
|
-
declare function getSlideTransitionAnimations(type: PptxTransitionType, durationMs: number, direction: string | undefined, orient?: string | undefined, spokes?: number | undefined, pattern?: string | undefined): SlideTransitionAnimations;
|
|
1412
|
-
/**
|
|
1413
|
-
* Convenience wrapper that reads everything off a {@link PptxSlideTransition},
|
|
1414
|
-
* applying the React/Vue default duration when none is set. `none`/`cut` and a
|
|
1415
|
-
* transition with a non-positive duration resolve to {@link INSTANT}.
|
|
1416
|
-
*/
|
|
1417
|
-
declare function resolveSlideTransition(transition: PptxSlideTransition | undefined): SlideTransitionAnimations;
|
|
1418
|
-
/**
|
|
1419
|
-
* The effective duration (ms) for a transition under the React/Vue policy — the
|
|
1420
|
-
* configured `durationMs`, or {@link DEFAULT_TRANSITION_DURATION_MS} when
|
|
1421
|
-
* unset/invalid. `none`/`cut` resolve to `0` (instant).
|
|
1422
|
-
*/
|
|
1423
|
-
declare function resolveTransitionDurationMs(transition: PptxSlideTransition | undefined): number;
|
|
1424
|
-
//#endregion
|
|
1425
|
-
//#region src/render/slide-transition-fragment-types.d.ts
|
|
1426
|
-
/**
|
|
1427
|
-
* `slide-transition-fragment-types` - shared types and small pure helpers for
|
|
1428
|
-
* the multi-fragment cinematic transitions (`vortex`, `honeycomb`, `glitter`,
|
|
1429
|
-
* `shred`, `fracture`, `curtains`, `airplane`).
|
|
1430
|
-
*
|
|
1431
|
-
* These seven presets render in real PowerPoint as many independent
|
|
1432
|
-
* fragments, tiles, particles, or (for `airplane`) folded panels, not a
|
|
1433
|
-
* single animated layer - see `slide-transition-fragments.ts` for the
|
|
1434
|
-
* COM `CreateVideo` measurement writeup. A `FragmentedTransitionDescriptor`
|
|
1435
|
-
* is the pure, framework-neutral output every binding maps onto N clipped
|
|
1436
|
-
* copies of its own `SlideLayer`/`SlideCanvas` component: each fragment is a
|
|
1437
|
-
* full-size copy of the outgoing or incoming slide, clipped with `clip-path`
|
|
1438
|
-
* to its slice and animated with a shared `@keyframes` block (from
|
|
1439
|
-
* {@link FRAGMENT_TRANSITION_KEYFRAMES}) parameterised per fragment via CSS
|
|
1440
|
-
* custom properties, so the whole set is transform/opacity-only and
|
|
1441
|
-
* GPU-composited with no per-frame JS.
|
|
1442
|
-
*
|
|
1443
|
-
* @module render/slide-transition-fragment-types
|
|
1444
|
-
*/
|
|
1445
|
-
/** One fragment: a clipped, independently-animated copy of a slide layer. */
|
|
1446
|
-
interface TransitionFragment {
|
|
1447
|
-
/** Stable id for keys / `data-*` attributes; unique within its layer. */
|
|
1448
|
-
id: string;
|
|
1449
|
-
/** `clip-path` value, in percentages of the full (unscaled) slide box. */
|
|
1450
|
-
clipPath: string;
|
|
1451
|
-
/**
|
|
1452
|
-
* CSS custom properties consumed by the shared `@keyframes` named by the
|
|
1453
|
-
* owning {@link FragmentedLayer.keyframesName}. Values are pre-formatted
|
|
1454
|
-
* (already unit-suffixed, e.g. `'34deg'`, `'-120%'`) so bindings can copy
|
|
1455
|
-
* them verbatim into an inline `style` object.
|
|
1456
|
-
*/
|
|
1457
|
-
vars: Readonly<Record<string, string>>;
|
|
1458
|
-
/** `animation-delay`, in ms. */
|
|
1459
|
-
delayMs: number;
|
|
1460
|
-
/** `transform-origin`, e.g. `'50% 50%'`, so rotate/scale pivot correctly. */
|
|
1461
|
-
transformOrigin: string;
|
|
1462
|
-
}
|
|
1463
|
-
/** One layer (outgoing or incoming) rendered as N independent fragments. */
|
|
1464
|
-
interface FragmentedLayer {
|
|
1465
|
-
/** Name of the shared `@keyframes` block every fragment in this layer runs. */
|
|
1466
|
-
keyframesName: string;
|
|
1467
|
-
/** Per-fragment `animation-duration`, in ms. */
|
|
1468
|
-
durationMs: number;
|
|
1469
|
-
/** Per-fragment `animation-timing-function`. */
|
|
1470
|
-
easing: string;
|
|
1471
|
-
fragments: readonly TransitionFragment[];
|
|
1472
|
-
}
|
|
1473
|
-
/** Everything the Transitions tab's controls currently say. */
|
|
1474
|
-
interface RibbonTransitionDraft {
|
|
1475
|
-
/** The highlighted gallery entry. */
|
|
1476
|
-
type: PptxTransitionType;
|
|
1477
|
-
/** Duration field, in seconds. */
|
|
1478
|
-
durationSec: number;
|
|
1479
|
-
/** Advance Slide > On Mouse Click. */
|
|
1480
|
-
advanceOnClick: boolean;
|
|
1481
|
-
/** Advance Slide > After (whether the timed advance is armed at all). */
|
|
1482
|
-
advanceAfter: boolean;
|
|
1483
|
-
/** Advance Slide > After, as the `mm:ss.hh` text the field holds. */
|
|
1484
|
-
advanceAfterText: string;
|
|
1485
|
-
}
|
|
1486
|
-
type BackstagePage = 'home' | 'new' | 'open' | 'info' | 'save' | 'saveAs' | 'print' | 'share' | 'export' | 'close' | 'account' | 'options';
|
|
1487
|
-
//#endregion
|
|
1488
|
-
//#region src/render/backstage-cards.d.ts
|
|
1489
|
-
/**
|
|
1490
|
-
* Every action card the File-tab backstage can show, keyed by the operation it
|
|
1491
|
-
* triggers rather than by its wording.
|
|
1492
|
-
*
|
|
1493
|
-
* The five bindings used to hardcode a title and a body string each, which made
|
|
1494
|
-
* the whole backstage untranslatable and let the copy drift: the same card
|
|
1495
|
-
* carried four different descriptions depending on which binding you opened it
|
|
1496
|
-
* in. Both halves now live here as a dictionary key plus an English fallback,
|
|
1497
|
-
* so a wording change lands everywhere at once and a translator only has to
|
|
1498
|
-
* translate it once.
|
|
1499
|
-
*/
|
|
1500
|
-
type BackstageCardId = 'protect' | 'inspect' | 'embedFonts' | 'signatures' | 'versionHistory' | 'saveAsPptx' | 'saveAsPpsx' | 'saveAsPptm' | 'saveAsPpt' | 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage' | 'print' | 'share';
|
|
1501
|
-
//#endregion
|
|
1502
|
-
//#region src/render/toolbar-actions.d.ts
|
|
1503
|
-
/**
|
|
1504
|
-
* Toolbar action / ribbon-tab visibility: a single, framework-agnostic
|
|
1505
|
-
* catalogue of every top-level toolbar button and ribbon tab a host app can
|
|
1506
|
-
* independently hide. Each binding exposes a `hiddenActions?: ToolbarActionId[]`
|
|
1507
|
-
* prop, threads it down to the relevant render sites, and gates them with
|
|
1508
|
-
* `isActionHidden`. Default (`undefined` / `[]`) hides nothing, matching
|
|
1509
|
-
* today's always-visible behaviour.
|
|
1510
|
-
*
|
|
1511
|
-
* `TOOLBAR_TABS` is also the canonical ribbon-tab list/order, replacing the
|
|
1512
|
-
* copy hand-duplicated in each binding (React's `TOOLBAR_SECTIONS`, Vue's
|
|
1513
|
-
* `ribbon-constants.ts`, Angular's `RIBBON_TABS`, etc.) so the tab set can't
|
|
1514
|
-
* drift between bindings. Per-tab icons stay in each binding (icon libraries
|
|
1515
|
-
* differ per framework); only id + i18n key + order are shared here.
|
|
1516
|
-
*/
|
|
1517
|
-
/**
|
|
1518
|
-
* A single toolbar button/control that can be hidden independently of the
|
|
1519
|
-
* ribbon tab it may also appear inside. `zoom` and `navigation` each cover a
|
|
1520
|
-
* whole control cluster (zoom in/out/fit, prev/next) rather than each button
|
|
1521
|
-
* in it, matching how hosts actually want to hide/keep them as a unit.
|
|
1522
|
-
*/
|
|
1523
|
-
type ToolbarButtonId = 'share' | 'broadcast' | 'export' | 'undo' | 'redo' | 'record' | 'notes' | 'fullscreen' | 'zoom' | 'navigation' | 'mergeShapes' | 'crop';
|
|
1524
|
-
/** A top-level ribbon tab. `record` intentionally shares its id with the quick-access Record button above: both surface the same recording feature, so hiding one hides the other. */
|
|
1525
|
-
type ToolbarTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'record' | 'review' | 'view' | 'help';
|
|
1526
|
-
type ToolbarActionId = ToolbarButtonId | ToolbarTabId;
|
|
1527
|
-
/**
|
|
1528
|
-
* PowerPoint's contextual tabs: they join the tab row only while the
|
|
1529
|
-
* selection is of their kind (see `contextualTabsForElement` in
|
|
1530
|
-
* `ribbon-galleries/`). Kept apart from `ToolbarTabId` because they are not
|
|
1531
|
-
* part of the fixed tab order every binding renders.
|
|
1532
|
-
*/
|
|
1533
|
-
type RibbonContextualTabId = 'shapeFormat' | 'pictureFormat' | 'tableDesign' | 'chartDesign' | 'smartArtDesign';
|
|
1534
|
-
//#endregion
|
|
1535
|
-
//#region src/render/canvas-context-menu-commands.d.ts
|
|
1536
|
-
/**
|
|
1537
|
-
* The right-click menu for the empty slide canvas (no element under the
|
|
1538
|
-
* cursor), as distinct from {@link ./context-menu-commands}'s per-element menu.
|
|
1539
|
-
*
|
|
1540
|
-
* Right-clicking empty canvas used to do nothing at all in every binding: React
|
|
1541
|
-
* and Vue both bailed out early (`getElementIdFromEvent` returns `null`, so the
|
|
1542
|
-
* handler just returns) rather than opening a menu, and the other three never
|
|
1543
|
-
* wired a handler for it either. PowerPoint offers Paste, Layout, Reset,
|
|
1544
|
-
* Format Background and view toggles (Grid and Guides, Ruler) from this menu;
|
|
1545
|
-
* this module is the one list every binding renders instead of five omissions.
|
|
1546
|
-
*
|
|
1547
|
-
* @module render/canvas-context-menu-commands
|
|
1548
|
-
*/
|
|
1549
|
-
/** Every command the empty-canvas context menu can offer, in no particular order. */
|
|
1550
|
-
type CanvasContextMenuCommandId = 'paste' | 'layout' | 'reset-slide' | 'format-background' | 'grid-and-guides' | 'ruler';
|
|
1551
|
-
//#endregion
|
|
1552
|
-
//#region src/render/merge-shapes/merge-shapes-menu.d.ts
|
|
1553
|
-
/** The right-click command id for each operation. */
|
|
1554
|
-
type MergeShapesCommandId = 'merge-union' | 'merge-combine' | 'merge-fragment' | 'merge-intersect' | 'merge-subtract';
|
|
1555
|
-
/** Every command a canvas context menu can offer, in no particular order. */
|
|
1556
|
-
type ContextMenuCommandId = 'copy' | 'cut' | 'paste' | 'duplicate' | 'edit-text' | 'edit-points' | 'bring-forward' | 'send-backward' | 'bring-front' | 'send-back' | 'ai-ask' | 'ai-fix' | 'comment' | 'hyperlink' | 'table-insert-row-above' | 'table-insert-row-below' | 'table-delete-row' | 'table-insert-col-left' | 'table-insert-col-right' | 'table-delete-col' | 'table-merge-selected' | 'table-merge-right' | 'table-merge-down' | 'table-split' | 'group' | 'ungroup' | 'crop' | MergeShapesCommandId | 'save-as-picture' | 'edit-alt-text' | 'size-and-position' | 'format-shape' | 'delete';
|
|
1557
|
-
/** Every command the Edit Points right-click menu can offer. */
|
|
1558
|
-
type EditPointsCommandId = 'add-point' | 'delete-point' | 'delete-segment' | 'open-path' | 'close-path' | 'smooth-point' | 'straight-point' | 'corner-point' | 'straight-segment' | 'curved-segment' | 'exit';
|
|
1559
|
-
//#endregion
|
|
1560
|
-
//#region src/render/edit-points/freeform-tool-geometry.d.ts
|
|
1561
|
-
/** The two click-to-place drawing tools. */
|
|
1562
|
-
type FreeformToolKind = 'freeformShape' | 'curve';
|
|
1563
|
-
//#endregion
|
|
1564
|
-
//#region src/render/editor-keymap.d.ts
|
|
1565
|
-
/** A logical editor command produced by one key press. */
|
|
1566
|
-
type EditorKeyActionName = 'undo' | 'redo' | 'copy' | 'cut' | 'paste' | 'duplicate' | 'delete' | 'selectAll' | 'group' | 'ungroup' | 'nudge' | 'prevSlide' | 'nextSlide' | 'escape' | 'find' | 'findReplace' | 'toggleShortcuts' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'increaseFontSize' | 'decreaseFontSize' | 'copyFormat' | 'pasteFormat' | 'newSlide' | 'hyperlink' | 'clearFormatting' | 'cycleSelectionNext' | 'cycleSelectionPrev' | 'pasteSpecial';
|
|
1567
|
-
//#endregion
|
|
1568
|
-
//#region src/render/options/viewer-options.d.ts
|
|
1569
|
-
/**
|
|
1570
|
-
* Full PowerPoint "File > Options" parity model.
|
|
1571
|
-
*
|
|
1572
|
-
* Groups mirror the ten categories of PowerPoint's Options dialog. Values are
|
|
1573
|
-
* flat primitives per group so the dialog panes can be rendered generically
|
|
1574
|
-
* from `VIEWER_OPTIONS_SCHEMA` in every binding. The legacy six-toggle
|
|
1575
|
-
* `ViewerPreferences` surface stays supported via the mapping helpers below.
|
|
1576
|
-
*/
|
|
1577
|
-
type ScreenTipStyle = 'descriptions' | 'plain' | 'off';
|
|
1578
|
-
type DisplayOptimization = 'appearance' | 'compatibility';
|
|
1579
|
-
type ImageResolutionPreset = 'highFidelity' | 'ppi330' | 'ppi220' | 'ppi150' | 'ppi96';
|
|
1580
|
-
type OpenDocumentsView = 'savedView' | 'normal' | 'outline' | 'slideSorter' | 'notes';
|
|
1581
|
-
type DefaultExportFormat = 'pptx' | 'pdf' | 'png';
|
|
1582
|
-
type QuickAccessPosition = 'above' | 'below';
|
|
1583
|
-
type FeedbackSoundScheme = 'modern' | 'classic';
|
|
1584
|
-
type OptionsPrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
|
|
1585
|
-
type OptionsPrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
|
|
1586
|
-
interface ViewerGeneralOptions {
|
|
1587
|
-
displayOptimization: DisplayOptimization;
|
|
1588
|
-
showMiniToolbar: boolean;
|
|
1589
|
-
enableLivePreview: boolean;
|
|
1590
|
-
collapseRibbonAutomatically: boolean;
|
|
1591
|
-
collapseSearchByDefault: boolean;
|
|
1592
|
-
screenTipStyle: ScreenTipStyle;
|
|
1593
|
-
userName: string;
|
|
1594
|
-
userInitials: string;
|
|
1595
|
-
showStartScreen: boolean;
|
|
1596
|
-
/**
|
|
1597
|
-
* Lets the user hand a local font file to the viewer so decks authored
|
|
1598
|
-
* with a font the browser lacks render with the real face.
|
|
1599
|
-
*
|
|
1600
|
-
* Off by default. The registration reads a file the user picks and adds it
|
|
1601
|
-
* to the page's font set for the session, which is a capability a host
|
|
1602
|
-
* embedding the viewer should opt into rather than inherit.
|
|
1603
|
-
*/
|
|
1604
|
-
enableCustomFontUpload: boolean;
|
|
1605
|
-
}
|
|
1606
|
-
interface ViewerProofingOptions {
|
|
1607
|
-
autoCorrectTwoInitialCapitals: boolean;
|
|
1608
|
-
autoCorrectCapitalizeFirstLetter: boolean;
|
|
1609
|
-
autoCorrectCapitalizeDayNames: boolean;
|
|
1610
|
-
autoCorrectSmartQuotes: boolean;
|
|
1611
|
-
autoCorrectHyphensToDash: boolean;
|
|
1612
|
-
autoCorrectFractions: boolean;
|
|
1613
|
-
autoCorrectOrdinals: boolean;
|
|
1614
|
-
ignoreUppercase: boolean;
|
|
1615
|
-
ignoreWordsWithNumbers: boolean;
|
|
1616
|
-
ignoreInternetAddresses: boolean;
|
|
1617
|
-
flagRepeatedWords: boolean;
|
|
1618
|
-
checkSpellingAsYouType: boolean;
|
|
1619
|
-
hideSpellingErrors: boolean;
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* File > Options > Save.
|
|
1623
|
-
*
|
|
1624
|
-
* Font embedding deliberately has NO entry here. It is owned by the File >
|
|
1625
|
-
* Fonts panel, whose toggle is the one the save path reads (see
|
|
1626
|
-
* `render/font-embedding`: `describeFontEmbedding` decides the toggle's start
|
|
1627
|
-
* position and whether it can do anything at all, `embeddedFontSaveOptions`
|
|
1628
|
-
* turns it into the `PptxHandler.save()` slice). This group used to carry a
|
|
1629
|
-
* second `embedFonts` boolean, plus an `embedAllFontCharacters` companion, and
|
|
1630
|
-
* neither was read by anything: the pane moved a switch that changed no saved
|
|
1631
|
-
* byte, while the panel next door moved the real one. Two switches for one
|
|
1632
|
-
* setting, one of them lying, is worse than one switch in a less
|
|
1633
|
-
* PowerPoint-shaped place.
|
|
1634
|
-
*/
|
|
1635
|
-
interface ViewerSaveOptions {
|
|
1636
|
-
autoSave: boolean;
|
|
1637
|
-
autoRecoverIntervalMinutes: number;
|
|
1638
|
-
keepLastAutoRecoveredVersion: boolean;
|
|
1639
|
-
defaultExportFormat: DefaultExportFormat;
|
|
1640
|
-
cacheRetentionDays: number;
|
|
1641
|
-
clearCacheOnClose: boolean;
|
|
1642
|
-
}
|
|
1643
|
-
interface ViewerAccessibilityOptions {
|
|
1644
|
-
/** Browser speech-recognition language; automatic follows the browser language. */
|
|
1645
|
-
subtitleLanguage?: string;
|
|
1646
|
-
showAccessibilityStatus: boolean;
|
|
1647
|
-
feedbackWithSound: boolean;
|
|
1648
|
-
soundScheme: FeedbackSoundScheme;
|
|
1649
|
-
showShortcutKeysInScreenTips: boolean;
|
|
1650
|
-
reducedMotion: boolean;
|
|
1651
|
-
}
|
|
1652
|
-
interface ViewerAdvancedOptions {
|
|
1653
|
-
autoSelectEntireWord: boolean;
|
|
1654
|
-
allowTextDragAndDrop: boolean;
|
|
1655
|
-
maximumUndoSteps: number;
|
|
1656
|
-
useSmartCutAndPaste: boolean;
|
|
1657
|
-
showPasteOptionsButton: boolean;
|
|
1658
|
-
imageDefaultResolution: ImageResolutionPreset;
|
|
1659
|
-
doNotCompressImages: boolean;
|
|
1660
|
-
chartPropertiesFollowDataPoint: boolean;
|
|
1661
|
-
recentPresentationsCount: number;
|
|
1662
|
-
showVerticalRuler: boolean;
|
|
1663
|
-
showGrid: boolean;
|
|
1664
|
-
snapToGrid: boolean;
|
|
1665
|
-
disableHardwareAcceleration: boolean;
|
|
1666
|
-
/**
|
|
1667
|
-
* Force every opt-in interactive 3D scene (SmartArt, bar/line/area/pie/
|
|
1668
|
-
* surface charts) to fall back to its flat 2D rendering, even when the
|
|
1669
|
-
* host has enabled that scene via its own `smartArt3D`/`*Chart3D` prop.
|
|
1670
|
-
* A host opting in says "this deck may want 3D"; this is the viewer
|
|
1671
|
-
* user's own override for when the WebGL scenes it renders are too much
|
|
1672
|
-
* for their machine. See `resolve3DRenderingFlags`.
|
|
1673
|
-
*/
|
|
1674
|
-
disable3DRendering: boolean;
|
|
1675
|
-
/**
|
|
1676
|
-
* `p:animEffect/@filter="pixelate"` defaults to snapping the element to
|
|
1677
|
-
* its end state (`cutIn`/`cutOut`), matching PowerPoint's own behaviour
|
|
1678
|
-
* (COM `CreateVideo` frame-diffing shows PowerPoint performs no animation
|
|
1679
|
-
* at all for this filter value). This turns on the blocky mosaic reveal
|
|
1680
|
-
* this renderer can build instead, for a viewer that would rather show
|
|
1681
|
-
* something animating than PowerPoint's own instant swap. See
|
|
1682
|
-
* `resolveFilterEffect` in `animation-filter-effects.ts` and
|
|
1683
|
-
* `docs/guide/visual-effects.md`.
|
|
1684
|
-
*/
|
|
1685
|
-
pixelateMosaicAnimation: boolean;
|
|
1686
|
-
openDocumentsView: OpenDocumentsView;
|
|
1687
|
-
slideShowShowMenuOnRightClick: boolean;
|
|
1688
|
-
slideShowShowPopupToolbar: boolean;
|
|
1689
|
-
slideShowPromptKeepInkAnnotations: boolean;
|
|
1690
|
-
slideShowEndWithBlackSlide: boolean;
|
|
1691
|
-
printInBackground: boolean;
|
|
1692
|
-
printHighQuality: boolean;
|
|
1693
|
-
printUseMostRecentSettings: boolean;
|
|
1694
|
-
printWhat: OptionsPrintWhat;
|
|
1695
|
-
printColorMode: OptionsPrintColorMode;
|
|
1696
|
-
printHiddenSlides: boolean;
|
|
1697
|
-
printScaleToFit: boolean;
|
|
1698
|
-
printFrameSlides: boolean;
|
|
1699
|
-
}
|
|
1700
|
-
interface ViewerRibbonOptions {
|
|
1701
|
-
/** Ribbon tabs unticked in Customize Ribbon. The File tab can never be hidden. */
|
|
1702
|
-
hiddenTabIds: ToolbarTabId[];
|
|
1703
|
-
}
|
|
1704
|
-
interface ViewerQuickAccessOptions {
|
|
1705
|
-
visible: boolean;
|
|
1706
|
-
position: QuickAccessPosition;
|
|
1707
|
-
showCommandLabels: boolean;
|
|
1708
|
-
/** Ordered ids from `QUICK_ACCESS_COMMAND_CATALOG`. */
|
|
1709
|
-
commandIds: string[];
|
|
1710
|
-
}
|
|
1711
|
-
interface ViewerTrustOptions {
|
|
1712
|
-
openInProtectedView: boolean;
|
|
1713
|
-
allowExternalContent: boolean;
|
|
1714
|
-
confirmExternalHyperlinks: boolean;
|
|
1715
|
-
}
|
|
1716
|
-
interface ViewerOptions {
|
|
1717
|
-
general: ViewerGeneralOptions;
|
|
1718
|
-
proofing: ViewerProofingOptions;
|
|
1719
|
-
save: ViewerSaveOptions;
|
|
1720
|
-
accessibility: ViewerAccessibilityOptions;
|
|
1721
|
-
advanced: ViewerAdvancedOptions;
|
|
1722
|
-
ribbon: ViewerRibbonOptions;
|
|
1723
|
-
quickAccess: ViewerQuickAccessOptions;
|
|
1724
|
-
trust: ViewerTrustOptions;
|
|
1725
|
-
}
|
|
1726
|
-
type ViewerOptionsGroupId = keyof ViewerOptions;
|
|
1727
|
-
type ViewerOptionPrimitive = boolean | number | string;
|
|
1728
|
-
//#endregion
|
|
1729
|
-
//#region src/render/options/viewer-options-controls.d.ts
|
|
1730
|
-
/**
|
|
1731
|
-
* Control/section/tab descriptor types for the File > Options schema, plus
|
|
1732
|
-
* the terse constructors the tab-definition modules build panes with.
|
|
1733
|
-
*/
|
|
1734
|
-
type ViewerOptionsTabId = 'general' | 'proofing' | 'save' | 'language' | 'accessibility' | 'advanced' | 'ribbon' | 'quickAccess' | 'addIns' | 'trust';
|
|
1735
|
-
//#endregion
|
|
1736
|
-
//#region src/render/customization/host-menu-commands.d.ts
|
|
1737
|
-
/** Snapshot of the slide on which the host command was offered. */
|
|
1738
|
-
interface HostCanvasMenuContext {
|
|
1739
|
-
slideIndex: number;
|
|
1740
|
-
}
|
|
1741
|
-
/** Effective selection, including a single right-clicked element. */
|
|
1742
|
-
interface HostElementMenuContext extends HostCanvasMenuContext {
|
|
1743
|
-
elementIds: readonly string[];
|
|
1744
|
-
}
|
|
1745
|
-
/** Plain text labels work identically in every framework. */
|
|
1746
|
-
interface HostMenuCommand<C> {
|
|
1747
|
-
id: string;
|
|
1748
|
-
label: string;
|
|
1749
|
-
/** Default: a separate group above the built-in commands. */
|
|
1750
|
-
group?: 'top' | 'bottom';
|
|
1751
|
-
disabled?: boolean | ((context: C) => boolean);
|
|
1752
|
-
onSelect: (context: C) => void;
|
|
1753
|
-
}
|
|
1754
|
-
//#endregion
|
|
1755
|
-
//#region src/render/customization/ribbon-control-catalog.d.ts
|
|
1756
|
-
declare const RIBBON_CONTROL_CATALOG: {
|
|
1757
|
-
readonly home: {
|
|
1758
|
-
readonly clipboard: {
|
|
1759
|
-
readonly label: 'Clipboard';
|
|
1760
|
-
readonly controls: {
|
|
1761
|
-
readonly paste: 'Paste';
|
|
1762
|
-
readonly cut: 'Cut';
|
|
1763
|
-
readonly copy: 'Copy';
|
|
1764
|
-
readonly formatPainter: 'Format Painter';
|
|
1765
|
-
};
|
|
1766
|
-
};
|
|
1767
|
-
readonly slides: {
|
|
1768
|
-
readonly label: 'Slides';
|
|
1769
|
-
readonly controls: {
|
|
1770
|
-
readonly newSlide: 'New Slide';
|
|
1771
|
-
readonly layout: 'Layout';
|
|
1772
|
-
readonly reset: 'Reset';
|
|
1773
|
-
readonly section: 'Section';
|
|
1774
|
-
readonly slideTemplates: 'Slide templates';
|
|
1775
|
-
};
|
|
1776
|
-
};
|
|
1777
|
-
readonly font: {
|
|
1778
|
-
readonly label: 'Font';
|
|
1779
|
-
readonly controls: {
|
|
1780
|
-
readonly fontFamily: 'Font';
|
|
1781
|
-
readonly fontSize: 'Font Size';
|
|
1782
|
-
readonly increaseFontSize: 'Increase Font Size';
|
|
1783
|
-
readonly decreaseFontSize: 'Decrease Font Size';
|
|
1784
|
-
readonly clearFormatting: 'Clear All Formatting';
|
|
1785
|
-
readonly bold: 'Bold';
|
|
1786
|
-
readonly italic: 'Italic';
|
|
1787
|
-
readonly underline: 'Underline';
|
|
1788
|
-
readonly strikethrough: 'Strikethrough';
|
|
1789
|
-
readonly shadow: 'Text Shadow';
|
|
1790
|
-
readonly characterSpacing: 'Character Spacing';
|
|
1791
|
-
readonly changeCase: 'Change Case';
|
|
1792
|
-
readonly fontColor: 'Font Color';
|
|
1793
|
-
readonly highlightColor: 'Text Highlight Color';
|
|
1794
|
-
readonly superscript: 'Superscript';
|
|
1795
|
-
readonly subscript: 'Subscript';
|
|
1796
|
-
};
|
|
1797
|
-
};
|
|
1798
|
-
readonly paragraph: {
|
|
1799
|
-
readonly label: 'Paragraph';
|
|
1800
|
-
readonly controls: {
|
|
1801
|
-
readonly bullets: 'Bullets (toggle and gallery)';
|
|
1802
|
-
readonly numbering: 'Numbering (toggle and gallery)';
|
|
1803
|
-
readonly decreaseIndent: 'Decrease List Level';
|
|
1804
|
-
readonly increaseIndent: 'Increase List Level';
|
|
1805
|
-
readonly lineSpacing: 'Line Spacing';
|
|
1806
|
-
readonly alignLeft: 'Align Left';
|
|
1807
|
-
readonly alignCenter: 'Center';
|
|
1808
|
-
readonly alignRight: 'Align Right';
|
|
1809
|
-
readonly justify: 'Justify';
|
|
1810
|
-
readonly columns: 'Columns';
|
|
1811
|
-
readonly textDirection: 'Text Direction';
|
|
1812
|
-
readonly alignText: 'Align Text';
|
|
1813
|
-
};
|
|
1814
|
-
};
|
|
1815
|
-
readonly drawing: {
|
|
1816
|
-
readonly label: 'Drawing';
|
|
1817
|
-
readonly controls: {
|
|
1818
|
-
readonly shapes: 'Shapes';
|
|
1819
|
-
readonly arrange: 'Arrange';
|
|
1820
|
-
readonly quickStyles: 'Quick Styles (Shape Styles gallery)';
|
|
1821
|
-
readonly shapeFill: 'Shape Fill';
|
|
1822
|
-
readonly shapeOutline: 'Shape Outline';
|
|
1823
|
-
readonly shapeEffects: 'Shape Effects gallery';
|
|
1824
|
-
};
|
|
1825
|
-
};
|
|
1826
|
-
readonly arrange: {
|
|
1827
|
-
readonly label: 'Arrange';
|
|
1828
|
-
readonly controls: {
|
|
1829
|
-
readonly bringForward: 'Bring Forward';
|
|
1830
|
-
readonly sendBackward: 'Send Backward';
|
|
1831
|
-
readonly bringToFront: 'Bring to Front';
|
|
1832
|
-
readonly sendToBack: 'Send to Back';
|
|
1833
|
-
readonly flipHorizontal: 'Flip Horizontal';
|
|
1834
|
-
readonly flipVertical: 'Flip Vertical';
|
|
1835
|
-
readonly duplicate: 'Duplicate';
|
|
1836
|
-
readonly delete: 'Delete';
|
|
1837
|
-
readonly group: 'Group';
|
|
1838
|
-
readonly ungroup: 'Ungroup';
|
|
1839
|
-
readonly align: 'Align';
|
|
1840
|
-
readonly mergeShapes: 'Merge Shapes';
|
|
1841
|
-
readonly crop: 'Crop';
|
|
1842
|
-
readonly outlineWidth: 'Outline width';
|
|
1843
|
-
};
|
|
1844
|
-
};
|
|
1845
|
-
readonly editing: {
|
|
1846
|
-
readonly label: 'Editing';
|
|
1847
|
-
readonly controls: {
|
|
1848
|
-
readonly find: 'Find';
|
|
1849
|
-
readonly replace: 'Replace';
|
|
1850
|
-
readonly select: 'Select';
|
|
1851
|
-
};
|
|
1852
|
-
};
|
|
1853
|
-
};
|
|
1854
|
-
readonly insert: {
|
|
1855
|
-
readonly slides: {
|
|
1856
|
-
readonly label: 'Slides';
|
|
1857
|
-
readonly controls: {
|
|
1858
|
-
readonly newSlide: 'New Slide';
|
|
1859
|
-
};
|
|
1860
|
-
};
|
|
1861
|
-
readonly tables: {
|
|
1862
|
-
readonly label: 'Tables';
|
|
1863
|
-
readonly controls: {
|
|
1864
|
-
readonly table: 'Table';
|
|
1865
|
-
};
|
|
1866
|
-
};
|
|
1867
|
-
readonly images: {
|
|
1868
|
-
readonly label: 'Images';
|
|
1869
|
-
readonly controls: {
|
|
1870
|
-
readonly pictures: 'Pictures';
|
|
1871
|
-
};
|
|
1872
|
-
};
|
|
1873
|
-
readonly illustrations: {
|
|
1874
|
-
readonly label: 'Illustrations';
|
|
1875
|
-
readonly controls: {
|
|
1876
|
-
readonly shapes: 'Shapes';
|
|
1877
|
-
readonly smartArt: 'SmartArt';
|
|
1878
|
-
readonly chart: 'Chart';
|
|
1879
|
-
};
|
|
1880
|
-
};
|
|
1881
|
-
readonly links: {
|
|
1882
|
-
readonly label: 'Links';
|
|
1883
|
-
readonly controls: {
|
|
1884
|
-
readonly link: 'Link';
|
|
1885
|
-
readonly action: 'Action button';
|
|
1886
|
-
};
|
|
1887
|
-
};
|
|
1888
|
-
readonly comments: {
|
|
1889
|
-
readonly label: 'Comments';
|
|
1890
|
-
readonly controls: {
|
|
1891
|
-
readonly comment: 'Comment';
|
|
1892
|
-
};
|
|
1893
|
-
};
|
|
1894
|
-
readonly text: {
|
|
1895
|
-
readonly label: 'Text';
|
|
1896
|
-
readonly controls: {
|
|
1897
|
-
readonly textBox: 'Text Box';
|
|
1898
|
-
readonly field: 'Header, date, slide number field';
|
|
1899
|
-
};
|
|
1900
|
-
};
|
|
1901
|
-
readonly symbols: {
|
|
1902
|
-
readonly label: 'Symbols';
|
|
1903
|
-
readonly controls: {
|
|
1904
|
-
readonly equation: 'Equation';
|
|
1905
|
-
readonly symbol: 'Symbol';
|
|
1906
|
-
};
|
|
1907
|
-
};
|
|
1908
|
-
readonly media: {
|
|
1909
|
-
readonly label: 'Media';
|
|
1910
|
-
readonly controls: {
|
|
1911
|
-
readonly media: 'Video / Audio';
|
|
1912
|
-
};
|
|
1913
|
-
};
|
|
1914
|
-
};
|
|
1915
|
-
readonly draw: {
|
|
1916
|
-
readonly tools: {
|
|
1917
|
-
readonly label: 'Drawing Tools';
|
|
1918
|
-
readonly controls: {
|
|
1919
|
-
readonly select: 'Select';
|
|
1920
|
-
readonly pen: 'Pen';
|
|
1921
|
-
readonly highlighter: 'Highlighter';
|
|
1922
|
-
readonly freeform: 'Freeform';
|
|
1923
|
-
readonly eraser: 'Eraser';
|
|
1924
|
-
readonly penColor: 'Pen colour';
|
|
1925
|
-
readonly penWidth: 'Pen width';
|
|
1926
|
-
};
|
|
1927
|
-
};
|
|
1928
|
-
readonly convert: {
|
|
1929
|
-
readonly label: 'Convert';
|
|
1930
|
-
readonly controls: {
|
|
1931
|
-
readonly inkToShape: 'Ink to Shape';
|
|
1932
|
-
};
|
|
1933
|
-
};
|
|
1934
|
-
};
|
|
1935
|
-
readonly design: {
|
|
1936
|
-
readonly themes: {
|
|
1937
|
-
readonly label: 'Themes';
|
|
1938
|
-
readonly controls: {
|
|
1939
|
-
readonly browseThemes: 'Themes gallery';
|
|
1940
|
-
readonly editTheme: 'Edit theme';
|
|
1941
|
-
};
|
|
1942
|
-
};
|
|
1943
|
-
readonly variants: {
|
|
1944
|
-
readonly label: 'Variants';
|
|
1945
|
-
readonly controls: {
|
|
1946
|
-
readonly colors: 'Variants: Colors gallery';
|
|
1947
|
-
readonly fonts: 'Variants: Fonts gallery';
|
|
1948
|
-
};
|
|
1949
|
-
};
|
|
1950
|
-
readonly customize: {
|
|
1951
|
-
readonly label: 'Customize';
|
|
1952
|
-
readonly controls: {
|
|
1953
|
-
readonly slideSize: 'Slide Size';
|
|
1954
|
-
readonly formatBackground: 'Format Background';
|
|
1955
|
-
};
|
|
1956
|
-
};
|
|
1957
|
-
};
|
|
1958
|
-
readonly transitions: {
|
|
1959
|
-
readonly preview: {
|
|
1960
|
-
readonly label: 'Preview';
|
|
1961
|
-
readonly controls: {
|
|
1962
|
-
readonly preview: 'Preview';
|
|
1963
|
-
};
|
|
1964
|
-
};
|
|
1965
|
-
readonly transitionToThisSlide: {
|
|
1966
|
-
readonly label: 'Transition to This Slide';
|
|
1967
|
-
readonly controls: {
|
|
1968
|
-
readonly gallery: 'Transition gallery';
|
|
1969
|
-
readonly effectOptions: 'Effect Options';
|
|
1970
|
-
};
|
|
1971
|
-
};
|
|
1972
|
-
readonly timing: {
|
|
1973
|
-
readonly label: 'Timing';
|
|
1974
|
-
readonly controls: {
|
|
1975
|
-
readonly sound: 'Sound';
|
|
1976
|
-
readonly duration: 'Duration';
|
|
1977
|
-
readonly applyToAll: 'Apply To All';
|
|
1978
|
-
readonly advanceOnClick: 'On Mouse Click';
|
|
1979
|
-
readonly advanceAfter: 'After';
|
|
1980
|
-
};
|
|
1981
|
-
};
|
|
1982
|
-
};
|
|
1983
|
-
readonly animations: {
|
|
1984
|
-
readonly preview: {
|
|
1985
|
-
readonly label: 'Preview';
|
|
1986
|
-
readonly controls: {
|
|
1987
|
-
readonly preview: 'Preview';
|
|
1988
|
-
};
|
|
1989
|
-
};
|
|
1990
|
-
readonly animation: {
|
|
1991
|
-
readonly label: 'Animation';
|
|
1992
|
-
readonly controls: {
|
|
1993
|
-
readonly gallery: 'Animation gallery';
|
|
1994
|
-
readonly effectOptions: 'Effect Options';
|
|
1995
|
-
};
|
|
1996
|
-
};
|
|
1997
|
-
readonly motionPath: {
|
|
1998
|
-
readonly label: 'Motion Paths';
|
|
1999
|
-
readonly controls: {
|
|
2000
|
-
readonly gallery: 'Motion path gallery';
|
|
2001
|
-
};
|
|
2002
|
-
};
|
|
2003
|
-
readonly advancedAnimation: {
|
|
2004
|
-
readonly label: 'Advanced Animation';
|
|
2005
|
-
readonly controls: {
|
|
2006
|
-
readonly addAnimation: 'Add Animation';
|
|
2007
|
-
readonly animationPane: 'Animation Pane';
|
|
2008
|
-
readonly trigger: 'Trigger';
|
|
2009
|
-
readonly animationPainter: 'Animation Painter';
|
|
2010
|
-
readonly remove: 'Remove animation';
|
|
2011
|
-
};
|
|
2012
|
-
};
|
|
2013
|
-
readonly timing: {
|
|
2014
|
-
readonly label: 'Timing';
|
|
2015
|
-
readonly controls: {
|
|
2016
|
-
readonly start: 'Start';
|
|
2017
|
-
readonly duration: 'Duration';
|
|
2018
|
-
readonly delay: 'Delay';
|
|
2019
|
-
readonly reorder: 'Reorder';
|
|
2020
|
-
};
|
|
2021
|
-
};
|
|
2022
|
-
};
|
|
2023
|
-
readonly slideShow: {
|
|
2024
|
-
readonly startSlideShow: {
|
|
2025
|
-
readonly label: 'Start Slide Show';
|
|
2026
|
-
readonly controls: {
|
|
2027
|
-
readonly fromBeginning: 'From Beginning';
|
|
2028
|
-
readonly fromCurrent: 'From Current Slide';
|
|
2029
|
-
readonly customShow: 'Custom Slide Show';
|
|
2030
|
-
};
|
|
2031
|
-
};
|
|
2032
|
-
readonly present: {
|
|
2033
|
-
readonly label: 'Present';
|
|
2034
|
-
readonly controls: {
|
|
2035
|
-
readonly presenterView: 'Presenter View';
|
|
2036
|
-
readonly broadcast: 'Present Online';
|
|
2037
|
-
};
|
|
2038
|
-
};
|
|
2039
|
-
readonly setUp: {
|
|
2040
|
-
readonly label: 'Set Up';
|
|
2041
|
-
readonly controls: {
|
|
2042
|
-
readonly setUpSlideShow: 'Set Up Slide Show';
|
|
2043
|
-
readonly hideSlide: 'Hide Slide';
|
|
2044
|
-
readonly rehearseTimings: 'Rehearse Timings';
|
|
2045
|
-
readonly record: 'Record';
|
|
2046
|
-
readonly rehearseWithCoach: 'Rehearse with Coach';
|
|
2047
|
-
};
|
|
2048
|
-
};
|
|
2049
|
-
readonly captions: {
|
|
2050
|
-
readonly label: 'Captions & Subtitles';
|
|
2051
|
-
readonly controls: {
|
|
2052
|
-
readonly subtitles: 'Always Use Subtitles';
|
|
2053
|
-
readonly subtitleSettings: 'Subtitle Settings';
|
|
2054
|
-
};
|
|
2055
|
-
};
|
|
2056
|
-
};
|
|
2057
|
-
readonly record: {
|
|
2058
|
-
readonly camera: {
|
|
2059
|
-
readonly label: 'Camera';
|
|
2060
|
-
readonly controls: {
|
|
2061
|
-
readonly cameo: 'Cameo';
|
|
2062
|
-
};
|
|
2063
|
-
};
|
|
2064
|
-
readonly record: {
|
|
2065
|
-
readonly label: 'Record';
|
|
2066
|
-
readonly controls: {
|
|
2067
|
-
readonly fromBeginning: 'From Beginning';
|
|
2068
|
-
readonly fromCurrent: 'From Current Slide';
|
|
2069
|
-
};
|
|
2070
|
-
};
|
|
2071
|
-
readonly manage: {
|
|
2072
|
-
readonly label: 'Manage';
|
|
2073
|
-
readonly controls: {
|
|
2074
|
-
readonly clear: 'Clear';
|
|
2075
|
-
readonly reset: 'Reset to Cameo';
|
|
2076
|
-
};
|
|
2077
|
-
};
|
|
2078
|
-
readonly help: {
|
|
2079
|
-
readonly label: 'Help';
|
|
2080
|
-
readonly controls: {
|
|
2081
|
-
readonly learnMore: 'Learn more';
|
|
2082
|
-
};
|
|
2083
|
-
};
|
|
2084
|
-
};
|
|
2085
|
-
readonly review: {
|
|
2086
|
-
readonly proofing: {
|
|
2087
|
-
readonly label: 'Proofing';
|
|
2088
|
-
readonly controls: {
|
|
2089
|
-
readonly spelling: 'Spelling';
|
|
2090
|
-
readonly thesaurus: 'Thesaurus';
|
|
2091
|
-
};
|
|
2092
|
-
};
|
|
2093
|
-
readonly accessibility: {
|
|
2094
|
-
readonly label: 'Accessibility';
|
|
2095
|
-
readonly controls: {
|
|
2096
|
-
readonly check: 'Check Accessibility';
|
|
2097
|
-
};
|
|
2098
|
-
};
|
|
2099
|
-
readonly language: {
|
|
2100
|
-
readonly label: 'Language';
|
|
2101
|
-
readonly controls: {
|
|
2102
|
-
readonly translate: 'Translate';
|
|
2103
|
-
readonly language: 'Language';
|
|
2104
|
-
};
|
|
2105
|
-
};
|
|
2106
|
-
readonly comments: {
|
|
2107
|
-
readonly label: 'Comments';
|
|
2108
|
-
readonly controls: {
|
|
2109
|
-
readonly newComment: 'New Comment';
|
|
2110
|
-
readonly delete: 'Delete';
|
|
2111
|
-
readonly previous: 'Previous';
|
|
2112
|
-
readonly next: 'Next';
|
|
2113
|
-
readonly showComments: 'Show Comments';
|
|
2114
|
-
};
|
|
2115
|
-
};
|
|
2116
|
-
readonly compare: {
|
|
2117
|
-
readonly label: 'Compare';
|
|
2118
|
-
readonly controls: {
|
|
2119
|
-
readonly compare: 'Compare';
|
|
2120
|
-
readonly markAllRead: 'Mark all read';
|
|
2121
|
-
};
|
|
2122
|
-
};
|
|
2123
|
-
readonly protect: {
|
|
2124
|
-
readonly label: 'Protect';
|
|
2125
|
-
readonly controls: {
|
|
2126
|
-
readonly readOnly: 'Read-only';
|
|
2127
|
-
readonly restrictPermission: 'Restrict Permission';
|
|
2128
|
-
};
|
|
2129
|
-
};
|
|
2130
|
-
readonly ink: {
|
|
2131
|
-
readonly label: 'Ink';
|
|
2132
|
-
readonly controls: {
|
|
2133
|
-
readonly hideInk: 'Hide Ink';
|
|
2134
|
-
};
|
|
2135
|
-
};
|
|
2136
|
-
};
|
|
2137
|
-
readonly view: {
|
|
2138
|
-
readonly presentationViews: {
|
|
2139
|
-
readonly label: 'Presentation Views';
|
|
2140
|
-
readonly controls: {
|
|
2141
|
-
readonly normal: 'Normal';
|
|
2142
|
-
readonly outline: 'Outline View';
|
|
2143
|
-
readonly slideSorter: 'Slide Sorter';
|
|
2144
|
-
readonly notesPage: 'Notes Page';
|
|
2145
|
-
readonly readingView: 'Reading View';
|
|
2146
|
-
};
|
|
2147
|
-
};
|
|
2148
|
-
readonly masterViews: {
|
|
2149
|
-
readonly label: 'Master Views';
|
|
2150
|
-
readonly controls: {
|
|
2151
|
-
readonly slideMaster: 'Slide Master';
|
|
2152
|
-
readonly handoutMaster: 'Handout Master';
|
|
2153
|
-
readonly notesMaster: 'Notes Master';
|
|
2154
|
-
};
|
|
2155
|
-
};
|
|
2156
|
-
readonly show: {
|
|
2157
|
-
readonly label: 'Show';
|
|
2158
|
-
readonly controls: {
|
|
2159
|
-
readonly ruler: 'Ruler';
|
|
2160
|
-
readonly gridlines: 'Gridlines';
|
|
2161
|
-
readonly guides: 'Guides';
|
|
2162
|
-
readonly snapToGrid: 'Snap to Grid';
|
|
2163
|
-
readonly snapToShape: 'Snap to Shape';
|
|
2164
|
-
readonly addGuide: 'Add horizontal / vertical guide';
|
|
2165
|
-
readonly selectionPane: 'Selection Pane';
|
|
2166
|
-
readonly eyedropper: 'Eyedropper';
|
|
2167
|
-
readonly notes: 'Notes';
|
|
2168
|
-
};
|
|
2169
|
-
};
|
|
2170
|
-
readonly zoom: {
|
|
2171
|
-
readonly label: 'Zoom';
|
|
2172
|
-
readonly controls: {
|
|
2173
|
-
readonly zoom: 'Zoom';
|
|
2174
|
-
readonly fitToWindow: 'Fit to Window';
|
|
2175
|
-
};
|
|
2176
|
-
};
|
|
2177
|
-
readonly window: {
|
|
2178
|
-
readonly label: 'Window';
|
|
2179
|
-
readonly controls: {
|
|
2180
|
-
readonly templateEditing: 'Edit template elements';
|
|
2181
|
-
readonly macros: 'Macros';
|
|
2182
|
-
};
|
|
2183
|
-
};
|
|
2184
|
-
};
|
|
2185
|
-
readonly help: {
|
|
2186
|
-
readonly help: {
|
|
2187
|
-
readonly label: 'Help';
|
|
2188
|
-
readonly controls: {
|
|
2189
|
-
readonly options: 'Options';
|
|
2190
|
-
readonly keyboardShortcuts: 'Keyboard shortcuts';
|
|
2191
|
-
readonly accessibility: 'Accessibility checker';
|
|
2192
|
-
};
|
|
2193
|
-
};
|
|
2194
|
-
};
|
|
2195
|
-
readonly shapeFormat: {
|
|
2196
|
-
readonly shapeStyles: {
|
|
2197
|
-
readonly label: 'Shape Styles';
|
|
2198
|
-
readonly controls: {
|
|
2199
|
-
readonly gallery: 'Shape Styles gallery';
|
|
2200
|
-
readonly shapeEffects: 'Shape Effects gallery';
|
|
2201
|
-
};
|
|
2202
|
-
};
|
|
2203
|
-
readonly wordArtStyles: {
|
|
2204
|
-
readonly label: 'WordArt Styles';
|
|
2205
|
-
readonly controls: {
|
|
2206
|
-
readonly gallery: 'WordArt Styles gallery';
|
|
2207
|
-
};
|
|
2208
|
-
};
|
|
2209
|
-
};
|
|
2210
|
-
readonly pictureFormat: {
|
|
2211
|
-
readonly adjust: {
|
|
2212
|
-
readonly label: 'Adjust';
|
|
2213
|
-
readonly controls: {
|
|
2214
|
-
readonly corrections: 'Corrections gallery';
|
|
2215
|
-
readonly color: 'Color gallery';
|
|
2216
|
-
readonly artisticEffects: 'Artistic Effects gallery';
|
|
2217
|
-
};
|
|
2218
|
-
};
|
|
2219
|
-
readonly pictureStyles: {
|
|
2220
|
-
readonly label: 'Picture Styles';
|
|
2221
|
-
readonly controls: {
|
|
2222
|
-
readonly gallery: 'Picture Styles gallery';
|
|
2223
|
-
readonly pictureEffects: 'Picture Effects gallery';
|
|
2224
|
-
};
|
|
2225
|
-
};
|
|
2226
|
-
};
|
|
2227
|
-
readonly tableDesign: {
|
|
2228
|
-
readonly tableStyles: {
|
|
2229
|
-
readonly label: 'Table Styles';
|
|
2230
|
-
readonly controls: {
|
|
2231
|
-
readonly gallery: 'Table Styles gallery';
|
|
2232
|
-
};
|
|
2233
|
-
};
|
|
2234
|
-
};
|
|
2235
|
-
readonly chartDesign: {
|
|
2236
|
-
readonly chartLayouts: {
|
|
2237
|
-
readonly label: 'Chart Layouts';
|
|
2238
|
-
readonly controls: {
|
|
2239
|
-
readonly quickLayout: 'Quick Layout gallery';
|
|
2240
|
-
};
|
|
2241
|
-
};
|
|
2242
|
-
readonly chartStyles: {
|
|
2243
|
-
readonly label: 'Chart Styles';
|
|
2244
|
-
readonly controls: {
|
|
2245
|
-
readonly changeColors: 'Change Colors gallery';
|
|
2246
|
-
readonly gallery: 'Chart Styles gallery';
|
|
2247
|
-
};
|
|
2248
|
-
};
|
|
2249
|
-
};
|
|
2250
|
-
readonly smartArtDesign: {
|
|
2251
|
-
readonly createGraphic: {
|
|
2252
|
-
readonly label: 'Create Graphic';
|
|
2253
|
-
readonly controls: {
|
|
2254
|
-
readonly addShape: 'Add Shape';
|
|
2255
|
-
readonly addBullet: 'Add Bullet';
|
|
2256
|
-
readonly textPane: 'Text Pane';
|
|
2257
|
-
readonly promote: 'Promote';
|
|
2258
|
-
readonly demote: 'Demote';
|
|
2259
|
-
readonly rightToLeft: 'Right to Left';
|
|
2260
|
-
readonly moveUp: 'Move Up';
|
|
2261
|
-
readonly moveDown: 'Move Down';
|
|
2262
|
-
};
|
|
2263
|
-
};
|
|
2264
|
-
readonly layouts: {
|
|
2265
|
-
readonly label: 'Layouts';
|
|
2266
|
-
readonly controls: {
|
|
2267
|
-
readonly gallery: 'Layouts gallery';
|
|
2268
|
-
};
|
|
2269
|
-
};
|
|
2270
|
-
readonly smartArtStyles: {
|
|
2271
|
-
readonly label: 'SmartArt Styles';
|
|
2272
|
-
readonly controls: {
|
|
2273
|
-
readonly changeColors: 'Change Colors gallery';
|
|
2274
|
-
readonly gallery: 'SmartArt Styles gallery';
|
|
2275
|
-
};
|
|
2276
|
-
};
|
|
2277
|
-
readonly reset: {
|
|
2278
|
-
readonly label: 'Reset';
|
|
2279
|
-
readonly controls: {
|
|
2280
|
-
readonly resetGraphic: 'Reset Graphic';
|
|
2281
|
-
readonly convert: 'Convert';
|
|
2282
|
-
};
|
|
2283
|
-
};
|
|
2284
|
-
};
|
|
2285
|
-
};
|
|
2286
|
-
//#endregion
|
|
2287
|
-
//#region src/render/customization/ribbon-control-ids.d.ts
|
|
2288
|
-
type Catalog = typeof RIBBON_CONTROL_CATALOG;
|
|
2289
|
-
/** `<tab>.<group>`, for example `home.font`. */
|
|
2290
|
-
type RibbonGroupId = { [T in keyof Catalog]: { [G in keyof Catalog[T]]: `${T & string}.${G & string}`; }[keyof Catalog[T]]; }[keyof Catalog];
|
|
2291
|
-
/** `<tab>.<group>.<control>`, for example `home.font.bold`. */
|
|
2292
|
-
type RibbonControlId = { [T in keyof Catalog]: { [G in keyof Catalog[T]]: Catalog[T][G] extends {
|
|
2293
|
-
controls: infer C;
|
|
2294
|
-
} ? `${T & string}.${G & string}.${keyof C & string}` : never; }[keyof Catalog[T]]; }[keyof Catalog];
|
|
2295
|
-
//#endregion
|
|
2296
|
-
//#region src/render/customization/customization-types.d.ts
|
|
2297
|
-
/** Keys of an options group whose value is a primitive (not an array). */
|
|
2298
|
-
type PrimitiveKeys<T> = { [K in keyof T]: T[K] extends ViewerOptionPrimitive ? K : never; }[keyof T] & string;
|
|
2299
|
-
/**
|
|
2300
|
-
* One File > Options setting, addressed as `<group>.<key>`, for example
|
|
2301
|
-
* `general.userName` or `advanced.showGrid`. The union is derived from the
|
|
2302
|
-
* `ViewerOptions` model itself, so a typo is a compile error.
|
|
2303
|
-
*/
|
|
2304
|
-
type OptionsSettingId = { [G in ViewerOptionsGroupId]: `${G}.${PrimitiveKeys<ViewerOptions[G]>}`; }[ViewerOptionsGroupId];
|
|
2305
|
-
/**
|
|
2306
|
-
* A File > Options page: the ten PowerPoint categories plus `ai`, the AI
|
|
2307
|
-
* assistant page a binding adds when the host configured an assistant.
|
|
2308
|
-
*/
|
|
2309
|
-
type OptionsPageId = ViewerOptionsTabId | 'ai';
|
|
2310
|
-
/**
|
|
2311
|
-
* One section of an Options page, addressed as `<page>.<section>`, for
|
|
2312
|
-
* example `general.personalize` or `advanced.print`. The full list is
|
|
2313
|
-
* `OPTIONS_SECTION_IDS` (derived from the schema at runtime).
|
|
2314
|
-
*/
|
|
2315
|
-
type OptionsSectionId = `${ViewerOptionsTabId}.${string}`;
|
|
2316
|
-
/** Values a host forces onto settings. */
|
|
2317
|
-
type OptionsSettingValues = Partial<Record<OptionsSettingId, ViewerOptionPrimitive>>;
|
|
2318
|
-
/** Ribbon and toolbar customisation. */
|
|
2319
|
-
interface RibbonCustomization {
|
|
2320
|
-
/**
|
|
2321
|
-
* Ribbon tabs to remove (the File tab included, unlike Customize Ribbon),
|
|
2322
|
-
* and contextual tabs (`shapeFormat`, `pictureFormat`, ...) that should
|
|
2323
|
-
* never appear.
|
|
2324
|
-
*/
|
|
2325
|
-
hiddenTabs?: readonly (ToolbarTabId | RibbonContextualTabId)[];
|
|
2326
|
-
/** Groups inside a tab to remove, as `<tab>.<group>` (`home.font`). */
|
|
2327
|
-
hiddenGroups?: readonly RibbonGroupId[];
|
|
2328
|
-
/**
|
|
2329
|
-
* Controls to remove: a top-level toolbar button / control cluster
|
|
2330
|
-
* (`share`, `zoom`, ...) or any ribbon control as
|
|
2331
|
-
* `<tab>.<group>.<control>` (`home.font.bold`).
|
|
2332
|
-
*/
|
|
2333
|
-
hiddenButtons?: readonly (ToolbarButtonId | RibbonControlId)[];
|
|
2334
|
-
}
|
|
2335
|
-
/** File > Options (the Settings dialog) customisation. */
|
|
2336
|
-
interface OptionsCustomization {
|
|
2337
|
-
/** Whole pages to remove from the dialog's category rail. */
|
|
2338
|
-
hiddenPages?: readonly OptionsPageId[];
|
|
2339
|
-
/** Sections (`<page>.<section>`) to remove from their page. */
|
|
2340
|
-
hiddenSections?: readonly OptionsSectionId[];
|
|
2341
|
-
/** Individual settings (`<group>.<key>`) to remove wherever they appear. */
|
|
2342
|
-
hiddenSettings?: readonly OptionsSettingId[];
|
|
2343
|
-
/**
|
|
2344
|
-
* Settings pinned to a fixed value. The value is forced into the options
|
|
2345
|
-
* store, user edits to it are ignored, and the control renders read-only.
|
|
2346
|
-
* Add the id to `hiddenSettings` too to lock it invisibly.
|
|
2347
|
-
*/
|
|
2348
|
-
locked?: OptionsSettingValues;
|
|
2349
|
-
/**
|
|
2350
|
-
* Host defaults: the value a setting starts at when the user has not saved
|
|
2351
|
-
* a choice of their own. "Reset" returns to these, not to the built-ins.
|
|
2352
|
-
*/
|
|
2353
|
-
defaults?: OptionsSettingValues;
|
|
2354
|
-
}
|
|
2355
|
-
/** File tab (backstage) customisation. */
|
|
2356
|
-
interface BackstageCustomization {
|
|
2357
|
-
/** Navigation entries (pages) to remove from the File tab. */
|
|
2358
|
-
hiddenPages?: readonly BackstagePage[];
|
|
2359
|
-
/** Action cards to remove from the pages that show them. */
|
|
2360
|
-
hiddenCards?: readonly BackstageCardId[];
|
|
2361
|
-
}
|
|
2362
|
-
/** Right-click menu customisation. */
|
|
2363
|
-
interface ContextMenuCustomization {
|
|
2364
|
-
/** Additional host commands, independent of the viewer's AI connection. */
|
|
2365
|
-
extraElementCommands?: readonly HostMenuCommand<HostElementMenuContext>[];
|
|
2366
|
-
extraCanvasCommands?: readonly HostMenuCommand<HostCanvasMenuContext>[];
|
|
2367
|
-
/** Entries to remove from the element (right-click on a shape) menu. */
|
|
2368
|
-
hiddenElementCommands?: readonly ContextMenuCommandId[];
|
|
2369
|
-
/** Entries to remove from the empty-canvas menu. */
|
|
2370
|
-
hiddenCanvasCommands?: readonly CanvasContextMenuCommandId[];
|
|
2371
|
-
/**
|
|
2372
|
-
* Entries to remove from the Edit Points menu (right-click a vertex or a
|
|
2373
|
-
* segment while editing a shape's points).
|
|
2374
|
-
*/
|
|
2375
|
-
hiddenEditPointsCommands?: readonly EditPointsCommandId[];
|
|
2376
|
-
/** Remove the element context menu entirely. */
|
|
2377
|
-
disableElementMenu?: boolean;
|
|
2378
|
-
/** Remove the empty-canvas context menu entirely. */
|
|
2379
|
-
disableCanvasMenu?: boolean;
|
|
2380
|
-
}
|
|
2381
|
-
/**
|
|
2382
|
-
* A shortcut chord in the form `Mod+Shift+D`: modifiers `Mod` (Ctrl on
|
|
2383
|
-
* Windows/Linux, Cmd on macOS), `Ctrl`, `Meta`, `Alt`, `Shift`, joined by `+`,
|
|
2384
|
-
* followed by a `KeyboardEvent.key` value (`D`, `Delete`, `ArrowLeft`, `F2`).
|
|
2385
|
-
*/
|
|
2386
|
-
type ShortcutChord = string;
|
|
2387
|
-
/** Editor keyboard-shortcut customisation. */
|
|
2388
|
-
interface KeyboardCustomization {
|
|
2389
|
-
/** Turn every editor shortcut off (the host owns the keyboard). */
|
|
2390
|
-
disableAll?: boolean;
|
|
2391
|
-
/** Editor commands whose shortcut is turned off. */
|
|
2392
|
-
disabled?: readonly EditorKeyActionName[];
|
|
2393
|
-
/**
|
|
2394
|
-
* Replacement chords per command. A remapped command no longer answers to
|
|
2395
|
-
* its built-in chord; it answers to the chord(s) given here instead.
|
|
2396
|
-
*/
|
|
2397
|
-
remap?: Partial<Record<EditorKeyActionName, ShortcutChord | readonly ShortcutChord[]>>;
|
|
2398
|
-
}
|
|
2399
|
-
/**
|
|
2400
|
-
* Chrome regions a host can remove. Each id maps onto one region in every
|
|
2401
|
-
* binding; see `VIEWER_PANEL_IDS` for the catalogue.
|
|
2402
|
-
*/
|
|
2403
|
-
type ViewerPanelId = 'statusBar' | 'slidesPane' | 'inspector' | 'notes' | 'quickAccessToolbar' | 'titleBar';
|
|
2404
|
-
/** Feature areas that can be switched off as a whole. */
|
|
2405
|
-
type ViewerFeatureId = 'ai' | 'collaboration' | 'comments' | 'presentMode' | 'editPoints';
|
|
2406
|
-
/**
|
|
2407
|
-
* The click-to-place drawing tools of Insert > Shapes > Lines: Freeform:
|
|
2408
|
-
* Shape and Curve.
|
|
2409
|
-
*/
|
|
2410
|
-
type ViewerDrawingToolId = FreeformToolKind;
|
|
2411
|
-
/** Dialogs (and the entry points that open them) a host can remove. */
|
|
2412
|
-
type ViewerDialogId = 'options' | 'share' | 'broadcast' | 'print' | 'export';
|
|
2413
|
-
/** Export formats offered by the File > Export page. */
|
|
2414
|
-
type ViewerExportFormatId = 'pdf' | 'png' | 'video' | 'gif' | 'json' | 'copyImage';
|
|
2415
|
-
/**
|
|
2416
|
-
* The whole customisation object. Every field is optional; omitted fields hide
|
|
2417
|
-
* nothing and lock nothing.
|
|
2418
|
-
*/
|
|
2419
|
-
interface ViewerCustomization {
|
|
2420
|
-
ribbon?: RibbonCustomization;
|
|
2421
|
-
options?: OptionsCustomization;
|
|
2422
|
-
backstage?: BackstageCustomization;
|
|
2423
|
-
contextMenu?: ContextMenuCustomization;
|
|
2424
|
-
keyboard?: KeyboardCustomization;
|
|
2425
|
-
/** Chrome regions to remove (`true` hides). */
|
|
2426
|
-
hiddenPanels?: readonly ViewerPanelId[];
|
|
2427
|
-
/** Feature areas to switch off (their buttons, menus, pages and panels). */
|
|
2428
|
-
disabledFeatures?: readonly ViewerFeatureId[];
|
|
2429
|
-
/** Dialogs to remove, along with every entry point that opens them. */
|
|
2430
|
-
hiddenDialogs?: readonly ViewerDialogId[];
|
|
2431
|
-
/** Export formats to remove from File > Export. */
|
|
2432
|
-
hiddenExportFormats?: readonly ViewerExportFormatId[];
|
|
2433
|
-
/** Drawing tools to remove from the Insert > Shapes gallery. */
|
|
2434
|
-
hiddenDrawingTools?: readonly ViewerDrawingToolId[];
|
|
2435
|
-
}
|
|
2436
|
-
//#endregion
|
|
2437
|
-
//#region src/render/customization/customization-keymap.d.ts
|
|
2438
|
-
/** A parsed `Mod+Shift+D` chord. */
|
|
2439
|
-
interface ParsedShortcutChord {
|
|
2440
|
-
key: string;
|
|
2441
|
-
mod: boolean;
|
|
2442
|
-
ctrl: boolean;
|
|
2443
|
-
meta: boolean;
|
|
2444
|
-
alt: boolean;
|
|
2445
|
-
shift: boolean;
|
|
2446
|
-
}
|
|
2447
|
-
/** The normalised keyboard slice of a resolved customisation. */
|
|
2448
|
-
interface ResolvedKeyboardCustomization {
|
|
2449
|
-
disableAll: boolean;
|
|
2450
|
-
disabled: ReadonlySet<EditorKeyActionName>;
|
|
2451
|
-
remap: ReadonlyMap<EditorKeyActionName, readonly ParsedShortcutChord[]>;
|
|
2452
|
-
}
|
|
2453
|
-
//#endregion
|
|
2454
|
-
//#region src/render/customization/customization-resolve.d.ts
|
|
2455
|
-
/** The normalised, set-based view of a customisation. Treat as immutable. */
|
|
2456
|
-
interface ResolvedCustomization {
|
|
2457
|
-
hiddenActions: ReadonlySet<ToolbarActionId>;
|
|
2458
|
-
/** Contextual tabs (`shapeFormat`, ...) the host never wants shown. */
|
|
2459
|
-
hiddenContextualTabs: ReadonlySet<RibbonContextualTabId>;
|
|
2460
|
-
/** Catalogued ribbon groups to hide (`ribbon.hiddenGroups`). */
|
|
2461
|
-
hiddenRibbonGroups: ReadonlySet<RibbonGroupId>;
|
|
2462
|
-
/** Catalogued ribbon controls to hide (the `<tab>.<group>.<control>` part of `ribbon.hiddenButtons`). */
|
|
2463
|
-
hiddenRibbonControls: ReadonlySet<RibbonControlId>;
|
|
2464
|
-
hiddenOptionsPages: ReadonlySet<OptionsPageId>;
|
|
2465
|
-
hiddenOptionsSections: ReadonlySet<OptionsSectionId>;
|
|
2466
|
-
hiddenSettings: ReadonlySet<OptionsSettingId>;
|
|
2467
|
-
lockedSettings: OptionsSettingValues;
|
|
2468
|
-
defaultSettings: OptionsSettingValues;
|
|
2469
|
-
hiddenBackstagePages: ReadonlySet<BackstagePage>;
|
|
2470
|
-
hiddenBackstageCards: ReadonlySet<BackstageCardId>;
|
|
2471
|
-
hiddenElementCommands: ReadonlySet<ContextMenuCommandId>;
|
|
2472
|
-
extraElementCommands: NonNullable<ViewerCustomization['contextMenu']>['extraElementCommands'];
|
|
2473
|
-
extraCanvasCommands: NonNullable<ViewerCustomization['contextMenu']>['extraCanvasCommands'];
|
|
2474
|
-
hiddenCanvasCommands: ReadonlySet<CanvasContextMenuCommandId>;
|
|
2475
|
-
hiddenEditPointsCommands: ReadonlySet<EditPointsCommandId>;
|
|
2476
|
-
hiddenDrawingTools: ReadonlySet<ViewerDrawingToolId>;
|
|
2477
|
-
elementMenuEnabled: boolean;
|
|
2478
|
-
canvasMenuEnabled: boolean;
|
|
2479
|
-
hiddenPanels: ReadonlySet<ViewerPanelId>;
|
|
2480
|
-
disabledFeatures: ReadonlySet<ViewerFeatureId>;
|
|
2481
|
-
hiddenDialogs: ReadonlySet<ViewerDialogId>;
|
|
2482
|
-
keyboard: ResolvedKeyboardCustomization;
|
|
2483
|
-
}
|
|
2484
|
-
//#endregion
|
|
2485
|
-
//#region src/render/customization/customization-controller.d.ts
|
|
2486
|
-
/** The imperative methods every binding's component handle exposes. */
|
|
2487
|
-
interface ViewerCustomizationApi {
|
|
2488
|
-
/** The current customisation object (a snapshot; do not mutate). */
|
|
2489
|
-
getCustomization(): ViewerCustomization;
|
|
2490
|
-
/** Replace the whole customisation. */
|
|
2491
|
-
setCustomization(next: ViewerCustomization): void;
|
|
2492
|
-
/** Merge a partial customisation (see `mergeCustomization`). */
|
|
2493
|
-
updateCustomization(patch: ViewerCustomization): void;
|
|
2494
|
-
/** Drop every customisation, back to the stock UI. */
|
|
2495
|
-
resetCustomization(): void;
|
|
2496
|
-
/** Hide a fixed tab, or stop a contextual tab (`shapeFormat`, ...) from appearing. */
|
|
2497
|
-
hideRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
|
|
2498
|
-
showRibbonTab(tab: ToolbarTabId | RibbonContextualTabId): void;
|
|
2499
|
-
/** Hide a group inside a tab (`home.font`). */
|
|
2500
|
-
hideRibbonGroup(group: RibbonGroupId): void;
|
|
2501
|
-
showRibbonGroup(group: RibbonGroupId): void;
|
|
2502
|
-
/** Hide a top-level toolbar button or any ribbon control (`home.font.bold`). */
|
|
2503
|
-
hideToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
|
|
2504
|
-
showToolbarButton(button: ToolbarButtonId | RibbonControlId): void;
|
|
2505
|
-
/** Alias of `hideToolbarButton` for a ribbon control id. */
|
|
2506
|
-
hideRibbonControl(control: RibbonControlId): void;
|
|
2507
|
-
showRibbonControl(control: RibbonControlId): void;
|
|
2508
|
-
hideOptionsPage(page: OptionsPageId): void;
|
|
2509
|
-
showOptionsPage(page: OptionsPageId): void;
|
|
2510
|
-
hideOptionsSection(section: OptionsSectionId): void;
|
|
2511
|
-
showOptionsSection(section: OptionsSectionId): void;
|
|
2512
|
-
hideSetting(setting: OptionsSettingId): void;
|
|
2513
|
-
showSetting(setting: OptionsSettingId): void;
|
|
2514
|
-
/** Pin a setting to `value`; `hidden` also removes it from the dialog. */
|
|
2515
|
-
lockSetting(setting: OptionsSettingId, value: ViewerOptionPrimitive, hidden?: boolean): void;
|
|
2516
|
-
unlockSetting(setting: OptionsSettingId): void;
|
|
2517
|
-
/** Set (or with `undefined`, clear) the host default for a setting. */
|
|
2518
|
-
setSettingDefault(setting: OptionsSettingId, value: ViewerOptionPrimitive | undefined): void;
|
|
2519
|
-
hideBackstagePage(page: BackstagePage): void;
|
|
2520
|
-
showBackstagePage(page: BackstagePage): void;
|
|
2521
|
-
hideBackstageCard(card: BackstageCardId): void;
|
|
2522
|
-
showBackstageCard(card: BackstageCardId): void;
|
|
2523
|
-
hideContextMenuCommand(command: ContextMenuCommandId): void;
|
|
2524
|
-
showContextMenuCommand(command: ContextMenuCommandId): void;
|
|
2525
|
-
hideCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
2526
|
-
showCanvasContextMenuCommand(command: CanvasContextMenuCommandId): void;
|
|
2527
|
-
disableShortcut(action: EditorKeyActionName): void;
|
|
2528
|
-
enableShortcut(action: EditorKeyActionName): void;
|
|
2529
|
-
/** Move a command onto new chord(s); `undefined` restores the built-in chord. */
|
|
2530
|
-
remapShortcut(action: EditorKeyActionName, chords: ShortcutChord | readonly ShortcutChord[] | undefined): void;
|
|
2531
|
-
setPanelVisible(panel: ViewerPanelId, visible: boolean): void;
|
|
2532
|
-
setFeatureEnabled(feature: ViewerFeatureId, enabled: boolean): void;
|
|
2533
|
-
setDialogAvailable(dialog: ViewerDialogId, available: boolean): void;
|
|
2534
|
-
}
|
|
2535
|
-
//#endregion
|
|
2536
|
-
//#region src/render/ribbon-command-view.d.ts
|
|
2537
|
-
/** A host supplies translated labels and controlled state; shared owns markup. */
|
|
2538
|
-
interface RibbonCommandView {
|
|
2539
|
-
id: RibbonControlId;
|
|
2540
|
-
label: string;
|
|
2541
|
-
icon: string;
|
|
2542
|
-
title?: string;
|
|
2543
|
-
disabled?: boolean;
|
|
2544
|
-
active?: boolean;
|
|
2545
|
-
pressed?: boolean;
|
|
2546
|
-
expanded?: boolean;
|
|
2547
|
-
hidden?: boolean;
|
|
2548
|
-
compact?: boolean;
|
|
2549
|
-
/** Opens a menu or panel: draws PowerPoint's drop-down chevron after the label. */
|
|
2550
|
-
caret?: boolean;
|
|
2551
|
-
badge?: number;
|
|
2552
|
-
/** Commands with the same column share a vertical stack. */
|
|
2553
|
-
column?: number;
|
|
2554
|
-
}
|
|
2555
|
-
interface RibbonGroupView {
|
|
2556
|
-
id: RibbonGroupId;
|
|
2557
|
-
label: string;
|
|
2558
|
-
commands: readonly RibbonCommandView[];
|
|
2559
|
-
}
|
|
2560
|
-
//#endregion
|
|
2561
|
-
//#region src/render/p14-transition-keyframes.d.ts
|
|
2562
|
-
/** Part 1: conveyor / doors / ferris / flash / flythrough / gallery / glitter / honeycomb / pan. */
|
|
2563
|
-
declare const P14_TRANSITION_KEYFRAMES = "\n/* ── Conveyor (translate X with staggered timing) ──────────────────── */\n@keyframes pptx-tr-conveyor-in-from-right {\n\tfrom { transform: translateX(100%) rotateY(-30deg); }\n\t60% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-left {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(-100%) rotateY(30deg); }\n}\n@keyframes pptx-tr-conveyor-in-from-left {\n\tfrom { transform: translateX(-100%) rotateY(30deg); }\n\t60% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-right {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(100%) rotateY(-30deg); }\n}\n\n/* ── Doors (clip-path from center split) ──────────────────────────────\n MEASURED via COM CreateVideo: PowerPoint's `dir=\"horz\"` names a\n HORIZONTAL split line (two panels stacked top/bottom, opening upward and\n downward), and `dir=\"vert\"` a VERTICAL split line (panels side by side,\n opening left and right) - the opposite of what \"clips left/right\" vs\n \"clips top/bottom\" would suggest at a glance. Keep the clip-path bodies\n matched to the MEASURED direction, not the intuitive one. */\n@keyframes pptx-tr-doors-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-doors-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n\n/* ── Ferris (rotate elements around center) ───────────────────────── */\n@keyframes pptx-tr-ferris-in-from-right {\n\tfrom { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-left {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n}\n@keyframes pptx-tr-ferris-in-from-left {\n\tfrom { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-right {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n}\n\n/* ── Flash (bright flash opacity burst) ──────────────────────────── */\n@keyframes pptx-tr-flash-white {\n\t0% { opacity: 1; }\n\t30% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n@keyframes pptx-tr-flash-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t70% { opacity: 1; }\n\t100% { opacity: 1; }\n}\n\n/* ── Flythrough (scale + translate Z-axis feel) ──────────────────── */\n@keyframes pptx-tr-flythrough-in {\n\tfrom { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n}\n@keyframes pptx-tr-flythrough-reverse-in {\n\tfrom { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-reverse-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n}\n\n/* ── Gallery (translate with perspective) ─────────────────────────── */\n@keyframes pptx-tr-gallery-in-from-right {\n\tfrom { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-left {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n}\n@keyframes pptx-tr-gallery-in-from-left {\n\tfrom { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-right {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n}\n\n/* ── Glitter (particle dissolve effect) ──────────────────────────── */\n@keyframes pptx-tr-glitter-in {\n\tfrom { opacity: 0; filter: brightness(1.5) contrast(1.3) blur(2px); }\n\t60% { opacity: 0.7; filter: brightness(1.2) contrast(1.1) blur(1px); }\n\tto { opacity: 1; filter: brightness(1) contrast(1) blur(0); }\n}\n\n/* ── Honeycomb (hexagonal reveal) ────────────────────────────────── */\n@keyframes pptx-tr-honeycomb-in {\n\tfrom {\n\t\tclip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);\n\t\topacity: 0;\n\t}\n\tto {\n\t\tclip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);\n\t\topacity: 1;\n\t}\n}\n@keyframes pptx-tr-honeycomb-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Pan (large-scale translate) ─────────────────────────────────── */\n@keyframes pptx-tr-pan-from-right {\n\tfrom { transform: translateX(100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n@keyframes pptx-tr-pan-from-left {\n\tfrom { transform: translateX(-100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-pan-from-bottom {\n\tfrom { transform: translateY(100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-top {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(-100%); }\n}\n@keyframes pptx-tr-pan-from-top {\n\tfrom { transform: translateY(-100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-bottom {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(100%); }\n}\n";
|
|
2564
|
-
/** Part 2: prism / reveal / ripple / shred / switch / vortex / warp / wheelReverse / window. */
|
|
2565
|
-
declare const P14_TRANSITION_KEYFRAMES_2 = "\n/* ── Prism: see `slide-transition-prism` (split out to keep this module\n under the per-file LOC budget) ─────────────────────────────────────── */\n\n@keyframes pptx-tr-prism-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-bottom {\n\tfrom { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-top {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-top {\n\tfrom { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-bottom {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n}\n\n/* ── Reveal (slide away reveal) ──────────────────────────────────── */\n@keyframes pptx-tr-reveal-out-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-reveal-out-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n/* MEASURED: the incoming layer stays hidden for roughly the first half of the\n transition (a real black/background gap shows through), then fades in -\n not a flat 0.5->1 fade running the whole duration. */\n@keyframes pptx-tr-reveal-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n\n/* ── Ripple (expanding ring clip-path) ───────────────────────────── */\n@keyframes pptx-tr-ripple-in {\n\tfrom { clip-path: circle(0% at 50% 50%); opacity: 0.5; }\n\t30% { clip-path: circle(20% at 50% 50%); opacity: 0.7; }\n\t60% { clip-path: circle(50% at 50% 50%); opacity: 0.9; }\n\tto { clip-path: circle(75% at 50% 50%); opacity: 1; }\n}\n\n/* ── Shred (fragmented clip-path pieces) ─────────────────────────── */\n@keyframes pptx-tr-shred-strips-in {\n\tfrom { clip-path: inset(0 100% 0 0); opacity: 0; }\n\t30% { clip-path: inset(0 60% 0 0); opacity: 0.5; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-rectangles-in {\n\tfrom { clip-path: inset(50%); opacity: 0; }\n\t40% { clip-path: inset(20%); opacity: 0.6; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Switch (flip/rotate swap) ───────────────────────────────────── */\n@keyframes pptx-tr-switch-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n}\n@keyframes pptx-tr-switch-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n}\n\n/* ── Vortex (rotate + scale spiral) ──────────────────────────────── */\n@keyframes pptx-tr-vortex-in {\n\tfrom { transform: rotate(720deg) scale(0); opacity: 0; }\n\tto { transform: rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-vortex-out {\n\tfrom { transform: rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: rotate(-720deg) scale(0); opacity: 0; }\n}\n\n/* ── Warp: see `slide-transition-warp` (COM-measured radial zoom blur,\n split out to keep this module under the per-file LOC budget) ────────── */\n\n@keyframes pptx-tr-warp-in {\n\t0% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n}\n@keyframes pptx-tr-warp-reverse-in {\n\t0% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-reverse-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n}\n\n\n/* ── WheelReverse (reverse wheel rotation) ───────────────────────── */\n@keyframes pptx-tr-wheel-reverse-in {\n\tfrom { clip-path: circle(0% at 50% 50%); transform: rotate(180deg); }\n\tto { clip-path: circle(75% at 50% 50%); transform: rotate(0deg); }\n}\n\n/* ── Window (scale from center with border) ──────────────────────────\n Same measured horz/vert meaning as Doors above (horz = horizontal split\n line opening vertically; vert = vertical split line opening horizontally). */\n@keyframes pptx-tr-window-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-out {\n\tfrom { opacity: 1; transform: scale(1); }\n\tto { opacity: 0; transform: scale(0.9); }\n}\n";
|
|
2566
|
-
/** Both p14 keyframe blocks concatenated, for single `<style>` injection. */
|
|
2567
|
-
declare const P14_TRANSITION_KEYFRAMES_ALL = "\n/* ── Conveyor (translate X with staggered timing) ──────────────────── */\n@keyframes pptx-tr-conveyor-in-from-right {\n\tfrom { transform: translateX(100%) rotateY(-30deg); }\n\t60% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-left {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(-100%) rotateY(30deg); }\n}\n@keyframes pptx-tr-conveyor-in-from-left {\n\tfrom { transform: translateX(-100%) rotateY(30deg); }\n\t60% { transform: translateX(-20%) rotateY(10deg); }\n\tto { transform: translateX(0) rotateY(0deg); }\n}\n@keyframes pptx-tr-conveyor-out-to-right {\n\tfrom { transform: translateX(0) rotateY(0deg); }\n\t40% { transform: translateX(20%) rotateY(-10deg); }\n\tto { transform: translateX(100%) rotateY(-30deg); }\n}\n\n/* ── Doors (clip-path from center split) ──────────────────────────────\n MEASURED via COM CreateVideo: PowerPoint's `dir=\"horz\"` names a\n HORIZONTAL split line (two panels stacked top/bottom, opening upward and\n downward), and `dir=\"vert\"` a VERTICAL split line (panels side by side,\n opening left and right) - the opposite of what \"clips left/right\" vs\n \"clips top/bottom\" would suggest at a glance. Keep the clip-path bodies\n matched to the MEASURED direction, not the intuitive one. */\n@keyframes pptx-tr-doors-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-doors-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n\n/* ── Ferris (rotate elements around center) ───────────────────────── */\n@keyframes pptx-tr-ferris-in-from-right {\n\tfrom { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-left {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n}\n@keyframes pptx-tr-ferris-in-from-left {\n\tfrom { transform: translateX(-80%) rotate(-45deg) scale(0.6); opacity: 0; }\n\tto { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-ferris-out-to-right {\n\tfrom { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: translateX(80%) rotate(45deg) scale(0.6); opacity: 0; }\n}\n\n/* ── Flash (bright flash opacity burst) ──────────────────────────── */\n@keyframes pptx-tr-flash-white {\n\t0% { opacity: 1; }\n\t30% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n@keyframes pptx-tr-flash-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t70% { opacity: 1; }\n\t100% { opacity: 1; }\n}\n\n/* ── Flythrough (scale + translate Z-axis feel) ──────────────────── */\n@keyframes pptx-tr-flythrough-in {\n\tfrom { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n}\n@keyframes pptx-tr-flythrough-reverse-in {\n\tfrom { transform: scale(0.1) translateZ(-200px); opacity: 0; filter: blur(8px); }\n\tto { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n}\n@keyframes pptx-tr-flythrough-reverse-out {\n\tfrom { transform: scale(1) translateZ(0); opacity: 1; filter: blur(0); }\n\tto { transform: scale(4) translateZ(200px); opacity: 0; filter: blur(8px); }\n}\n\n/* ── Gallery (translate with perspective) ─────────────────────────── */\n@keyframes pptx-tr-gallery-in-from-right {\n\tfrom { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-left {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n}\n@keyframes pptx-tr-gallery-in-from-left {\n\tfrom { transform: perspective(800px) translateX(-100%) rotateY(45deg); opacity: 0.5; }\n\tto { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-gallery-out-to-right {\n\tfrom { transform: perspective(800px) translateX(0) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) translateX(100%) rotateY(-45deg); opacity: 0.5; }\n}\n\n/* ── Glitter (particle dissolve effect) ──────────────────────────── */\n@keyframes pptx-tr-glitter-in {\n\tfrom { opacity: 0; filter: brightness(1.5) contrast(1.3) blur(2px); }\n\t60% { opacity: 0.7; filter: brightness(1.2) contrast(1.1) blur(1px); }\n\tto { opacity: 1; filter: brightness(1) contrast(1) blur(0); }\n}\n\n/* ── Honeycomb (hexagonal reveal) ────────────────────────────────── */\n@keyframes pptx-tr-honeycomb-in {\n\tfrom {\n\t\tclip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%);\n\t\topacity: 0;\n\t}\n\tto {\n\t\tclip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);\n\t\topacity: 1;\n\t}\n}\n@keyframes pptx-tr-honeycomb-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Pan (large-scale translate) ─────────────────────────────────── */\n@keyframes pptx-tr-pan-from-right {\n\tfrom { transform: translateX(100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n@keyframes pptx-tr-pan-from-left {\n\tfrom { transform: translateX(-100%); }\n\tto { transform: translateX(0); }\n}\n@keyframes pptx-tr-pan-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-pan-from-bottom {\n\tfrom { transform: translateY(100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-top {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(-100%); }\n}\n@keyframes pptx-tr-pan-from-top {\n\tfrom { transform: translateY(-100%); }\n\tto { transform: translateY(0); }\n}\n@keyframes pptx-tr-pan-to-bottom {\n\tfrom { transform: translateY(0); }\n\tto { transform: translateY(100%); }\n}\n\n\n/* ── Prism: see `slide-transition-prism` (split out to keep this module\n under the per-file LOC budget) ─────────────────────────────────────── */\n\n@keyframes pptx-tr-prism-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(90deg) translateX(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg) translateX(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-90deg) translateX(50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-bottom {\n\tfrom { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-top {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n}\n@keyframes pptx-tr-prism-in-from-top {\n\tfrom { transform: perspective(800px) rotateX(-90deg) translateY(-50%); opacity: 0; }\n\tto { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n}\n@keyframes pptx-tr-prism-out-to-bottom {\n\tfrom { transform: perspective(800px) rotateX(0deg) translateY(0); opacity: 1; }\n\tto { transform: perspective(800px) rotateX(90deg) translateY(50%); opacity: 0; }\n}\n\n/* ── Reveal (slide away reveal) ──────────────────────────────────── */\n@keyframes pptx-tr-reveal-out-to-right {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(100%); }\n}\n@keyframes pptx-tr-reveal-out-to-left {\n\tfrom { transform: translateX(0); }\n\tto { transform: translateX(-100%); }\n}\n/* MEASURED: the incoming layer stays hidden for roughly the first half of the\n transition (a real black/background gap shows through), then fades in -\n not a flat 0.5->1 fade running the whole duration. */\n@keyframes pptx-tr-reveal-in {\n\t0% { opacity: 0; }\n\t50% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n\n/* ── Ripple (expanding ring clip-path) ───────────────────────────── */\n@keyframes pptx-tr-ripple-in {\n\tfrom { clip-path: circle(0% at 50% 50%); opacity: 0.5; }\n\t30% { clip-path: circle(20% at 50% 50%); opacity: 0.7; }\n\t60% { clip-path: circle(50% at 50% 50%); opacity: 0.9; }\n\tto { clip-path: circle(75% at 50% 50%); opacity: 1; }\n}\n\n/* ── Shred (fragmented clip-path pieces) ─────────────────────────── */\n@keyframes pptx-tr-shred-strips-in {\n\tfrom { clip-path: inset(0 100% 0 0); opacity: 0; }\n\t30% { clip-path: inset(0 60% 0 0); opacity: 0.5; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-rectangles-in {\n\tfrom { clip-path: inset(50%); opacity: 0; }\n\t40% { clip-path: inset(20%); opacity: 0.6; }\n\tto { clip-path: inset(0); opacity: 1; }\n}\n@keyframes pptx-tr-shred-out {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; filter: blur(2px); }\n}\n\n/* ── Switch (flip/rotate swap) ───────────────────────────────────── */\n@keyframes pptx-tr-switch-in-from-right {\n\tfrom { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-left {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n}\n@keyframes pptx-tr-switch-in-from-left {\n\tfrom { transform: perspective(800px) rotateY(180deg); opacity: 0; }\n\tto { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n}\n@keyframes pptx-tr-switch-out-to-right {\n\tfrom { transform: perspective(800px) rotateY(0deg); opacity: 1; }\n\tto { transform: perspective(800px) rotateY(-180deg); opacity: 0; }\n}\n\n/* ── Vortex (rotate + scale spiral) ──────────────────────────────── */\n@keyframes pptx-tr-vortex-in {\n\tfrom { transform: rotate(720deg) scale(0); opacity: 0; }\n\tto { transform: rotate(0deg) scale(1); opacity: 1; }\n}\n@keyframes pptx-tr-vortex-out {\n\tfrom { transform: rotate(0deg) scale(1); opacity: 1; }\n\tto { transform: rotate(-720deg) scale(0); opacity: 0; }\n}\n\n/* ── Warp: see `slide-transition-warp` (COM-measured radial zoom blur,\n split out to keep this module under the per-file LOC budget) ────────── */\n\n@keyframes pptx-tr-warp-in {\n\t0% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(0.85); opacity: 0.7; filter: blur(3px) brightness(1.3); }\n\t100% { transform: scale(0.25); opacity: 0; filter: blur(10px) brightness(1.8); }\n}\n@keyframes pptx-tr-warp-reverse-in {\n\t0% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n}\n@keyframes pptx-tr-warp-reverse-out {\n\t0% { transform: scale(1); opacity: 1; filter: blur(0) brightness(1); }\n\t50% { transform: scale(1.7); opacity: 0.7; filter: blur(6px) brightness(1.5); }\n\t100% { transform: scale(3.2); opacity: 0; filter: blur(14px) brightness(2.2); }\n}\n\n\n/* ── WheelReverse (reverse wheel rotation) ───────────────────────── */\n@keyframes pptx-tr-wheel-reverse-in {\n\tfrom { clip-path: circle(0% at 50% 50%); transform: rotate(180deg); }\n\tto { clip-path: circle(75% at 50% 50%); transform: rotate(0deg); }\n}\n\n/* ── Window (scale from center with border) ──────────────────────────\n Same measured horz/vert meaning as Doors above (horz = horizontal split\n line opening vertically; vert = vertical split line opening horizontally). */\n@keyframes pptx-tr-window-horz {\n\tfrom { clip-path: inset(50% 0); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-vert {\n\tfrom { clip-path: inset(0 50%); }\n\tto { clip-path: inset(0 0); }\n}\n@keyframes pptx-tr-window-out {\n\tfrom { opacity: 1; transform: scale(1); }\n\tto { opacity: 0; transform: scale(0.9); }\n}\n\n\n@keyframes pptx-tr-vortex-in-left { from { transform: translateX(-40%) rotate(720deg) scale(0); opacity: 0; } to { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-left { from { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateX(-40%) rotate(-720deg) scale(0); opacity: 0; } }\n@keyframes pptx-tr-vortex-in-right { from { transform: translateX(40%) rotate(-720deg) scale(0); opacity: 0; } to { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-right { from { transform: translateX(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateX(40%) rotate(720deg) scale(0); opacity: 0; } }\n@keyframes pptx-tr-vortex-in-up { from { transform: translateY(-40%) rotate(720deg) scale(0); opacity: 0; } to { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-up { from { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateY(-40%) rotate(-720deg) scale(0); opacity: 0; } }\n@keyframes pptx-tr-vortex-in-down { from { transform: translateY(40%) rotate(-720deg) scale(0); opacity: 0; } to { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } }\n@keyframes pptx-tr-vortex-out-down { from { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; } to { transform: translateY(40%) rotate(720deg) scale(0); opacity: 0; } }\n\n\n@keyframes pptx-tr-ripple-in-lu { from { clip-path: circle(0% at 0% 0%); opacity: 0.5; } 30% { clip-path: circle(20% at 0% 0%); opacity: 0.7; } 60% { clip-path: circle(55% at 0% 0%); opacity: 0.9; } to { clip-path: circle(150% at 0% 0%); opacity: 1; } }\n@keyframes pptx-tr-ripple-in-ru { from { clip-path: circle(0% at 100% 0%); opacity: 0.5; } 30% { clip-path: circle(20% at 100% 0%); opacity: 0.7; } 60% { clip-path: circle(55% at 100% 0%); opacity: 0.9; } to { clip-path: circle(150% at 100% 0%); opacity: 1; } }\n@keyframes pptx-tr-ripple-in-ld { from { clip-path: circle(0% at 0% 100%); opacity: 0.5; } 30% { clip-path: circle(20% at 0% 100%); opacity: 0.7; } 60% { clip-path: circle(55% at 0% 100%); opacity: 0.9; } to { clip-path: circle(150% at 0% 100%); opacity: 1; } }\n@keyframes pptx-tr-ripple-in-rd { from { clip-path: circle(0% at 100% 100%); opacity: 0.5; } 30% { clip-path: circle(20% at 100% 100%); opacity: 0.7; } 60% { clip-path: circle(55% at 100% 100%); opacity: 0.9; } to { clip-path: circle(150% at 100% 100%); opacity: 1; } }\n\n\n@keyframes pptx-tr-glitter-diamond-in-l { from { opacity: 0; transform: translateX(-6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateX(-2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-diamond-in-r { from { opacity: 0; transform: translateX(6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateX(2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-diamond-in-u { from { opacity: 0; transform: translateY(-6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateY(-2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-diamond-in-d { from { opacity: 0; transform: translateY(6%); filter: brightness(1.5) contrast(1.3) blur(2px); } 60% { opacity: 0.7; transform: translateY(2%); filter: brightness(1.2) contrast(1.1) blur(1px); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0); } }\n@keyframes pptx-tr-glitter-hexagon-in-l { from { opacity: 0; transform: translateX(-6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateX(-2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n@keyframes pptx-tr-glitter-hexagon-in-r { from { opacity: 0; transform: translateX(6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateX(2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateX(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n@keyframes pptx-tr-glitter-hexagon-in-u { from { opacity: 0; transform: translateY(-6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateY(-2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n@keyframes pptx-tr-glitter-hexagon-in-d { from { opacity: 0; transform: translateY(6%); filter: brightness(1.5) contrast(1.3) blur(2px) hue-rotate(20deg); } 60% { opacity: 0.7; transform: translateY(2%); filter: brightness(1.2) contrast(1.1) blur(1px) hue-rotate(8deg); } to { opacity: 1; transform: translateY(0); filter: brightness(1) contrast(1) blur(0) hue-rotate(0deg); } }\n";
|
|
2568
|
-
//#endregion
|
|
2569
|
-
//#region src/render/p14-transition-css.d.ts
|
|
2570
|
-
/**
|
|
2571
|
-
* Return CSS animation descriptors for p14 transition types. Returns
|
|
2572
|
-
* `undefined` when the type is not a p14 transition.
|
|
2573
|
-
*/
|
|
2574
|
-
declare function getP14TransitionAnimations(type: PptxTransitionType, durationMs: number, direction: string | undefined, orient?: string | undefined, pattern?: string | undefined): SlideTransitionAnimations | undefined;
|
|
2575
|
-
interface SlideSizeEmu {
|
|
2576
|
-
widthEmu: number;
|
|
2577
|
-
heightEmu: number;
|
|
2578
|
-
/** ST_SlideSizeType token, or `''` for a size with no preset. */
|
|
2579
|
-
type: string;
|
|
2580
|
-
}
|
|
2581
|
-
//#endregion
|
|
2582
|
-
//#region src/render/mobile-viewport.d.ts
|
|
2583
|
-
/**
|
|
2584
|
-
* mobile-viewport.ts: framework-agnostic viewport / touch / orientation
|
|
2585
|
-
* detection shared by the React, Vue, and Angular bindings.
|
|
2586
|
-
*
|
|
2587
|
-
* These are the pure predicates and feature-detection helpers behind each
|
|
2588
|
-
* binding's `useIsMobile` / `IsMobileService`. The reactive wiring (React
|
|
2589
|
-
* state, Vue refs, Angular signals) stays in the binding; the breakpoint maths
|
|
2590
|
-
* and DOM capability probes live here so all three frameworks switch chrome at
|
|
2591
|
-
* exactly the same thresholds.
|
|
2592
|
-
*
|
|
2593
|
-
* SSR / test safe: every probe feature-detects `window` / `navigator` /
|
|
2594
|
-
* `screen` and returns a sensible default when absent.
|
|
2595
|
-
*/
|
|
2596
|
-
/** Mobile breakpoint: below this width is considered mobile. */
|
|
2597
|
-
declare const MOBILE_BREAKPOINT = 768;
|
|
2598
|
-
/** Tablet breakpoint: below this width (but >= MOBILE) is tablet. */
|
|
2599
|
-
declare const TABLET_BREAKPOINT = 1024;
|
|
2600
|
-
/** Device orientation as reported by the screen / viewport aspect ratio. */
|
|
2601
|
-
type DeviceOrientation = 'portrait' | 'landscape';
|
|
2602
|
-
//#endregion
|
|
2603
|
-
//#region src/render/presentation-session-types.d.ts
|
|
2604
|
-
interface PresentationSnapshot {
|
|
2605
|
-
slideIndex: number;
|
|
2606
|
-
buildStep: number;
|
|
2607
|
-
sequence: number;
|
|
2608
|
-
blackout: 'none' | 'black' | 'white';
|
|
2609
|
-
paused: boolean;
|
|
2610
|
-
elapsedMs: number;
|
|
2611
|
-
zoom?: PresentationZoomState;
|
|
2612
|
-
pointer?: PresentationPointerState;
|
|
2613
|
-
inkStrokes?: PresentationInkStroke[];
|
|
2614
|
-
/**
|
|
2615
|
-
* Whether ink markup is drawn (PowerPoint's Ctrl+M). Undefined means visible,
|
|
2616
|
-
* so existing snapshots keep showing their ink. Hiding never discards the
|
|
2617
|
-
* strokes, which stay in `inkStrokes` and can be kept on exit.
|
|
2618
|
-
*/
|
|
2619
|
-
inkMarkupVisible?: boolean;
|
|
2620
|
-
caption?: string;
|
|
2621
|
-
subtitlesVisible?: boolean;
|
|
2622
|
-
}
|
|
2623
|
-
interface PresentationZoomState {
|
|
2624
|
-
scale: number;
|
|
2625
|
-
originX: number;
|
|
2626
|
-
originY: number;
|
|
2627
|
-
}
|
|
2628
|
-
type PresentationPointerTool = 'none' | 'laser' | 'pen' | 'highlighter' | 'eraser';
|
|
2629
|
-
interface PresentationPointerState {
|
|
2630
|
-
tool: PresentationPointerTool;
|
|
2631
|
-
x: number;
|
|
2632
|
-
y: number;
|
|
2633
|
-
color: string;
|
|
2634
|
-
}
|
|
2635
|
-
interface PresentationInkPoint {
|
|
2636
|
-
x: number;
|
|
2637
|
-
y: number;
|
|
2638
|
-
}
|
|
2639
|
-
interface PresentationInkStroke {
|
|
2640
|
-
id: string;
|
|
2641
|
-
slideIndex: number;
|
|
2642
|
-
tool: 'pen' | 'highlighter';
|
|
2643
|
-
color: string;
|
|
2644
|
-
width: number;
|
|
2645
|
-
points: PresentationInkPoint[];
|
|
2646
|
-
}
|
|
2647
|
-
//#endregion
|
|
2648
|
-
//#region src/render/presentation-blackboard.d.ts
|
|
2649
|
-
/** Blackout state, as carried by {@link PresentationSnapshot}. */
|
|
2650
|
-
type PresentationBlackout = PresentationSnapshot['blackout'];
|
|
2651
|
-
//#endregion
|
|
2652
|
-
//#region src/render/paste-special.d.ts
|
|
2653
|
-
/** The four paste formats PowerPoint's Paste Options / Paste Special offer. */
|
|
2654
|
-
type PasteSpecialFormat = 'keep-source-formatting' | 'use-destination-theme' | 'picture' | 'keep-text-only';
|
|
2655
|
-
//#endregion
|
|
2656
|
-
//#region src/render/chrome-controls-state.d.ts
|
|
2657
|
-
type ChromeTranslate = (key: string, params?: Record<string, string | number>) => string;
|
|
2658
|
-
type ReadOnlyBannerPasswordError = 'wrong-password' | 'unsupported-algorithm';
|
|
2659
|
-
interface ReadOnlyBannerViewState {
|
|
2660
|
-
/** `ReadOnlyRecommendation.kind`; mirrored onto the host's `data-kind`. */
|
|
2661
|
-
kind: string | null;
|
|
2662
|
-
/** `ReadOnlyRecommendation.messageKey`, translated by `translate`. */
|
|
2663
|
-
messageKey: string;
|
|
2664
|
-
/** Swap the Edit anyway / Dismiss pair for the inline password form. */
|
|
2665
|
-
passwordPromptOpen?: boolean;
|
|
2666
|
-
passwordError?: ReadOnlyBannerPasswordError | null;
|
|
2667
|
-
/** Disables the form while a submitted password is being checked. */
|
|
2668
|
-
checkingPassword?: boolean;
|
|
2669
|
-
translate?: ChromeTranslate;
|
|
2670
|
-
}
|
|
2671
|
-
interface PasteOptionsViewState {
|
|
2672
|
-
/** Right edge of the pasted element in viewport pixels. */
|
|
2673
|
-
left: number;
|
|
2674
|
-
/** Bottom edge of the pasted element in viewport pixels. */
|
|
2675
|
-
top: number;
|
|
2676
|
-
translate?: ChromeTranslate;
|
|
2677
|
-
}
|
|
2678
|
-
interface CompatToastViewItem {
|
|
2679
|
-
readonly id: string;
|
|
2680
|
-
readonly code: string;
|
|
2681
|
-
readonly severity: 'info' | 'warning';
|
|
2682
|
-
readonly messageKey: string;
|
|
2683
|
-
readonly params?: Readonly<Record<string, string>>;
|
|
2684
|
-
}
|
|
2685
|
-
interface CompatToastsViewState {
|
|
2686
|
-
/** Dismiss-filtered toasts. The element shows the first {@link COMPAT_TOAST_VISIBLE_LIMIT}. */
|
|
2687
|
-
toasts: readonly CompatToastViewItem[];
|
|
2688
|
-
/** Extra toasts a host already trimmed off the list it passes. */
|
|
2689
|
-
overflowCount?: number;
|
|
2690
|
-
/** Width of the open right-docked panel (see `compatToastStackStyle`). */
|
|
2691
|
-
rightInset?: number;
|
|
2692
|
-
/** Live height of the docked notes strip (see `compatToastStackStyle`). */
|
|
2693
|
-
bottomInset?: number;
|
|
2694
|
-
translate?: ChromeTranslate;
|
|
2695
|
-
}
|
|
2696
|
-
type DialogFooterVariant = 'secondary' | 'primary' | 'warning' | 'danger';
|
|
2697
|
-
type DialogFooterIcon = 'trash' | 'pen' | 'restore' | 'print' | 'check';
|
|
2698
|
-
interface DialogFooterAction {
|
|
2699
|
-
/** Stable id echoed back in the `dialog-footer-request` intent. */
|
|
2700
|
-
id: string;
|
|
2701
|
-
/** Already-translated visible label and accessible name. */
|
|
2702
|
-
label: string;
|
|
2703
|
-
variant?: DialogFooterVariant;
|
|
2704
|
-
icon?: DialogFooterIcon;
|
|
2705
|
-
disabled?: boolean;
|
|
2706
|
-
/** Work in flight: the button is disabled, `aria-busy` and shows a spinner. */
|
|
2707
|
-
busy?: boolean;
|
|
2708
|
-
/** Tooltip (`title`) for an action whose label needs a longer hint. */
|
|
2709
|
-
title?: string;
|
|
2710
|
-
/** `start` pins a tertiary action (Remove link, Reset all) to the left edge. */
|
|
2711
|
-
align?: 'start' | 'end';
|
|
2712
|
-
/** Optional `data-testid` stamped on the button. */
|
|
2713
|
-
testId?: string;
|
|
2714
|
-
}
|
|
2715
|
-
interface DialogFooterViewState {
|
|
2716
|
-
actions: readonly DialogFooterAction[];
|
|
2717
|
-
}
|
|
2718
|
-
type MobileBarId = 'slides' | 'insert' | 'inspector' | 'comments' | 'notes';
|
|
2719
|
-
interface MobileBarViewState {
|
|
2720
|
-
/** Every button disables at 0 (see `buildBarActions`). */
|
|
2721
|
-
slideCount: number;
|
|
2722
|
-
/** The button whose sheet is open; reflected as `aria-pressed` and a top pill. */
|
|
2723
|
-
activeSheet?: MobileBarId | null;
|
|
2724
|
-
/** Comment count on the badge of Comments (`99+` above 99). */
|
|
2725
|
-
commentCount?: number;
|
|
2726
|
-
/** Buttons dropped entirely, such as Notes when `hiddenActions` hides it. */
|
|
2727
|
-
hidden?: readonly MobileBarId[];
|
|
2728
|
-
/** Buttons disabled beyond the no-slides rule, such as edit-only ones in view mode. */
|
|
2729
|
-
disabled?: readonly MobileBarId[];
|
|
2730
|
-
translate?: ChromeTranslate;
|
|
2731
|
-
}
|
|
2732
|
-
type MobileToolbarId = 'menu' | 'undo' | 'redo' | 'ai' | 'save' | 'present' | 'share';
|
|
2733
|
-
interface MobileToolbarViewState {
|
|
2734
|
-
/** Menu, Undo, Redo, AI and Share only show while editing. */
|
|
2735
|
-
editable: boolean;
|
|
2736
|
-
canUndo: boolean;
|
|
2737
|
-
canRedo: boolean;
|
|
2738
|
-
/** Host opted into the AI assistant; the element draws its toggle. */
|
|
2739
|
-
aiVisible?: boolean;
|
|
2740
|
-
aiActive?: boolean;
|
|
2741
|
-
/** Reflected as `aria-expanded` on Menu when given. */
|
|
2742
|
-
menuOpen?: boolean;
|
|
2743
|
-
/** Buttons dropped entirely (`hiddenActions`, or Share when the host has none). */
|
|
2744
|
-
hidden?: readonly MobileToolbarId[];
|
|
2745
|
-
/** Buttons disabled, such as Present while there is nothing to present. */
|
|
2746
|
-
disabled?: readonly MobileToolbarId[];
|
|
2747
|
-
translate?: ChromeTranslate;
|
|
2748
|
-
}
|
|
2749
|
-
interface PresentToolbarViewState {
|
|
2750
|
-
/** Zero-based slide on screen. */
|
|
2751
|
-
current: number;
|
|
2752
|
-
total: number;
|
|
2753
|
-
/** The armed annotation tool; `none` leaves every tool unpressed. */
|
|
2754
|
-
tool: PresentationPointerTool;
|
|
2755
|
-
penColor: string;
|
|
2756
|
-
highlighterColor: string;
|
|
2757
|
-
hasAnnotations: boolean;
|
|
2758
|
-
/** With the pen, marks the Blackboard toggle active (`isBlackboardActive`). */
|
|
2759
|
-
blackout: PresentationBlackout;
|
|
2760
|
-
/** Show the presenter-view toggle (default false). */
|
|
2761
|
-
presenterViewVisible?: boolean;
|
|
2762
|
-
presenterViewActive?: boolean;
|
|
2763
|
-
/** Epoch ms the show started. The element ticks the readout; null shows 00:00. */
|
|
2764
|
-
startTime: number | null;
|
|
2765
|
-
translate?: ChromeTranslate;
|
|
2766
|
-
}
|
|
2767
|
-
interface PresenterConsoleViewState {
|
|
2768
|
-
/** Ids of toggles that read as on (and the resume / close-window variants). */
|
|
2769
|
-
active: readonly string[];
|
|
2770
|
-
/** Ids of controls that are disabled. */
|
|
2771
|
-
disabled: readonly string[];
|
|
2772
|
-
translate?: ChromeTranslate;
|
|
2773
|
-
}
|
|
2774
|
-
//#endregion
|
|
2775
|
-
//#region src/render/find-replace.d.ts
|
|
2776
|
-
/** Identifies a single match of the find query at segment-level precision. */
|
|
2777
|
-
interface FindResult {
|
|
2778
|
-
/** Zero-based index of the slide in the slides array. */
|
|
2779
|
-
slideIndex: number;
|
|
2780
|
-
/** Id of the element that contains the match. */
|
|
2781
|
-
elementId: string;
|
|
2782
|
-
/** Zero-based index of the text segment within the element's `textSegments`. */
|
|
2783
|
-
segmentIndex: number;
|
|
2784
|
-
/** Character offset of the match start within the segment text. */
|
|
2785
|
-
startOffset: number;
|
|
2786
|
-
/** Number of characters matched (equals `query.length`). */
|
|
2787
|
-
length: number;
|
|
2788
|
-
}
|
|
2789
|
-
interface TouchGestureCallbacks {
|
|
2790
|
-
/** Called continuously during a pinch gesture with the new (clamped) scale. */
|
|
2791
|
-
onPinchZoom?: (newScale: number) => void;
|
|
2792
|
-
/** Called when a horizontal swipe is detected. direction: -1 = left, 1 = right. */
|
|
2793
|
-
onSwipe?: (direction: -1 | 1) => void;
|
|
2794
|
-
/** Called when a long-press is detected, with the press coordinates. */
|
|
2795
|
-
onLongPress?: (clientX: number, clientY: number) => void;
|
|
2796
|
-
}
|
|
2797
|
-
//#endregion
|
|
2798
|
-
//#region src/render/insert-chart.d.ts
|
|
2799
|
-
/**
|
|
2800
|
-
* Dropdown ids for the insert-chart menu. Distinct from `PptxChartType`
|
|
2801
|
-
* because PowerPoint offers Column (vertical) and Bar (horizontal) as two
|
|
2802
|
-
* entries over the same underlying `'bar'` chart type, and because `'pareto'`
|
|
2803
|
-
* has no `PptxChartType` of its own: it is a dropdown entry that resolves to
|
|
2804
|
-
* `type: 'histogram'` (see docs/guide/limitations.md's ChartEx row) with a
|
|
2805
|
-
* frequency-plus-cumulative-percentage default shape. The other six ChartEx
|
|
2806
|
-
* ids (`histogram` through `regionMap`) map one-to-one onto their chart type.
|
|
2807
|
-
*/
|
|
2808
|
-
type InsertChartKind = 'column' | 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'scatter' | 'histogram' | 'pareto' | 'funnel' | 'treemap' | 'sunburst' | 'boxWhisker' | 'regionMap';
|
|
2809
|
-
/** In-memory clipboard payload stored when an element is copied or cut. */
|
|
2810
|
-
interface ElementClipboardPayload {
|
|
2811
|
-
element: PptxElement;
|
|
2812
|
-
isTemplate: boolean;
|
|
2813
|
-
}
|
|
2814
|
-
//#endregion
|
|
2815
|
-
//#region src/render/editor-image-paste.d.ts
|
|
2816
|
-
/** A currently editable slide. Return null while loading or outside canvas editing. */
|
|
2817
|
-
interface EditorImagePasteTarget {
|
|
2818
|
-
documentId: object;
|
|
2819
|
-
slideId: string;
|
|
2820
|
-
canvasSize: CanvasSize$1;
|
|
2821
|
-
}
|
|
2822
|
-
interface EditorImagePasteOptions {
|
|
2823
|
-
getCanvas(): HTMLElement | null;
|
|
2824
|
-
getTarget(): EditorImagePasteTarget | null;
|
|
2825
|
-
/** Use the normal editor command so selection, dirty state and Undo stay consistent. */
|
|
2826
|
-
insertElement(element: ImagePptxElement): void;
|
|
2827
|
-
}
|
|
2828
|
-
/** What the "Embed fonts in the file" toggle should look like and do. */
|
|
2829
|
-
interface FontEmbeddingDescriptor {
|
|
2830
|
-
/** Distinct typeface names the loaded deck currently embeds. */
|
|
2831
|
-
embeddedFamilies: string[];
|
|
2832
|
-
/**
|
|
2833
|
-
* Whether the toggle accepts input. False when the deck embeds nothing,
|
|
2834
|
-
* because turning it on could not produce an embedded font.
|
|
2835
|
-
*/
|
|
2836
|
-
interactive: boolean;
|
|
2837
|
-
/**
|
|
2838
|
-
* The position the toggle must START in so that it describes the file that
|
|
2839
|
-
* would be written right now. A deck that arrived with embedded fonts keeps
|
|
2840
|
-
* them on save, so the switch has to read "on" from the outset; the previous
|
|
2841
|
-
* hardcoded `false` said the opposite of what save actually did.
|
|
2842
|
-
*/
|
|
2843
|
-
initialEnabled: boolean;
|
|
2844
|
-
/** Present only when `interactive` is false. */
|
|
2845
|
-
disabledReasonKey?: string;
|
|
2846
|
-
}
|
|
2847
|
-
/** One placeholder outline, already positioned in unscaled slide space. */
|
|
2848
|
-
interface LayoutPreviewFrame {
|
|
2849
|
-
/** Stable key for list rendering. */
|
|
2850
|
-
key: string;
|
|
2851
|
-
type: string;
|
|
2852
|
-
left: number;
|
|
2853
|
-
top: number;
|
|
2854
|
-
width: number;
|
|
2855
|
-
height: number;
|
|
2856
|
-
}
|
|
2857
|
-
/** Everything a binding needs to render one thumbnail. */
|
|
2858
|
-
interface LayoutPreviewGeometry {
|
|
2859
|
-
/** Outer box, in CSS pixels. */
|
|
2860
|
-
boxWidth: number;
|
|
2861
|
-
boxHeight: number;
|
|
2862
|
-
/** Inner surface size, in unscaled slide pixels. */
|
|
2863
|
-
surfaceWidth: number;
|
|
2864
|
-
surfaceHeight: number;
|
|
2865
|
-
/** Factor to apply as `transform: scale(...)` on the inner surface. */
|
|
2866
|
-
scale: number;
|
|
2867
|
-
backgroundColor: string;
|
|
2868
|
-
/**
|
|
2869
|
-
* Border width for placeholder outlines, pre-divided by {@link scale}.
|
|
2870
|
-
*
|
|
2871
|
-
* The outlines live inside the scaled surface, so a plain 1.5px border
|
|
2872
|
-
* would be multiplied down to a hairline that vanishes at thumbnail size.
|
|
2873
|
-
* Dividing here keeps the drawn width constant on screen whatever the
|
|
2874
|
-
* slide dimensions are.
|
|
2875
|
-
*/
|
|
2876
|
-
frameBorderWidth: number;
|
|
2877
|
-
frames: LayoutPreviewFrame[];
|
|
2878
|
-
}
|
|
2879
|
-
//#endregion
|
|
2880
|
-
//#region src/render/zoom-return-navigation.d.ts
|
|
2881
|
-
/**
|
|
2882
|
-
* The navigation-relevant fields of a Zoom click target, independent of
|
|
2883
|
-
* `zoomType`.
|
|
2884
|
-
*
|
|
2885
|
-
* `returnToParent` is already resolved to its EFFECTIVE value here (not the
|
|
2886
|
-
* raw, possibly-`undefined` `ZoomPptxElement`/`SummaryZoomTarget` field):
|
|
2887
|
-
* `CT_ZoomObjectProperties/@returnToParent` (MS-PPTX) is `<xsd:attribute
|
|
2888
|
-
* name="returnToParent" type="xsd:boolean" use="optional" default="true"/>`,
|
|
2889
|
-
* so an ABSENT attribute means true, not false. Core deliberately stores
|
|
2890
|
-
* `undefined` rather than fabricating `true` (so a round-trip never invents
|
|
2891
|
-
* an attribute the source never had), which makes `Boolean(x)` the wrong way
|
|
2892
|
-
* to read it; the two `resolve*NavigationTarget` functions below are the only
|
|
2893
|
-
* place that distinction should be made.
|
|
2894
|
-
*/
|
|
2895
|
-
interface ZoomNavigationTarget {
|
|
2896
|
-
targetSlideIndex: number;
|
|
2897
|
-
targetSectionId?: string;
|
|
2898
|
-
returnToParent: boolean;
|
|
2899
|
-
transitionDurationMs?: number;
|
|
2900
|
-
}
|
|
2901
|
-
/** A pending "return to the zoom's origin slide" excursion, tracked by the binding across forward-advance steps. */
|
|
2902
|
-
interface ZoomExcursion {
|
|
2903
|
-
/** The slide to jump back to once `endSlideIndex` is passed (the slide the zoom was clicked from). */
|
|
2904
|
-
returnSlideIndex: number;
|
|
2905
|
-
/** The last slide index of the zoom's target range; see {@link resolveZoomExcursionEndIndex}. */
|
|
2906
|
-
endSlideIndex: number;
|
|
2907
|
-
/** The zoom's own `transitionDur`, applied to the jump INTO the target and to the return jump. */
|
|
2908
|
-
transitionDurationMs?: number;
|
|
2909
|
-
}
|
|
2910
|
-
//#endregion
|
|
2911
|
-
//#region src/render/command-search.d.ts
|
|
2912
|
-
/**
|
|
2913
|
-
* Command-search data for the PowerPoint-style "Tell me what you want to do"
|
|
2914
|
-
* search bar. Provides searchable command entries grouped by category, each
|
|
2915
|
-
* mapping a label translation key to a command identifier that bindings can
|
|
2916
|
-
* dispatch.
|
|
2917
|
-
*/
|
|
2918
|
-
interface CommandSearchEntry {
|
|
2919
|
-
/** Translation key for the display label. */
|
|
2920
|
-
labelKey: string;
|
|
2921
|
-
/** Command identifier dispatched to the host binding. */
|
|
2922
|
-
command: string;
|
|
2923
|
-
/** Optional icon hint (binding resolves to framework icon component). */
|
|
2924
|
-
icon?: string;
|
|
2925
|
-
/** Category grouping key; hosts with their own short list may omit it. */
|
|
2926
|
-
category?: 'format' | 'insert' | 'view' | 'slideShow' | 'design' | 'arrange';
|
|
2927
|
-
}
|
|
2928
|
-
/** Everything a binding needs to render the recovery dialog, and nothing else. */
|
|
2929
|
-
interface AutosaveRecoveryPrompt {
|
|
2930
|
-
/** IndexedDB key the snapshot is stored under (the deck's file path/name). */
|
|
2931
|
-
readonly filePath: string;
|
|
2932
|
-
/** When the snapshot was written (epoch ms). */
|
|
2933
|
-
readonly timestamp: number;
|
|
2934
|
-
/** Snapshot size in bytes. */
|
|
2935
|
-
readonly size: number;
|
|
2936
|
-
/** Whole minutes since it was written, floored at 0. */
|
|
2937
|
-
readonly ageMinutes: number;
|
|
2938
|
-
readonly titleKey: string;
|
|
2939
|
-
readonly messageKey: string;
|
|
2940
|
-
/** `size` is pre-formatted here because byte units are not translated. */
|
|
2941
|
-
readonly messageParams: {
|
|
2942
|
-
readonly file: string;
|
|
2943
|
-
readonly size: string;
|
|
2944
|
-
};
|
|
2945
|
-
/** Relative age, reusing the existing autosave age keys. */
|
|
2946
|
-
readonly ageKey: string;
|
|
2947
|
-
readonly ageParams: {
|
|
2948
|
-
readonly count: number;
|
|
2949
|
-
};
|
|
2950
|
-
readonly restoreKey: string;
|
|
2951
|
-
readonly discardKey: string;
|
|
2952
|
-
}
|
|
2953
|
-
//#endregion
|
|
2954
|
-
//#region src/render/master-view.d.ts
|
|
2955
|
-
/** Which part the master view is currently pointed at. */
|
|
2956
|
-
interface MasterViewTarget {
|
|
2957
|
-
tab: MasterViewTab;
|
|
2958
|
-
masterIndex: number;
|
|
2959
|
-
/** `null` selects the master itself rather than one of its layouts. */
|
|
2960
|
-
layoutIndex: number | null;
|
|
2961
|
-
}
|
|
2962
|
-
//#endregion
|
|
2963
|
-
//#region src/render/virtualized-list.d.ts
|
|
2964
|
-
/** Framework-neutral virtual-list range used by every thumbnail sidebar. */
|
|
2965
|
-
interface VirtualizedRange {
|
|
2966
|
-
startIndex: number;
|
|
2967
|
-
endIndex: number;
|
|
2968
|
-
totalHeight: number;
|
|
2969
|
-
offsetY: number;
|
|
2970
|
-
visibleRange: {
|
|
2971
|
-
start: number;
|
|
2972
|
-
end: number;
|
|
2973
|
-
};
|
|
2974
|
-
}
|
|
2975
|
-
/** Compute the rendered item window for fixed-height virtual lists. */
|
|
2976
|
-
declare function computeVirtualRange(totalItems: number, itemHeight: number, scrollTop: number, viewportHeight: number, overscan?: number): VirtualizedRange;
|
|
2977
|
-
/**
|
|
2978
|
-
* Why the deck is being serialised, which is a separate question from whether
|
|
2979
|
-
* the user protected it.
|
|
2980
|
-
*
|
|
2981
|
-
* - `user-file` (the default): the bytes leave the viewer as a file. Save,
|
|
2982
|
-
* Save As, Export, the host-facing `getContent()`. Protection applies.
|
|
2983
|
-
* - `recovery-snapshot`: the bytes exist only so the viewer can read them back.
|
|
2984
|
-
* The autosave crash-recovery snapshot in IndexedDB, and the internal
|
|
2985
|
-
* re-serialise-then-reload cycle behind "apply theme". Protection does NOT
|
|
2986
|
-
* apply: these are always written in the clear.
|
|
2987
|
-
*
|
|
2988
|
-
* ## Why a recovery snapshot must stay plaintext
|
|
2989
|
-
*
|
|
2990
|
-
* Nothing that reads a snapshot back has a password to give it.
|
|
2991
|
-
* `readBackstageRecentFile`, `restoreSessionDeck` and the Version History
|
|
2992
|
-
* panel's Restore all hand `record.data` straight to `PptxHandler.load()` with
|
|
2993
|
-
* no `password` option, and an encrypted package refuses to open without one
|
|
2994
|
-
* (`EncryptedFileError`). So an encrypted snapshot is not an inconvenience, it
|
|
2995
|
-
* is unreadable: the moment the user turns on protection their crash-recovery
|
|
2996
|
-
* data is silently destroyed, which is the exact opposite of what autosave is
|
|
2997
|
-
* for.
|
|
2998
|
-
*
|
|
2999
|
-
* Encrypting it "properly" is not available either. Decrypting on recovery
|
|
3000
|
-
* means the key has to outlive the crash the snapshot exists for, so it would
|
|
3001
|
-
* have to sit in the same IndexedDB / localStorage as the snapshot itself,
|
|
3002
|
-
* next to the ciphertext it unlocks. That is not a security boundary, it is
|
|
3003
|
-
* theatre. Prompting the user instead only works if they remember the password
|
|
3004
|
-
* of a deck they lost, which is precisely the moment they will not.
|
|
3005
|
-
*
|
|
3006
|
-
* ## The tradeoff this accepts (deliberately, not by omission)
|
|
3007
|
-
*
|
|
3008
|
-
* A password-protected deck DOES leave its content in cleartext at rest in the
|
|
3009
|
-
* origin's IndexedDB. Anyone with the browser profile, or any script running on
|
|
3010
|
-
* the origin, can read it. What limits the exposure: snapshots are scoped to
|
|
3011
|
-
* the origin and profile, aged out by the store, and clearable from
|
|
3012
|
-
* File > Account > Storage & Privacy (`clearLocalStorageData`). A user who
|
|
3013
|
-
* cannot accept plaintext at rest should switch AutoSave off, which stops the
|
|
3014
|
-
* snapshot being written at all.
|
|
3015
|
-
*
|
|
3016
|
-
* The rejected alternative was "skip autosave entirely while a password is
|
|
3017
|
-
* set". It removes the plaintext, but it also removes crash recovery without
|
|
3018
|
-
* telling anyone, so a crash loses the whole editing session. Losing data
|
|
3019
|
-
* quietly is the failure mode we are fixing, not a fix for it.
|
|
3020
|
-
*/
|
|
3021
|
-
type DeckSavePurpose = 'user-file' | 'recovery-snapshot';
|
|
3022
|
-
/** A `p:showPr/p:sldRg` custom range, resolved to 0-based deck indexes. */
|
|
3023
|
-
interface AuthoredSlideRange {
|
|
3024
|
-
/** First slide of the range, 0-based, inclusive. */
|
|
3025
|
-
readonly fromIndex: number;
|
|
3026
|
-
/** Last slide of the range, 0-based, inclusive. */
|
|
3027
|
-
readonly toIndex: number;
|
|
3028
|
-
}
|
|
3029
|
-
//#endregion
|
|
3030
|
-
//#region src/export/handout-layout.d.ts
|
|
3031
|
-
/**
|
|
3032
|
-
* Pure handout layout calculations, shared by every binding's print path.
|
|
3033
|
-
*
|
|
3034
|
-
* Handles distributing slides across pages, computing grid dimensions, and
|
|
3035
|
-
* positioning cells within A4 page space. No DOM/framework dependency: callers
|
|
3036
|
-
* render the resulting rectangles however their view layer prefers.
|
|
3037
|
-
*/
|
|
3038
|
-
/** Supported slides-per-page values. */
|
|
3039
|
-
type HandoutSlidesPerPage = 1 | 2 | 3 | 4 | 6 | 9;
|
|
3040
|
-
//#endregion
|
|
3041
|
-
//#region src/export/print-document.d.ts
|
|
3042
|
-
/** What to print. */
|
|
3043
|
-
type PrintWhat = 'slides' | 'handouts' | 'notes' | 'outline';
|
|
3044
|
-
/** Page orientation for the printed output. */
|
|
3045
|
-
type PrintOrientation = 'portrait' | 'landscape';
|
|
3046
|
-
/** Colour mode for the printed output. */
|
|
3047
|
-
type PrintColorMode = 'color' | 'grayscale' | 'blackAndWhite';
|
|
3048
|
-
/** Slide range mode. */
|
|
3049
|
-
type PrintSlideRange = 'all' | 'current' | 'custom';
|
|
3050
|
-
/** Resolved print settings emitted on confirm. */
|
|
3051
|
-
interface PrintSettings {
|
|
3052
|
-
printWhat: PrintWhat;
|
|
3053
|
-
orientation: PrintOrientation;
|
|
3054
|
-
colorMode: PrintColorMode;
|
|
3055
|
-
frameSlides: boolean;
|
|
3056
|
-
slidesPerPage: HandoutSlidesPerPage;
|
|
3057
|
-
slideRange: PrintSlideRange;
|
|
3058
|
-
customRangeFrom: number;
|
|
3059
|
-
customRangeTo: number;
|
|
3060
|
-
/**
|
|
3061
|
-
* PowerPoint's Print > "Scale to Fit Paper". `true` (the default, and the
|
|
3062
|
-
* only behavior this printed output ever had before this field existed)
|
|
3063
|
-
* shrinks/grows each slide image to fill its page/cell while preserving
|
|
3064
|
-
* aspect ratio. `false` prints at the slide's native pixel size instead,
|
|
3065
|
-
* which may overflow or under-fill the page, exactly like PowerPoint with
|
|
3066
|
-
* the option off. Optional so existing `Partial<PrintSettings>` literals
|
|
3067
|
-
* across every binding keep compiling; `validatePrintSettings` defaults it
|
|
3068
|
-
* to `true`.
|
|
3069
|
-
*/
|
|
3070
|
-
scaleToFit?: boolean;
|
|
3071
|
-
}
|
|
3072
|
-
//#endregion
|
|
3073
|
-
//#region src/render/options/viewer-options-constraints.d.ts
|
|
3074
|
-
/** Locks and host defaults, both keyed `<group>.<key>`. */
|
|
3075
|
-
interface ViewerOptionsConstraints {
|
|
3076
|
-
locked?: OptionsSettingValues;
|
|
3077
|
-
defaults?: OptionsSettingValues;
|
|
3078
|
-
}
|
|
3079
|
-
//#endregion
|
|
3080
|
-
//#region src/render/options/viewer-options-store.d.ts
|
|
3081
|
-
/**
|
|
3082
|
-
* Framework-neutral store behind the File > Options dialog.
|
|
3083
|
-
*
|
|
3084
|
-
* Holds a `ViewerOptions` snapshot, notifies subscribers on change, and
|
|
3085
|
-
* persists a sparse diff into the shared `pptx-viewer-prefs` localStorage
|
|
3086
|
-
* entry so choices survive reloads in every binding.
|
|
3087
|
-
*/
|
|
3088
|
-
type ViewerOptionsListener = (options: ViewerOptions) => void;
|
|
3089
|
-
interface ViewerOptionsStore {
|
|
3090
|
-
getOptions(): ViewerOptions;
|
|
3091
|
-
/** Replace the whole snapshot (e.g. hydrating from a host prop). */
|
|
3092
|
-
setOptions(next: ViewerOptions): void;
|
|
3093
|
-
/** Set one primitive value; ignores unknown keys and mismatched types. */
|
|
3094
|
-
setValue(group: ViewerOptionsGroupId, key: string, value: ViewerOptionPrimitive): void;
|
|
3095
|
-
getValue(group: ViewerOptionsGroupId, key: string): ViewerOptionPrimitive | undefined;
|
|
3096
|
-
/** Toggle a ribbon tab's visibility. The File tab is always kept visible. */
|
|
3097
|
-
setRibbonTabHidden(tabId: ToolbarTabId, hidden: boolean): void;
|
|
3098
|
-
setQuickAccessCommands(commandIds: readonly string[]): void;
|
|
3099
|
-
/** Reset every option (or one tab-group) back to defaults. */
|
|
3100
|
-
reset(group?: ViewerOptionsGroupId): void;
|
|
3101
|
-
subscribe(listener: ViewerOptionsListener): () => void;
|
|
3102
|
-
/**
|
|
3103
|
-
* Subscribe to ONE projection of the options, woken only when that
|
|
3104
|
-
* projection changes.
|
|
3105
|
-
*
|
|
3106
|
-
* `subscribe` above wakes on every option change, which in a binding means
|
|
3107
|
-
* the whole options consumer re-renders because the user toggled something
|
|
3108
|
-
* unrelated. A ribbon control that reads `ribbon.hiddenTabIds` should not
|
|
3109
|
-
* care that an autosave interval moved (issue #145).
|
|
3110
|
-
*
|
|
3111
|
-
* IMPORTANT for array/object slices: every write here deep-clones the whole
|
|
3112
|
-
* options object (`cloneViewerOptions`), so a nested array is a NEW array
|
|
3113
|
-
* after ANY change, even one that did not touch it. Under the default
|
|
3114
|
-
* `Object.is` such a selector would fire on every write and buy nothing.
|
|
3115
|
-
* Pass a value equality for those, e.g. the shared `sameArray`.
|
|
3116
|
-
*/
|
|
3117
|
-
subscribeSelector<T>(selector: (options: ViewerOptions) => T, listener: (value: T, previous: T) => void, isEqual?: (a: T, b: T) => boolean): () => void;
|
|
3118
|
-
/**
|
|
3119
|
-
* Apply several option writes as ONE notification, so a multi-field
|
|
3120
|
-
* operation costs a single render instead of one per field.
|
|
3121
|
-
*/
|
|
3122
|
-
batch(write: () => void): void;
|
|
3123
|
-
/**
|
|
3124
|
-
* Apply host constraints (see `ViewerOptionsConstraints`): `locked` values
|
|
3125
|
-
* are forced in and every later write to them is ignored; `defaults`
|
|
3126
|
-
* replace the built-in defaults for settings the user never saved, and
|
|
3127
|
-
* become what `reset` returns to. Replaces any previous constraints.
|
|
3128
|
-
*/
|
|
3129
|
-
setConstraints(constraints: ViewerOptionsConstraints): void;
|
|
3130
|
-
/** True when the host locked `<group>.<key>`. */
|
|
3131
|
-
isLocked(group: ViewerOptionsGroupId, key: string): boolean;
|
|
3132
|
-
}
|
|
3133
|
-
interface SubtitleSettings {
|
|
3134
|
-
spokenLanguage: string;
|
|
3135
|
-
}
|
|
3136
|
-
interface SubtitleSettingsLabels {
|
|
3137
|
-
title: string;
|
|
3138
|
-
language: string;
|
|
3139
|
-
browserLanguage: string;
|
|
3140
|
-
description: string;
|
|
3141
|
-
apply: string;
|
|
3142
|
-
cancel: string;
|
|
3143
|
-
}
|
|
3144
|
-
//#endregion
|
|
3145
|
-
//#region src/render/ribbon-galleries/gallery-types.d.ts
|
|
3146
|
-
/** Every gallery the ribbon offers. */
|
|
3147
|
-
type RibbonGalleryId = 'shapeStyles' | 'shapeEffects' | 'wordArtStyles' | 'pictureStyles' | 'pictureCorrections' | 'pictureColor' | 'pictureArtisticEffects' | 'bullets' | 'numbering' | 'tableStyles' | 'chartStyles' | 'chartColors' | 'chartQuickLayout' | 'smartArtStyles' | 'smartArtColors' | 'smartArtLayouts' | 'smartArtAddShape' | 'smartArtAddBullet' | 'smartArtTextPane' | 'smartArtPromote' | 'smartArtDemote' | 'smartArtRightToLeft' | 'smartArtMoveUp' | 'smartArtMoveDown' | 'smartArtResetGraphic' | 'smartArtConvert' | 'themeColors' | 'themeFonts';
|
|
3148
|
-
/** One tile. */
|
|
3149
|
-
interface RibbonGalleryItem {
|
|
3150
|
-
/** Stable within its gallery; what `applyRibbonGalleryItem` takes. */
|
|
3151
|
-
id: string;
|
|
3152
|
-
/** i18n key of the tile's accessible name / tooltip. */
|
|
3153
|
-
labelKey: string;
|
|
3154
|
-
/** `{{name}}` interpolation values for `labelKey`. */
|
|
3155
|
-
labelParams?: Readonly<Record<string, string | number>>;
|
|
3156
|
-
/** English fallback for bindings whose dictionary lacks `labelKey`. */
|
|
3157
|
-
label: string;
|
|
3158
|
-
/**
|
|
3159
|
-
* A complete, self-contained `<svg>` element (width/height/viewBox set).
|
|
3160
|
-
* Built only from catalogue data and theme colours, never from user text,
|
|
3161
|
-
* so it is safe to inject as markup.
|
|
3162
|
-
*/
|
|
3163
|
-
previewSvg: string;
|
|
3164
|
-
/**
|
|
3165
|
-
* CSS `filter` the tile's preview carries (the Picture Adjust galleries),
|
|
3166
|
-
* for a host that draws the thumbnail over a real image instead of
|
|
3167
|
-
* `previewSvg`. Omitted when the preset has no CSS-expressible preview.
|
|
3168
|
-
*/
|
|
3169
|
-
previewFilter?: string;
|
|
3170
|
-
/** True when this entry is what the selection currently carries. */
|
|
3171
|
-
applied: boolean;
|
|
3172
|
-
}
|
|
3173
|
-
/** A titled block of tiles (PowerPoint's "Theme Styles" / "Presets"). */
|
|
3174
|
-
interface RibbonGallerySection {
|
|
3175
|
-
id: string;
|
|
3176
|
-
/** i18n key of the section heading; omitted for an untitled section. */
|
|
3177
|
-
titleKey?: string;
|
|
3178
|
-
title?: string;
|
|
3179
|
-
/** Tiles per row in the dropped-down grid. */
|
|
3180
|
-
columns: number;
|
|
3181
|
-
/** Preview tile size in CSS px (the SVG's own width/height). */
|
|
3182
|
-
tileWidth: number;
|
|
3183
|
-
tileHeight: number;
|
|
3184
|
-
items: RibbonGalleryItem[];
|
|
3185
|
-
}
|
|
3186
|
-
interface RibbonGalleryDescriptor {
|
|
3187
|
-
id: RibbonGalleryId;
|
|
3188
|
-
/** i18n key of the gallery trigger / group caption. */
|
|
3189
|
-
labelKey: string;
|
|
3190
|
-
label: string;
|
|
3191
|
-
sections: RibbonGallerySection[];
|
|
3192
|
-
/** True when the selection cannot take this gallery (trigger disabled). */
|
|
3193
|
-
disabled: boolean;
|
|
3194
|
-
/**
|
|
3195
|
-
* Set when the entry is a one-button command (PowerPoint's Add Shape, Reset
|
|
3196
|
-
* Graphic, ...) rather than a gallery: the element draws a plain command, a
|
|
3197
|
-
* click picks its only item and no panel opens.
|
|
3198
|
-
*/
|
|
3199
|
-
command?: RibbonGalleryCommandView;
|
|
3200
|
-
}
|
|
3201
|
-
/** How a command-style entry draws (see {@link RibbonGalleryDescriptor.command}). */
|
|
3202
|
-
interface RibbonGalleryCommandView {
|
|
3203
|
-
/** SVG path data on a 20px grid. */
|
|
3204
|
-
iconPath: string;
|
|
3205
|
-
/** Icon above the label (PowerPoint's large button) instead of beside it. */
|
|
3206
|
-
large?: boolean;
|
|
3207
|
-
/** i18n key and English fallback of the tooltip, e.g. why the command is unavailable. */
|
|
3208
|
-
hintKey?: string;
|
|
3209
|
-
hint?: string;
|
|
3210
|
-
}
|
|
3211
|
-
type ReadOnlyRecommendationKind = 'modifyVerifier' | 'markedFinal' | null;
|
|
3212
|
-
interface ReadOnlyRecommendation {
|
|
3213
|
-
readonly kind: ReadOnlyRecommendationKind;
|
|
3214
|
-
/** i18n key for the banner/toast a binding shows for this recommendation. */
|
|
3215
|
-
readonly messageKey: string;
|
|
3216
|
-
/** Whether a binding's "read-only" toggle should default to on. */
|
|
3217
|
-
readonly defaultReadOnly: boolean;
|
|
3218
|
-
/**
|
|
3219
|
-
* Whether lifting this recommendation requires a correct password, rather
|
|
3220
|
-
* than a plain "Edit anyway". True only for a `modifyVerifier` that carries
|
|
3221
|
-
* a hash this viewer can actually check (`hashData` plus a resolvable
|
|
3222
|
-
* algorithm, see `checkModifyPassword`; `saltData` is optional and NOT
|
|
3223
|
-
* required, a missing salt is still checkable). "Mark as Final" is purely
|
|
3224
|
-
* advisory and never requires one, and a `modifyVerifier` with no hash at
|
|
3225
|
-
* all, or naming an algorithm this viewer does not implement, cannot be
|
|
3226
|
-
* verified either way, so both fall back to the plain "Edit anyway" a
|
|
3227
|
-
* binding already had.
|
|
3228
|
-
*/
|
|
3229
|
-
readonly requiresPassword: boolean;
|
|
3230
|
-
}
|
|
3231
|
-
interface CompatibilityWarningToast {
|
|
3232
|
-
/** Stable per-code id, since toasts are deduped by code (see module docs). */
|
|
3233
|
-
readonly id: string;
|
|
3234
|
-
readonly code: string;
|
|
3235
|
-
readonly severity: 'info' | 'warning';
|
|
3236
|
-
readonly messageKey: string;
|
|
3237
|
-
/** `{{code}}` for the generic fallback key; `undefined` for a mapped code. */
|
|
3238
|
-
readonly params?: Readonly<Record<string, string>>;
|
|
3239
|
-
}
|
|
3240
|
-
//#endregion
|
|
3241
|
-
//#region src/render/run-program-notice.d.ts
|
|
3242
|
-
/**
|
|
3243
|
-
* run-program-notice.ts: turn a resolved `ppaction://program` command string
|
|
3244
|
-
* into the non-blocking notice a binding should show during a running show.
|
|
3245
|
-
*
|
|
3246
|
-
* PowerPoint's "Run program" action (`a:hlinkClick` -> `ppaction://program`,
|
|
3247
|
-
* `packages/shared/src/render/presentation-action.ts`'s `runProgram` intent)
|
|
3248
|
-
* names a free-text "Program to run:" command the author typed, e.g.
|
|
3249
|
-
* `notepad.exe C:\temp\notes.txt`. Path and arguments are ONE unstructured
|
|
3250
|
-
* string; OOXML has no separate arguments field, so this module does not try
|
|
3251
|
-
* to split one out.
|
|
3252
|
-
*
|
|
3253
|
-
* A browser cannot launch a local executable, so the honest behavior on
|
|
3254
|
-
* click is: show the presenter a small, dismissible notice naming the exact
|
|
3255
|
-
* command PowerPoint would have run, with a Copy button, rather than doing
|
|
3256
|
-
* nothing (silently) or blocking the show with a modal dialog.
|
|
3257
|
-
*
|
|
3258
|
-
* Framework-agnostic: no React, Vue, Angular, Svelte or DOM imports.
|
|
3259
|
-
*/
|
|
3260
|
-
/** A run-program notice ready for a binding's toast/notice UI to render. */
|
|
3261
|
-
interface RunProgramNotice {
|
|
3262
|
-
/** Stable id for this invocation, so a binding can dedupe/key a toast list. */
|
|
3263
|
-
readonly id: string;
|
|
3264
|
-
/** The exact resolved command string (path plus whatever arguments the author typed). */
|
|
3265
|
-
readonly target: string;
|
|
3266
|
-
/** i18n key for the notice body. Interpolates `{{target}}`. */
|
|
3267
|
-
readonly messageKey: string;
|
|
3268
|
-
/** i18n key for the Copy button label. */
|
|
3269
|
-
readonly copyLabelKey: string;
|
|
3270
|
-
}
|
|
3271
|
-
//#endregion
|
|
3272
|
-
//#region src/render/viewport-fit.d.ts
|
|
3273
|
-
/** Unscaled CSS pixels reserved on each side of the ordinary viewer viewport. */
|
|
3274
|
-
type ViewportFitPadding = number | {
|
|
3275
|
-
horizontal: number;
|
|
3276
|
-
vertical: number;
|
|
3277
|
-
};
|
|
3278
|
-
/** Host layout policy, independent of authored slide dimensions and user zoom. */
|
|
3279
|
-
interface ViewportFitOptions {
|
|
3280
|
-
/** Per-side padding. Omission keeps the binding's existing decorative allowance. */
|
|
3281
|
-
fitPadding?: ViewportFitPadding;
|
|
3282
|
-
/** Positive fit-factor ceiling; null allows enlargement without a ceiling. */
|
|
3283
|
-
maxFitScale?: number | null;
|
|
3284
|
-
}
|
|
3285
|
-
/** The element fields an Edit Points commit writes. */
|
|
3286
|
-
type EditPointsElementPatch = Pick<ShapePptxElement, 'x' | 'y' | 'width' | 'height' | 'shapeType' | 'shapeAdjustments' | 'pathData' | 'pathWidth' | 'pathHeight' | 'customGeometryPaths' | 'customGeometryRawData' | 'customGeometryAdjustHandlesXY' | 'customGeometryAdjustHandlesPolar' | 'customGeometryConnectionSites' | 'customGeometryTextRect'>;
|
|
3287
|
-
//#endregion
|
|
3288
|
-
//#region src/render/picture-crop/crop-geometry.d.ts
|
|
3289
|
-
/** An axis-aligned rectangle in slide pixels. */
|
|
3290
|
-
interface CropRect {
|
|
3291
|
-
x: number;
|
|
3292
|
-
y: number;
|
|
3293
|
-
width: number;
|
|
3294
|
-
height: number;
|
|
3295
|
-
}
|
|
3296
|
-
/** The four `a:srcRect` insets as fractions of the image (negative pads). */
|
|
3297
|
-
interface CropInsets {
|
|
3298
|
-
cropLeft: number;
|
|
3299
|
-
cropTop: number;
|
|
3300
|
-
cropRight: number;
|
|
3301
|
-
cropBottom: number;
|
|
3302
|
-
}
|
|
3303
|
-
/** What a crop edit writes back onto the picture element. */
|
|
3304
|
-
type CropElementUpdate = CropInsets & CropRect;
|
|
3305
|
-
/** The snapshot a crop session restores on cancel. */
|
|
3306
|
-
interface CropSession {
|
|
3307
|
-
elementId: string;
|
|
3308
|
-
original: CropElementUpdate;
|
|
3309
|
-
/** Insets the picture did not carry at all (no `a:srcRect` opinion). */
|
|
3310
|
-
absentInsets: readonly (keyof CropInsets)[];
|
|
3311
|
-
}
|
|
3312
|
-
//#endregion
|
|
3313
|
-
//#region src/render/theme-editor-model.d.ts
|
|
3314
|
-
interface ThemeEditorEdit {
|
|
3315
|
-
name: string;
|
|
3316
|
-
colorScheme: PptxThemeColorScheme;
|
|
3317
|
-
fontScheme: PptxThemeFontScheme;
|
|
3318
|
-
}
|
|
3319
|
-
type ThemeEditorLabels = Record<string, string>;
|
|
3320
|
-
/**
|
|
3321
|
-
* Controlled Animations tab state. Hosts own the slide model, selection,
|
|
3322
|
-
* history and the inspector; the view only reflects these values.
|
|
3323
|
-
*/
|
|
3324
|
-
interface RibbonAnimationsViewState {
|
|
3325
|
-
/** False in read-only hosts: every authoring intent is rejected. */
|
|
3326
|
-
editable: boolean;
|
|
3327
|
-
/** Whether an element is selected; effects always target one element. */
|
|
3328
|
-
hasSelection: boolean;
|
|
3329
|
-
/** Whether the Animation Pane (inspector) is open; reflected as pressed. */
|
|
3330
|
-
paneOpen?: boolean;
|
|
3331
|
-
/** Transient highlight while a host's Preview is playing, where it tracks one. */
|
|
3332
|
-
previewActive?: boolean;
|
|
3333
|
-
translate?: (key: string) => string;
|
|
3334
|
-
}
|
|
3335
|
-
//#endregion
|
|
3336
|
-
//#region src/render/ribbon-draw-state.d.ts
|
|
3337
|
-
type RibbonDrawTool = 'select' | 'pen' | 'highlighter' | 'eraser' | 'freeform';
|
|
3338
|
-
interface RibbonDrawViewState {
|
|
3339
|
-
tool: RibbonDrawTool;
|
|
3340
|
-
color: string;
|
|
3341
|
-
width: number;
|
|
3342
|
-
editable: boolean;
|
|
3343
|
-
recentColors?: readonly string[];
|
|
3344
|
-
translate?: (key: string) => string;
|
|
3345
|
-
}
|
|
3346
|
-
/**
|
|
3347
|
-
* Controlled Insert tab state. Native viewers own the selections, every document
|
|
3348
|
-
* mutation, the file/shape/SmartArt/equation/hyperlink dialogs and history.
|
|
3349
|
-
*/
|
|
3350
|
-
interface RibbonInsertState {
|
|
3351
|
-
editable: boolean;
|
|
3352
|
-
/** A hyperlink always attaches to something, so Link tracks the selection. */
|
|
3353
|
-
hasSelection: boolean;
|
|
3354
|
-
/** The shape preset staged in the Shape picker. */
|
|
3355
|
-
shapeType: string;
|
|
3356
|
-
/** The chart entry staged in the Chart picker. */
|
|
3357
|
-
chartKind: string;
|
|
3358
|
-
/** The armed Freeform: Shape / Curve tool. */
|
|
3359
|
-
activeFreeformTool?: string | null;
|
|
3360
|
-
/** Visible Freeform tools; empty hides the buttons (host customization). */
|
|
3361
|
-
freeformTools?: readonly string[];
|
|
3362
|
-
/** Hosts without these capabilities hide the control instead of showing a dead one. */
|
|
3363
|
-
chartAvailable?: boolean;
|
|
3364
|
-
fieldAvailable?: boolean;
|
|
3365
|
-
headerFooterAvailable?: boolean;
|
|
3366
|
-
translate?: (key: string) => string;
|
|
3367
|
-
}
|
|
3368
|
-
/** One row of a menu or select; labels are translated by the view unless `label` is set. */
|
|
3369
|
-
interface RibbonHomeItem {
|
|
3370
|
-
readonly value: string;
|
|
3371
|
-
/** Ready-made text (a font family, a layout name); wins over `labelKey`. */
|
|
3372
|
-
readonly label?: string;
|
|
3373
|
-
readonly labelKey?: string;
|
|
3374
|
-
readonly fallback?: string;
|
|
3375
|
-
readonly description?: string;
|
|
3376
|
-
readonly descriptionKey?: string;
|
|
3377
|
-
/** Heading of the group this row opens; consecutive rows share one heading. */
|
|
3378
|
-
readonly group?: string;
|
|
3379
|
-
readonly groupKey?: string;
|
|
3380
|
-
readonly checked?: boolean;
|
|
3381
|
-
readonly disabled?: boolean;
|
|
3382
|
-
/** Preview typeface of a font row. */
|
|
3383
|
-
readonly fontFamily?: string;
|
|
3384
|
-
/** Shared artwork key shown before the label (a shape glyph or ribbon icon). */
|
|
3385
|
-
readonly icon?: string;
|
|
3386
|
-
/** Preserved test or automation hooks (`data-pptx-merge-op`, ...). */
|
|
3387
|
-
readonly attrs?: Readonly<Record<string, string>>;
|
|
3388
|
-
/** Draws a divider above the row. */
|
|
3389
|
-
readonly separator?: boolean;
|
|
3390
|
-
}
|
|
3391
|
-
interface RibbonHomeControlState {
|
|
3392
|
-
disabled?: boolean;
|
|
3393
|
-
/** Omit for ordinary commands; a boolean reflects `aria-pressed`. */
|
|
3394
|
-
pressed?: boolean;
|
|
3395
|
-
/** Reserved for hosts that mirror their own popover; shared popovers set it themselves. */
|
|
3396
|
-
expanded?: boolean;
|
|
3397
|
-
hidden?: boolean;
|
|
3398
|
-
/** Select, number, colour bar and checked menu row. */
|
|
3399
|
-
value?: string | number;
|
|
3400
|
-
/** Menu or select rows that replace the spec's static ones. */
|
|
3401
|
-
items?: readonly RibbonHomeItem[];
|
|
3402
|
-
/** Colour popover content; the trigger shows `value` in its bar. */
|
|
3403
|
-
colour?: RibbonHomeColourModel;
|
|
3404
|
-
/** Layout gallery content. */
|
|
3405
|
-
layouts?: RibbonHomeLayoutModel;
|
|
3406
|
-
/** Embedded gallery content. */
|
|
3407
|
-
gallery?: {
|
|
3408
|
-
descriptor: RibbonGalleryDescriptor | undefined;
|
|
3409
|
-
disabled?: boolean;
|
|
3410
|
-
};
|
|
3411
|
-
}
|
|
3412
|
-
interface RibbonHomeColourModel {
|
|
3413
|
-
/** The deck's theme colour map; the popover derives the theme palette from it. */
|
|
3414
|
-
themeColors?: Readonly<Record<string, string>>;
|
|
3415
|
-
/** Theme reference of the current colour (highlights its swatch). */
|
|
3416
|
-
selectedRef?: PptxThemeColorRef;
|
|
3417
|
-
/** Recently used colours, newest first. */
|
|
3418
|
-
recent?: readonly string[];
|
|
3419
|
-
}
|
|
3420
|
-
interface RibbonHomeLayoutModel {
|
|
3421
|
-
layouts: readonly {
|
|
3422
|
-
path: string;
|
|
3423
|
-
name: string;
|
|
3424
|
-
}[];
|
|
3425
|
-
/** Marks the active tile; omitted by New Slide. */
|
|
3426
|
-
current?: string;
|
|
3427
|
-
/** Artwork data by layout path; tiles render name-only until it arrives. */
|
|
3428
|
-
previews?: Readonly<Record<string, PptxLayoutPreview>> | ReadonlyMap<string, PptxLayoutPreview>;
|
|
3429
|
-
}
|
|
3430
|
-
/** State key of a control: its id, or `id#part` when several buttons share one id. */
|
|
3431
|
-
type RibbonHomeKey = RibbonControlId | `${RibbonControlId}#${string}`;
|
|
3432
|
-
interface RibbonHomeViewState {
|
|
3433
|
-
/** Missing entries are enabled, unpressed and visible. */
|
|
3434
|
-
controls: Readonly<Partial<Record<RibbonHomeKey, RibbonHomeControlState>>>;
|
|
3435
|
-
translate?: (key: string) => string;
|
|
3436
|
-
}
|
|
3437
|
-
/** Controlled View tab state. Native viewers own the values and every side effect. */
|
|
3438
|
-
interface RibbonViewState {
|
|
3439
|
-
editable: boolean;
|
|
3440
|
-
showRulers: boolean;
|
|
3441
|
-
showGrid: boolean;
|
|
3442
|
-
showGuides: boolean;
|
|
3443
|
-
snapToGrid: boolean;
|
|
3444
|
-
snapToShape: boolean;
|
|
3445
|
-
templateEditing: boolean;
|
|
3446
|
-
selectionPaneOpen?: boolean;
|
|
3447
|
-
eyedropperActive?: boolean;
|
|
3448
|
-
/** Hosts without these capabilities hide the control instead of showing a dead one. */
|
|
3449
|
-
selectionPaneAvailable?: boolean;
|
|
3450
|
-
eyedropperAvailable?: boolean;
|
|
3451
|
-
zoomAvailable?: boolean;
|
|
3452
|
-
translate?: (key: string) => string;
|
|
3453
|
-
}
|
|
3454
|
-
//#endregion
|
|
3455
|
-
//#region src/render/ribbon-transitions-state.d.ts
|
|
3456
|
-
type RibbonTransitionsTranslate = (key: string, params?: Record<string, string>) => string;
|
|
3457
|
-
/** Controlled Transitions tab state. The host derives it from the ACTIVE slide. */
|
|
3458
|
-
interface RibbonTransitionsViewState {
|
|
3459
|
-
draft: RibbonTransitionDraft;
|
|
3460
|
-
/** The slide's transition, used only to list and select the Sound entries. */
|
|
3461
|
-
transition?: PptxSlideTransition;
|
|
3462
|
-
editable: boolean;
|
|
3463
|
-
inspectorOpen?: boolean;
|
|
3464
|
-
translate?: RibbonTransitionsTranslate;
|
|
3465
|
-
}
|
|
3466
|
-
//#endregion
|
|
3467
|
-
//#region src/render/status-bar-state.d.ts
|
|
3468
|
-
/**
|
|
3469
|
-
* Shared model for the bottom status bar (`pptx-ui-status-bar`).
|
|
3470
|
-
*
|
|
3471
|
-
* The slide counter, save indicator, notes toggle, view-mode buttons and zoom
|
|
3472
|
-
* cluster were hand-built five times. The view owns the markup, pressed state
|
|
3473
|
-
* and gating; hosts own every effect (notes panel, view switching, zoom).
|
|
3474
|
-
*/
|
|
3475
|
-
type StatusBarTranslate = (key: string, params?: Record<string, string | number>) => string;
|
|
3476
|
-
type StatusBarSaveKind = 'idle' | 'saving' | 'error';
|
|
3477
|
-
type StatusBarViewMode = 'normal' | 'sorter' | 'slideShow';
|
|
3478
|
-
interface StatusBarViewState {
|
|
3479
|
-
slideCount: number;
|
|
3480
|
-
/** Zero-based active slide; clamped into range for display. */
|
|
3481
|
-
activeSlideIndex: number;
|
|
3482
|
-
/** Already-translated save indicator, see {@link resolveStatusBarSave}. */
|
|
3483
|
-
saveText: string;
|
|
3484
|
-
saveKind?: StatusBarSaveKind;
|
|
3485
|
-
/** Omit to hide the whole zoom cluster. */
|
|
3486
|
-
zoomPercent?: number;
|
|
3487
|
-
showNotes?: boolean;
|
|
3488
|
-
notesExpanded?: boolean;
|
|
3489
|
-
/** Default true. False drops the Normal / Sorter / Slide Show cluster. */
|
|
3490
|
-
showViewModes?: boolean;
|
|
3491
|
-
/** Default true. */
|
|
3492
|
-
showSorter?: boolean;
|
|
3493
|
-
/** Default true. */
|
|
3494
|
-
showSlideShow?: boolean;
|
|
3495
|
-
/** The pressed view button; omit when none is active. */
|
|
3496
|
-
viewMode?: StatusBarViewMode;
|
|
3497
|
-
translate?: StatusBarTranslate;
|
|
3498
|
-
}
|
|
3499
|
-
//#endregion
|
|
3500
|
-
//#region src/render/notes-toolbar-state.d.ts
|
|
3501
|
-
/**
|
|
3502
|
-
* Shared model for the speaker-notes formatting toolbar (`pptx-ui-notes-toolbar`).
|
|
3503
|
-
*
|
|
3504
|
-
* The toolbar owns the buttons, their order, icons, labels, enabled state and
|
|
3505
|
-
* the hyperlink popover. Hosts own the contenteditable editor, selection-based
|
|
3506
|
-
* edits, history, printing and persistence, and route typed intents to them.
|
|
3507
|
-
*/
|
|
3508
|
-
type NotesToolbarTranslate = (key: string, params?: Record<string, string | number>) => string;
|
|
3509
|
-
interface NotesToolbarViewState {
|
|
3510
|
-
/** True while the rich (contenteditable) surface is active. Drives the mode button label. */
|
|
3511
|
-
rich: boolean;
|
|
3512
|
-
/** Enables the formatting buttons. False in the plain editor, where they cannot act. */
|
|
3513
|
-
canFormat: boolean;
|
|
3514
|
-
/** Shows the Print button. */
|
|
3515
|
-
showPrint: boolean;
|
|
3516
|
-
/** Disables every button, for example while no slide is selected. */
|
|
3517
|
-
disabled?: boolean;
|
|
3518
|
-
/** Host translator; keys are the canonical `pptx.notes.*` set. Omitted: keys are shown. */
|
|
3519
|
-
translate?: NotesToolbarTranslate;
|
|
3520
|
-
}
|
|
3521
|
-
//#endregion
|
|
3522
|
-
//#region src/render/title-bar-state.d.ts
|
|
3523
|
-
type TitleBarTranslate = (key: string, params?: Record<string, string | number>) => string;
|
|
3524
|
-
type TitleBarPlacement = 'titleBar' | 'belowRibbon';
|
|
3525
|
-
type TitleBarTone = 'idle' | 'saving' | 'error';
|
|
3526
|
-
interface TitleBarAutosaveView {
|
|
3527
|
-
enabled: boolean;
|
|
3528
|
-
/** Default true. False renders the switch inert (host policy `autosave: false`). */
|
|
3529
|
-
toggleAvailable?: boolean;
|
|
3530
|
-
/** Translation key from `resolveTitleBarStatusKey`. */
|
|
3531
|
-
statusKey: string;
|
|
3532
|
-
/** Colour of the status text; only meaningful while `enabled`. */
|
|
3533
|
-
tone?: TitleBarTone;
|
|
3534
|
-
}
|
|
3535
|
-
interface TitleBarHistoryState {
|
|
3536
|
-
canUndo: boolean;
|
|
3537
|
-
canRedo: boolean;
|
|
3538
|
-
/** Description of the pending action, e.g. "Delete shape". */
|
|
3539
|
-
undoLabel?: string | null;
|
|
3540
|
-
redoLabel?: string | null;
|
|
3541
|
-
/** Default true. Maps to `hiddenActions: ['undo']`. */
|
|
3542
|
-
showUndo?: boolean;
|
|
3543
|
-
/** Default true. Maps to `hiddenActions: ['redo']`. */
|
|
3544
|
-
showRedo?: boolean;
|
|
3545
|
-
}
|
|
3546
|
-
interface TitleBarQuickAccessView {
|
|
3547
|
-
visible: boolean;
|
|
3548
|
-
position: QuickAccessPosition;
|
|
3549
|
-
showCommandLabels: boolean;
|
|
3550
|
-
/** Ordered catalog ids (File > Options > Quick Access Toolbar). */
|
|
3551
|
-
commandIds: readonly string[];
|
|
3552
|
-
}
|
|
3553
|
-
interface TitleBarViewState {
|
|
3554
|
-
/** Edit mode with an editable deck. Gates AutoSave, the strip, status and search. */
|
|
3555
|
-
editing: boolean;
|
|
3556
|
-
/** Whether the command search shows; hosts pass `editing`. */
|
|
3557
|
-
searchVisible: boolean;
|
|
3558
|
-
/** Display name; the translated default shows when empty. */
|
|
3559
|
-
fileName?: string;
|
|
3560
|
-
autosave: TitleBarAutosaveView;
|
|
3561
|
-
history: TitleBarHistoryState;
|
|
3562
|
-
/** Default true. */
|
|
3563
|
-
showSave?: boolean;
|
|
3564
|
-
quickAccess: TitleBarQuickAccessView;
|
|
3565
|
-
/** Search catalogue; defaults to the shared `COMMAND_SEARCH_ENTRIES`. */
|
|
3566
|
-
commands?: readonly CommandSearchEntry[];
|
|
3567
|
-
/** Default true. False drops the "Find in Slides" fallback row. */
|
|
3568
|
-
contentSearch?: boolean;
|
|
3569
|
-
/** ScreenTip rule (Options > General); returning undefined suppresses the title. */
|
|
3570
|
-
screenTip?: (label: string) => string | undefined;
|
|
3571
|
-
translate?: TitleBarTranslate;
|
|
3572
|
-
}
|
|
3573
|
-
//#endregion
|
|
3574
|
-
//#region src/web-components/theme-editor.d.ts
|
|
3575
|
-
interface PptxUiThemeEditorElement extends HTMLElement {
|
|
3576
|
-
theme: PptxTheme | undefined;
|
|
3577
|
-
labels: ThemeEditorLabels;
|
|
3578
|
-
disabled: boolean;
|
|
3579
|
-
}
|
|
3580
|
-
declare global {
|
|
3581
|
-
interface HTMLElementTagNameMap {
|
|
3582
|
-
'pptx-ui-theme-editor': PptxUiThemeEditorElement;
|
|
3583
|
-
}
|
|
3584
|
-
}
|
|
3585
|
-
/** One row of a context menu. Hosts decide `id`, wording, gating and what activation does. */
|
|
3586
|
-
interface ContextMenuViewItem {
|
|
3587
|
-
/** Stable command id, echoed by `menu-request`. */
|
|
3588
|
-
id: string;
|
|
3589
|
-
/** Already-translated visible label. */
|
|
3590
|
-
label: string;
|
|
3591
|
-
/** Draw a rule before this row. */
|
|
3592
|
-
separatorBefore?: boolean;
|
|
3593
|
-
/** Group heading shown before this row; the row and the ones after it join that group. */
|
|
3594
|
-
heading?: string;
|
|
3595
|
-
/** Destructive command (Delete): tinted. */
|
|
3596
|
-
danger?: boolean;
|
|
3597
|
-
/** Offered but unavailable: announced and drawn dim, skipped by arrow keys. */
|
|
3598
|
-
disabled?: boolean;
|
|
3599
|
-
/** A toggle (Grid and Guides, Ruler) in this state; omitted for one-shot commands. */
|
|
3600
|
-
checked?: boolean;
|
|
3601
|
-
}
|
|
3602
|
-
/** Everything the controlled element needs to draw one menu. */
|
|
3603
|
-
interface ContextMenuViewState {
|
|
3604
|
-
/** Pointer position, in viewport pixels. The element clamps it into the window. */
|
|
3605
|
-
x: number;
|
|
3606
|
-
y: number;
|
|
3607
|
-
/** Accessible name of the menu. */
|
|
3608
|
-
label: string;
|
|
3609
|
-
items: readonly ContextMenuViewItem[];
|
|
3610
|
-
/**
|
|
3611
|
-
* Test-hook attributes copied onto the host element (`data-pptx-context-menu`,
|
|
3612
|
-
* `data-pptx-canvas-context-menu`, ...). Only `data-pptx-*` names are accepted.
|
|
3613
|
-
*/
|
|
3614
|
-
markers?: readonly string[];
|
|
3615
|
-
/** Stacking order; defaults to {@link CONTEXT_MENU_EDITOR_LAYER}. */
|
|
3616
|
-
zIndex?: number;
|
|
3617
|
-
/** Move focus onto the first command on open. Default true. */
|
|
3618
|
-
autoFocus?: boolean;
|
|
3619
|
-
}
|
|
3620
|
-
interface PptxUiCompatToastsElement extends HTMLElement {
|
|
3621
|
-
state: CompatToastsViewState;
|
|
3622
|
-
}
|
|
3623
|
-
interface PptxUiDialogFooterElement extends HTMLElement {
|
|
3624
|
-
state: DialogFooterViewState;
|
|
3625
|
-
/** Move keyboard focus to an action, e.g. the primary one when a dialog opens. */
|
|
3626
|
-
focusAction(id: string): void;
|
|
3627
|
-
}
|
|
3628
|
-
interface PptxUiPasteOptionsElement extends HTMLElement {
|
|
3629
|
-
state: PasteOptionsViewState;
|
|
3630
|
-
}
|
|
3631
|
-
interface PptxUiReadOnlyBannerElement extends HTMLElement {
|
|
3632
|
-
state: ReadOnlyBannerViewState;
|
|
3633
|
-
}
|
|
3634
|
-
interface PptxUiContextMenuElement extends HTMLElement {
|
|
3635
|
-
state: ContextMenuViewState;
|
|
3636
|
-
}
|
|
3637
|
-
declare global {
|
|
3638
|
-
interface HTMLElementTagNameMap {
|
|
3639
|
-
'pptx-ui-compat-toasts': PptxUiCompatToastsElement;
|
|
3640
|
-
'pptx-ui-context-menu': PptxUiContextMenuElement;
|
|
3641
|
-
'pptx-ui-dialog-footer': PptxUiDialogFooterElement;
|
|
3642
|
-
'pptx-ui-paste-options': PptxUiPasteOptionsElement;
|
|
3643
|
-
'pptx-ui-read-only-banner': PptxUiReadOnlyBannerElement;
|
|
3644
|
-
}
|
|
3645
|
-
}
|
|
3646
|
-
interface PptxUiMobileBarElement extends HTMLElement {
|
|
3647
|
-
state: MobileBarViewState;
|
|
3648
|
-
}
|
|
3649
|
-
declare global {
|
|
3650
|
-
interface HTMLElementTagNameMap {
|
|
3651
|
-
'pptx-ui-mobile-bar': PptxUiMobileBarElement;
|
|
3652
|
-
}
|
|
3653
|
-
}
|
|
3654
|
-
interface PptxUiMobileToolbarElement extends HTMLElement {
|
|
3655
|
-
state: MobileToolbarViewState;
|
|
3656
|
-
}
|
|
3657
|
-
declare global {
|
|
3658
|
-
interface HTMLElementTagNameMap {
|
|
3659
|
-
'pptx-ui-mobile-toolbar': PptxUiMobileToolbarElement;
|
|
3660
|
-
}
|
|
3661
|
-
}
|
|
3662
|
-
interface PptxUiPresentToolbarElement extends HTMLElement {
|
|
3663
|
-
state: PresentToolbarViewState;
|
|
3664
|
-
/** Close an open colour palette, e.g. when the host auto-hides the bar. */
|
|
3665
|
-
closePalettes(): void;
|
|
3666
|
-
}
|
|
3667
|
-
declare global {
|
|
3668
|
-
interface HTMLElementTagNameMap {
|
|
3669
|
-
'pptx-ui-present-toolbar': PptxUiPresentToolbarElement;
|
|
3670
|
-
}
|
|
3671
|
-
}
|
|
3672
|
-
interface PptxUiPresenterConsoleElement extends HTMLElement {
|
|
3673
|
-
state: PresenterConsoleViewState;
|
|
3674
|
-
}
|
|
3675
|
-
declare global {
|
|
3676
|
-
interface HTMLElementTagNameMap {
|
|
3677
|
-
'pptx-ui-presenter-console': PptxUiPresenterConsoleElement;
|
|
3678
|
-
}
|
|
3679
|
-
}
|
|
3680
|
-
interface PptxUiRibbonAnimationsElement extends HTMLElement {
|
|
3681
|
-
state: RibbonAnimationsViewState;
|
|
3682
|
-
}
|
|
3683
|
-
declare global {
|
|
3684
|
-
interface HTMLElementTagNameMap {
|
|
3685
|
-
'pptx-ui-ribbon-animations': PptxUiRibbonAnimationsElement;
|
|
3686
|
-
}
|
|
3687
|
-
}
|
|
3688
|
-
interface PptxUiRibbonDrawElement extends HTMLElement {
|
|
3689
|
-
state: RibbonDrawViewState;
|
|
3690
|
-
}
|
|
3691
|
-
declare global {
|
|
3692
|
-
interface HTMLElementTagNameMap {
|
|
3693
|
-
'pptx-ui-ribbon-draw': PptxUiRibbonDrawElement;
|
|
3694
|
-
}
|
|
3695
|
-
}
|
|
3696
|
-
//#endregion
|
|
3697
|
-
//#region src/web-components/ribbon-home-layout.d.ts
|
|
3698
|
-
/**
|
|
3699
|
-
* Draws a layout's real artwork inside a tile's scaled surface. The artwork is
|
|
3700
|
-
* element rendering that each binding owns; return a disposer to release it.
|
|
3701
|
-
*/
|
|
3702
|
-
type HomeLayoutArtwork = (preview: PptxLayoutPreview, geometry: LayoutPreviewGeometry, container: HTMLElement) => (() => void) | void;
|
|
3703
|
-
interface PptxUiRibbonHomeElement extends HTMLElement {
|
|
3704
|
-
state: RibbonHomeViewState;
|
|
3705
|
-
/** Draws a layout's real artwork inside a gallery tile; the host owns element rendering. */
|
|
3706
|
-
layoutArtwork: HomeLayoutArtwork | undefined;
|
|
3707
|
-
/** Wrapper (or button) of a control id. */
|
|
3708
|
-
anchor(id: string): HTMLElement | undefined;
|
|
3709
|
-
}
|
|
3710
|
-
declare global {
|
|
3711
|
-
interface HTMLElementTagNameMap {
|
|
3712
|
-
'pptx-ui-ribbon-home-clipboard': PptxUiRibbonHomeElement;
|
|
3713
|
-
'pptx-ui-ribbon-home-font': PptxUiRibbonHomeElement;
|
|
3714
|
-
'pptx-ui-ribbon-home-paragraph': PptxUiRibbonHomeElement;
|
|
3715
|
-
'pptx-ui-ribbon-home-editing': PptxUiRibbonHomeElement;
|
|
3716
|
-
'pptx-ui-ribbon-home-slides': PptxUiRibbonHomeElement;
|
|
3717
|
-
'pptx-ui-ribbon-home-drawing': PptxUiRibbonHomeElement;
|
|
3718
|
-
'pptx-ui-ribbon-home-arrange-align': PptxUiRibbonHomeElement;
|
|
3719
|
-
'pptx-ui-ribbon-home-arrange-flip': PptxUiRibbonHomeElement;
|
|
3720
|
-
'pptx-ui-ribbon-home-arrange-order': PptxUiRibbonHomeElement;
|
|
3721
|
-
'pptx-ui-ribbon-home-arrange-edit': PptxUiRibbonHomeElement;
|
|
3722
|
-
'pptx-ui-ribbon-home-font-picker': PptxUiRibbonHomeElement;
|
|
3723
|
-
'pptx-ui-ribbon-home-arrange-painter': PptxUiRibbonHomeElement;
|
|
3724
|
-
'pptx-ui-ribbon-home-arrange-shape': PptxUiRibbonHomeElement;
|
|
3725
|
-
}
|
|
3726
|
-
}
|
|
3727
|
-
interface PptxUiRibbonTransitionsElement extends HTMLElement {
|
|
3728
|
-
state: RibbonTransitionsViewState;
|
|
3729
|
-
}
|
|
3730
|
-
declare global {
|
|
3731
|
-
interface HTMLElementTagNameMap {
|
|
3732
|
-
'pptx-ui-ribbon-transitions': PptxUiRibbonTransitionsElement;
|
|
3733
|
-
}
|
|
3734
|
-
}
|
|
3735
|
-
interface PptxUiRibbonInsertElement extends HTMLElement {
|
|
3736
|
-
state: RibbonInsertState;
|
|
3737
|
-
/** Return focus to a control by its public id, e.g. after a native dialog closes. */
|
|
3738
|
-
focusControl(id: string): void;
|
|
3739
|
-
}
|
|
3740
|
-
declare global {
|
|
3741
|
-
interface HTMLElementTagNameMap {
|
|
3742
|
-
'pptx-ui-ribbon-insert': PptxUiRibbonInsertElement;
|
|
3743
|
-
}
|
|
3744
|
-
}
|
|
3745
|
-
interface PptxUiRibbonViewElement extends HTMLElement {
|
|
3746
|
-
state: RibbonViewState;
|
|
3747
|
-
}
|
|
3748
|
-
declare global {
|
|
3749
|
-
interface HTMLElementTagNameMap {
|
|
3750
|
-
'pptx-ui-ribbon-view': PptxUiRibbonViewElement;
|
|
3751
|
-
}
|
|
3752
|
-
}
|
|
3753
|
-
//#endregion
|
|
3754
|
-
//#region src/web-components/ribbon-section.d.ts
|
|
3755
|
-
interface PptxUiRibbonSectionElement extends HTMLElement {
|
|
3756
|
-
groups: readonly RibbonGroupView[];
|
|
3757
|
-
}
|
|
3758
|
-
declare global {
|
|
3759
|
-
interface HTMLElementTagNameMap {
|
|
3760
|
-
'pptx-ui-ribbon-section': PptxUiRibbonSectionElement;
|
|
3761
|
-
}
|
|
3762
|
-
}
|
|
3763
|
-
//#endregion
|
|
3764
|
-
//#region src/web-components/ribbon-gallery.d.ts
|
|
3765
|
-
type GalleryTranslate = (key: string, params?: Readonly<Record<string, string | number>>) => string;
|
|
3766
|
-
interface PptxUiRibbonGalleryElement extends HTMLElement {
|
|
3767
|
-
readonly trigger: HTMLButtonElement;
|
|
3768
|
-
readonly popup: HTMLElement;
|
|
3769
|
-
descriptor: RibbonGalleryDescriptor | undefined;
|
|
3770
|
-
translateLabel: GalleryTranslate;
|
|
3771
|
-
disabled: boolean;
|
|
3772
|
-
open: boolean;
|
|
3773
|
-
close(): void;
|
|
3774
|
-
}
|
|
3775
|
-
declare global {
|
|
3776
|
-
interface HTMLElementTagNameMap {
|
|
3777
|
-
'pptx-ui-ribbon-gallery': PptxUiRibbonGalleryElement;
|
|
3778
|
-
}
|
|
3779
|
-
}
|
|
3780
|
-
//#endregion
|
|
3781
|
-
//#region src/web-components/subtitle-settings.d.ts
|
|
3782
|
-
interface PptxUiSubtitleSettingsElement extends HTMLElement {
|
|
3783
|
-
settings: SubtitleSettings;
|
|
3784
|
-
labels: SubtitleSettingsLabels;
|
|
3785
|
-
languageDisabled: boolean;
|
|
3786
|
-
}
|
|
3787
|
-
declare global {
|
|
3788
|
-
interface HTMLElementTagNameMap {
|
|
3789
|
-
'pptx-ui-subtitle-settings': PptxUiSubtitleSettingsElement;
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
interface PptxUiStatusBarElement extends HTMLElement {
|
|
3793
|
-
state: StatusBarViewState;
|
|
3794
|
-
}
|
|
3795
|
-
declare global {
|
|
3796
|
-
interface HTMLElementTagNameMap {
|
|
3797
|
-
'pptx-ui-status-bar': PptxUiStatusBarElement;
|
|
3798
|
-
}
|
|
3799
|
-
}
|
|
3800
|
-
interface PptxUiNotesToolbarElement extends HTMLElement {
|
|
3801
|
-
state: NotesToolbarViewState;
|
|
3802
|
-
}
|
|
3803
|
-
declare global {
|
|
3804
|
-
interface HTMLElementTagNameMap {
|
|
3805
|
-
'pptx-ui-notes-toolbar': PptxUiNotesToolbarElement;
|
|
3806
|
-
}
|
|
3807
|
-
}
|
|
3808
|
-
interface PptxUiTitleBarElement extends HTMLElement {
|
|
3809
|
-
state: TitleBarViewState | undefined;
|
|
3810
|
-
placement: TitleBarPlacement;
|
|
3811
|
-
}
|
|
3812
|
-
declare global {
|
|
3813
|
-
interface HTMLElementTagNameMap {
|
|
3814
|
-
'pptx-ui-title-bar': PptxUiTitleBarElement;
|
|
3815
|
-
}
|
|
3816
|
-
}
|
|
3817
|
-
//#endregion
|
|
3818
|
-
//#region src/web-components/select-value.d.ts
|
|
3819
|
-
/**
|
|
3820
|
-
* Public DOM shape of `pptx-ui-select`, used by every binding. The element is ooxml-ui's
|
|
3821
|
-
* `office-ui-select` under the pptx tag (see `office-aliases.ts`); it is not a native select.
|
|
3822
|
-
*/
|
|
3823
|
-
interface PptxUiSelectElement extends HTMLElement {
|
|
3824
|
-
value: string;
|
|
3825
|
-
disabled: boolean;
|
|
3826
|
-
readonly options: HTMLOptionElement[];
|
|
3827
|
-
selectedIndex: number;
|
|
3828
|
-
}
|
|
3829
|
-
declare global {
|
|
3830
|
-
interface HTMLElementTagNameMap {
|
|
3831
|
-
'pptx-ui-select': PptxUiSelectElement;
|
|
3832
|
-
}
|
|
3833
|
-
}
|
|
3834
|
-
//#endregion
|
|
3835
|
-
//#region src/render/slide-transition-cinematic.d.ts
|
|
3836
|
-
/**
|
|
3837
|
-
* Resolve a p15 cinematic transition to its CSS `animation` descriptors, or
|
|
3838
|
-
* `undefined` when the type is not a cinematic transition (so the caller can
|
|
3839
|
-
* fall through to the classic 2-D / p14 resolvers).
|
|
3840
|
-
*/
|
|
3841
|
-
declare function getCinematicTransitionAnimations(type: PptxTransitionType, durationMs: number, direction: string | undefined, orient?: string | undefined): SlideTransitionAnimations | undefined;
|
|
3842
|
-
/**
|
|
3843
|
-
* `@keyframes` backing every cinematic transition. Fold into the injected
|
|
3844
|
-
* aggregate (`SLIDE_TRANSITION_KEYFRAMES`) so these animate wherever it is
|
|
3845
|
-
* injected. `pptx-tr-fade-in` (reused by wind/fracture/airplane incoming) is
|
|
3846
|
-
* already defined in the core block, so it is intentionally not redefined here.
|
|
3847
|
-
*/
|
|
3848
|
-
declare const CINEMATIC_TRANSITION_KEYFRAMES: string;
|
|
3849
|
-
|
|
3850
8
|
//#region src/viewer/types-core.d.ts
|
|
3851
9
|
/**
|
|
3852
10
|
* Union of all shape preset types that the viewer can insert or render.
|
|
@@ -8326,5 +4484,5 @@ interface FragmentedTransitionLayerProps {
|
|
|
8326
4484
|
}
|
|
8327
4485
|
declare function FragmentedTransitionLayer({ layer, slide, templateElements, canvasSize, scale, zIndex, layerName }: FragmentedTransitionLayerProps): React$1.ReactElement;
|
|
8328
4486
|
|
|
8329
|
-
export {
|
|
8330
|
-
export type { AnnotationHandlersResult, AnnotationStroke, AutosaveStatus, CanvasInteractionHandlers,
|
|
4487
|
+
export { FragmentedTransitionLayer, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, SlideLayer, computeToolbarVisibility, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useClipboardHandlers, useCollaborativeHistory, useCollaborativeState, useComments, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport };
|
|
4488
|
+
export type { AnnotationHandlersResult, AnnotationStroke, AutosaveStatus, CanvasInteractionHandlers, CollaborationContextValue, ConnectionStatus, ContentLifecycleResult, DerivedElementState, DerivedSlideState, EditorHistoryInput, EditorHistoryResult, EditorOperationsResult, ElementManipulationHandlers, ElementOperations, ExportHandlersResult, ExportSaveAsResult, FragmentedTransitionLayerProps, IOHandlersResult, InsertElementHandlers, LayoutSwitchingResult, MergeShapesHandlerInput, MergeShapesHandlers, ModalDismissDrag, ModalDismissDragHandlers, MorphTransitionOverlayProps, PresentationSetupResult, PresentationTool, PresentationTransitionOverlayProps, PrintHandlersResult, PropertyHandlersResult, SectionOperations, SheetDismissDrag, SheetDismissDragHandlers, SlideLayerProps, SlideManagementHandlers, TableOperationHandlers, ThemeHandlersResult, ThemeSwitchingResult, ToolbarVisibility, UseAnimationPlaybackInput, UseAnimationPlaybackResult, UseAnnotationHandlersInput, UseAutosaveInput, UseAutosaveResult, UseBroadcastFollowerInput, UseCanvasInteractionsInput, UseCollaborativeHistoryInput, UseCollaborativeHistoryResult, UseCollaborativeStateInput, UseContentLifecycleInput, UseDerivedElementStateInput, UseDerivedSlideStateInput, UseDialogCustomShowsInput, UseDialogCustomShowsResult, UseEditorOperationsInput, UseElementManipulationInput, UseElementOperationsInput, UseExportHandlersInput, UseExportSaveAsInput, UseFollowModeInput, UseFollowModeResult, UseFontInjectionInput, UseIOHandlersInput, UseInsertElementsInput, UseIsMobileResult, UseKeyboardInsetsResult, UseKeyboardShortcutWiringInput, UseKeyboardShortcutsInput, UseLayoutSwitchingInput, UseLoadContentInput, UseLoadContentResult, UsePointerHandlersInput, UsePresenceTrackingInput, UsePresenceTrackingResult, UsePresentationAnnotationsResult, UsePresentationSetupInput, UsePresenterWindowInput, UsePresenterWindowResult, UsePrintHandlersInput, UsePropertyHandlersInput, UseRecoveryDetectionInput, UseReducedMotionResult, UseRehearsalTimingsInput, UseRehearsalTimingsResult, UseResizablePanelsResult, UseSectionOperationsInput, UseSerializeInput, UseSlideManagementInput, UseSlideNavigationInput, UseSlideNavigationResult, UseSwipeNavigationInput, UseSwipeNavigationResult, UseTableOperationsInput, UseThemeHandlersInput, UseThemeSwitchingInput, UseTouchGesturesInput, UseViewerBuildingBlocksInput, UseViewerCoreStateInput, UseViewerDialogsInput, UseViewerIntegrationInput, UseViewerOptionsResult, UseViewerStateInput, UseYjsDocumentSyncInput, UseYjsProviderInput, UseYjsProviderResult, UseZoomNavigationInput, UseZoomNavigationResult, UserPresence, ViewerBuildingBlocksResult, ViewerCoreState, ViewerDialogsResult, ViewerIntegrationResult, ViewerState, ViewerUIState, VirtualizedSlidesOptions, VirtualizedSlidesResult };
|