pptx-svelte-viewer 4.54.0 → 4.56.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,75 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs releases whenever any published file changes, not only on
8
8
  conventional commits.
9
9
 
10
+ ## [4.56.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-svelte-viewer@4.56.0) - 2026-10-28
11
+
12
+ ### Features
13
+
14
+ - **pptx:** Add opt-in whole-list conversion with listConversionScope ([#229](https://github.com/ChristopherVR/ooxml/issues/229)) ([bf7be3e](https://github.com/ChristopherVR/ooxml/commit/bf7be3e5cedd7ff9ed9e6cc62b0bd5be7ec363c4))
15
+
16
+ ### Bug Fixes
17
+
18
+ - **pptx:** Resolve viewer lint errors and stale save refs ([4abc45b](https://github.com/ChristopherVR/ooxml/commit/4abc45b210fbf2ce2cd7c4673bdf9d8f14a254be))
19
+ - **pptx:** Stretch textPlain WordArt to fill its shape ([#226](https://github.com/ChristopherVR/ooxml/issues/226)) ([120d3ce](https://github.com/ChristopherVR/ooxml/commit/120d3ce4e4e4dd8c5830902230fabb5e2c8dcfe7))
20
+ - **pptx:** Keep the timed advance of a slide with no transition ([df75415](https://github.com/ChristopherVR/ooxml/commit/df75415df55557f9366732550540a149821ab939))
21
+
22
+ ## [4.55.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-svelte-viewer@4.55.0) - 2026-10-28
23
+
24
+ ### Features
25
+
26
+ - **pptx:** Expose the slide thumbnail rail as a building block in every binding ([#228](https://github.com/ChristopherVR/ooxml/issues/228)) ([2b77f02](https://github.com/ChristopherVR/ooxml/commit/2b77f026e1e26e6a5fe3c52f275608f39bc0ea8e))
27
+ - **text:** Share font selection with word script layout ([59ad0a2](https://github.com/ChristopherVR/ooxml/commit/59ad0a2e8249d3ffc9be34c2c9e6f9ffe8b3b07a))
28
+ - **chart:** Share manual plot layout across chart painters ([18b79c0](https://github.com/ChristopherVR/ooxml/commit/18b79c04bb1d2aa914630453413d995d0bb54922))
29
+ - **chart:** Share smooth series paths and authored strokes ([7329e5c](https://github.com/ChristopherVR/ooxml/commit/7329e5cbb546a041c0e67417fbe84e9d3dc415a2))
30
+ - **chart:** Share point label offsets and pie leader lines ([861f78f](https://github.com/ChristopherVR/ooxml/commit/861f78f5d9ba0fa93ed6e85ddfc209fd2bf828ca))
31
+ - **drawingml:** Render guide-driven custom shapes in word ([81558e6](https://github.com/ChristopherVR/ooxml/commit/81558e6fcfdb2a64ced22661410cbdfba954cea2))
32
+ - **drawingml:** Share picture crop with excel ([f093c0f](https://github.com/ChristopherVR/ooxml/commit/f093c0f6d1c2ea96736613990e870143d770774e))
33
+ - **chart:** Share calendar date axis rendering ([474de5c](https://github.com/ChristopherVR/ooxml/commit/474de5c4f2418ee7b67ec34a5e08c8eefa4bb992))
34
+ - **chart:** Share chart data table layout and rendering ([09fbdf1](https://github.com/ChristopherVR/ooxml/commit/09fbdf1ec8016b376b67053d8a5575fc3d1ef145))
35
+ - **drawingml:** Share ordered picture effects with excel ([b669575](https://github.com/ChristopherVR/ooxml/commit/b669575a041ab25169a7c83757075fe9dffe390a))
36
+ - **chart:** Share funnel geometry and neutral rendering ([28f6ce3](https://github.com/ChristopherVR/ooxml/commit/28f6ce302fa5791a11819209d6501e97e971b80b))
37
+ - **chart:** Share box distributions and neutral rendering ([6390e30](https://github.com/ChristopherVR/ooxml/commit/6390e30ac6994e6891f8324e4264949f66e0a0a0))
38
+ - **diagram:** Paint cached pictures in word and excel ([f254d51](https://github.com/ChristopherVR/ooxml/commit/f254d51eeed81279dd9f971cb7ac496364738ec2))
39
+ - **drawingml:** Share source-backed text body 3d codecs ([bcf2a0a](https://github.com/ChristopherVR/ooxml/commit/bcf2a0a491c6e4dc4e5fd4f5b615f3673285cadf))
40
+ - **pptx:** Add an /ai entry and createAiAssistant to every binding ([#219](https://github.com/ChristopherVR/ooxml/issues/219)) ([ecd4d43](https://github.com/ChristopherVR/ooxml/commit/ecd4d43acfc0133c2f9c1e3320f366244ba3bba3))
41
+ - **visio:** Improve selection dragging and resizing ([60cf8dd](https://github.com/ChristopherVR/ooxml/commit/60cf8dd9c547f16e114b98ae01fed0968aca5866))
42
+
43
+ ### Bug Fixes
44
+
45
+ - **pptx:** Scope collaboration undo to the local participant ([55b8bad](https://github.com/ChristopherVR/ooxml/commit/55b8badcf0ec06a7294debff8deff844dcfafb62))
46
+ - **pptx:** Autocorrect only the text typed in this edit ([0e5a85e](https://github.com/ChristopherVR/ooxml/commit/0e5a85e496e0d53e36c00e6fdfd5dd3749337d8a))
47
+ - **pptx:** Keep browser-local blob URLs out of the collaboration room ([433891b](https://github.com/ChristopherVR/ooxml/commit/433891b1db9a173780e6ad59cad56d92a5a0e929))
48
+ - **chart:** Resolve chartex axes by position to avoid prototype pollution ([16edc2f](https://github.com/ChristopherVR/ooxml/commit/16edc2fd96b261ecbfbe388491fe12494be15b89))
49
+ - **pptx:** Wait out the entry transition before a timed slide advances ([a4707a6](https://github.com/ChristopherVR/ooxml/commit/a4707a6e694d26e32af0375ee06d600541a1236a))
50
+ - **drawingml:** Separate guide and path coordinate spaces ([4db9fe1](https://github.com/ChristopherVR/ooxml/commit/4db9fe140ec43aae8cac6cae8846ccf4dad9ba58))
51
+ - **chart:** Export shared date format tokenizer ([b928657](https://github.com/ChristopherVR/ooxml/commit/b928657532d41bec6a83a5969c03be922ef0a90a))
52
+ - **drawingml:** Bound picture luminance and report extensions ([a36e847](https://github.com/ChristopherVR/ooxml/commit/a36e84725c483815ae7508872dd4d89c5a8375b2))
53
+ - **chart:** Paint date ticks over plot backgrounds ([e3fad37](https://github.com/ChristopherVR/ooxml/commit/e3fad379f6d990c1ad85658e751cb84176ca7852))
54
+ - **docx:** Load media for cached smartart pictures ([149b350](https://github.com/ChristopherVR/ooxml/commit/149b35025750b5189813e34cfa33cd1ff5757a17))
55
+ - **chart:** Retain table names and exclude hidden box series ([292dc25](https://github.com/ChristopherVR/ooxml/commit/292dc25c22544d9179d5c0fd31327a3d0aafb462))
56
+ - **chart:** Match native funnel label and box mean defaults ([06bbf26](https://github.com/ChristopherVR/ooxml/commit/06bbf26e496f00270eca67472087454496217cc1))
57
+ - **drawingml:** Preserve anchors and guard text 3d edits ([617a029](https://github.com/ChristopherVR/ooxml/commit/617a02979d5cdae5e3818afd8fb79af367de25eb))
58
+ - **drawingml:** Preserve omitted picture source formatting ([5e2d57d](https://github.com/ChristopherVR/ooxml/commit/5e2d57dfe0b3076be7c6cb5b086c596643eb5203))
59
+
60
+ ### Refactor
61
+
62
+ - **opc:** Share hyperlink policy with explicit host protocols ([5f8ac72](https://github.com/ChristopherVR/ooxml/commit/5f8ac72edbe4fff4d2fa303ed3ce8a471762bd12))
63
+
64
+ ### Documentation
65
+
66
+ - Record further shared office capability delivery ([845ee99](https://github.com/ChristopherVR/ooxml/commit/845ee99bdc290e148c485c87e64d853a5884e7f8))
67
+
68
+ ### Testing
69
+
70
+ - **svelte:** Keep the room history optional in the effects host ([15d7d2e](https://github.com/ChristopherVR/ooxml/commit/15d7d2ef52e19bac3fa1c0100d844ef7b4a85047))
71
+ - **diagram:** Guard optional word media in picture assertion ([c8f5d14](https://github.com/ChristopherVR/ooxml/commit/c8f5d14ddcdef1ee04de6d4f3e557d1719eae5e8))
72
+
73
+ ### Chores
74
+
75
+ - Prepare shared capability implementation worktree ([b36e947](https://github.com/ChristopherVR/ooxml/commit/b36e9472aa94839f82fcfe7e9a9569da7f5c1c52))
76
+ - Integrate current main for reuse verification ([a22d5f5](https://github.com/ChristopherVR/ooxml/commit/a22d5f53406330909d3853ab64a4d850bc3c0ad1))
77
+ - Integrate main before shared capability push ([9dc78da](https://github.com/ChristopherVR/ooxml/commit/9dc78da5262a854807b9fc8395f1fd97f71c2eb4))
78
+
10
79
  ## [4.54.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-svelte-viewer@4.54.0) - 2026-10-28
11
80
 
12
81
  ### Features
package/README.md CHANGED
@@ -121,7 +121,7 @@ or fullscreen fitting. See the [cross-binding defaults](../../docs/guide/viewpor
121
121
  | `editable` | `boolean` | `false` | Ribbon editing, insertion, arrange, and save. |
122
122
  | `smartArt3D` | `boolean` | `false` | Opt-in Three.js 3D SmartArt renderer (needs the optional `three` peer; falls back to SVG without it). |
123
123
  | `surfaceChart3D`, `barChart3D`, `lineChart3D`, `areaChart3D`, `pieChart3D` | `boolean` | `false` | Independently opt in to interactive Three.js renderers for the matching 3D chart kinds; each falls back to SVG when WebGL is unavailable. |
124
- | `ai` | `PptxAiConfig` | n/a | Optional AI assistant configuration. The SDK peers load only when its panel is opened. |
124
+ | `ai` | `PptxAiAssistant \| PptxAiConfig` | n/a | Optional AI assistant: a handle from `createAiAssistant` (`pptx-svelte-viewer/ai`), or a plain config. The SDK peers load only when its panel is opened. See the [AI assistant guide](https://christophervr.github.io/ooxml/pptx/guide/ai-assistant#ai-entry). |
125
125
  | `class` | `string` | - | Class applied to the root element. |
126
126
  | `fileName` | `string` | - | Display name shown in the desktop title bar. |
127
127
  | `autosave` | `boolean` | `true` | Crash-recovery autosave to IndexedDB, written while there are unsaved edits (requires `filePath`; fires `onautosave`). |
@@ -1,9 +1,9 @@
1
- import { O as L } from "./transition-overlay-BKRKblpi.js";
2
- import { A as je, C as U, D as $e, E as Q, M as $, O as Ae, T as B, j as Y, k as De, w as Ne } from "./export-v7cYEprs.js";
1
+ import { r as L } from "./context-BYZ6OEju.js";
2
+ import { a as je, c as $e, i as Q, l as Y, n as Ae, o as Ne, r as B, s as De, t as O, u as $ } from "./x-ahsysihf.js";
3
3
  import "svelte/internal/disclose-version";
4
4
  import * as e from "svelte/internal/client";
5
- import { onMount as Ee, untrack as O } from "svelte";
6
- import { createAiChatHistoryController as Ie, createAiChatSession as He, deckIdFromBridge as Le, describeToolActivity as Fe, focusTargetChips as Ve, humanizeDiffLine as Be, isAiAvailable as Oe, isTwoTableFocus as Ue, mergeTablesDirective as Re, summarizeToolArgs as We, toRenderableParts as Ke, toolCanvasTarget as Ge, toolLabel as Xe } from "ooxml-ui/pptx/ai";
5
+ import { onMount as Ee, untrack as U } from "svelte";
6
+ import { createAiChatHistoryController as Ie, createAiChatSession as He, deckIdFromBridge as Le, describeToolActivity as Fe, focusTargetChips as Ve, humanizeDiffLine as Be, isAiAvailable as Ue, isTwoTableFocus as Oe, mergeTablesDirective as Re, summarizeToolArgs as We, toRenderableParts as Ke, toolCanvasTarget as Ge, toolLabel as Xe } from "ooxml-ui/pptx/ai";
7
7
  var ee = {
8
8
  name: "bot",
9
9
  size: 24,
@@ -197,7 +197,7 @@ var ne = {
197
197
  size: 24,
198
198
  node: [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }]],
199
199
  aliases: ["loader-2"]
200
- }, Da = ne.node, lt = /* @__PURE__ */ new Set([
200
+ }, Na = ne.node, lt = /* @__PURE__ */ new Set([
201
201
  "$$slots",
202
202
  "$$events",
203
203
  "$$legacy"
@@ -216,7 +216,7 @@ var oe = {
216
216
  ["path", { d: "M12 8v6" }],
217
217
  ["path", { d: "M9 11h6" }]
218
218
  ]
219
- }, Na = oe.node, ot = /* @__PURE__ */ new Set([
219
+ }, Da = oe.node, ot = /* @__PURE__ */ new Set([
220
220
  "$$slots",
221
221
  "$$events",
222
222
  "$$legacy"
@@ -392,7 +392,7 @@ var ge = {
392
392
  r: "3.5"
393
393
  }]
394
394
  ]
395
- }, Oa = ge.node, Ct = /* @__PURE__ */ new Set([
395
+ }, Ua = ge.node, Ct = /* @__PURE__ */ new Set([
396
396
  "$$slots",
397
397
  "$$events",
398
398
  "$$legacy"
@@ -413,7 +413,7 @@ var xe = {
413
413
  y: "3",
414
414
  rx: "2"
415
415
  }]]
416
- }, Ua = xe.node, zt = /* @__PURE__ */ new Set([
416
+ }, Oa = xe.node, zt = /* @__PURE__ */ new Set([
417
417
  "$$slots",
418
418
  "$$events",
419
419
  "$$legacy"
@@ -498,7 +498,7 @@ var ye = {
498
498
  "$$events",
499
499
  "$$legacy"
500
500
  ]);
501
- function Dt(s, t) {
501
+ function Nt(s, t) {
502
502
  let a = e.rest_props(t, At);
503
503
  $(s, e.spread_props(() => a, { get icon() {
504
504
  return ye;
@@ -508,20 +508,20 @@ var ke = {
508
508
  name: "wrench",
509
509
  size: 24,
510
510
  node: [["path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]]
511
- }, Xa = ke.node, Nt = /* @__PURE__ */ new Set([
511
+ }, Xa = ke.node, Dt = /* @__PURE__ */ new Set([
512
512
  "$$slots",
513
513
  "$$events",
514
514
  "$$legacy"
515
515
  ]);
516
516
  function Z(s, t) {
517
- let a = e.rest_props(t, Nt);
517
+ let a = e.rest_props(t, Dt);
518
518
  $(s, e.spread_props(() => a, { get icon() {
519
519
  return ke;
520
520
  } }));
521
521
  }
522
522
  function Et(s) {
523
523
  let t = e.state(e.proxy([]));
524
- const a = O(() => Ie({
524
+ const a = U(() => Ie({
525
525
  deckId: Le(s.bridge),
526
526
  store: s.store,
527
527
  getMessages: () => s.getMessages(),
@@ -531,7 +531,7 @@ function Et(s) {
531
531
  e.set(t, p, !0);
532
532
  }
533
533
  }));
534
- let d = e.state(e.proxy(O(() => a.activeChatId())));
534
+ let d = e.state(e.proxy(U(() => a.activeChatId())));
535
535
  const i = () => {
536
536
  e.set(d, a.activeChatId(), !0);
537
537
  };
@@ -604,7 +604,7 @@ var It = class {
604
604
  async init() {
605
605
  this.initState = "checking", this.initError = void 0;
606
606
  try {
607
- if (!await (this.#t.checkAvailable ?? Oe)()) {
607
+ if (!await (this.#t.checkAvailable ?? Ue)()) {
608
608
  this.initState = "unavailable";
609
609
  return;
610
610
  }
@@ -714,7 +714,7 @@ function Vt(s, t) {
714
714
  }
715
715
  e.delegate(["keydown", "click"]);
716
716
  var Bt = e.from_html('<div class="pptx-svelte-ai-error svelte-1vkckow" role="alert"><!> <div class="pptx-svelte-ai-error-body svelte-1vkckow"><div class="pptx-svelte-ai-error-title svelte-1vkckow"> </div> <div class="pptx-svelte-ai-error-msg svelte-1vkckow"> </div></div> <button type="button" class="pptx-svelte-ai-error-retry svelte-1vkckow"> </button></div>');
717
- function Ot(s, t) {
717
+ function Ut(s, t) {
718
718
  e.push(t, !0);
719
719
  const a = L();
720
720
  var d = Bt(), i = e.child(d);
@@ -732,13 +732,13 @@ function Ot(s, t) {
732
732
  }), e.append(s, d), e.pop();
733
733
  }
734
734
  e.delegate(["click"]);
735
- var Ut = e.from_html('<span><span class="pptx-svelte-ai-focus-chip-label svelte-kjj0i7"> </span></span>'), Rt = e.from_html('<span class="pptx-svelte-ai-focus-pinned svelte-kjj0i7"> </span>'), Wt = e.from_html('<button type="button" class="pptx-svelte-ai-focus-merge svelte-kjj0i7"><!> </button>'), J = e.from_html('<button type="button" class="pptx-svelte-ai-focus-btn svelte-kjj0i7"><!></button>'), Kt = e.from_html('<div class="pptx-svelte-ai-focus-hint svelte-kjj0i7"><!> <span class="svelte-kjj0i7"> </span> <button type="button" class="pptx-svelte-ai-focus-done svelte-kjj0i7"> </button></div>'), Gt = e.from_html('<div class="pptx-svelte-ai-focus svelte-kjj0i7"><div class="pptx-svelte-ai-focus-row svelte-kjj0i7"><span class="pptx-svelte-ai-focus-scope svelte-kjj0i7"> </span> <!> <!> <div class="pptx-svelte-ai-focus-actions svelte-kjj0i7"><!> <button type="button"><!></button> <!></div></div> <!></div>');
735
+ var Ot = e.from_html('<span><span class="pptx-svelte-ai-focus-chip-label svelte-kjj0i7"> </span></span>'), Rt = e.from_html('<span class="pptx-svelte-ai-focus-pinned svelte-kjj0i7"> </span>'), Wt = e.from_html('<button type="button" class="pptx-svelte-ai-focus-merge svelte-kjj0i7"><!> </button>'), J = e.from_html('<button type="button" class="pptx-svelte-ai-focus-btn svelte-kjj0i7"><!></button>'), Kt = e.from_html('<div class="pptx-svelte-ai-focus-hint svelte-kjj0i7"><!> <span class="svelte-kjj0i7"> </span> <button type="button" class="pptx-svelte-ai-focus-done svelte-kjj0i7"> </button></div>'), Gt = e.from_html('<div class="pptx-svelte-ai-focus svelte-kjj0i7"><div class="pptx-svelte-ai-focus-row svelte-kjj0i7"><span class="pptx-svelte-ai-focus-scope svelte-kjj0i7"> </span> <!> <!> <div class="pptx-svelte-ai-focus-actions svelte-kjj0i7"><!> <button type="button"><!></button> <!></div></div> <!></div>');
736
736
  function Xt(s, t) {
737
737
  e.push(t, !0);
738
- const a = L(), d = e.derived(() => Ve(t.targets, t.slides)), i = e.derived(() => Ue(t.targets, t.slides));
738
+ const a = L(), d = e.derived(() => Ve(t.targets, t.slides)), i = e.derived(() => Oe(t.targets, t.slides));
739
739
  var p = Gt(), z = e.child(p), f = e.child(z), h = e.only_child(f, !0), y = e.sibling(f, 2);
740
740
  e.each(y, 17, () => e.get(d), (n) => n.key, (n, o) => {
741
- var M = Ut();
741
+ var M = Ot();
742
742
  let S;
743
743
  var A = e.child(M), q = e.only_child(A, !0);
744
744
  e.reset(M), e.template_effect(() => {
@@ -773,7 +773,7 @@ function Xt(s, t) {
773
773
  }), e.reset(w);
774
774
  var l = e.sibling(w, 2), r = (n) => {
775
775
  var o = J(), M = e.child(o);
776
- U(M, {
776
+ O(M, {
777
777
  size: 14,
778
778
  "aria-hidden": "true"
779
779
  }), e.reset(o), e.template_effect((S, A) => {
@@ -841,7 +841,7 @@ function ta(s, t) {
841
841
  }
842
842
  e.user_effect(() => (document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p)));
843
843
  var z = ea(), f = e.child(z), h = e.child(f), y = e.child(h);
844
- $e(y, {
844
+ je(y, {
845
845
  size: 14,
846
846
  "aria-hidden": "true"
847
847
  });
@@ -859,19 +859,19 @@ function ta(s, t) {
859
859
  }), e.reset(k), e.reset(b), e.reset(f);
860
860
  var T = e.sibling(f, 2), _ = (l) => {
861
861
  var r = Yt(), v = e.child(r), C = e.child(v), P = e.only_child(C, !0), n = e.sibling(C, 2), o = e.child(n);
862
- Ae(o, {
862
+ Ne(o, {
863
863
  size: 12,
864
864
  "aria-hidden": "true"
865
865
  });
866
866
  var M = e.sibling(o);
867
867
  e.reset(n), e.reset(v);
868
868
  var S = e.sibling(v, 2), A = (j) => {
869
- var D = Zt(), E = e.only_child(D, !0);
870
- e.template_effect((I) => e.set_text(E, I), [() => a("pptx.ai.historyEmpty")]), e.append(j, D);
869
+ var N = Zt(), E = e.only_child(N, !0);
870
+ e.template_effect((I) => e.set_text(E, I), [() => a("pptx.ai.historyEmpty")]), e.append(j, N);
871
871
  }, q = (j) => {
872
- var D = Qt();
873
- e.each(D, 21, () => t.chats, (E) => E.id, (E, I) => {
874
- var N = Jt(), H = e.child(N);
872
+ var N = Qt();
873
+ e.each(N, 21, () => t.chats, (E) => E.id, (E, I) => {
874
+ var D = Jt(), H = e.child(D);
875
875
  let F;
876
876
  var W = e.child(H);
877
877
  De(W, {
@@ -884,7 +884,7 @@ function ta(s, t) {
884
884
  B(ze, {
885
885
  size: 14,
886
886
  "aria-hidden": "true"
887
- }), e.reset(V), e.reset(N), e.template_effect((Se, Pe, qe, Te) => {
887
+ }), e.reset(V), e.reset(D), e.template_effect((Se, Pe, qe, Te) => {
888
888
  F = e.set_class(H, 1, "pptx-svelte-ai-history-resume svelte-1i56i9n", null, F, { "is-active": e.get(I).id === t.activeChatId }), e.set_text(we, Se), e.set_text(Me, Pe), e.set_attribute(V, "title", qe), e.set_attribute(V, "aria-label", Te);
889
889
  }, [
890
890
  () => e.get(I).title || a("pptx.ai.untitledChat"),
@@ -893,15 +893,15 @@ function ta(s, t) {
893
893
  () => a("pptx.ai.deleteChat")
894
894
  ]), e.delegated("click", H, () => {
895
895
  t.onresume(e.get(I).id), e.set(d, !1);
896
- }), e.delegated("click", V, () => t.ondelete(e.get(I).id)), e.append(E, N);
897
- }), e.reset(D), e.append(j, D);
896
+ }), e.delegated("click", V, () => t.ondelete(e.get(I).id)), e.append(E, D);
897
+ }), e.reset(N), e.append(j, N);
898
898
  };
899
899
  e.if(S, (j) => {
900
900
  t.chats.length === 0 ? j(A) : j(q, -1);
901
901
  });
902
902
  var u = e.sibling(S, 2), c = e.only_child(u, !0);
903
- e.reset(r), e.template_effect((j, D, E) => {
904
- e.set_text(P, j), e.set_text(M, ` ${D ?? ""}`), e.set_text(c, E);
903
+ e.reset(r), e.template_effect((j, N, E) => {
904
+ e.set_text(P, j), e.set_text(M, ` ${N ?? ""}`), e.set_text(c, E);
905
905
  }, [
906
906
  () => a("pptx.ai.historyTitle"),
907
907
  () => a("pptx.ai.newChat"),
@@ -927,8 +927,8 @@ var aa = e.from_html('<div class="pptx-svelte-ai-tool-error svelte-1878924"> </d
927
927
  function ra(s, t) {
928
928
  e.push(t, !0);
929
929
  const a = L(), d = {
930
- view: je,
931
- text: Ne,
930
+ view: $e,
931
+ text: Ae,
932
932
  shape: Mt,
933
933
  theme: ht,
934
934
  table: jt,
@@ -945,8 +945,8 @@ function ra(s, t) {
945
945
  var b = ia(), x = e.child(b), g = e.child(x);
946
946
  {
947
947
  let c = e.derived(() => e.get(i) ? "pptx-svelte-ai-tool-ic is-error" : "pptx-svelte-ai-tool-ic");
948
- e.component(g, () => e.get(h), (j, D) => {
949
- D(j, {
948
+ e.component(g, () => e.get(h), (j, N) => {
949
+ N(j, {
950
950
  size: 14,
951
951
  get class() {
952
952
  return e.get(c);
@@ -990,16 +990,16 @@ function ra(s, t) {
990
990
  var M = e.sibling(n);
991
991
  e.reset(_), e.reset(x);
992
992
  var S = e.sibling(x, 2), A = (c) => {
993
- var j = aa(), D = e.only_child(j, !0);
994
- e.template_effect(() => e.set_text(D, t.part.errorText)), e.append(c, j);
993
+ var j = aa(), N = e.only_child(j, !0);
994
+ e.template_effect(() => e.set_text(N, t.part.errorText)), e.append(c, j);
995
995
  };
996
996
  e.if(S, (c) => {
997
997
  e.get(i) && t.part.errorText && c(A);
998
998
  });
999
999
  var q = e.sibling(S, 2), u = (c) => {
1000
- var j = sa(), D = e.child(j), E = e.only_child(D, !0), I = e.sibling(D, 2), N = e.only_child(I);
1000
+ var j = sa(), N = e.child(j), E = e.only_child(N, !0), I = e.sibling(N, 2), D = e.only_child(I);
1001
1001
  e.reset(j), e.template_effect((H, F) => {
1002
- e.set_text(E, H), e.set_text(N, `${F ?? ""}: ${e.get(y) ?? ""}`);
1002
+ e.set_text(E, H), e.set_text(D, `${F ?? ""}: ${e.get(y) ?? ""}`);
1003
1003
  }, [() => a("pptx.ai.toolDetails"), () => Xe(t.part.toolName)]), e.append(c, j);
1004
1004
  };
1005
1005
  e.if(q, (c) => {
@@ -1037,7 +1037,7 @@ function da(s, t) {
1037
1037
  var P = oa(), n = e.child(P);
1038
1038
  let o;
1039
1039
  var M = e.child(n), S = (u) => {
1040
- Dt(u, {
1040
+ Nt(u, {
1041
1041
  size: 14,
1042
1042
  "aria-hidden": "true"
1043
1043
  });
@@ -1052,16 +1052,16 @@ function da(s, t) {
1052
1052
  }), e.reset(n);
1053
1053
  var q = e.sibling(n, 2);
1054
1054
  e.each(q, 23, () => e.get(_), (u, c) => u.kind === "tool" && u.toolCallId || c, (u, c) => {
1055
- var j = e.comment(), D = e.first_child(j), E = (N) => {
1055
+ var j = e.comment(), N = e.first_child(j), E = (D) => {
1056
1056
  var H = la(), F = e.only_child(H, !0);
1057
- e.template_effect(() => e.set_text(F, e.get(c).text)), e.append(N, H);
1058
- }, I = (N) => {
1059
- ra(N, { get part() {
1057
+ e.template_effect(() => e.set_text(F, e.get(c).text)), e.append(D, H);
1058
+ }, I = (D) => {
1059
+ ra(D, { get part() {
1060
1060
  return e.get(c);
1061
1061
  } });
1062
1062
  };
1063
- e.if(D, (N) => {
1064
- e.get(c).kind === "text" ? N(E) : N(I, -1);
1063
+ e.if(N, (D) => {
1064
+ e.get(c).kind === "text" ? D(E) : D(I, -1);
1065
1065
  }), e.append(u, j);
1066
1066
  }), e.reset(q), e.reset(P), e.template_effect((u) => {
1067
1067
  o = e.set_class(n, 1, "pptx-svelte-ai-avatar svelte-16qhgfb", null, o, { "is-user": e.get(T) }), e.set_attribute(n, "aria-label", u);
@@ -1107,7 +1107,7 @@ function ha(s, t) {
1107
1107
  var k = e.sibling(g);
1108
1108
  e.reset(x);
1109
1109
  var w = e.sibling(x, 2), T = e.child(w);
1110
- U(T, {
1110
+ O(T, {
1111
1111
  size: 13,
1112
1112
  "aria-hidden": "true"
1113
1113
  });
@@ -1157,7 +1157,7 @@ function Za(s, t) {
1157
1157
  function d(r) {
1158
1158
  r && r.slideIndex !== void 0 && t.bridge.goToSlide(r.slideIndex), t.aiPanel.flashToolTarget(r);
1159
1159
  }
1160
- const i = O(() => new It({
1160
+ const i = U(() => new It({
1161
1161
  bridge: t.bridge,
1162
1162
  config: t.config,
1163
1163
  onToolTarget: d
@@ -1191,7 +1191,7 @@ function Za(s, t) {
1191
1191
  "aria-hidden": "true"
1192
1192
  });
1193
1193
  var b = e.sibling(m, 2), x = e.only_child(b, !0), g = e.sibling(b, 2), k = e.child(g);
1194
- U(k, {
1194
+ O(k, {
1195
1195
  size: 16,
1196
1196
  "aria-hidden": "true"
1197
1197
  }), e.reset(g), e.reset(y);
@@ -1273,7 +1273,7 @@ function Za(s, t) {
1273
1273
  }
1274
1274
  });
1275
1275
  var o = e.sibling(n, 2), M = (u) => {
1276
- Ot(u, {
1276
+ Ut(u, {
1277
1277
  get message() {
1278
1278
  return i.error.message;
1279
1279
  },
@@ -0,0 +1,5 @@
1
+ import { createAiAssistantRegistry as t } from "ooxml-ui/pptx/ai/host";
2
+ var e = t({ owner: "pptx-svelte-viewer" });
3
+ export {
4
+ e as t
5
+ };
package/dist/ai.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { PptxAiConfig } from 'ooxml-ui/pptx/ai';
2
+ export { PptxAiBridge, PptxAiConfig, PptxAiConnection, PptxAiContextStrategy, PptxAiToolName, PptxAiWritePolicy } from 'ooxml-ui/pptx/ai';
3
+ import { PptxAiAssistant } from 'ooxml-ui/pptx/ai/host';
4
+ export { PptxAiAssistant } from 'ooxml-ui/pptx/ai/host';
5
+
6
+ /**
7
+ * Create an AI assistant for the viewer's `ai` prop from a `PptxAiConfig`.
8
+ *
9
+ * The handle is opaque and loads nothing. It keeps `config` by reference; create a new
10
+ * handle to change it. Every handle carries the same panel loader.
11
+ */
12
+ declare function createAiAssistant(config: PptxAiConfig): PptxAiAssistant;
13
+
14
+ export { createAiAssistant };
package/dist/ai.js ADDED
@@ -0,0 +1,8 @@
1
+ import { t as r } from "./ai-assistant-registry-CUKUJBDS.js";
2
+ var s = () => import("./AiChatPanel-B1FwoK_F.js");
3
+ function i(t) {
4
+ return r.register(t, s);
5
+ }
6
+ export {
7
+ i as createAiAssistant
8
+ };
@@ -0,0 +1,14 @@
1
+ import { a as o } from "./translator-2U8GG-ce.js";
2
+ import { getContext as a, setContext as e } from "svelte";
3
+ var r = /* @__PURE__ */ Symbol("pptx-svelte-i18n");
4
+ function p(t) {
5
+ e(r, t);
6
+ }
7
+ function l() {
8
+ return a(r) ?? ((t, n) => o("en", t, n));
9
+ }
10
+ export {
11
+ p as n,
12
+ l as r,
13
+ r as t
14
+ };