pptx-react-viewer 4.32.0 → 4.33.1
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 +36 -0
- package/README.md +3 -2
- package/dist/{AiChatPanel-H6ULCALE.mjs → AiChatPanel-CYD46SEM.mjs} +1 -1
- package/dist/AiChatPanel-CYD46SEM.mjs.br +0 -0
- package/dist/AiChatPanel-CYD46SEM.mjs.gz +0 -0
- package/dist/{AiChatPanel-4JU6JFZT.js → AiChatPanel-ONHWZEPV.js} +9 -9
- package/dist/AiChatPanel-ONHWZEPV.js.br +0 -0
- package/dist/AiChatPanel-ONHWZEPV.js.gz +0 -0
- package/dist/{chunk-5O6SSO3K.mjs → chunk-2OIJUZD5.mjs} +8 -3
- package/dist/chunk-2OIJUZD5.mjs.br +0 -0
- package/dist/chunk-2OIJUZD5.mjs.gz +0 -0
- package/dist/{chunk-ZM4QAOFK.js → chunk-7DGKSEIU.js} +4 -9
- package/dist/chunk-7DGKSEIU.js.br +0 -0
- package/dist/chunk-7DGKSEIU.js.gz +0 -0
- package/dist/{chunk-OE5UAZ2Y.mjs → chunk-GSMY5BTO.mjs} +99 -38
- package/dist/chunk-GSMY5BTO.mjs.br +0 -0
- package/dist/chunk-GSMY5BTO.mjs.gz +0 -0
- package/dist/{chunk-NF6QQBYI.js → chunk-JHYNVFFS.js} +1355 -1294
- package/dist/chunk-JHYNVFFS.js.br +0 -0
- package/dist/chunk-JHYNVFFS.js.gz +0 -0
- package/dist/{chunk-BLTSLCCE.mjs → chunk-K4UXDQZ6.mjs} +4 -9
- package/dist/chunk-K4UXDQZ6.mjs.br +0 -0
- package/dist/chunk-K4UXDQZ6.mjs.gz +0 -0
- package/dist/{chunk-OAB7K6VH.js → chunk-TVSTM5J5.js} +252 -247
- package/dist/chunk-TVSTM5J5.js.br +0 -0
- package/dist/chunk-TVSTM5J5.js.gz +0 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +19 -1
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +4 -4
- package/dist/AiChatPanel-4JU6JFZT.js.br +0 -0
- package/dist/AiChatPanel-4JU6JFZT.js.gz +0 -0
- package/dist/AiChatPanel-H6ULCALE.mjs.br +0 -0
- package/dist/AiChatPanel-H6ULCALE.mjs.gz +0 -0
- package/dist/chunk-5O6SSO3K.mjs.br +0 -0
- package/dist/chunk-5O6SSO3K.mjs.gz +0 -0
- package/dist/chunk-BLTSLCCE.mjs.br +0 -0
- package/dist/chunk-BLTSLCCE.mjs.gz +0 -0
- package/dist/chunk-NF6QQBYI.js.br +0 -0
- package/dist/chunk-NF6QQBYI.js.gz +0 -0
- package/dist/chunk-OAB7K6VH.js.br +0 -0
- package/dist/chunk-OAB7K6VH.js.gz +0 -0
- package/dist/chunk-OE5UAZ2Y.mjs.br +0 -0
- package/dist/chunk-OE5UAZ2Y.mjs.gz +0 -0
- package/dist/chunk-ZM4QAOFK.js.br +0 -0
- package/dist/chunk-ZM4QAOFK.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,42 @@ 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.33.1](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.33.1) - 2026-10-11
|
|
11
|
+
|
|
12
|
+
### Testing
|
|
13
|
+
|
|
14
|
+
- **pptx:** Wait for the hyperlink deck to load as svelte does ([01d7206](https://github.com/ChristopherVR/ooxml/commit/01d72066f9ab3fce3433426a19e8c337624e087f))
|
|
15
|
+
- **pptx:** Share workers across the binding package unit tests ([d51469c](https://github.com/ChristopherVR/ooxml/commit/d51469cc709e145007222ef0510a19bedbf08728))
|
|
16
|
+
- **ui:** Keep each DOM environment and test state in its own worker ([6d52bec](https://github.com/ChristopherVR/ooxml/commit/6d52bec41343129aa621e11e173fe3c706e82b6e))
|
|
17
|
+
|
|
18
|
+
### Styling
|
|
19
|
+
|
|
20
|
+
- Fix the oxfmt and oxlint warnings in the viewers ([db0314f](https://github.com/ChristopherVR/ooxml/commit/db0314f319e3d0508960872260792215477d9ca5))
|
|
21
|
+
- **pptx:** Format the pptx viewer with its own oxfmt configuration ([7ca9f51](https://github.com/ChristopherVR/ooxml/commit/7ca9f51be7d0926e28cc5913792cfc1c966c0d35))
|
|
22
|
+
|
|
23
|
+
## [4.33.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.33.0) - 2026-10-10
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
- **color:** Add the Office theme colour palette to the color area ([646b6b5](https://github.com/ChristopherVR/ooxml/commit/646b6b532a304013f0c8783801ab3401de8a1950))
|
|
28
|
+
- **pptx:** Add host ribbon tabs to all five PowerPoint bindings ([2089f62](https://github.com/ChristopherVR/ooxml/commit/2089f620d736c867dbd383f2fe4dd39eff7e6cc3))
|
|
29
|
+
- **text:** Add the fonts' design advance widths, regular and bold ([15f7eeb](https://github.com/ChristopherVR/ooxml/commit/15f7eebb692c4cf43d8febdd49070e583daef22a))
|
|
30
|
+
- **visio:** Pick theme colours that follow the page theme ([d29c9c7](https://github.com/ChristopherVR/ooxml/commit/d29c9c7b8ae343821db3461ca55af2283d6a19ef))
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
- **pptx:** Verify certificate chains with node:crypto, not node-forge ([51e6312](https://github.com/ChristopherVR/ooxml/commit/51e6312aa152a47ac11a6beced49b373adf0fb68))
|
|
35
|
+
- **pptx:** Keep the browser's image drag out of picture moves ([817a36a](https://github.com/ChristopherVR/ooxml/commit/817a36a1eae21a48e149ee5459597577dd2cdf22))
|
|
36
|
+
|
|
37
|
+
### Refactor
|
|
38
|
+
|
|
39
|
+
- **geometry:** Move the orthogonal connector router out of pptx ([7628894](https://github.com/ChristopherVR/ooxml/commit/7628894c847d098846b7250e8cf7cfee0b8e1ecd))
|
|
40
|
+
- **ui:** Move Excel and Word colour pickers onto the shared grid ([ab332b6](https://github.com/ChristopherVR/ooxml/commit/ab332b6ed7a4b80bc5016de05efb3fad694c85de))
|
|
41
|
+
|
|
42
|
+
### Styling
|
|
43
|
+
|
|
44
|
+
- Apply oxfmt to files drifted from the formatter ([daeabf2](https://github.com/ChristopherVR/ooxml/commit/daeabf26125af866f90359ac8a5716234d5b8b36))
|
|
45
|
+
|
|
10
46
|
## [4.32.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.32.0) - 2026-10-10
|
|
11
47
|
|
|
12
48
|
### Features
|
package/README.md
CHANGED
|
@@ -34,8 +34,8 @@ npm install react react-dom framer-motion lucide-react react-icons jspdf jszip f
|
|
|
34
34
|
## Quick start
|
|
35
35
|
|
|
36
36
|
```tsx
|
|
37
|
-
import { useState } from 'react';
|
|
38
37
|
import { PowerPointViewer } from 'pptx-react-viewer';
|
|
38
|
+
import { useState } from 'react';
|
|
39
39
|
// Not using Tailwind? Import the bundled stylesheet once at your app entry:
|
|
40
40
|
import 'pptx-react-viewer/styles';
|
|
41
41
|
|
|
@@ -63,8 +63,8 @@ The component fills its parent, so give the parent a height. That's the whole se
|
|
|
63
63
|
To read the edited presentation back out as bytes, pass a `ref` and call `getContent()`:
|
|
64
64
|
|
|
65
65
|
```tsx
|
|
66
|
-
import { useRef } from 'react';
|
|
67
66
|
import { PowerPointViewer, type PowerPointViewerHandle } from 'pptx-react-viewer';
|
|
67
|
+
import { useRef } from 'react';
|
|
68
68
|
|
|
69
69
|
const viewerRef = useRef<PowerPointViewerHandle>(null);
|
|
70
70
|
|
|
@@ -123,6 +123,7 @@ const bytes = await viewerRef.current?.getContent(); // Uint8Array of a valid .p
|
|
|
123
123
|
| `onStopCollaboration` | `() => void` | n/a | Called when the collaboration session stops |
|
|
124
124
|
| `theme` | `ViewerTheme` | n/a | Theme configuration for customising colours, radius, and CSS vars |
|
|
125
125
|
| `hiddenActions` | `ToolbarActionId[]` | n/a | Hide individual toolbar buttons and/or ribbon tabs (e.g. `['share', 'broadcast']`) instead of the whole toolbar; omitted hides nothing |
|
|
126
|
+
| `ribbonAddIns` | `RibbonAddInTab[]` | n/a | Ribbon tabs the host adds after Help; a command runs its `run` callback and raises `office-ribbon-add-in` (see the customization guide) |
|
|
126
127
|
| `customization` | `ViewerCustomization` | - | Hide, lock or remap any part of the UI (ribbon tabs/buttons, File > Options pages/sections/settings, File tab, context menus, shortcuts, panels, AI/collaboration, dialogs); the same helpers (`hideRibbonTab`, `lockSetting`, ...) are on the `ref` handle. See the [UI Customization guide](https://christophervr.github.io/ooxml/pptx/guide/customization). |
|
|
127
128
|
| `defaultThemeKey` | `string` | n/a | Initial File > Options > Appearance selection when no persisted preference exists |
|
|
128
129
|
| `availableThemes` | `ThemeCatalogEntry[]` | n/a | Theme choices offered by File > Options > Appearance (defaults to the built-in catalog) |
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7DGKSEIU_js = require('./chunk-7DGKSEIU.js');
|
|
4
4
|
require('./chunk-W2IMY5SY.js');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var reactI18next = require('react-i18next');
|
|
@@ -365,7 +365,7 @@ function AiComposer({
|
|
|
365
365
|
disabled: value.trim().length === 0,
|
|
366
366
|
title: t("pptx.ai.send"),
|
|
367
367
|
"aria-label": t("pptx.ai.send"),
|
|
368
|
-
className:
|
|
368
|
+
className: chunk7DGKSEIU_js.cn(
|
|
369
369
|
"shrink-0 rounded-sm p-1.5 transition-colors",
|
|
370
370
|
value.trim().length === 0 ? "text-muted-foreground/50" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
371
371
|
),
|
|
@@ -396,7 +396,7 @@ function AiFocusBar({
|
|
|
396
396
|
chips.map((chip) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
397
397
|
"span",
|
|
398
398
|
{
|
|
399
|
-
className:
|
|
399
|
+
className: chunk7DGKSEIU_js.cn(
|
|
400
400
|
"inline-flex max-w-[10rem] items-center rounded-full px-2 py-0.5 text-[11px]",
|
|
401
401
|
hasPicks || isPinned ? "bg-primary/15 text-primary" : "bg-muted text-muted-foreground"
|
|
402
402
|
),
|
|
@@ -433,7 +433,7 @@ function AiFocusBar({
|
|
|
433
433
|
title: t("pptx.ai.pickElement"),
|
|
434
434
|
"aria-label": t("pptx.ai.pickAria"),
|
|
435
435
|
"aria-pressed": pickMode,
|
|
436
|
-
className:
|
|
436
|
+
className: chunk7DGKSEIU_js.cn(
|
|
437
437
|
"rounded-sm p-1 max-md:min-w-[44px]! max-md:min-h-[44px]! flex items-center justify-center",
|
|
438
438
|
pickMode ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent"
|
|
439
439
|
),
|
|
@@ -512,7 +512,7 @@ function AiHistoryList({ chats, activeChatId, onResume, onDelete }) {
|
|
|
512
512
|
{
|
|
513
513
|
type: "button",
|
|
514
514
|
onClick: () => onResume(chat.id),
|
|
515
|
-
className:
|
|
515
|
+
className: chunk7DGKSEIU_js.cn(
|
|
516
516
|
"flex min-w-0 flex-1 items-start gap-2 rounded-sm px-2 py-1.5 text-left hover:bg-accent",
|
|
517
517
|
chat.id === activeChatId && "bg-accent/60"
|
|
518
518
|
),
|
|
@@ -676,17 +676,17 @@ function AiToolCallCard({ part }) {
|
|
|
676
676
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
677
677
|
Icon,
|
|
678
678
|
{
|
|
679
|
-
className:
|
|
679
|
+
className: chunk7DGKSEIU_js.cn(
|
|
680
680
|
"w-3.5 h-3.5 shrink-0",
|
|
681
681
|
failed ? "text-destructive" : "text-muted-foreground"
|
|
682
682
|
)
|
|
683
683
|
}
|
|
684
684
|
),
|
|
685
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
685
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk7DGKSEIU_js.cn("truncate", failed ? "text-destructive" : "text-foreground"), children: activity.label }),
|
|
686
686
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
687
687
|
"span",
|
|
688
688
|
{
|
|
689
|
-
className:
|
|
689
|
+
className: chunk7DGKSEIU_js.cn(
|
|
690
690
|
"ml-auto inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 text-[10px]",
|
|
691
691
|
failed ? "bg-destructive/15 text-destructive" : done ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
|
|
692
692
|
),
|
|
@@ -734,7 +734,7 @@ function AiMessageList({ messages, isStreaming, bridge }) {
|
|
|
734
734
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
735
735
|
"div",
|
|
736
736
|
{
|
|
737
|
-
className:
|
|
737
|
+
className: chunk7DGKSEIU_js.cn(
|
|
738
738
|
"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full",
|
|
739
739
|
isUser ? "bg-secondary text-muted-foreground" : "bg-primary/15 text-primary"
|
|
740
740
|
),
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dist_exports, normalizeHexColor, DEFAULT_STROKE_COLOR, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getAriaRoleDescription, getAriaLabel, getAriaRole, isEditableTextElement, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageEffectsOpacity, getImageEffectsFilter, getImageRenderStyle, cn, ACTION_BUTTON_PRESETS, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getElementLabel, DEFAULT_FILL_COLOR, buildCssGradientFromShapeStyle, getCropShapeClipPath, getElementTransform, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, isImageTiled, getDuotoneColors, getTextWarpStyle, getTextCompensationTransform, renderTextSegments, buildReactChartViewModel, renderChartElement, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, substituteFieldText, HYPERLINK_COLOR, cloneTemplateElementsBySlideId, cloneSlide, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, isTemplateElementId, comparePresentation, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, stopAllPersistentAudio, buildSaveSlides, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, makeCloneId, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, copyFormatFromElement, hasCopyableFormat, rerouteConnectorsForMovedElements, applyReroutedConnectors, splitCell, mergeCells, buildNotesPdf, canvasToJpegData, applyFormatToElement, isPpactionUrl, parsePpactionUrl, isUrlSafe, computeSnapToShape, safeOpenUrl as safeOpenUrl$1 } from './chunk-
|
|
1
|
+
import { dist_exports, normalizeHexColor, DEFAULT_STROKE_COLOR, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getAriaRoleDescription, getAriaLabel, getAriaRole, isEditableTextElement, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageEffectsOpacity, getImageEffectsFilter, getImageRenderStyle, cn, ACTION_BUTTON_PRESETS, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getElementLabel, DEFAULT_FILL_COLOR, buildCssGradientFromShapeStyle, getCropShapeClipPath, getElementTransform, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, isImageTiled, getDuotoneColors, getTextWarpStyle, getTextCompensationTransform, renderTextSegments, buildReactChartViewModel, renderChartElement, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, substituteFieldText, HYPERLINK_COLOR, cloneTemplateElementsBySlideId, cloneSlide, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, isTemplateElementId, comparePresentation, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, stopAllPersistentAudio, buildSaveSlides, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, makeCloneId, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, copyFormatFromElement, hasCopyableFormat, rerouteConnectorsForMovedElements, applyReroutedConnectors, splitCell, mergeCells, buildNotesPdf, canvasToJpegData, applyFormatToElement, isPpactionUrl, parsePpactionUrl, isUrlSafe, computeSnapToShape, safeOpenUrl as safeOpenUrl$1 } from './chunk-K4UXDQZ6.mjs';
|
|
2
2
|
import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, svgLineCap, getSelectionOutlineColor, screenStrokeWidth, connectorWrapperTransform, resolveElementInteractivity, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, mediaTransportVisible, oleActionsVisible, getGroupChildParentFill, getResizeHandleHitAreaStyle, paintedStrokeWidth, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, getImageColorWashStyle, readEditableText, placeCaretAt, takePendingCaretPoint, getPendingSelectionRestore, restoreSegmentSelection, mapInlineTextFormatKey, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, getAriaRoleDescription as getAriaRoleDescription$1, getAriaLabel as getAriaLabel$1, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, SMARTART_DEFAULT_PALETTE, resolvePalette as resolvePalette$1, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, resolveZoomNavigationTarget, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, computeInlineEditorRect, smartArtNodeAtPoint, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveForwardSlideWithZoomReturn, buildZoomTransitionOverride, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, beginZoomExcursion, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, isFeatureEnabled, mapSlideShowStartKey, mapCustomizedEditorKey, isEditorControlTarget, isEditorTextInputTarget, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, deviceStrokeStageStyle, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, drillSelectionForDoubleClick, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, resolveViewportFitOptions, EDITOR_VIEWPORT_FIT, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, slideSpaceMembers, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, createBackstagePresentation, buildFieldSubstitutionContext, isEnterableGroup, memberChainAtPoint, findElementPath, drillSelectionForClick, scrollInspectorSectionIntoView, computeScrollDelta, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, withCellStyle, setCellText, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, createSnapshotTextPositions, resolvePresentationAction, buildSmartArtPresetData, classifyMediaType, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from 'ooxml-ui/pptx';
|
|
3
3
|
export { DUOTONE_PRESETS, MOBILE_BREAKPOINT, SLIDE_TRANSITION_KEYFRAMES, TABLET_BREAKPOINT, clearAudienceContent, computeVirtualRange, downloadBlob, getSlideTransitionAnimations, loadAudienceContent, storeAudienceContent } from 'ooxml-ui/pptx';
|
|
4
4
|
import React17, { createContext, useMemo, useState, useCallback, useEffect, Suspense, useRef, useLayoutEffect, useContext, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
@@ -4021,7 +4021,9 @@ function useInlineEditingState(onTextChange) {
|
|
|
4021
4021
|
const entry = { elementId, read };
|
|
4022
4022
|
inlineEditingReaderRef.current = entry;
|
|
4023
4023
|
return () => {
|
|
4024
|
-
if (inlineEditingReaderRef.current === entry)
|
|
4024
|
+
if (inlineEditingReaderRef.current === entry) {
|
|
4025
|
+
inlineEditingReaderRef.current = void 0;
|
|
4026
|
+
}
|
|
4025
4027
|
};
|
|
4026
4028
|
},
|
|
4027
4029
|
[]
|
|
@@ -9426,7 +9428,9 @@ function useSerialize(input) {
|
|
|
9426
9428
|
const pendingEditId = inlineEditingElementIdRef.current;
|
|
9427
9429
|
const reader = inlineEditingReaderRef?.current;
|
|
9428
9430
|
const read = reader?.elementId === pendingEditId ? reader.read() : void 0;
|
|
9429
|
-
if (read?.kind === "unsupported")
|
|
9431
|
+
if (read?.kind === "unsupported") {
|
|
9432
|
+
return null;
|
|
9433
|
+
}
|
|
9430
9434
|
const pendingEditText = read?.snapshot.text ?? inlineEditingTextRef.current;
|
|
9431
9435
|
const pendingSnapshot = read?.snapshot ?? inlineEditingSnapshotRef?.current;
|
|
9432
9436
|
const pending = overlayPendingInlineEdit(
|
|
@@ -17790,6 +17794,7 @@ function ZoomElementRenderer({
|
|
|
17790
17794
|
{
|
|
17791
17795
|
src: tile.imageSrc,
|
|
17792
17796
|
alt: tile.ariaLabel,
|
|
17797
|
+
draggable: false,
|
|
17793
17798
|
style: { width: "100%", height: "100%", objectFit: "contain" }
|
|
17794
17799
|
}
|
|
17795
17800
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
Binary file
|
|
Binary file
|
|
@@ -691,7 +691,8 @@ function renderMediaFallback({
|
|
|
691
691
|
src: posterUrl,
|
|
692
692
|
alt: visual.dimPoster ? i18n.translationsEn["pptx.media.posterAlt"] : i18n.translationsEn["pptx.media.videoPosterAlt"],
|
|
693
693
|
className: `w-full h-full${visual.dimPoster ? " opacity-50" : ""}`,
|
|
694
|
-
style: pptx.getImageFitStyle(element)
|
|
694
|
+
style: pptx.getImageFitStyle(element),
|
|
695
|
+
draggable: false
|
|
695
696
|
}
|
|
696
697
|
),
|
|
697
698
|
/* @__PURE__ */ jsxRuntime.jsx(Badge, { visual, element })
|
|
@@ -1659,6 +1660,7 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1659
1660
|
contentEditable: false,
|
|
1660
1661
|
src: picture.src,
|
|
1661
1662
|
alt: picture.accessibleLabel,
|
|
1663
|
+
draggable: false,
|
|
1662
1664
|
style: {
|
|
1663
1665
|
width: picture.sizePx,
|
|
1664
1666
|
height: picture.sizePx,
|
|
@@ -2847,14 +2849,7 @@ function parseTableElementData(element, fallbackTextStyle) {
|
|
|
2847
2849
|
function renderTableCellContent(cell, fallbackText) {
|
|
2848
2850
|
const blocks = cell ? pptx.cellParagraphBlocks(cell) : void 0;
|
|
2849
2851
|
if (blocks) {
|
|
2850
|
-
return blocks.map((block, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2851
|
-
"div",
|
|
2852
|
-
{
|
|
2853
|
-
style: { display: "block", ...block.css },
|
|
2854
|
-
children: block.runs.map(renderRun)
|
|
2855
|
-
},
|
|
2856
|
-
`p-${index}`
|
|
2857
|
-
));
|
|
2852
|
+
return blocks.map((block, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "block", ...block.css }, children: block.runs.map(renderRun) }, `p-${index}`));
|
|
2858
2853
|
}
|
|
2859
2854
|
const runs = cell?.textRuns;
|
|
2860
2855
|
if (!runs || runs.length === 0) {
|
|
Binary file
|
|
Binary file
|