ooxml-ui 1.39.2 → 1.40.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/README.md +9 -0
- package/dist/chart/format-pane-3d.d.ts +0 -1
- package/dist/chart/format-pane-common.d.ts +0 -1
- package/dist/pptx/{chunk-KF6KKC5I.mjs → chunk-NUB6VP7R.mjs} +6 -6
- package/dist/pptx/{chunk-NSVQAKLJ.mjs → chunk-XTC6MQYM.mjs} +2 -2
- package/dist/pptx/{chunk-IPXWY64E.cjs → chunk-XWAX3PZO.cjs} +17 -17
- package/dist/pptx/{chunk-DA6JZCRR.cjs → chunk-ZLK243QC.cjs} +47 -47
- package/dist/pptx/dom/index.cjs +392 -392
- package/dist/pptx/dom/index.mjs +12 -12
- package/dist/pptx/export/html2canvas-clone.cjs +6 -6
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3437 -3437
- package/dist/pptx/index.mjs +8 -8
- package/dist/pptx/onedrive/index.cjs +26 -0
- package/dist/pptx/onedrive/index.d.ts +4 -0
- package/dist/pptx/onedrive/index.d.ts.map +1 -0
- package/dist/pptx/onedrive/index.mjs +1 -0
- package/dist/pptx/{smartart-insert-preview-K3ZQBMZB.mjs → smartart-insert-preview-BP4WAD5U.mjs} +9 -9
- package/dist/pptx/{smartart-insert-preview-O27AX6EK.cjs → smartart-insert-preview-USGRDZHJ.cjs} +10 -10
- package/dist/suite/document-store.d.ts +22 -1
- package/dist/suite.js +26 -0
- package/dist/theme.d.ts +0 -1
- package/package.json +7 -2
- /package/dist/pptx/{chunk-UHDWWRTX.mjs → chunk-BLONL4S7.mjs} +0 -0
- /package/dist/pptx/{chunk-FROIGMTI.cjs → chunk-S5VKG3XJ.cjs} +0 -0
package/README.md
CHANGED
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
> Shared Office controls, styles and custom elements for browser applications.
|
|
8
8
|
|
|
9
|
+
For host-owned storage or custom merge/sharing policies, use the provider-neutral
|
|
10
|
+
[`DocumentStorage` and `createStorageSession` integration](../../docs/storage-integrations.md),
|
|
11
|
+
shared across all editor elements and framework bindings.
|
|
12
|
+
|
|
13
|
+
For the built-in OneDrive transport, use
|
|
14
|
+
[`ooxml-core/embedding/onedrive`](../../docs/onedrive-integration.md). The reference covers
|
|
15
|
+
`ooxml-ui/docx`, `/xlsx`, `/pptx`, `/visio`, every framework binding, OpenTeams sharing and
|
|
16
|
+
conflict recovery. Microsoft authentication belongs to the host. No simulation service is shipped.
|
|
17
|
+
|
|
9
18
|
[Try the apps](https://christophervr.github.io/ooxml/) | [npm](https://www.npmjs.com/package/ooxml-ui) | [Full docs](https://christophervr.github.io/ooxml/) | [Source](https://github.com/ChristopherVR/ooxml)
|
|
10
19
|
|
|
11
20
|
Part of [ooxml](https://github.com/ChristopherVR/ooxml#readme): **[Office](https://github.com/ChristopherVR/ooxml#ooxml-office-the-whole-suite-in-one-app)** · [Word](https://github.com/ChristopherVR/ooxml/tree/main/viewers/docx#readme) · [Excel](https://github.com/ChristopherVR/ooxml/tree/main/viewers/xlsx#readme) · [PowerPoint](https://github.com/ChristopherVR/ooxml/tree/main/viewers/pptx#readme) · [Visio](https://github.com/ChristopherVR/ooxml/tree/main/viewers/visio#readme) · [OpenTeams](https://github.com/ChristopherVR/ooxml/tree/main/viewers/teams#readme) · [Core](https://github.com/ChristopherVR/ooxml/tree/main/src/core#readme)
|
|
@@ -4,4 +4,3 @@ import type { ChartFormatThreeDView } from './format-pane-view.js';
|
|
|
4
4
|
export declare const CHART_BEVEL_TYPES: readonly ['circle', 'relaxedInset', 'cross', 'coolSlant', 'angle', 'softRound', 'convex', 'slope', 'divot', 'riblet', 'hardEdge', 'artDeco'];
|
|
5
5
|
/** The 3-D Format section for an element with `threeD` as its current 3-D settings. */
|
|
6
6
|
export declare function threeDSection(threeD: ChartFormatThreeDView): ChartFormatSection;
|
|
7
|
-
//# sourceMappingURL=format-pane-3d.d.ts.map
|
|
@@ -20,4 +20,3 @@ export declare function hexForInput(color: string | undefined, fallback?: string
|
|
|
20
20
|
export type ChartFormatTranslate = (key: string, params?: Readonly<Record<string, string | number>>, fallback?: string) => string;
|
|
21
21
|
/** Resolves a caption with `tr`, filling `{{name}}` parameters in either result. */
|
|
22
22
|
export declare function translateChartFormatText(value: ChartFormatText, tr: ChartFormatTranslate): string;
|
|
23
|
-
//# sourceMappingURL=format-pane-common.d.ts.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
import { renderChartViewModelSvg, CHART_PART_ATTR, chartPartFromElement, CHART_PART_SERIES_ATTR, CHART_DRAG_THRESHOLD_PX, resolveChartDragValue, withChartPointValue, computePieChartLayout, widenPieViewModel, formatValueLabel, buildBars, buildGridlines, perspObliqueCameraFor, perspCameraFor, fitPerspView, perspToScreen } from './chunk-WZHYA2B3.mjs';
|
|
1
2
|
import { CAMERA_PRESET_MAP, EMU_PER_PX, getBevelHighlightDirection, MAX_EXTRUSION_LAYERS, getBevelProfileHeightMap, getLightRigLighting, getMaterialLighting, DEFAULT_CUSTOM_REF_PX, isBevelProfileInverted, resolveSmartArt3DStylePath, decorateSmartArt3DMesh, resolveSmartArt3DSceneSetup } from './chunk-RQJOOXRG.mjs';
|
|
2
3
|
import { isCurrentLayout } from './chunk-7BHPBO2O.mjs';
|
|
3
4
|
import { buildLayoutPreviewGeometry } from './chunk-A63ASSCH.mjs';
|
|
4
5
|
import { remapTextToSegments } from './chunk-GVH4QN7R.mjs';
|
|
5
6
|
import { ANIMATION_RIBBON_CATEGORIES, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, animationsGated, animationsLabel, motionPathPresetById, DEFAULT_MOTION_PATH_PRESET_ID, canRequestAnimations } from './chunk-6B3UUVRS.mjs';
|
|
6
7
|
import { applyCaseTransformToSegments } from './chunk-APQ3OOAT.mjs';
|
|
7
|
-
import { renderChartViewModelSvg, CHART_PART_ATTR, chartPartFromElement, CHART_PART_SERIES_ATTR, CHART_DRAG_THRESHOLD_PX, resolveChartDragValue, withChartPointValue, computePieChartLayout, widenPieViewModel, formatValueLabel, buildBars, buildGridlines, perspObliqueCameraFor, perspCameraFor, fitPerspView, perspToScreen } from './chunk-WZHYA2B3.mjs';
|
|
8
8
|
import { buildFontCatalog } from './chunk-PTIGQSTY.mjs';
|
|
9
|
-
import { isUrlSafe, parsePpactionUrl, safeOpenUrl, isPpactionUrl, resolveHyperlinkHref, clampSlideIndex } from './chunk-7FXQHSPE.mjs';
|
|
10
|
-
import { createImageElementFromFile } from './chunk-L55MIOBC.mjs';
|
|
11
9
|
import { RIBBON_SHAPE_SWATCHES, withExclusiveLineSpacing, splitTextStyleUpdate, mergeTextStyleUpdate, overrideParagraphProperties, TEXT_DECORATION_FLAGS, reconcileDecorationFlags, overrideParagraphIndents, paragraphOverridePatch, canInteractWithElement } from './chunk-FUKVYJPM.mjs';
|
|
12
10
|
import { CHARACTER_SPACING_OPTIONS, CHANGE_CASE_OPTIONS, LINE_SPACING_OPTIONS, COMMON_FONT_SIZES } from './chunk-SMSCEGAE.mjs';
|
|
11
|
+
import { isUrlSafe, parsePpactionUrl, safeOpenUrl, isPpactionUrl, resolveHyperlinkHref, clampSlideIndex } from './chunk-7FXQHSPE.mjs';
|
|
12
|
+
import { createImageElementFromFile } from './chunk-L55MIOBC.mjs';
|
|
13
|
+
import { upsert, animationFor } from './chunk-PMURSMHH.mjs';
|
|
13
14
|
import { animationPresetLabelKey } from './chunk-T7FRLIDM.mjs';
|
|
14
15
|
import { OOXML_PATTERN_PRESETS, resolveChartKind, buildChartViewModel, withResolvedPalette, computeHistogramBins, orderParetoEntries, cumulativePercentOfTotal, getCssBorderDashStyle, normalizeStrokeDashType, DEFAULT_STROKE_COLOR, colorWithOpacity, normalizeHexColor, getPatternTile, getSvgStrokeDasharray, getComputedFillStyle, setBoundedRenderCache, parseDrawingPercent, clampUnitInterval, DEFAULT_BODY_INSET_LR_PX, DEFAULT_TEXT_FONT_SIZE, applyParetoConversion, chartGridlinesPatch, computeChartLegendLayout, chartAxisIndex, chartPlotBounds, HYPERLINK_COLOR, getPatternSvg, clampCropValue, buildRectPathGradientImage, DEFAULT_FONT_FAMILY, DEFAULT_TEXT_COLOR, DEFAULT_BODY_INSET_TB_PX, buildDashArray, wrapTextByEstimatedWidth, getPptxRenderCacheEpoch, invalidatePptxRenderCacheEpoch, clearBarFacePicturePixelCache, isSeriesOnSecondaryAxis, computeGradientCenter, sanitizeGradientStops, chartGridlinesState, chartTextBox, buildRectPathGradientSvg, DEFAULT_BAR_GAP_WIDTH, axisTickValues, buildGradientCss, estimateTextWidth, formatAxisValueWithUnits } from './chunk-QK6LJT3K.mjs';
|
|
15
16
|
import { tiltChannelsFromVectors, buildInkStrokeView } from './chunk-IB6ZM2E2.mjs';
|
|
16
17
|
import { hasPressureVariation, resolveInkOpacity } from './chunk-JA7WYSRE.mjs';
|
|
17
|
-
import { screenBorder, screenStrokeWidth, settleThreeViews, withAuthoredStrokeWidths, snapshotThreeViewsIntoClone, prepareExportClone, DEVICE_PX_VAR } from './chunk-
|
|
18
|
+
import { screenBorder, screenStrokeWidth, settleThreeViews, withAuthoredStrokeWidths, snapshotThreeViewsIntoClone, prepareExportClone, DEVICE_PX_VAR } from './chunk-BLONL4S7.mjs';
|
|
18
19
|
import { sanitizeMarkupOrEmpty, getCommentMarkerPosition, validatePrintSettings, computeSlideIndices, filterHiddenSlideIndices, buildOutlineHtml, buildPrintHtmlDocument, computeColorFilter, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml } from './chunk-5VSUIPDX.mjs';
|
|
19
20
|
import { A4_PORTRAIT } from './chunk-WHUMPYEM.mjs';
|
|
20
21
|
import { escapeHtml } from './chunk-IEAO7N4E.mjs';
|
|
21
|
-
import { upsert, animationFor } from './chunk-PMURSMHH.mjs';
|
|
22
22
|
import { TOUCH, tok, OFFICE_TOKENS, installOfficeUiTheme, withOfficeThemeCss, installOfficeUiThemeFor, LEGACY_OFFICE_THEME_TOKENS, legacyThemeBridge, GALLERY_THEME_PRESETS, activeGalleryThemePreset } from './chunk-MK2ASJSY.mjs';
|
|
23
23
|
import { resolveTableCellImageUrls, resolveTextFillBlipUrls, collectMediaElements, resolveMediaElementSource } from './chunk-AEQGGKRZ.mjs';
|
|
24
24
|
import { CHART_FORMAT_STRINGS, CHART_FORMAT_LOCALES, translationsEn } from './chunk-WQI3NLMY.mjs';
|
|
@@ -84821,7 +84821,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
84821
84821
|
if (this.#live || this.#draw) {
|
|
84822
84822
|
return;
|
|
84823
84823
|
}
|
|
84824
|
-
this.#live = import('./smartart-insert-preview-
|
|
84824
|
+
this.#live = import('./smartart-insert-preview-BP4WAD5U.mjs').then((module) => {
|
|
84825
84825
|
if (this.#draw || !this.#picker) {
|
|
84826
84826
|
return;
|
|
84827
84827
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { THREE_VIEW_EVENTS, applyChart3DSelect, applyChart3DDrag, resolveSmartArtThreeViewSpec, elementInLocalFrame, SMARTART_3D_EDIT_LAYER_ATTRIBUTE, stripEditLayerMarkers, routeEditLayerPointerToNodes, measureSvgViewportRect, findSmartArtNodeText, resolvePalette, smartArtConnectorPaint, smartArtNodeLabel, getContainerStyle, buildChromeStyle, buildSmartArtA11y, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, computeSmartArtElementLayout, flattenNodes, computeDrawingViewBox, projectDrawingShapes, styleShadowFilter, resolveRevealedDrawingShapeNodeIds, refreshSmartArtPictureImage, SMARTART_PREVIEW_ELEMENT_WIDTH, SMARTART_PREVIEW_ELEMENT_HEIGHT, buildSmartArtPreviewElement, isForwardedEditLayerEvent } from './chunk-
|
|
1
|
+
import { THREE_VIEW_EVENTS, applyChart3DSelect, applyChart3DDrag, resolveSmartArtThreeViewSpec, elementInLocalFrame, SMARTART_3D_EDIT_LAYER_ATTRIBUTE, stripEditLayerMarkers, routeEditLayerPointerToNodes, measureSvgViewportRect, findSmartArtNodeText, resolvePalette, smartArtConnectorPaint, smartArtNodeLabel, getContainerStyle, buildChromeStyle, buildSmartArtA11y, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, computeSmartArtElementLayout, flattenNodes, computeDrawingViewBox, projectDrawingShapes, styleShadowFilter, resolveRevealedDrawingShapeNodeIds, refreshSmartArtPictureImage, SMARTART_PREVIEW_ELEMENT_WIDTH, SMARTART_PREVIEW_ELEMENT_HEIGHT, buildSmartArtPreviewElement, isForwardedEditLayerEvent } from './chunk-NUB6VP7R.mjs';
|
|
2
2
|
import { canDrillDown } from './chunk-FUKVYJPM.mjs';
|
|
3
3
|
import { formatAxisValue } from './chunk-QK6LJT3K.mjs';
|
|
4
|
-
import { THREE_VIEW_TAG, defineThreeViewElement } from './chunk-
|
|
4
|
+
import { THREE_VIEW_TAG, defineThreeViewElement } from './chunk-BLONL4S7.mjs';
|
|
5
5
|
|
|
6
6
|
// src/pptx/dom/dom.ts
|
|
7
7
|
function toCssPropertyName(key) {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkHIRBPTML_cjs = require('./chunk-HIRBPTML.cjs');
|
|
3
4
|
var chunkXOAXPD2W_cjs = require('./chunk-XOAXPD2W.cjs');
|
|
4
5
|
var chunkW3X2UVYQ_cjs = require('./chunk-W3X2UVYQ.cjs');
|
|
5
6
|
var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
|
|
6
7
|
var chunkX7FS7XHU_cjs = require('./chunk-X7FS7XHU.cjs');
|
|
7
8
|
var chunkXFQ2RD4I_cjs = require('./chunk-XFQ2RD4I.cjs');
|
|
8
9
|
var chunk52LKIMK3_cjs = require('./chunk-52LKIMK3.cjs');
|
|
9
|
-
var chunkHIRBPTML_cjs = require('./chunk-HIRBPTML.cjs');
|
|
10
10
|
var chunkWBGU7BWD_cjs = require('./chunk-WBGU7BWD.cjs');
|
|
11
|
-
var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
|
|
12
|
-
var chunkZJFN5POF_cjs = require('./chunk-ZJFN5POF.cjs');
|
|
13
11
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
14
12
|
var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
|
|
13
|
+
var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
|
|
14
|
+
var chunkZJFN5POF_cjs = require('./chunk-ZJFN5POF.cjs');
|
|
15
|
+
var chunkOJFD3SHS_cjs = require('./chunk-OJFD3SHS.cjs');
|
|
15
16
|
var chunkUSBRSEJK_cjs = require('./chunk-USBRSEJK.cjs');
|
|
16
17
|
var chunkKJICUZXM_cjs = require('./chunk-KJICUZXM.cjs');
|
|
17
18
|
var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
|
|
18
19
|
var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
|
|
19
|
-
var
|
|
20
|
+
var chunkS5VKG3XJ_cjs = require('./chunk-S5VKG3XJ.cjs');
|
|
20
21
|
var chunk3CYWRMYZ_cjs = require('./chunk-3CYWRMYZ.cjs');
|
|
21
22
|
var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
22
23
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
23
|
-
var chunkOJFD3SHS_cjs = require('./chunk-OJFD3SHS.cjs');
|
|
24
24
|
var chunk3ESFHUZI_cjs = require('./chunk-3ESFHUZI.cjs');
|
|
25
25
|
var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
|
|
26
26
|
var chunkCRV7G4GC_cjs = require('./chunk-CRV7G4GC.cjs');
|
|
@@ -1641,10 +1641,10 @@ function getComputedStrokeStyle(element) {
|
|
|
1641
1641
|
const borderColor = style.strokeOpacity === void 0 ? rawColor : chunkKJICUZXM_cjs.colorWithOpacity(chunkKJICUZXM_cjs.normalizeHexColor(rawColor, chunkKJICUZXM_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
|
|
1642
1642
|
return {
|
|
1643
1643
|
borderWidth,
|
|
1644
|
-
cssBorderWidth:
|
|
1644
|
+
cssBorderWidth: chunkS5VKG3XJ_cjs.screenStrokeWidth(borderWidth),
|
|
1645
1645
|
borderStyle,
|
|
1646
1646
|
borderColor,
|
|
1647
|
-
border:
|
|
1647
|
+
border: chunkS5VKG3XJ_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
|
|
1648
1648
|
...joins
|
|
1649
1649
|
};
|
|
1650
1650
|
}
|
|
@@ -1864,12 +1864,12 @@ function getPresetShapeVectorGeometry(shapeType, width, height, adjustments) {
|
|
|
1864
1864
|
function outlineStrands(compoundLine, strokeWidth) {
|
|
1865
1865
|
const offsets2 = getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
1866
1866
|
if (offsets2.length <= 1) {
|
|
1867
|
-
return [{ strokeWidth, cssStrokeWidth:
|
|
1867
|
+
return [{ strokeWidth, cssStrokeWidth: chunkS5VKG3XJ_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
|
|
1868
1868
|
}
|
|
1869
1869
|
const widths = getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1870
1870
|
return offsets2.map((offset, idx) => {
|
|
1871
1871
|
const width = widths[idx] ?? strokeWidth;
|
|
1872
|
-
return { strokeWidth: width, cssStrokeWidth:
|
|
1872
|
+
return { strokeWidth: width, cssStrokeWidth: chunkS5VKG3XJ_cjs.screenStrokeWidth(width), offset };
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
1875
|
function needsCenteredStrokeOverlay(element, style, declaredWidth) {
|
|
@@ -1895,7 +1895,7 @@ function clipEdgeBleed(element, d, style) {
|
|
|
1895
1895
|
return edge ? {
|
|
1896
1896
|
d: edge,
|
|
1897
1897
|
strokeWidth: 1,
|
|
1898
|
-
cssStrokeWidth: `max(1px, calc(2 * var(${
|
|
1898
|
+
cssStrokeWidth: `max(1px, calc(2 * var(${chunkS5VKG3XJ_cjs.DEVICE_PX_VAR}, 0px)))`,
|
|
1899
1899
|
offset: 0
|
|
1900
1900
|
} : void 0;
|
|
1901
1901
|
}
|
|
@@ -23031,7 +23031,7 @@ function borderToCss(border, resolve) {
|
|
|
23031
23031
|
const width = border.width ?? 1;
|
|
23032
23032
|
const dash = ooxmlDashToCssBorderStyle(border.dash);
|
|
23033
23033
|
const color = border.color ?? resolve(border.fill) ?? "#000000";
|
|
23034
|
-
return
|
|
23034
|
+
return chunkS5VKG3XJ_cjs.screenBorder(width, dash, color);
|
|
23035
23035
|
}
|
|
23036
23036
|
function collectSections(entry6, tableData, pos) {
|
|
23037
23037
|
const { rowIndex, cellIndex, rowCount, columnCount } = pos;
|
|
@@ -24502,7 +24502,7 @@ function cellStyleToCss(style) {
|
|
|
24502
24502
|
const w = edge.width ?? 1;
|
|
24503
24503
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
24504
24504
|
const s = ooxmlDashToCssBorderStyle(edge.dash);
|
|
24505
|
-
css[edge.prefix] =
|
|
24505
|
+
css[edge.prefix] = chunkS5VKG3XJ_cjs.screenBorder(w, s, c);
|
|
24506
24506
|
}
|
|
24507
24507
|
}
|
|
24508
24508
|
Object.assign(css, cellPaddingCss(style));
|
|
@@ -70162,14 +70162,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
|
|
|
70162
70162
|
backgroundColor,
|
|
70163
70163
|
readComputedStyle = (el) => window.getComputedStyle(el)
|
|
70164
70164
|
} = options;
|
|
70165
|
-
await
|
|
70165
|
+
await chunkS5VKG3XJ_cjs.settleThreeViews(element);
|
|
70166
70166
|
const clone = element.cloneNode(true);
|
|
70167
|
-
|
|
70167
|
+
chunkS5VKG3XJ_cjs.withAuthoredStrokeWidths(
|
|
70168
70168
|
element,
|
|
70169
70169
|
() => inlineComputedStylesOnClone(element, clone, readComputedStyle)
|
|
70170
70170
|
);
|
|
70171
|
-
|
|
70172
|
-
|
|
70171
|
+
chunkS5VKG3XJ_cjs.snapshotThreeViewsIntoClone(element, clone);
|
|
70172
|
+
chunkS5VKG3XJ_cjs.prepareExportClone(clone);
|
|
70173
70173
|
const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
|
|
70174
70174
|
embedImagesOnClone(clone),
|
|
70175
70175
|
collectExternalFontFaceCss(doc, fetchAsDataUrl)
|
|
@@ -84784,7 +84784,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
84784
84784
|
if (this.#live || this.#draw) {
|
|
84785
84785
|
return;
|
|
84786
84786
|
}
|
|
84787
|
-
this.#live = import('./smartart-insert-preview-
|
|
84787
|
+
this.#live = import('./smartart-insert-preview-USGRDZHJ.cjs').then((module) => {
|
|
84788
84788
|
if (this.#draw || !this.#picker) {
|
|
84789
84789
|
return;
|
|
84790
84790
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXWAX3PZO_cjs = require('./chunk-XWAX3PZO.cjs');
|
|
4
4
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
5
5
|
var chunkKJICUZXM_cjs = require('./chunk-KJICUZXM.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkS5VKG3XJ_cjs = require('./chunk-S5VKG3XJ.cjs');
|
|
7
7
|
|
|
8
8
|
// src/pptx/dom/dom.ts
|
|
9
9
|
function toCssPropertyName(key) {
|
|
@@ -56,7 +56,7 @@ function composeTransforms(first, second) {
|
|
|
56
56
|
var pool = null;
|
|
57
57
|
function collectThreeViews(root) {
|
|
58
58
|
const views = /* @__PURE__ */ new Map();
|
|
59
|
-
for (const view of root.querySelectorAll(
|
|
59
|
+
for (const view of root.querySelectorAll(chunkS5VKG3XJ_cjs.THREE_VIEW_TAG)) {
|
|
60
60
|
if (view.spec && !views.has(view.spec)) {
|
|
61
61
|
views.set(view.spec, view);
|
|
62
62
|
}
|
|
@@ -92,8 +92,8 @@ function rendering3DFlagsOf(context) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
function mountThreeViewInto(doc, wrapper, options) {
|
|
95
|
-
|
|
96
|
-
const view = takeReusableThreeView(options.spec) ?? doc.createElement(
|
|
95
|
+
chunkS5VKG3XJ_cjs.defineThreeViewElement(doc.defaultView?.customElements);
|
|
96
|
+
const view = takeReusableThreeView(options.spec) ?? doc.createElement(chunkS5VKG3XJ_cjs.THREE_VIEW_TAG);
|
|
97
97
|
view.replaceChildren(...Array.from(wrapper.childNodes));
|
|
98
98
|
view.spec = options.spec;
|
|
99
99
|
view.interactive = options.interactive;
|
|
@@ -145,19 +145,19 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
145
145
|
const listeners = new AbortController();
|
|
146
146
|
chartViewListeners.set(view, listeners);
|
|
147
147
|
view.addEventListener(
|
|
148
|
-
|
|
149
|
-
(event) =>
|
|
148
|
+
chunkXWAX3PZO_cjs.THREE_VIEW_EVENTS.select,
|
|
149
|
+
(event) => chunkXWAX3PZO_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
150
150
|
{ signal: listeners.signal }
|
|
151
151
|
);
|
|
152
152
|
view.addEventListener(
|
|
153
|
-
|
|
154
|
-
(event) =>
|
|
153
|
+
chunkXWAX3PZO_cjs.THREE_VIEW_EVENTS.drag,
|
|
154
|
+
(event) => chunkXWAX3PZO_cjs.applyChart3DDrag(bridge, event.detail),
|
|
155
155
|
{ signal: listeners.signal }
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
var chartViewListeners = /* @__PURE__ */ new WeakMap();
|
|
159
159
|
function applyThreeViewTextStyle(el, style) {
|
|
160
|
-
for (const view of el.querySelectorAll(
|
|
160
|
+
for (const view of el.querySelectorAll(chunkS5VKG3XJ_cjs.THREE_VIEW_TAG)) {
|
|
161
161
|
view.textStyle = style;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -165,7 +165,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
165
165
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
166
166
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
167
167
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
168
|
-
const spec = wrapper ?
|
|
168
|
+
const spec = wrapper ? chunkXWAX3PZO_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
169
169
|
if (!wrapper || !spec) {
|
|
170
170
|
return wrapper;
|
|
171
171
|
}
|
|
@@ -175,18 +175,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
175
175
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
176
176
|
});
|
|
177
177
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
178
|
-
const layer = renderSmartArtSvg(
|
|
178
|
+
const layer = renderSmartArtSvg(chunkXWAX3PZO_cjs.elementInLocalFrame(element), 0, context);
|
|
179
179
|
if (layer) {
|
|
180
180
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
181
|
-
layer.setAttribute(
|
|
182
|
-
|
|
181
|
+
layer.setAttribute(chunkXWAX3PZO_cjs.SMARTART_3D_EDIT_LAYER_ATTRIBUTE, "true");
|
|
182
|
+
chunkXWAX3PZO_cjs.stripEditLayerMarkers(layer);
|
|
183
183
|
layer.setAttribute("aria-hidden", "true");
|
|
184
184
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
185
185
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
186
186
|
svg.style.opacity = "0";
|
|
187
187
|
}
|
|
188
188
|
wrapper.appendChild(layer);
|
|
189
|
-
|
|
189
|
+
chunkXWAX3PZO_cjs.routeEditLayerPointerToNodes(layer);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
return wrapper;
|
|
@@ -206,7 +206,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
206
206
|
let swatches = null;
|
|
207
207
|
let hideTimer;
|
|
208
208
|
const cancelHide = () => clearTimeout(hideTimer);
|
|
209
|
-
const ignoredHover = (event) => chrome.closest(`[${
|
|
209
|
+
const ignoredHover = (event) => chrome.closest(`[${chunkXWAX3PZO_cjs.SMARTART_3D_EDIT_LAYER_ATTRIBUTE}]`) !== null && !chunkXWAX3PZO_cjs.isForwardedEditLayerEvent(event);
|
|
210
210
|
const closeEditor = (input = editor) => {
|
|
211
211
|
if (!input || input !== editor) {
|
|
212
212
|
return;
|
|
@@ -222,8 +222,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
222
222
|
}
|
|
223
223
|
event.stopPropagation();
|
|
224
224
|
const textNode = target.querySelector("text");
|
|
225
|
-
const textRect = textNode ?
|
|
226
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
225
|
+
const textRect = textNode ? chunkXWAX3PZO_cjs.measureSvgViewportRect(textNode) : null;
|
|
226
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkXWAX3PZO_cjs.measureSvgViewportRect(target);
|
|
227
227
|
if (!rect) {
|
|
228
228
|
return;
|
|
229
229
|
}
|
|
@@ -247,7 +247,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
247
247
|
textAlign: "center"
|
|
248
248
|
});
|
|
249
249
|
editor = input;
|
|
250
|
-
input.value =
|
|
250
|
+
input.value = chunkXWAX3PZO_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
251
251
|
const commit = () => {
|
|
252
252
|
if (input !== editor) {
|
|
253
253
|
return;
|
|
@@ -282,7 +282,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
282
282
|
}
|
|
283
283
|
cancelHide();
|
|
284
284
|
swatches?.remove();
|
|
285
|
-
const rect =
|
|
285
|
+
const rect = chunkXWAX3PZO_cjs.measureSvgViewportRect(target);
|
|
286
286
|
if (!rect) {
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
@@ -301,7 +301,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
301
301
|
});
|
|
302
302
|
swatches.setAttribute("role", "group");
|
|
303
303
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
304
|
-
for (const color of
|
|
304
|
+
for (const color of chunkXWAX3PZO_cjs.resolvePalette(data).slice(0, 6)) {
|
|
305
305
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
306
306
|
width: "18px",
|
|
307
307
|
height: "18px",
|
|
@@ -403,7 +403,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
403
403
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
404
404
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
405
405
|
for (const conn of layout.connectors) {
|
|
406
|
-
const paint =
|
|
406
|
+
const paint = chunkXWAX3PZO_cjs.smartArtConnectorPaint(conn);
|
|
407
407
|
svg.appendChild(
|
|
408
408
|
createSvgEl(doc, "path", {
|
|
409
409
|
d: paint.d,
|
|
@@ -462,7 +462,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
462
462
|
})
|
|
463
463
|
);
|
|
464
464
|
}
|
|
465
|
-
const label =
|
|
465
|
+
const label = chunkXWAX3PZO_cjs.smartArtNodeLabel(node);
|
|
466
466
|
if (label.visible) {
|
|
467
467
|
appendSvgTextLines(doc, g, {
|
|
468
468
|
lines: label.lines,
|
|
@@ -498,41 +498,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
498
498
|
doc,
|
|
499
499
|
"div",
|
|
500
500
|
"pptxv-element pptxv-smartart",
|
|
501
|
-
|
|
501
|
+
chunkXWAX3PZO_cjs.getContainerStyle(element, zIndex)
|
|
502
502
|
);
|
|
503
503
|
wrapper.dataset.elementId = element.id;
|
|
504
504
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
505
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
505
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunkXWAX3PZO_cjs.buildChromeStyle(data?.chrome));
|
|
506
506
|
chrome.style.position = "relative";
|
|
507
507
|
wrapper.appendChild(chrome);
|
|
508
508
|
if (data) {
|
|
509
|
-
const a11y =
|
|
509
|
+
const a11y = chunkXWAX3PZO_cjs.buildSmartArtA11y(data);
|
|
510
510
|
chrome.setAttribute("role", "img");
|
|
511
511
|
chrome.setAttribute("aria-label", a11y.label);
|
|
512
512
|
}
|
|
513
513
|
const nodes = data?.nodes ?? [];
|
|
514
514
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
515
515
|
const animationState = context.presentationStates?.get(element.id);
|
|
516
|
-
const { nodes: revealedNodesFull } =
|
|
516
|
+
const { nodes: revealedNodesFull } = chunkXWAX3PZO_cjs.resolveRevealedSmartArtNodes(
|
|
517
517
|
nodes,
|
|
518
518
|
animationState,
|
|
519
519
|
data?.presLayoutVars
|
|
520
520
|
);
|
|
521
521
|
if (data && drawingShapes.length > 0) {
|
|
522
|
-
const revealedShapes =
|
|
522
|
+
const revealedShapes = chunkXWAX3PZO_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
523
523
|
chrome.appendChild(
|
|
524
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
524
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkXWAX3PZO_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
525
525
|
);
|
|
526
526
|
enableSmartArtEditing(chrome, element, context);
|
|
527
527
|
return wrapper;
|
|
528
528
|
}
|
|
529
529
|
if (data && nodes.length > 0) {
|
|
530
530
|
const revealedNodes = revealedNodesFull;
|
|
531
|
-
const layout =
|
|
531
|
+
const layout = chunkXWAX3PZO_cjs.computeSmartArtElementLayout(
|
|
532
532
|
data,
|
|
533
533
|
revealedNodes,
|
|
534
534
|
{ width: element.width, height: element.height },
|
|
535
|
-
|
|
535
|
+
chunkXWAX3PZO_cjs.resolvePalette(data),
|
|
536
536
|
data.style ?? "flat",
|
|
537
537
|
element.id
|
|
538
538
|
);
|
|
@@ -540,8 +540,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
540
540
|
buildSmartArtFallbackSvg(
|
|
541
541
|
doc,
|
|
542
542
|
layout,
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
chunkXWAX3PZO_cjs.buildSmartArtA11y(data).nodes,
|
|
544
|
+
chunkXWAX3PZO_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
545
545
|
)
|
|
546
546
|
);
|
|
547
547
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -564,17 +564,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
564
564
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
565
565
|
const allShapes = data.drawingShapes ?? [];
|
|
566
566
|
const style = data.style ?? "flat";
|
|
567
|
-
const viewBox =
|
|
568
|
-
const rendered =
|
|
567
|
+
const viewBox = chunkXWAX3PZO_cjs.computeDrawingViewBox(allShapes);
|
|
568
|
+
const rendered = chunkXWAX3PZO_cjs.projectDrawingShapes(
|
|
569
569
|
elementId,
|
|
570
570
|
revealedShapes,
|
|
571
571
|
viewBox,
|
|
572
|
-
|
|
572
|
+
chunkXWAX3PZO_cjs.resolvePalette(data),
|
|
573
573
|
style
|
|
574
574
|
);
|
|
575
|
-
const shadow =
|
|
575
|
+
const shadow = chunkXWAX3PZO_cjs.styleShadowFilter(style);
|
|
576
576
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
577
|
-
const nodeIds =
|
|
577
|
+
const nodeIds = chunkXWAX3PZO_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
578
578
|
const svg = createSvgEl(doc, "svg", {
|
|
579
579
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
580
580
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -615,7 +615,7 @@ function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes)
|
|
|
615
615
|
image.setAttribute("href", shape.imageUrl ?? "");
|
|
616
616
|
image.addEventListener(
|
|
617
617
|
"load",
|
|
618
|
-
(event) =>
|
|
618
|
+
(event) => chunkXWAX3PZO_cjs.refreshSmartArtPictureImage(event, shape.pictureSource)
|
|
619
619
|
);
|
|
620
620
|
g.appendChild(image);
|
|
621
621
|
} else if (shape.kind === "ellipse") {
|
|
@@ -707,26 +707,26 @@ function createElementRendererRegistry() {
|
|
|
707
707
|
// src/pptx/dom/smartart-insert-preview.ts
|
|
708
708
|
function buildSmartArtInsertPreview(doc, t, layout, size) {
|
|
709
709
|
const scale = Math.min(
|
|
710
|
-
size.width /
|
|
711
|
-
size.height /
|
|
710
|
+
size.width / chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH,
|
|
711
|
+
size.height / chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_HEIGHT
|
|
712
712
|
);
|
|
713
713
|
const box = createEl(doc, "div", "pptxv-smartart-option-preview", {
|
|
714
|
-
width: `${Math.round(
|
|
715
|
-
height: `${Math.round(
|
|
714
|
+
width: `${Math.round(chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH * scale)}px`,
|
|
715
|
+
height: `${Math.round(chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_HEIGHT * scale)}px`,
|
|
716
716
|
overflow: "hidden",
|
|
717
717
|
pointerEvents: "none",
|
|
718
718
|
position: "relative"
|
|
719
719
|
});
|
|
720
720
|
box.setAttribute("aria-hidden", "true");
|
|
721
721
|
const stage = createEl(doc, "div", void 0, {
|
|
722
|
-
width: `${
|
|
723
|
-
height: `${
|
|
722
|
+
width: `${chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH}px`,
|
|
723
|
+
height: `${chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_HEIGHT}px`,
|
|
724
724
|
transform: `scale(${scale})`,
|
|
725
725
|
transformOrigin: "top left",
|
|
726
726
|
position: "relative"
|
|
727
727
|
});
|
|
728
728
|
box.appendChild(stage);
|
|
729
|
-
const element =
|
|
729
|
+
const element = chunkXWAX3PZO_cjs.buildSmartArtPreviewElement(layout);
|
|
730
730
|
const slide = {
|
|
731
731
|
id: "smartart-preview",
|
|
732
732
|
rId: "smartart-preview",
|
|
@@ -736,7 +736,7 @@ function buildSmartArtInsertPreview(doc, t, layout, size) {
|
|
|
736
736
|
const context = {
|
|
737
737
|
document: doc,
|
|
738
738
|
slide,
|
|
739
|
-
canvasSize: { width:
|
|
739
|
+
canvasSize: { width: chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH, height: chunkXWAX3PZO_cjs.SMARTART_PREVIEW_ELEMENT_HEIGHT },
|
|
740
740
|
scale: 1,
|
|
741
741
|
mediaDataUrls: /* @__PURE__ */ new Map(),
|
|
742
742
|
t,
|