pptx-svelte-viewer 0.5.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +9 -6
  3. package/dist/{component-B4CAjgjO.js → component-BkXbcmvL.js} +22670 -18164
  4. package/dist/i18n/context.d.ts +20 -0
  5. package/dist/i18n/context.d.ts.map +1 -0
  6. package/dist/i18n/index.d.ts +4 -0
  7. package/dist/i18n/index.d.ts.map +1 -0
  8. package/dist/i18n/translator.d.ts +30 -0
  9. package/dist/i18n/translator.d.ts.map +1 -0
  10. package/dist/i18n.d.ts +56 -62
  11. package/dist/i18n.d.ts.map +1 -0
  12. package/dist/i18n.js +1 -1
  13. package/dist/index.d.ts +765 -605
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +2 -2
  16. package/dist/theme/index.d.ts +8 -0
  17. package/dist/theme/index.d.ts.map +1 -0
  18. package/dist/{translator-nTmCzaSH.js → translator-BTU8751A.js} +1 -1
  19. package/dist/viewer/collab/collaboration-dialogs.svelte.d.ts +31 -0
  20. package/dist/viewer/collab/collaboration-dialogs.svelte.d.ts.map +1 -0
  21. package/dist/viewer/collab/collaboration-presence-effects.svelte.d.ts +9 -0
  22. package/dist/viewer/collab/collaboration-presence-effects.svelte.d.ts.map +1 -0
  23. package/dist/viewer/collab/collaboration-presence.svelte.d.ts +20 -0
  24. package/dist/viewer/collab/collaboration-presence.svelte.d.ts.map +1 -0
  25. package/dist/viewer/collab/collaboration-provider.d.ts +35 -0
  26. package/dist/viewer/collab/collaboration-provider.d.ts.map +1 -0
  27. package/dist/viewer/collab/collaboration-remote-sync.d.ts +12 -0
  28. package/dist/viewer/collab/collaboration-remote-sync.d.ts.map +1 -0
  29. package/dist/viewer/collab/collaboration-session.d.ts +24 -0
  30. package/dist/viewer/collab/collaboration-session.d.ts.map +1 -0
  31. package/dist/viewer/collab/collaboration-status.d.ts +14 -0
  32. package/dist/viewer/collab/collaboration-status.d.ts.map +1 -0
  33. package/dist/viewer/collab/collaboration.svelte.d.ts +55 -0
  34. package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -0
  35. package/dist/viewer/collab/components/props.d.ts +79 -0
  36. package/dist/viewer/collab/components/props.d.ts.map +1 -0
  37. package/dist/viewer/collab/components/share-helpers.d.ts +29 -0
  38. package/dist/viewer/collab/components/share-helpers.d.ts.map +1 -0
  39. package/dist/viewer/collab/index.d.ts +15 -0
  40. package/dist/viewer/collab/index.d.ts.map +1 -0
  41. package/dist/viewer/component.d.ts +13 -0
  42. package/dist/viewer/component.d.ts.map +1 -0
  43. package/dist/viewer/components/index.d.ts +7 -0
  44. package/dist/viewer/components/index.d.ts.map +1 -0
  45. package/dist/viewer/components/props.d.ts +185 -0
  46. package/dist/viewer/components/props.d.ts.map +1 -0
  47. package/dist/viewer/components/ribbon/animations/animation-categories.d.ts +10 -0
  48. package/dist/viewer/components/ribbon/animations/animation-categories.d.ts.map +1 -0
  49. package/dist/viewer/components/ribbon/design/theme-swatches.d.ts +16 -0
  50. package/dist/viewer/components/ribbon/design/theme-swatches.d.ts.map +1 -0
  51. package/dist/viewer/components/ribbon/insert/shape-glyphs.d.ts +8 -0
  52. package/dist/viewer/components/ribbon/insert/shape-glyphs.d.ts.map +1 -0
  53. package/dist/viewer/components/ribbon/ribbon-tabs.d.ts +17 -0
  54. package/dist/viewer/components/ribbon/ribbon-tabs.d.ts.map +1 -0
  55. package/dist/viewer/components/ribbon/ribbon-types.d.ts +67 -0
  56. package/dist/viewer/components/ribbon/ribbon-types.d.ts.map +1 -0
  57. package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts +10 -0
  58. package/dist/viewer/components/ribbon/transitions/transition-presets.d.ts.map +1 -0
  59. package/dist/viewer/editor/editing-api.d.ts +20 -0
  60. package/dist/viewer/editor/editing-api.d.ts.map +1 -0
  61. package/dist/viewer/editor/editor-animation-controller.d.ts +25 -0
  62. package/dist/viewer/editor/editor-animation-controller.d.ts.map +1 -0
  63. package/dist/viewer/editor/editor-arrange-controller.d.ts +24 -0
  64. package/dist/viewer/editor/editor-arrange-controller.d.ts.map +1 -0
  65. package/dist/viewer/editor/editor-arrange-ops.d.ts +28 -0
  66. package/dist/viewer/editor/editor-arrange-ops.d.ts.map +1 -0
  67. package/dist/viewer/editor/editor-background-controller.d.ts +21 -0
  68. package/dist/viewer/editor/editor-background-controller.d.ts.map +1 -0
  69. package/dist/viewer/editor/editor-clipboard-controller.d.ts +18 -0
  70. package/dist/viewer/editor/editor-clipboard-controller.d.ts.map +1 -0
  71. package/dist/viewer/editor/editor-clipboard.d.ts +20 -0
  72. package/dist/viewer/editor/editor-clipboard.d.ts.map +1 -0
  73. package/dist/viewer/editor/editor-controller-geometry.d.ts +8 -0
  74. package/dist/viewer/editor/editor-controller-geometry.d.ts.map +1 -0
  75. package/dist/viewer/editor/editor-controller.svelte.d.ts +43 -0
  76. package/dist/viewer/editor/editor-controller.svelte.d.ts.map +1 -0
  77. package/dist/viewer/editor/editor-element-controller.d.ts +21 -0
  78. package/dist/viewer/editor/editor-element-controller.d.ts.map +1 -0
  79. package/dist/viewer/editor/editor-equation-controller.svelte.d.ts +12 -0
  80. package/dist/viewer/editor/editor-equation-controller.svelte.d.ts.map +1 -0
  81. package/dist/viewer/editor/editor-find-replace.svelte.d.ts +39 -0
  82. package/dist/viewer/editor/editor-find-replace.svelte.d.ts.map +1 -0
  83. package/dist/viewer/editor/editor-format-mutations.d.ts +39 -0
  84. package/dist/viewer/editor/editor-format-mutations.d.ts.map +1 -0
  85. package/dist/viewer/editor/editor-format-painter-controller.svelte.d.ts +13 -0
  86. package/dist/viewer/editor/editor-format-painter-controller.svelte.d.ts.map +1 -0
  87. package/dist/viewer/editor/editor-geometry.d.ts +29 -0
  88. package/dist/viewer/editor/editor-geometry.d.ts.map +1 -0
  89. package/dist/viewer/editor/editor-gestures.d.ts +48 -0
  90. package/dist/viewer/editor/editor-gestures.d.ts.map +1 -0
  91. package/dist/viewer/editor/editor-ink-controller.svelte.d.ts +59 -0
  92. package/dist/viewer/editor/editor-ink-controller.svelte.d.ts.map +1 -0
  93. package/dist/viewer/editor/editor-ink-gesture.d.ts +37 -0
  94. package/dist/viewer/editor/editor-ink-gesture.d.ts.map +1 -0
  95. package/dist/viewer/editor/editor-insert-action-button.d.ts +13 -0
  96. package/dist/viewer/editor/editor-insert-action-button.d.ts.map +1 -0
  97. package/dist/viewer/editor/editor-insert-chart.d.ts +10 -0
  98. package/dist/viewer/editor/editor-insert-chart.d.ts.map +1 -0
  99. package/dist/viewer/editor/editor-insert-equation.d.ts +5 -0
  100. package/dist/viewer/editor/editor-insert-equation.d.ts.map +1 -0
  101. package/dist/viewer/editor/editor-insert-field.d.ts +17 -0
  102. package/dist/viewer/editor/editor-insert-field.d.ts.map +1 -0
  103. package/dist/viewer/editor/editor-insert-media.d.ts +10 -0
  104. package/dist/viewer/editor/editor-insert-media.d.ts.map +1 -0
  105. package/dist/viewer/editor/editor-insert-smart-art.d.ts +8 -0
  106. package/dist/viewer/editor/editor-insert-smart-art.d.ts.map +1 -0
  107. package/dist/viewer/editor/editor-insert.d.ts +40 -0
  108. package/dist/viewer/editor/editor-insert.d.ts.map +1 -0
  109. package/dist/viewer/editor/editor-keyboard.d.ts +31 -0
  110. package/dist/viewer/editor/editor-keyboard.d.ts.map +1 -0
  111. package/dist/viewer/editor/editor-master-controller.d.ts +17 -0
  112. package/dist/viewer/editor/editor-master-controller.d.ts.map +1 -0
  113. package/dist/viewer/editor/editor-mutations.d.ts +59 -0
  114. package/dist/viewer/editor/editor-mutations.d.ts.map +1 -0
  115. package/dist/viewer/editor/editor-paragraph-mutations.d.ts +10 -0
  116. package/dist/viewer/editor/editor-paragraph-mutations.d.ts.map +1 -0
  117. package/dist/viewer/editor/editor-selection-gestures.d.ts +24 -0
  118. package/dist/viewer/editor/editor-selection-gestures.d.ts.map +1 -0
  119. package/dist/viewer/editor/editor-selection.svelte.d.ts +32 -0
  120. package/dist/viewer/editor/editor-selection.svelte.d.ts.map +1 -0
  121. package/dist/viewer/editor/editor-slide-ops.d.ts +23 -0
  122. package/dist/viewer/editor/editor-slide-ops.d.ts.map +1 -0
  123. package/dist/viewer/editor/editor-slides-controller.d.ts +22 -0
  124. package/dist/viewer/editor/editor-slides-controller.d.ts.map +1 -0
  125. package/dist/viewer/editor/editor-state.svelte.d.ts +102 -0
  126. package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -0
  127. package/dist/viewer/editor/editor-template-controller.d.ts +12 -0
  128. package/dist/viewer/editor/editor-template-controller.d.ts.map +1 -0
  129. package/dist/viewer/editor/editor-text-extra-mutations.d.ts +18 -0
  130. package/dist/viewer/editor/editor-text-extra-mutations.d.ts.map +1 -0
  131. package/dist/viewer/editor/editor-transition-controller.d.ts +22 -0
  132. package/dist/viewer/editor/editor-transition-controller.d.ts.map +1 -0
  133. package/dist/viewer/editor/editor-zorder.d.ts +16 -0
  134. package/dist/viewer/editor/editor-zorder.d.ts.map +1 -0
  135. package/dist/viewer/editor/element-hit.d.ts +17 -0
  136. package/dist/viewer/editor/element-hit.d.ts.map +1 -0
  137. package/dist/viewer/editor/index.d.ts +45 -0
  138. package/dist/viewer/editor/index.d.ts.map +1 -0
  139. package/dist/viewer/editor/inline-text.d.ts +36 -0
  140. package/dist/viewer/editor/inline-text.d.ts.map +1 -0
  141. package/dist/viewer/editor/types.d.ts +12 -0
  142. package/dist/viewer/editor/types.d.ts.map +1 -0
  143. package/dist/viewer/export/export-controller.svelte.d.ts +77 -0
  144. package/dist/viewer/export/export-controller.svelte.d.ts.map +1 -0
  145. package/dist/viewer/export/export-gif.d.ts +42 -0
  146. package/dist/viewer/export/export-gif.d.ts.map +1 -0
  147. package/dist/viewer/export/export-print.d.ts +55 -0
  148. package/dist/viewer/export/export-print.d.ts.map +1 -0
  149. package/dist/viewer/export/export-ui.svelte.d.ts +45 -0
  150. package/dist/viewer/export/export-ui.svelte.d.ts.map +1 -0
  151. package/dist/viewer/export/export-video.d.ts +56 -0
  152. package/dist/viewer/export/export-video.d.ts.map +1 -0
  153. package/dist/viewer/export/export-wiring.svelte.d.ts +35 -0
  154. package/dist/viewer/export/export-wiring.svelte.d.ts.map +1 -0
  155. package/dist/viewer/export/exporting-api.d.ts +19 -0
  156. package/dist/viewer/export/exporting-api.d.ts.map +1 -0
  157. package/dist/viewer/export/index.d.ts +16 -0
  158. package/dist/viewer/export/index.d.ts.map +1 -0
  159. package/dist/viewer/export/rasterize-slide.d.ts +44 -0
  160. package/dist/viewer/export/rasterize-slide.d.ts.map +1 -0
  161. package/dist/viewer/export/render-to-canvas.d.ts +15 -0
  162. package/dist/viewer/export/render-to-canvas.d.ts.map +1 -0
  163. package/dist/viewer/index.d.ts +7536 -7597
  164. package/dist/viewer/index.d.ts.map +1 -0
  165. package/dist/viewer/index.js +1 -1
  166. package/dist/viewer/master/master-view.d.ts +7 -0
  167. package/dist/viewer/master/master-view.d.ts.map +1 -0
  168. package/dist/viewer/presentation/animation-playback.svelte.d.ts +57 -0
  169. package/dist/viewer/presentation/animation-playback.svelte.d.ts.map +1 -0
  170. package/dist/viewer/presentation/apply-animation-styles.d.ts +8 -0
  171. package/dist/viewer/presentation/apply-animation-styles.d.ts.map +1 -0
  172. package/dist/viewer/presentation/index.d.ts +10 -0
  173. package/dist/viewer/presentation/index.d.ts.map +1 -0
  174. package/dist/viewer/presentation/keyframes.d.ts +3 -0
  175. package/dist/viewer/presentation/keyframes.d.ts.map +1 -0
  176. package/dist/viewer/presentation/presentation-controller.svelte.d.ts +69 -0
  177. package/dist/viewer/presentation/presentation-controller.svelte.d.ts.map +1 -0
  178. package/dist/viewer/presentation/presentation-effects.svelte.d.ts +31 -0
  179. package/dist/viewer/presentation/presentation-effects.svelte.d.ts.map +1 -0
  180. package/dist/viewer/presentation-swipe.d.ts +11 -0
  181. package/dist/viewer/presentation-swipe.d.ts.map +1 -0
  182. package/dist/viewer/render/chart-view.d.ts +35 -0
  183. package/dist/viewer/render/chart-view.d.ts.map +1 -0
  184. package/dist/viewer/render/contentpart-view.d.ts +24 -0
  185. package/dist/viewer/render/contentpart-view.d.ts.map +1 -0
  186. package/dist/viewer/render/index.d.ts +25 -0
  187. package/dist/viewer/render/index.d.ts.map +1 -0
  188. package/dist/viewer/render/ink-view.d.ts +25 -0
  189. package/dist/viewer/render/ink-view.d.ts.map +1 -0
  190. package/dist/viewer/render/media-view.d.ts +17 -0
  191. package/dist/viewer/render/media-view.d.ts.map +1 -0
  192. package/dist/viewer/render/model3d-view.d.ts +16 -0
  193. package/dist/viewer/render/model3d-view.d.ts.map +1 -0
  194. package/dist/viewer/render/ole-view.d.ts +44 -0
  195. package/dist/viewer/render/ole-view.d.ts.map +1 -0
  196. package/dist/viewer/render/smart-art-3d-view.d.ts +18 -0
  197. package/dist/viewer/render/smart-art-3d-view.d.ts.map +1 -0
  198. package/dist/viewer/render/smartart-view.d.ts +54 -0
  199. package/dist/viewer/render/smartart-view.d.ts.map +1 -0
  200. package/dist/viewer/render/table-view.d.ts +39 -0
  201. package/dist/viewer/render/table-view.d.ts.map +1 -0
  202. package/dist/viewer/render/zoom-view.d.ts +18 -0
  203. package/dist/viewer/render/zoom-view.d.ts.map +1 -0
  204. package/dist/viewer/state/autosave.svelte.d.ts +61 -0
  205. package/dist/viewer/state/autosave.svelte.d.ts.map +1 -0
  206. package/dist/viewer/state/fullscreen.d.ts +16 -0
  207. package/dist/viewer/state/fullscreen.d.ts.map +1 -0
  208. package/dist/viewer/state/index.d.ts +9 -0
  209. package/dist/viewer/state/index.d.ts.map +1 -0
  210. package/dist/viewer/state/layout-state.svelte.d.ts +30 -0
  211. package/dist/viewer/state/layout-state.svelte.d.ts.map +1 -0
  212. package/dist/viewer/state/loader-helpers.d.ts +27 -0
  213. package/dist/viewer/state/loader-helpers.d.ts.map +1 -0
  214. package/dist/viewer/state/navigation.d.ts +26 -0
  215. package/dist/viewer/state/navigation.d.ts.map +1 -0
  216. package/dist/viewer/state/presentation-loader.svelte.d.ts +41 -0
  217. package/dist/viewer/state/presentation-loader.svelte.d.ts.map +1 -0
  218. package/dist/viewer/state/render-context.d.ts +9 -0
  219. package/dist/viewer/state/render-context.d.ts.map +1 -0
  220. package/dist/viewer/state/smart-art-3d-context.d.ts +22 -0
  221. package/dist/viewer/state/smart-art-3d-context.d.ts.map +1 -0
  222. package/dist/viewer/state/viewer-effects.svelte.d.ts +31 -0
  223. package/dist/viewer/state/viewer-effects.svelte.d.ts.map +1 -0
  224. package/dist/viewer/state/viewer-state.svelte.d.ts +36 -0
  225. package/dist/viewer/state/viewer-state.svelte.d.ts.map +1 -0
  226. package/dist/viewer/state/viewport-handlers.d.ts +24 -0
  227. package/dist/viewer/state/viewport-handlers.d.ts.map +1 -0
  228. package/dist/viewer/style/connector-label.d.ts +13 -0
  229. package/dist/viewer/style/connector-label.d.ts.map +1 -0
  230. package/dist/viewer/style/css.d.ts +13 -0
  231. package/dist/viewer/style/css.d.ts.map +1 -0
  232. package/dist/viewer/style/element-style.d.ts +26 -0
  233. package/dist/viewer/style/element-style.d.ts.map +1 -0
  234. package/dist/viewer/style/index.d.ts +5 -0
  235. package/dist/viewer/style/index.d.ts.map +1 -0
  236. package/dist/viewer/style/merge-3d.d.ts +10 -0
  237. package/dist/viewer/style/merge-3d.d.ts.map +1 -0
  238. package/dist/viewer/style/text-style.d.ts +4 -0
  239. package/dist/viewer/style/text-style.d.ts.map +1 -0
  240. package/dist/viewer/types.d.ts +189 -0
  241. package/dist/viewer/types.d.ts.map +1 -0
  242. package/package.json +6 -4
@@ -0,0 +1,21 @@
1
+ import { PptxElement, TextSegment } from 'pptx-viewer-core';
2
+ import { ElementBoxPatch } from './editor-mutations';
3
+ import { EditorState } from './editor-state.svelte';
4
+ import { ZOrderDirection } from './editor-zorder';
5
+ /** History-integrated element and notes mutations for {@link EditorState}. */
6
+ export declare class EditorElementController {
7
+ #private;
8
+ constructor(editor: EditorState);
9
+ resetNudge(): void;
10
+ patchGeometry(id: string, box: ElementBoxPatch): void;
11
+ deleteSelected(): void;
12
+ duplicateSelected(): string | null;
13
+ applyElementPatch(id: string, patch: Partial<PptxElement>): void;
14
+ patchSelected(patch: Partial<PptxElement>): void;
15
+ insertElement(element: PptxElement): string | null;
16
+ reorderSelected(direction: ZOrderDirection): void;
17
+ nudgeSelected(dx: number, dy: number): void;
18
+ commitInlineText(id: string, text: string): void;
19
+ commitNotes(notes: string, notesSegments?: TextSegment[]): void;
20
+ }
21
+ //# sourceMappingURL=editor-element-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-element-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-element-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMvD,8EAA8E;AAC9E,qBAAa,uBAAuB;;gBAIvB,MAAM,EAAE,WAAW;IAI/B,UAAU,IAAI,IAAI;IAIlB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,GAAG,IAAI;IAQrD,cAAc,IAAI,IAAI;IAatB,iBAAiB,IAAI,MAAM,GAAG,IAAI;IAalC,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAgBhE,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAOhD,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI;IAalD,eAAe,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;IAYjD,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAsB3C,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAgBhD,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI;CAc/D"}
@@ -0,0 +1,12 @@
1
+ import { EditorState } from './editor-state.svelte';
2
+ /** Existing-equation edit state with history-integrated OMML replacement. */
3
+ export declare class EditorEquationController {
4
+ private readonly editor;
5
+ editingId: string | null;
6
+ constructor(editor: EditorState);
7
+ open(id: string): boolean;
8
+ get omml(): Record<string, unknown> | null;
9
+ apply(omml: Record<string, unknown>): void;
10
+ close(): void;
11
+ }
12
+ //# sourceMappingURL=editor-equation-controller.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-equation-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-equation-controller.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,6EAA6E;AAC7E,qBAAa,wBAAwB;IAGxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAS,gBAA+B;gBAEX,MAAM,EAAE,WAAW;IAEhD,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAczB,IAAI,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAazC;IAED,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAwB1C,KAAK,IAAI,IAAI;CAGb"}
@@ -0,0 +1,39 @@
1
+ import { PptxSlide } from 'pptx-viewer-core';
2
+ import { FindResult } from 'pptx-viewer-shared';
3
+ /**
4
+ * Reactive Find & Replace panel state for the Home tab's Editing group.
5
+ * Wraps the shared, framework-agnostic `render/find-replace` functions
6
+ * (pure slide-array search/replace); this class owns only the panel's UI
7
+ * state (query, current match, open/closed) and routes every replace through
8
+ * the host's history-tracked commit so undo/redo cover it.
9
+ */
10
+ export interface FindReplaceDeps {
11
+ getSlides(): readonly PptxSlide[];
12
+ /** Commit a fully-replaced slide array (pushes history, marks dirty). */
13
+ commitSlides(next: PptxSlide[]): void;
14
+ /** Called with the match's slide/element so the host can navigate to it. */
15
+ onNavigate?(slideIndex: number, elementId: string): void;
16
+ }
17
+ export declare class FindReplaceState {
18
+ #private;
19
+ open: boolean;
20
+ query: string;
21
+ replacement: string;
22
+ matchCase: boolean;
23
+ results: FindResult[];
24
+ index: number;
25
+ constructor(deps: FindReplaceDeps);
26
+ get hasResults(): boolean;
27
+ get matchCount(): number;
28
+ toggle(): void;
29
+ close(): void;
30
+ /** Re-run the search from the current query/matchCase and jump to the first match. */
31
+ search(): void;
32
+ next(): void;
33
+ prev(): void;
34
+ /** Replace the current match, then refresh the result set. */
35
+ replaceCurrent(): void;
36
+ /** Replace every match of the current query, then refresh the result set. */
37
+ replaceAll(): void;
38
+ }
39
+ //# sourceMappingURL=editor-find-replace.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-find-replace.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-find-replace.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC/B,SAAS,IAAI,SAAS,SAAS,EAAE,CAAC;IAClC,yEAAyE;IACzE,YAAY,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACtC,4EAA4E;IAC5E,UAAU,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED,qBAAa,gBAAgB;;IAC5B,IAAI,UAAiB;IACrB,KAAK,SAAc;IACnB,WAAW,SAAc;IACzB,SAAS,UAAiB;IAC1B,OAAO,eAAgC;IACvC,KAAK,SAAa;gBAIN,IAAI,EAAE,eAAe;IAIjC,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,MAAM,IAAI,IAAI;IAOd,KAAK,IAAI,IAAI;IAIb,sFAAsF;IACtF,MAAM,IAAI,IAAI;IAQd,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAmBZ,8DAA8D;IAC9D,cAAc,IAAI,IAAI;IAStB,6EAA6E;IAC7E,UAAU,IAAI,IAAI;CAUlB"}
@@ -0,0 +1,39 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ /** Toggleable boolean text-style flags. */
3
+ export type TextFlag = 'bold' | 'italic' | 'underline';
4
+ /** Flip a boolean text flag (bold / italic / underline). */
5
+ export declare function toggleTextFlagPatch(el: PptxElement, flag: TextFlag): Partial<PptxElement>;
6
+ /** Set an absolute font size (clamped to a sane range). */
7
+ export declare function setFontSizePatch(el: PptxElement, size: number): Partial<PptxElement>;
8
+ /** Nudge the font size by `delta` points (clamped). */
9
+ export declare function adjustFontSizePatch(el: PptxElement, delta: number): Partial<PptxElement>;
10
+ /** Set the text (foreground) colour. */
11
+ export declare function setTextColorPatch(el: PptxElement, color: string): Partial<PptxElement>;
12
+ /** Read the text highlight colour (empty string when unset). */
13
+ export declare function highlightColorOf(el: PptxElement): string;
14
+ /** Set the text highlight colour, preserving other text-style fields. */
15
+ export declare function setHighlightColorPatch(el: PptxElement, color: string): Partial<PptxElement>;
16
+ /** Set the shape fill colour. */
17
+ export declare function setFillColorPatch(el: PptxElement, color: string): Partial<PptxElement>;
18
+ /**
19
+ * Set the shape fill colour AND force `fillMode` back to `'solid'`. Picking a
20
+ * flat colour swatch implies solid fill, so it also clears any active
21
+ * gradient (the renderer prefers `fillMode === 'gradient'` over `fillColor`
22
+ * when both are present); mirrors the vanilla binding's `setShapeFill`.
23
+ */
24
+ export declare function setSolidFillPatch(el: PptxElement, color: string): Partial<PptxElement>;
25
+ /** Set the shape stroke (outline) colour. */
26
+ export declare function setStrokeColorPatch(el: PptxElement, color: string): Partial<PptxElement>;
27
+ /** Read the shape stroke width (defaults to 1 when unset). */
28
+ export declare function strokeWidthOf(el: PptxElement): number;
29
+ /** Set the shape stroke width (px), preserving other shape-style fields. */
30
+ export declare function setStrokeWidthPatch(el: PptxElement, width: number): Partial<PptxElement>;
31
+ /** Read the shape fill opacity (0..1, defaults to fully opaque when unset). */
32
+ export declare function fillOpacityOf(el: PptxElement): number;
33
+ /** Set the shape fill opacity (0..1), preserving other shape-style fields. */
34
+ export declare function setFillOpacityPatch(el: PptxElement, opacity: number): Partial<PptxElement>;
35
+ /** Read the shape stroke opacity (0..1, defaults to fully opaque when unset). */
36
+ export declare function strokeOpacityOf(el: PptxElement): number;
37
+ /** Set the shape stroke opacity (0..1), preserving other shape-style fields. */
38
+ export declare function setStrokeOpacityPatch(el: PptxElement, opacity: number): Partial<PptxElement>;
39
+ //# sourceMappingURL=editor-format-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-format-mutations.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-format-mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA8BpD,2CAA2C;AAC3C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEvD,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAGzF;AAED,2DAA2D;AAC3D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAEpF;AAED,uDAAuD;AACvD,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAExF;AAED,wCAAwC;AACxC,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAEtF;AAED,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAExD;AAED,yEAAyE;AACzE,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAG3F;AAED,iCAAiC;AACjC,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAEtF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAGtF;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAExF;AAED,8DAA8D;AAC9D,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAErD;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAGxF;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAErD;AAED,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAK1F;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAEvD;AAED,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAK5F"}
@@ -0,0 +1,13 @@
1
+ import { EditorState } from './editor-state.svelte';
2
+ /** One-shot Format Painter state and history-integrated application. */
3
+ export declare class EditorFormatPainterController {
4
+ #private;
5
+ private readonly editor;
6
+ constructor(editor: EditorState);
7
+ get active(): boolean;
8
+ get enabled(): boolean;
9
+ toggle(): void;
10
+ applyTo(id: string): boolean;
11
+ cancel(): void;
12
+ }
13
+ //# sourceMappingURL=editor-format-painter-controller.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-format-painter-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-format-painter-controller.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,wEAAwE;AACxE,qBAAa,6BAA6B;;IAG7B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,MAAM,IAAI,IAAI;IAWd,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAkB5B,MAAM,IAAI,IAAI;CAGd"}
@@ -0,0 +1,29 @@
1
+ import { BoxTransform, InteractionBox, ResizeHandleId } from 'pptx-viewer-shared';
2
+ /**
3
+ * Small geometry helpers the shared `element-interaction` module does not
4
+ * cover: Shift-to-lock-aspect on corner resizes and arrow-key nudge steps.
5
+ * Pure math only (mirrors the vanilla binding's `editor-geometry`); no Svelte
6
+ * or DOM dependencies, so it is unit-testable in isolation.
7
+ */
8
+ /** Arrow-key nudge step in element px (Shift multiplies to the large step). */
9
+ export declare const NUDGE_STEP = 1;
10
+ export declare const NUDGE_STEP_LARGE = 10;
11
+ /** True for the four corner handles (the ones Shift aspect-locks). */
12
+ export declare function isCornerHandle(handle: ResizeHandleId): boolean;
13
+ /**
14
+ * Constrain a corner resize (already computed by the shared `applyResize`) to
15
+ * the start box's aspect ratio: the axis with the larger relative change wins
16
+ * and the other follows, keeping the anchored (opposite) corner fixed. Edge
17
+ * handles are returned unchanged; aspect-locking a one-axis handle would
18
+ * fight the drag direction.
19
+ */
20
+ export declare function lockResizeAspect(resized: BoxTransform, start: InteractionBox, handle: ResizeHandleId, minSize?: number): BoxTransform;
21
+ /**
22
+ * Map an arrow key to a nudge delta in element px, or `null` for other keys.
23
+ * `large` (Shift held) uses the 10px step.
24
+ */
25
+ export declare function nudgeDelta(key: string, large: boolean): {
26
+ dx: number;
27
+ dy: number;
28
+ } | null;
29
+ //# sourceMappingURL=editor-geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-geometry.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-geometry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEvF;;;;;GAKG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAInC,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,MAAyB,GAChC,YAAY,CA0Bd;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAczF"}
@@ -0,0 +1,48 @@
1
+ import { InteractionBox, ResizeHandleId, SnapLine, SnapSibling } from 'pptx-viewer-shared';
2
+ /**
3
+ * Pointer gesture driver for the editing overlay: move / resize / rotate.
4
+ *
5
+ * All geometry math comes from the shared `element-interaction` helpers
6
+ * (`applyDragDelta`, `applyResize`, `computeRotation`, `snapAngle`) plus the
7
+ * shared `computeSnapToShape` snap model during moves; this module only owns
8
+ * the pointer-event lifecycle (dead-zone, window listeners, cancel). It is
9
+ * framework-agnostic (no Svelte), matching the vanilla binding's driver.
10
+ */
11
+ export type GestureKind = 'move' | 'resize' | 'rotate';
12
+ /** Live geometry emitted during and at the end of a gesture (element px). */
13
+ export interface GestureTransform {
14
+ id: string;
15
+ x: number;
16
+ y: number;
17
+ width: number;
18
+ height: number;
19
+ rotation: number;
20
+ }
21
+ export interface GestureDeps {
22
+ /** Current stage scale (screen px per element px). */
23
+ getScale(): number;
24
+ /** Element geometry at gesture start (element px). */
25
+ getElementBox(id: string): InteractionBox | undefined;
26
+ /** Sibling boxes on the same slide, for snap-to-shape during a move. */
27
+ getSiblings(): SnapSibling[];
28
+ /** Overlay origin in client coordinates, for rotation pointer mapping. */
29
+ getStageOrigin(): {
30
+ left: number;
31
+ top: number;
32
+ };
33
+ /** First movement past the dead zone (push history, mark interaction). */
34
+ onStart(id: string, kind: GestureKind): void;
35
+ /** Live preview: apply the geometry and render `lines` as snap guides. */
36
+ onPreview(transform: GestureTransform, lines: readonly SnapLine[]): void;
37
+ /** Gesture finished. `moved` is false for a plain tap (no dead-zone exit). */
38
+ onEnd(transform: GestureTransform | null, moved: boolean, id: string): void;
39
+ }
40
+ export interface GestureController {
41
+ /** Begin a gesture from a `pointerdown`. `handle` only for `resize`. */
42
+ begin(kind: GestureKind, id: string, event: PointerEvent, handle?: ResizeHandleId): void;
43
+ isActive(): boolean;
44
+ /** Abort listeners without emitting an end transform (teardown). */
45
+ dispose(): void;
46
+ }
47
+ export declare function createGestureController(deps: GestureDeps): GestureController;
48
+ //# sourceMappingURL=editor-gestures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-gestures.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-gestures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAYhG;;;;;;;;GAQG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEvD,6EAA6E;AAC7E,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,WAAW;IAC3B,sDAAsD;IACtD,QAAQ,IAAI,MAAM,CAAC;IACnB,sDAAsD;IACtD,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IACtD,wEAAwE;IACxE,WAAW,IAAI,WAAW,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,0EAA0E;IAC1E,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7C,0EAA0E;IAC1E,SAAS,CAAC,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IACzE,8EAA8E;IAC9E,KAAK,CAAC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5E;AAED,MAAM,WAAW,iBAAiB;IACjC,wEAAwE;IACxE,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACzF,QAAQ,IAAI,OAAO,CAAC;IACpB,oEAAoE;IACpE,OAAO,IAAI,IAAI,CAAC;CAChB;AAiBD,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,GAAG,iBAAiB,CA2I5E"}
@@ -0,0 +1,59 @@
1
+ import { InkPoint } from 'pptx-viewer-shared';
2
+ import { EditorState } from './editor-state.svelte';
3
+ /**
4
+ * The ribbon Draw tab's active tool. `'select'` means "not drawing": the
5
+ * stage's normal selection/drag/resize gestures own the pointer, matching
6
+ * React's `DrawingTool` / Angular's `DrawTool` conventions (minus `freeform`,
7
+ * out of scope for this wave; see the Draw tab's JSDoc).
8
+ */
9
+ export type InkDrawTool = 'select' | 'pen' | 'highlighter' | 'eraser';
10
+ /**
11
+ * EditorInkController: the ribbon Draw tab's tool/colour/width state plus the
12
+ * pure element-factory / erase mutations, split out of `EditorState` to keep
13
+ * it under the repo's 300-LOC budget (mirrors `EditorArrangeController` /
14
+ * `EditorBackgroundController`). Instantiated as `EditorState.inkOps`.
15
+ *
16
+ * The actual pointer-event lifecycle (accumulating a stroke's points, driving
17
+ * the live preview) lives in `editor-ink-gesture.ts`, owned by
18
+ * `EditorController`; this class only holds the tool/colour/width state the
19
+ * gesture controller reads and the two mutations it calls into
20
+ * ({@link commitStroke}, {@link eraseElementAt}), both of which route through
21
+ * `EditorState` so they participate in undo/redo like every other edit.
22
+ */
23
+ export declare class EditorInkController {
24
+ #private;
25
+ /** The active draw tool. `'select'` hands the stage back to normal editing gestures. */
26
+ tool: InkDrawTool;
27
+ /** Stroke colour for new pen/highlighter strokes. */
28
+ color: string;
29
+ /** Stroke width (px, element space) for new pen/highlighter strokes. */
30
+ width: number;
31
+ /** SVG path `d` for the in-progress stroke's live preview, or `''` when idle. */
32
+ livePathD: string;
33
+ constructor(editor: EditorState);
34
+ /** True whenever a tool other than `select` is active: the stage hands pointer gestures to ink drawing. */
35
+ get isDrawing(): boolean;
36
+ /**
37
+ * Switch the active tool. Clears the current selection when entering a draw
38
+ * tool so the selection overlay's resize/rotate handles (which own their
39
+ * own `pointerdown` and would otherwise race a drawing gesture over the
40
+ * same screen area) are not rendered while drawing.
41
+ */
42
+ setTool(tool: InkDrawTool): void;
43
+ setColor(color: string): void;
44
+ setWidth(width: number): void;
45
+ /** Update the live preview path while a pen/highlighter stroke is in progress. */
46
+ previewStroke(points: readonly InkPoint[]): void;
47
+ /**
48
+ * Finalise the in-progress stroke into a new `ink` element (undoable via
49
+ * `EditorState.insertElement`), or discard it silently when too short (a
50
+ * plain tap) or the tool changed mid-gesture.
51
+ */
52
+ commitStroke(points: readonly InkPoint[]): void;
53
+ /**
54
+ * Hit-test `ink` elements on the current slide at `point` (topmost first)
55
+ * and delete the first match, with history. No-op when nothing is hit.
56
+ */
57
+ eraseElementAt(point: InkPoint): void;
58
+ }
59
+ //# sourceMappingURL=editor-ink-controller.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-ink-controller.svelte.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-ink-controller.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,KAAK,GAAG,aAAa,GAAG,QAAQ,CAAC;AAQtE;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB;;IAG/B,wFAAwF;IACxF,IAAI,cAAiC;IACrC,qDAAqD;IACrD,KAAK,SAA6B;IAClC,wEAAwE;IACxE,KAAK,SAA6B;IAClC,iFAAiF;IACjF,SAAS,SAAc;gBAEX,MAAM,EAAE,WAAW;IAI/B,2GAA2G;IAC3G,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAQhC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI7B,kFAAkF;IAClF,aAAa,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI;IAIhD;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI;IAgB/C;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAmBrC"}
@@ -0,0 +1,37 @@
1
+ import { InkPoint } from 'pptx-viewer-shared';
2
+ import { InkDrawTool } from './editor-ink-controller.svelte';
3
+ /**
4
+ * Pointer gesture driver for freehand ink drawing: pen/highlighter accumulate
5
+ * points into a live stroke and commit it on pointerup; eraser hit-tests on
6
+ * pointerdown alone. Framework-agnostic (no Svelte), mirroring
7
+ * `editor-gestures.ts`'s pure-module + window-listener pattern so a stroke
8
+ * keeps tracking the pointer even when it leaves the stage bounds.
9
+ */
10
+ export interface InkGestureDeps {
11
+ /** Current stage scale (screen px per element px). */
12
+ getScale(): number;
13
+ /** Stage-holder origin in client coordinates, for pointer-to-slide-space mapping. */
14
+ getStageOrigin(): {
15
+ left: number;
16
+ top: number;
17
+ };
18
+ /** The active draw tool; `'select'` means the gesture controller is idle. */
19
+ getTool(): InkDrawTool;
20
+ /** A pen/highlighter stroke started (first point captured). */
21
+ onStrokeStart(): void;
22
+ /** Live preview: the accumulated points so far (pen/highlighter only). */
23
+ onStrokePreview(points: readonly InkPoint[]): void;
24
+ /** A pen/highlighter stroke finished (pointerup); may be too short to keep. */
25
+ onStrokeEnd(points: readonly InkPoint[]): void;
26
+ /** Eraser: a single point to hit-test against ink elements. */
27
+ onErase(point: InkPoint): void;
28
+ }
29
+ export interface InkGestureController {
30
+ /** Handle a stage `pointerdown` while a draw tool may be active. No-op when the tool is `'select'`. */
31
+ handlePointerDown(event: PointerEvent): void;
32
+ isActive(): boolean;
33
+ /** Abort listeners without emitting an end callback (teardown). */
34
+ dispose(): void;
35
+ }
36
+ export declare function createInkGestureController(deps: InkGestureDeps): InkGestureController;
37
+ //# sourceMappingURL=editor-ink-gesture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-ink-gesture.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-ink-gesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAElE;;;;;;GAMG;AAEH,MAAM,WAAW,cAAc;IAC9B,sDAAsD;IACtD,QAAQ,IAAI,MAAM,CAAC;IACnB,qFAAqF;IACrF,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,6EAA6E;IAC7E,OAAO,IAAI,WAAW,CAAC;IACvB,+DAA+D;IAC/D,aAAa,IAAI,IAAI,CAAC;IACtB,0EAA0E;IAC1E,eAAe,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IACnD,+EAA+E;IAC/E,WAAW,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,CAAC;IAC/C,+DAA+D;IAC/D,OAAO,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACpC,uGAAuG;IACvG,iBAAiB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7C,QAAQ,IAAI,OAAO,CAAC;IACpB,mEAAmE;IACnE,OAAO,IAAI,IAAI,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,cAAc,GAAG,oBAAoB,CAmErF"}
@@ -0,0 +1,13 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ import { CanvasSize } from 'pptx-viewer-shared';
3
+ /**
4
+ * Pure factory for the Insert > Action Button action: wraps the shared
5
+ * `buildActionButtonElement` (one of the 12 OOXML built-in action-button
6
+ * presets, `action-buttons.ts`) and centres the result on the slide canvas.
7
+ */
8
+ /**
9
+ * Build a new, centred action-button shape from the shared preset catalogue,
10
+ * or `null` when `shapeType` isn't a known action-button preset.
11
+ */
12
+ export declare function buildActionButtonInsertElement(shapeType: string, canvasSize: CanvasSize): PptxElement | null;
13
+ //# sourceMappingURL=editor-insert-action-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert-action-button.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert-action-button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;;;GAIG;AAEH;;;GAGG;AACH,wBAAgB,8BAA8B,CAC7C,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,GACpB,WAAW,GAAG,IAAI,CAOpB"}
@@ -0,0 +1,10 @@
1
+ import { PptxChartType, PptxElement } from 'pptx-viewer-core';
2
+ import { CanvasSize } from 'pptx-viewer-shared';
3
+ /**
4
+ * Pure factory for the Insert > Chart action: wraps the shared
5
+ * `createDefaultChartElement` (fully-populated sample data, ready to render)
6
+ * and centres the result on the slide canvas.
7
+ */
8
+ /** Build a new, centred chart element for the given chart type. */
9
+ export declare function buildChartInsertElement(chartType: PptxChartType, canvasSize: CanvasSize): PptxElement;
10
+ //# sourceMappingURL=editor-insert-chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert-chart.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert-chart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;;;GAIG;AAEH,mEAAmE;AACnE,wBAAgB,uBAAuB,CACtC,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,UAAU,GACpB,WAAW,CAIb"}
@@ -0,0 +1,5 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ import { CanvasSize } from 'pptx-viewer-shared';
3
+ /** Build a new, centred equation element from an OMML object tree. */
4
+ export declare function buildEquationInsertElement(omml: Record<string, unknown>, canvasSize: CanvasSize): PptxElement;
5
+ //# sourceMappingURL=editor-insert-equation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert-equation.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert-equation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBrD,sEAAsE;AACtE,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,UAAU,EAAE,UAAU,GACpB,WAAW,CAsBb"}
@@ -0,0 +1,17 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ import { CanvasSize } from 'pptx-viewer-shared';
3
+ /** Current slide-number-aware field context passed to `resolveFieldDisplayText`. */
4
+ export interface FieldInsertContext {
5
+ slideNumber: number;
6
+ }
7
+ /**
8
+ * Resolve the display text for a field placeholder via the shared
9
+ * `substituteFieldText` helper (slide number / date-time / header / footer).
10
+ */
11
+ export declare function resolveFieldDisplayText(fieldType: string, ctx: FieldInsertContext): string;
12
+ /**
13
+ * Build a new, centred field-placeholder shape (a text-bearing shape whose
14
+ * single segment carries `fieldType` + a fresh field GUID).
15
+ */
16
+ export declare function buildFieldInsertElement(fieldType: string, displayText: string, canvasSize: CanvasSize): PptxElement;
17
+ //# sourceMappingURL=editor-insert-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert-field.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert-field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBrD,oFAAoF;AACpF,MAAM,WAAW,kBAAkB;IAClC,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB,GAAG,MAAM,CAM1F;AAWD;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,GACpB,WAAW,CAiBb"}
@@ -0,0 +1,10 @@
1
+ import { PptxElement } from 'pptx-viewer-core';
2
+ import { CanvasSize } from 'pptx-viewer-shared';
3
+ /** The media kind a chosen file maps to, or `null` for an unsupported type. */
4
+ export declare function mediaTypeOfFile(mimeType: string): 'audio' | 'video' | null;
5
+ /**
6
+ * Build a centred `media` element from a chosen audio/video `File`. Resolves
7
+ * `null` when the file isn't audio/video or can't be read.
8
+ */
9
+ export declare function buildMediaInsertElement(file: File, canvasSize: CanvasSize): Promise<PptxElement | null>;
10
+ //# sourceMappingURL=editor-insert-media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert-media.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert-media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAkBrD,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAQ1E;AAgCD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC5C,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,GACpB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAwB7B"}
@@ -0,0 +1,8 @@
1
+ import { PptxElement, SmartArtLayout } from 'pptx-viewer-core';
2
+ import { CanvasSize } from 'pptx-viewer-shared';
3
+ /**
4
+ * Build a new, centred SmartArt element from a gallery preset (layout +
5
+ * default node texts).
6
+ */
7
+ export declare function buildSmartArtInsertElement(layout: SmartArtLayout, defaultItems: string[], canvasSize: CanvasSize): PptxElement;
8
+ //# sourceMappingURL=editor-insert-smart-art.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert-smart-art.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert-smart-art.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAerD;;;GAGG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,MAAM,EAAE,EACtB,UAAU,EAAE,UAAU,GACpB,WAAW,CAab"}
@@ -0,0 +1,40 @@
1
+ import { PptxElement, PptxSlide } from 'pptx-viewer-core';
2
+ import { CanvasSize, ShapePresetType } from 'pptx-viewer-shared';
3
+ /**
4
+ * Element insertion for the Svelte editor.
5
+ *
6
+ * The element *factories* (`newTextElement`, `newShapeElement`,
7
+ * `newTableElement`) are the shared, framework-agnostic builders from
8
+ * `pptx-viewer-shared` (`render/editor-insert`); every binding uses the same
9
+ * ones so a "Text box" or "Rectangle" is identical across React/Vue/Angular/
10
+ * Svelte. This module adds only the two thin, binding-local pieces the shared
11
+ * factories deliberately leave out: id generation (the factories return
12
+ * `id: ''`) and the pure "append to the current slide" mutation.
13
+ */
14
+ export { newShapeElement, newTableElement, newTextElement } from 'pptx-viewer-shared';
15
+ /** Generate a fresh, collision-resistant element id (prefixed for clarity). */
16
+ export declare function newElementId(): string;
17
+ /**
18
+ * Build an `image` element from a data URL (the file picker reads a chosen
19
+ * file as a `data:` URI, which the renderer consumes directly via `imageData`).
20
+ */
21
+ export declare function newImageElement(imageData: string, x: number, y: number, width: number, height: number): PptxElement;
22
+ /**
23
+ * Build a `shape` element for any preset in the shared shape catalogue
24
+ * (`SHAPE_PRESET_DEFS`, 30 presets). The shared `newShapeElement` factory
25
+ * only covers `'rect' | 'ellipse' | 'line'`; core's `shapeType` field is a
26
+ * plain string with no such restriction, so this widens it for the Insert
27
+ * tab's shape gallery without touching the shared factory's narrow contract.
28
+ */
29
+ export declare function newPresetShapeElement(shapeType: ShapePresetType, x?: number, y?: number): PptxElement;
30
+ /**
31
+ * Centre an element's box on the slide canvas (top-left clamped to >= 0).
32
+ * Used by the "structured" Insert actions (chart / equation / SmartArt /
33
+ * media / action button / field) so a freshly-inserted diagram or media
34
+ * clip lands in the middle of the slide rather than stacking at a fixed
35
+ * corner offset.
36
+ */
37
+ export declare function centerOnCanvas(el: PptxElement, canvasSize: CanvasSize): void;
38
+ /** Append `element` to the given slide's element list (immutable). */
39
+ export declare function appendElement(slides: readonly PptxSlide[], slideIndex: number, element: PptxElement): PptxSlide[];
40
+ //# sourceMappingURL=editor-insert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-insert.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-insert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAItE;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEtF,+EAA+E;AAC/E,wBAAgB,YAAY,IAAI,MAAM,CAOrC;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC9B,SAAS,EAAE,MAAM,EACjB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACZ,WAAW,CAWb;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACpC,SAAS,EAAE,eAAe,EAC1B,CAAC,GAAE,MAAY,EACf,CAAC,GAAE,MAAY,GACb,WAAW,CAgBb;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI,CAG5E;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAC5B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,WAAW,GAClB,SAAS,EAAE,CAEb"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Editing keyboard shortcuts, attached to the viewer root alongside (before)
3
+ * the slideshow navigation handler. The navigation is gated off while an
4
+ * element is selected (see `PowerPointViewer`), so arrows nudge instead of
5
+ * changing slides.
6
+ *
7
+ * Keys: Escape deselect; Delete/Backspace delete; Ctrl+D duplicate;
8
+ * Ctrl+C/X/V copy/cut/paste; Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y undo/redo; arrows
9
+ * nudge (Shift = 10px). Mirrors the vanilla binding's `editor-keyboard`.
10
+ *
11
+ * Ctrl+V is intentionally checked before the "a selection is required" guard
12
+ * below (paste targets the current slide regardless of selection, matching
13
+ * the vanilla binding); Ctrl+C/X are gated on a selection like duplicate/delete.
14
+ */
15
+ export interface EditorKeyboardDeps {
16
+ /** False disables everything (not editable, presenting, inline editing). */
17
+ isActive(): boolean;
18
+ getSelectedId(): string | null;
19
+ deselect(): void;
20
+ deleteSelected(): void;
21
+ duplicateSelected(): void;
22
+ nudgeSelected(dx: number, dy: number): void;
23
+ undo(): void;
24
+ redo(): void;
25
+ copySelected(): void;
26
+ cutSelected(): void;
27
+ paste(): void;
28
+ cancelFormatPainter?(): boolean;
29
+ }
30
+ export declare function createEditorKeydownHandler(deps: EditorKeyboardDeps): (event: KeyboardEvent) => void;
31
+ //# sourceMappingURL=editor-keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-keyboard.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-keyboard.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB;IAClC,4EAA4E;IAC5E,QAAQ,IAAI,OAAO,CAAC;IACpB,aAAa,IAAI,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,IAAI,IAAI,CAAC;IACjB,cAAc,IAAI,IAAI,CAAC;IACvB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,IAAI,CAAC;IACb,YAAY,IAAI,IAAI,CAAC;IACrB,WAAW,IAAI,IAAI,CAAC;IACpB,KAAK,IAAI,IAAI,CAAC;IACd,mBAAmB,CAAC,IAAI,OAAO,CAAC;CAChC;AAID,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,kBAAkB,GACtB,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAsEhC"}
@@ -0,0 +1,17 @@
1
+ import { PptxElement, PptxSlideMaster } from 'pptx-viewer-core';
2
+ import { EditorState } from './editor-state.svelte';
3
+ export interface MasterViewTarget {
4
+ masterIndex: number;
5
+ layoutIndex: number | null;
6
+ }
7
+ /** Routes the active editing layer into a parsed slide master or layout. */
8
+ export declare class EditorMasterController {
9
+ private readonly editor;
10
+ constructor(editor: EditorState);
11
+ enter(masterIndex?: number, layoutIndex?: number | null): void;
12
+ exit(): void;
13
+ activeElements(): PptxElement[] | null;
14
+ replace(elements: PptxElement[]): boolean;
15
+ cloneMasters(): PptxSlideMaster[];
16
+ }
17
+ //# sourceMappingURL=editor-master-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-master-controller.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-master-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,4EAA4E;AAC5E,qBAAa,sBAAsB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD,KAAK,CAAC,WAAW,SAAI,EAAE,WAAW,GAAE,MAAM,GAAG,IAAW,GAAG,IAAI;IAM/D,IAAI,IAAI,IAAI;IAMZ,cAAc,IAAI,WAAW,EAAE,GAAG,IAAI;IAWtC,OAAO,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,OAAO;IAsBzC,YAAY,IAAI,eAAe,EAAE;CAGjC"}
@@ -0,0 +1,59 @@
1
+ import { PptxElement, PptxSlide, TextSegment } from 'pptx-viewer-core';
2
+ /**
3
+ * Pure, immutable slide-array mutations for the Svelte editor.
4
+ *
5
+ * Mirrors the vanilla binding's `editor-mutations` (in turn the Vue binding's
6
+ * `useEditorOperations` commit helpers), minus the reactivity: every function
7
+ * takes the current `PptxSlide[]` and returns a brand-new array (untouched
8
+ * slides are reused by reference so the render layer can cheaply detect
9
+ * changes). All cloning defers to the core helpers (`cloneSlide`,
10
+ * `cloneElement`, `duplicateElement`); nothing is mutated in place.
11
+ */
12
+ /** Geometry patch applied by drag / resize / rotate / nudge. */
13
+ export interface ElementBoxPatch {
14
+ x: number;
15
+ y: number;
16
+ width: number;
17
+ height: number;
18
+ rotation: number;
19
+ }
20
+ /** Find a top-level element by id on the given slide (or `undefined`). */
21
+ export declare function findSlideElement(slides: readonly PptxSlide[], slideIndex: number, elementId: string): PptxElement | undefined;
22
+ /** Rebuild one slide's `elements` via `mapElements`; other slides are reused. */
23
+ export declare function mapSlideElements(slides: readonly PptxSlide[], slideIndex: number, mapElements: (elements: PptxElement[]) => PptxElement[]): PptxSlide[];
24
+ /** Shallow-merge `updates` into the element with `elementId` (cloned first). */
25
+ export declare function updateElement(slides: readonly PptxSlide[], slideIndex: number, elementId: string, updates: Partial<PptxElement>): PptxSlide[];
26
+ /** Patch an element's geometry (x/y/width/height/rotation). */
27
+ export declare function patchElementGeometry(slides: readonly PptxSlide[], slideIndex: number, elementId: string, box: ElementBoxPatch): PptxSlide[];
28
+ /** Remove the element with `elementId` from the slide. */
29
+ export declare function removeElement(slides: readonly PptxSlide[], slideIndex: number, elementId: string): PptxSlide[];
30
+ /**
31
+ * Deep-clone an element (fresh ids via core `duplicateElement`, group children
32
+ * included), offset it slightly, and append it to the slide. Returns the new
33
+ * slide array plus the copy's id, or `null` when the source is missing.
34
+ */
35
+ export declare function duplicateElementOnSlide(slides: readonly PptxSlide[], slideIndex: number, elementId: string): {
36
+ slides: PptxSlide[];
37
+ newId: string;
38
+ } | null;
39
+ /** Deep-clone the whole slide array (history snapshots). */
40
+ export declare function cloneSlides(slides: readonly PptxSlide[]): PptxSlide[];
41
+ /**
42
+ * Replace the plain-text speaker notes on one slide. Mirrors the Vue binding's
43
+ * `onNotesUpdate`: only `notes` is written, `notesSegments` (rich runs loaded
44
+ * from a .pptx) is intentionally left untouched, matching the plain-text
45
+ * commit contract shared by every binding's notes panel.
46
+ */
47
+ export declare function updateSlideNotes(slides: readonly PptxSlide[], slideIndex: number, notes: string, notesSegments?: TextSegment[]): PptxSlide[];
48
+ /**
49
+ * Shallow-merge `patch` into the slide at `slideIndex` (cloned first). Other
50
+ * slides are reused by reference. Backs the Design tab's Format Background
51
+ * panel and the Transitions tab's single-slide apply.
52
+ */
53
+ export declare function updateSlide(slides: readonly PptxSlide[], slideIndex: number, patch: Partial<PptxSlide>): PptxSlide[];
54
+ /**
55
+ * Shallow-merge `patch` into every slide. Backs the Transitions tab's
56
+ * "Apply to All Slides" option.
57
+ */
58
+ export declare function updateAllSlides(slides: readonly PptxSlide[], patch: Partial<PptxSlide>): PptxSlide[];
59
+ //# sourceMappingURL=editor-mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-mutations.d.ts","sourceRoot":"","sources":["../../../src/viewer/editor/editor-mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG5E;;;;;;;;;GASG;AAEH,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC/B,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;AAKD,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GACf,WAAW,GAAG,SAAS,CAEzB;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,GACrD,SAAS,EAAE,CAIb;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAC5B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAC3B,SAAS,EAAE,CAMb;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CACnC,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,eAAe,GAClB,SAAS,EAAE,CAQb;AAED,0DAA0D;AAC1D,wBAAgB,aAAa,CAC5B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GACf,SAAS,EAAE,CAIb;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GACf;IAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAY/C;AAED,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,EAAE,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,WAAW,EAAE,GAC3B,SAAS,EAAE,CAMb;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAC1B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,GACvB,SAAS,EAAE,CAEb;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,GACvB,SAAS,EAAE,CAEb"}