ooxml-ui 1.47.0 → 1.48.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/dist/base.d.ts +0 -1
- package/dist/building-block-styles.d.ts +0 -1
- package/dist/chart/format-pane-3d.d.ts +0 -1
- package/dist/chart/format-pane-axis.d.ts +0 -1
- package/dist/chart/format-pane-common.d.ts +0 -1
- package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
- package/dist/chart/format-pane-model.d.ts +0 -1
- package/dist/chart/format-pane-options.d.ts +0 -1
- package/dist/chart/format-pane-space.d.ts +1 -0
- package/dist/chart/format-pane-targets.d.ts +1 -0
- package/dist/chart/format-pane-types.d.ts +0 -1
- package/dist/chart/format-pane-view.d.ts +0 -1
- package/dist/files/cloud-files-view.d.ts +0 -1
- package/dist/fonts/webfonts.d.ts +0 -1
- package/dist/form/color-swatches.d.ts +1 -0
- package/dist/image-native-size.d.ts +0 -1
- package/dist/picture-pixels.d.ts +0 -1
- package/dist/pptx/{chunk-GYI2TFSW.cjs → chunk-2FKBWWSS.cjs} +8 -0
- package/dist/pptx/{chunk-JHI42PNB.cjs → chunk-55SOCULX.cjs} +47 -47
- package/dist/pptx/{chunk-BV24XNBQ.mjs → chunk-BZ3RLZ7P.mjs} +3 -3
- package/dist/pptx/{chunk-XMAQ23WE.mjs → chunk-JOTNDOPD.mjs} +2 -2
- package/dist/pptx/{chunk-6XIUBQPL.cjs → chunk-W5ZQPPB5.cjs} +6 -6
- package/dist/pptx/{chunk-S6P7UWGZ.mjs → chunk-XLSW7WM3.mjs} +8 -0
- package/dist/pptx/dom/index.cjs +371 -371
- package/dist/pptx/dom/index.mjs +5 -5
- package/dist/pptx/export/css-preprocessing-flatten.d.ts.map +1 -1
- package/dist/pptx/export/html2canvas-clone.cjs +6 -6
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3091 -3091
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/morph-predicates.d.ts +5 -1
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-WY6DHSAJ.mjs → smartart-insert-preview-53SDH6T2.mjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-GE47FXVT.cjs → smartart-insert-preview-EQY2WQ3J.cjs} +4 -4
- package/dist/render-cache.d.ts +0 -1
- package/dist/theme.d.ts +0 -1
- package/package.json +12 -12
package/dist/base.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export type OfficeUiBlockKind = 'toolbar' | 'formula-bar' | 'tabs' | 'inspector'
|
|
|
2
2
|
export type OfficeUiProduct = 'docx' | 'xlsx' | 'visio' | 'pptx';
|
|
3
3
|
/** Opt-in styles for native framework controls. They never target host-owned controls implicitly. */
|
|
4
4
|
export declare const BUILDING_BLOCKS_CSS: string;
|
|
5
|
-
//# sourceMappingURL=building-block-styles.d.ts.map
|
|
@@ -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
|
|
@@ -2,4 +2,3 @@ import type { ChartFormatSection } from './format-pane-types.js';
|
|
|
2
2
|
import type { ChartFormatAxisView } from './format-pane-view.js';
|
|
3
3
|
/** Axis Options, Tick Marks, Labels and Number sections for `axis`. */
|
|
4
4
|
export declare function axisOptions(axis: ChartFormatAxisView): ChartFormatSection[];
|
|
5
|
-
//# sourceMappingURL=format-pane-axis.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
|
|
@@ -13,3 +13,4 @@ export declare function gradientFields(prefix: string, gradient: ChartGradientFi
|
|
|
13
13
|
export declare function patternFields(pattern: NonNullable<ChartFormatFillView['pattern']>, presets: readonly ChartFormatChoice[]): ChartFormatField[];
|
|
14
14
|
/** Picture source, transparency and tiling of a picture fill. */
|
|
15
15
|
export declare function pictureFields(picture: ChartFormatFillView['picture']): ChartFormatField[];
|
|
16
|
+
//# sourceMappingURL=format-pane-fill-kinds.d.ts.map
|
|
@@ -20,4 +20,3 @@ export declare function chartFormatSourceTabs(source: ChartFormatSource, target:
|
|
|
20
20
|
* the mode's first tab. A `flat` source gets every chart section on one page.
|
|
21
21
|
*/
|
|
22
22
|
export declare function buildChartFormatModel(source: ChartFormatSource, targetKey: string | undefined, tab?: ChartFormatTabId, mode?: ChartFormatPaneMode): ChartFormatPaneModel;
|
|
23
|
-
//# sourceMappingURL=format-pane-model.d.ts.map
|
|
@@ -11,4 +11,3 @@ type OptionsSource = Pick<ChartFormatSource, 'seriesOptions' | 'axisOptions' | '
|
|
|
11
11
|
/** The Options tab's sections for `target`, or `undefined` when the target has no options. */
|
|
12
12
|
export declare function optionsSections(source: OptionsSource, target: ChartFormatTarget): ChartFormatSection[] | undefined;
|
|
13
13
|
export {};
|
|
14
|
-
//# sourceMappingURL=format-pane-options.d.ts.map
|
|
@@ -19,3 +19,4 @@ export interface ChartSpaceFormatSourceOptions {
|
|
|
19
19
|
}
|
|
20
20
|
/** The Format pane source of `space`. */
|
|
21
21
|
export declare function chartSpaceFormatSource(space: ChartSpace, options?: ChartSpaceFormatSourceOptions): ChartFormatSource;
|
|
22
|
+
//# sourceMappingURL=format-pane-space.d.ts.map
|
|
@@ -22,3 +22,4 @@ export declare function chartFormatPaneTitle(target: ChartFormatTarget): ChartFo
|
|
|
22
22
|
export declare function chartFormatTargetOptions(targets: readonly ChartFormatTarget[], describe: ChartFormatDescribe): ChartFormatTargetOption[];
|
|
23
23
|
/** The chart area entry, what a stale or missing key falls back to. */
|
|
24
24
|
export declare const CHART_AREA_TARGET: ChartFormatTargetOption;
|
|
25
|
+
//# sourceMappingURL=format-pane-targets.d.ts.map
|
|
@@ -40,4 +40,3 @@ export interface CloudFilesViewModel {
|
|
|
40
40
|
export declare function renderSignedOut(vm: CloudFilesViewModel, provider: CloudFileProvider): import("lit").TemplateResult<1>;
|
|
41
41
|
/** The signed-in browser: toolbar, optional link field, breadcrumb, listing and open status. */
|
|
42
42
|
export declare function renderBrowser(vm: CloudFilesViewModel, provider: CloudFileProvider, account: CloudAccount): import("lit").TemplateResult<1>;
|
|
43
|
-
//# sourceMappingURL=cloud-files-view.d.ts.map
|
package/dist/fonts/webfonts.d.ts
CHANGED
|
@@ -41,3 +41,4 @@ export declare const OFFICE_COLOR_SWATCHES: readonly OfficeColorSwatch[];
|
|
|
41
41
|
export declare const OFFICE_COLOR_SWATCH_HEXES: readonly string[];
|
|
42
42
|
/** A standard swatch's name in the viewer's locale (English without a translator or a key). */
|
|
43
43
|
export declare function officeColorSwatchLabel(swatch: OfficeColorSwatch, translate?: Translate): string;
|
|
44
|
+
//# sourceMappingURL=color-swatches.d.ts.map
|
|
@@ -40,4 +40,3 @@ export declare function probeNativeImageSize(src: string): Promise<NativeImageSi
|
|
|
40
40
|
export declare function clearNativeImageSizeCache(): void;
|
|
41
41
|
/** Test-only compatibility alias. */
|
|
42
42
|
export declare function _resetNativeImageSizeCacheForTests(): void;
|
|
43
|
-
//# sourceMappingURL=image-native-size.d.ts.map
|
package/dist/picture-pixels.d.ts
CHANGED
|
@@ -8,4 +8,3 @@ export declare const needsPicturePixels: (effects: readonly DrawingPictureEffect
|
|
|
8
8
|
export declare function cachedPicturePixels(url: string, effects: readonly DrawingPictureEffect[], scheme?: Readonly<Record<string, string>>): PicturePixelImage | undefined;
|
|
9
9
|
/** Rasterize nonlinear stages in order, flattening preceding SVG effects before each pixel stage. */
|
|
10
10
|
export declare function probePicturePixels(doc: Document, url: string, effects: readonly DrawingPictureEffect[], scheme?: Readonly<Record<string, string>>): Promise<PicturePixelImage | undefined>;
|
|
11
|
-
//# sourceMappingURL=picture-pixels.d.ts.map
|
|
@@ -788,6 +788,14 @@ function removeUnsupportedFeatures(root) {
|
|
|
788
788
|
htmlEl.style.setProperty("-webkit-text-stroke", "0");
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
+
const contain = computed.getPropertyValue("contain").trim();
|
|
792
|
+
if (contain && contain !== "none" && /\s/.test(contain)) {
|
|
793
|
+
const keywords = contain.split(/\s+/);
|
|
794
|
+
htmlEl.style.setProperty("contain", keywords.includes("paint") ? "paint" : keywords[0]);
|
|
795
|
+
}
|
|
796
|
+
if (computed.getPropertyValue("will-change").includes(",")) {
|
|
797
|
+
htmlEl.style.setProperty("will-change", "auto");
|
|
798
|
+
}
|
|
791
799
|
};
|
|
792
800
|
clean(root);
|
|
793
801
|
elements.forEach(clean);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkW5ZQPPB5_cjs = require('./chunk-W5ZQPPB5.cjs');
|
|
4
4
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
5
5
|
var chunkHTFYAGHG_cjs = require('./chunk-HTFYAGHG.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunk2FKBWWSS_cjs = require('./chunk-2FKBWWSS.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(chunk2FKBWWSS_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
|
+
chunk2FKBWWSS_cjs.defineThreeViewElement(doc.defaultView?.customElements);
|
|
96
|
+
const view = takeReusableThreeView(options.spec) ?? doc.createElement(chunk2FKBWWSS_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
|
+
chunkW5ZQPPB5_cjs.THREE_VIEW_EVENTS.select,
|
|
149
|
+
(event) => chunkW5ZQPPB5_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
150
150
|
{ signal: listeners.signal }
|
|
151
151
|
);
|
|
152
152
|
view.addEventListener(
|
|
153
|
-
|
|
154
|
-
(event) =>
|
|
153
|
+
chunkW5ZQPPB5_cjs.THREE_VIEW_EVENTS.drag,
|
|
154
|
+
(event) => chunkW5ZQPPB5_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(chunk2FKBWWSS_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 ? chunkW5ZQPPB5_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(chunkW5ZQPPB5_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(chunkW5ZQPPB5_cjs.SMARTART_3D_EDIT_LAYER_ATTRIBUTE, "true");
|
|
182
|
+
chunkW5ZQPPB5_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
|
+
chunkW5ZQPPB5_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(`[${chunkW5ZQPPB5_cjs.SMARTART_3D_EDIT_LAYER_ATTRIBUTE}]`) !== null && !chunkW5ZQPPB5_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 ? chunkW5ZQPPB5_cjs.measureSvgViewportRect(textNode) : null;
|
|
226
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkW5ZQPPB5_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 = chunkW5ZQPPB5_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 = chunkW5ZQPPB5_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 chunkW5ZQPPB5_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 = chunkW5ZQPPB5_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 = chunkW5ZQPPB5_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
|
+
chunkW5ZQPPB5_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", chunkW5ZQPPB5_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 = chunkW5ZQPPB5_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 } = chunkW5ZQPPB5_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 = chunkW5ZQPPB5_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
523
523
|
chrome.appendChild(
|
|
524
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
524
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkW5ZQPPB5_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 = chunkW5ZQPPB5_cjs.computeSmartArtElementLayout(
|
|
532
532
|
data,
|
|
533
533
|
revealedNodes,
|
|
534
534
|
{ width: element.width, height: element.height },
|
|
535
|
-
|
|
535
|
+
chunkW5ZQPPB5_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
|
+
chunkW5ZQPPB5_cjs.buildSmartArtA11y(data).nodes,
|
|
544
|
+
chunkW5ZQPPB5_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 = chunkW5ZQPPB5_cjs.computeDrawingViewBox(allShapes);
|
|
568
|
+
const rendered = chunkW5ZQPPB5_cjs.projectDrawingShapes(
|
|
569
569
|
elementId,
|
|
570
570
|
revealedShapes,
|
|
571
571
|
viewBox,
|
|
572
|
-
|
|
572
|
+
chunkW5ZQPPB5_cjs.resolvePalette(data),
|
|
573
573
|
style
|
|
574
574
|
);
|
|
575
|
-
const shadow =
|
|
575
|
+
const shadow = chunkW5ZQPPB5_cjs.styleShadowFilter(style);
|
|
576
576
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
577
|
-
const nodeIds =
|
|
577
|
+
const nodeIds = chunkW5ZQPPB5_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) => chunkW5ZQPPB5_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 / chunkW5ZQPPB5_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH,
|
|
711
|
+
size.height / chunkW5ZQPPB5_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(chunkW5ZQPPB5_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH * scale)}px`,
|
|
715
|
+
height: `${Math.round(chunkW5ZQPPB5_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: `${chunkW5ZQPPB5_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH}px`,
|
|
723
|
+
height: `${chunkW5ZQPPB5_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 = chunkW5ZQPPB5_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: chunkW5ZQPPB5_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH, height: chunkW5ZQPPB5_cjs.SMARTART_PREVIEW_ELEMENT_HEIGHT },
|
|
740
740
|
scale: 1,
|
|
741
741
|
mediaDataUrls: /* @__PURE__ */ new Map(),
|
|
742
742
|
t,
|
|
@@ -15,7 +15,7 @@ import { animationPresetLabelKey } from './chunk-T7FRLIDM.mjs';
|
|
|
15
15
|
import { OOXML_PATTERN_PRESETS, resolveChartKind, buildChartViewModel, withResolvedPalette, computeHistogramBins, orderParetoEntries, cumulativePercentOfTotal, outlinePathData, getResolvedShapeClipPath, usesSilhouetteEffects, resolveBaseShapeGeometry, silhouetteFillsLayer, resolveComputedFill, getComputedFillStyle, getComputedStrokeStyle, getCompositeOuterShadowFilterCss, buildStrokeOutline, escapeSvgAttr, setBoundedRenderCache, registerGroupChildren, DEFAULT_BODY_INSET_LR_PX, getTextCompensationTransform, parseDrawingPercent, clampUnitInterval, getComputedEffectStyle, DEFAULT_FONT_FAMILY, normalizeHexColor, DEFAULT_TEXT_FONT_SIZE, applyParetoConversion, chartGridlinesPatch, computeChartLegendLayout, chartAxisIndex, chartPlotBounds, HYPERLINK_COLOR, getPatternSvg, clampCropValue, buildRectPathGradientImage, glowFilterLengths, DEFAULT_TEXT_COLOR, DEFAULT_BODY_INSET_TB_PX, getResolvedShapeClipPathFor, snapPlacement, isDashedStroke, DEFAULT_STROKE_COLOR, buildDashArray, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, connectorKind, normalizeArrow, markerPath, connectorSquareCapPath, wrapTextByEstimatedWidth, getPresetShapeVectorGeometry, getPptxRenderCacheEpoch, invalidatePptxRenderCacheEpoch, clearBarFacePicturePixelCache, silhouetteMorphEntry, MORPH_PROGRESS_VAR, buildSilhouetteFilterMarkup, isSeriesOnSecondaryAxis, hexToRgbUnit, chartGridlinesState, chartTextBox, getOuterShadowCss, straddlingStrokeWidth, outlineStrokeJoin, outsetClipPathForStroke, resolveLiveCustomGeometryPath, TEXT_SHADOW_BLUR_TO_CSS, colorWithOpacity as colorWithOpacity$1, getPatternTile, getTextReflectionWrapperStyle, connectorNeedsPath, silhouetteFillsOverlay, buildSubpathFillOverlay, DEFAULT_BAR_GAP_WIDTH, axisTickValues, buildGradientCss, compoundStrandPath, estimateTextWidth, formatAxisValueWithUnits, getSilhouetteEffectParams, registerSilhouetteMorph, resolveOuterShadowLayers, resolveGlow, resolveInnerShadow, flattenPath } from './chunk-XL5AF4U3.mjs';
|
|
16
16
|
import { tiltChannelsFromVectors, buildInkStrokeView } from './chunk-IB6ZM2E2.mjs';
|
|
17
17
|
import { hasPressureVariation, resolveInkOpacity } from './chunk-JA7WYSRE.mjs';
|
|
18
|
-
import { settleThreeViews, snapshotThreeViewsIntoClone, prepareExportClone } from './chunk-
|
|
18
|
+
import { settleThreeViews, snapshotThreeViewsIntoClone, prepareExportClone } from './chunk-XLSW7WM3.mjs';
|
|
19
19
|
import { screenBorder, snappedStrokeTransform, withAuthoredStrokeWidths } from './chunk-G5NEBI7N.mjs';
|
|
20
20
|
import { sanitizeMarkupOrEmpty, getCommentMarkerPosition, validatePrintSettings, computeSlideIndices, filterHiddenSlideIndices, buildOutlineHtml, buildPrintHtmlDocument, computeColorFilter, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml } from './chunk-5VSUIPDX.mjs';
|
|
21
21
|
import { A4_PORTRAIT } from './chunk-WHUMPYEM.mjs';
|
|
@@ -35772,7 +35772,7 @@ function conflictingMorphNames(a, b) {
|
|
|
35772
35772
|
}
|
|
35773
35773
|
function mediaIdentity(el) {
|
|
35774
35774
|
const props = el;
|
|
35775
|
-
return props.
|
|
35775
|
+
return props.svgPath ?? props.svgData ?? props.imagePath ?? props.imageData ?? void 0;
|
|
35776
35776
|
}
|
|
35777
35777
|
function centreDistance(a, b) {
|
|
35778
35778
|
const dx = a.x - b.x;
|
|
@@ -88457,7 +88457,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
88457
88457
|
if (this.#live || this.#draw) {
|
|
88458
88458
|
return;
|
|
88459
88459
|
}
|
|
88460
|
-
this.#live = import('./smartart-insert-preview-
|
|
88460
|
+
this.#live = import('./smartart-insert-preview-53SDH6T2.mjs').then((module) => {
|
|
88461
88461
|
if (this.#draw || !this.#picker) {
|
|
88462
88462
|
return;
|
|
88463
88463
|
}
|
|
@@ -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-BZ3RLZ7P.mjs';
|
|
2
2
|
import { canDrillDown } from './chunk-FUKVYJPM.mjs';
|
|
3
3
|
import { formatAxisValue } from './chunk-XL5AF4U3.mjs';
|
|
4
|
-
import { THREE_VIEW_TAG, defineThreeViewElement } from './chunk-
|
|
4
|
+
import { THREE_VIEW_TAG, defineThreeViewElement } from './chunk-XLSW7WM3.mjs';
|
|
5
5
|
|
|
6
6
|
// src/pptx/dom/dom.ts
|
|
7
7
|
function toCssPropertyName(key) {
|
|
@@ -17,7 +17,7 @@ var chunkUSBRSEJK_cjs = require('./chunk-USBRSEJK.cjs');
|
|
|
17
17
|
var chunkHTFYAGHG_cjs = require('./chunk-HTFYAGHG.cjs');
|
|
18
18
|
var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
|
|
19
19
|
var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
|
|
20
|
-
var
|
|
20
|
+
var chunk2FKBWWSS_cjs = require('./chunk-2FKBWWSS.cjs');
|
|
21
21
|
var chunkFI2ATACZ_cjs = require('./chunk-FI2ATACZ.cjs');
|
|
22
22
|
var chunk3CYWRMYZ_cjs = require('./chunk-3CYWRMYZ.cjs');
|
|
23
23
|
var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
|
|
@@ -35735,7 +35735,7 @@ function conflictingMorphNames(a, b) {
|
|
|
35735
35735
|
}
|
|
35736
35736
|
function mediaIdentity(el) {
|
|
35737
35737
|
const props = el;
|
|
35738
|
-
return props.
|
|
35738
|
+
return props.svgPath ?? props.svgData ?? props.imagePath ?? props.imageData ?? void 0;
|
|
35739
35739
|
}
|
|
35740
35740
|
function centreDistance(a, b) {
|
|
35741
35741
|
const dx = a.x - b.x;
|
|
@@ -73093,14 +73093,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
|
|
|
73093
73093
|
backgroundColor,
|
|
73094
73094
|
readComputedStyle = (el) => window.getComputedStyle(el)
|
|
73095
73095
|
} = options;
|
|
73096
|
-
await
|
|
73096
|
+
await chunk2FKBWWSS_cjs.settleThreeViews(element);
|
|
73097
73097
|
const clone = element.cloneNode(true);
|
|
73098
73098
|
chunkFI2ATACZ_cjs.withAuthoredStrokeWidths(
|
|
73099
73099
|
element,
|
|
73100
73100
|
() => inlineComputedStylesOnClone(element, clone, readComputedStyle)
|
|
73101
73101
|
);
|
|
73102
|
-
|
|
73103
|
-
|
|
73102
|
+
chunk2FKBWWSS_cjs.snapshotThreeViewsIntoClone(element, clone);
|
|
73103
|
+
chunk2FKBWWSS_cjs.prepareExportClone(clone);
|
|
73104
73104
|
const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
|
|
73105
73105
|
embedImagesOnClone(clone),
|
|
73106
73106
|
collectExternalFontFaceCss(doc, fetchAsDataUrl)
|
|
@@ -88420,7 +88420,7 @@ function definePptxInsertSmartArtDialog(registry2) {
|
|
|
88420
88420
|
if (this.#live || this.#draw) {
|
|
88421
88421
|
return;
|
|
88422
88422
|
}
|
|
88423
|
-
this.#live = import('./smartart-insert-preview-
|
|
88423
|
+
this.#live = import('./smartart-insert-preview-EQY2WQ3J.cjs').then((module) => {
|
|
88424
88424
|
if (this.#draw || !this.#picker) {
|
|
88425
88425
|
return;
|
|
88426
88426
|
}
|
|
@@ -786,6 +786,14 @@ function removeUnsupportedFeatures(root) {
|
|
|
786
786
|
htmlEl.style.setProperty("-webkit-text-stroke", "0");
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
+
const contain = computed.getPropertyValue("contain").trim();
|
|
790
|
+
if (contain && contain !== "none" && /\s/.test(contain)) {
|
|
791
|
+
const keywords = contain.split(/\s+/);
|
|
792
|
+
htmlEl.style.setProperty("contain", keywords.includes("paint") ? "paint" : keywords[0]);
|
|
793
|
+
}
|
|
794
|
+
if (computed.getPropertyValue("will-change").includes(",")) {
|
|
795
|
+
htmlEl.style.setProperty("will-change", "auto");
|
|
796
|
+
}
|
|
789
797
|
};
|
|
790
798
|
clean(root);
|
|
791
799
|
elements.forEach(clean);
|