pptx-vue-viewer 1.1.80 → 1.1.82

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 (63) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +19 -0
  3. package/dist/gif-encoder-C6t5ycNh.js +2 -0
  4. package/dist/gif-encoder-C6t5ycNh.js.br +0 -0
  5. package/dist/gif-encoder-C6t5ycNh.js.gz +0 -0
  6. package/dist/gif-encoder-DNTYa1LK.cjs +2 -0
  7. package/dist/gif-encoder-DNTYa1LK.cjs.br +0 -0
  8. package/dist/gif-encoder-DNTYa1LK.cjs.gz +0 -0
  9. package/dist/i18n.cjs +15 -6
  10. package/dist/i18n.cjs.br +0 -0
  11. package/dist/i18n.cjs.gz +0 -0
  12. package/dist/i18n.d.ts +4 -1
  13. package/dist/i18n.d.ts.map +1 -1
  14. package/dist/i18n.js +16 -8
  15. package/dist/i18n.js.br +0 -0
  16. package/dist/i18n.js.gz +0 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.cjs.br +0 -0
  19. package/dist/index.cjs.gz +0 -0
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.br +1 -1
  22. package/dist/index.js.gz +0 -0
  23. package/dist/viewer/PowerPointViewer.vue.d.ts.map +1 -1
  24. package/dist/viewer/components/ConnectorRenderer.vue.d.ts +3 -1
  25. package/dist/viewer/components/ConnectorRenderer.vue.d.ts.map +1 -1
  26. package/dist/viewer/components/InkRenderer.vue.d.ts +9 -3
  27. package/dist/viewer/components/InkRenderer.vue.d.ts.map +1 -1
  28. package/dist/viewer/components/ribbon/RibbonToolbar.vue.d.ts.map +1 -1
  29. package/dist/viewer/composables/useAlignGroup.d.ts +25 -0
  30. package/dist/viewer/composables/useAlignGroup.d.ts.map +1 -0
  31. package/dist/viewer/composables/useContextMenu.d.ts +43 -0
  32. package/dist/viewer/composables/useContextMenu.d.ts.map +1 -0
  33. package/dist/viewer/composables/useElementDrag.d.ts +77 -0
  34. package/dist/viewer/composables/useElementDrag.d.ts.map +1 -0
  35. package/dist/viewer/composables/useElementInsertion.d.ts +40 -0
  36. package/dist/viewer/composables/useElementInsertion.d.ts.map +1 -0
  37. package/dist/viewer/composables/useRibbonActions.d.ts +37 -0
  38. package/dist/viewer/composables/useRibbonActions.d.ts.map +1 -0
  39. package/dist/viewer/composables/useSlideMutations.d.ts +27 -0
  40. package/dist/viewer/composables/useSlideMutations.d.ts.map +1 -0
  41. package/dist/viewer/index.cjs +1 -1
  42. package/dist/viewer/index.cjs.br +0 -0
  43. package/dist/viewer/index.cjs.gz +0 -0
  44. package/dist/viewer/index.js +1 -1
  45. package/dist/viewer/index.js.br +0 -0
  46. package/dist/viewer/index.js.gz +0 -0
  47. package/dist/{viewer-D0LDcvxS.js → viewer-CbdUuxzY.js} +7184 -6943
  48. package/dist/viewer-CbdUuxzY.js.br +0 -0
  49. package/dist/viewer-CbdUuxzY.js.gz +0 -0
  50. package/dist/{viewer-BWYs-dTH.cjs → viewer-DOWJhzgL.cjs} +6489 -6248
  51. package/dist/viewer-DOWJhzgL.cjs.br +0 -0
  52. package/dist/viewer-DOWJhzgL.cjs.gz +0 -0
  53. package/package.json +1 -1
  54. package/dist/gif-encoder-BIhqMhxv.cjs +0 -2
  55. package/dist/gif-encoder-BIhqMhxv.cjs.br +0 -0
  56. package/dist/gif-encoder-BIhqMhxv.cjs.gz +0 -0
  57. package/dist/gif-encoder-DNMhvwEn.js +0 -2
  58. package/dist/gif-encoder-DNMhvwEn.js.br +0 -0
  59. package/dist/gif-encoder-DNMhvwEn.js.gz +0 -0
  60. package/dist/viewer-BWYs-dTH.cjs.br +0 -0
  61. package/dist/viewer-BWYs-dTH.cjs.gz +0 -0
  62. package/dist/viewer-D0LDcvxS.js.br +0 -0
  63. package/dist/viewer-D0LDcvxS.js.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ All notable changes to this project are documented here.
4
4
  This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
5
5
  by [git-cliff](https://git-cliff.org); do not edit it by hand.
6
6
 
7
+ ## [1.1.81](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.1.81) - 2026-07-03
8
+
9
+ ### Features
10
+
11
+ - Document localization and add demo language pickers (by @ChristopherVR) ([a07ad82](https://github.com/ChristopherVR/pptx-viewer/commit/a07ad8279e906590e0392d19cd1637855012a80e))
12
+
13
+ ### Documentation
14
+
15
+ - **vue:** Correct stale parity-gap claims in PORTING.md (by @ChristopherVR) ([1ce524c](https://github.com/ChristopherVR/pptx-viewer/commit/1ce524cf5af80064b0d8268610e40c900ea43204))
16
+ - Close out fixed parity gaps, drop the limitations caveat (by @ChristopherVR) ([53ae1f8](https://github.com/ChristopherVR/pptx-viewer/commit/53ae1f8460c47b1aa313020d2231edee91809fb0))
17
+
18
+ ## [1.1.80](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.1.80) - 2026-07-02
19
+
20
+ ### Features
21
+
22
+ - **shared:** Add canonical i18n translation dictionary (by @ChristopherVR) ([429e386](https://github.com/ChristopherVR/pptx-viewer/commit/429e386c7245fc5cf526ac72481fd5ab23b3e09d))
23
+
24
+ ### Bug Fixes
25
+
26
+ - **react:** Expose i18n dictionary via pptx-react-viewer, not the private shared package (by @ChristopherVR) ([09f49fe](https://github.com/ChristopherVR/pptx-viewer/commit/09f49fe68aa27d3305294f5896d5f53d3b52a160))
27
+ - **vue:** Expose i18n dictionary via pptx-vue-viewer, not the private shared package (by @ChristopherVR) ([8577907](https://github.com/ChristopherVR/pptx-viewer/commit/8577907cf63af3190853b31e7810f477f394fad2))
28
+
7
29
  ## [1.1.78](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vue-viewer@1.1.78) - 2026-07-02
8
30
 
9
31
  ### Features
package/README.md CHANGED
@@ -179,6 +179,25 @@ async function save() {
179
179
  `provideViewerTheme`, `useViewerTheme`, and the `ViewerTheme` / `CanvasSize` /
180
180
  `CollaborationConfig` types.
181
181
 
182
+ ## Localization (i18n)
183
+
184
+ UI labels go through [vue-i18n](https://vue-i18n.intlify.dev/) with dotted keys such as `pptx.statusBar.allSaved`. Create a `vue-i18n` instance with `createI18n()` and install it as a plugin (the demo's `src/i18n.ts` shows a minimal config, including a `missing` handler that derives Title Case labels for any key you don't explicitly translate):
185
+
186
+ ```ts
187
+ import { translationsEn, keyToLabel } from 'pptx-vue-viewer/i18n';
188
+ import { createI18n } from 'vue-i18n';
189
+
190
+ const i18n = createI18n({
191
+ legacy: false,
192
+ locale: 'en',
193
+ fallbackLocale: 'en',
194
+ messages: { en: translationsEn },
195
+ missing: (_locale, key) => keyToLabel(key),
196
+ });
197
+ ```
198
+
199
+ Switch languages with `i18n.global.locale.value = 'fr'`. `pptx-vue-viewer/i18n` also exports a `TranslationKey` type for type-checking a new locale dictionary (`Record<TranslationKey, string>`) at compile time. See the [Localization guide](https://christophervr.github.io/pptx-viewer/guide/localization) for the full picture across all three bindings and how to contribute a translation upstream; the live demo's language picker is a working reference.
200
+
182
201
  ## Limitations
183
202
 
184
203
  The Vue package is at functional parity with the React package across the
@@ -0,0 +1,2 @@
1
+ import { H as r } from "./viewer-CbdUuxzY.js";
2
+ export { r as encodeGif };
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ const e = require("./viewer-DOWJhzgL.cjs");
2
+ exports.encodeGif = e.encodeGif;
Binary file
Binary file
package/dist/i18n.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- exports.keyToLabel = function(t) {
3
- return (t.split(".").pop() ?? t).replace(/(?<lower>[a-z])(?<upper>[A-Z])/gu, "$<lower> $<upper>").replace(/^./u, (t) => t.toUpperCase());
4
- }, exports.translationsEn = {
2
+ var t = function(t) {
3
+ const e = {};
4
+ for (const [p, o] of Object.entries(t)) e[p] = o.replace(/\{\{(?<name>\w+)\}\}/gu, "{$<name>}");
5
+ return e;
6
+ }({
5
7
  "pptx.statusBar.allSaved": "All saved",
6
8
  "pptx.statusBar.unsavedChanges": "Unsaved changes",
7
9
  "pptx.statusBar.slideOf": "Slide {{current}} of {{total}}",
@@ -146,8 +148,10 @@ exports.keyToLabel = function(t) {
146
148
  "pptx.share.displayName": "Your Display Name",
147
149
  "pptx.share.namePlaceholder": "e.g. Alice",
148
150
  "pptx.share.serverLabel": "Collaboration Server",
149
- "pptx.share.serverPlaceholder": "wss://collab.example.com",
150
- "pptx.share.serverHint": "Enter the WebSocket URL of a y-websocket server. Use a secure wss:// URL when sharing from an https:// page.",
151
+ "pptx.share.serverPlaceholder": "wss://collab.example.com (empty = peer-to-peer)",
152
+ "pptx.share.serverHint": "Enter the WebSocket URL of a y-websocket server (secure wss:// when sharing from an https:// page), or leave empty for serverless peer-to-peer mode.",
153
+ "pptx.share.p2pHint": "Peer-to-peer mode: tabs in the same browser always connect; other devices connect through public WebRTC signaling servers.",
154
+ "pptx.share.p2pServerValue": "Peer-to-peer (no server)",
151
155
  "pptx.share.shareLink": "Share Link",
152
156
  "pptx.share.copyLink": "Copy share link",
153
157
  "pptx.share.copied": "Copied",
@@ -237,6 +241,8 @@ exports.keyToLabel = function(t) {
237
241
  "pptx.broadcast.sessionName": "Broadcast Session",
238
242
  "pptx.broadcast.displayName": "Presenter Name",
239
243
  "pptx.broadcast.serverLabel": "Collaboration Server",
244
+ "pptx.broadcast.p2pHint": "Leave the server empty for serverless peer-to-peer broadcasting: same-browser tabs always connect; other devices connect through public WebRTC signaling servers.",
245
+ "pptx.broadcast.p2pServerValue": "Peer-to-peer (no server)",
240
246
  "pptx.broadcast.hint": "Viewers can join using the link shown after starting. They will follow your slides automatically.",
241
247
  "pptx.broadcast.startBroadcast": "Start Broadcast",
242
248
  "pptx.broadcast.stopBroadcast": "Stop Broadcast",
@@ -1680,4 +1686,7 @@ exports.keyToLabel = function(t) {
1680
1686
  "pptx.animation.sequence.byParagraph": "By Paragraph",
1681
1687
  "pptx.animation.sequence.byWord": "By Word",
1682
1688
  "pptx.animation.sequence.byLetter": "By Letter"
1683
- };
1689
+ });
1690
+ exports.keyToLabel = function(t) {
1691
+ return (t.split(".").pop() ?? t).replace(/(?<lower>[a-z])(?<upper>[A-Z])/gu, "$<lower> $<upper>").replace(/^./u, (t) => t.toUpperCase());
1692
+ }, exports.translationsEn = t;
package/dist/i18n.cjs.br CHANGED
Binary file
package/dist/i18n.cjs.gz CHANGED
Binary file
package/dist/i18n.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- export { keyToLabel, translationsEn } from 'pptx-viewer-shared/i18n';
1
+ import { keyToLabel, TranslationKey } from 'pptx-viewer-shared/i18n';
2
+ export type { TranslationKey };
3
+ export declare const translationsEn: Record<string, string>;
4
+ export { keyToLabel };
2
5
  //# sourceMappingURL=i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0C,MAAM,yBAAyB,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,YAAY,EAAE,cAAc,EAAE,CAAC;AAkB/B,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAyC,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,CAAC"}
package/dist/i18n.js CHANGED
@@ -1,4 +1,11 @@
1
- var t = {
1
+ function t(t) {
2
+ return (t.split(".").pop() ?? t).replace(/(?<lower>[a-z])(?<upper>[A-Z])/gu, "$<lower> $<upper>").replace(/^./u, (t) => t.toUpperCase());
3
+ }
4
+ var e = function(t) {
5
+ const e = {};
6
+ for (const [p, o] of Object.entries(t)) e[p] = o.replace(/\{\{(?<name>\w+)\}\}/gu, "{$<name>}");
7
+ return e;
8
+ }({
2
9
  "pptx.statusBar.allSaved": "All saved",
3
10
  "pptx.statusBar.unsavedChanges": "Unsaved changes",
4
11
  "pptx.statusBar.slideOf": "Slide {{current}} of {{total}}",
@@ -143,8 +150,10 @@ var t = {
143
150
  "pptx.share.displayName": "Your Display Name",
144
151
  "pptx.share.namePlaceholder": "e.g. Alice",
145
152
  "pptx.share.serverLabel": "Collaboration Server",
146
- "pptx.share.serverPlaceholder": "wss://collab.example.com",
147
- "pptx.share.serverHint": "Enter the WebSocket URL of a y-websocket server. Use a secure wss:// URL when sharing from an https:// page.",
153
+ "pptx.share.serverPlaceholder": "wss://collab.example.com (empty = peer-to-peer)",
154
+ "pptx.share.serverHint": "Enter the WebSocket URL of a y-websocket server (secure wss:// when sharing from an https:// page), or leave empty for serverless peer-to-peer mode.",
155
+ "pptx.share.p2pHint": "Peer-to-peer mode: tabs in the same browser always connect; other devices connect through public WebRTC signaling servers.",
156
+ "pptx.share.p2pServerValue": "Peer-to-peer (no server)",
148
157
  "pptx.share.shareLink": "Share Link",
149
158
  "pptx.share.copyLink": "Copy share link",
150
159
  "pptx.share.copied": "Copied",
@@ -234,6 +243,8 @@ var t = {
234
243
  "pptx.broadcast.sessionName": "Broadcast Session",
235
244
  "pptx.broadcast.displayName": "Presenter Name",
236
245
  "pptx.broadcast.serverLabel": "Collaboration Server",
246
+ "pptx.broadcast.p2pHint": "Leave the server empty for serverless peer-to-peer broadcasting: same-browser tabs always connect; other devices connect through public WebRTC signaling servers.",
247
+ "pptx.broadcast.p2pServerValue": "Peer-to-peer (no server)",
237
248
  "pptx.broadcast.hint": "Viewers can join using the link shown after starting. They will follow your slides automatically.",
238
249
  "pptx.broadcast.startBroadcast": "Start Broadcast",
239
250
  "pptx.broadcast.stopBroadcast": "Stop Broadcast",
@@ -1677,8 +1688,5 @@ var t = {
1677
1688
  "pptx.animation.sequence.byParagraph": "By Paragraph",
1678
1689
  "pptx.animation.sequence.byWord": "By Word",
1679
1690
  "pptx.animation.sequence.byLetter": "By Letter"
1680
- };
1681
- function e(t) {
1682
- return (t.split(".").pop() ?? t).replace(/(?<lower>[a-z])(?<upper>[A-Z])/gu, "$<lower> $<upper>").replace(/^./u, (t) => t.toUpperCase());
1683
- }
1684
- export { e as keyToLabel, t as translationsEn };
1691
+ });
1692
+ export { t as keyToLabel, e as translationsEn };
package/dist/i18n.js.br CHANGED
Binary file
package/dist/i18n.js.gz CHANGED
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-BWYs-dTH.cjs");
2
+ const e = require("./viewer-DOWJhzgL.cjs");
3
3
  exports.AUDIENCE_HASH = e.AUDIENCE_HASH, exports.ElementRenderer = e.ElementRenderer_default, exports.PowerPointViewer = e.PowerPointViewer_default, exports.SlideCanvas = e.SlideCanvas_default, exports.SlideStage = e.SlideStage_default, exports.clearAudienceContent = e.clearAudienceContent, exports.cn = e.cn, exports.defaultCssVars = e.defaultCssVars, exports.defaultRadius = e.defaultRadius, exports.defaultThemeColors = e.defaultThemeColors, exports.isAudienceTab = e.isAudienceTab, exports.loadAudienceContent = e.loadAudienceContent, exports.provideViewerTheme = e.provideViewerTheme, exports.storeAudienceContent = e.storeAudienceContent, 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 { B as a, F as s, G as e, N as r, P as i, V as o, a as t, d as n, f as d, i as l, n as m, o as p, p as w, r as P, t as S, u as f, z as v } from "./viewer-D0LDcvxS.js";
1
+ import { B as a, F as s, G as e, N as r, P as i, V as o, a as t, d as n, f as d, i as l, n as m, o as p, p as w, r as P, t as S, u as f, z as v } from "./viewer-CbdUuxzY.js";
2
2
  export { S as AUDIENCE_HASH, w as ElementRenderer, p as PowerPointViewer, f as SlideCanvas, d as SlideStage, m as clearAudienceContent, n as cn, v as defaultCssVars, a as defaultRadius, o as defaultThemeColors, P as isAudienceTab, l as loadAudienceContent, r as provideViewerTheme, t as storeAudienceContent, e as themeToCssVars, i as useThemeStyle, s as useViewerTheme };
package/dist/index.js.br CHANGED
@@ -1 +1 @@
1
- #����#�t�j]�;���YA����=����k��{�XD9nIOl��U��{8��)�~� �+��ȪH���Emhf�`AfM�@�������N���./DR��'8Z���rfE�Wmu�-�W� ]��P�=�n��7T����Ƒ,b�����2Abz@�9UwE7���a��>��;���8wcKV�qM\/���'�n�\�K��jI�j8ä�,�����h���<w�nQA���
1
+ #����#�t�j]�;���I�b)�@�ڳ:LN��{�.�E��$�dv]%��WsJZ���' @�B�A����j,�z��lf dt�LN�.n��>����B��I����fEWm��-����uz��I�|����itH1���W 1]��Ӝ���wM���0nq]����V�ջ?��%���&��U�Ég7q�ץGg�$e5�a�y����U�~�k�;��� ʊ��
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":"AA8mHA,OAAO,KAAK,EACX,mBAAmB,EAEnB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,SAAS,CAAC;AAw7JjB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"PowerPointViewer.vue.d.ts","sourceRoot":"","sources":["../../src/viewer/PowerPointViewer.vue"],"names":[],"mappings":"AA2xFA,OAAO,KAAK,EACX,mBAAmB,EAEnB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,SAAS,CAAC;AAiqIjB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -18,7 +18,9 @@ import { PptxElement } from 'pptx-viewer-core';
18
18
  * Connector labels (a non-empty `<p:txBody>` on the connector) render via the
19
19
  * {@link ConnectorTextOverlay} child, centred over the bounding box.
20
20
  *
21
- * Not yet ported (TODO, see PORTING.md): line shadows/glow effects.
21
+ * Line-level shadow (`a:ln/a:outerShdw`) renders as an SVG `feDropShadow` on the
22
+ * primary stroke; line glow (`a:ln/a:glow`) as a CSS `drop-shadow` filter on the
23
+ * wrapper. Both reuse the shared visual-effects helpers.
22
24
  */
23
25
  type __VLS_Props = {
24
26
  element: PptxElement;
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectorRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/ConnectorRenderer.vue"],"names":[],"mappings":"AAsRA,OAAO,KAAK,EAAsB,WAAW,EAA0B,MAAM,kBAAkB,CAAC;AAehG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,KAAK,WAAW,GAAG;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAoTF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"ConnectorRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/ConnectorRenderer.vue"],"names":[],"mappings":"AA+SA,OAAO,KAAK,EAAsB,WAAW,EAA0B,MAAM,kBAAkB,CAAC;AAehG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,KAAK,WAAW,GAAG;IAClB,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAoVF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -8,9 +8,15 @@ import { PptxElement } from 'pptx-viewer-core';
8
8
  * width, and opacity resolved from the parallel `inkColors`/`inkWidths`/
9
9
  * `inkOpacities` arrays.
10
10
  *
11
- * Not ported (TODO, see PORTING.md): pressure-sensitive variable-width strokes
12
- * (`inkPointPressures`), ink replay animation, and the highlighter/eraser tool
13
- * blend modes. These all degrade gracefully to plain constant-width strokes.
11
+ * Pressure-sensitive variable-width strokes are rendered when the element
12
+ * carries per-point pressure data (`inkPointPressures`) or a legacy per-point
13
+ * `inkWidths` array with variation: each sampled point becomes an SVG `<circle>`
14
+ * whose radius follows the interpolated width (shared `generatePressureCircles`
15
+ * maths), matching React. Strokes without pressure data degrade to plain
16
+ * constant-width `<path>`s.
17
+ *
18
+ * Not ported (TODO, see PORTING.md): ink replay animation and the
19
+ * highlighter/eraser tool blend modes.
14
20
  */
15
21
  type __VLS_Props = {
16
22
  element: PptxElement;
@@ -1 +1 @@
1
- {"version":3,"file":"InkRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/InkRenderer.vue"],"names":[],"mappings":"AAkGA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQpE;;;;;;;;;;;;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;AA8FF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"InkRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/viewer/components/InkRenderer.vue"],"names":[],"mappings":"AAwKA,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAepE;;;;;;;;;;;;;;;;;;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;AAgKF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RibbonToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../src/viewer/components/ribbon/RibbonToolbar.vue"],"names":[],"mappings":"AA0TA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD,UAAU,KAAM,SAAQ,WAAW;CAAG;AA6etC,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"RibbonToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../src/viewer/components/ribbon/RibbonToolbar.vue"],"names":[],"mappings":"AA8TA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAOlD,UAAU,KAAM,SAAQ,WAAW;CAAG;AAiftC,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,25 @@
1
+ import { PptxElement, PptxSlide } from 'pptx-viewer-core';
2
+ import { AlignEdge, DistributeAxis } from 'pptx-viewer-shared';
3
+ import { ComputedRef, Ref } from 'vue';
4
+ export interface UseAlignGroupInput {
5
+ selectedElements: ComputedRef<PptxElement[]>;
6
+ selectedElementIds: Ref<string[]>;
7
+ activeSlideIndex: Ref<number>;
8
+ slides: Ref<PptxSlide[]>;
9
+ pushHistory: () => void;
10
+ }
11
+ /**
12
+ * useAlignGroup: multi-selection alignment / distribution and group / ungroup
13
+ * for the Vue editor. Each change is a single history entry. Extracted verbatim
14
+ * from `PowerPointViewer.vue`.
15
+ */
16
+ export declare function useAlignGroup(input: UseAlignGroupInput): {
17
+ canGroup: ComputedRef<boolean>;
18
+ canUngroup: ComputedRef<boolean>;
19
+ canDistribute: ComputedRef<boolean>;
20
+ onAlign: (edge: AlignEdge) => void;
21
+ onDistribute: (axis: DistributeAxis) => void;
22
+ onGroup: () => void;
23
+ onUngroup: () => void;
24
+ };
25
+ //# sourceMappingURL=useAlignGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAlignGroup.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useAlignGroup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAO/D,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IAClC,gBAAgB,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7C,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB;;;;oBAmC/B,SAAS,KAAG,IAAI;yBAGX,cAAc,KAAG,IAAI;mBAG7B,IAAI;qBAqBF,IAAI;EAkB1B"}
@@ -0,0 +1,43 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ import { ComputedRef, Ref } from 'vue';
3
+ import { ContextMenuItem } from '../components/ContextMenu.vue';
4
+ import { TableSelectionState } from './table-selection';
5
+ import { EditorOperations } from './useEditorOperations';
6
+ /** Reactive open/position/target state for the element context menu. */
7
+ export interface ContextMenuState {
8
+ open: boolean;
9
+ x: number;
10
+ y: number;
11
+ elementId: string | null;
12
+ }
13
+ export interface UseContextMenuInput {
14
+ canEdit: () => boolean;
15
+ findActiveElement: (id: string) => PptxElement | undefined;
16
+ tableSelection: Ref<TableSelectionState | null>;
17
+ hasClipboard: ComputedRef<boolean>;
18
+ canGroup: ComputedRef<boolean>;
19
+ canUngroup: ComputedRef<boolean>;
20
+ editTemplateMode: Ref<boolean>;
21
+ selectedElementIds: Ref<string[]>;
22
+ ops: EditorOperations;
23
+ cutElement: (id: string) => void;
24
+ copyElement: (id: string) => void;
25
+ pasteElement: () => void;
26
+ onGroup: () => void;
27
+ onUngroup: () => void;
28
+ openHyperlinkDialog: (id: string) => void;
29
+ }
30
+ export interface UseContextMenuResult {
31
+ contextMenu: Ref<ContextMenuState>;
32
+ contextItems: ComputedRef<ContextMenuItem[]>;
33
+ onCanvasContextMenu: (event: MouseEvent) => void;
34
+ onContextSelect: (actionId: string) => void;
35
+ }
36
+ /**
37
+ * useContextMenu: right-click / long-press element context menu for the Vue
38
+ * editor. Owns the open/position state, derives the item list (including the
39
+ * table row/column/merge entries gated on the current cell selection), and
40
+ * dispatches each action. Extracted verbatim from `PowerPointViewer.vue`.
41
+ */
42
+ export declare function useContextMenu(input: UseContextMenuInput): UseContextMenuResult;
43
+ //# sourceMappingURL=useContextMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContextMenu.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useContextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAWrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wEAAwE;AACxE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IACnC,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;IAC3D,cAAc,EAAE,GAAG,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IAChD,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC/B,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,GAAG,EAAE,gBAAgB,CAAC;IACtB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,mBAAmB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,oBAAoB;IACpC,WAAW,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACnC,YAAY,EAAE,WAAW,CAAC,eAAe,EAAE,CAAC,CAAC;IAC7C,mBAAmB,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACjD,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,oBAAoB,CA8M/E"}
@@ -0,0 +1,77 @@
1
+ import { PptxElement, PptxSlide } from 'pptx-viewer-core';
2
+ import { ComputedRef, Ref } from 'vue';
3
+ import { Guide } from './guides';
4
+ import { TemplateElementMap } from './template-editing';
5
+ /** Geometry patch emitted by the selection overlay during a drag/resize/rotate. */
6
+ export interface TransformPayload {
7
+ id: string;
8
+ x: number;
9
+ y: number;
10
+ width: number;
11
+ height: number;
12
+ rotation: number;
13
+ }
14
+ export interface UseElementDragInput {
15
+ findActiveElement: (id: string) => PptxElement | undefined;
16
+ pushHistory: () => void;
17
+ effectiveZoom: ComputedRef<number>;
18
+ activeTemplateElements: ComputedRef<PptxElement[]>;
19
+ activeSlide: ComputedRef<PptxSlide | undefined>;
20
+ activeSlideIndex: Ref<number>;
21
+ slides: Ref<PptxSlide[]>;
22
+ templateElementsBySlideId: Ref<TemplateElementMap>;
23
+ canvasSize: Ref<{
24
+ width: number;
25
+ height: number;
26
+ }>;
27
+ enterInlineEdit: (id: string) => void;
28
+ }
29
+ /**
30
+ * useElementDrag: canvas pointer-drag-to-move, resize/rotate transform, shape
31
+ * adjustment, plus the View-tab snap + alignment-guide state that those gestures
32
+ * consume. One history entry is snapshotted at gesture start; live patches during
33
+ * the gesture bypass history. Extracted verbatim from `PowerPointViewer.vue`.
34
+ */
35
+ export declare function useElementDrag(input: UseElementDragInput): {
36
+ snapToShape: Ref<boolean, boolean>;
37
+ snapToGrid: Ref<boolean, boolean>;
38
+ snapLines: Ref<{
39
+ axis: "x" | "y";
40
+ position: number;
41
+ }[], {
42
+ axis: "x" | "y";
43
+ position: number;
44
+ }[] | {
45
+ axis: "x" | "y";
46
+ position: number;
47
+ }[]>;
48
+ guides: Ref<{
49
+ id: string;
50
+ axis: "h" | "v";
51
+ position: number;
52
+ }[], Guide[] | {
53
+ id: string;
54
+ axis: "h" | "v";
55
+ position: number;
56
+ }[]>;
57
+ addGuide: (axis: "h" | "v") => void;
58
+ onMoveGuide: (payload: {
59
+ id: string;
60
+ position: number;
61
+ }) => void;
62
+ onRemoveGuide: (id: string) => void;
63
+ startElementDrag: (id: string, event: PointerEvent, wasSelected: boolean) => void;
64
+ onTransformStart: () => void;
65
+ onTransform: (payload: TransformPayload) => void;
66
+ onTransformEnd: (payload: TransformPayload) => void;
67
+ onAdjustStart: () => void;
68
+ onAdjust: (payload: {
69
+ id: string;
70
+ value: number;
71
+ }) => void;
72
+ onAdjustEnd: (payload: {
73
+ id: string;
74
+ value: number;
75
+ }) => void;
76
+ };
77
+ //# sourceMappingURL=useElementDrag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementDrag.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useElementDrag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAItC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IACnC,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;IAC3D,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,sBAAsB,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;IACnD,WAAW,EAAE,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAChD,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IACzB,yBAAyB,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;IACnD,UAAU,EAAE,GAAG,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAKD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB;;;;cAmBpB,GAAG,GAAG,GAAG;kBAAY,MAAM;;cAA3B,GAAG,GAAG,GAAG;kBAAY,MAAM;;cAA3B,GAAG,GAAG,GAAG;kBAAY,MAAM;;;;;;;;;;;qBAKvC,GAAG,GAAG,GAAG,KAAG,IAAI;2BAIV;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAG,IAAI;wBAI1C,MAAM,KAAG,IAAI;2BAcV,MAAM,SAAS,YAAY,eAAe,OAAO,KAAG,IAAI;4BAkJzD,IAAI;2BAGH,gBAAgB,KAAG,IAAI;8BAGpB,gBAAgB,KAAG,IAAI;yBAkB9B,IAAI;wBAGH;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAG,IAAI;2BAGjC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAG,IAAI;EAoBlE"}
@@ -0,0 +1,40 @@
1
+ import { PptxChartType, PptxHandler, PptxSlide } from 'pptx-viewer-core';
2
+ import { Ref, ShallowRef } from 'vue';
3
+ import { ShapePreset } from '../components/EditorToolbar.vue';
4
+ import { EditorOperations } from './useEditorOperations';
5
+ export interface UseElementInsertionInput {
6
+ canvasSize: Ref<{
7
+ width: number;
8
+ height: number;
9
+ }>;
10
+ ops: EditorOperations;
11
+ selectedElementIds: Ref<string[]>;
12
+ slides: Ref<PptxSlide[]>;
13
+ activeSlideIndex: Ref<number>;
14
+ pushHistory: () => void;
15
+ handler: ShallowRef<PptxHandler | null>;
16
+ }
17
+ export interface UseElementInsertionResult {
18
+ imageInputRef: Ref<HTMLInputElement | null>;
19
+ mediaInputRef: Ref<HTMLInputElement | null>;
20
+ addText: () => void;
21
+ addShape: (preset: ShapePreset) => void;
22
+ addTable: () => void;
23
+ addChart: (chartType: PptxChartType) => void;
24
+ openImagePicker: () => void;
25
+ onImageFileSelected: (e: Event) => void;
26
+ openMediaPicker: () => void;
27
+ onMediaFileSelected: (e: Event) => void;
28
+ addActionButton: (shapeType: string) => void;
29
+ insertSlideFromLayout: (layoutPath: string, layoutName?: string) => Promise<void>;
30
+ }
31
+ /**
32
+ * useElementInsertion: Insert-tab element creation for the Vue editor.
33
+ *
34
+ * Owns the hidden image/media `<input>` refs and every "add a new element"
35
+ * handler (text / shape / table / chart / image / media / action button /
36
+ * new slide from layout). Each newly-created element is centred on the slide
37
+ * and selected. Extracted verbatim from `PowerPointViewer.vue`.
38
+ */
39
+ export declare function useElementInsertion(input: UseElementInsertionInput): UseElementInsertionResult;
40
+ //# sourceMappingURL=useElementInsertion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementInsertion.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useElementInsertion.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAe,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG3F,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,wBAAwB;IACxC,UAAU,EAAE,GAAG,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,GAAG,EAAE,gBAAgB,CAAC;IACtB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IACzB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC5C,aAAa,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mBAAmB,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAClF;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,yBAAyB,CAmO9F"}
@@ -0,0 +1,37 @@
1
+ import { PptxElement, PptxSlide, TextStyle } from 'pptx-viewer-core';
2
+ import { AlignEdge } from 'pptx-viewer-shared';
3
+ import { ComputedRef, Ref } from 'vue';
4
+ import { ShapePreset } from '../components/EditorToolbar.vue';
5
+ import { SupportedShapeType, TableCellEditorState, ViewerMode } from '../components/ribbon/ribbon-types';
6
+ import { TableSelectionState } from './table-selection';
7
+ import { EditorOperations } from './useEditorOperations';
8
+ export interface UseRibbonActionsInput {
9
+ canEdit: () => boolean;
10
+ presenting: Ref<boolean>;
11
+ showMasterView: Ref<boolean>;
12
+ tableSelection: Ref<TableSelectionState | null>;
13
+ selectedElements: ComputedRef<PptxElement[]>;
14
+ selectedElementIds: Ref<string[]>;
15
+ activeSlide: ComputedRef<PptxSlide | undefined>;
16
+ activeSlideIndex: Ref<number>;
17
+ slides: Ref<PptxSlide[]>;
18
+ pushHistory: () => void;
19
+ ops: EditorOperations;
20
+ }
21
+ /** Ribbon `align` key → shared `AlignEdge`. */
22
+ export declare const RIBBON_ALIGN: Record<string, AlignEdge>;
23
+ /** Narrow a ribbon `SupportedShapeType` to the EditorToolbar's `ShapePreset`. */
24
+ export declare function toShapePreset(t: SupportedShapeType): ShapePreset;
25
+ /**
26
+ * useRibbonActions: the derived ribbon mode plus the ribbon-only editing helpers
27
+ * (cell/text-style application, flip, front/back z-order). Extracted verbatim
28
+ * from `PowerPointViewer.vue`; the big `ribbonProps` adapter stays in the SFC.
29
+ */
30
+ export declare function useRibbonActions(input: UseRibbonActionsInput): {
31
+ ribbonMode: ComputedRef<ViewerMode>;
32
+ activeTableSelection: ComputedRef<TableCellEditorState | null>;
33
+ ribbonUpdateTextStyle: (updates: Partial<TextStyle>) => void;
34
+ ribbonFlip: (direction: "horizontal" | "vertical") => void;
35
+ ribbonMoveToEdge: (dir: string) => void;
36
+ };
37
+ //# sourceMappingURL=useRibbonActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRibbonActions.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useRibbonActions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,WAAW,EACX,SAAS,EAGT,SAAS,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EACX,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACzB,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,cAAc,EAAE,GAAG,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IAChD,gBAAgB,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7C,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IAClC,WAAW,EAAE,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAChD,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,GAAG,EAAE,gBAAgB,CAAC;CACtB;AAED,+CAA+C;AAC/C,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAOlD,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB;;;qCAuDpB,OAAO,CAAC,SAAS,CAAC,KAAG,IAAI;4BA6BlC,YAAY,GAAG,UAAU,KAAG,IAAI;4BAsBhC,MAAM,KAAG,IAAI;EAiB5C"}
@@ -0,0 +1,27 @@
1
+ import { PptxElement, PptxSlide, PptxSlideTransition } from 'pptx-viewer-core';
2
+ import { ComputedRef, Ref } from 'vue';
3
+ import { AnimationGroup } from './element-animation';
4
+ export interface UseSlideMutationsInput {
5
+ slides: Ref<PptxSlide[]>;
6
+ activeSlideIndex: Ref<number>;
7
+ activeSlide: ComputedRef<PptxSlide | undefined>;
8
+ pushHistory: () => void;
9
+ selectedElements: ComputedRef<PptxElement[]>;
10
+ }
11
+ /**
12
+ * useSlideMutations: history-tracked mutations that live on the slide rather
13
+ * than an element (speaker notes, hidden flag, transition, background patch,
14
+ * per-slide animation list). Each rebuilds a fresh `slides` array after
15
+ * snapshotting history. Extracted verbatim from `PowerPointViewer.vue`.
16
+ */
17
+ export declare function useSlideMutations(input: UseSlideMutationsInput): {
18
+ onNotesUpdate: (notes: string) => void;
19
+ toggleSlideHidden: (index: number) => void;
20
+ applySlideTransition: (transition: PptxSlideTransition | undefined) => void;
21
+ applySlideBackgroundPatch: (patch: Partial<PptxSlide>) => void;
22
+ onTransitionChange: (updates: Partial<PptxSlideTransition>) => void;
23
+ onApplyTransitionToAll: () => void;
24
+ onAddAnimation: (preset: string, group: AnimationGroup) => void;
25
+ onRemoveAnimation: () => void;
26
+ };
27
+ //# sourceMappingURL=useSlideMutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSlideMutations.d.ts","sourceRoot":"","sources":["../../../src/viewer/composables/useSlideMutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,WAAW,EAEX,SAAS,EACT,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,sBAAsB;IACtC,MAAM,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;IACzB,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAChD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB;2BAGhC,MAAM,KAAG,IAAI;+BAaT,MAAM,KAAG,IAAI;uCAYL,mBAAmB,GAAG,SAAS,KAAG,IAAI;uCAatC,OAAO,CAAC,SAAS,CAAC,KAAG,IAAI;kCAa9B,OAAO,CAAC,mBAAmB,CAAC,KAAG,IAAI;kCAMrC,IAAI;6BAoBP,MAAM,SAAS,cAAc,KAAG,IAAI;6BAYtC,IAAI;EAmBlC"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const e = require("../viewer-BWYs-dTH.cjs");
2
+ const e = require("../viewer-DOWJhzgL.cjs");
3
3
  exports.AUDIENCE_HASH = e.AUDIENCE_HASH, 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.clearAudienceContent = e.clearAudienceContent, 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.isAudienceTab = e.isAudienceTab, exports.loadAudienceContent = e.loadAudienceContent, exports.storeAudienceContent = e.storeAudienceContent, exports.useEditorHistory = e.useEditorHistory, exports.useEditorOperations = e.useEditorOperations, exports.useLoadContent = e.useLoadContent;
Binary file
Binary file
@@ -1,2 +1,2 @@
1
- import { A as a, C as s, D as e, E as r, I as n, L as d, M as o, O as t, R, S as i, T as l, U as m, W as S, _ as w, a as C, b as p, c as v, f as x, g as A, h as E, i as T, j as b, k as c, l as f, m as g, n as h, o as j, p as k, r as u, s as D, t as I, u as M, v as O, w as P, x as W, y as q } from "../viewer-D0LDcvxS.js";
1
+ import { A as a, C as s, D as e, E as r, I as n, L as d, M as o, O as t, R, S as i, T as l, U as m, W as S, _ as w, a as C, b as p, c as v, f as x, g as A, h as E, i as T, j as b, k as c, l as f, m as g, n as h, o as j, p as k, r as u, s as D, t as I, u as M, v as O, w as P, x as W, y as q } from "../viewer-CbdUuxzY.js";
2
2
  export { I as AUDIENCE_HASH, s as ChartRenderer, i as ConnectorRenderer, t as DEFAULT_CANVAS_HEIGHT, c as DEFAULT_CANVAS_WIDTH, a as DEFAULT_FILL_COLOR, b as DEFAULT_STROKE_COLOR, o as DEFAULT_TEXT_COLOR, k as ElementRenderer, W as EquationRenderer, p as InkRenderer, q as Model3DRenderer, O as OleRenderer, j as PowerPointViewer, M as SlideCanvas, x as SlideStage, w as SmartArtRenderer, A as TableRenderer, E as WordArtText, g as ZoomRenderer, n as buildInitialGuides, h as clearAudienceContent, d as collectImagePaths, R as collectMediaElements, P as getContainerStyle, l as getImageSrc, m as getResolvedShapeClipPath, S as getResolvedShapeClipPathFor, r as getShapeFillStrokeStyle, e as getTextBlockStyle, u as isAudienceTab, T as loadAudienceContent, C as storeAudienceContent, f as useEditorHistory, v as useEditorOperations, D as useLoadContent };
Binary file
Binary file