@aixa-transformation/pptx-viewer 2.0.29 → 2.0.30
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/dist/{chunk-LGPN7YBY.mjs → chunk-CKNLAQCV.mjs} +12 -1
- package/dist/{chunk-E4API7OH.js → chunk-I5S57RYE.js} +12 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +6 -6
- package/dist/index.mjs +1 -1
- package/dist/viewer/index.js +6 -6
- package/dist/viewer/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1335,7 +1335,7 @@ function AccountPage() {
|
|
|
1335
1335
|
return void 0;
|
|
1336
1336
|
});
|
|
1337
1337
|
};
|
|
1338
|
-
const version = "2.0.
|
|
1338
|
+
const version = "2.0.30" ;
|
|
1339
1339
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1340
1340
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
1341
1341
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -34135,6 +34135,7 @@ var PowerPointViewer = forwardRef(
|
|
|
34135
34135
|
const {
|
|
34136
34136
|
content: incomingContent,
|
|
34137
34137
|
singleSlideOnly = false,
|
|
34138
|
+
activeSlideIndex: controlledActiveSlideIndex,
|
|
34138
34139
|
fonts = [],
|
|
34139
34140
|
onUploadCustomFontPackage,
|
|
34140
34141
|
filePath,
|
|
@@ -34282,6 +34283,16 @@ var PowerPointViewer = forwardRef(
|
|
|
34282
34283
|
activeSlide,
|
|
34283
34284
|
selectedElement
|
|
34284
34285
|
} = state;
|
|
34286
|
+
useEffect(() => {
|
|
34287
|
+
if (controlledActiveSlideIndex == null || slides.length === 0) {
|
|
34288
|
+
return;
|
|
34289
|
+
}
|
|
34290
|
+
const requestedIndex = Number.isFinite(controlledActiveSlideIndex) ? Math.trunc(controlledActiveSlideIndex) : 0;
|
|
34291
|
+
const nextIndex = Math.min(Math.max(0, requestedIndex), slides.length - 1);
|
|
34292
|
+
if (activeSlideIndex !== nextIndex) {
|
|
34293
|
+
state.setActiveSlideIndex(nextIndex);
|
|
34294
|
+
}
|
|
34295
|
+
}, [controlledActiveSlideIndex, slides.length, activeSlideIndex, state.setActiveSlideIndex]);
|
|
34285
34296
|
const settings = useMemo(
|
|
34286
34297
|
() => ({
|
|
34287
34298
|
autoSave: autosaveEnabled,
|
|
@@ -1342,7 +1342,7 @@ function AccountPage() {
|
|
|
1342
1342
|
return void 0;
|
|
1343
1343
|
});
|
|
1344
1344
|
};
|
|
1345
|
-
const version = "2.0.
|
|
1345
|
+
const version = "2.0.30" ;
|
|
1346
1346
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1347
1347
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: cardClass, children: [
|
|
1348
1348
|
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -34142,6 +34142,7 @@ var PowerPointViewer = React18.forwardRef(
|
|
|
34142
34142
|
const {
|
|
34143
34143
|
content: incomingContent,
|
|
34144
34144
|
singleSlideOnly = false,
|
|
34145
|
+
activeSlideIndex: controlledActiveSlideIndex,
|
|
34145
34146
|
fonts = [],
|
|
34146
34147
|
onUploadCustomFontPackage,
|
|
34147
34148
|
filePath,
|
|
@@ -34289,6 +34290,16 @@ var PowerPointViewer = React18.forwardRef(
|
|
|
34289
34290
|
activeSlide,
|
|
34290
34291
|
selectedElement
|
|
34291
34292
|
} = state;
|
|
34293
|
+
React18.useEffect(() => {
|
|
34294
|
+
if (controlledActiveSlideIndex == null || slides.length === 0) {
|
|
34295
|
+
return;
|
|
34296
|
+
}
|
|
34297
|
+
const requestedIndex = Number.isFinite(controlledActiveSlideIndex) ? Math.trunc(controlledActiveSlideIndex) : 0;
|
|
34298
|
+
const nextIndex = Math.min(Math.max(0, requestedIndex), slides.length - 1);
|
|
34299
|
+
if (activeSlideIndex !== nextIndex) {
|
|
34300
|
+
state.setActiveSlideIndex(nextIndex);
|
|
34301
|
+
}
|
|
34302
|
+
}, [controlledActiveSlideIndex, slides.length, activeSlideIndex, state.setActiveSlideIndex]);
|
|
34292
34303
|
const settings = React18.useMemo(
|
|
34293
34304
|
() => ({
|
|
34294
34305
|
autoSave: autosaveEnabled,
|
package/dist/index.d.ts
CHANGED
|
@@ -15,9 +15,11 @@ export interface PowerPointViewerHandle {
|
|
|
15
15
|
export interface PowerPointViewerProps {
|
|
16
16
|
ref?: Ref<PowerPointViewerHandle>;
|
|
17
17
|
content: Uint8Array;
|
|
18
|
-
canEdit?: boolean;
|
|
19
|
-
singleSlideOnly?: boolean;
|
|
20
|
-
|
|
18
|
+
canEdit?: boolean;
|
|
19
|
+
singleSlideOnly?: boolean;
|
|
20
|
+
/** Zero-based slide index controlled by the host application. */
|
|
21
|
+
activeSlideIndex?: number;
|
|
22
|
+
className?: string;
|
|
21
23
|
theme?: unknown;
|
|
22
24
|
onContentChange?: (content: Uint8Array) => void;
|
|
23
25
|
onDirtyChange?: (dirty: boolean) => void;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkI5S57RYE_js = require('./chunk-I5S57RYE.js');
|
|
4
4
|
var chunkOGINKMSL_js = require('./chunk-OGINKMSL.js');
|
|
5
5
|
var chunkXCLYIGHM_js = require('./chunk-XCLYIGHM.js');
|
|
6
6
|
var chunkCUUYYYC5_js = require('./chunk-CUUYYYC5.js');
|
|
@@ -11,23 +11,23 @@ require('./chunk-QGM4M3NI.js');
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, "PowerPointViewer", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkI5S57RYE_js.PowerPointViewer; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "SlideCanvas", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkI5S57RYE_js.SlideCanvas; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "Toolbar", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkI5S57RYE_js.Toolbar; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "ViewerThemeProvider", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkI5S57RYE_js.ViewerThemeProvider; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "useViewerTheme", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkI5S57RYE_js.useViewerTheme; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "getAnimationInitialStyle", {
|
|
33
33
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PowerPointViewer, SlideCanvas, Toolbar, ViewerThemeProvider, useViewerTheme } from './chunk-
|
|
1
|
+
export { PowerPointViewer, SlideCanvas, Toolbar, ViewerThemeProvider, useViewerTheme } from './chunk-CKNLAQCV.mjs';
|
|
2
2
|
export { getAnimationInitialStyle, renderToCanvas, useViewerBuildingBlocks } from './chunk-TYXOHBKR.mjs';
|
|
3
3
|
export { AVATAR_COLOR_SWATCHES, DEFAULT_VIEWER_PROFILE, THEME_CATALOG, VIEWER_PREFS_STORAGE_KEY, clearAllLocalViewerData, clearStoredViewerPrefs, defaultCssVars, defaultRadius, defaultThemeColors, getLocalStorageUsageSummary, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from './chunk-YVQPLQ3C.mjs';
|
|
4
4
|
export { LOCALE_CATALOG } from './chunk-2X72MOPZ.mjs';
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkI5S57RYE_js = require('../chunk-I5S57RYE.js');
|
|
4
4
|
require('../chunk-IKBO6CZC.js');
|
|
5
5
|
var chunkOGINKMSL_js = require('../chunk-OGINKMSL.js');
|
|
6
6
|
var chunkXCLYIGHM_js = require('../chunk-XCLYIGHM.js');
|
|
@@ -12,23 +12,23 @@ require('../chunk-QGM4M3NI.js');
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "CollaborationProvider", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkI5S57RYE_js.CollaborationProvider; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "CollaborationStatusIndicator", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkI5S57RYE_js.CollaborationStatusIndicator; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "PowerPointViewer", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkI5S57RYE_js.PowerPointViewer; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "RemoteUserCursors", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkI5S57RYE_js.RemoteUserCursors; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "UserAvatarBar", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkI5S57RYE_js.UserAvatarBar; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "getAnimationInitialStyle", {
|
|
34
34
|
enumerable: true,
|
package/dist/viewer/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CollaborationProvider, CollaborationStatusIndicator, PowerPointViewer, RemoteUserCursors, UserAvatarBar } from '../chunk-
|
|
1
|
+
export { CollaborationProvider, CollaborationStatusIndicator, PowerPointViewer, RemoteUserCursors, UserAvatarBar } from '../chunk-CKNLAQCV.mjs';
|
|
2
2
|
import '../chunk-T5U6P2JH.mjs';
|
|
3
3
|
export { getAnimationInitialStyle, isAudienceTab, parseAudienceNonce, useCollaborativeHistory, useCollaborativeState, usePresenceTracking, useThemeSwitching, useYjsProvider } from '../chunk-TYXOHBKR.mjs';
|
|
4
4
|
export { clearAudienceContent, loadAudienceContent, storeAudienceContent } from '../chunk-YVQPLQ3C.mjs';
|