pptx-svelte-viewer 0.5.1 → 0.7.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 +21 -0
- package/README.md +9 -6
- package/dist/{component-B4CAjgjO.js → component-BkXbcmvL.js} +22670 -18164
- package/dist/i18n/context.d.ts +20 -0
- package/dist/i18n/context.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/translator.d.ts +30 -0
- package/dist/i18n/translator.d.ts.map +1 -0
- package/dist/i18n.d.ts +56 -62
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +765 -605
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -2
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/{translator-nTmCzaSH.js → translator-BTU8751A.js} +1 -1
- package/dist/viewer/collab/collaboration-dialogs.svelte.d.ts +31 -0
- package/dist/viewer/collab/collaboration-dialogs.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-presence-effects.svelte.d.ts +9 -0
- package/dist/viewer/collab/collaboration-presence-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-presence.svelte.d.ts +20 -0
- package/dist/viewer/collab/collaboration-presence.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-provider.d.ts +35 -0
- package/dist/viewer/collab/collaboration-provider.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts +12 -0
- package/dist/viewer/collab/collaboration-remote-sync.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-session.d.ts +24 -0
- package/dist/viewer/collab/collaboration-session.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration-status.d.ts +14 -0
- package/dist/viewer/collab/collaboration-status.d.ts.map +1 -0
- package/dist/viewer/collab/collaboration.svelte.d.ts +55 -0
- package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -0
- package/dist/viewer/collab/components/props.d.ts +79 -0
- package/dist/viewer/collab/components/props.d.ts.map +1 -0
- package/dist/viewer/collab/components/share-helpers.d.ts +29 -0
- package/dist/viewer/collab/components/share-helpers.d.ts.map +1 -0
- package/dist/viewer/collab/index.d.ts +15 -0
- package/dist/viewer/collab/index.d.ts.map +1 -0
- package/dist/viewer/component.d.ts +13 -0
- package/dist/viewer/component.d.ts.map +1 -0
- package/dist/viewer/components/index.d.ts +7 -0
- package/dist/viewer/components/index.d.ts.map +1 -0
- package/dist/viewer/components/props.d.ts +185 -0
- package/dist/viewer/components/props.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/animations/animation-categories.d.ts +10 -0
- package/dist/viewer/components/ribbon/animations/animation-categories.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/design/theme-swatches.d.ts +16 -0
- package/dist/viewer/components/ribbon/design/theme-swatches.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/insert/shape-glyphs.d.ts +8 -0
- package/dist/viewer/components/ribbon/insert/shape-glyphs.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-tabs.d.ts +17 -0
- package/dist/viewer/components/ribbon/ribbon-tabs.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts +67 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts +10 -0
- package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts.map +1 -0
- package/dist/viewer/editor/editing-api.d.ts +20 -0
- package/dist/viewer/editor/editing-api.d.ts.map +1 -0
- package/dist/viewer/editor/editor-animation-controller.d.ts +25 -0
- package/dist/viewer/editor/editor-animation-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-arrange-controller.d.ts +24 -0
- package/dist/viewer/editor/editor-arrange-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-arrange-ops.d.ts +28 -0
- package/dist/viewer/editor/editor-arrange-ops.d.ts.map +1 -0
- package/dist/viewer/editor/editor-background-controller.d.ts +21 -0
- package/dist/viewer/editor/editor-background-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-clipboard-controller.d.ts +18 -0
- package/dist/viewer/editor/editor-clipboard-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-clipboard.d.ts +20 -0
- package/dist/viewer/editor/editor-clipboard.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller-geometry.d.ts +8 -0
- package/dist/viewer/editor/editor-controller-geometry.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts +43 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-element-controller.d.ts +21 -0
- package/dist/viewer/editor/editor-element-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-equation-controller.svelte.d.ts +12 -0
- package/dist/viewer/editor/editor-equation-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-find-replace.svelte.d.ts +39 -0
- package/dist/viewer/editor/editor-find-replace.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-format-mutations.d.ts +39 -0
- package/dist/viewer/editor/editor-format-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-format-painter-controller.svelte.d.ts +13 -0
- package/dist/viewer/editor/editor-format-painter-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-geometry.d.ts +29 -0
- package/dist/viewer/editor/editor-geometry.d.ts.map +1 -0
- package/dist/viewer/editor/editor-gestures.d.ts +48 -0
- package/dist/viewer/editor/editor-gestures.d.ts.map +1 -0
- package/dist/viewer/editor/editor-ink-controller.svelte.d.ts +59 -0
- package/dist/viewer/editor/editor-ink-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-ink-gesture.d.ts +37 -0
- package/dist/viewer/editor/editor-ink-gesture.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-action-button.d.ts +13 -0
- package/dist/viewer/editor/editor-insert-action-button.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-chart.d.ts +10 -0
- package/dist/viewer/editor/editor-insert-chart.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-equation.d.ts +5 -0
- package/dist/viewer/editor/editor-insert-equation.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-field.d.ts +17 -0
- package/dist/viewer/editor/editor-insert-field.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-media.d.ts +10 -0
- package/dist/viewer/editor/editor-insert-media.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert-smart-art.d.ts +8 -0
- package/dist/viewer/editor/editor-insert-smart-art.d.ts.map +1 -0
- package/dist/viewer/editor/editor-insert.d.ts +40 -0
- package/dist/viewer/editor/editor-insert.d.ts.map +1 -0
- package/dist/viewer/editor/editor-keyboard.d.ts +31 -0
- package/dist/viewer/editor/editor-keyboard.d.ts.map +1 -0
- package/dist/viewer/editor/editor-master-controller.d.ts +17 -0
- package/dist/viewer/editor/editor-master-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-mutations.d.ts +59 -0
- package/dist/viewer/editor/editor-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-paragraph-mutations.d.ts +10 -0
- package/dist/viewer/editor/editor-paragraph-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-selection-gestures.d.ts +24 -0
- package/dist/viewer/editor/editor-selection-gestures.d.ts.map +1 -0
- package/dist/viewer/editor/editor-selection.svelte.d.ts +32 -0
- package/dist/viewer/editor/editor-selection.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-slide-ops.d.ts +23 -0
- package/dist/viewer/editor/editor-slide-ops.d.ts.map +1 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts +22 -0
- package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts +102 -0
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-template-controller.d.ts +12 -0
- package/dist/viewer/editor/editor-template-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-text-extra-mutations.d.ts +18 -0
- package/dist/viewer/editor/editor-text-extra-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/editor-transition-controller.d.ts +22 -0
- package/dist/viewer/editor/editor-transition-controller.d.ts.map +1 -0
- package/dist/viewer/editor/editor-zorder.d.ts +16 -0
- package/dist/viewer/editor/editor-zorder.d.ts.map +1 -0
- package/dist/viewer/editor/element-hit.d.ts +17 -0
- package/dist/viewer/editor/element-hit.d.ts.map +1 -0
- package/dist/viewer/editor/index.d.ts +45 -0
- package/dist/viewer/editor/index.d.ts.map +1 -0
- package/dist/viewer/editor/inline-text.d.ts +36 -0
- package/dist/viewer/editor/inline-text.d.ts.map +1 -0
- package/dist/viewer/editor/types.d.ts +12 -0
- package/dist/viewer/editor/types.d.ts.map +1 -0
- package/dist/viewer/export/export-controller.svelte.d.ts +77 -0
- package/dist/viewer/export/export-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/export/export-gif.d.ts +42 -0
- package/dist/viewer/export/export-gif.d.ts.map +1 -0
- package/dist/viewer/export/export-print.d.ts +55 -0
- package/dist/viewer/export/export-print.d.ts.map +1 -0
- package/dist/viewer/export/export-ui.svelte.d.ts +45 -0
- package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -0
- package/dist/viewer/export/export-video.d.ts +56 -0
- package/dist/viewer/export/export-video.d.ts.map +1 -0
- package/dist/viewer/export/export-wiring.svelte.d.ts +35 -0
- package/dist/viewer/export/export-wiring.svelte.d.ts.map +1 -0
- package/dist/viewer/export/exporting-api.d.ts +19 -0
- package/dist/viewer/export/exporting-api.d.ts.map +1 -0
- package/dist/viewer/export/index.d.ts +16 -0
- package/dist/viewer/export/index.d.ts.map +1 -0
- package/dist/viewer/export/rasterize-slide.d.ts +44 -0
- package/dist/viewer/export/rasterize-slide.d.ts.map +1 -0
- package/dist/viewer/export/render-to-canvas.d.ts +15 -0
- package/dist/viewer/export/render-to-canvas.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +7536 -7597
- package/dist/viewer/index.d.ts.map +1 -0
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/master/master-view.d.ts +7 -0
- package/dist/viewer/master/master-view.d.ts.map +1 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts +57 -0
- package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts +8 -0
- package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -0
- package/dist/viewer/presentation/index.d.ts +10 -0
- package/dist/viewer/presentation/index.d.ts.map +1 -0
- package/dist/viewer/presentation/keyframes.d.ts +3 -0
- package/dist/viewer/presentation/keyframes.d.ts.map +1 -0
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts +69 -0
- package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -0
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts +31 -0
- package/dist/viewer/presentation/presentation-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/presentation-swipe.d.ts +11 -0
- package/dist/viewer/presentation-swipe.d.ts.map +1 -0
- package/dist/viewer/render/chart-view.d.ts +35 -0
- package/dist/viewer/render/chart-view.d.ts.map +1 -0
- package/dist/viewer/render/contentpart-view.d.ts +24 -0
- package/dist/viewer/render/contentpart-view.d.ts.map +1 -0
- package/dist/viewer/render/index.d.ts +25 -0
- package/dist/viewer/render/index.d.ts.map +1 -0
- package/dist/viewer/render/ink-view.d.ts +25 -0
- package/dist/viewer/render/ink-view.d.ts.map +1 -0
- package/dist/viewer/render/media-view.d.ts +17 -0
- package/dist/viewer/render/media-view.d.ts.map +1 -0
- package/dist/viewer/render/model3d-view.d.ts +16 -0
- package/dist/viewer/render/model3d-view.d.ts.map +1 -0
- package/dist/viewer/render/ole-view.d.ts +44 -0
- package/dist/viewer/render/ole-view.d.ts.map +1 -0
- package/dist/viewer/render/smart-art-3d-view.d.ts +18 -0
- package/dist/viewer/render/smart-art-3d-view.d.ts.map +1 -0
- package/dist/viewer/render/smartart-view.d.ts +54 -0
- package/dist/viewer/render/smartart-view.d.ts.map +1 -0
- package/dist/viewer/render/table-view.d.ts +39 -0
- package/dist/viewer/render/table-view.d.ts.map +1 -0
- package/dist/viewer/render/zoom-view.d.ts +18 -0
- package/dist/viewer/render/zoom-view.d.ts.map +1 -0
- package/dist/viewer/state/autosave.svelte.d.ts +61 -0
- package/dist/viewer/state/autosave.svelte.d.ts.map +1 -0
- package/dist/viewer/state/fullscreen.d.ts +16 -0
- package/dist/viewer/state/fullscreen.d.ts.map +1 -0
- package/dist/viewer/state/index.d.ts +9 -0
- package/dist/viewer/state/index.d.ts.map +1 -0
- package/dist/viewer/state/layout-state.svelte.d.ts +30 -0
- package/dist/viewer/state/layout-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/loader-helpers.d.ts +27 -0
- package/dist/viewer/state/loader-helpers.d.ts.map +1 -0
- package/dist/viewer/state/navigation.d.ts +26 -0
- package/dist/viewer/state/navigation.d.ts.map +1 -0
- package/dist/viewer/state/presentation-loader.svelte.d.ts +41 -0
- package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -0
- package/dist/viewer/state/render-context.d.ts +9 -0
- package/dist/viewer/state/render-context.d.ts.map +1 -0
- package/dist/viewer/state/smart-art-3d-context.d.ts +22 -0
- package/dist/viewer/state/smart-art-3d-context.d.ts.map +1 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts +31 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewer-state.svelte.d.ts +36 -0
- package/dist/viewer/state/viewer-state.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewport-handlers.d.ts +24 -0
- package/dist/viewer/state/viewport-handlers.d.ts.map +1 -0
- package/dist/viewer/style/connector-label.d.ts +13 -0
- package/dist/viewer/style/connector-label.d.ts.map +1 -0
- package/dist/viewer/style/css.d.ts +13 -0
- package/dist/viewer/style/css.d.ts.map +1 -0
- package/dist/viewer/style/element-style.d.ts +26 -0
- package/dist/viewer/style/element-style.d.ts.map +1 -0
- package/dist/viewer/style/index.d.ts +5 -0
- package/dist/viewer/style/index.d.ts.map +1 -0
- package/dist/viewer/style/merge-3d.d.ts +10 -0
- package/dist/viewer/style/merge-3d.d.ts.map +1 -0
- package/dist/viewer/style/text-style.d.ts +4 -0
- package/dist/viewer/style/text-style.d.ts.map +1 -0
- package/dist/viewer/types.d.ts +189 -0
- package/dist/viewer/types.d.ts.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { PptxElement, PptxSlide, TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
import { CanvasSize, RenderParagraph, ResizeHandleId, SnapLine } from 'pptx-viewer-shared';
|
|
3
|
+
import { EditorController } from '../editor/editor-controller.svelte';
|
|
4
|
+
import { EditorMarqueeRect } from '../editor/editor-selection-gestures';
|
|
5
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
6
|
+
import { OverlayBox } from '../editor/types';
|
|
7
|
+
import { ExportUiState } from '../export/export-ui.svelte';
|
|
8
|
+
import { AutosaveStatus } from '../state/autosave.svelte';
|
|
9
|
+
/**
|
|
10
|
+
* Prop contracts for the internal viewer components. Kept in a plain `.ts`
|
|
11
|
+
* module (not inside the SFCs) per repo convention: SFCs stay thin
|
|
12
|
+
* presentation, logic and types live in lintable TypeScript files.
|
|
13
|
+
*/
|
|
14
|
+
/** Props shared by every element-level renderer. */
|
|
15
|
+
export interface ElementRendererProps {
|
|
16
|
+
element: PptxElement;
|
|
17
|
+
mediaDataUrls: Map<string, string>;
|
|
18
|
+
zIndex: number;
|
|
19
|
+
/**
|
|
20
|
+
* True only on the live presentation stage (the viewer's fullscreen
|
|
21
|
+
* surface): media elements should then autoplay, as PowerPoint does when a
|
|
22
|
+
* slide with media becomes active, rather than waiting for a manual click.
|
|
23
|
+
* Defaults to `false` (the main windowed canvas and thumbnail rail never
|
|
24
|
+
* autoplay).
|
|
25
|
+
*/
|
|
26
|
+
presenting?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* True only on the main (interactive) canvas, never the thumbnail rail.
|
|
29
|
+
* Marks the rendered root node with `data-pptx-element="true"` (the
|
|
30
|
+
* framework-neutral e2e test hook React/Vue/Angular also emit) for the
|
|
31
|
+
* element types that render their own wrapper directly (group, text/shape).
|
|
32
|
+
* Defaults to `false`.
|
|
33
|
+
*/
|
|
34
|
+
interactive?: boolean;
|
|
35
|
+
/** Whether inherited layout/master nodes participate in pointer editing. */
|
|
36
|
+
editTemplateMode?: boolean;
|
|
37
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface TextBlockProps {
|
|
40
|
+
paragraphs: RenderParagraph[];
|
|
41
|
+
/** Inline `style` string for the text block wrapper. */
|
|
42
|
+
textStyle: string;
|
|
43
|
+
}
|
|
44
|
+
export interface SlideStageProps {
|
|
45
|
+
slide: PptxSlide | undefined;
|
|
46
|
+
canvasSize: CanvasSize;
|
|
47
|
+
mediaDataUrls: Map<string, string>;
|
|
48
|
+
scale?: number;
|
|
49
|
+
/** Forwarded to each `ElementRenderer`; see `ElementRendererProps.presenting`. */
|
|
50
|
+
presenting?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* True only for the main (interactive) canvas, never the thumbnail rail.
|
|
53
|
+
* Adds `role="region" aria-roledescription="slide"` to the stage itself
|
|
54
|
+
* (the framework-neutral e2e hook React/Vue/Angular also emit) and is
|
|
55
|
+
* forwarded to each `ElementRenderer`; see `ElementRendererProps.interactive`.
|
|
56
|
+
*/
|
|
57
|
+
interactive?: boolean;
|
|
58
|
+
editTemplateMode?: boolean;
|
|
59
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
60
|
+
}
|
|
61
|
+
export interface ViewerToolbarProps {
|
|
62
|
+
/** Active slide (0-based). */
|
|
63
|
+
current: number;
|
|
64
|
+
total: number;
|
|
65
|
+
/** Currently-effective zoom percent (rounded). */
|
|
66
|
+
zoomPercent: number;
|
|
67
|
+
isFullscreen: boolean;
|
|
68
|
+
onprev: () => void;
|
|
69
|
+
onnext: () => void;
|
|
70
|
+
onzoomin: () => void;
|
|
71
|
+
onzoomout: () => void;
|
|
72
|
+
onzoomfit: () => void;
|
|
73
|
+
onfullscreen: () => void;
|
|
74
|
+
/** Whether the Notes toggle button is shown (host has a notes panel). */
|
|
75
|
+
showNotes?: boolean;
|
|
76
|
+
/** Whether the notes panel is currently expanded (drives the pressed state). */
|
|
77
|
+
notesExpanded?: boolean;
|
|
78
|
+
onnotestoggle?: () => void;
|
|
79
|
+
/** Show the editing action group (Undo / Redo / Save). Default false. */
|
|
80
|
+
editable?: boolean;
|
|
81
|
+
/** Whether an undo step is available (drives the Undo button's disabled state). */
|
|
82
|
+
canUndo?: boolean;
|
|
83
|
+
/** Whether a redo step is available (drives the Redo button's disabled state). */
|
|
84
|
+
canRedo?: boolean;
|
|
85
|
+
/** Whether there are unsaved edits (drives the Save button's emphasis). */
|
|
86
|
+
dirty?: boolean;
|
|
87
|
+
onundo?: () => void;
|
|
88
|
+
onredo?: () => void;
|
|
89
|
+
onsave?: () => void;
|
|
90
|
+
ondownload?: () => void;
|
|
91
|
+
/**
|
|
92
|
+
* Autosave lifecycle status; when set (host opted into `autosave`) a small
|
|
93
|
+
* status pill renders in the editing group. Omit to hide the pill entirely.
|
|
94
|
+
*/
|
|
95
|
+
autosaveStatus?: AutosaveStatus;
|
|
96
|
+
/** Whether there are unsaved autosave edits (drives the pill's "dirty" tone). */
|
|
97
|
+
autosaveDirty?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Export menu state (PNG / PDF / GIF / video / print). When set, the
|
|
100
|
+
* toolbar renders the `ExportMenu` dropdown in its right-hand group,
|
|
101
|
+
* matching the export affordance the React/Vue/Angular chrome exposes.
|
|
102
|
+
* Omit to hide the menu (e.g. while no presentation is loaded).
|
|
103
|
+
*/
|
|
104
|
+
exportUi?: ExportUiState;
|
|
105
|
+
/** Opens the Share (collaboration) dialog. Omit to hide the button. */
|
|
106
|
+
onshare?: () => void;
|
|
107
|
+
/** Opens the Broadcast dialog. Omit to hide the button. */
|
|
108
|
+
onbroadcast?: () => void;
|
|
109
|
+
/** Whether a collaboration session is currently active (highlights the Share button). */
|
|
110
|
+
collabActive?: boolean;
|
|
111
|
+
}
|
|
112
|
+
/** Props for the selection overlay (box + 8 resize handles + rotate handle). */
|
|
113
|
+
export interface SelectionOverlayProps {
|
|
114
|
+
/** Selection box in element (unscaled slide) px, or null to hide it. */
|
|
115
|
+
box: OverlayBox | null;
|
|
116
|
+
/** Stage scale (screen px per element px) applied when positioning. */
|
|
117
|
+
scale: number;
|
|
118
|
+
/** Transient snap-alignment lines (element px). */
|
|
119
|
+
snapLines: readonly SnapLine[];
|
|
120
|
+
/** Hide the box/handles while the inline text editor is open. */
|
|
121
|
+
editing?: boolean;
|
|
122
|
+
/** Number of selected elements; collective boxes do not expose rotation. */
|
|
123
|
+
selectionCount?: number;
|
|
124
|
+
/** In-progress empty-canvas marquee rectangle. */
|
|
125
|
+
marquee?: EditorMarqueeRect | null;
|
|
126
|
+
onhandlepointerdown: (handle: ResizeHandleId, event: PointerEvent) => void;
|
|
127
|
+
onrotatepointerdown: (event: PointerEvent) => void;
|
|
128
|
+
}
|
|
129
|
+
/** Props for the inline (double-click) text editing surface. */
|
|
130
|
+
export interface InlineTextEditorProps {
|
|
131
|
+
/** The element being edited (seeds the initial text + font hints). */
|
|
132
|
+
element: PptxElement;
|
|
133
|
+
/** The element's box in element px (positioning). */
|
|
134
|
+
box: OverlayBox;
|
|
135
|
+
/** Stage scale (screen px per element px). */
|
|
136
|
+
scale: number;
|
|
137
|
+
/** Called with the edited plain text on commit (only when it changed). */
|
|
138
|
+
oncommit: (text: string) => void;
|
|
139
|
+
/** Called after the surface closes (commit or cancel). */
|
|
140
|
+
onclose: () => void;
|
|
141
|
+
}
|
|
142
|
+
/** Props for the editing layer (selection overlay + inline editor over the stage). */
|
|
143
|
+
export interface EditorLayerProps {
|
|
144
|
+
/** The reactive editing orchestrator (owns overlay/snap/inline state). */
|
|
145
|
+
controller: EditorController;
|
|
146
|
+
/** Stage scale (screen px per element px). */
|
|
147
|
+
scale: number;
|
|
148
|
+
}
|
|
149
|
+
/** Position and callbacks for the editable element context menu. */
|
|
150
|
+
export interface ElementContextMenuProps {
|
|
151
|
+
x: number;
|
|
152
|
+
y: number;
|
|
153
|
+
editor: EditorState;
|
|
154
|
+
onclose: () => void;
|
|
155
|
+
}
|
|
156
|
+
export interface ThumbnailRailProps {
|
|
157
|
+
slides: PptxSlide[];
|
|
158
|
+
canvasSize: CanvasSize;
|
|
159
|
+
mediaDataUrls: Map<string, string>;
|
|
160
|
+
current: number;
|
|
161
|
+
onselect: (index: number) => void;
|
|
162
|
+
/** Enables native thumbnail drag-and-drop slide reordering. */
|
|
163
|
+
editable?: boolean;
|
|
164
|
+
onmove?: (fromIndex: number, toIndex: number) => void;
|
|
165
|
+
}
|
|
166
|
+
export interface NotesPanelProps {
|
|
167
|
+
/** Active slide; the panel reads/edits its plain-text speaker notes. */
|
|
168
|
+
slide: PptxSlide | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* Whether the panel body is expanded. Controlled by the host so the
|
|
171
|
+
* toolbar's Notes toggle and the panel's own header stay in sync.
|
|
172
|
+
*/
|
|
173
|
+
expanded?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Called with the committed plain-text notes (on `change` / `blur`) when
|
|
176
|
+
* the user edits the textarea. This binding has no built-in slide-mutation
|
|
177
|
+
* channel, so omit this to render a read-only panel; when provided, the
|
|
178
|
+
* host is responsible for writing the text back onto the slide. Mirrors
|
|
179
|
+
* the Vue notes panel's plain-text `update` emit contract.
|
|
180
|
+
*/
|
|
181
|
+
onupdate?: (notes: string, segments?: TextSegment[]) => void;
|
|
182
|
+
/** Called when the header is clicked to expand/collapse the panel. */
|
|
183
|
+
ontoggle?: () => void;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhG,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;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D;;;;GAIG;AAEH,oDAAoD;AACpD,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,KACR,IAAI,CAAC;CACV;AAED,MAAM,WAAW,cAAc;IAC9B,UAAU,EA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'pptx-viewer-core';
|
|
2
|
+
import { AnimationGroup } from 'pptx-viewer-shared';
|
|
3
|
+
/** One preset-gallery category: label key, group bucket, and its preset catalogue. */
|
|
4
|
+
export interface AnimationCategory {
|
|
5
|
+
group: AnimationGroup;
|
|
6
|
+
labelKey: string;
|
|
7
|
+
presets: readonly PptxAnimationPreset[];
|
|
8
|
+
}
|
|
9
|
+
export declare const ANIMATION_CATEGORIES: readonly AnimationCategory[];
|
|
10
|
+
//# sourceMappingURL=animation-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation-categories.d.ts","sourceRoot":"","sources":["../../../../../src/viewer/components/ribbon/animations/animation-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOzD,sFAAsF;AACtF,MAAM,WAAW,iBAAiB;IACjC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACxC;AAED,eAAO,MAAM,oBAAoB,EAAE,SAAS,iBAAiB,EAI5D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ViewerTheme } from 'pptx-viewer-shared';
|
|
2
|
+
/**
|
|
3
|
+
* The Design tab's theme-preset gallery: swaps the viewer chrome's
|
|
4
|
+
* `ViewerTheme` (light/dark "vermilion", see `pptx-viewer-shared/theme/presets.ts`),
|
|
5
|
+
* not PowerPoint's own deck colour-scheme/design-theme system (that machinery
|
|
6
|
+
* exists in `pptx-viewer-core` as `THEME_PRESETS` / `applyThemeToData` but is a
|
|
7
|
+
* separate, much larger surface this tab intentionally does not build; see the
|
|
8
|
+
* vanilla binding's Design tab for the same scoping note). `theme: undefined`
|
|
9
|
+
* resets to the viewer's built-in default.
|
|
10
|
+
*/
|
|
11
|
+
export interface ThemeSwatch {
|
|
12
|
+
labelKey: string;
|
|
13
|
+
theme: ViewerTheme | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare const THEME_SWATCHES: readonly ThemeSwatch[];
|
|
16
|
+
//# sourceMappingURL=theme-swatches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme-swatches.d.ts","sourceRoot":"","sources":["../../../../../src/viewer/components/ribbon/design/theme-swatches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;CAC/B;AAED,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAIhD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ShapePresetGlyph } from 'pptx-viewer-shared';
|
|
2
|
+
/** The SVG path `d` string for a catalogue glyph. */
|
|
3
|
+
export declare function shapeGlyphPath(glyph: ShapePresetGlyph): string;
|
|
4
|
+
/** Whether the glyph should render as a stroked line (vs a filled/outlined shape). */
|
|
5
|
+
export declare function isStrokeGlyph(glyph: ShapePresetGlyph): boolean;
|
|
6
|
+
/** Convert the catalogue's Tailwind-flavoured `glyphClass` token to a CSS `transform`. */
|
|
7
|
+
export declare function glyphClassToTransform(glyphClass: string): string;
|
|
8
|
+
//# sourceMappingURL=shape-glyphs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-glyphs.d.ts","sourceRoot":"","sources":["../../../../../src/viewer/components/ribbon/insert/shape-glyphs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAuB3D,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAE9D;AAED,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAE9D;AAED,0FAA0F;AAC1F,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAehE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ribbon's tab registry. Mirrors React's `TOOLBAR_SECTIONS`
|
|
3
|
+
* (`packages/react/src/viewer/constants/toolbar.ts`) tab order and i18n keys,
|
|
4
|
+
* and lists the tabs this binding currently renders content for. Add a tab by
|
|
5
|
+
* appending one entry here plus one `<Tab>.svelte` component wired into
|
|
6
|
+
* `Ribbon.svelte`'s pane switch.
|
|
7
|
+
*/
|
|
8
|
+
export type RibbonTabId = 'file' | 'home' | 'insert' | 'draw' | 'design' | 'transitions' | 'animations' | 'slideShow' | 'review' | 'view';
|
|
9
|
+
export interface RibbonTabDef {
|
|
10
|
+
id: RibbonTabId;
|
|
11
|
+
/** Shared i18n dictionary key (`pptx.ribbon.tab.*`), same keys React uses. */
|
|
12
|
+
labelKey: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const RIBBON_TABS: readonly RibbonTabDef[];
|
|
15
|
+
export declare const DEFAULT_RIBBON_TAB: RibbonTabId;
|
|
16
|
+
export declare function isRibbonTab(id: string): id is RibbonTabId;
|
|
17
|
+
//# sourceMappingURL=ribbon-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ribbon-tabs.d.ts","sourceRoot":"","sources":["../../../../src/viewer/components/ribbon/ribbon-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACpB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,MAAM,CAAC;AAEV,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,WAAW,CAAC;IAChB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,YAAY,EAW9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,WAAoB,CAAC;AAEtD,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,WAAW,CAEzD"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { CanvasSize, ViewerTheme } from 'pptx-viewer-shared';
|
|
3
|
+
import { FindReplaceState } from '../../editor/editor-find-replace.svelte';
|
|
4
|
+
import { EditorState } from '../../editor/editor-state.svelte';
|
|
5
|
+
import { ExportUiState } from '../../export/export-ui.svelte';
|
|
6
|
+
import { AutosaveStatus } from '../../state/autosave.svelte';
|
|
7
|
+
/**
|
|
8
|
+
* Prop contracts for the ribbon shell and its tabs. Kept in a plain `.ts`
|
|
9
|
+
* module per repo convention: SFCs stay thin presentation, types live in
|
|
10
|
+
* lintable TypeScript files.
|
|
11
|
+
*/
|
|
12
|
+
export interface RibbonProps {
|
|
13
|
+
/** History-tracked editor state; Home/Insert tab groups read/write it directly. */
|
|
14
|
+
editor: EditorState;
|
|
15
|
+
/** Reactive Find & Replace panel state, owned by the host so it can navigate the viewer. */
|
|
16
|
+
findReplace: FindReplaceState;
|
|
17
|
+
/** Slide canvas size (px); the Insert tab centres new charts/media/SmartArt/etc. on it. */
|
|
18
|
+
canvasSize: CanvasSize;
|
|
19
|
+
/** Compact nav row (always visible): active slide (0-based) / total. */
|
|
20
|
+
current: number;
|
|
21
|
+
total: number;
|
|
22
|
+
onprev: () => void;
|
|
23
|
+
onnext: () => void;
|
|
24
|
+
/** Move the viewer to a specific slide index (the Home tab's Slides group). */
|
|
25
|
+
onnavigateslide: (index: number) => void;
|
|
26
|
+
/** Primary row: undo/redo/save/download + autosave pill. */
|
|
27
|
+
canUndo: boolean;
|
|
28
|
+
canRedo: boolean;
|
|
29
|
+
dirty: boolean;
|
|
30
|
+
onundo: () => void;
|
|
31
|
+
onredo: () => void;
|
|
32
|
+
onsave: () => void;
|
|
33
|
+
ondownload: () => void;
|
|
34
|
+
autosaveStatus?: AutosaveStatus;
|
|
35
|
+
autosaveDirty?: boolean;
|
|
36
|
+
/** Collaboration entry points, kept in the primary row like React's chrome. */
|
|
37
|
+
onshare?: () => void;
|
|
38
|
+
onbroadcast?: () => void;
|
|
39
|
+
collabActive?: boolean;
|
|
40
|
+
/** Slide Show tab actions: enter presentation from slide 0 or the current slide. */
|
|
41
|
+
onfrombeginning: () => void;
|
|
42
|
+
onfromcurrent: () => void;
|
|
43
|
+
/** Review tab: presentation-wide accessibility audit and issue navigation. */
|
|
44
|
+
slides: readonly PptxSlide[];
|
|
45
|
+
onnavigatetoissue: (slideIndex: number, elementId?: string) => void;
|
|
46
|
+
/** View tab: zoom / fullscreen / notes toggle. */
|
|
47
|
+
zoomPercent: number;
|
|
48
|
+
onzoomin: () => void;
|
|
49
|
+
onzoomout: () => void;
|
|
50
|
+
onzoomfit: () => void;
|
|
51
|
+
isFullscreen: boolean;
|
|
52
|
+
onfullscreen: () => void;
|
|
53
|
+
showNotes?: boolean;
|
|
54
|
+
notesExpanded?: boolean;
|
|
55
|
+
onnotestoggle?: () => void;
|
|
56
|
+
/** Opens the dedicated slide-master and layout navigation workspace. */
|
|
57
|
+
onentermasterview?: () => void;
|
|
58
|
+
/** File tab: export menu (PNG / PDF / GIF / video / print). */
|
|
59
|
+
exportUi?: ExportUiState;
|
|
60
|
+
/**
|
|
61
|
+
* Design tab: the current effective viewer-chrome theme (for highlighting
|
|
62
|
+
* the active swatch) and the setter its gallery calls to switch presets.
|
|
63
|
+
*/
|
|
64
|
+
theme: ViewerTheme | undefined;
|
|
65
|
+
onsettheme: (theme: ViewerTheme | undefined) => void;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=ribbon-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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C,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oFAAoF;IACpF,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,8EAA8E;IAC9E,MAAM,EAAE,SAAS,SAAS,EAAE,CAAC;IAC7B,iBAAiB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpE,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB;;;OAGG;IACH,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,UAAU,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,KAAK,IAAI,CAAC;CACrD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PptxTransitionType } from 'pptx-viewer-core';
|
|
2
|
+
/** Transition presets surfaced in the gallery (matches the `pptx.ribbon.transition.*` i18n keys). */
|
|
3
|
+
export interface TransitionPreset {
|
|
4
|
+
type: PptxTransitionType;
|
|
5
|
+
labelKey: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const TRANSITION_PRESETS: readonly TransitionPreset[];
|
|
8
|
+
/** Default duration (seconds) seeded into the Transitions tab's duration field. */
|
|
9
|
+
export declare const DEFAULT_TRANSITION_DURATION_SEC = 0.7;
|
|
10
|
+
//# sourceMappingURL=transition-presets.d.ts.map
|
|
@@ -0,0 +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,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,qGAAqG;AACrG,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,gBAAgB,EAUzD,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,+BAA+B,MAAM,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EditorState } from './editor-state.svelte';
|
|
2
|
+
/** The imperative editing API exposed on the `PowerPointViewer` instance. */
|
|
3
|
+
export interface EditingApi {
|
|
4
|
+
undo(): void;
|
|
5
|
+
redo(): void;
|
|
6
|
+
canUndo(): boolean;
|
|
7
|
+
canRedo(): boolean;
|
|
8
|
+
deleteSelected(): void;
|
|
9
|
+
getSelectedElementId(): string | null;
|
|
10
|
+
save(): Promise<Uint8Array>;
|
|
11
|
+
downloadPptx(fileName?: string): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Build the imperative editing API bound to a live `EditorState`. Extracted
|
|
15
|
+
* from `PowerPointViewer.svelte` so the component only re-exports thin,
|
|
16
|
+
* one-line bindings (Svelte requires the component's own `export`s for its
|
|
17
|
+
* instance API, but the bodies can live elsewhere).
|
|
18
|
+
*/
|
|
19
|
+
export declare function createEditingApi(editor: EditorState): EditingApi;
|
|
20
|
+
//# sourceMappingURL=editing-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editing-api.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editing-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,6EAA6E;AAC7E,MAAM,WAAW,UAAU;IAC1B,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,IAAI,OAAO,CAAC;IACnB,OAAO,IAAI,OAAO,CAAC;IACnB,cAAc,IAAI,IAAI,CAAC;IACvB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAAC;IACtC,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5B,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CAchE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PptxAnimationPreset } from 'pptx-viewer-core';
|
|
2
|
+
import { AnimationGroup } from 'pptx-viewer-shared';
|
|
3
|
+
import { EditorState } from './editor-state.svelte';
|
|
4
|
+
/**
|
|
5
|
+
* Element-animation actions for the ribbon's Animations tab, split out of
|
|
6
|
+
* `EditorState` to keep it under the repo's 300-LOC budget.
|
|
7
|
+
*
|
|
8
|
+
* Animation data lives on the SLIDE (`PptxSlide.animations`, keyed by
|
|
9
|
+
* `elementId`), not on the element itself, matching how the presentation
|
|
10
|
+
* playback state machine reads it (`buildClickGroups` in
|
|
11
|
+
* `presentation/animation-playback.svelte.ts`). Both actions target the
|
|
12
|
+
* currently selected element and route through the shared
|
|
13
|
+
* `animation-authoring.ts` "coarse group preset" model (`applyAnimationPreset`
|
|
14
|
+
* / `removeElementAnimation`), the same one the Vue/vanilla ribbons use:
|
|
15
|
+
* applying a preset sets one of entrance/emphasis/exit without touching the
|
|
16
|
+
* others; remove drops the whole entry. Both mutations go through
|
|
17
|
+
* `EditorState.commitSlides`, so they are history-integrated (undoable).
|
|
18
|
+
*/
|
|
19
|
+
export declare class EditorAnimationController {
|
|
20
|
+
#private;
|
|
21
|
+
constructor(editor: EditorState);
|
|
22
|
+
addAnimation(group: AnimationGroup, preset: PptxAnimationPreset): void;
|
|
23
|
+
removeAnimation(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=editor-animation-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-animation-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-animation-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,yBAAyB;;gBAGzB,MAAM,EAAE,WAAW;IAI/B,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAWtE,eAAe,IAAI,IAAI;CAavB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AlignEdge, DistributeAxis } from 'pptx-viewer-shared';
|
|
2
|
+
import { EditorState } from './editor-state.svelte';
|
|
3
|
+
/**
|
|
4
|
+
* The Home tab's multi-select-aware Arrange group (align / distribute /
|
|
5
|
+
* flip / group / ungroup), split out of `EditorState` to keep it under the
|
|
6
|
+
* repo's 300-LOC budget. Reads `editor.selection.ids` (the ordered
|
|
7
|
+
* multi-selection) rather than just the primary id, matching React's
|
|
8
|
+
* `selectedElementIds` semantics.
|
|
9
|
+
*/
|
|
10
|
+
export declare class EditorArrangeController {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(editor: EditorState);
|
|
13
|
+
/** Align every selected element to `edge` (needs >= 2 selected). */
|
|
14
|
+
alignSelected(edge: AlignEdge): void;
|
|
15
|
+
/** Distribute the selected elements evenly along `axis` (needs >= 3 selected). */
|
|
16
|
+
distributeSelected(axis: DistributeAxis): void;
|
|
17
|
+
/** Flip every selected element across `axis`. */
|
|
18
|
+
flipSelected(axis: 'horizontal' | 'vertical'): void;
|
|
19
|
+
/** Group the selected elements (needs >= 2 selected). Selects the new group. */
|
|
20
|
+
groupSelected(): void;
|
|
21
|
+
/** Ungroup the primary selected group element. Selects the ungrouped children. */
|
|
22
|
+
ungroupSelected(): void;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=editor-arrange-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-arrange-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-arrange-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AASpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;GAMG;AACH,qBAAa,uBAAuB;;gBAGvB,MAAM,EAAE,WAAW;IAgB/B,oEAAoE;IACpE,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAKpC,kFAAkF;IAClF,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAK9C,iDAAiD;IACjD,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,GAAG,IAAI;IAKnD,gFAAgF;IAChF,aAAa,IAAI,IAAI;IAarB,kFAAkF;IAClF,eAAe,IAAI,IAAI;CAevB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { AlignEdge, DistributeAxis } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* Pure, multi-select-aware arrange mutations for the Home tab's Arrange
|
|
5
|
+
* group: align / distribute / flip / group / ungroup. The bounding-box maths
|
|
6
|
+
* (`alignElements`, `distributeElements`) and grouping (`groupElements`,
|
|
7
|
+
* `ungroupElements`) are the shared, framework-agnostic operations from
|
|
8
|
+
* `pptx-viewer-shared`; this module lifts them to the slide-array shape
|
|
9
|
+
* `EditorState` stores and to the ordered `selection.ids` list the toolbar
|
|
10
|
+
* reads (mirrors `editor-mutations.ts` / `editor-zorder.ts`).
|
|
11
|
+
*/
|
|
12
|
+
/** Align every selected element to a common edge (needs >= 2 ids). Null when a no-op. */
|
|
13
|
+
export declare function alignSelectedOnSlide(slides: readonly PptxSlide[], slideIndex: number, ids: readonly string[], edge: AlignEdge): PptxSlide[] | null;
|
|
14
|
+
/** Distribute the selected elements evenly along an axis (needs >= 3 ids). Null when a no-op. */
|
|
15
|
+
export declare function distributeSelectedOnSlide(slides: readonly PptxSlide[], slideIndex: number, ids: readonly string[], axis: DistributeAxis): PptxSlide[] | null;
|
|
16
|
+
/** Flip every selected element across the given axis. Null when nothing is selected. */
|
|
17
|
+
export declare function flipSelectedOnSlide(slides: readonly PptxSlide[], slideIndex: number, ids: readonly string[], axis: 'horizontal' | 'vertical'): PptxSlide[] | null;
|
|
18
|
+
/** Group the selected elements (needs >= 2 ids). Returns the new group id, or null when a no-op. */
|
|
19
|
+
export declare function groupSelectedOnSlide(slides: readonly PptxSlide[], slideIndex: number, ids: readonly string[], intoTemplate?: boolean): {
|
|
20
|
+
slides: PptxSlide[];
|
|
21
|
+
groupId: string;
|
|
22
|
+
} | null;
|
|
23
|
+
/** Ungroup the group element with `groupId`. Returns the ungrouped child ids, or null when not found. */
|
|
24
|
+
export declare function ungroupOnSlide(slides: readonly PptxSlide[], slideIndex: number, groupId: string, fromTemplate?: boolean): {
|
|
25
|
+
slides: PptxSlide[];
|
|
26
|
+
childIds: string[];
|
|
27
|
+
} | null;
|
|
28
|
+
//# sourceMappingURL=editor-arrange-ops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-arrange-ops.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-arrange-ops.ts"],"names":[],"mappings":"AAAA,OAA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
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EditorState } from './editor-state.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* Slide-background actions for the ribbon's Design tab "Format Background"
|
|
4
|
+
* panel, split out of `EditorState` to keep it under the repo's 300-LOC
|
|
5
|
+
* budget (mirrors `EditorSlidesController` / `EditorArrangeController`).
|
|
6
|
+
*
|
|
7
|
+
* Solid-colour fill only (matches the docked panel's scope: a single colour
|
|
8
|
+
* input); clearing removes every background field so the slide falls back to
|
|
9
|
+
* its layout/master background. Both mutations route through
|
|
10
|
+
* `EditorState.commitSlides`, so they are history-integrated (undoable) like
|
|
11
|
+
* every other ribbon mutation.
|
|
12
|
+
*/
|
|
13
|
+
export declare class EditorBackgroundController {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(editor: EditorState);
|
|
16
|
+
/** Set the current slide's background to a solid colour. */
|
|
17
|
+
setSlideBackgroundColor(color: string): void;
|
|
18
|
+
/** Clear every background field on the current slide (fall back to layout/master). */
|
|
19
|
+
clearSlideBackground(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=editor-background-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-background-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-background-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,qBAAa,0BAA0B;;gBAG1B,MAAM,EAAE,WAAW;IAI/B,4DAA4D;IAC5D,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAU5C,sFAAsF;IACtF,oBAAoB,IAAI,IAAI;CAc5B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EditorState } from './editor-state.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* Ctrl+C/X/V and the Home tab's Clipboard group, split out of `EditorState`
|
|
4
|
+
* to keep it under the repo's 300-LOC budget. Operates entirely through
|
|
5
|
+
* `EditorState`'s public surface (`slides`, `selection`, `currentSlideIndex`,
|
|
6
|
+
* `commitSlides`), the same contract a component would use.
|
|
7
|
+
*/
|
|
8
|
+
export declare class EditorClipboardController {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(editor: EditorState);
|
|
11
|
+
/** Copy the primary selected element to the clipboard (works read-only, like React). */
|
|
12
|
+
copySelected(): void;
|
|
13
|
+
/** Copy the primary selected element then delete it (with history). */
|
|
14
|
+
cutSelected(): void;
|
|
15
|
+
/** Paste the clipboard payload onto the current slide (fresh id, offset, selects it). */
|
|
16
|
+
pasteClipboard(): string | null;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=editor-clipboard-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-clipboard-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-clipboard-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;GAKG;AACH,qBAAa,yBAAyB;;gBAGzB,MAAM,EAAE,WAAW;IAI/B,wFAAwF;IACxF,YAAY,IAAI,IAAI;IAepB,uEAAuE;IACvE,WAAW,IAAI,IAAI;IAQnB,yFAAyF;IACzF,cAAc,IAAI,MAAM,GAAG,IAAI;CAkB/B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { ElementClipboardPayload } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* Pure clipboard mutations for the Svelte editor's Ctrl+C/X/V and Home tab
|
|
5
|
+
* Clipboard group. The reusable, framework-agnostic payload shape and clone
|
|
6
|
+
* logic (fresh id, small paste offset) live in the shared
|
|
7
|
+
* `render/element-clipboard` module; this file only lifts them to the
|
|
8
|
+
* slide-array shape `EditorState` stores, mirroring `editor-mutations.ts`.
|
|
9
|
+
*/
|
|
10
|
+
/** Build a clipboard payload from the element with `elementId`, or `null`. */
|
|
11
|
+
export declare function copyElementToClipboard(slides: readonly PptxSlide[], slideIndex: number, elementId: string): ElementClipboardPayload | null;
|
|
12
|
+
/**
|
|
13
|
+
* Clone the clipboard payload's element (fresh id, offset) and append it to
|
|
14
|
+
* the given slide. Returns the new slide array plus the copy's id.
|
|
15
|
+
*/
|
|
16
|
+
export declare function pasteClipboardElement(slides: readonly PptxSlide[], slideIndex: number, payload: ElementClipboardPayload, intoTemplate?: boolean): {
|
|
17
|
+
slides: PptxSlide[];
|
|
18
|
+
newId: string;
|
|
19
|
+
} | null;
|
|
20
|
+
//# sourceMappingURL=editor-clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-clipboard.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAKlE;;;;;;GAMG;AAEH,8EAA8E;AAC9E,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GACf,uBAAuB,GAAG,IAAI,CAGhC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,uBAAuB,EAChC,YAAY,UAAQ,GAClB;IAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAS/C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { InteractionBox, SnapSibling } from 'pptx-viewer-shared';
|
|
3
|
+
import { OverlayBox } from './types';
|
|
4
|
+
export declare function elementInteractionBox(elements: readonly PptxElement[], id: string): InteractionBox | undefined;
|
|
5
|
+
export declare function elementOverlayBox(element: PptxElement): OverlayBox;
|
|
6
|
+
export declare function selectionOverlayBox(elements: readonly PptxElement[]): OverlayBox | null;
|
|
7
|
+
export declare function siblingBoxes(elements: readonly PptxElement[]): SnapSibling[];
|
|
8
|
+
//# sourceMappingURL=editor-controller-geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-controller-geometry.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-controller-geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,qBAAqB,CACpC,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,EAAE,EAAE,MAAM,GACR,cAAc,GAAG,SAAS,CAG5B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,CAQlE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,UAAU,GAAG,IAAI,CAMvF;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAAE,CAE5E"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
import { ResizeHandleId, SnapLine } from 'pptx-viewer-shared';
|
|
3
|
+
import { EditorMarqueeRect } from './editor-selection-gestures';
|
|
4
|
+
import { EditorState } from './editor-state.svelte';
|
|
5
|
+
export interface EditorControllerDeps {
|
|
6
|
+
getScale(): number;
|
|
7
|
+
getCurrent(): number;
|
|
8
|
+
getPresenting(): boolean;
|
|
9
|
+
getStageRoot(): Element | null;
|
|
10
|
+
getHolderEl(): HTMLElement | null;
|
|
11
|
+
onCursorMove?(x: number, y: number): void;
|
|
12
|
+
onContextMenu?(x: number, y: number): void;
|
|
13
|
+
}
|
|
14
|
+
export declare class EditorController {
|
|
15
|
+
#private;
|
|
16
|
+
snapLines: readonly SnapLine[];
|
|
17
|
+
editingId: string | null;
|
|
18
|
+
marquee: EditorMarqueeRect | null;
|
|
19
|
+
constructor(editor: EditorState, deps: EditorControllerDeps);
|
|
20
|
+
get overlayBox(): import('./types').OverlayBox | null;
|
|
21
|
+
get editing(): boolean;
|
|
22
|
+
get selectionCount(): number;
|
|
23
|
+
get editingElement(): PptxElement | undefined;
|
|
24
|
+
/** True when editing owns the keyboard (a selection or inline edit is live). */
|
|
25
|
+
capturesKeyboard(): boolean;
|
|
26
|
+
onStagePointerDown: (event: PointerEvent) => void;
|
|
27
|
+
onStagePointerMove: (event: PointerEvent) => void;
|
|
28
|
+
onStageDblClick: (event: MouseEvent) => void;
|
|
29
|
+
/** Select the right-clicked element and expose the edit context menu. */
|
|
30
|
+
onStageContextMenu: (event: MouseEvent) => void;
|
|
31
|
+
onHandlePointerDown: (handle: ResizeHandleId, event: PointerEvent) => void;
|
|
32
|
+
onRotatePointerDown: (event: PointerEvent) => void;
|
|
33
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
34
|
+
/** Open the inline text editor over `id` when the element carries text. */
|
|
35
|
+
enterInlineEdit(id: string): void;
|
|
36
|
+
/** Commit the inline editor's text onto the element and close it. */
|
|
37
|
+
commitInline(id: string, text: string): void;
|
|
38
|
+
/** Close the inline editor without further mutation. */
|
|
39
|
+
closeInline(): void;
|
|
40
|
+
/** Tear down window listeners (component destroy). */
|
|
41
|
+
destroy(): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=editor-controller.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-controller.svelte.d.ts","sourceRoot":"","sources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