pptx-svelte-viewer 2.7.1 → 2.9.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-CWB7jYUa.js +1108 -0
- package/dist/{export-Dggu1blu.js → export-CAW_l1TQ.js} +44625 -39074
- package/dist/i18n.js +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.js +20 -20
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{translator-DL83W_OP.js → translator-0iRuc5gX.js} +240 -19
- package/dist/viewer/ai/ai-chat-persistence.svelte.d.ts +23 -0
- package/dist/viewer/ai/ai-chat-persistence.svelte.d.ts.map +1 -0
- package/dist/viewer/components/inspector/theme-editor-state.svelte.d.ts +47 -0
- package/dist/viewer/components/inspector/theme-editor-state.svelte.d.ts.map +1 -0
- package/dist/viewer/components/props-chrome.d.ts +104 -0
- package/dist/viewer/components/props-chrome.d.ts.map +1 -0
- package/dist/viewer/components/props-editing.d.ts +86 -0
- package/dist/viewer/components/props-editing.d.ts.map +1 -0
- package/dist/viewer/components/props-elements.d.ts +65 -0
- package/dist/viewer/components/props-elements.d.ts.map +1 -0
- package/dist/viewer/components/props-stage.d.ts +84 -0
- package/dist/viewer/components/props-stage.d.ts.map +1 -0
- package/dist/viewer/components/props.d.ts +10 -283
- package/dist/viewer/components/props.d.ts.map +1 -1
- package/dist/viewer/components/ribbon/insert/equation-latex-preview.d.ts +23 -0
- package/dist/viewer/components/ribbon/insert/equation-latex-preview.d.ts.map +1 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts +2 -0
- package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -1
- package/dist/viewer/components/viewer-body-commits.d.ts +18 -0
- package/dist/viewer/components/viewer-body-commits.d.ts.map +1 -0
- package/dist/viewer/components/viewer-body-props.d.ts +125 -0
- package/dist/viewer/components/viewer-body-props.d.ts.map +1 -0
- package/dist/viewer/editor/context-menu-dispatch.d.ts +45 -0
- package/dist/viewer/editor/context-menu-dispatch.d.ts.map +1 -0
- package/dist/viewer/editor/deck-api.d.ts +31 -0
- package/dist/viewer/editor/deck-api.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller-deps.d.ts +21 -1
- package/dist/viewer/editor/editor-controller-deps.d.ts.map +1 -1
- package/dist/viewer/editor/editor-controller-wiring.d.ts +35 -0
- package/dist/viewer/editor/editor-controller-wiring.d.ts.map +1 -0
- package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-document-lifecycle.d.ts +68 -0
- package/dist/viewer/editor/editor-document-lifecycle.d.ts.map +1 -0
- package/dist/viewer/editor/editor-document-state.d.ts +3 -1
- package/dist/viewer/editor/editor-document-state.d.ts.map +1 -1
- package/dist/viewer/editor/editor-freeform.d.ts +4 -0
- package/dist/viewer/editor/editor-freeform.d.ts.map +1 -0
- package/dist/viewer/editor/editor-history-state.svelte.d.ts +31 -0
- package/dist/viewer/editor/editor-history-state.svelte.d.ts.map +1 -0
- package/dist/viewer/editor/editor-ink-controller.svelte.d.ts +10 -6
- package/dist/viewer/editor/editor-ink-controller.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-keyboard.d.ts +18 -11
- package/dist/viewer/editor/editor-keyboard.d.ts.map +1 -1
- package/dist/viewer/editor/editor-selection.svelte.d.ts +10 -10
- package/dist/viewer/editor/editor-selection.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-state.svelte.d.ts +26 -19
- package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
- package/dist/viewer/editor/editor-text-body-mutations.d.ts +17 -0
- package/dist/viewer/editor/editor-text-body-mutations.d.ts.map +1 -0
- package/dist/viewer/editor/element-hit.d.ts +8 -26
- package/dist/viewer/editor/element-hit.d.ts.map +1 -1
- package/dist/viewer/editor/index.d.ts +2 -0
- package/dist/viewer/editor/index.d.ts.map +1 -1
- package/dist/viewer/export/export-wiring.svelte.d.ts +8 -1
- package/dist/viewer/export/export-wiring.svelte.d.ts.map +1 -1
- package/dist/viewer/export/rasterize-slide.d.ts +8 -1
- package/dist/viewer/export/rasterize-slide.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +897 -342
- package/dist/viewer/index.js +20 -398
- package/dist/viewer/presentation/animation-media-commands.d.ts +4 -0
- package/dist/viewer/presentation/animation-media-commands.d.ts.map +1 -0
- package/dist/viewer/presentation/animation-playback-helpers.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-ai.svelte.d.ts +42 -0
- package/dist/viewer/state/create-viewer-state-ai.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts +13 -0
- package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-derived.svelte.d.ts +38 -0
- package/dist/viewer/state/create-viewer-state-derived.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts +21 -13
- package/dist/viewer/state/create-viewer-state-editor-ui.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts +6 -1
- package/dist/viewer/state/create-viewer-state-export-notes.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts +3 -1
- package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state-presenter.svelte.d.ts +31 -0
- package/dist/viewer/state/create-viewer-state-presenter.svelte.d.ts.map +1 -0
- package/dist/viewer/state/create-viewer-state-types.d.ts +43 -6
- package/dist/viewer/state/create-viewer-state-types.d.ts.map +1 -1
- package/dist/viewer/state/create-viewer-state.svelte.d.ts +17 -16
- package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
- package/dist/viewer/state/field-context.d.ts +38 -0
- package/dist/viewer/state/field-context.d.ts.map +1 -0
- package/dist/viewer/state/index.d.ts +4 -0
- package/dist/viewer/state/index.d.ts.map +1 -1
- package/dist/viewer/state/navigation.d.ts +9 -7
- package/dist/viewer/state/navigation.d.ts.map +1 -1
- package/dist/viewer/state/open-file.d.ts +15 -0
- package/dist/viewer/state/open-file.d.ts.map +1 -0
- package/dist/viewer/state/presentation-loader.svelte.d.ts +3 -1
- package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -1
- package/dist/viewer/state/quick-access-commands.d.ts +19 -0
- package/dist/viewer/state/quick-access-commands.d.ts.map +1 -0
- package/dist/viewer/state/slide-elements.d.ts +51 -0
- package/dist/viewer/state/slide-elements.d.ts.map +1 -0
- package/dist/viewer/state/theme-locale.svelte.d.ts +68 -0
- package/dist/viewer/state/theme-locale.svelte.d.ts.map +1 -0
- package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -1
- package/dist/viewer/state/viewer-state-options.d.ts +31 -0
- package/dist/viewer/state/viewer-state-options.d.ts.map +1 -0
- package/dist/viewer/style/element-style.d.ts.map +1 -1
- package/dist/viewer/style/text-style.d.ts +15 -0
- package/dist/viewer/style/text-style.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/AiChatPanel-BbVtEzOo.js +0 -1082
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PptxElement, ShapeStyle } from 'pptx-viewer-core';
|
|
2
|
+
import { ElementAnimationState, RenderParagraph } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* Prop contracts for the element-level renderers (the per-`PptxElement` views
|
|
5
|
+
* and the shared text block). Split out of `props.ts` to keep every source
|
|
6
|
+
* file within the repo's file-size budget; import them from `./props`, which
|
|
7
|
+
* re-exports this module.
|
|
8
|
+
*/
|
|
9
|
+
/** Props shared by every element-level renderer. */
|
|
10
|
+
export interface ElementRendererProps {
|
|
11
|
+
element: PptxElement;
|
|
12
|
+
mediaDataUrls: Map<string, string>;
|
|
13
|
+
zIndex: number;
|
|
14
|
+
/**
|
|
15
|
+
* True only on the live presentation stage (the viewer's fullscreen
|
|
16
|
+
* surface): media elements should then autoplay, as PowerPoint does when a
|
|
17
|
+
* slide with media becomes active, rather than waiting for a manual click.
|
|
18
|
+
* Defaults to `false` (the main windowed canvas and thumbnail rail never
|
|
19
|
+
* autoplay).
|
|
20
|
+
*/
|
|
21
|
+
presenting?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* True only on the main (interactive) canvas, never the thumbnail rail.
|
|
24
|
+
* Marks the rendered root node with `data-pptx-element="true"` (the
|
|
25
|
+
* framework-neutral contract React/Vue/Angular/Vanilla also emit). EVERY
|
|
26
|
+
* element renderer honours it, not only the ones the dispatcher boxes
|
|
27
|
+
* itself: Svelte has no attribute fallthrough, so a view that ignores this
|
|
28
|
+
* flag silently leaves its element type out of the contract.
|
|
29
|
+
* Defaults to `false`.
|
|
30
|
+
*/
|
|
31
|
+
interactive?: boolean;
|
|
32
|
+
/** Whether inherited layout/master nodes participate in pointer editing. */
|
|
33
|
+
editTemplateMode?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The enclosing group's fill (`GroupPptxElement.groupFill`), passed down by a
|
|
36
|
+
* group's render branch so a child painted with `a:grpFill`
|
|
37
|
+
* (`fillMode === 'group'`) inherits the group's resolved fill.
|
|
38
|
+
*/
|
|
39
|
+
parentGroupFill?: ShapeStyle;
|
|
40
|
+
/**
|
|
41
|
+
* Native-animation playback state for this element, present only during a
|
|
42
|
+
* running presentation. Drives the staged chart / SmartArt build reveal and
|
|
43
|
+
* the `p:animClr` fill / stroke relinquish; mirrors React's / Vue's
|
|
44
|
+
* per-element `animationState`. Absent (undefined) in editor / read-only
|
|
45
|
+
* rendering (element renderers read it from the element-states context, so it
|
|
46
|
+
* is optional here and defaulted per renderer).
|
|
47
|
+
*/
|
|
48
|
+
animationState?: ElementAnimationState;
|
|
49
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
50
|
+
onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void;
|
|
51
|
+
onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export interface TextBlockProps {
|
|
54
|
+
paragraphs: RenderParagraph[];
|
|
55
|
+
/** Inline `style` string for the text block wrapper. */
|
|
56
|
+
textStyle: string;
|
|
57
|
+
/** Owning element id, needed to key this element's text-build sub-animations. */
|
|
58
|
+
elementId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Live per-sub-element animation states. Present only while a staged text
|
|
61
|
+
* build (by paragraph / word / letter) is playing.
|
|
62
|
+
*/
|
|
63
|
+
subElementAnimStates?: ReadonlyMap<string, ElementAnimationState>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=props-elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props-elements.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/props-elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEjF;;;;;GAKG;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;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,iBAAiB,CAAC,EAAE,CACnB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,KACR,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E;AAED,MAAM,WAAW,cAAc;IAC9B,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CAClE"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { CanvasSize } from 'pptx-viewer-shared';
|
|
3
|
+
/**
|
|
4
|
+
* Prop contracts for the slide surfaces: the pure `SlideStage` (used by the
|
|
5
|
+
* canvas, the thumbnail rail and the off-screen export stage alike) and the
|
|
6
|
+
* interactive `SlideCanvas` that scales it and owns the pointer handlers.
|
|
7
|
+
* Split out of `props.ts` for the repo's file-size budget; import them from
|
|
8
|
+
* `./props`, which re-exports this module.
|
|
9
|
+
*/
|
|
10
|
+
export interface SlideStageProps {
|
|
11
|
+
slide: PptxSlide | undefined;
|
|
12
|
+
canvasSize: CanvasSize;
|
|
13
|
+
mediaDataUrls: Map<string, string>;
|
|
14
|
+
scale?: number;
|
|
15
|
+
/** Forwarded to each `ElementRenderer`; see `ElementRendererProps.presenting`. */
|
|
16
|
+
presenting?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* True only for the main (interactive) canvas, never the thumbnail rail.
|
|
19
|
+
* Adds `role="region" aria-roledescription="slide"` to the stage itself
|
|
20
|
+
* (the framework-neutral e2e hook React/Vue/Angular also emit) and is
|
|
21
|
+
* forwarded to each `ElementRenderer`; see `ElementRendererProps.interactive`.
|
|
22
|
+
*/
|
|
23
|
+
interactive?: boolean;
|
|
24
|
+
editTemplateMode?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Skip the resolved slide background and leave the stage see-through.
|
|
27
|
+
*
|
|
28
|
+
* `getSlideBackgroundStyle` always resolves to an OPAQUE fill (it falls back
|
|
29
|
+
* to the default slide background), which is right for a stage that owns the
|
|
30
|
+
* screen and wrong for one stacked over another. The morph transition's
|
|
31
|
+
* departing-shape layer is exactly that: it sits above the incoming slide,
|
|
32
|
+
* so its background would hide the whole morph behind a flat slab.
|
|
33
|
+
*/
|
|
34
|
+
transparentBackground?: boolean;
|
|
35
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
36
|
+
onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void;
|
|
37
|
+
onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export interface SlideCanvasProps {
|
|
40
|
+
slide: PptxSlide | undefined;
|
|
41
|
+
canvasSize: CanvasSize;
|
|
42
|
+
mediaDataUrls: Map<string, string>;
|
|
43
|
+
/** Effective scale (fit-to-viewport x user zoom), pre-computed by the host. */
|
|
44
|
+
scale: number;
|
|
45
|
+
/** True only on the live presentation stage; see `SlideStageProps.presenting`. */
|
|
46
|
+
presenting?: boolean;
|
|
47
|
+
/** True while in-place editing is available; gates the pointer handlers and the editing cursor/class. */
|
|
48
|
+
editingActive?: boolean;
|
|
49
|
+
editTemplateMode?: boolean;
|
|
50
|
+
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
51
|
+
onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void;
|
|
52
|
+
onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void;
|
|
53
|
+
/** Reports the stage-holder node to the host on mount/teardown (editing hit-surface, export capture anchor). */
|
|
54
|
+
onstageholder?: (el: HTMLDivElement | null) => void;
|
|
55
|
+
onstagepointerdown?: (event: PointerEvent) => void;
|
|
56
|
+
onstagepointermove?: (event: PointerEvent) => void;
|
|
57
|
+
onstagedblclick?: (event: MouseEvent) => void;
|
|
58
|
+
onstagecontextmenu?: (event: MouseEvent) => void;
|
|
59
|
+
/** Fired on any stage click; the host wires this to advance presentation playback. */
|
|
60
|
+
onstageclick?: (event: MouseEvent) => void;
|
|
61
|
+
/**
|
|
62
|
+
* True while the AI panel is picking an element: the next element click(s)
|
|
63
|
+
* become the assistant's focus (highlighted) instead of selecting / editing.
|
|
64
|
+
*/
|
|
65
|
+
aiPickMode?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* True while a running AI tool is active: the stage marks itself
|
|
68
|
+
* `data-pptx-ai-active` so element colour changes tween while the assistant
|
|
69
|
+
* works (see AiFocusHighlightOverlay's tween rule).
|
|
70
|
+
*/
|
|
71
|
+
aiActive?: boolean;
|
|
72
|
+
/** Route a picked canvas element to the AI focus (pick mode only). */
|
|
73
|
+
onaipickelement?: (elementId: string) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Overlay content layered above the slide (selection/editor layer, ink
|
|
76
|
+
* drawing, alignment guides, presentation annotations, collaboration
|
|
77
|
+
* cursors, transition overlay, ...). Rendered inside the same
|
|
78
|
+
* fixed-size, scaled stage-holder as the slide itself. Kept out of this
|
|
79
|
+
* component's own props (rather than a fixed list of overlay slots) so it
|
|
80
|
+
* stays free of the live editor/controller instances those overlays need.
|
|
81
|
+
*/
|
|
82
|
+
children?: import('svelte').Snippet;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=props-stage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props-stage.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/props-stage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE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,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,KACR,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjF,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/E,gHAAgH;IAChH,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACnD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACnD,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC3C;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,QAAQ,EAAE,OAAO,CAAC;CACpC"}
|
|
@@ -1,287 +1,14 @@
|
|
|
1
|
-
import { PptxElement, PptxSection, PptxSlide, ShapeStyle, TextSegment } from 'pptx-viewer-core';
|
|
2
|
-
import { CanvasSize, ElementAnimationState, RenderParagraph, ResizeHandleId, SnapLine, ToolbarActionId } 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
1
|
/**
|
|
10
|
-
* Prop contracts for the internal viewer components. Kept in
|
|
11
|
-
*
|
|
2
|
+
* Prop contracts for the internal viewer components. Kept in plain `.ts`
|
|
3
|
+
* modules (not inside the SFCs) per repo convention: SFCs stay thin
|
|
12
4
|
* presentation, logic and types live in lintable TypeScript files.
|
|
5
|
+
*
|
|
6
|
+
* This file is the barrel every component imports from; the contracts
|
|
7
|
+
* themselves are grouped by surface across the `props-*.ts` siblings so no
|
|
8
|
+
* single file exceeds the repo's size budget.
|
|
13
9
|
*/
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
/**
|
|
38
|
-
* The enclosing group's fill (`GroupPptxElement.groupFill`), passed down by a
|
|
39
|
-
* group's render branch so a child painted with `a:grpFill`
|
|
40
|
-
* (`fillMode === 'group'`) inherits the group's resolved fill.
|
|
41
|
-
*/
|
|
42
|
-
parentGroupFill?: ShapeStyle;
|
|
43
|
-
/**
|
|
44
|
-
* Native-animation playback state for this element, present only during a
|
|
45
|
-
* running presentation. Drives the staged chart / SmartArt build reveal and
|
|
46
|
-
* the `p:animClr` fill / stroke relinquish; mirrors React's / Vue's
|
|
47
|
-
* per-element `animationState`. Absent (undefined) in editor / read-only
|
|
48
|
-
* rendering (element renderers read it from the element-states context, so it
|
|
49
|
-
* is optional here and defaulted per renderer).
|
|
50
|
-
*/
|
|
51
|
-
animationState?: ElementAnimationState;
|
|
52
|
-
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
53
|
-
onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void;
|
|
54
|
-
onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void;
|
|
55
|
-
}
|
|
56
|
-
export interface TextBlockProps {
|
|
57
|
-
paragraphs: RenderParagraph[];
|
|
58
|
-
/** Inline `style` string for the text block wrapper. */
|
|
59
|
-
textStyle: string;
|
|
60
|
-
/** Owning element id, needed to key this element's text-build sub-animations. */
|
|
61
|
-
elementId?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Live per-sub-element animation states. Present only while a staged text
|
|
64
|
-
* build (by paragraph / word / letter) is playing.
|
|
65
|
-
*/
|
|
66
|
-
subElementAnimStates?: ReadonlyMap<string, ElementAnimationState>;
|
|
67
|
-
}
|
|
68
|
-
export interface SlideStageProps {
|
|
69
|
-
slide: PptxSlide | undefined;
|
|
70
|
-
canvasSize: CanvasSize;
|
|
71
|
-
mediaDataUrls: Map<string, string>;
|
|
72
|
-
scale?: number;
|
|
73
|
-
/** Forwarded to each `ElementRenderer`; see `ElementRendererProps.presenting`. */
|
|
74
|
-
presenting?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* True only for the main (interactive) canvas, never the thumbnail rail.
|
|
77
|
-
* Adds `role="region" aria-roledescription="slide"` to the stage itself
|
|
78
|
-
* (the framework-neutral e2e hook React/Vue/Angular also emit) and is
|
|
79
|
-
* forwarded to each `ElementRenderer`; see `ElementRendererProps.interactive`.
|
|
80
|
-
*/
|
|
81
|
-
interactive?: boolean;
|
|
82
|
-
editTemplateMode?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Skip the resolved slide background and leave the stage see-through.
|
|
85
|
-
*
|
|
86
|
-
* `getSlideBackgroundStyle` always resolves to an OPAQUE fill (it falls back
|
|
87
|
-
* to the default slide background), which is right for a stage that owns the
|
|
88
|
-
* screen and wrong for one stacked over another. The morph transition's
|
|
89
|
-
* departing-shape layer is exactly that: it sits above the incoming slide,
|
|
90
|
-
* so its background would hide the whole morph behind a flat slab.
|
|
91
|
-
*/
|
|
92
|
-
transparentBackground?: boolean;
|
|
93
|
-
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
94
|
-
onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void;
|
|
95
|
-
onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void;
|
|
96
|
-
}
|
|
97
|
-
export interface SlideCanvasProps {
|
|
98
|
-
slide: PptxSlide | undefined;
|
|
99
|
-
canvasSize: CanvasSize;
|
|
100
|
-
mediaDataUrls: Map<string, string>;
|
|
101
|
-
/** Effective scale (fit-to-viewport x user zoom), pre-computed by the host. */
|
|
102
|
-
scale: number;
|
|
103
|
-
/** True only on the live presentation stage; see `SlideStageProps.presenting`. */
|
|
104
|
-
presenting?: boolean;
|
|
105
|
-
/** True while in-place editing is available; gates the pointer handlers and the editing cursor/class. */
|
|
106
|
-
editingActive?: boolean;
|
|
107
|
-
editTemplateMode?: boolean;
|
|
108
|
-
ontablecellcommit?: (elementId: string, rowIndex: number, cellIndex: number, text: string) => void;
|
|
109
|
-
onsmartartnodecommit?: (elementId: string, nodeId: string, text: string) => void;
|
|
110
|
-
onsmartartnodefill?: (elementId: string, nodeId: string, fill: string) => void;
|
|
111
|
-
/** Reports the stage-holder node to the host on mount/teardown (editing hit-surface, export capture anchor). */
|
|
112
|
-
onstageholder?: (el: HTMLDivElement | null) => void;
|
|
113
|
-
onstagepointerdown?: (event: PointerEvent) => void;
|
|
114
|
-
onstagepointermove?: (event: PointerEvent) => void;
|
|
115
|
-
onstagedblclick?: (event: MouseEvent) => void;
|
|
116
|
-
onstagecontextmenu?: (event: MouseEvent) => void;
|
|
117
|
-
/** Fired on any stage click; the host wires this to advance presentation playback. */
|
|
118
|
-
onstageclick?: (event: MouseEvent) => void;
|
|
119
|
-
/**
|
|
120
|
-
* True while the AI panel is picking an element: the next element click(s)
|
|
121
|
-
* become the assistant's focus (highlighted) instead of selecting / editing.
|
|
122
|
-
*/
|
|
123
|
-
aiPickMode?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* True while a running AI tool is active: the stage marks itself
|
|
126
|
-
* `data-pptx-ai-active` so element colour changes tween while the assistant
|
|
127
|
-
* works (see AiFocusHighlightOverlay's tween rule).
|
|
128
|
-
*/
|
|
129
|
-
aiActive?: boolean;
|
|
130
|
-
/** Route a picked canvas element to the AI focus (pick mode only). */
|
|
131
|
-
onaipickelement?: (elementId: string) => void;
|
|
132
|
-
/**
|
|
133
|
-
* Overlay content layered above the slide (selection/editor layer, ink
|
|
134
|
-
* drawing, alignment guides, presentation annotations, collaboration
|
|
135
|
-
* cursors, transition overlay, ...). Rendered inside the same
|
|
136
|
-
* fixed-size, scaled stage-holder as the slide itself. Kept out of this
|
|
137
|
-
* component's own props (rather than a fixed list of overlay slots) so it
|
|
138
|
-
* stays free of the live editor/controller instances those overlays need.
|
|
139
|
-
*/
|
|
140
|
-
children?: import('svelte').Snippet;
|
|
141
|
-
}
|
|
142
|
-
export interface ViewerToolbarProps {
|
|
143
|
-
/** Active slide (0-based). */
|
|
144
|
-
current: number;
|
|
145
|
-
total: number;
|
|
146
|
-
/** Currently-effective zoom percent (rounded). */
|
|
147
|
-
zoomPercent: number;
|
|
148
|
-
isFullscreen: boolean;
|
|
149
|
-
onprev: () => void;
|
|
150
|
-
onnext: () => void;
|
|
151
|
-
onzoomin: () => void;
|
|
152
|
-
onzoomout: () => void;
|
|
153
|
-
onzoomfit: () => void;
|
|
154
|
-
onfullscreen: () => void;
|
|
155
|
-
/** Whether the Notes toggle button is shown (host has a notes panel). */
|
|
156
|
-
showNotes?: boolean;
|
|
157
|
-
/** Whether the notes panel is currently expanded (drives the pressed state). */
|
|
158
|
-
notesExpanded?: boolean;
|
|
159
|
-
onnotestoggle?: () => void;
|
|
160
|
-
/** Show the editing action group (Undo / Redo / Save). Default false. */
|
|
161
|
-
editable?: boolean;
|
|
162
|
-
/** Whether an undo step is available (drives the Undo button's disabled state). */
|
|
163
|
-
canUndo?: boolean;
|
|
164
|
-
/** Whether a redo step is available (drives the Redo button's disabled state). */
|
|
165
|
-
canRedo?: boolean;
|
|
166
|
-
/** Whether there are unsaved edits (drives the Save button's emphasis). */
|
|
167
|
-
dirty?: boolean;
|
|
168
|
-
onundo?: () => void;
|
|
169
|
-
onredo?: () => void;
|
|
170
|
-
onsave?: () => void;
|
|
171
|
-
ondownload?: () => void;
|
|
172
|
-
/**
|
|
173
|
-
* Autosave lifecycle status; when set (host opted into `autosave`) a small
|
|
174
|
-
* status pill renders in the editing group. Omit to hide the pill entirely.
|
|
175
|
-
*/
|
|
176
|
-
autosaveStatus?: AutosaveStatus;
|
|
177
|
-
/** Whether there are unsaved autosave edits (drives the pill's "dirty" tone). */
|
|
178
|
-
autosaveDirty?: boolean;
|
|
179
|
-
/**
|
|
180
|
-
* Export menu state (PNG / PDF / GIF / video / print). When set, the
|
|
181
|
-
* toolbar renders the `ExportMenu` dropdown in its right-hand group,
|
|
182
|
-
* matching the export affordance the React/Vue/Angular chrome exposes.
|
|
183
|
-
* Omit to hide the menu (e.g. while no presentation is loaded).
|
|
184
|
-
*/
|
|
185
|
-
exportUi?: ExportUiState;
|
|
186
|
-
/** Opens the Share (collaboration) dialog. Omit to hide the button. */
|
|
187
|
-
onshare?: () => void;
|
|
188
|
-
/** Opens the Broadcast dialog. Omit to hide the button. */
|
|
189
|
-
onbroadcast?: () => void;
|
|
190
|
-
/** Whether a collaboration session is currently active (highlights the Share button). */
|
|
191
|
-
collabActive?: boolean;
|
|
192
|
-
/** Toolbar buttons to hide; see `PowerPointViewerProps.hiddenActions`. Default undefined: nothing hidden. */
|
|
193
|
-
hiddenActions?: ToolbarActionId[];
|
|
194
|
-
}
|
|
195
|
-
/** Props for the selection overlay (box + 8 resize handles + rotate handle). */
|
|
196
|
-
export interface SelectionOverlayProps {
|
|
197
|
-
/** Selection box in element (unscaled slide) px, or null to hide it. */
|
|
198
|
-
box: OverlayBox | null;
|
|
199
|
-
/** Stage scale (screen px per element px) applied when positioning. */
|
|
200
|
-
scale: number;
|
|
201
|
-
/** Transient snap-alignment lines (element px). */
|
|
202
|
-
snapLines: readonly SnapLine[];
|
|
203
|
-
/** Hide the box/handles while the inline text editor is open. */
|
|
204
|
-
editing?: boolean;
|
|
205
|
-
/** Number of selected elements; collective boxes do not expose rotation. */
|
|
206
|
-
selectionCount?: number;
|
|
207
|
-
/** In-progress empty-canvas marquee rectangle. */
|
|
208
|
-
marquee?: EditorMarqueeRect | null;
|
|
209
|
-
onhandlepointerdown: (handle: ResizeHandleId, event: PointerEvent) => void;
|
|
210
|
-
onrotatepointerdown: (event: PointerEvent) => void;
|
|
211
|
-
}
|
|
212
|
-
/** Props for the inline (double-click) text editing surface. */
|
|
213
|
-
export interface InlineTextEditorProps {
|
|
214
|
-
/** The element being edited (seeds the initial text + font hints). */
|
|
215
|
-
element: PptxElement;
|
|
216
|
-
/** The element's box in element px (positioning). */
|
|
217
|
-
box: OverlayBox;
|
|
218
|
-
/** Stage scale (screen px per element px). */
|
|
219
|
-
scale: number;
|
|
220
|
-
spellCheck?: boolean;
|
|
221
|
-
/** Called with the edited plain text on every keystroke (live preview only). */
|
|
222
|
-
oninput?: (text: string) => void;
|
|
223
|
-
/** Called with the edited plain text on commit (only when it changed). */
|
|
224
|
-
oncommit: (text: string) => void;
|
|
225
|
-
/** Called after the surface closes (commit or cancel). */
|
|
226
|
-
onclose: () => void;
|
|
227
|
-
}
|
|
228
|
-
/** Props for the editing layer (selection overlay + inline editor over the stage). */
|
|
229
|
-
export interface EditorLayerProps {
|
|
230
|
-
/** The reactive editing orchestrator (owns overlay/snap/inline state). */
|
|
231
|
-
controller: EditorController;
|
|
232
|
-
/** Stage scale (screen px per element px). */
|
|
233
|
-
scale: number;
|
|
234
|
-
spellCheck?: boolean;
|
|
235
|
-
}
|
|
236
|
-
/** Position and callbacks for the editable element context menu. */
|
|
237
|
-
export interface ElementContextMenuProps {
|
|
238
|
-
x: number;
|
|
239
|
-
y: number;
|
|
240
|
-
editor: EditorState;
|
|
241
|
-
/** "Ask AI about this" action (shown only when the host enables the `ai` prop). */
|
|
242
|
-
onaskai?: () => void;
|
|
243
|
-
/** "Fix with AI" action (shown only when the host enables the `ai` prop). */
|
|
244
|
-
onfixai?: () => void;
|
|
245
|
-
onclose: () => void;
|
|
246
|
-
}
|
|
247
|
-
export interface ThumbnailRailProps {
|
|
248
|
-
slides: PptxSlide[];
|
|
249
|
-
canvasSize: CanvasSize;
|
|
250
|
-
mediaDataUrls: Map<string, string>;
|
|
251
|
-
current: number;
|
|
252
|
-
onselect: (index: number) => void;
|
|
253
|
-
/** Enables native thumbnail drag-and-drop slide reordering. */
|
|
254
|
-
editable?: boolean;
|
|
255
|
-
onmove?: (fromIndex: number, toIndex: number) => void;
|
|
256
|
-
/**
|
|
257
|
-
* Inserts a new blank slide (React's sidebar "+ Add Slide" button). The
|
|
258
|
-
* button is pinned below the scrollable list and only renders while
|
|
259
|
-
* `editable` is set and this callback is provided.
|
|
260
|
-
*/
|
|
261
|
-
onaddslide?: () => void;
|
|
262
|
-
sections?: PptxSection[];
|
|
263
|
-
onsectiontoggle?: (sectionId: string) => void;
|
|
264
|
-
onsectionrename?: (sectionId: string, name: string) => void;
|
|
265
|
-
onsectiondelete?: (sectionId: string) => void;
|
|
266
|
-
onsectionmove?: (sectionId: string, direction: 'up' | 'down') => void;
|
|
267
|
-
}
|
|
268
|
-
export interface NotesPanelProps {
|
|
269
|
-
/** Active slide; the panel reads/edits its plain-text speaker notes. */
|
|
270
|
-
slide: PptxSlide | undefined;
|
|
271
|
-
/**
|
|
272
|
-
* Whether the panel body is expanded. Controlled by the host so the
|
|
273
|
-
* toolbar's Notes toggle and the panel's own header stay in sync.
|
|
274
|
-
*/
|
|
275
|
-
expanded?: boolean;
|
|
276
|
-
/**
|
|
277
|
-
* Called with the committed plain-text notes (on `change` / `blur`) when
|
|
278
|
-
* the user edits the textarea. This binding has no built-in slide-mutation
|
|
279
|
-
* channel, so omit this to render a read-only panel; when provided, the
|
|
280
|
-
* host is responsible for writing the text back onto the slide. Mirrors
|
|
281
|
-
* the Vue notes panel's plain-text `update` emit contract.
|
|
282
|
-
*/
|
|
283
|
-
onupdate?: (notes: string, segments?: TextSegment[]) => void;
|
|
284
|
-
/** Called when the header is clicked to expand/collapse the panel. */
|
|
285
|
-
ontoggle?: () => void;
|
|
286
|
-
}
|
|
10
|
+
export type { ElementRendererProps, TextBlockProps } from './props-elements';
|
|
11
|
+
export type { SlideCanvasProps, SlideStageProps } from './props-stage';
|
|
12
|
+
export type { NotesPanelProps, ThumbnailRailProps, ViewerToolbarProps } from './props-chrome';
|
|
13
|
+
export type { EditorLayerProps, ElementContextMenuProps, InlineTextEditorProps, SelectionOverlayProps, StageContextMenu, } from './props-editing';
|
|
287
14
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/props.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/props.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7E,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACvE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC9F,YAAY,EACX,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,GAChB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** A compiled equation: sanitized MathML for the preview, OMML for the insert. */
|
|
2
|
+
export interface CompiledEquation {
|
|
3
|
+
mathml: string;
|
|
4
|
+
omml: Record<string, unknown>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* LaTeX -> OMML -> sanitized MathML, for the equation editor's live preview and
|
|
8
|
+
* its insert payload.
|
|
9
|
+
*
|
|
10
|
+
* Every conversion failure (and there are many: the editor compiles on every
|
|
11
|
+
* keystroke, so most intermediate strings are invalid LaTeX) collapses to an
|
|
12
|
+
* empty result rather than throwing, which is what lets the preview simply show
|
|
13
|
+
* its placeholder while the user is mid-expression.
|
|
14
|
+
*
|
|
15
|
+
* NOTE: React, Vue, Vanilla and this binding each hand-roll this same
|
|
16
|
+
* three-step pipeline; it is framework-agnostic and belongs in
|
|
17
|
+
* `pptx-viewer-shared` next to `mathml-sanitize`. Kept local for now, extracted
|
|
18
|
+
* out of the SFC so the dialog stays presentation only.
|
|
19
|
+
*/
|
|
20
|
+
export declare function compileLatexEquation(source: string): CompiledEquation;
|
|
21
|
+
/** Convert a LaTeX string to sanitized MathML; '' on failure or empty input. */
|
|
22
|
+
export declare function latexToMathMl(source: string): string;
|
|
23
|
+
//# sourceMappingURL=equation-latex-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equation-latex-preview.d.ts","sourceRoot":"","sources":["../../../../../src/viewer/components/ribbon/insert/equation-latex-preview.ts"],"names":[],"mappings":"AAGA,kFAAkF;AAClF,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAYrE;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAWpD"}
|
|
@@ -78,6 +78,8 @@ export interface RibbonProps {
|
|
|
78
78
|
oncustomshows: () => void;
|
|
79
79
|
onselectionpane: () => void;
|
|
80
80
|
onslidesorter: () => void;
|
|
81
|
+
/** View tab > Normal: leave slide sorter / slide show for the editing view. */
|
|
82
|
+
onnormal?: () => void;
|
|
81
83
|
preferences: ViewerPreferences;
|
|
82
84
|
onpreferenceschange: (preferences: ViewerPreferences) => void;
|
|
83
85
|
showGuides: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ribbon-types.d.ts","sourceRoot":"","sources":["../../../../src/viewer/components/ribbon/ribbon-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EACX,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AA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AC,EAAE,iBAAiB,CAAC;CAChC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EditorState } from '../editor/editor-state.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* On-canvas edit commits (table cell text, SmartArt node text/fill) routed from
|
|
4
|
+
* the stage into the editor.
|
|
5
|
+
*
|
|
6
|
+
* These used to sit in `ViewerBody.svelte`. They are plain functions over
|
|
7
|
+
* `EditorState` with no template dependency, so they belong in a lintable
|
|
8
|
+
* module rather than an SFC: the SFC only needs to know that editing is active,
|
|
9
|
+
* not how a SmartArt fill patch is shaped. Each reads `editor.activeElements`
|
|
10
|
+
* at call time, so the returned closures stay correct as the deck changes.
|
|
11
|
+
*/
|
|
12
|
+
export interface EditCommitHandlers {
|
|
13
|
+
commitTableCell(id: string, rowIndex: number, cellIndex: number, text: string): void;
|
|
14
|
+
commitSmartArtNode(id: string, nodeId: string, text: string): void;
|
|
15
|
+
commitSmartArtFill(id: string, nodeId: string, fill: string): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function createEditCommits(editor: EditorState): EditCommitHandlers;
|
|
18
|
+
//# sourceMappingURL=viewer-body-commits.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;GASG;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,CAmCzE"}
|