pptx-vue-viewer 1.1.17 → 1.1.18
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/dist/index.cjs +1 -1
- package/dist/index.cjs.br +0 -0
- package/dist/index.cjs.gz +0 -0
- package/dist/index.js +1 -1
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/viewer/PowerPointViewer.vue.d.ts.map +1 -1
- package/dist/viewer/components/ComparePanel.vue.d.ts +34 -0
- package/dist/viewer/components/ComparePanel.vue.d.ts.map +1 -0
- package/dist/viewer/components/EquationEditorDialog.vue.d.ts +38 -0
- package/dist/viewer/components/EquationEditorDialog.vue.d.ts.map +1 -0
- package/dist/viewer/components/InsertSmartArtDialog.vue.d.ts +31 -0
- package/dist/viewer/components/InsertSmartArtDialog.vue.d.ts.map +1 -0
- package/dist/viewer/components/SettingsDialog.vue.d.ts +34 -0
- package/dist/viewer/components/SettingsDialog.vue.d.ts.map +1 -0
- package/dist/viewer/components/SlideDiffRow.vue.d.ts +28 -0
- package/dist/viewer/components/SlideDiffRow.vue.d.ts.map +1 -0
- package/dist/viewer/components/SmartArtPreviews.vue.d.ts +17 -0
- package/dist/viewer/components/SmartArtPreviews.vue.d.ts.map +1 -0
- package/dist/viewer/components/VersionHistoryPanel.vue.d.ts +38 -0
- package/dist/viewer/components/VersionHistoryPanel.vue.d.ts.map +1 -0
- package/dist/viewer/components/latex-to-omml.d.ts +13 -0
- package/dist/viewer/components/latex-to-omml.d.ts.map +1 -0
- package/dist/viewer/components/smart-art-presets.d.ts +31 -0
- package/dist/viewer/components/smart-art-presets.d.ts.map +1 -0
- package/dist/viewer/components/viewer-settings.d.ts +56 -0
- package/dist/viewer/components/viewer-settings.d.ts.map +1 -0
- package/dist/viewer/composables/slide-compare.d.ts +66 -0
- package/dist/viewer/composables/slide-compare.d.ts.map +1 -0
- package/dist/viewer/composables/useVersionHistory.d.ts +73 -0
- package/dist/viewer/composables/useVersionHistory.d.ts.map +1 -0
- package/dist/viewer/index.cjs +1 -1
- package/dist/viewer/index.cjs.br +0 -0
- package/dist/viewer/index.cjs.gz +0 -0
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/{viewer-DsS1t0uW.js → viewer-BwIIU3HV.js} +600 -520
- package/dist/viewer-BwIIU3HV.js.br +0 -0
- package/dist/{viewer-DsS1t0uW.js.gz → viewer-BwIIU3HV.js.gz} +0 -0
- package/dist/{viewer-miZPKBfD.cjs → viewer-CeeHIv08.cjs} +212 -132
- package/dist/viewer-CeeHIv08.cjs.br +0 -0
- package/dist/{viewer-miZPKBfD.cjs.gz → viewer-CeeHIv08.cjs.gz} +0 -0
- package/package.json +1 -1
- package/dist/viewer-DsS1t0uW.js.br +0 -0
- package/dist/viewer-miZPKBfD.cjs.br +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const e = require("./viewer-
|
|
2
|
+
const e = require("./viewer-CeeHIv08.cjs");
|
|
3
3
|
let r = require("clsx"), t = require("tailwind-merge");
|
|
4
4
|
exports.ElementRenderer = e.ElementRenderer_default, exports.PowerPointViewer = e.PowerPointViewer_default, exports.SlideCanvas = e.SlideCanvas_default, exports.SlideStage = e.SlideStage_default, exports.cn = function(...e) {
|
|
5
5
|
return (0, t.twMerge)((0, r.clsx)(e));
|
package/dist/index.cjs.br
CHANGED
|
Binary file
|
package/dist/index.cjs.gz
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as a, F as s, N as e, P as r, R as i, S as o, a as t, o as m, s as n, t as l, w } from "./viewer-
|
|
1
|
+
import { C as a, F as s, N as e, P as r, R as i, S as o, a as t, o as m, s as n, t as l, w } from "./viewer-BwIIU3HV.js";
|
|
2
2
|
import { clsx as d } from "clsx";
|
|
3
3
|
import { twMerge as f } from "tailwind-merge";
|
|
4
4
|
function p(...a) {
|
package/dist/index.js.br
CHANGED
|
Binary file
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerPointViewer.vue.d.ts","sourceRoot":"","sources":["../../src/viewer/PowerPointViewer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PowerPointViewer.vue.d.ts","sourceRoot":"","sources":["../../src/viewer/PowerPointViewer.vue"],"names":[],"mappings":"AAgqDA,OAAO,KAAK,EACX,mBAAmB,EAEnB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,SAAS,CAAC;AA2nFjB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CompareResult } from '../composables/slide-compare';
|
|
2
|
+
import { CanvasSize } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* ComparePanel — side panel showing slide-level diffs between two versions.
|
|
5
|
+
*
|
|
6
|
+
* Vue port of the React `ComparePanel.tsx`. Lists each non-trivial
|
|
7
|
+
* {@link SlideDiff} as a {@link SlideDiffRow}; the user can accept/reject
|
|
8
|
+
* individual diffs or accept all at once. Accepted/rejected state is tracked
|
|
9
|
+
* locally and propagated to the host via emits, which carry the diff index.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
/** Whether the panel is visible. */
|
|
13
|
+
open: boolean;
|
|
14
|
+
/** The comparison result, or `null` when nothing to compare. */
|
|
15
|
+
compareResult: CompareResult | null;
|
|
16
|
+
/** Canvas dimensions used to render diff thumbnails. */
|
|
17
|
+
canvasSize: CanvasSize;
|
|
18
|
+
/** Resolved media data URLs for thumbnail rendering. */
|
|
19
|
+
mediaDataUrls: Map<string, string>;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
22
|
+
close: () => any;
|
|
23
|
+
"accept-slide": (diffIndex: number) => any;
|
|
24
|
+
"reject-slide": (diffIndex: number) => any;
|
|
25
|
+
"accept-all": () => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
onClose?: (() => any) | undefined;
|
|
28
|
+
"onAccept-slide"?: ((diffIndex: number) => any) | undefined;
|
|
29
|
+
"onReject-slide"?: ((diffIndex: number) => any) | undefined;
|
|
30
|
+
"onAccept-all"?: (() => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
//# sourceMappingURL=ComparePanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComparePanel.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/ComparePanel.vue"],"names":[],"mappings":"AAmNA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;;;;GAOG;AACH,KAAK,WAAW,GAAG;IAClB,oCAAoC;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,gEAAgE;IAChE,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,wDAAwD;IACxD,UAAU,EAAE,UAAU,CAAC;IACvB,wDAAwD;IACxD,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AA0LF,QAAA,MAAM,YAAY;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PptxElement, TextSegment } from 'pptx-viewer-core';
|
|
2
|
+
/**
|
|
3
|
+
* EquationEditorDialog — LaTeX input with a live MathML preview for inserting or
|
|
4
|
+
* editing an OMML equation.
|
|
5
|
+
*
|
|
6
|
+
* Vue port of the React `EquationEditorDialog.tsx`. The user types LaTeX (or
|
|
7
|
+
* picks a template); it is converted LaTeX → OMML (`convertLatexToOmml`) → MathML
|
|
8
|
+
* (`convertOmmlToMathMl`, reused from `pptx-viewer-shared`, the same path
|
|
9
|
+
* `EquationRenderer` uses) for the live preview. On confirm it emits both:
|
|
10
|
+
*
|
|
11
|
+
* - `insert(element)` — a ready-to-add core {@link PptxElement} (a shape
|
|
12
|
+
* carrying the equation as a `textSegments[].equationXml` OMML tree, so
|
|
13
|
+
* `SmartArtRenderer`/`EquationRenderer` render it directly). Route to
|
|
14
|
+
* `ops.addElement`.
|
|
15
|
+
* - `apply(segment)` — the equation {@link TextSegment} alone, for updating an
|
|
16
|
+
* existing equation in place. Route to `ops.updateText` / a segment patch.
|
|
17
|
+
*
|
|
18
|
+
* When `existingOmml` is supplied the dialog opens in edit mode, seeding the
|
|
19
|
+
* textarea from the reverse `convertOmmlToLatex`.
|
|
20
|
+
*/
|
|
21
|
+
type __VLS_Props = {
|
|
22
|
+
/** Whether the dialog is open. */
|
|
23
|
+
open: boolean;
|
|
24
|
+
/** When editing an existing equation, its OMML; otherwise null/undefined. */
|
|
25
|
+
existingOmml?: Record<string, unknown> | null;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
28
|
+
insert: (element: PptxElement) => any;
|
|
29
|
+
close: () => any;
|
|
30
|
+
apply: (segment: TextSegment) => any;
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
32
|
+
onInsert?: ((element: PptxElement) => any) | undefined;
|
|
33
|
+
onClose?: (() => any) | undefined;
|
|
34
|
+
onApply?: ((segment: TextSegment) => any) | undefined;
|
|
35
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
//# sourceMappingURL=EquationEditorDialog.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EquationEditorDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/EquationEditorDialog.vue"],"names":[],"mappings":"AAqaA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAa,MAAM,kBAAkB,CAAC;AAQ5E;;;;;;;;;;;;;;;;;;GAkBG;AACH,KAAK,WAAW,GAAG;IAClB,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC9C,CAAC;AAgWF,QAAA,MAAM,YAAY;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { PptxElement } from 'pptx-viewer-core';
|
|
2
|
+
/**
|
|
3
|
+
* InsertSmartArtDialog — gallery + node-text entry for inserting a SmartArt
|
|
4
|
+
* graphic.
|
|
5
|
+
*
|
|
6
|
+
* Vue port of the React `InsertSmartArtDialog.tsx`. Built on
|
|
7
|
+
* {@link ModalDialog}, it shows a category sidebar + a thumbnail gallery
|
|
8
|
+
* (`SmartArtPreviews.vue`). Picking a preset seeds an editable textarea with one
|
|
9
|
+
* node per line (the preset's `defaultItems`); the user can add/remove/edit
|
|
10
|
+
* lines before inserting.
|
|
11
|
+
*
|
|
12
|
+
* On insert it builds a fully-formed core {@link SmartArtPptxElement} (so
|
|
13
|
+
* `SmartArtRenderer.vue` can render it directly, with no further core call —
|
|
14
|
+
* there is no `createSmartArtElement` factory in core, so the literal is built
|
|
15
|
+
* here exactly as the React `handleInsertSmartArt` handler does) and emits it
|
|
16
|
+
* via the `insert` event. The host routes the payload to `ops.addElement`.
|
|
17
|
+
*/
|
|
18
|
+
type __VLS_Props = {
|
|
19
|
+
/** Whether the dialog is open. */
|
|
20
|
+
open: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
23
|
+
insert: (element: PptxElement) => any;
|
|
24
|
+
close: () => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
onInsert?: ((element: PptxElement) => any) | undefined;
|
|
27
|
+
onClose?: (() => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
//# sourceMappingURL=InsertSmartArtDialog.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsertSmartArtDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/InsertSmartArtDialog.vue"],"names":[],"mappings":"AAgXA,OAAO,KAAK,EACX,WAAW,EAIX,MAAM,kBAAkB,CAAC;AAQ1B;;;;;;;;;;;;;;;GAeG;AACH,KAAK,WAAW,GAAG;IAClB,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;CACd,CAAC;AA4SF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ViewerSettings } from './viewer-settings';
|
|
2
|
+
/**
|
|
3
|
+
* SettingsDialog — viewer/editor preferences on a tabbed `ModalDialog`.
|
|
4
|
+
*
|
|
5
|
+
* Vue counterpart of the React package's `SettingsDialog.tsx`. It exposes the
|
|
6
|
+
* same boolean preferences (autosave, spell-check, show-grid, show-rulers,
|
|
7
|
+
* snap-to-grid, reduced-motion) on a "General" tab, plus a read-only keyboard
|
|
8
|
+
* "Shortcuts" reference tab.
|
|
9
|
+
*
|
|
10
|
+
* Where the React dialog threaded each setting through its own prop/callback
|
|
11
|
+
* (and kept `autoSave` as dialog-local state), the Vue port takes the whole
|
|
12
|
+
* `ViewerSettings` object as one `settings` prop and emits a single
|
|
13
|
+
* `update(settings)` with the full next value whenever a toggle flips. The host
|
|
14
|
+
* owns persistence; this component is purely presentational.
|
|
15
|
+
*
|
|
16
|
+
* The form is seeded from `settings` each time the dialog opens, so a host can
|
|
17
|
+
* pass a live reactive object or re-feed it on every open — both work.
|
|
18
|
+
*/
|
|
19
|
+
type __VLS_Props = {
|
|
20
|
+
/** Whether the dialog is visible. */
|
|
21
|
+
open: boolean;
|
|
22
|
+
/** Current viewer settings. */
|
|
23
|
+
settings: ViewerSettings;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
26
|
+
close: () => any;
|
|
27
|
+
update: (settings: ViewerSettings) => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
onClose?: (() => any) | undefined;
|
|
30
|
+
onUpdate?: ((settings: ViewerSettings) => any) | undefined;
|
|
31
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
//# sourceMappingURL=SettingsDialog.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsDialog.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/SettingsDialog.vue"],"names":[],"mappings":"AAqQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,WAAW,GAAG;IAClB,qCAAqC;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,+BAA+B;IAC/B,QAAQ,EAAE,cAAc,CAAC;CACzB,CAAC;AAiOF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SlideDiff } from '../composables/slide-compare';
|
|
2
|
+
import { CanvasSize } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* SlideDiffRow — a single expandable slide-diff entry.
|
|
5
|
+
*
|
|
6
|
+
* Vue port of the React `SlideDiffRow.tsx`. Shows the slide's status badge,
|
|
7
|
+
* change count, and (when expanded) side-by-side base/incoming thumbnails plus
|
|
8
|
+
* the per-element change list and accept/reject actions. Unchanged diffs render
|
|
9
|
+
* nothing (the parent filters them, but we guard here too).
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
diff: SlideDiff;
|
|
13
|
+
diffIndex: number;
|
|
14
|
+
canvasSize: CanvasSize;
|
|
15
|
+
mediaDataUrls: Map<string, string>;
|
|
16
|
+
accepted: boolean;
|
|
17
|
+
rejected: boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
20
|
+
accept: (index: number) => any;
|
|
21
|
+
reject: (index: number) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
|
+
onAccept?: ((index: number) => any) | undefined;
|
|
24
|
+
onReject?: ((index: number) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
//# sourceMappingURL=SlideDiffRow.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlideDiffRow.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/SlideDiffRow.vue"],"names":[],"mappings":"AAsWA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;;;;GAOG;AACH,KAAK,WAAW,GAAG;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CAClB,CAAC;AAsTF,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SmartArtLayout } from 'pptx-viewer-core';
|
|
2
|
+
/**
|
|
3
|
+
* SmartArtPreviews — a tiny SVG thumbnail for a SmartArt {@link SmartArtLayout}.
|
|
4
|
+
*
|
|
5
|
+
* Vue port of the React `SmartArtPreviews.tsx` `getPreviewForLayout` resolver.
|
|
6
|
+
* Each layout maps to one of a handful of schematic glyphs (block list, chevron
|
|
7
|
+
* process, cycle, radial, hierarchy, venn, or a generic fallback). Used by
|
|
8
|
+
* `InsertSmartArtDialog.vue` to populate the gallery tiles.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
/** The layout to draw a thumbnail for. */
|
|
12
|
+
layout: SmartArtLayout;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=SmartArtPreviews.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmartArtPreviews.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/SmartArtPreviews.vue"],"names":[],"mappings":"AAoOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;;;;;GAOG;AACH,KAAK,WAAW,GAAG;IAClB,0CAA0C;IAC1C,MAAM,EAAE,cAAc,CAAC;CACvB,CAAC;AAuSF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SlideVersion } from '../composables/useVersionHistory';
|
|
2
|
+
import { CanvasSize } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* VersionHistoryPanel — lists captured slide-version snapshots.
|
|
5
|
+
*
|
|
6
|
+
* Vue port of the React `VersionHistoryPanel.tsx`, adapted to the Vue port's
|
|
7
|
+
* in-memory version model (the React panel read serialised blobs from the
|
|
8
|
+
* autosave IndexedDB store; here the host supplies a reactive list of
|
|
9
|
+
* {@link SlideVersion} snapshots from `useVersionHistory`).
|
|
10
|
+
*
|
|
11
|
+
* The user can preview a version's first slide (rendered via `SlideStage`),
|
|
12
|
+
* restore it, delete it, or compare it against the current document. All
|
|
13
|
+
* mutations are emitted to the host, which owns the version store.
|
|
14
|
+
*/
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
/** Whether the panel is visible. */
|
|
17
|
+
open: boolean;
|
|
18
|
+
/** Captured versions, newest last. */
|
|
19
|
+
versions: SlideVersion[];
|
|
20
|
+
/** Canvas dimensions used to render version previews. */
|
|
21
|
+
canvasSize: CanvasSize;
|
|
22
|
+
/** Resolved media data URLs for preview rendering. */
|
|
23
|
+
mediaDataUrls: Map<string, string>;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
26
|
+
close: () => any;
|
|
27
|
+
delete: (id: string) => any;
|
|
28
|
+
restore: (id: string) => any;
|
|
29
|
+
compare: (id: string) => any;
|
|
30
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
31
|
+
onClose?: (() => any) | undefined;
|
|
32
|
+
onDelete?: ((id: string) => any) | undefined;
|
|
33
|
+
onRestore?: ((id: string) => any) | undefined;
|
|
34
|
+
onCompare?: ((id: string) => any) | undefined;
|
|
35
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
//# sourceMappingURL=VersionHistoryPanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VersionHistoryPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/VersionHistoryPanel.vue"],"names":[],"mappings":"AA2RA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG3C;;;;;;;;;;;GAWG;AACH,KAAK,WAAW,GAAG;IAClB,oCAAoC;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,sCAAsC;IACtC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,yDAAyD;IACzD,UAAU,EAAE,UAAU,CAAC;IACvB,sDAAsD;IACtD,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC,CAAC;AAuOF,QAAA,MAAM,YAAY;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a LaTeX math string into an OMML XML object (fast-xml-parser shape).
|
|
3
|
+
*
|
|
4
|
+
* The returned object has the shape `{ "m:oMathPara": { "m:oMath": { … } } }`,
|
|
5
|
+
* matching what the core pipeline stores as `TextSegment.equationXml`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function convertLatexToOmml(latex: string): Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* Best-effort reverse-convert an OMML node back to LaTeX for editing. Complex
|
|
10
|
+
* equations may not round-trip perfectly.
|
|
11
|
+
*/
|
|
12
|
+
export declare function convertOmmlToLatex(omml: Record<string, unknown>): string;
|
|
13
|
+
//# sourceMappingURL=latex-to-omml.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latex-to-omml.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/latex-to-omml.ts"],"names":[],"mappings":"AA0lBA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmCzE;AAoLD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAgBxE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SmartArtLayout } from 'pptx-viewer-core';
|
|
2
|
+
/**
|
|
3
|
+
* smart-art-presets — the SmartArt insert-gallery catalogue.
|
|
4
|
+
*
|
|
5
|
+
* Vue port of the React package's `smart-art-presets.ts`. Pure data + types,
|
|
6
|
+
* kept framework-agnostic and unit-testable; consumed by `SmartArtPreviews.vue`
|
|
7
|
+
* (thumbnail resolution) and `InsertSmartArtDialog.vue` (gallery + node-text
|
|
8
|
+
* entry). Each preset names a core {@link SmartArtLayout}, the sidebar category
|
|
9
|
+
* it lives under, a human-readable label, and the default node texts inserted
|
|
10
|
+
* when the user picks it without editing.
|
|
11
|
+
*/
|
|
12
|
+
/** The five categories surfaced in the dialog's left sidebar. */
|
|
13
|
+
export type SmartArtCategory = 'list' | 'process' | 'cycle' | 'hierarchy' | 'relationship';
|
|
14
|
+
/** A single entry in the SmartArt insert gallery. */
|
|
15
|
+
export interface SmartArtPreset {
|
|
16
|
+
/** Core layout kind this preset inserts. */
|
|
17
|
+
layout: SmartArtLayout;
|
|
18
|
+
/** Display label (English fallback). */
|
|
19
|
+
label: string;
|
|
20
|
+
/** Sidebar category. */
|
|
21
|
+
category: SmartArtCategory;
|
|
22
|
+
/** Default node texts to seed the new SmartArt with. */
|
|
23
|
+
defaultItems: string[];
|
|
24
|
+
}
|
|
25
|
+
export declare const PRESETS: SmartArtPreset[];
|
|
26
|
+
/** Sidebar tabs, in display order. `label` is a (best-effort) i18n key. */
|
|
27
|
+
export declare const CATEGORIES: Array<{
|
|
28
|
+
id: SmartArtCategory;
|
|
29
|
+
label: string;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=smart-art-presets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-art-presets.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/smart-art-presets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;;GASG;AAIH,iEAAiE;AACjE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,cAAc,CAAC;AAE3F,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC9B,4CAA4C;IAC5C,MAAM,EAAE,cAAc,CAAC;IACvB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,wDAAwD;IACxD,YAAY,EAAE,MAAM,EAAE,CAAC;CACvB;AAID,eAAO,MAAM,OAAO,EAAE,cAAc,EA0KnC,CAAC;AAIF,2EAA2E;AAC3E,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAMrE,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Viewer settings model for the Vue Settings dialog.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the boolean preferences exposed by the React package's
|
|
5
|
+
* `SettingsDialog.tsx` (`packages/react/src/viewer/components/SettingsDialog.tsx`):
|
|
6
|
+
* autosave, spell-check, show-grid, show-rulers, snap-to-grid, reduced-motion.
|
|
7
|
+
*
|
|
8
|
+
* The React dialog drives these through individual props/callbacks
|
|
9
|
+
* (`showGrid` + `onSetShowGrid`, etc.) with `autoSave` kept as dialog-local
|
|
10
|
+
* state. The Vue port consolidates them into a single `ViewerSettings` object
|
|
11
|
+
* so the dialog can take one `settings` prop and emit one `update(settings)`
|
|
12
|
+
* payload, which is easier to wire into a host's reactive state.
|
|
13
|
+
*
|
|
14
|
+
* These are pure data — no framework imports — so the type/defaults stay
|
|
15
|
+
* trivially reusable and unit-testable.
|
|
16
|
+
*/
|
|
17
|
+
/** User-tunable viewer/editor preferences surfaced by the Settings dialog. */
|
|
18
|
+
export interface ViewerSettings {
|
|
19
|
+
/** Autosave the presentation in the background. */
|
|
20
|
+
autoSave: boolean;
|
|
21
|
+
/** Run the browser spell-checker over editable text. */
|
|
22
|
+
spellCheck: boolean;
|
|
23
|
+
/** Show the alignment grid overlay on the canvas. */
|
|
24
|
+
showGrid: boolean;
|
|
25
|
+
/** Show horizontal/vertical rulers around the canvas. */
|
|
26
|
+
showRulers: boolean;
|
|
27
|
+
/** Snap element drag/resize to the grid. */
|
|
28
|
+
snapToGrid: boolean;
|
|
29
|
+
/** Honour the user's reduced-motion preference (disable animations). */
|
|
30
|
+
reducedMotion: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Default viewer settings — matches the React dialog's initial state. */
|
|
33
|
+
export declare const DEFAULT_VIEWER_SETTINGS: ViewerSettings;
|
|
34
|
+
/** A single entry in the keyboard-shortcuts reference tab. */
|
|
35
|
+
export interface ShortcutReferenceItem {
|
|
36
|
+
/** Human-readable action name. */
|
|
37
|
+
action: string;
|
|
38
|
+
/** The key combination(s) that trigger it. */
|
|
39
|
+
shortcut: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Keyboard-shortcut reference shown in the dialog's "Shortcuts" tab.
|
|
43
|
+
* Ported verbatim from the React package's `SHORTCUT_REFERENCE_ITEMS`
|
|
44
|
+
* (`packages/react/src/viewer/constants/toolbar.ts`).
|
|
45
|
+
*/
|
|
46
|
+
export declare const SHORTCUT_REFERENCE_ITEMS: ShortcutReferenceItem[];
|
|
47
|
+
/** A toggleable setting's metadata for rendering the General tab. */
|
|
48
|
+
export interface SettingToggleSpec {
|
|
49
|
+
/** The `ViewerSettings` boolean key this toggle controls. */
|
|
50
|
+
key: keyof ViewerSettings;
|
|
51
|
+
/** Display label. */
|
|
52
|
+
label: string;
|
|
53
|
+
}
|
|
54
|
+
/** Ordered list of the General-tab toggles (mirrors the React dialog order). */
|
|
55
|
+
export declare const SETTING_TOGGLES: SettingToggleSpec[];
|
|
56
|
+
//# sourceMappingURL=viewer-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewer-settings.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/viewer-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC9B,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAC;IACpB,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,yDAAyD;IACzD,UAAU,EAAE,OAAO,CAAC;IACpB,4CAA4C;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,wEAAwE;IACxE,aAAa,EAAE,OAAO,CAAC;CACvB;AAED,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB,EAAE,cAOrC,CAAC;AAEF,8DAA8D;AAC9D,MAAM,WAAW,qBAAqB;IACrC,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,qBAAqB,EAa3D,CAAC;AAEF,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IACjC,6DAA6D;IAC7D,GAAG,EAAE,MAAM,cAAc,CAAC;IAC1B,qBAAqB;IACrB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,gFAAgF;AAChF,eAAO,MAAM,eAAe,EAAE,iBAAiB,EAO9C,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { PptxElement, PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
/**
|
|
3
|
+
* slide-compare — pure, framework-agnostic slide-diff engine for the Vue viewer.
|
|
4
|
+
*
|
|
5
|
+
* This is the Vue port of the React package's `viewer/utils/compare.ts`
|
|
6
|
+
* (`comparePresentation`). The React version diffs two full `PptxData`
|
|
7
|
+
* documents; this version diffs two `PptxSlide[]` arrays directly (the editor
|
|
8
|
+
* foundation operates purely on the slide model), plus a `compareSlide` helper
|
|
9
|
+
* for diffing a single slide pair.
|
|
10
|
+
*
|
|
11
|
+
* The module is intentionally DOM-free and side-effect-free so it can be unit
|
|
12
|
+
* tested in isolation and reused by both `ComparePanel.vue` / `SlideDiffRow.vue`
|
|
13
|
+
* and any future programmatic merge logic.
|
|
14
|
+
*/
|
|
15
|
+
export type SlideDiffStatus = 'added' | 'removed' | 'changed' | 'unchanged';
|
|
16
|
+
export type ElementChangeKind = 'added' | 'removed' | 'moved' | 'resized' | 'textChanged';
|
|
17
|
+
export interface ElementChange {
|
|
18
|
+
elementId: string;
|
|
19
|
+
label: string;
|
|
20
|
+
kind: ElementChangeKind;
|
|
21
|
+
description: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SlideDiff {
|
|
24
|
+
status: SlideDiffStatus;
|
|
25
|
+
/** Index in the base (current) slide list, or -1 for added slides. */
|
|
26
|
+
baseIndex: number;
|
|
27
|
+
/** Index in the compare (incoming) slide list, or -1 for removed slides. */
|
|
28
|
+
compareIndex: number;
|
|
29
|
+
/** The base slide data (undefined for added slides). */
|
|
30
|
+
baseSlide?: PptxSlide;
|
|
31
|
+
/** The compare slide data (undefined for removed slides). */
|
|
32
|
+
compareSlide?: PptxSlide;
|
|
33
|
+
/** Per-element changes when status is `changed`. */
|
|
34
|
+
changes: ElementChange[];
|
|
35
|
+
}
|
|
36
|
+
export interface CompareResult {
|
|
37
|
+
diffs: SlideDiff[];
|
|
38
|
+
baseSlideCount: number;
|
|
39
|
+
compareSlideCount: number;
|
|
40
|
+
addedCount: number;
|
|
41
|
+
removedCount: number;
|
|
42
|
+
changedCount: number;
|
|
43
|
+
unchangedCount: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Diff the (flattened) element trees of two slides into a list of changes:
|
|
47
|
+
* added / removed elements, plus moved / resized / text-changed for elements
|
|
48
|
+
* present in both. Matching is by stable element `id`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function diffSlideElements(baseElements: PptxElement[], compareElements: PptxElement[]): ElementChange[];
|
|
51
|
+
/**
|
|
52
|
+
* Diff a single base/compare slide pair, producing element changes plus
|
|
53
|
+
* background- and notes-level changes. Returns the change list (empty when the
|
|
54
|
+
* slides are equivalent within tolerance).
|
|
55
|
+
*/
|
|
56
|
+
export declare function compareSlide(base: PptxSlide, compare: PptxSlide): ElementChange[];
|
|
57
|
+
/**
|
|
58
|
+
* Compare two slide arrays position-by-position, producing a {@link SlideDiff}
|
|
59
|
+
* per slot: `removed` (only in base), `added` (only in compare), `changed`
|
|
60
|
+
* (both present with differences), or `unchanged`.
|
|
61
|
+
*
|
|
62
|
+
* Mirrors the React `comparePresentation`, but operates on `PptxSlide[]`
|
|
63
|
+
* directly rather than a full `PptxData` document.
|
|
64
|
+
*/
|
|
65
|
+
export declare function compareSlides(base: PptxSlide[], compare: PptxSlide[]): CompareResult;
|
|
66
|
+
//# sourceMappingURL=slide-compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide-compare.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/slide-compare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG/D;;;;;;;;;;;;GAYG;AAMH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAE5E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AAE1F,MAAM,WAAW,aAAa;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,iBAAiB,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACzB,MAAM,EAAE,eAAe,CAAC;IACxB,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,oDAAoD;IACpD,OAAO,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC7B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACvB;AAyDD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAChC,YAAY,EAAE,WAAW,EAAE,EAC3B,eAAe,EAAE,WAAW,EAAE,GAC5B,aAAa,EAAE,CAyEjB;AAMD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,aAAa,EAAE,CAsBjF;AAMD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,aAAa,CAkEpF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PptxSlide } from 'pptx-viewer-core';
|
|
2
|
+
import { ComputedRef, Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* useVersionHistory — named, restorable snapshots of the live slide model.
|
|
5
|
+
*
|
|
6
|
+
* Vue port of the React version-history subsystem. Where the React
|
|
7
|
+
* `VersionHistoryPanel` reads serialised `.pptx` blobs out of the autosave
|
|
8
|
+
* IndexedDB store, this composable keeps an in-memory list of **deep-cloned
|
|
9
|
+
* slide snapshots** (via the core `cloneSlide` helper), each tagged with a
|
|
10
|
+
* caller-supplied label and timestamp.
|
|
11
|
+
*
|
|
12
|
+
* Design notes:
|
|
13
|
+
* - **Pure capture path.** `capture` does *not* call `Date.now()` — the caller
|
|
14
|
+
* passes a `label` and `now` (epoch ms). This keeps snapshot creation
|
|
15
|
+
* deterministic and unit-testable; the UI layer supplies `Date.now()`.
|
|
16
|
+
* - **History-aware restore.** `restore` snapshots the current live state onto
|
|
17
|
+
* the editor undo stack (via the injected `pushHistory`) *before* replacing
|
|
18
|
+
* `slides.value`, so a restore is a single undoable step.
|
|
19
|
+
* - **Bounded list.** The snapshot list is capped (oldest dropped first) to
|
|
20
|
+
* bound memory for long editing sessions.
|
|
21
|
+
*/
|
|
22
|
+
/** Default cap on retained snapshots (oldest dropped first when exceeded). */
|
|
23
|
+
export declare const DEFAULT_MAX_VERSIONS = 50;
|
|
24
|
+
/** A single captured version: a deep-cloned slide array + metadata. */
|
|
25
|
+
export interface SlideVersion {
|
|
26
|
+
/** Stable, collision-resistant identifier. */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Human-readable label supplied at capture time. */
|
|
29
|
+
label: string;
|
|
30
|
+
/** Capture time in epoch milliseconds, supplied by the caller. */
|
|
31
|
+
timestamp: number;
|
|
32
|
+
/** Number of slides in the snapshot (cheap summary for the UI). */
|
|
33
|
+
slideCount: number;
|
|
34
|
+
/** The deep-cloned slide snapshot. */
|
|
35
|
+
slides: PptxSlide[];
|
|
36
|
+
}
|
|
37
|
+
export interface UseVersionHistoryOptions {
|
|
38
|
+
/** The live editor slide list (typically a `shallowRef<PptxSlide[]>`). */
|
|
39
|
+
slides: Ref<PptxSlide[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Snapshot the current live state onto the editor undo stack before a
|
|
42
|
+
* restore reassigns `slides.value`, so a restore is one undoable step.
|
|
43
|
+
*/
|
|
44
|
+
pushHistory: () => void;
|
|
45
|
+
/** Maximum number of retained versions. Defaults to {@link DEFAULT_MAX_VERSIONS}. */
|
|
46
|
+
maxVersions?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface UseVersionHistoryResult {
|
|
49
|
+
/** Reactive, newest-last list of captured versions. */
|
|
50
|
+
versions: Ref<SlideVersion[]>;
|
|
51
|
+
/** True when at least one version has been captured. */
|
|
52
|
+
hasVersions: ComputedRef<boolean>;
|
|
53
|
+
/**
|
|
54
|
+
* Capture the current `slides.value` as a new named version.
|
|
55
|
+
*
|
|
56
|
+
* @param label A human-readable label (e.g. "Before edit", a filename).
|
|
57
|
+
* @param now Capture timestamp in epoch ms (caller supplies `Date.now()`).
|
|
58
|
+
* @returns The created {@link SlideVersion}.
|
|
59
|
+
*/
|
|
60
|
+
capture: (label: string, now: number) => SlideVersion;
|
|
61
|
+
/**
|
|
62
|
+
* Restore the version with the given id into the live slide ref. Snapshots
|
|
63
|
+
* the current state onto the undo stack first (history-aware). No-op when the
|
|
64
|
+
* id is unknown. Returns `true` when a restore occurred.
|
|
65
|
+
*/
|
|
66
|
+
restore: (id: string) => boolean;
|
|
67
|
+
/** Remove the version with the given id. Returns `true` when one was removed. */
|
|
68
|
+
remove: (id: string) => boolean;
|
|
69
|
+
/** Drop every captured version. */
|
|
70
|
+
clear: () => void;
|
|
71
|
+
}
|
|
72
|
+
export declare function useVersionHistory(options: UseVersionHistoryOptions): UseVersionHistoryResult;
|
|
73
|
+
//# sourceMappingURL=useVersionHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVersionHistory.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useVersionHistory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C;;;;;;;;;;;;;;;;;;GAkBG;AAMH,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAMvC,uEAAuE;AACvE,MAAM,WAAW,YAAY;IAC5B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACxC,0EAA0E;IAC1E,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IACzB;;;OAGG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACvC,uDAAuD;IACvD,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9B,wDAAwD;IACxD,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,YAAY,CAAC;IACtD;;;;OAIG;IACH,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,iFAAiF;IACjF,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAChC,mCAAmC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;CAClB;AAuBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,uBAAuB,CA8D5F"}
|
package/dist/viewer/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const e = require("../viewer-
|
|
2
|
+
const e = require("../viewer-CeeHIv08.cjs");
|
|
3
3
|
exports.ChartRenderer = e.ChartRenderer_default, exports.ConnectorRenderer = e.ConnectorRenderer_default, exports.DEFAULT_CANVAS_HEIGHT = e.DEFAULT_CANVAS_HEIGHT, exports.DEFAULT_CANVAS_WIDTH = e.DEFAULT_CANVAS_WIDTH, exports.DEFAULT_FILL_COLOR = e.DEFAULT_FILL_COLOR, exports.DEFAULT_STROKE_COLOR = e.DEFAULT_STROKE_COLOR, exports.DEFAULT_TEXT_COLOR = e.DEFAULT_TEXT_COLOR, exports.ElementRenderer = e.ElementRenderer_default, exports.EquationRenderer = e.EquationRenderer_default, exports.InkRenderer = e.InkRenderer_default, exports.Model3DRenderer = e.Model3DRenderer_default, exports.OleRenderer = e.OleRenderer_default, exports.PowerPointViewer = e.PowerPointViewer_default, exports.SlideCanvas = e.SlideCanvas_default, exports.SlideStage = e.SlideStage_default, exports.SmartArtRenderer = e.SmartArtRenderer_default, exports.TableRenderer = e.TableRenderer_default, exports.WordArtText = e.WordArtText_default, exports.ZoomRenderer = e.ZoomRenderer_default, exports.buildInitialGuides = e.buildInitialGuides, exports.collectImagePaths = e.collectImagePaths, exports.collectMediaElements = e.collectMediaElements, exports.getContainerStyle = e.getContainerStyle, exports.getImageSrc = e.getImageSrc, exports.getResolvedShapeClipPath = e.getResolvedShapeClipPath, exports.getResolvedShapeClipPathFor = e.getResolvedShapeClipPathFor, exports.getShapeFillStrokeStyle = e.getShapeFillStrokeStyle, exports.getTextBlockStyle = e.getTextBlockStyle, exports.useEditorHistory = e.useEditorHistory, exports.useEditorOperations = e.useEditorOperations, exports.useLoadContent = e.useLoadContent;
|
package/dist/viewer/index.cjs.br
CHANGED
|
Binary file
|
package/dist/viewer/index.cjs.gz
CHANGED
|
Binary file
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as a, D as s, E as e, I as r, L as n, M as d, O as o, T as t, _ as R, a as i, b as l, c as m, d as S, f as p, g as v, h as w, i as x, j as A, k as C, l as E, m as T, n as b, o as c, p as f, r as g, s as h, t as j, u as k, v as u, x as D, y as I } from "../viewer-
|
|
1
|
+
import { A as a, D as s, E as e, I as r, L as n, M as d, O as o, T as t, _ as R, a as i, b as l, c as m, d as S, f as p, g as v, h as w, i as x, j as A, k as C, l as E, m as T, n as b, o as c, p as f, r as g, s as h, t as j, u as k, v as u, x as D, y as I } from "../viewer-BwIIU3HV.js";
|
|
2
2
|
export { R as ChartRenderer, v as ConnectorRenderer, t as DEFAULT_CANVAS_HEIGHT, e as DEFAULT_CANVAS_WIDTH, s as DEFAULT_FILL_COLOR, o as DEFAULT_STROKE_COLOR, C as DEFAULT_TEXT_COLOR, h as ElementRenderer, w as EquationRenderer, T as InkRenderer, f as Model3DRenderer, p as OleRenderer, j as PowerPointViewer, i as SlideCanvas, c as SlideStage, S as SmartArtRenderer, k as TableRenderer, E as WordArtText, m as ZoomRenderer, a as buildInitialGuides, A as collectImagePaths, d as collectMediaElements, u as getContainerStyle, I as getImageSrc, r as getResolvedShapeClipPath, n as getResolvedShapeClipPathFor, l as getShapeFillStrokeStyle, D as getTextBlockStyle, x as useEditorHistory, g as useEditorOperations, b as useLoadContent };
|
package/dist/viewer/index.js.br
CHANGED
|
Binary file
|
package/dist/viewer/index.js.gz
CHANGED
|
Binary file
|