pptx-react-viewer 4.73.1 → 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 (101) hide show
  1. package/CHANGELOG.md +22 -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-BGWFZCRX.mjs → chunk-DE4Y5F4T.mjs} +152 -207
  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-YLJSLYQS.js → chunk-RJRDE3C2.js} +702 -757
  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 +49 -20
  52. package/dist/index.js +128 -124
  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/pptx-viewer.css +1 -1
  72. package/dist/pptx-viewer.css.br +0 -0
  73. package/dist/pptx-viewer.css.gz +0 -0
  74. package/dist/viewer/index.d.ts +24 -18
  75. package/dist/viewer/index.js +25 -24
  76. package/dist/viewer/index.js.br +0 -0
  77. package/dist/viewer/index.js.gz +0 -0
  78. package/dist/viewer/index.mjs +5 -4
  79. package/dist/viewer/index.mjs.br +0 -0
  80. package/dist/viewer/index.mjs.gz +0 -0
  81. package/package.json +9 -4
  82. package/dist/AiChatPanel-E7CJSTW7.mjs.br +0 -0
  83. package/dist/AiChatPanel-E7CJSTW7.mjs.gz +0 -0
  84. package/dist/AiChatPanel-PLQ3NBTK.js.br +0 -0
  85. package/dist/AiChatPanel-PLQ3NBTK.js.gz +0 -0
  86. package/dist/chunk-BGWFZCRX.mjs.br +0 -0
  87. package/dist/chunk-BGWFZCRX.mjs.gz +0 -0
  88. package/dist/chunk-CRC3V4UG.mjs.br +0 -0
  89. package/dist/chunk-CRC3V4UG.mjs.gz +0 -0
  90. package/dist/chunk-FBSPQYRE.mjs.br +0 -0
  91. package/dist/chunk-FBSPQYRE.mjs.gz +0 -0
  92. package/dist/chunk-JZE6BORE.mjs.br +0 -0
  93. package/dist/chunk-JZE6BORE.mjs.gz +0 -0
  94. package/dist/chunk-LVEFHZ76.js.br +0 -0
  95. package/dist/chunk-LVEFHZ76.js.gz +0 -0
  96. package/dist/chunk-P2COO2QO.js.br +0 -0
  97. package/dist/chunk-P2COO2QO.js.gz +0 -0
  98. package/dist/chunk-XG4WSJ4O.js.br +0 -0
  99. package/dist/chunk-XG4WSJ4O.js.gz +0 -0
  100. package/dist/chunk-YLJSLYQS.js.br +0 -0
  101. package/dist/chunk-YLJSLYQS.js.gz +0 -0
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
2
- import React__default, { ReactNode, ReactElement, RefObject } from 'react';
3
1
  import * as ooxml_ui_pptx from 'ooxml-ui/pptx';
4
2
  import { CollaborationRole, CollaborationConfig, HistoryTheme, ViewportFitOptions, ViewerFontSource, CanvasSize, DocumentStorage, CloudFileProvider, ViewerAutosaveStatus, AutosaveRecord, ConnectionStatus, ViewerTheme, ThemeCatalogEntry, AccountAuthConfig, CollaborationInput, GoogleFontsOption, ListConversionScope, ToolbarActionId, RibbonAddInTab, ViewerCustomization, PptxLoadLimits, PowerPointViewerAPI, ViewerCustomizationApi, BorrowedCollaborationAwareness } from 'ooxml-ui/pptx';
5
3
  export { CollaborationConfig, CollaborationRole, ElementClipboardPayload, ExternalCollaborationAwareness, ExternalCollaborationSession, ExternalCollaborationSnapshot, SessionDeck, ShapeAdjustmentDragState, ShapeAdjustmentHandleDescriptor, ViewerMode, clearAudienceContent, forgetSessionDeck, getSessionTabId, loadAudienceContent, loadSessionDeck, rememberSessionDeck, restoreSessionDeck, storeAudienceContent } from 'ooxml-ui/pptx';
4
+ import * as React from 'react';
5
+ import React__default, { ReactNode, ReactElement, RefObject } from 'react';
6
6
  import { PptxAnimationPreset, ConnectorArrowType, PptxSlide, PptxElement, XmlObject, PptxCoreProperties, PptxElementAnimation, ShapeStyle, PptxSlideTransition, StrokeDashType, PptxNativeAnimation, PptxThemePreset, PptxThemeColorScheme, PptxThemeFontScheme, PptxHandler, PptxData } from 'ooxml-core/pptx';
7
7
  import { CollaborationWriteBackState, CollaborationState } from 'ooxml-core/collab';
8
8
  export { CollaborationState } from 'ooxml-core/collab';
@@ -14,6 +14,18 @@ import { LocaleCatalogEntry } from 'ooxml-ui/pptx/i18n';
14
14
  import * as Y from 'yjs';
15
15
  import { Doc } from 'yjs';
16
16
 
17
+ /** What the viewer passes `translate`: exactly the params of the call. */
18
+ interface PptxTranslateParams {
19
+ readonly defaultValue?: string;
20
+ readonly count?: number;
21
+ readonly [name: string]: unknown;
22
+ }
23
+ /**
24
+ * A host translator for {@link PptxI18nProvider}: the text for a viewer key (`pptx.*`) in the
25
+ * host's active language. Return the key itself, an empty string, `null` or `undefined` for "no
26
+ * translation": the viewer then shows its built-in English text.
27
+ */
28
+ type PptxTranslate = (key: string, params?: PptxTranslateParams) => string | null | undefined;
17
29
  /**
18
30
  * Union of all shape preset types that the viewer can insert or render.
19
31
  * Maps to OOXML `a:prstGeom` preset values (e.g. "rect", "ellipse").
@@ -488,19 +500,25 @@ interface PowerPointViewerProps extends ViewportFitOptions {
488
500
  /**
489
501
  * Initial locale code for File > Options > Language. Falls back to a persisted `localStorage`
490
502
  * choice, then `'en'`. Ignored inside a `PptxI18nProvider`, whose `locale` is the language.
503
+ * Without a provider it applies only while the viewer reads a configured react-i18next
504
+ * instance; with neither (for example `pptx-react-viewer/no-i18next` on its own) the viewer
505
+ * shows its built-in English text and ignores it.
491
506
  */
492
507
  defaultLocale?: string;
493
508
  /**
494
- * Locale choices offered by File > Options > Language. Defaults to the codes registered on the
495
- * host's `react-i18next` instance. Inside a `PptxI18nProvider` there is no default: pass two or
496
- * more, together with `onLocaleChange`, to show the Language category.
509
+ * Locale choices offered by File > Options > Language. Without a provider they default to the
510
+ * codes registered on the host's `react-i18next` instance, and have no effect when the viewer
511
+ * reads no configured instance (see `defaultLocale`). Inside a `PptxI18nProvider` there is no
512
+ * default: pass two or more, together with `onLocaleChange`, to show the Language category.
497
513
  */
498
514
  availableLocales?: LocaleCatalogEntry[];
499
515
  /**
500
516
  * Called when the user picks a language from File > Options > Language. When provided, the
501
517
  * host owns applying and persisting the choice; otherwise the viewer applies and persists it
502
518
  * itself. Inside a `PptxI18nProvider` the host always owns the language: without this callback
503
- * the Language category is left out.
519
+ * the Language category is left out. Without a provider, when the viewer reads no configured
520
+ * react-i18next instance (see `defaultLocale`), the Language category is left out and this is
521
+ * never called.
504
522
  */
505
523
  onLocaleChange?: (code: string) => void;
506
524
  /**
@@ -776,18 +794,6 @@ declare function getAnimationInitialStyle(preset: PptxAnimationPreset | undefine
776
794
  * access (e.g. serialising the current content for saving).
777
795
  */
778
796
  declare const PowerPointViewer: React.ForwardRefExoticComponent<PowerPointViewerProps & React.RefAttributes<PowerPointViewerHandle>>;
779
- /** What the viewer passes `translate`: exactly the params of the call. */
780
- interface PptxTranslateParams {
781
- readonly defaultValue?: string;
782
- readonly count?: number;
783
- readonly [name: string]: unknown;
784
- }
785
- /**
786
- * A host translator for {@link PptxI18nProvider}: the text for a viewer key (`pptx.*`) in the
787
- * host's active language. Return the key itself, an empty string, `null` or `undefined` for "no
788
- * translation": the viewer then shows its built-in English text.
789
- */
790
- type PptxTranslate = (key: string, params?: PptxTranslateParams) => string | null | undefined;
791
797
  interface PptxI18nProviderProps {
792
798
  /**
793
799
  * Translates a viewer key; see {@link PptxTranslate}. Keep it referentially stable (a
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkYLJSLYQS_js = require('../chunk-YLJSLYQS.js');
4
- require('../chunk-LVEFHZ76.js');
5
- var chunkXG4WSJ4O_js = require('../chunk-XG4WSJ4O.js');
6
- var chunkP2COO2QO_js = require('../chunk-P2COO2QO.js');
3
+ require('../chunk-P2IEKYVG.js');
4
+ var chunkRJRDE3C2_js = require('../chunk-RJRDE3C2.js');
5
+ require('../chunk-MU3BIZ2U.js');
6
+ var chunk3AZ6ESJU_js = require('../chunk-3AZ6ESJU.js');
7
+ var chunk6GFSF2ML_js = require('../chunk-6GFSF2ML.js');
7
8
  require('../chunk-PIRHQTI4.js');
8
9
  var pptx = require('ooxml-ui/pptx');
9
10
 
@@ -11,71 +12,71 @@ var pptx = require('ooxml-ui/pptx');
11
12
 
12
13
  Object.defineProperty(exports, "CollaborationStatusIndicator", {
13
14
  enumerable: true,
14
- get: function () { return chunkYLJSLYQS_js.CollaborationStatusIndicator; }
15
+ get: function () { return chunkRJRDE3C2_js.CollaborationStatusIndicator; }
15
16
  });
16
17
  Object.defineProperty(exports, "PowerPointViewer", {
17
18
  enumerable: true,
18
- get: function () { return chunkYLJSLYQS_js.PowerPointViewer; }
19
- });
20
- Object.defineProperty(exports, "PptxI18nProvider", {
21
- enumerable: true,
22
- get: function () { return chunkYLJSLYQS_js.PptxI18nProvider; }
19
+ get: function () { return chunkRJRDE3C2_js.PowerPointViewer; }
23
20
  });
24
21
  Object.defineProperty(exports, "UserAvatarBar", {
25
22
  enumerable: true,
26
- get: function () { return chunkYLJSLYQS_js.UserAvatarBar; }
23
+ get: function () { return chunkRJRDE3C2_js.UserAvatarBar; }
27
24
  });
28
25
  Object.defineProperty(exports, "CollaborationProvider", {
29
26
  enumerable: true,
30
- get: function () { return chunkXG4WSJ4O_js.CollaborationProvider; }
27
+ get: function () { return chunk3AZ6ESJU_js.CollaborationProvider; }
31
28
  });
32
29
  Object.defineProperty(exports, "RemoteUserCursors", {
33
30
  enumerable: true,
34
- get: function () { return chunkXG4WSJ4O_js.RemoteUserCursors; }
31
+ get: function () { return chunk3AZ6ESJU_js.RemoteUserCursors; }
35
32
  });
36
33
  Object.defineProperty(exports, "clearAudienceContent", {
37
34
  enumerable: true,
38
- get: function () { return chunkXG4WSJ4O_js.clearAudienceContent; }
35
+ get: function () { return chunk3AZ6ESJU_js.clearAudienceContent; }
39
36
  });
40
37
  Object.defineProperty(exports, "isAudienceTab", {
41
38
  enumerable: true,
42
- get: function () { return chunkXG4WSJ4O_js.isAudienceTab; }
39
+ get: function () { return chunk3AZ6ESJU_js.isAudienceTab; }
43
40
  });
44
41
  Object.defineProperty(exports, "loadAudienceContent", {
45
42
  enumerable: true,
46
- get: function () { return chunkXG4WSJ4O_js.loadAudienceContent; }
43
+ get: function () { return chunk3AZ6ESJU_js.loadAudienceContent; }
47
44
  });
48
45
  Object.defineProperty(exports, "parseAudienceNonce", {
49
46
  enumerable: true,
50
- get: function () { return chunkXG4WSJ4O_js.parseAudienceNonce; }
47
+ get: function () { return chunk3AZ6ESJU_js.parseAudienceNonce; }
51
48
  });
52
49
  Object.defineProperty(exports, "storeAudienceContent", {
53
50
  enumerable: true,
54
- get: function () { return chunkXG4WSJ4O_js.storeAudienceContent; }
51
+ get: function () { return chunk3AZ6ESJU_js.storeAudienceContent; }
55
52
  });
56
53
  Object.defineProperty(exports, "useCollaborativeHistory", {
57
54
  enumerable: true,
58
- get: function () { return chunkXG4WSJ4O_js.useCollaborativeHistory; }
55
+ get: function () { return chunk3AZ6ESJU_js.useCollaborativeHistory; }
59
56
  });
60
57
  Object.defineProperty(exports, "useCollaborativeState", {
61
58
  enumerable: true,
62
- get: function () { return chunkXG4WSJ4O_js.useCollaborativeState; }
59
+ get: function () { return chunk3AZ6ESJU_js.useCollaborativeState; }
63
60
  });
64
61
  Object.defineProperty(exports, "usePresenceTracking", {
65
62
  enumerable: true,
66
- get: function () { return chunkXG4WSJ4O_js.usePresenceTracking; }
63
+ get: function () { return chunk3AZ6ESJU_js.usePresenceTracking; }
67
64
  });
68
65
  Object.defineProperty(exports, "useThemeSwitching", {
69
66
  enumerable: true,
70
- get: function () { return chunkXG4WSJ4O_js.useThemeSwitching; }
67
+ get: function () { return chunk3AZ6ESJU_js.useThemeSwitching; }
71
68
  });
72
69
  Object.defineProperty(exports, "useYjsProvider", {
73
70
  enumerable: true,
74
- get: function () { return chunkXG4WSJ4O_js.useYjsProvider; }
71
+ get: function () { return chunk3AZ6ESJU_js.useYjsProvider; }
72
+ });
73
+ Object.defineProperty(exports, "PptxI18nProvider", {
74
+ enumerable: true,
75
+ get: function () { return chunk6GFSF2ML_js.PptxI18nProvider; }
75
76
  });
76
77
  Object.defineProperty(exports, "getAnimationInitialStyle", {
77
78
  enumerable: true,
78
- get: function () { return chunkP2COO2QO_js.getAnimationInitialStyle; }
79
+ get: function () { return chunk6GFSF2ML_js.getAnimationInitialStyle; }
79
80
  });
80
81
  Object.defineProperty(exports, "forgetSessionDeck", {
81
82
  enumerable: true,
Binary file
Binary file
@@ -1,6 +1,7 @@
1
- export { CollaborationStatusIndicator, PowerPointViewer, PptxI18nProvider, UserAvatarBar } from '../chunk-BGWFZCRX.mjs';
2
- import '../chunk-JZE6BORE.mjs';
3
- export { CollaborationProvider, RemoteUserCursors, clearAudienceContent, isAudienceTab, loadAudienceContent, parseAudienceNonce, storeAudienceContent, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-CRC3V4UG.mjs';
4
- export { getAnimationInitialStyle } from '../chunk-FBSPQYRE.mjs';
1
+ import '../chunk-Y53EC3JU.mjs';
2
+ export { CollaborationStatusIndicator, PowerPointViewer, UserAvatarBar } from '../chunk-DE4Y5F4T.mjs';
3
+ import '../chunk-RMEWSJZU.mjs';
4
+ export { CollaborationProvider, RemoteUserCursors, clearAudienceContent, isAudienceTab, loadAudienceContent, parseAudienceNonce, storeAudienceContent, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-AZLOOFU2.mjs';
5
+ export { PptxI18nProvider, getAnimationInitialStyle } from '../chunk-N3YK2BCA.mjs';
5
6
  import '../chunk-UV2HVMKZ.mjs';
6
7
  export { forgetSessionDeck, getSessionTabId, loadSessionDeck, rememberSessionDeck, restoreSessionDeck } from 'ooxml-ui/pptx';
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pptx-react-viewer",
3
- "version": "4.73.1",
3
+ "version": "4.75.0",
4
4
  "description": "pptx-viewer for React: a PowerPoint viewer and editor component to render, edit, and export PPTX slides in the browser.",
5
5
  "keywords": [
6
6
  "editor",
@@ -46,6 +46,11 @@
46
46
  "import": "./dist/index.mjs",
47
47
  "require": "./dist/index.js"
48
48
  },
49
+ "./no-i18next": {
50
+ "types": "./dist/no-i18next.d.ts",
51
+ "import": "./dist/no-i18next.mjs",
52
+ "require": "./dist/no-i18next.js"
53
+ },
49
54
  "./viewer": {
50
55
  "types": "./dist/viewer/index.d.ts",
51
56
  "import": "./dist/viewer/index.mjs",
@@ -112,7 +117,7 @@
112
117
  }
113
118
  },
114
119
  "scripts": {
115
- "build": "tsup && tsdown && node ../../scripts/merge-declarations.mjs && node ../../scripts/bundle-declarations.mjs index viewer/index i18n internals ai && node ../../scripts/merge-declarations.mjs .types-bundle && node ../../scripts/prune-stray-declarations.mjs dist index.d.ts viewer/index.d.ts i18n.d.ts internals.d.ts ai.d.ts && npx @tailwindcss/cli -i src/styles/pptx-viewer.css -o dist/pptx-viewer.css --minify && node scripts/build-canvas-css.mjs && node ../locales/scripts/copy-subpaths.mjs && node ../../scripts/compress-dist.mjs dist",
120
+ "build": "tsup && tsdown && node ../../scripts/merge-declarations.mjs && node ../../scripts/bundle-declarations.mjs index no-i18next viewer/index i18n internals ai && node ../../scripts/merge-declarations.mjs .types-bundle && node ../../scripts/prune-stray-declarations.mjs dist index.d.ts no-i18next.d.ts viewer/index.d.ts i18n.d.ts internals.d.ts ai.d.ts && npx @tailwindcss/cli -i src/styles/pptx-viewer.css -o dist/pptx-viewer.css --minify && node scripts/build-canvas-css.mjs && node ../locales/scripts/copy-subpaths.mjs && node ../../scripts/compress-dist.mjs dist",
116
121
  "build:css": "npx @tailwindcss/cli -i src/styles/pptx-viewer.css -o dist/pptx-viewer.css --minify && node scripts/build-canvas-css.mjs",
117
122
  "dev": "tsup --watch",
118
123
  "typecheck": "tsc --noEmit --pretty",
@@ -126,8 +131,8 @@
126
131
  "clsx": "^2.1.1",
127
132
  "dompurify": "^3.4.17",
128
133
  "html2canvas-pro": "^2.6.3",
129
- "ooxml-core": "^1.48.1",
130
- "ooxml-ui": "^1.48.1",
134
+ "ooxml-core": "^1.49.0",
135
+ "ooxml-ui": "^1.49.1",
131
136
  "opentype.js": "^2.0.0",
132
137
  "tailwind-merge": "^3.7.0"
133
138
  },
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file