pptx-svelte-viewer 2.19.0 → 2.20.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 (36) hide show
  1. package/CHANGELOG.md +448 -0
  2. package/dist/{AiChatPanel-DKeBilcx.js → AiChatPanel-DPXM1HsP.js} +188 -204
  3. package/dist/{export-CZzvhGTm.js → export-Cp97qZ_g.js} +22289 -21779
  4. package/dist/i18n.js +1 -1
  5. package/dist/index.d.ts +55 -9
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +29 -29
  8. package/dist/pptx-svelte-viewer.css +1 -1
  9. package/dist/{translator-EP8BTIz6.js → translator-Cs5ewuZ4.js} +8 -0
  10. package/dist/viewer/components/presentation-toolbar.svelte.d.ts +6 -0
  11. package/dist/viewer/components/presentation-toolbar.svelte.d.ts.map +1 -1
  12. package/dist/viewer/editor/editor-document-lifecycle.d.ts.map +1 -1
  13. package/dist/viewer/editor/editor-state.svelte.d.ts +14 -0
  14. package/dist/viewer/editor/editor-state.svelte.d.ts.map +1 -1
  15. package/dist/viewer/index.d.ts +298 -17
  16. package/dist/viewer/index.js +10 -10
  17. package/dist/viewer/state/autosave-recovery.svelte.d.ts +48 -0
  18. package/dist/viewer/state/autosave-recovery.svelte.d.ts.map +1 -0
  19. package/dist/viewer/state/autosave.svelte.d.ts +26 -2
  20. package/dist/viewer/state/autosave.svelte.d.ts.map +1 -1
  21. package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts +23 -0
  22. package/dist/viewer/state/create-viewer-state-collab.svelte.d.ts.map +1 -1
  23. package/dist/viewer/state/create-viewer-state-presentation.svelte.d.ts.map +1 -1
  24. package/dist/viewer/state/create-viewer-state-types.d.ts +21 -4
  25. package/dist/viewer/state/create-viewer-state-types.d.ts.map +1 -1
  26. package/dist/viewer/state/create-viewer-state.svelte.d.ts.map +1 -1
  27. package/dist/viewer/state/viewer-options.svelte.d.ts +5 -3
  28. package/dist/viewer/state/viewer-options.svelte.d.ts.map +1 -1
  29. package/dist/viewer/state/viewer-parity-ui.svelte.d.ts +11 -0
  30. package/dist/viewer/state/viewer-parity-ui.svelte.d.ts.map +1 -1
  31. package/dist/viewer/state/viewer-state-options.d.ts.map +1 -1
  32. package/dist/viewer/state/viewport-handlers.d.ts +4 -0
  33. package/dist/viewer/state/viewport-handlers.d.ts.map +1 -1
  34. package/dist/viewer/types.d.ts +32 -8
  35. package/dist/viewer/types.d.ts.map +1 -1
  36. package/package.json +1 -1
package/dist/i18n.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as s, c as e, i as t, n as r, o, r as n, s as i, t as l } from "./translator-EP8BTIz6.js";
1
+ import { a as s, c as e, i as t, n as r, o, r as n, s as i, t as l } from "./translator-Cs5ewuZ4.js";
2
2
  export {
3
3
  o as LOCALE_CATALOG,
4
4
  l as createTranslator,
package/dist/index.d.ts CHANGED
@@ -183,11 +183,18 @@ interface XmlObject {
183
183
  [child: string]: XmlObject | XmlObject[] | string | undefined;
184
184
  }
185
185
  /**
186
- * Shape lock attributes from `p:cNvSpPr / a:spLocks`.
186
+ * Lock attributes from an element's non-visual properties node.
187
187
  *
188
188
  * When a flag is `true` the corresponding user interaction is disabled
189
189
  * in the editor (e.g. `noRotation` prevents free rotation of the shape).
190
190
  *
191
+ * One bag covers every family, but the families are NOT interchangeable in
192
+ * the file: `a:spLocks` (`CT_ShapeLocking`), `a:picLocks`, `a:cxnSpLocks`,
193
+ * `a:grpSpLocks` (`CT_GroupLocking`) and `a:graphicFrameLocks`
194
+ * (`CT_GraphicalObjectFrameLocking`) each declare their own attribute subset.
195
+ * `runtime/shape-lock-containers` holds that table and is what decides which
196
+ * of these fields may be written for a given element.
197
+ *
191
198
  * @example
192
199
  * ```ts
193
200
  * const locks: PptxShapeLocks = { noMove: true, noResize: true };
@@ -206,6 +213,14 @@ interface PptxShapeLocks {
206
213
  noAdjustHandles?: boolean;
207
214
  noChangeArrowheads?: boolean;
208
215
  noChangeShapeType?: boolean;
216
+ /**
217
+ * `a:graphicFrameLocks/@noDrilldown`: forbids selecting the individual
218
+ * parts inside a graphic frame (a chart series, a SmartArt node). Declared
219
+ * ONLY by `CT_GraphicalObjectFrameLocking`, so it is written for tables,
220
+ * charts, SmartArt, OLE objects and graphic-frame media, and never onto
221
+ * `a:spLocks` / `a:picLocks` / `a:cxnSpLocks` / `a:grpSpLocks`.
222
+ */
223
+ noDrilldown?: boolean;
209
224
  /**
210
225
  * Text-box flag from `p:cNvSpPr/@txBox`. Not a lock in the strict sense,
211
226
  * but it lives on the same non-visual-properties node as `a:spLocks`, so
@@ -9869,13 +9884,28 @@ interface PowerPointViewerProps {
9869
9884
  /** Host override for the File > Open action. */
9870
9885
  onopenfile?: () => void;
9871
9886
  /**
9872
- * Enable debounced crash-recovery autosave. On each edit (when `editable`)
9873
- * the current slides are serialized to `.pptx` bytes and written to the
9874
- * shared IndexedDB recovery store (keyed by {@link filePath}), and
9875
- * `onautosave` is fired with the bytes. Requires `filePath`; without one the
9876
- * autosave indicator reads "disabled". This binding does not auto-restore on
9877
- * load; recovery is a host concern (see the re-exported `getAutosaveSnapshot`
9878
- * / `listAutosaveSnapshots` helpers). Default false.
9887
+ * POLICY CEILING for crash-recovery autosave. Not a switch the host flips on
9888
+ * the user's behalf: it states what this application permits, and the
9889
+ * title-bar AutoSave toggle (and File > Options > Save > AutoSave) is the
9890
+ * user's preference inside it.
9891
+ *
9892
+ * - `false` turns autosave off AND renders the toggle off and inert; a user
9893
+ * cannot switch on what the application forbade.
9894
+ * - `true`, or omitted, PERMITS autosave and lets the toggle decide.
9895
+ *
9896
+ * While active, each edit serializes the current slides to `.pptx` bytes,
9897
+ * writes them to the shared IndexedDB recovery store (keyed by
9898
+ * {@link filePath}) and fires `onautosave`. A snapshot lands no later than
9899
+ * one interval after the first unsaved edit, and no more often than once per
9900
+ * interval. Requires `filePath`; without one the indicator reads "disabled".
9901
+ *
9902
+ * On the next load of the same `filePath` the viewer OFFERS the snapshot back
9903
+ * in a "Recover unsaved changes?" dialog (Restore loads it in place, Discard
9904
+ * deletes it), unless this prop is `false`. The store is also reachable
9905
+ * directly through the re-exported `getAutosaveSnapshot` /
9906
+ * `listAutosaveSnapshots` helpers.
9907
+ *
9908
+ * @default true
9879
9909
  */
9880
9910
  autosave?: boolean;
9881
9911
  /** Fired when the desktop title bar toggles AutoSave for this viewer instance. */
@@ -9885,7 +9915,16 @@ interface PowerPointViewerProps {
9885
9915
  * Autosave is inert until this is set.
9886
9916
  */
9887
9917
  filePath?: string;
9888
- /** Autosave debounce window in milliseconds. Default 2000. */
9918
+ /**
9919
+ * Autosave cadence in milliseconds: the debounce window, and the ceiling on
9920
+ * how long an unbroken stream of edits may defer a snapshot.
9921
+ *
9922
+ * Optional, and a policy like {@link autosave}: pass it and it wins. Leave it
9923
+ * out and the cadence is the user's own File > Options > Save > "Save
9924
+ * AutoRecover information every N minutes", which defaults to two minutes.
9925
+ *
9926
+ * @default 120000 (Options > Save, "every 2 minutes")
9927
+ */
9889
9928
  autosaveIntervalMs?: number;
9890
9929
  /** Fired with the serialized `.pptx` bytes after each successful autosave. */
9891
9930
  onautosave?: (bytes: Uint8Array) => void;
@@ -10010,6 +10049,13 @@ declare const PowerPointViewer: Component<PowerPointViewerProps, PowerPointViewe
10010
10049
  * - Vue's debounce-on-edit trigger: an edit marks the document dirty and
10011
10050
  * (re)arms a debounce timer instead of polling on a fixed interval.
10012
10051
  *
10052
+ * The debounce is CAPPED by the shared `nextAutosaveDelayMs`, so it keeps the
10053
+ * same promise React's and Angular's polling engines do: a snapshot lands no
10054
+ * later than one interval after the FIRST unsaved edit, and no more often than
10055
+ * once per interval. Without that cap a user who keeps typing keeps re-arming
10056
+ * the timer, and at the two-minute AutoRecover cadence that is a whole session
10057
+ * of work that never reaches the recovery store.
10058
+ *
10013
10059
  * The controller registers its own edit-watching `$effect` in the constructor,
10014
10060
  * so the SFC only has to construct it once during setup and read its reactive
10015
10061
  * `status` / `isDirty` for the toolbar indicator.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACX,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,oBAAoB,EACpB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACpB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACX,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,GACX,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,iBAAiB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,EACN,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAItF,OAAO,EACN,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACN,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GACf,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,iBAAiB,EA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0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAItF,OAAO,EACN,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACN,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GACf,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAShE,OAAO,EACN,gBAAgB,EAChB,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAQlE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -1,38 +1,38 @@
1
- import { $ as e, G as a, J as t, K as o, Q as i, U as r, W as n, X as l, Y as S, Z as d, a as m, at as p, c as T, ct as v, dt as P, et as g, ft as u, it as h, l as c, lt as A, nt as C, o as N, ot as f, pt as k, q as D, rt as E, s as x, st as b, t as B, tt as I, u as O, ut as _ } from "./export-CZzvhGTm.js";
2
- import { i as R } from "./translator-EP8BTIz6.js";
1
+ import { $ as e, G as a, J as t, K as o, Q as i, W as r, X as n, Y as l, Z as S, a as d, at as m, c as p, ct as T, dt as v, et as P, ft as g, it as u, l as h, lt as c, mt as A, nt as C, o as N, ot as f, pt as k, q as D, rt as E, s as x, st as b, t as B, tt as I, u as O, ut as _ } from "./export-Cp97qZ_g.js";
2
+ import { i as R } from "./translator-Cs5ewuZ4.js";
3
3
  import "./i18n.js";
4
4
  export {
5
5
  r as PPTX_OPEN_ACCEPT,
6
- n as PRESENTATION_OPEN_EXTENSIONS,
6
+ a as PRESENTATION_OPEN_EXTENSIONS,
7
7
  B as PowerPointViewer,
8
- a as defaultCssVars,
9
- o as defaultRadius,
10
- D as defaultThemeColors,
11
- t as deleteAutosaveSnapshot,
8
+ o as defaultCssVars,
9
+ D as defaultRadius,
10
+ t as defaultThemeColors,
11
+ l as deleteAutosaveSnapshot,
12
12
  N as exportAllSlidesToSvg,
13
13
  x as exportAllSlidesToSvgBlobs,
14
- T as exportSlideAsSvg,
15
- c as exportSlideToSvg,
14
+ p as exportSlideAsSvg,
15
+ h as exportSlideToSvg,
16
16
  O as exportSlideToSvgBlob,
17
- S as forgetSessionDeck,
18
- l as getAutosaveSnapshot,
19
- d as getSessionTabId,
20
- i as isLegacyBinaryPresentation,
21
- e as isSupportedPresentationFile,
22
- g as listAutosaveSnapshots,
23
- I as loadPresentationDeck,
24
- C as loadSessionDeck,
25
- E as parsePresentationSessionId,
26
- h as presentationBaseName,
17
+ n as forgetSessionDeck,
18
+ S as getAutosaveSnapshot,
19
+ i as getSessionTabId,
20
+ e as isLegacyBinaryPresentation,
21
+ P as isSupportedPresentationFile,
22
+ I as listAutosaveSnapshots,
23
+ C as loadPresentationDeck,
24
+ E as loadSessionDeck,
25
+ u as parsePresentationSessionId,
26
+ m as presentationBaseName,
27
27
  R as registerTranslations,
28
- p as rememberSessionDeck,
29
- m as renderToCanvas,
30
- f as restoreSessionDeck,
31
- b as savedPresentationFileName,
32
- v as themeToCssVars,
33
- A as vermilionDarkColors,
34
- _ as vermilionDarkTheme,
35
- P as vermilionLightColors,
36
- u as vermilionLightTheme,
37
- k as vermilionRadius
28
+ f as rememberSessionDeck,
29
+ d as renderToCanvas,
30
+ b as restoreSessionDeck,
31
+ T as savedPresentationFileName,
32
+ c as themeToCssVars,
33
+ _ as vermilionDarkColors,
34
+ v as vermilionDarkTheme,
35
+ g as vermilionLightColors,
36
+ k as vermilionLightTheme,
37
+ A as vermilionRadius
38
38
  };