pptx-vue-viewer 1.1.44 → 1.1.45

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.
Files changed (44) hide show
  1. package/dist/gif-encoder-CeSrIePP.cjs +2 -0
  2. package/dist/gif-encoder-CeSrIePP.cjs.br +0 -0
  3. package/dist/gif-encoder-CeSrIePP.cjs.gz +0 -0
  4. package/dist/gif-encoder-Dn0Lyblu.js +2 -0
  5. package/dist/gif-encoder-Dn0Lyblu.js.br +3 -0
  6. package/dist/gif-encoder-Dn0Lyblu.js.gz +0 -0
  7. package/dist/index.cjs +1 -1
  8. package/dist/index.cjs.br +0 -0
  9. package/dist/index.cjs.gz +0 -0
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.br +0 -0
  12. package/dist/index.js.gz +0 -0
  13. package/dist/viewer/components/OleRenderer.vue.d.ts.map +1 -1
  14. package/dist/viewer/components/SmartArtRenderer.vue.d.ts.map +1 -1
  15. package/dist/viewer/components/StatusBar.vue.d.ts +2 -2
  16. package/dist/viewer/composables/ole-actions.d.ts +27 -0
  17. package/dist/viewer/composables/ole-actions.d.ts.map +1 -0
  18. package/dist/viewer/composables/smartart-inline-edit.d.ts +40 -0
  19. package/dist/viewer/composables/smartart-inline-edit.d.ts.map +1 -0
  20. package/dist/viewer/composables/smartart-node-edit.d.ts +30 -0
  21. package/dist/viewer/composables/smartart-node-edit.d.ts.map +1 -0
  22. package/dist/viewer/index.cjs +1 -1
  23. package/dist/viewer/index.cjs.br +0 -0
  24. package/dist/viewer/index.cjs.gz +0 -0
  25. package/dist/viewer/index.js +1 -1
  26. package/dist/viewer/index.js.br +0 -0
  27. package/dist/viewer/index.js.gz +0 -0
  28. package/dist/{viewer-BHz85l6q.js → viewer-CDaGb1N4.js} +2109 -1961
  29. package/dist/viewer-CDaGb1N4.js.br +0 -0
  30. package/dist/viewer-CDaGb1N4.js.gz +0 -0
  31. package/dist/{viewer-B_sWT8fW.cjs → viewer-DivLraRu.cjs} +2131 -1983
  32. package/dist/viewer-DivLraRu.cjs.br +0 -0
  33. package/dist/viewer-DivLraRu.cjs.gz +0 -0
  34. package/package.json +1 -1
  35. package/dist/gif-encoder-CMjyDShT.js +0 -2
  36. package/dist/gif-encoder-CMjyDShT.js.br +0 -3
  37. package/dist/gif-encoder-CMjyDShT.js.gz +0 -0
  38. package/dist/gif-encoder-CoI1lDDP.cjs +0 -2
  39. package/dist/gif-encoder-CoI1lDDP.cjs.br +0 -0
  40. package/dist/gif-encoder-CoI1lDDP.cjs.gz +0 -0
  41. package/dist/viewer-BHz85l6q.js.br +0 -0
  42. package/dist/viewer-BHz85l6q.js.gz +0 -0
  43. package/dist/viewer-B_sWT8fW.cjs.br +0 -0
  44. package/dist/viewer-B_sWT8fW.cjs.gz +0 -0
@@ -0,0 +1,2 @@
1
+ const e = require("./viewer-DivLraRu.cjs");
2
+ exports.encodeGif = e.encodeGif;
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ import { L as r } from "./viewer-CDaGb1N4.js";
2
+ export { r as encodeGif };
@@ -0,0 +1,3 @@
1
+ �$�import { L as r } from "./viewer-CDaGb1N4.js";
2
+ export { r as encodeGif };
3
+ 
Binary file
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const e = require("./viewer-B_sWT8fW.cjs");
2
+ const e = require("./viewer-DivLraRu.cjs");
3
3
  exports.ElementRenderer = e.ElementRenderer_default, exports.PowerPointViewer = e.PowerPointViewer_default, exports.SlideCanvas = e.SlideCanvas_default, exports.SlideStage = e.SlideStage_default, exports.cn = e.cn, exports.defaultCssVars = e.defaultCssVars, exports.defaultRadius = e.defaultRadius, exports.defaultThemeColors = e.defaultThemeColors, exports.provideViewerTheme = e.provideViewerTheme, exports.themeToCssVars = e.themeToCssVars, exports.useThemeStyle = e.useThemeStyle, exports.useViewerTheme = e.useViewerTheme;
package/dist/index.cjs.br CHANGED
Binary file
package/dist/index.cjs.gz CHANGED
Binary file
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as a, B as s, F as e, I as r, O as i, P as o, a as t, c as n, k as d, o as l, s as m, t as w } from "./viewer-BHz85l6q.js";
1
+ import { A as a, B as s, F as e, I as r, O as i, P as o, a as t, c as n, k as d, o as l, s as m, t as w } from "./viewer-CDaGb1N4.js";
2
2
  export { n as ElementRenderer, w as PowerPointViewer, t as SlideCanvas, m as SlideStage, l as cn, o as defaultCssVars, e as defaultRadius, r as defaultThemeColors, i as provideViewerTheme, s as themeToCssVars, d as useThemeStyle, a as useViewerTheme };
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"OleRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/OleRenderer.vue"],"names":[],"mappings":"AAkXA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAMpE;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAwbF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"OleRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/OleRenderer.vue"],"names":[],"mappings":"AAugBA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAOpE;;;;;;;;;;;;GAYG;AACH,KAAK,WAAW,GAAG;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAsiBF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SmartArtRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/SmartArtRenderer.vue"],"names":[],"mappings":"AAkdA,OAAO,KAAK,EACX,WAAW,EAMX,MAAM,kBAAkB,CAAC;AAa1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,KAAK,WAAW,GAAG;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAyZF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"SmartArtRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/SmartArtRenderer.vue"],"names":[],"mappings":"AA8kBA,OAAO,KAAK,EACX,WAAW,EAMX,MAAM,kBAAkB,CAAC;AAqB1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,KAAK,WAAW,GAAG;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AA2hBF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -18,14 +18,14 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
18
18
  "zoom-out": () => any;
19
19
  "zoom-to-fit": () => any;
20
20
  "toggle-notes": () => any;
21
- "set-mode": (mode: "present" | "edit") => any;
21
+ "set-mode": (mode: "edit" | "present") => any;
22
22
  "toggle-slide-sorter": () => any;
23
23
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
24
  "onZoom-in"?: (() => any) | undefined;
25
25
  "onZoom-out"?: (() => any) | undefined;
26
26
  "onZoom-to-fit"?: (() => any) | undefined;
27
27
  "onToggle-notes"?: (() => any) | undefined;
28
- "onSet-mode"?: ((mode: "present" | "edit") => any) | undefined;
28
+ "onSet-mode"?: ((mode: "edit" | "present") => any) | undefined;
29
29
  "onToggle-slide-sorter"?: (() => any) | undefined;
30
30
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
31
31
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Embedded-OLE action helpers (Vue-local).
3
+ *
4
+ * Core recovers the embedded payload of an `OlePptxElement` on load
5
+ * (`oleEmbeddedData` data-URL, `oleEmbeddedFileName`, `oleEmbeddedMimeType`,
6
+ * `oleEmbeddedByteSize`). These pure helpers turn those fields into the values
7
+ * the OLE renderer needs for a Download / Open action and a richer info caption:
8
+ * a human-readable byte size and a "can the browser open this inline?" predicate.
9
+ *
10
+ * These are intentionally framework-agnostic and small; they are kept local to
11
+ * the Vue binding to avoid concurrent edits to `pptx-viewer-shared`. The shared
12
+ * extraction sweep can dedupe them later.
13
+ */
14
+ /**
15
+ * Format a byte count as a short human-readable string (e.g. `1.5 KB`,
16
+ * `2.3 MB`). Returns `undefined` for missing / non-finite / negative input so
17
+ * callers can omit the size caption entirely.
18
+ */
19
+ export declare function formatBytes(bytes: number | undefined): string | undefined;
20
+ /**
21
+ * Whether a MIME type is one a browser can render directly in a new tab
22
+ * (PDF, any image, plain text / common text-ish formats). Used to decide
23
+ * whether to offer an "Open" action alongside "Download". Unknown / binary
24
+ * (e.g. Office documents) types return `false` - they should be downloaded.
25
+ */
26
+ export declare function isBrowserOpenableMime(mime: string | undefined): boolean;
27
+ //# sourceMappingURL=ole-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ole-actions.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/ole-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAkBzE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAoBvE"}
@@ -0,0 +1,40 @@
1
+ import { PptxSmartArtNode } from 'pptx-viewer-core';
2
+ import { InlineEditRect } from 'pptx-viewer-shared';
3
+ import { ComputedRef, Ref } from 'vue';
4
+ /**
5
+ * smartart-inline-edit (Vue): reactive state + node-id mapping for on-canvas
6
+ * SmartArt node text editing. Kept out of the SFC so the component stays thin
7
+ * (CLAUDE.md <= 300 LOC) and the mapping is unit-testable.
8
+ *
9
+ * Pure rect projection and the no-op-commit guard live in the framework-agnostic
10
+ * `pptx-viewer-shared` (`computeInlineEditorRect`, `shouldCommitSmartArtNodeText`)
11
+ * and are reused here rather than reimplemented. This module adds only the
12
+ * Vue-reactive edit state and the rendered-node -> source-node-id mapping.
13
+ */
14
+ /**
15
+ * Pair each rendered fallback-layout node with its source node id by matching
16
+ * `flattenNodes` order: the per-family layout functions iterate the flattened
17
+ * tree in the same order, so index `i` of the rendered list corresponds to
18
+ * index `i` of the flattened source tree.
19
+ */
20
+ export declare function nodeIdsInRenderOrder(roots: readonly PptxSmartArtNode[]): string[];
21
+ /**
22
+ * Ids of flattened nodes that carry text, in order. Used by the drawing-shape
23
+ * path, where each text-bearing shape corresponds positionally to a text-bearing
24
+ * node (decoration shapes such as connectors carry no text and are skipped).
25
+ */
26
+ export declare function textNodeIdsInRenderOrder(roots: readonly PptxSmartArtNode[]): string[];
27
+ /** Project a node's on-screen rect into container-relative pixels for overlay. */
28
+ export declare function inlineEditorRect(nodeRect: InlineEditRect, containerRect: InlineEditRect): InlineEditRect;
29
+ /** Reactive inline-edit state shared with the renderer template. */
30
+ export interface SmartArtInlineEditState {
31
+ editingNodeId: Ref<string | null>;
32
+ draft: Ref<string>;
33
+ rect: Ref<InlineEditRect | null>;
34
+ isEditing: ComputedRef<boolean>;
35
+ begin: (nodeId: string, text: string, rect: InlineEditRect) => void;
36
+ cancel: () => void;
37
+ }
38
+ /** Construct the reactive edit-state container (no commit policy here). */
39
+ export declare function useSmartArtInlineEditState(): SmartArtInlineEditState;
40
+ //# sourceMappingURL=smartart-inline-edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartart-inline-edit.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/smartart-inline-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C;;;;;;;;;GASG;AAEH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,EAAE,CAEjF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,GAAG,MAAM,EAAE,CAIrF;AAED,kFAAkF;AAClF,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,cAAc,EACxB,aAAa,EAAE,cAAc,GAC3B,cAAc,CAEhB;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACvC,aAAa,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,IAAI,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IACpE,MAAM,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,2EAA2E;AAC3E,wBAAgB,0BAA0B,IAAI,uBAAuB,CAoBpE"}
@@ -0,0 +1,30 @@
1
+ import { InjectionKey } from 'vue';
2
+ /**
3
+ * Inline SmartArt node-text editing context, provided once at the viewer root
4
+ * and injected by `SmartArtRenderer` so the hot `SlideStage` ->
5
+ * `ElementRenderer` prop chain does not have to thread an `editable` flag and a
6
+ * commit callback through every element. This mirrors the `TableCellEditKey`
7
+ * pattern in `table-edit`, and routes every commit through the SAME
8
+ * history-tracked editor op the inspector uses (`updateSmartArtNodeText` via
9
+ * `useEditorOperations.updateElement`), so undo/redo and save round-trip work
10
+ * identically for on-canvas edits and inspector edits.
11
+ */
12
+ export interface SmartArtNodeEditContext {
13
+ /** Whether inline node editing is currently allowed (edit mode + not presenting). */
14
+ canEdit: () => boolean;
15
+ /**
16
+ * Commit a single node's new text. The handler resolves the SmartArt element
17
+ * by id, applies the immutable `updateSmartArtNodeText` op, and records the
18
+ * change through the history-tracked editor op.
19
+ */
20
+ commit: (elementId: string, nodeId: string, text: string) => void;
21
+ }
22
+ /** Typed injection key for the SmartArt node-edit context. */
23
+ export declare const SmartArtNodeEditKey: InjectionKey<SmartArtNodeEditContext>;
24
+ /**
25
+ * Resolve the injected {@link SmartArtNodeEditContext}, if any. Returns
26
+ * `undefined` when no editing context is provided (read-only viewer), in which
27
+ * case the renderer draws without inline node editing.
28
+ */
29
+ export declare function injectSmartArtNodeEdit(): SmartArtNodeEditContext | undefined;
30
+ //# sourceMappingURL=smartart-node-edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smartart-node-edit.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/smartart-node-edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAGxC;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IACvC,qFAAqF;IACrF,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClE;AAED,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,uBAAuB,CAErE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,uBAAuB,GAAG,SAAS,CAE5E"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const e = require("../viewer-B_sWT8fW.cjs");
2
+ const e = require("../viewer-DivLraRu.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;
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import { C as a, D as s, E as e, M as r, N as n, R as d, S as t, T as o, _ as R, a as i, b as l, c as m, d as S, f as w, g as C, h as p, i as v, j as x, l as E, m as T, n as b, p as c, r as f, s as g, t as h, u as j, v as u, w as A, x as D, y as M, z as P } from "../viewer-BHz85l6q.js";
1
+ import { C as a, D as s, E as e, M as r, N as n, R as d, S as t, T as o, _ as R, a as i, b as l, c as m, d as S, f as w, g as C, h as p, i as v, j as x, l as E, m as T, n as b, p as c, r as f, s as g, t as h, u as j, v as u, w as A, x as D, y as M, z as P } from "../viewer-CDaGb1N4.js";
2
2
  export { u as ChartRenderer, R as ConnectorRenderer, a as DEFAULT_CANVAS_HEIGHT, A as DEFAULT_CANVAS_WIDTH, o as DEFAULT_FILL_COLOR, e as DEFAULT_STROKE_COLOR, s as DEFAULT_TEXT_COLOR, m as ElementRenderer, C as EquationRenderer, p as InkRenderer, T as Model3DRenderer, c as OleRenderer, h as PowerPointViewer, i as SlideCanvas, g as SlideStage, w as SmartArtRenderer, S as TableRenderer, j as WordArtText, E as ZoomRenderer, x as buildInitialGuides, r as collectImagePaths, n as collectMediaElements, M as getContainerStyle, l as getImageSrc, d as getResolvedShapeClipPath, P as getResolvedShapeClipPathFor, D as getShapeFillStrokeStyle, t as getTextBlockStyle, v as useEditorHistory, f as useEditorOperations, b as useLoadContent };
Binary file
Binary file