pptx-svelte-viewer 2.17.8 → 2.18.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 +4 -0
- package/dist/{AiChatPanel-CqrEXLmH.js → AiChatPanel-D6dfMwnT.js} +1 -1
- package/dist/{export-DxMXX_It.js → export-DbSAFc8m.js} +63641 -58874
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +166 -17
- package/dist/index.js +2 -2
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{translator-CZy5sxU0.js → translator-CZ12ZvlE.js} +20 -0
- package/dist/viewer/components/props-editing.d.ts +14 -0
- package/dist/viewer/components/props-editing.d.ts.map +1 -1
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts +13 -6
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts.map +1 -1
- package/dist/viewer/components/viewer-body-commits.d.ts +6 -0
- package/dist/viewer/components/viewer-body-commits.d.ts.map +1 -1
- package/dist/viewer/editor/context-menu-dispatch.d.ts.map +1 -1
- package/dist/viewer/editor/editor-adjust-gesture.d.ts +21 -0
- package/dist/viewer/editor/editor-adjust-gesture.d.ts.map +1 -0
- package/dist/viewer/editor/editor-arrange-ops.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller-wiring.d.ts +21 -0
- package/dist/viewer/editor/editor-controller-wiring.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller.svelte.d.ts +8 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-document-lifecycle.d.ts.map +1 -1
- package/dist/viewer/editor/editor-document-state.d.ts +16 -2
- package/dist/viewer/editor/editor-document-state.d.ts.map +1 -1
- package/dist/viewer/editor/editor-handle-handlers.d.ts +42 -0
- package/dist/viewer/editor/editor-handle-handlers.d.ts.map +1 -0
- package/dist/viewer/editor/editor-master-controller.d.ts +2 -0
- package/dist/viewer/editor/editor-master-controller.d.ts.map +1 -1
- package/dist/viewer/editor/editor-selection-gestures.d.ts +8 -1
- package/dist/viewer/editor/editor-selection-gestures.d.ts.map +1 -1
- package/dist/viewer/editor/editor-selection-interactivity.d.ts +43 -0
- package/dist/viewer/editor/editor-selection-interactivity.d.ts.map +1 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts +8 -1
- package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -1
- package/dist/viewer/editor/editor-state.svelte.d.ts +66 -2
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-transition-controller.d.ts +12 -0
- package/dist/viewer/editor/editor-transition-controller.d.ts.map +1 -1
- package/dist/viewer/editor/index.d.ts +9 -0
- package/dist/viewer/editor/index.d.ts.map +1 -1
- package/dist/viewer/editor/inline-text.d.ts.map +1 -1
- package/dist/viewer/editor/table-cell-pointer.d.ts +24 -0
- package/dist/viewer/editor/table-cell-pointer.d.ts.map +1 -0
- package/dist/viewer/editor/table-cell-selection.svelte.d.ts +51 -0
- package/dist/viewer/editor/table-cell-selection.svelte.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +463 -17
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/master/master-view.d.ts +8 -1
- package/dist/viewer/master/master-view.d.ts.map +1 -1
- package/dist/viewer/render/index.d.ts +2 -2
- package/dist/viewer/render/index.d.ts.map +1 -1
- package/dist/viewer/render/smartart-view.d.ts +6 -5
- package/dist/viewer/render/smartart-view.d.ts.map +1 -1
- package/dist/viewer/render/table-view.d.ts +6 -0
- package/dist/viewer/render/table-view.d.ts.map +1 -1
- package/dist/viewer/state/autosave.svelte.d.ts +9 -0
- package/dist/viewer/state/autosave.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
- package/dist/viewer/state/index.d.ts +2 -0
- package/dist/viewer/state/index.d.ts.map +1 -1
- package/dist/viewer/state/table-cell-selection-context.d.ts +20 -0
- package/dist/viewer/state/table-cell-selection-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/style/element-style.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -600,6 +600,15 @@ var n = {
|
|
|
600
600
|
"pptx.field.dateTime": "Date/Time",
|
|
601
601
|
"pptx.field.header": "Header",
|
|
602
602
|
"pptx.field.footer": "Footer",
|
|
603
|
+
"pptx.font.group.theme": "Theme fonts",
|
|
604
|
+
"pptx.font.group.embedded": "Embedded in this presentation",
|
|
605
|
+
"pptx.font.group.custom": "Added this session",
|
|
606
|
+
"pptx.font.group.all": "All fonts",
|
|
607
|
+
"pptx.font.role.heading": "Headings",
|
|
608
|
+
"pptx.font.role.body": "Body",
|
|
609
|
+
"pptx.layoutGallery.current": "Current layout",
|
|
610
|
+
"pptx.layoutGallery.loading": "Loading layouts",
|
|
611
|
+
"pptx.layoutGallery.empty": "No layouts available",
|
|
603
612
|
"pptx.master.master": "Master",
|
|
604
613
|
"pptx.master.layout": "Layout",
|
|
605
614
|
"pptx.master.noMasters": "No masters",
|
|
@@ -1212,6 +1221,8 @@ var n = {
|
|
|
1212
1221
|
"pptx.equation.update": "Update",
|
|
1213
1222
|
"pptx.fonts.embedDescription": "Embed fonts used in this presentation so they display correctly on other devices.",
|
|
1214
1223
|
"pptx.fonts.embedFonts": "Embed Fonts",
|
|
1224
|
+
"pptx.fonts.embedKeepsExisting": "Turning this off removes the embedded font data when you save.",
|
|
1225
|
+
"pptx.fonts.embedUnavailable": "This presentation carries no embedded font data, and font files cannot be read from your system, so there is nothing to embed.",
|
|
1215
1226
|
"pptx.fonts.embedded": "Embedded",
|
|
1216
1227
|
"pptx.fonts.enableEmbedding": "Enable font embedding",
|
|
1217
1228
|
"pptx.fonts.missingWarning": "{{count}} font(s) could not be found and will not be embedded.",
|
|
@@ -2876,6 +2887,15 @@ Item 3`,
|
|
|
2876
2887
|
"pptx.options.general.userName": "User name",
|
|
2877
2888
|
"pptx.options.general.userInitials": "Initials",
|
|
2878
2889
|
"pptx.options.general.appearance": "Viewer theme",
|
|
2890
|
+
"pptx.options.general.fonts": "Fonts",
|
|
2891
|
+
"pptx.options.general.fontsDescription": "Presentations sometimes use fonts your device does not have installed, and the viewer substitutes the closest available face. Adding the font file makes the deck render with the font it was written in.",
|
|
2892
|
+
"pptx.options.general.enableCustomFonts": "Let me add font files to this session",
|
|
2893
|
+
"pptx.options.general.enableCustomFontsInfo": "Added fonts are used for rendering and appear in the Home tab font list. They are held in memory only, are never uploaded or saved into the presentation, and are discarded when you reload the page.",
|
|
2894
|
+
"pptx.options.general.addFontFile": "Add font file",
|
|
2895
|
+
"pptx.options.general.customFontsAdded": "Fonts added this session",
|
|
2896
|
+
"pptx.options.general.customFontsEmpty": "No fonts added yet.",
|
|
2897
|
+
"pptx.options.general.customFontsDisabled": "Turn the setting above on to add a font file.",
|
|
2898
|
+
"pptx.options.general.customFontError": "That file could not be read as a font.",
|
|
2879
2899
|
"pptx.options.general.startup": "Start up options",
|
|
2880
2900
|
"pptx.options.general.showStartScreen": "Show the Start screen when this application starts",
|
|
2881
2901
|
"pptx.options.proofing.label": "Proofing",
|
|
@@ -3,6 +3,7 @@ import { ResizeHandleId, SnapLine } from 'pptx-viewer-shared';
|
|
|
3
3
|
import { ContextMenuCellTarget } from '../editor/context-menu-dispatch';
|
|
4
4
|
import { EditorController } from '../editor/editor-controller.svelte';
|
|
5
5
|
import { EditorMarqueeRect } from '../editor/editor-selection-gestures';
|
|
6
|
+
import { SelectionInteractivity } from '../editor/editor-selection-interactivity';
|
|
6
7
|
import { EditorState } from '../editor/editor-state.svelte';
|
|
7
8
|
import { OverlayBox } from '../editor/types';
|
|
8
9
|
/**
|
|
@@ -25,8 +26,21 @@ export interface SelectionOverlayProps {
|
|
|
25
26
|
selectionCount?: number;
|
|
26
27
|
/** In-progress empty-canvas marquee rectangle. */
|
|
27
28
|
marquee?: EditorMarqueeRect | null;
|
|
29
|
+
/**
|
|
30
|
+
* What the selection's authored `a:spLocks` still permit, plus the
|
|
31
|
+
* shape-adjustment descriptor. The overlay is handed an `OverlayBox`, never
|
|
32
|
+
* the element, so the element-level verdict is computed by the controller
|
|
33
|
+
* (`EditorController.interactivity`) and passed down as this prop; the
|
|
34
|
+
* component only maps it onto which chrome it draws.
|
|
35
|
+
*
|
|
36
|
+
* Defaults to fully interactive with no adjustment handle, which is what an
|
|
37
|
+
* unlocked non-round-rect resolves to.
|
|
38
|
+
*/
|
|
39
|
+
interactivity?: SelectionInteractivity;
|
|
28
40
|
onhandlepointerdown: (handle: ResizeHandleId, event: PointerEvent) => void;
|
|
29
41
|
onrotatepointerdown: (event: PointerEvent) => void;
|
|
42
|
+
/** Pointer-down on the amber shape-adjustment diamond. */
|
|
43
|
+
onadjustpointerdown?: (event: PointerEvent) => void;
|
|
30
44
|
}
|
|
31
45
|
/** Props for the inline (double-click) text editing surface. */
|
|
32
46
|
export interface InlineTextEditorProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props-editing.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/props-editing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD;;;;;GAKG;AAEH,gFAAgF;AAChF,MAAM,WAAW,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AAG,IAAI,CAAC;CACnC;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACvC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACpC,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RibbonTransitionPreset } from 'pptx-viewer-shared';
|
|
2
|
+
/**
|
|
3
|
+
* The Transitions tab's gallery, re-exported from `pptx-viewer-shared`.
|
|
4
|
+
*
|
|
5
|
+
* The list itself used to be a hand-copied array per binding, which is exactly
|
|
6
|
+
* how five galleries drift apart entry by entry. It now lives in
|
|
7
|
+
* `render/ribbon-transitions`; this module survives only so the existing
|
|
8
|
+
* `TRANSITION_PRESETS` / `DEFAULT_TRANSITION_DURATION_SEC` importers keep
|
|
9
|
+
* resolving, and must never grow a second source of truth.
|
|
10
|
+
*/
|
|
11
|
+
/** @deprecated Use `RibbonTransitionPreset` from `pptx-viewer-shared`. */
|
|
12
|
+
export type TransitionPreset = RibbonTransitionPreset;
|
|
2
13
|
/** Transition presets surfaced in the gallery (matches the `pptx.ribbon.transition.*` i18n keys). */
|
|
3
|
-
export
|
|
4
|
-
type: PptxTransitionType;
|
|
5
|
-
labelKey: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const TRANSITION_PRESETS: readonly TransitionPreset[];
|
|
14
|
+
export declare const TRANSITION_PRESETS: readonly RibbonTransitionPreset[];
|
|
8
15
|
/** Default duration (seconds) seeded into the Transitions tab's duration field. */
|
|
9
16
|
export declare const DEFAULT_TRANSITION_DURATION_SEC = 0.7;
|
|
10
17
|
//# sourceMappingURL=transition-presets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition-presets.d.ts","sourceRoot":"","sources":["../../../../../src/viewer/components/ribbon/transitions/transition-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"transition-presets.d.ts","sourceRoot":"","sources":["../../../../../src/viewer/components/ribbon/transitions/transition-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAMjE;;;;;;;;GAQG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEtD,qGAAqG;AACrG,eAAO,MAAM,kBAAkB,EAAE,SAAS,sBAAsB,EAA8B,CAAC;AAE/F,mFAAmF;AACnF,eAAO,MAAM,+BAA+B,MAAyC,CAAC"}
|
|
@@ -8,6 +8,12 @@ import { EditorState } from '../editor/editor-state.svelte';
|
|
|
8
8
|
* module rather than an SFC: the SFC only needs to know that editing is active,
|
|
9
9
|
* not how a SmartArt fill patch is shaped. Each reads `editor.activeElements`
|
|
10
10
|
* at call time, so the returned closures stay correct as the deck changes.
|
|
11
|
+
*
|
|
12
|
+
* Both SmartArt commits run the result through `reflowSmartArtData`, as React
|
|
13
|
+
* does: a node-style change clears the cached `dsp` drawing, and without the
|
|
14
|
+
* reflow the diagram silently dropped to the family approximation. The cached
|
|
15
|
+
* drawing still wins whenever it survives the edit (a text edit patches it in
|
|
16
|
+
* place), so the precedence between the two render paths is unchanged.
|
|
11
17
|
*/
|
|
12
18
|
export interface EditCommitHandlers {
|
|
13
19
|
commitTableCell(id: string, rowIndex: number, cellIndex: number, text: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer-body-commits.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/viewer-body-commits.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE
|
|
1
|
+
{"version":3,"file":"viewer-body-commits.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/viewer-body-commits.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,kBAAkB;IAClC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACrF,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACnE,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACnE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,kBAAkB,CAqCzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu-dispatch.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/context-menu-dispatch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"context-menu-dispatch.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/context-menu-dispatch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAc5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;;;;;;;;;GAiBG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,qBAAqB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB,2EAA2E;IAC3E,IAAI,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACpC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAcD,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,qBAAqB,GAAG,IAAI,CAa5F;AAiBD,iEAAiE;AACjE,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,uBAAuB,GAAG,gBAAgB,EAAE,CAwB/F;AA+ED,qFAAqF;AACrF,wBAAgB,qBAAqB,CACpC,EAAE,EAAE,oBAAoB,EACxB,IAAI,EAAE,uBAAuB,GAC3B,IAAI,CAmDN"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { ShapeAdjustmentHandleDescriptor } from 'pptx-viewer-shared';
|
|
3
|
+
export interface AdjustGestureDeps {
|
|
4
|
+
/** Stage scale (screen px per element px); the drag delta is un-scaled by it. */
|
|
5
|
+
getScale(): number;
|
|
6
|
+
/** First movement past the dead zone: push history, mark the interaction. */
|
|
7
|
+
onStart(): void;
|
|
8
|
+
/** Live frame: write the new adjustment map onto the element (no history). */
|
|
9
|
+
onPreview(elementId: string, adjustments: Record<string, number>): void;
|
|
10
|
+
/** Gesture finished. `moved` is false for a plain tap (no dead-zone exit). */
|
|
11
|
+
onEnd(moved: boolean): void;
|
|
12
|
+
}
|
|
13
|
+
export interface AdjustGestureController {
|
|
14
|
+
begin(element: PptxElement, descriptor: ShapeAdjustmentHandleDescriptor, event: PointerEvent): void;
|
|
15
|
+
isActive(): boolean;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
|
18
|
+
/** `element` with `adjustments` merged over its existing `a:avLst` values. */
|
|
19
|
+
export declare function withShapeAdjustments(element: PptxElement, adjustments: Record<string, number>): PptxElement;
|
|
20
|
+
export declare function createAdjustGestureController(deps: AdjustGestureDeps): AdjustGestureController;
|
|
21
|
+
//# sourceMappingURL=editor-adjust-gesture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-adjust-gesture.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-adjust-gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAA4B,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAwBpG,MAAM,WAAW,iBAAiB;IACjC,iFAAiF;IACjF,QAAQ,IAAI,MAAM,CAAC;IACnB,6EAA6E;IAC7E,OAAO,IAAI,IAAI,CAAC;IAChB,8EAA8E;IAC9E,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACxE,8EAA8E;IAC9E,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAuB;IACvC,KAAK,CACJ,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,+BAA+B,EAC3C,KAAK,EAAE,YAAY,GACjB,IAAI,CAAC;IACR,QAAQ,IAAI,OAAO,CAAC;IACpB,OAAO,IAAI,IAAI,CAAC;CAChB;AAyBD,8EAA8E;AAC9E,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,WAAW,CAGb;AAED,wBA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C,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAYjD;AAED,yGAAyG;AACzG,wBAAgB,cAAc,CAC7B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,YAAY,UAAQ,GAClB;IAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,IAAI,CAepD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PptxElement } from 'pptx-viewer-core';
|
|
2
2
|
import { SnapLine } from 'pptx-viewer-shared';
|
|
3
|
+
import { AdjustGestureController } from './editor-adjust-gesture';
|
|
3
4
|
import { EditorControllerDeps } from './editor-controller-deps';
|
|
4
5
|
import { GestureController } from './editor-gestures';
|
|
5
6
|
import { InkGestureController } from './editor-ink-gesture';
|
|
@@ -24,8 +25,28 @@ export interface EditorControllerHost {
|
|
|
24
25
|
/** The element currently open in the inline text editor, or null. */
|
|
25
26
|
getEditingId(): string | null;
|
|
26
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Drag a shape and the connectors glued to it must follow, exactly as they do
|
|
30
|
+
* in PowerPoint. The endpoint math is the shared `connector-reroute` model (one
|
|
31
|
+
* copy for all five bindings); this only decides WHEN it runs: once, at gesture
|
|
32
|
+
* end, over the ids the gesture actually moved.
|
|
33
|
+
*
|
|
34
|
+
* Deliberately NOT `commitActiveElements` and deliberately no `pushHistory`:
|
|
35
|
+
* the gesture's own `onStart` already pushed one history entry, so recording a
|
|
36
|
+
* second here would make every drag of a connected shape take two undos.
|
|
37
|
+
*/
|
|
38
|
+
export declare function rerouteConnectorsAfterGesture(host: EditorControllerHost, movedIds: Set<string>): void;
|
|
27
39
|
/** Move / resize / rotate gestures, including snapping and history bracketing. */
|
|
28
40
|
export declare function createTransformGestures(host: EditorControllerHost): GestureController;
|
|
41
|
+
/**
|
|
42
|
+
* The amber adjustment-diamond drag (round-rect corner radius).
|
|
43
|
+
*
|
|
44
|
+
* Bracketed exactly like the transform gestures: one `pushHistory` when the
|
|
45
|
+
* drag clears its dead zone, live frames straight onto the active elements
|
|
46
|
+
* (history-free, so a drag is not one undo step per frame), one `commitChange`
|
|
47
|
+
* at the end.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createAdjustGestures(host: EditorControllerHost): AdjustGestureController;
|
|
29
50
|
/** Pen / highlighter / eraser stroke gestures. */
|
|
30
51
|
export declare function createInkGestures(host: EditorControllerHost): InkGestureController;
|
|
31
52
|
/** The editing keymap (delete / duplicate / nudge / clipboard / undo / group / ...). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-controller-wiring.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-controller-wiring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-controller-wiring.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-controller-wiring.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,4EAA4E;IAC5E,eAAe,IAAI,WAAW,EAAE,CAAC;IACjC,iEAAiE;IACjE,YAAY,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IAC/C,8DAA8D;IAC9D,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;IACjD,qEAAqE;IACrE,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;CAC9B;AAQD;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAC5C,IAAI,EAAE,oBAAoB,EAC1B,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GACnB,IAAI,CAUN;AAED,kFAAkF;AAClF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,iBAAiB,CA8BrF;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,oBAAoB,GAAG,uBAAuB,CAwBxF;AAED,kDAAkD;AAClD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,oBAAoB,GAAG,oBAAoB,CAoBlF;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAmC9F;AAED,mEAAmE;AACnE,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,oBAAoB,GACxB,UAAU,CAAC,OAAO,gCAAgC,CAAC,CA0BrD"}
|
|
@@ -2,6 +2,7 @@ import { PptxElement } from 'pptx-viewer-core';
|
|
|
2
2
|
import { ResizeHandleId, SnapLine } from 'pptx-viewer-shared';
|
|
3
3
|
import { EditorControllerDeps } from './editor-controller-deps';
|
|
4
4
|
import { EditorMarqueeRect } from './editor-selection-gestures';
|
|
5
|
+
import { SelectionInteractivity } from './editor-selection-interactivity';
|
|
5
6
|
import { EditorState } from './editor-state.svelte';
|
|
6
7
|
export type { EditorControllerDeps } from './editor-controller-deps';
|
|
7
8
|
export declare class EditorController {
|
|
@@ -11,6 +12,12 @@ export declare class EditorController {
|
|
|
11
12
|
marquee: EditorMarqueeRect | null;
|
|
12
13
|
constructor(editor: EditorState, deps: EditorControllerDeps);
|
|
13
14
|
get overlayBox(): import('./types').OverlayBox | null;
|
|
15
|
+
/**
|
|
16
|
+
* Which selection chrome the authored `a:spLocks` still permit, plus the
|
|
17
|
+
* shape-adjustment descriptor. The overlay only ever sees an `OverlayBox`,
|
|
18
|
+
* so the element-level verdict is computed here and passed down as a prop.
|
|
19
|
+
*/
|
|
20
|
+
get interactivity(): SelectionInteractivity;
|
|
14
21
|
get editing(): boolean;
|
|
15
22
|
get selectionCount(): number;
|
|
16
23
|
get editingElement(): PptxElement | undefined;
|
|
@@ -23,6 +30,7 @@ export declare class EditorController {
|
|
|
23
30
|
onStageContextMenu: (event: MouseEvent) => void;
|
|
24
31
|
onHandlePointerDown: (handle: ResizeHandleId, event: PointerEvent) => void;
|
|
25
32
|
onRotatePointerDown: (event: PointerEvent) => void;
|
|
33
|
+
onAdjustPointerDown: (event: PointerEvent) => void;
|
|
26
34
|
onKeyDown: (event: KeyboardEvent) => void;
|
|
27
35
|
/** Open the inline text editor over `id` when the element carries text. */
|
|
28
36
|
enterInlineEdit(id: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-controller.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-controller.svelte.ts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,aAAa,KAAG,IAAI,CAEtC;IAEF,2EAA2E;IAC3E,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAYjC;;;OAGG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAI7C,qEAAqE;IACrE,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAO5C,wDAAwD;IACxD,WAAW,IAAI,IAAI;IAInB,sDAAsD;IACtD,OAAO,IAAI,IAAI;CAMf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-document-lifecycle.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-document-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;GASG;AAEH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B,MAAM,EAAE,SAAS,EAAE;IACnB,YAAY,CAAC,EAAE,eAAe,EAAE;IAChC,WAAW,CAAC,EAAE,eAAe;IAC7B,aAAa,CAAC,EAAE,iBAAiB;IACjC,QAAQ,CAAC,EAAE,WAAW,EAAE;IACxB,cAAc,CAAC,EAAE,kBAAkB;IACnC,aAAa,CAAC,EAAE,iBAAiB;IACjC,gBAAgB,CAAC,EAAE,kBAAkB,EAAE;IACvC,YAAY,CAAC,EAAE,gBAAgB;IAC/B,sBAAsB,CAAC,EAAE,0BAA0B;IACnD,WAAW,CAAC,EAAE,cAAc,EAAE;CAC9B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,gBAAgB,GAAG,IAAI,CA6BtF;AAED,2FAA2F;AAC3F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAS3D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAKrF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,cAAc,GAAG,SAAS,GAClC,IAAI,CAuBN;AAED,0EAA0E;AAC1E,wBAAgB,8BAA8B,CAC7C,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,kBAAkB,EAAE,GAC1B,IAAI,CASN;AAED,iFAAiF;AACjF,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,SAAS,iBAAiB,EAAE,GAChC,IAAI,CAUN;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,KAAK,EAAE,WAAW,EAClB,MAAM,GAAE,cAAuB,GAC7B,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"editor-document-lifecycle.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-document-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;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ED;;;;GAIG;AACH,wBAAsB,eAAe,CACpC,KAAK,EAAE,WAAW,EAClB,MAAM,GAAE,cAAuB,GAC7B,OAAO,CAAC,UAAU,CAAC,CAgBrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxHandoutMaster, PptxHeaderFooter, PptxHandler, PptxNotesMaster, PptxSaveFormat, PptxSection, PptxSlide, PptxSlideMaster, PptxPresentationProperties, PptxCustomShow, PptxTagCollection } from 'pptx-viewer-core';
|
|
2
|
-
import { TemplateElementMap } from 'pptx-viewer-shared';
|
|
2
|
+
import { DeckSaveIntent, TemplateElementMap } from 'pptx-viewer-shared';
|
|
3
3
|
export interface EditorSnapshot {
|
|
4
4
|
slides: PptxSlide[];
|
|
5
5
|
templateElementsBySlideId: TemplateElementMap;
|
|
@@ -17,5 +17,19 @@ export interface EditorSnapshot {
|
|
|
17
17
|
tagCollections: PptxTagCollection[];
|
|
18
18
|
}
|
|
19
19
|
export declare function createEditorSnapshot(snapshot: EditorSnapshot): EditorSnapshot;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Serialise a document snapshot to `.pptx` bytes.
|
|
22
|
+
*
|
|
23
|
+
* `saveIntent` carries the File > Info > Protect Presentation state: when it
|
|
24
|
+
* holds a password the deck goes through `saveEncrypted`, producing an OLE2
|
|
25
|
+
* compound file (`EncryptionInfo` + `EncryptedPackage`) instead of a plain ZIP.
|
|
26
|
+
* The choice is made by the shared `planDeckSave`, so all five bindings agree.
|
|
27
|
+
*
|
|
28
|
+
* `embedFonts` carries File > Fonts > "Embed fonts in the file" the same way:
|
|
29
|
+
* `false` strips `p:embeddedFontLst`, the `/font` relationships and the
|
|
30
|
+
* `.fntdata` parts, while `true` (core's default) re-embeds losslessly. Before
|
|
31
|
+
* this the toggle lived in `Ribbon.svelte`'s local `$state` and reached no save
|
|
32
|
+
* call at all, so the switch moved and the bytes were identical either way.
|
|
33
|
+
*/
|
|
34
|
+
export declare function saveEditorDocument(handler: PptxHandler, snapshot: EditorSnapshot, format?: PptxSaveFormat, saveIntent?: DeckSaveIntent | string | null, embedFonts?: boolean): Promise<Uint8Array>;
|
|
21
35
|
//# sourceMappingURL=editor-document-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-document-state.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-document-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-document-state.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-document-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,WAAW,EACX,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAS7E,MAAM,WAAW,cAAc;IAC9B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,yBAAyB,EAAE,kBAAkB,CAAC;IAC9C,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,WAAW,EAAE,eAAe,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC7C,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,sBAAsB,EAAE,0BAA0B,CAAC;IACnD,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,aAAa,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC7C,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;IACvC,uEAAuE;IACvE,cAAc,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAgB7E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,cAAc,EACxB,MAAM,GAAE,cAAuB,EAC/B,UAAU,CAAC,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI,EAC3C,UAAU,UAAO,GACf,OAAO,CAAC,UAAU,CAAC,CA6CrB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { ResizeHandleId } from 'pptx-viewer-shared';
|
|
3
|
+
import { AdjustGestureController } from './editor-adjust-gesture';
|
|
4
|
+
import { GestureController } from './editor-gestures';
|
|
5
|
+
import { SelectionInteractivity } from './editor-selection-interactivity';
|
|
6
|
+
/**
|
|
7
|
+
* The three pointer-downs that start on selection CHROME rather than on the
|
|
8
|
+
* slide: a resize handle, the rotate knob, and the amber shape-adjustment
|
|
9
|
+
* diamond.
|
|
10
|
+
*
|
|
11
|
+
* Each one re-checks the lock that governs it even though `SelectionOverlay`
|
|
12
|
+
* already hides the chrome it belongs to. Hiding a button is presentation; a
|
|
13
|
+
* synthetic pointerdown, an assistive click, or a frame rendered before the
|
|
14
|
+
* selection settled must all still be refused, and the guard belongs beside
|
|
15
|
+
* the gesture it guards rather than in the view.
|
|
16
|
+
*
|
|
17
|
+
* Extracted from `EditorController` so that class stays the event surface and
|
|
18
|
+
* both files stay within the repo's file-size budget.
|
|
19
|
+
*
|
|
20
|
+
* @module editor/editor-handle-handlers
|
|
21
|
+
*/
|
|
22
|
+
export interface HandleGestureHost {
|
|
23
|
+
/** The primary selected element's id, or null. */
|
|
24
|
+
getSelectedId(): string | null;
|
|
25
|
+
/** The primary selected element, or undefined. */
|
|
26
|
+
getSelectedElement(): PptxElement | undefined;
|
|
27
|
+
/** The collective lock verdict + adjustment descriptor for the selection. */
|
|
28
|
+
getInteractivity(): SelectionInteractivity;
|
|
29
|
+
/** Single-element move / resize / rotate driver. */
|
|
30
|
+
gestures: GestureController;
|
|
31
|
+
/** Collective (multi-selection) driver; returns false for a selection of one. */
|
|
32
|
+
beginCollectiveTransform(kind: 'move' | 'resize', event: PointerEvent, handle?: ResizeHandleId): boolean;
|
|
33
|
+
/** Shape-adjustment (`a:avLst`) driver. */
|
|
34
|
+
adjust: AdjustGestureController;
|
|
35
|
+
}
|
|
36
|
+
export interface HandleHandlers {
|
|
37
|
+
onHandlePointerDown(handle: ResizeHandleId, event: PointerEvent): void;
|
|
38
|
+
onRotatePointerDown(event: PointerEvent): void;
|
|
39
|
+
onAdjustPointerDown(event: PointerEvent): void;
|
|
40
|
+
}
|
|
41
|
+
export declare function createHandleHandlers(host: HandleGestureHost): HandleHandlers;
|
|
42
|
+
//# sourceMappingURL=editor-handle-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-handle-handlers.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-handle-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE/E;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,iBAAiB;IACjC,kDAAkD;IAClD,aAAa,IAAI,MAAM,GAAG,IAAI,CAAC;IAC/B,kDAAkD;IAClD,kBAAkB,IAAI,WAAW,GAAG,SAAS,CAAC;IAC9C,6EAA6E;IAC7E,gBAAgB,IAAI,sBAAsB,CAAC;IAC3C,oDAAoD;IACpD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,iFAAiF;IACjF,wBAAwB,CACvB,IAAI,EAAE,MAAM,GAAG,QAAQ,EACvB,KAAK,EAAE,YAAY,EACnB,MAAM,CAAC,EAAE,cAAc,GACrB,OAAO,CAAC;IACX,2CAA2C;IAC3C,MAAM,EAAE,uBAAuB,CAAC;CAChC;AAED,MAAM,WAAW,cAAc;IAC9B,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACvE,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/C,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;CAC/C;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,cAAc,CA6B5E"}
|
|
@@ -12,6 +12,8 @@ export declare class EditorMasterController {
|
|
|
12
12
|
enter(masterIndex?: number, layoutIndex?: number | null): void;
|
|
13
13
|
enterTab(tab: MasterViewTab): void;
|
|
14
14
|
exit(): void;
|
|
15
|
+
/** The document shape the shared master-view rules operate on. */
|
|
16
|
+
private document;
|
|
15
17
|
activeElements(): PptxElement[] | null;
|
|
16
18
|
replace(elements: PptxElement[]): boolean;
|
|
17
19
|
cloneMasters(): PptxSlideMaster[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-master-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-master-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-master-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-master-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAChC,GAAG,EAAE,aAAa,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,4EAA4E;AAC5E,qBAAa,sBAAsB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD,KAAK,CAAC,WAAW,SAAI,EAAE,WAAW,GAAE,MAAM,GAAG,IAAW,GAAG,IAAI;IAM/D,QAAQ,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IAWlC,IAAI,IAAI,IAAI;IAMZ,kEAAkE;IAClE,OAAO,CAAC,QAAQ;IAQhB,cAAc,IAAI,WAAW,EAAE,GAAG,IAAI;IAKtC,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO;IAwBzC,YAAY,IAAI,eAAe,EAAE;IAIjC,gBAAgB,IAAI,eAAe,GAAG,SAAS;IAI/C,kBAAkB,IAAI,iBAAiB,GAAG,SAAS;IAInD,uBAAuB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI;IASpD,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI;CA4BjD"}
|
|
@@ -9,9 +9,16 @@ export interface SelectionGestureDeps {
|
|
|
9
9
|
getStageRect(): DOMRect | undefined;
|
|
10
10
|
getElements(): readonly PptxElement[];
|
|
11
11
|
getSelectedIds(): readonly string[];
|
|
12
|
+
/**
|
|
13
|
+
* The selected ids a collective `interaction` may actually act on, with the
|
|
14
|
+
* locked members already dropped. Optional: without it the whole selection
|
|
15
|
+
* transforms, which is the pre-lock behaviour.
|
|
16
|
+
*/
|
|
17
|
+
getTransformIds?(interaction: 'move' | 'resize'): readonly string[];
|
|
12
18
|
onStart(): void;
|
|
13
19
|
onPatch(id: string, patch: ElementBoxPatch): void;
|
|
14
|
-
|
|
20
|
+
/** `movedIds` are the elements this gesture actually patched. */
|
|
21
|
+
onCommit(movedIds: readonly string[]): void;
|
|
15
22
|
onSelect(ids: readonly string[]): void;
|
|
16
23
|
onMarquee(rect: EditorMarqueeRect | null): void;
|
|
17
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-selection-gestures.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-selection-gestures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASpD,OAAO,KAAK,EAAkB,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACrD,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,IAAI,MAAM,CAAC;IACnB,YAAY,IAAI,OAAO,GAAG,SAAS,CAAC;IACpC,WAAW,IAAI,SAAS,WAAW,EAAE,CAAC;IACtC,cAAc,IAAI,SAAS,MAAM,EAAE,CAAC;IACpC,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAClD,QAAQ,
|
|
1
|
+
{"version":3,"file":"editor-selection-gestures.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-selection-gestures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASpD,OAAO,KAAK,EAAkB,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACrD,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,IAAI,MAAM,CAAC;IACnB,YAAY,IAAI,OAAO,GAAG,SAAS,CAAC;IACpC,WAAW,IAAI,SAAS,WAAW,EAAE,CAAC;IACtC,cAAc,IAAI,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,eAAe,CAAC,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,MAAM,EAAE,CAAC;IACpE,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAAC;IAClD,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;CAChD;AAiBD,iFAAiF;AACjF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,oBAAoB;wBA2FrD,YAAY,GAAG,IAAI;yBAalB,MAAM,GAAG,QAAQ,SAAS,YAAY,WAAW,cAAc,GAAG,OAAO;eAyBnF,IAAI;EAKhB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { ShapeAdjustmentHandleDescriptor } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* What the selection overlay is allowed to offer, given the authored
|
|
5
|
+
* `a:spLocks` on the selected element(s).
|
|
6
|
+
*
|
|
7
|
+
* The lock composition itself is NOT decided here: `canInteractWithElement` in
|
|
8
|
+
* `pptx-viewer-shared` is the one decision function all five bindings consult,
|
|
9
|
+
* and this module only folds its per-element verdict into the collective one an
|
|
10
|
+
* overlay drawn around N elements needs. Keeping it in a plain `.ts` module
|
|
11
|
+
* (rather than inside `EditorController` or the overlay SFC) keeps both of
|
|
12
|
+
* those within the repo's file-size budget and makes the rule unit-testable
|
|
13
|
+
* without a component mount.
|
|
14
|
+
*
|
|
15
|
+
* @module editor/editor-selection-interactivity
|
|
16
|
+
*/
|
|
17
|
+
/** The chrome the overlay may draw for the current selection. */
|
|
18
|
+
export interface SelectionInteractivity {
|
|
19
|
+
/** Draw (and honour) the eight resize handles. */
|
|
20
|
+
resizable: boolean;
|
|
21
|
+
/** Draw (and honour) the rotate stem + knob. */
|
|
22
|
+
rotatable: boolean;
|
|
23
|
+
/** The amber adjustment diamond, or null when there is none to draw. */
|
|
24
|
+
adjust: ShapeAdjustmentHandleDescriptor | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* What an unlocked, non-adjustable selection resolves to. The overlay's prop
|
|
28
|
+
* default, so a caller that does not pass a verdict gets the pre-lock chrome.
|
|
29
|
+
*/
|
|
30
|
+
export declare const DEFAULT_SELECTION_INTERACTIVITY: SelectionInteractivity;
|
|
31
|
+
/**
|
|
32
|
+
* The collective verdict for `elements`.
|
|
33
|
+
*
|
|
34
|
+
* A collective box takes the STRICTEST member: one pinned shape in a
|
|
35
|
+
* rubber-banded pair is enough to withdraw the resize handles, because a
|
|
36
|
+
* collective resize would otherwise silently skip it and distort the group.
|
|
37
|
+
* The adjustment diamond belongs to a single shape's own `a:avLst`, so it is
|
|
38
|
+
* only ever offered for a selection of one.
|
|
39
|
+
*/
|
|
40
|
+
export declare function selectionInteractivity(elements: readonly PptxElement[]): SelectionInteractivity;
|
|
41
|
+
/** May a pointer-down on `element` arm a move gesture? */
|
|
42
|
+
export declare function canMoveElement(element: PptxElement | undefined): boolean;
|
|
43
|
+
//# sourceMappingURL=editor-selection-interactivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-selection-interactivity.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-selection-interactivity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAG1E;;;;;;;;;;;;;GAaG;AAEH,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACtC,kDAAkD;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,MAAM,EAAE,+BAA+B,GAAG,IAAI,CAAC;CAC/C;AAKD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,sBAI7C,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,sBAAsB,CAS/F;AAED,0DAA0D;AAC1D,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAExE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PptxLayoutOption } from 'pptx-viewer-core';
|
|
1
|
+
import { PptxLayoutOption, PptxLayoutPreview } from 'pptx-viewer-core';
|
|
2
2
|
import { SlideTemplateBuildOptions, SlideTemplateId } from 'pptx-viewer-shared';
|
|
3
3
|
import { EditorState } from './editor-state.svelte';
|
|
4
4
|
/**
|
|
@@ -33,6 +33,13 @@ export declare class EditorSlidesController {
|
|
|
33
33
|
* deck is loaded. Backs the Home tab's Layout dropdown (React parity).
|
|
34
34
|
*/
|
|
35
35
|
availableLayouts(): Promise<PptxLayoutOption[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Artwork thumbnails for the New Slide / Layout galleries, keyed by path.
|
|
38
|
+
*
|
|
39
|
+
* A method rather than state: parsing every layout part is only worth doing
|
|
40
|
+
* once a gallery is opened, and core memoises the result.
|
|
41
|
+
*/
|
|
42
|
+
layoutPreviews(): Promise<ReadonlyMap<string, PptxLayoutPreview>>;
|
|
36
43
|
/** Re-map the current slide onto `layoutPath`. Returns its index, or null when not editable. */
|
|
37
44
|
applyLayout(layoutPath: string): Promise<number | null>;
|
|
38
45
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-slides-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-slides-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-slides-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-slides-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;GAOG;AACH,qBAAa,sBAAsB;;gBAGtB,MAAM,EAAE,WAAW;IAI/B,oGAAoG;IACpG,uBAAuB,IAAI,MAAM,GAAG,IAAI;IAYxC;;;;;;;OAOG;IACH,uBAAuB,CACtB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,yBAA8B,GACrC,MAAM,GAAG,IAAI;IAchB,qFAAqF;IACrF,qBAAqB,IAAI,MAAM,GAAG,IAAI;IAkBtC,mGAAmG;IACnG,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAiBnC;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQrD;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IASvE,gGAAgG;IAC1F,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAyB7D;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQ1C,uFAAuF;IACvF,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAY5D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxElement, PptxHandoutMaster, PptxHeaderFooter, PptxHandler, PptxNotesMaster, PptxSaveFormat, PptxSection, PptxSlide, PptxSlideMaster, PptxPresentationProperties, PptxCustomShow, PptxTagCollection, TextSegment } from 'pptx-viewer-core';
|
|
2
|
-
import { ElementClipboardPayload, TemplateElementMap } from 'pptx-viewer-shared';
|
|
1
|
+
import { PptxAppProperties, PptxCoreProperties, PptxCustomProperty, PptxElement, PptxHandoutMaster, PptxHeaderFooter, PptxHandler, PptxNotesMaster, PptxSaveFormat, PptxSection, PptxSlide, PptxSlideMaster, PptxTheme, PptxPresentationProperties, PptxCustomShow, PptxTagCollection, TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
import { DeckSaveIntent, ElementClipboardPayload, FontEmbeddingDescriptor, TemplateElementMap } from 'pptx-viewer-shared';
|
|
3
3
|
import { EditorAnimationController } from './editor-animation-controller';
|
|
4
4
|
import { EditorArrangeController } from './editor-arrange-controller';
|
|
5
5
|
import { EditorBackgroundController } from './editor-background-controller';
|
|
@@ -20,6 +20,7 @@ import { EditorSlidesController } from './editor-slides-controller';
|
|
|
20
20
|
import { EditorTemplateController } from './editor-template-controller';
|
|
21
21
|
import { EditorTransitionController } from './editor-transition-controller';
|
|
22
22
|
import { ZOrderDirection } from './editor-zorder';
|
|
23
|
+
import { TableCellSelection } from './table-cell-selection.svelte';
|
|
23
24
|
export interface EditorStateDeps {
|
|
24
25
|
getCurrent(): number;
|
|
25
26
|
getHandler(): PptxHandler | null;
|
|
@@ -43,13 +44,52 @@ export declare class EditorState {
|
|
|
43
44
|
* carried through the undo snapshot and re-emitted on save.
|
|
44
45
|
*/
|
|
45
46
|
tagCollections: PptxTagCollection[];
|
|
47
|
+
/**
|
|
48
|
+
* The deck's active theme, kept here so the Home tab's font dropdown can
|
|
49
|
+
* lead with the theme fonts. Set by the viewer once a deck is loaded;
|
|
50
|
+
* deliberately outside {@link EditorSnapshot} because it is not content the
|
|
51
|
+
* undo stack owns.
|
|
52
|
+
*/
|
|
53
|
+
theme: PptxTheme | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Families the deck embeds, offered as their own font-dropdown group. Write
|
|
56
|
+
* through {@link adoptEmbeddedFontFamilies} so {@link embedFonts} is reseeded
|
|
57
|
+
* with them.
|
|
58
|
+
*/
|
|
59
|
+
embeddedFontFamilies: readonly string[];
|
|
60
|
+
/**
|
|
61
|
+
* File > Fonts > "Embed fonts in the file". Session state like
|
|
62
|
+
* {@link savePassword}, not document content, so undo never restores it.
|
|
63
|
+
* Seeded from the loaded deck (see {@link adoptEmbeddedFontFamilies}): a deck
|
|
64
|
+
* that arrived with embedded fonts keeps them on save, so the switch has to
|
|
65
|
+
* start "on" or turning it off would be the only way to describe what save
|
|
66
|
+
* already does. Read by `saveEditorDocument`.
|
|
67
|
+
*/
|
|
68
|
+
embedFonts: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Families the user registered from a local font file this session
|
|
71
|
+
* (File > Options > Fonts, off by default). Session state, never persisted:
|
|
72
|
+
* the font binary is the user's, not ours to store.
|
|
73
|
+
*/
|
|
74
|
+
customFontFamilies: readonly string[];
|
|
46
75
|
masterViewTarget: MasterViewTarget | null;
|
|
47
76
|
readonly selection: EditorSelection;
|
|
77
|
+
/** The block of table cells marquee'd inside the selected table, if any. */
|
|
78
|
+
readonly tableCells: TableCellSelection;
|
|
48
79
|
editable: boolean;
|
|
49
80
|
dirty: boolean;
|
|
50
81
|
editTemplateMode: boolean;
|
|
51
82
|
interactionActive: boolean;
|
|
52
83
|
clipboard: ElementClipboardPayload | null;
|
|
84
|
+
/**
|
|
85
|
+
* File ▸ Info ▸ Protect Presentation state. Deliberately NOT part of
|
|
86
|
+
* {@link EditorSnapshot}: the secret is session state, not document content,
|
|
87
|
+
* so undo must never restore or clear it. {@link saveIntent} feeds it to the
|
|
88
|
+
* shared `planDeckSave`, which routes a protected save through
|
|
89
|
+
* `saveEncrypted` (an OLE2 container) instead of `save` (a plain ZIP).
|
|
90
|
+
*/
|
|
91
|
+
passwordProtected: boolean;
|
|
92
|
+
savePassword: string | null;
|
|
53
93
|
/** Undo/redo stack; the `canUndo` / `canRedo` getters below mirror it. */
|
|
54
94
|
readonly history: EditorHistoryState;
|
|
55
95
|
readonly clipboardOps: EditorClipboardController;
|
|
@@ -87,6 +127,15 @@ export declare class EditorState {
|
|
|
87
127
|
applyRemoteSlides(slides: PptxSlide[]): void;
|
|
88
128
|
reset(): void;
|
|
89
129
|
select(id: string | null): void;
|
|
130
|
+
/** The element with `id` on the surface the pointer acts on, or undefined. */
|
|
131
|
+
elementById(id: string): PptxElement | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* May the pointer act on `id` at all? Two gates, both of which must pass:
|
|
134
|
+
* the template rule (an inherited master/layout node is inert unless
|
|
135
|
+
* edit-template mode is on) and the element's own authored `a:spLocks`. The
|
|
136
|
+
* lock half was missing entirely, which is why a `noSelect` shape from a
|
|
137
|
+
* real deck was as selectable and draggable as any other.
|
|
138
|
+
*/
|
|
90
139
|
isElementInteractive(id: string): boolean;
|
|
91
140
|
setTemplateEditing(enabled: boolean): void;
|
|
92
141
|
/** Apply the File > Options "maximum number of undos" value. */
|
|
@@ -107,6 +156,21 @@ export declare class EditorState {
|
|
|
107
156
|
commitSlides(next: PptxSlide[]): void;
|
|
108
157
|
/** A deep clone of the whole editable document (one undo entry, or save input). */
|
|
109
158
|
snapshot(): EditorSnapshot;
|
|
159
|
+
/**
|
|
160
|
+
* Adopt the families a freshly loaded deck embeds, and reseed
|
|
161
|
+
* {@link embedFonts} to the position that describes the file save would write
|
|
162
|
+
* right now. Deliberately not an undo step: the parsed font list is not a
|
|
163
|
+
* user edit.
|
|
164
|
+
*/
|
|
165
|
+
adoptEmbeddedFontFamilies(families: readonly string[]): void;
|
|
166
|
+
/** How File > Fonts should render its toggle for the loaded deck. */
|
|
167
|
+
get fontEmbedding(): FontEmbeddingDescriptor;
|
|
168
|
+
/** The Protect-Presentation state every save path hands to `planDeckSave`. */
|
|
169
|
+
saveIntent(): DeckSaveIntent;
|
|
170
|
+
/** File ▸ Info ▸ Protect Presentation: arm password encryption for saves. */
|
|
171
|
+
setSavePassword(password: string): void;
|
|
172
|
+
/** File ▸ Info ▸ Protect Presentation: back to saving in the clear. */
|
|
173
|
+
clearSavePassword(): void;
|
|
110
174
|
deleteSelected: () => void;
|
|
111
175
|
duplicateSelected: () => string | null;
|
|
112
176
|
applyElementPatch: (id: string, patch: Partial<PptxElement>) => void;
|