pptx-react-viewer 4.74.0 → 4.75.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 (98) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/dist/{AiChatPanel-PLQ3NBTK.js → AiChatPanel-4V7QB5Z3.js} +19 -19
  4. package/dist/AiChatPanel-4V7QB5Z3.js.br +0 -0
  5. package/dist/AiChatPanel-4V7QB5Z3.js.gz +0 -0
  6. package/dist/{AiChatPanel-E7CJSTW7.mjs → AiChatPanel-6ML3VLIX.mjs} +1 -1
  7. package/dist/AiChatPanel-6ML3VLIX.mjs.br +0 -0
  8. package/dist/AiChatPanel-6ML3VLIX.mjs.gz +0 -0
  9. package/dist/ai.js +2 -2
  10. package/dist/ai.js.br +0 -0
  11. package/dist/ai.js.gz +0 -0
  12. package/dist/ai.mjs +1 -1
  13. package/dist/ai.mjs.br +0 -0
  14. package/dist/ai.mjs.gz +0 -0
  15. package/dist/{chunk-XG4WSJ4O.js → chunk-3AZ6ESJU.js} +203 -203
  16. package/dist/chunk-3AZ6ESJU.js.br +0 -0
  17. package/dist/chunk-3AZ6ESJU.js.gz +0 -0
  18. package/dist/{chunk-P2COO2QO.js → chunk-6GFSF2ML.js} +65 -13
  19. package/dist/chunk-6GFSF2ML.js.br +0 -0
  20. package/dist/chunk-6GFSF2ML.js.gz +0 -0
  21. package/dist/{chunk-CRC3V4UG.mjs → chunk-AZLOOFU2.mjs} +1 -1
  22. package/dist/chunk-AZLOOFU2.mjs.br +0 -0
  23. package/dist/chunk-AZLOOFU2.mjs.gz +0 -0
  24. package/dist/{chunk-SQ7OASDY.mjs → chunk-DE4Y5F4T.mjs} +40 -44
  25. package/dist/chunk-DE4Y5F4T.mjs.br +0 -0
  26. package/dist/chunk-DE4Y5F4T.mjs.gz +0 -0
  27. package/dist/chunk-FFTZYNL4.mjs +2 -0
  28. package/dist/chunk-FFTZYNL4.mjs.br +6 -0
  29. package/dist/chunk-FFTZYNL4.mjs.gz +0 -0
  30. package/dist/chunk-LWGPHJHC.js +151 -0
  31. package/dist/chunk-LWGPHJHC.js.br +0 -0
  32. package/dist/chunk-LWGPHJHC.js.gz +0 -0
  33. package/dist/{chunk-LVEFHZ76.js → chunk-MU3BIZ2U.js} +1 -1
  34. package/dist/chunk-MU3BIZ2U.js.br +0 -0
  35. package/dist/chunk-MU3BIZ2U.js.gz +0 -0
  36. package/dist/{chunk-FBSPQYRE.mjs → chunk-N3YK2BCA.mjs} +61 -14
  37. package/dist/chunk-N3YK2BCA.mjs.br +0 -0
  38. package/dist/chunk-N3YK2BCA.mjs.gz +0 -0
  39. package/dist/chunk-P2IEKYVG.js +29 -0
  40. package/dist/chunk-P2IEKYVG.js.br +0 -0
  41. package/dist/chunk-P2IEKYVG.js.gz +0 -0
  42. package/dist/{chunk-D4WC35PL.js → chunk-RJRDE3C2.js} +594 -599
  43. package/dist/chunk-RJRDE3C2.js.br +0 -0
  44. package/dist/chunk-RJRDE3C2.js.gz +0 -0
  45. package/dist/{chunk-JZE6BORE.mjs → chunk-RMEWSJZU.mjs} +1 -1
  46. package/dist/chunk-RMEWSJZU.mjs.br +0 -0
  47. package/dist/chunk-RMEWSJZU.mjs.gz +0 -0
  48. package/dist/chunk-Y53EC3JU.mjs +27 -0
  49. package/dist/chunk-Y53EC3JU.mjs.br +0 -0
  50. package/dist/chunk-Y53EC3JU.mjs.gz +0 -0
  51. package/dist/index.d.ts +24 -18
  52. package/dist/index.js +126 -126
  53. package/dist/index.js.br +0 -0
  54. package/dist/index.js.gz +0 -0
  55. package/dist/index.mjs +6 -6
  56. package/dist/index.mjs.br +0 -0
  57. package/dist/index.mjs.gz +0 -0
  58. package/dist/internals.js +82 -81
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +3 -2
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/no-i18next.d.ts +1299 -0
  65. package/dist/no-i18next.js +251 -0
  66. package/dist/no-i18next.js.br +0 -0
  67. package/dist/no-i18next.js.gz +0 -0
  68. package/dist/no-i18next.mjs +6 -0
  69. package/dist/no-i18next.mjs.br +0 -0
  70. package/dist/no-i18next.mjs.gz +0 -0
  71. package/dist/viewer/index.d.ts +24 -18
  72. package/dist/viewer/index.js +25 -24
  73. package/dist/viewer/index.js.br +0 -0
  74. package/dist/viewer/index.js.gz +0 -0
  75. package/dist/viewer/index.mjs +5 -4
  76. package/dist/viewer/index.mjs.br +0 -0
  77. package/dist/viewer/index.mjs.gz +0 -0
  78. package/package.json +9 -4
  79. package/dist/AiChatPanel-E7CJSTW7.mjs.br +0 -0
  80. package/dist/AiChatPanel-E7CJSTW7.mjs.gz +0 -0
  81. package/dist/AiChatPanel-PLQ3NBTK.js.br +0 -0
  82. package/dist/AiChatPanel-PLQ3NBTK.js.gz +0 -0
  83. package/dist/chunk-CRC3V4UG.mjs.br +0 -0
  84. package/dist/chunk-CRC3V4UG.mjs.gz +0 -0
  85. package/dist/chunk-D4WC35PL.js.br +0 -0
  86. package/dist/chunk-D4WC35PL.js.gz +0 -0
  87. package/dist/chunk-FBSPQYRE.mjs.br +0 -0
  88. package/dist/chunk-FBSPQYRE.mjs.gz +0 -0
  89. package/dist/chunk-JZE6BORE.mjs.br +0 -0
  90. package/dist/chunk-JZE6BORE.mjs.gz +0 -0
  91. package/dist/chunk-LVEFHZ76.js.br +0 -0
  92. package/dist/chunk-LVEFHZ76.js.gz +0 -0
  93. package/dist/chunk-P2COO2QO.js.br +0 -0
  94. package/dist/chunk-P2COO2QO.js.gz +0 -0
  95. package/dist/chunk-SQ7OASDY.mjs.br +0 -0
  96. package/dist/chunk-SQ7OASDY.mjs.gz +0 -0
  97. package/dist/chunk-XG4WSJ4O.js.br +0 -0
  98. package/dist/chunk-XG4WSJ4O.js.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ 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.75.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.75.0) - 2026-11-12
11
+
12
+ ### Features
13
+
14
+ - **pptx:** Add rich table cells, custom geometry and new chart parts ([#278](https://github.com/ChristopherVR/ooxml/issues/278)) ([d6c6786](https://github.com/ChristopherVR/ooxml/commit/d6c6786b56b4642eaec1af6c78cd21a067eb0c17))
15
+ - **react:** Add a no-i18next entry for hosts using PptxI18nProvider ([eee7d7c](https://github.com/ChristopherVR/ooxml/commit/eee7d7c169447c5378205455a0ec3f4e6025f674))
16
+
17
+ ### Bug Fixes
18
+
19
+ - **chart:** Offer only the label positions a chart group accepts ([c6894c9](https://github.com/ChristopherVR/ooxml/commit/c6894c9b2bda96dc49b77a0a9e76b48e9903f2bd))
20
+ - **react:** Show built-in English when react-i18next has no instance ([7d825a3](https://github.com/ChristopherVR/ooxml/commit/7d825a34a496f1684300827c9357a334c3525960))
21
+
22
+ ### Testing
23
+
24
+ - **react:** Give the cold no-i18next imports a 60s hook budget ([3df9e20](https://github.com/ChristopherVR/ooxml/commit/3df9e209401d79d0d6b4ea5456cbd2ef5ac9de92))
25
+
10
26
  ## [4.74.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.74.0) - 2026-11-11
11
27
 
12
28
  ### Features
package/README.md CHANGED
@@ -316,7 +316,7 @@ function TranslatedViewer({ content }: { content: Uint8Array }) {
316
316
 
317
317
  `translate` receives the viewer's params unchanged: `defaultValue`, `count` and the values of the `{{name}}` placeholders. Use the same names in your catalog (`{name}` in ICU syntax); `count` is a plain value, so pluralise in your catalog. `{{name}}` placeholders left in the text you return are filled too, so the shipped dictionaries work as they are: `const translate: PptxTranslate = (key) => translationsFr[key];`. A miss (the key itself, an empty string, nothing, or a throw) shows the built-in English text, then the call's default text, then a label derived from the key, never a raw key. Keep `translate` stable (a module-level function or `useCallback`): the viewer re-translates whenever `translate` or `locale` changes.
318
318
 
319
- Inside a provider the host owns the language: the viewer never calls `changeLanguage`, ignores `defaultLocale` and never restores a stored language choice. File > Options > Language appears only with `onLocaleChange` and two or more `availableLocales`; a pick calls `onLocaleChange`, and the selection follows `locale` (`fr-CA` selects an offered `fr`). A `PowerPointViewer` reads the provider nearest above it; a provider rendered inside the viewer is ignored. `i18next` and `react-i18next` stay required peer dependencies in 4.x: install them, but inside a provider the viewer does not use them. `PptxI18nProvider` is React-only: the Vue and Angular bindings delegate to vue-i18n and ngx-translate, and Vanilla and Svelte take `messages` dictionaries.
319
+ Inside a provider the host owns the language: the viewer never calls `changeLanguage`, ignores `defaultLocale` and never restores a stored language choice. File > Options > Language appears only with `onLocaleChange` and two or more `availableLocales`; a pick calls `onLocaleChange`, and the selection follows `locale` (`fr-CA` selects an offered `fr`). A `PowerPointViewer` reads the provider nearest above it; a provider rendered inside the viewer is ignored. `i18next` and `react-i18next` stay required peer dependencies in 4.x: install them, but inside a provider the viewer does not use them. To build without them, import from `pptx-react-viewer/no-i18next`: the same exports and types, with nothing that imports either library; outside a provider it shows the built-in English text and leaves File > Options > Language out (see [Without react-i18next](https://christophervr.github.io/ooxml/pptx/guide/localization#without-react-i18next)). `PptxI18nProvider` is React-only: the Vue and Angular bindings delegate to vue-i18n and ngx-translate, and Vanilla and Svelte take `messages` dictionaries.
320
320
 
321
321
  ## How it's built
322
322
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkP2COO2QO_js = require('./chunk-P2COO2QO.js');
3
+ var chunk6GFSF2ML_js = require('./chunk-6GFSF2ML.js');
4
4
  require('./chunk-PIRHQTI4.js');
5
5
  var react = require('react');
6
6
  var lu = require('react-icons/lu');
@@ -301,7 +301,7 @@ function AiComposer({
301
301
  prefillText,
302
302
  prefillNonce
303
303
  }) {
304
- const { t } = chunkP2COO2QO_js.useTranslation();
304
+ const { t } = chunk6GFSF2ML_js.useTranslation();
305
305
  const [value, setValue] = react.useState("");
306
306
  const textareaRef = react.useRef(null);
307
307
  const appliedNonce = react.useRef(void 0);
@@ -364,7 +364,7 @@ function AiComposer({
364
364
  disabled: value.trim().length === 0,
365
365
  title: t("pptx.ai.send"),
366
366
  "aria-label": t("pptx.ai.send"),
367
- className: chunkP2COO2QO_js.cn(
367
+ className: chunk6GFSF2ML_js.cn(
368
368
  "shrink-0 rounded-sm p-1.5 transition-colors",
369
369
  value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
370
370
  ),
@@ -386,7 +386,7 @@ function AiFocusBar({
386
386
  onStopPick,
387
387
  onClearPicks
388
388
  }) {
389
- const { t } = chunkP2COO2QO_js.useTranslation();
389
+ const { t } = chunk6GFSF2ML_js.useTranslation();
390
390
  const chips = ai.focusTargetChips(targets, slides);
391
391
  const twoTables = ai.isTwoTableFocus(targets, slides);
392
392
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border bg-secondary/30", children: [
@@ -395,7 +395,7 @@ function AiFocusBar({
395
395
  chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
396
396
  "span",
397
397
  {
398
- className: chunkP2COO2QO_js.cn(
398
+ className: chunk6GFSF2ML_js.cn(
399
399
  "inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
400
400
  hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
401
401
  ),
@@ -432,7 +432,7 @@ function AiFocusBar({
432
432
  title: t("pptx.ai.pickElement"),
433
433
  "aria-label": t("pptx.ai.pickAria"),
434
434
  "aria-pressed": pickMode,
435
- className: chunkP2COO2QO_js.cn(
435
+ className: chunk6GFSF2ML_js.cn(
436
436
  "rounded-sm p-1 max-md:min-w-[44px]! max-md:min-h-[44px]! flex items-center justify-center",
437
437
  pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
438
438
  ),
@@ -501,7 +501,7 @@ function relativeTime(from, now = Date.now()) {
501
501
  return `${weeks}w ago`;
502
502
  }
503
503
  function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
504
- const { t } = chunkP2COO2QO_js.useTranslation();
504
+ const { t } = chunk6GFSF2ML_js.useTranslation();
505
505
  if (chats.length === 0) {
506
506
  return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-4 text-center text-[12px] text-muted-foreground", children: t("pptx.ai.historyEmpty") });
507
507
  }
@@ -511,7 +511,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
511
511
  {
512
512
  type: "button",
513
513
  onClick: () => onResume(chat.id),
514
- className: chunkP2COO2QO_js.cn(
514
+ className: chunk6GFSF2ML_js.cn(
515
515
  "flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
516
516
  chat.id === activeChatId && "bg-accent/60"
517
517
  ),
@@ -550,7 +550,7 @@ function AiHistoryMenu({
550
550
  onNewChat,
551
551
  onClose
552
552
  }) {
553
- const { t } = chunkP2COO2QO_js.useTranslation();
553
+ const { t } = chunk6GFSF2ML_js.useTranslation();
554
554
  const ref = react.useRef(null);
555
555
  react.useEffect(() => {
556
556
  const handler = (e) => {
@@ -616,7 +616,7 @@ function appliedThemeFromPart(part) {
616
616
  return { summary: out.summary ?? "Theme updated", previous: out.previous ?? {} };
617
617
  }
618
618
  function AiAppliedThemeCard({ summary, onUndo }) {
619
- const { t } = chunkP2COO2QO_js.useTranslation();
619
+ const { t } = chunk6GFSF2ML_js.useTranslation();
620
620
  const [undone, setUndone] = react.useState(false);
621
621
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 rounded-md border border-primary/30 bg-primary/5 px-2.5 py-1.5 text-[12px]", children: [
622
622
  /* @__PURE__ */ jsxRuntime.jsx(lu.LuPalette, { className: "w-3.5 h-3.5 shrink-0 text-primary" }),
@@ -662,7 +662,7 @@ var ICONS = {
662
662
  tool: lu.LuWrench
663
663
  };
664
664
  function AiToolCallCard({ part }) {
665
- const { t } = chunkP2COO2QO_js.useTranslation();
665
+ const { t } = chunk6GFSF2ML_js.useTranslation();
666
666
  const failed = part.state === "output-error";
667
667
  const done = part.state === "output-available";
668
668
  const running = !failed && !done;
@@ -675,17 +675,17 @@ function AiToolCallCard({ part }) {
675
675
  /* @__PURE__ */ jsxRuntime.jsx(
676
676
  Icon,
677
677
  {
678
- className: chunkP2COO2QO_js.cn(
678
+ className: chunk6GFSF2ML_js.cn(
679
679
  "w-3.5 h-3.5 shrink-0",
680
680
  failed ? "text-destructive" : "text-muted-foreground"
681
681
  )
682
682
  }
683
683
  ),
684
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkP2COO2QO_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
684
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk6GFSF2ML_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
685
685
  /* @__PURE__ */ jsxRuntime.jsxs(
686
686
  "span",
687
687
  {
688
- className: chunkP2COO2QO_js.cn(
688
+ className: chunk6GFSF2ML_js.cn(
689
689
  "ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
690
690
  failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
691
691
  ),
@@ -710,7 +710,7 @@ function AiToolCallCard({ part }) {
710
710
  ] });
711
711
  }
712
712
  function AiMessageList({ messages, isStreaming, bridge }) {
713
- const { t } = chunkP2COO2QO_js.useTranslation();
713
+ const { t } = chunk6GFSF2ML_js.useTranslation();
714
714
  const endRef = react.useRef(null);
715
715
  react.useEffect(() => {
716
716
  endRef.current?.scrollIntoView({ block: "end" });
@@ -733,7 +733,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
733
733
  /* @__PURE__ */ jsxRuntime.jsx(
734
734
  "div",
735
735
  {
736
- className: chunkP2COO2QO_js.cn(
736
+ className: chunk6GFSF2ML_js.cn(
737
737
  "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
738
738
  isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
739
739
  ),
@@ -779,7 +779,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
779
779
  ] });
780
780
  }
781
781
  function AiProposalCard({ proposal, onAccept, onReject }) {
782
- const { t } = chunkP2COO2QO_js.useTranslation();
782
+ const { t } = chunk6GFSF2ML_js.useTranslation();
783
783
  const lines = proposal.summary.map(ai.humanizeDiffLine);
784
784
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-primary/40 bg-primary/5 p-2.5", children: [
785
785
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-primary", children: t("pptx.ai.proposedChange") }),
@@ -821,7 +821,7 @@ function AiConversation({
821
821
  aiPanel,
822
822
  deckId
823
823
  }) {
824
- const { t } = chunkP2COO2QO_js.useTranslation();
824
+ const { t } = chunk6GFSF2ML_js.useTranslation();
825
825
  const chat = useAiConversation(useChat, session, config, bridge, {
826
826
  // Live "AI as a collaborator" focus: as each tool runs, navigate to and
827
827
  // highlight the slide / element(s) it touches so the canvas mirrors the
@@ -986,7 +986,7 @@ function AiChatPanel({
986
986
  onClose,
987
987
  panelWidth
988
988
  }) {
989
- const { t } = chunkP2COO2QO_js.useTranslation();
989
+ const { t } = chunk6GFSF2ML_js.useTranslation();
990
990
  const { state, session, initError } = useAiChat(bridge, config);
991
991
  const deckId = react.useMemo(() => ai.deckIdFromBridge(bridge), [bridge]);
992
992
  return /* @__PURE__ */ jsxRuntime.jsxs(
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- import { useTranslation, cn } from './chunk-FBSPQYRE.mjs';
1
+ import { useTranslation, cn } from './chunk-N3YK2BCA.mjs';
2
2
  import './chunk-UV2HVMKZ.mjs';
3
3
  import { useMemo, useRef, useState, useEffect, useReducer, useCallback } from 'react';
4
4
  import { LuSparkles, LuX, LuLoaderCircle, LuTriangleAlert, LuHistory, LuMessageSquarePlus, LuTrash2, LuPlus, LuGitMerge, LuCrosshair, LuPinOff, LuPin, LuUser, LuBot, LuCheck, LuSquare, LuSend, LuMessageSquare, LuPalette, LuUndo2, LuWrench, LuStickyNote, LuFilm, LuNavigation, LuSearch, LuMove, LuChartColumn, LuLayoutTemplate, LuTable, LuShapes, LuType, LuEye } from 'react-icons/lu';
Binary file
Binary file
package/dist/ai.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkLVEFHZ76_js = require('./chunk-LVEFHZ76.js');
3
+ var chunkMU3BIZ2U_js = require('./chunk-MU3BIZ2U.js');
4
4
  require('./chunk-PIRHQTI4.js');
5
5
 
6
6
  // src/ai.ts
7
7
  function createAiAssistant(config) {
8
- return chunkLVEFHZ76_js.aiAssistants.register(config, chunkLVEFHZ76_js.AiChatPanelLazy);
8
+ return chunkMU3BIZ2U_js.aiAssistants.register(config, chunkMU3BIZ2U_js.AiChatPanelLazy);
9
9
  }
10
10
 
11
11
  exports.createAiAssistant = createAiAssistant;
package/dist/ai.js.br CHANGED
Binary file
package/dist/ai.js.gz CHANGED
Binary file
package/dist/ai.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { aiAssistants, AiChatPanelLazy } from './chunk-JZE6BORE.mjs';
1
+ import { aiAssistants, AiChatPanelLazy } from './chunk-RMEWSJZU.mjs';
2
2
  import './chunk-UV2HVMKZ.mjs';
3
3
 
4
4
  // src/ai.ts
package/dist/ai.mjs.br CHANGED
Binary file
package/dist/ai.mjs.gz CHANGED
Binary file