ooxml-ui 1.47.0 → 1.48.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/dist/chart/format-pane-axis.d.ts +0 -1
- package/dist/chart/format-pane-effects.d.ts +1 -0
- 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-space.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/form/color-input/live-color-input.d.ts +0 -1
- package/dist/form/color-swatches.d.ts +1 -0
- package/dist/form/range-control.d.ts +0 -1
- package/dist/picture-artistic-filters.d.ts +1 -0
- package/dist/pptx/{chunk-6XIUBQPL.cjs → chunk-2C2C27ML.cjs} +2 -2
- package/dist/pptx/{chunk-BV24XNBQ.mjs → chunk-C4GZLKDW.mjs} +2 -2
- package/dist/pptx/{chunk-XMAQ23WE.mjs → chunk-JUEKQZSB.mjs} +1 -1
- package/dist/pptx/{chunk-JHI42PNB.cjs → chunk-N5WPJIMK.cjs} +42 -42
- package/dist/pptx/dom/index.cjs +370 -370
- package/dist/pptx/dom/index.mjs +4 -4
- package/dist/pptx/index.cjs +3065 -3065
- package/dist/pptx/index.mjs +1 -1
- 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-GE47FXVT.cjs → smartart-insert-preview-3BLHZGCE.cjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-WY6DHSAJ.mjs → smartart-insert-preview-WRSYENYB.mjs} +2 -2
- package/dist/render-cache.d.ts +0 -1
- package/dist/theme.d.ts +0 -1
- package/package.json +2 -2
|
@@ -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
|
|
@@ -22,3 +22,4 @@ export declare function glowSection(prefix: string, glow: Effects['glow']): Char
|
|
|
22
22
|
/** The Effects tab's sections. */
|
|
23
23
|
export declare function effectsSections(view: ChartFormatElementView): ChartFormatSection[];
|
|
24
24
|
export {};
|
|
25
|
+
//# sourceMappingURL=format-pane-effects.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
|
|
@@ -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
|
|
@@ -90,4 +90,3 @@ export declare function createLiveColorInput<T, P extends object>(options: LiveC
|
|
|
90
90
|
* value the input shows. Any other event, or an input without a value, is ignored.
|
|
91
91
|
*/
|
|
92
92
|
export declare function handleLiveColorEvent(control: LiveColorInput, event: Event): void;
|
|
93
|
-
//# sourceMappingURL=live-color-input.d.ts.map
|
|
@@ -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
|
|
@@ -11,4 +11,3 @@ export interface RangeControlOptions {
|
|
|
11
11
|
}
|
|
12
12
|
/** Native keyboard, pointer and accessibility behavior shared by Office range controls. */
|
|
13
13
|
export declare function rangeControl(options: RangeControlOptions): import("lit").TemplateResult<1>;
|
|
14
|
-
//# sourceMappingURL=range-control.d.ts.map
|
|
@@ -6,3 +6,4 @@
|
|
|
6
6
|
export declare function buildArtisticFilterMarkup(effectName: string, radius: number): string | undefined;
|
|
7
7
|
export declare function buildSimpleArtisticCss(effect: string, radius: number): string;
|
|
8
8
|
export declare const ARTISTIC_PREVIEW_EFFECTS: Set<string>;
|
|
9
|
+
//# sourceMappingURL=picture-artistic-filters.d.ts.map
|
|
@@ -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;
|
|
@@ -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-3BLHZGCE.cjs').then((module) => {
|
|
88424
88424
|
if (this.#draw || !this.#picker) {
|
|
88425
88425
|
return;
|
|
88426
88426
|
}
|
|
@@ -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-WRSYENYB.mjs').then((module) => {
|
|
88461
88461
|
if (this.#draw || !this.#picker) {
|
|
88462
88462
|
return;
|
|
88463
88463
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
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-C4GZLKDW.mjs';
|
|
2
2
|
import { canDrillDown } from './chunk-FUKVYJPM.mjs';
|
|
3
3
|
import { formatAxisValue } from './chunk-XL5AF4U3.mjs';
|
|
4
4
|
import { THREE_VIEW_TAG, defineThreeViewElement } from './chunk-S6P7UWGZ.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk2C2C27ML_cjs = require('./chunk-2C2C27ML.cjs');
|
|
4
4
|
var chunkCWWL7MCL_cjs = require('./chunk-CWWL7MCL.cjs');
|
|
5
5
|
var chunkHTFYAGHG_cjs = require('./chunk-HTFYAGHG.cjs');
|
|
6
6
|
var chunkGYI2TFSW_cjs = require('./chunk-GYI2TFSW.cjs');
|
|
@@ -145,13 +145,13 @@ 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
|
+
chunk2C2C27ML_cjs.THREE_VIEW_EVENTS.select,
|
|
149
|
+
(event) => chunk2C2C27ML_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
150
150
|
{ signal: listeners.signal }
|
|
151
151
|
);
|
|
152
152
|
view.addEventListener(
|
|
153
|
-
|
|
154
|
-
(event) =>
|
|
153
|
+
chunk2C2C27ML_cjs.THREE_VIEW_EVENTS.drag,
|
|
154
|
+
(event) => chunk2C2C27ML_cjs.applyChart3DDrag(bridge, event.detail),
|
|
155
155
|
{ signal: listeners.signal }
|
|
156
156
|
);
|
|
157
157
|
}
|
|
@@ -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 ? chunk2C2C27ML_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(chunk2C2C27ML_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(chunk2C2C27ML_cjs.SMARTART_3D_EDIT_LAYER_ATTRIBUTE, "true");
|
|
182
|
+
chunk2C2C27ML_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
|
+
chunk2C2C27ML_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(`[${chunk2C2C27ML_cjs.SMARTART_3D_EDIT_LAYER_ATTRIBUTE}]`) !== null && !chunk2C2C27ML_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 ? chunk2C2C27ML_cjs.measureSvgViewportRect(textNode) : null;
|
|
226
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunk2C2C27ML_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 = chunk2C2C27ML_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 = chunk2C2C27ML_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 chunk2C2C27ML_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 = chunk2C2C27ML_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 = chunk2C2C27ML_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
|
+
chunk2C2C27ML_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", chunk2C2C27ML_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 = chunk2C2C27ML_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 } = chunk2C2C27ML_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 = chunk2C2C27ML_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
523
523
|
chrome.appendChild(
|
|
524
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
524
|
+
buildDrawingShapesSvg(doc, element.id, data, chunk2C2C27ML_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 = chunk2C2C27ML_cjs.computeSmartArtElementLayout(
|
|
532
532
|
data,
|
|
533
533
|
revealedNodes,
|
|
534
534
|
{ width: element.width, height: element.height },
|
|
535
|
-
|
|
535
|
+
chunk2C2C27ML_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
|
+
chunk2C2C27ML_cjs.buildSmartArtA11y(data).nodes,
|
|
544
|
+
chunk2C2C27ML_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 = chunk2C2C27ML_cjs.computeDrawingViewBox(allShapes);
|
|
568
|
+
const rendered = chunk2C2C27ML_cjs.projectDrawingShapes(
|
|
569
569
|
elementId,
|
|
570
570
|
revealedShapes,
|
|
571
571
|
viewBox,
|
|
572
|
-
|
|
572
|
+
chunk2C2C27ML_cjs.resolvePalette(data),
|
|
573
573
|
style
|
|
574
574
|
);
|
|
575
|
-
const shadow =
|
|
575
|
+
const shadow = chunk2C2C27ML_cjs.styleShadowFilter(style);
|
|
576
576
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
577
|
-
const nodeIds =
|
|
577
|
+
const nodeIds = chunk2C2C27ML_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) => chunk2C2C27ML_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 / chunk2C2C27ML_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH,
|
|
711
|
+
size.height / chunk2C2C27ML_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(chunk2C2C27ML_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH * scale)}px`,
|
|
715
|
+
height: `${Math.round(chunk2C2C27ML_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: `${chunk2C2C27ML_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH}px`,
|
|
723
|
+
height: `${chunk2C2C27ML_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 = chunk2C2C27ML_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: chunk2C2C27ML_cjs.SMARTART_PREVIEW_ELEMENT_WIDTH, height: chunk2C2C27ML_cjs.SMARTART_PREVIEW_ELEMENT_HEIGHT },
|
|
740
740
|
scale: 1,
|
|
741
741
|
mediaDataUrls: /* @__PURE__ */ new Map(),
|
|
742
742
|
t,
|