ooxml-ui 1.4.0 → 1.5.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 +2 -0
- package/dist/{chunk-NYRRH2MD.js → chunk-6YEWVS7I.js} +1 -1
- package/dist/{chunk-56A2JK63.js → chunk-BCH2ZLWI.js} +1 -1
- package/dist/{chunk-IY7QJLQG.js → chunk-CXOK5QWQ.js} +1 -1
- package/dist/{chunk-TWQ45BFL.js → chunk-FN3MBKHE.js} +1 -1
- package/dist/{chunk-BOIZWKM7.js → chunk-J2WUY2Q4.js} +7 -5
- package/dist/{chunk-2WLRFPMW.js → chunk-SPNWHKSR.js} +2 -0
- package/dist/{chunk-R3LV6SGC.js → chunk-V5P7RPMN.js} +5 -5
- package/dist/{chunk-L4XGRNHF.js → chunk-YNGNCKBE.js} +4 -4
- package/dist/clipboard-worker.js +1 -0
- package/dist/controls.js +4 -4
- package/dist/docx.js +6 -6
- package/dist/index.js +8 -8
- package/dist/pptx/{chunk-KRMMJUCO.cjs → chunk-7DMJEYQJ.cjs} +13 -5
- package/dist/pptx/{chunk-TC7HCF5M.mjs → chunk-LHNTMJSK.mjs} +13 -5
- package/dist/pptx/{chunk-MWHGUEIJ.mjs → chunk-LQLOD3HL.mjs} +150 -41
- package/dist/pptx/{chunk-FPE5PZMI.cjs → chunk-O2TZQM65.cjs} +168 -50
- package/dist/pptx/dom/elements/table-editable.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +238 -207
- package/dist/pptx/dom/index.mjs +41 -10
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +2762 -2726
- package/dist/pptx/index.mjs +2 -2
- package/dist/pptx/render/device-pixel-stroke.d.ts +10 -3
- package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/morph-heuristics.d.ts.map +1 -1
- package/dist/pptx/render/morph-matching.d.ts.map +1 -1
- package/dist/pptx/render/morph-predicates.d.ts +21 -0
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-spacing.d.ts +21 -0
- package/dist/pptx/render/paragraph-spacing.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -1
- package/dist/pptx/render/table-resize-merge.d.ts +59 -0
- package/dist/pptx/render/table-resize-merge.d.ts.map +1 -0
- package/dist/pptx/render/table-style.d.ts +6 -0
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/render/text-paragraphs.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/ribbon/overflow.d.ts.map +1 -1
- package/dist/smartart.js +3 -3
- package/dist/teams.js +6 -6
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +2 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/shapes-window.d.ts +16 -5
- package/dist/visio/viewer-draw-tool.d.ts +11 -1
- package/dist/visio/viewer-stencil.d.ts +1 -1
- package/dist/visio.js +49 -41
- package/dist/xlsx.js +11 -10
- package/package.json +2 -2
|
@@ -15,7 +15,7 @@ var chunkW3X2UVYQ_cjs = require('./chunk-W3X2UVYQ.cjs');
|
|
|
15
15
|
var chunkIURZJAWP_cjs = require('./chunk-IURZJAWP.cjs');
|
|
16
16
|
var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
|
|
17
17
|
var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
|
|
18
|
-
var
|
|
18
|
+
var chunk7DMJEYQJ_cjs = require('./chunk-7DMJEYQJ.cjs');
|
|
19
19
|
var chunkX4FNVH7J_cjs = require('./chunk-X4FNVH7J.cjs');
|
|
20
20
|
var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
|
|
21
21
|
var chunkY4LTLCQP_cjs = require('./chunk-Y4LTLCQP.cjs');
|
|
@@ -1278,12 +1278,12 @@ function getPresetShapeVectorGeometry(shapeType, width, height, adjustments) {
|
|
|
1278
1278
|
function outlineStrands(compoundLine, strokeWidth) {
|
|
1279
1279
|
const offsets2 = getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
1280
1280
|
if (offsets2.length <= 1) {
|
|
1281
|
-
return [{ strokeWidth, cssStrokeWidth:
|
|
1281
|
+
return [{ strokeWidth, cssStrokeWidth: chunk7DMJEYQJ_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
|
|
1282
1282
|
}
|
|
1283
1283
|
const widths = getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1284
1284
|
return offsets2.map((offset, idx) => {
|
|
1285
1285
|
const width = widths[idx] ?? strokeWidth;
|
|
1286
|
-
return { strokeWidth: width, cssStrokeWidth:
|
|
1286
|
+
return { strokeWidth: width, cssStrokeWidth: chunk7DMJEYQJ_cjs.screenStrokeWidth(width), offset };
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
function needsCenteredStrokeOverlay(element, style, declaredWidth) {
|
|
@@ -1511,10 +1511,10 @@ function getComputedStrokeStyle(element) {
|
|
|
1511
1511
|
const borderColor = style.strokeOpacity === void 0 ? rawColor : chunkIURZJAWP_cjs.colorWithOpacity(chunkIURZJAWP_cjs.normalizeHexColor(rawColor, chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
|
|
1512
1512
|
return {
|
|
1513
1513
|
borderWidth,
|
|
1514
|
-
cssBorderWidth:
|
|
1514
|
+
cssBorderWidth: chunk7DMJEYQJ_cjs.screenStrokeWidth(borderWidth),
|
|
1515
1515
|
borderStyle,
|
|
1516
1516
|
borderColor,
|
|
1517
|
-
border:
|
|
1517
|
+
border: chunk7DMJEYQJ_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
|
|
1518
1518
|
...joins
|
|
1519
1519
|
};
|
|
1520
1520
|
}
|
|
@@ -19550,7 +19550,7 @@ function borderToCss(border2, resolve) {
|
|
|
19550
19550
|
const width = border2.width ?? 1;
|
|
19551
19551
|
const dash = ooxmlDashToCssBorderStyle(border2.dash);
|
|
19552
19552
|
const color = border2.color ?? resolve(border2.fill) ?? "#000000";
|
|
19553
|
-
return
|
|
19553
|
+
return chunk7DMJEYQJ_cjs.screenBorder(width, dash, color);
|
|
19554
19554
|
}
|
|
19555
19555
|
function collectSections(entry5, tableData, pos) {
|
|
19556
19556
|
const { rowIndex, cellIndex, rowCount, columnCount } = pos;
|
|
@@ -20799,6 +20799,9 @@ function cellRunStyle(run) {
|
|
|
20799
20799
|
if (run.fontFamily) {
|
|
20800
20800
|
css.fontFamily = run.fontFamily;
|
|
20801
20801
|
}
|
|
20802
|
+
if (run.lineHeight !== void 0) {
|
|
20803
|
+
css.lineHeight = run.lineHeight;
|
|
20804
|
+
}
|
|
20802
20805
|
const shift = run.baseline ? run.baseline > 0 ? "super" : "sub" : void 0;
|
|
20803
20806
|
if (typeof run.fontSize === "number") {
|
|
20804
20807
|
css.fontSize = `${run.fontSize * (shift ? BASELINE_FONT_SCALE : 1)}pt`;
|
|
@@ -21006,7 +21009,7 @@ function cellStyleToCss(style) {
|
|
|
21006
21009
|
const w = edge.width ?? 1;
|
|
21007
21010
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
21008
21011
|
const s = ooxmlDashToCssBorderStyle(edge.dash);
|
|
21009
|
-
css[edge.prefix] =
|
|
21012
|
+
css[edge.prefix] = chunk7DMJEYQJ_cjs.screenBorder(w, s, c);
|
|
21010
21013
|
}
|
|
21011
21014
|
}
|
|
21012
21015
|
Object.assign(css, cellPaddingCss(style));
|
|
@@ -21235,6 +21238,7 @@ function tableCellCss(tableData, cell, position, context, base2) {
|
|
|
21235
21238
|
|
|
21236
21239
|
// src/pptx/render/paragraph-spacing.ts
|
|
21237
21240
|
var PT_TO_PX = 96 / 72;
|
|
21241
|
+
var FIXED_SPACING_RUN_LINE_HEIGHT = 0;
|
|
21238
21242
|
function resolveParagraphSpacing(input) {
|
|
21239
21243
|
const {
|
|
21240
21244
|
paraProps,
|
|
@@ -21259,6 +21263,7 @@ function resolveParagraphSpacing(input) {
|
|
|
21259
21263
|
const multiplier = lineSource?.lineSpacing;
|
|
21260
21264
|
if (typeof exactPt === "number" && exactPt > 0) {
|
|
21261
21265
|
out.lineHeight = `${exactPt * PT_TO_PX}px`;
|
|
21266
|
+
out.runLineHeight = FIXED_SPACING_RUN_LINE_HEIGHT;
|
|
21262
21267
|
} else if (typeof multiplier === "number" && multiplier > 0) {
|
|
21263
21268
|
const proportional = proportionalLineHeight(multiplier, bodyStyle?.compatibleLineSpacing);
|
|
21264
21269
|
out.lineHeight = typeof lineSpacingReduction === "number" && lineSpacingReduction > 0 ? proportional * (1 - lineSpacingReduction) : proportional;
|
|
@@ -21361,7 +21366,7 @@ function paragraphLayoutCss(paragraph2, followsCell, isFirst, isLast) {
|
|
|
21361
21366
|
if (spacing.spaceAfterPx !== void 0) {
|
|
21362
21367
|
css.marginBlockEnd = `${spacing.spaceAfterPx}px`;
|
|
21363
21368
|
}
|
|
21364
|
-
return css;
|
|
21369
|
+
return spacing.runLineHeight === void 0 ? { css } : { css, runLineHeight: spacing.runLineHeight };
|
|
21365
21370
|
}
|
|
21366
21371
|
function alignOf(paragraph2) {
|
|
21367
21372
|
return paragraph2?.align ?? "left";
|
|
@@ -21371,7 +21376,7 @@ function followsCellAlign(cell, paragraph2, first) {
|
|
|
21371
21376
|
}
|
|
21372
21377
|
function needsBlocks(paragraphs2, follows, layouts) {
|
|
21373
21378
|
return follows.some(
|
|
21374
|
-
(followsCell, index) => !followsCell || paragraphs2[index]?.rtl === true || layouts[index].marginInlineStart !== void 0 || layouts[index].textIndent !== void 0 || layouts[index].marginBlockEnd !== void 0 || layouts[index].lineHeight !== void 0 && layouts[index].lineHeight !== DEFAULT_LINE_HEIGHT
|
|
21379
|
+
(followsCell, index) => !followsCell || paragraphs2[index]?.rtl === true || layouts[index].css.marginInlineStart !== void 0 || layouts[index].css.textIndent !== void 0 || layouts[index].css.marginBlockEnd !== void 0 || layouts[index].css.lineHeight !== void 0 && layouts[index].css.lineHeight !== DEFAULT_LINE_HEIGHT
|
|
21375
21380
|
);
|
|
21376
21381
|
}
|
|
21377
21382
|
function cellParagraphBlocks(cell) {
|
|
@@ -21391,7 +21396,7 @@ function cellParagraphBlocks(cell) {
|
|
|
21391
21396
|
return void 0;
|
|
21392
21397
|
}
|
|
21393
21398
|
return groups.map((group, index) => {
|
|
21394
|
-
const css = layouts[index];
|
|
21399
|
+
const { css, runLineHeight } = layouts[index];
|
|
21395
21400
|
const hasContent = group.some((run) => run.text !== "" || run.isLineBreak);
|
|
21396
21401
|
if (!hasContent) {
|
|
21397
21402
|
const endPt = paragraphs2[index]?.endParaFontSize;
|
|
@@ -21404,7 +21409,8 @@ function cellParagraphBlocks(cell) {
|
|
|
21404
21409
|
if (strutPt !== void 0) {
|
|
21405
21410
|
css.fontSize = `${strutPt}pt`;
|
|
21406
21411
|
}
|
|
21407
|
-
|
|
21412
|
+
const runs2 = runLineHeight === void 0 ? group : group.map((run) => ({ ...run, lineHeight: runLineHeight }));
|
|
21413
|
+
return { css, runs: runs2 };
|
|
21408
21414
|
});
|
|
21409
21415
|
}
|
|
21410
21416
|
|
|
@@ -21626,6 +21632,93 @@ function evenRowHeights(rows) {
|
|
|
21626
21632
|
const avg = Math.round(rows.reduce((s, r) => s + (r.height ?? DEFAULT_ROW_HEIGHT), 0) / count);
|
|
21627
21633
|
return rows.map((r) => ({ ...r, height: avg }));
|
|
21628
21634
|
}
|
|
21635
|
+
|
|
21636
|
+
// src/pptx/render/table-resize-merge.ts
|
|
21637
|
+
function computeTableMergeCrossings(rows, columnCount) {
|
|
21638
|
+
const rowCount = rows.length;
|
|
21639
|
+
const rowCrossings = Array.from(
|
|
21640
|
+
{ length: Math.max(0, rowCount - 1) },
|
|
21641
|
+
() => Array.from({ length: columnCount }, () => false)
|
|
21642
|
+
);
|
|
21643
|
+
const columnCrossings = Array.from(
|
|
21644
|
+
{ length: Math.max(0, columnCount - 1) },
|
|
21645
|
+
() => Array.from({ length: rowCount }, () => false)
|
|
21646
|
+
);
|
|
21647
|
+
rows.forEach((row, r) => {
|
|
21648
|
+
row.cells.forEach((cell, c) => {
|
|
21649
|
+
if (cell.hMerge || cell.vMerge) {
|
|
21650
|
+
return;
|
|
21651
|
+
}
|
|
21652
|
+
const rowEnd = Math.min(rowCount, r + Math.max(1, cell.rowSpan ?? 1)) - 1;
|
|
21653
|
+
const colEnd = Math.min(columnCount, c + Math.max(1, cell.gridSpan ?? 1)) - 1;
|
|
21654
|
+
for (let rr = r; rr <= rowEnd; rr++) {
|
|
21655
|
+
for (let cc = c; cc <= colEnd; cc++) {
|
|
21656
|
+
if (rr < rowEnd) {
|
|
21657
|
+
rowCrossings[rr][cc] = true;
|
|
21658
|
+
}
|
|
21659
|
+
if (cc < colEnd) {
|
|
21660
|
+
columnCrossings[cc][rr] = true;
|
|
21661
|
+
}
|
|
21662
|
+
}
|
|
21663
|
+
}
|
|
21664
|
+
});
|
|
21665
|
+
});
|
|
21666
|
+
return { rows: rowCrossings, columns: columnCrossings };
|
|
21667
|
+
}
|
|
21668
|
+
function openBoundaryRuns(crossed) {
|
|
21669
|
+
const runs = [];
|
|
21670
|
+
let start = -1;
|
|
21671
|
+
crossed.forEach((isCrossed, i) => {
|
|
21672
|
+
if (!isCrossed && start < 0) {
|
|
21673
|
+
start = i;
|
|
21674
|
+
} else if (isCrossed && start >= 0) {
|
|
21675
|
+
runs.push({ start, end: i - 1 });
|
|
21676
|
+
start = -1;
|
|
21677
|
+
}
|
|
21678
|
+
});
|
|
21679
|
+
if (start >= 0) {
|
|
21680
|
+
runs.push({ start, end: crossed.length - 1 });
|
|
21681
|
+
}
|
|
21682
|
+
return runs;
|
|
21683
|
+
}
|
|
21684
|
+
function rowHandleSegments(crossed, columnWidths) {
|
|
21685
|
+
const total = columnWidths.reduce((sum, width) => sum + width, 0) || 1;
|
|
21686
|
+
const offset = (index) => columnWidths.slice(0, index).reduce((sum, width) => sum + width, 0) / total * 100;
|
|
21687
|
+
const edges = columnWidths.map((_, i) => crossed[i] === true);
|
|
21688
|
+
return openBoundaryRuns(edges).map(({ start, end }) => {
|
|
21689
|
+
const leftPct = offset(start);
|
|
21690
|
+
return { leftPct, widthPct: offset(end + 1) - leftPct };
|
|
21691
|
+
});
|
|
21692
|
+
}
|
|
21693
|
+
function columnHandleSegments(crossed, rowBounds, tableHeight) {
|
|
21694
|
+
const edges = Array.from({ length: rowBounds.length + 1 }, (_, i) => crossed[i] === true);
|
|
21695
|
+
return openBoundaryRuns(edges).map(({ start, end }) => {
|
|
21696
|
+
const top = start === 0 ? 0 : rowBounds[start - 1] ?? 0;
|
|
21697
|
+
const bottom = rowBounds[end] ?? tableHeight;
|
|
21698
|
+
return { top, height: Math.max(0, bottom - top) };
|
|
21699
|
+
});
|
|
21700
|
+
}
|
|
21701
|
+
function columnIndexAtFraction(columnWidths, fraction) {
|
|
21702
|
+
const total = columnWidths.reduce((sum, width) => sum + width, 0) || 1;
|
|
21703
|
+
let cumulative = 0;
|
|
21704
|
+
for (let i = 0; i < columnWidths.length; i++) {
|
|
21705
|
+
cumulative += columnWidths[i] / total;
|
|
21706
|
+
if (fraction < cumulative) {
|
|
21707
|
+
return i;
|
|
21708
|
+
}
|
|
21709
|
+
}
|
|
21710
|
+
return Math.max(0, columnWidths.length - 1);
|
|
21711
|
+
}
|
|
21712
|
+
function rowIndexAtOffset(rowBounds, offset) {
|
|
21713
|
+
const index = rowBounds.findIndex((bound) => offset < bound);
|
|
21714
|
+
return index < 0 ? rowBounds.length : index;
|
|
21715
|
+
}
|
|
21716
|
+
function isRowBoundaryMergedAt(crossings, boundary, columnWidths, xFraction) {
|
|
21717
|
+
return crossings.rows[boundary]?.[columnIndexAtFraction(columnWidths, xFraction)] === true;
|
|
21718
|
+
}
|
|
21719
|
+
function isColumnBoundaryMergedAt(crossings, boundary, rowBounds, offset) {
|
|
21720
|
+
return crossings.columns[boundary]?.[rowIndexAtOffset(rowBounds, offset)] === true;
|
|
21721
|
+
}
|
|
21629
21722
|
var RESIZE_HANDLES = [
|
|
21630
21723
|
"nw",
|
|
21631
21724
|
"n",
|
|
@@ -24525,6 +24618,12 @@ function trimParagraphTrailingSpaces(runs, cssAlign, rtl) {
|
|
|
24525
24618
|
}
|
|
24526
24619
|
|
|
24527
24620
|
// src/pptx/render/text-paragraphs.ts
|
|
24621
|
+
function withRunLineHeight(runs, lineHeight) {
|
|
24622
|
+
if (lineHeight === void 0) {
|
|
24623
|
+
return runs;
|
|
24624
|
+
}
|
|
24625
|
+
return runs.map((run) => run.equation ? run : { ...run, style: { ...run.style, lineHeight } });
|
|
24626
|
+
}
|
|
24528
24627
|
function buildParagraphs(element, fieldContext, segmentOverrides, options) {
|
|
24529
24628
|
if (!pptx.hasTextProperties(element)) {
|
|
24530
24629
|
return [];
|
|
@@ -24628,7 +24727,10 @@ function buildParagraphs(element, fieldContext, segmentOverrides, options) {
|
|
|
24628
24727
|
paragraphStyle.unicodeBidi = "embed";
|
|
24629
24728
|
}
|
|
24630
24729
|
const para = {
|
|
24631
|
-
runs:
|
|
24730
|
+
runs: withRunLineHeight(
|
|
24731
|
+
trimParagraphTrailingSpaces(runs, cssAlign, rtl === true),
|
|
24732
|
+
spacing.runLineHeight
|
|
24733
|
+
),
|
|
24632
24734
|
bulletMarker: bullet?.picture?.src ? void 0 : bullet?.marker,
|
|
24633
24735
|
bulletPicture: bullet?.picture,
|
|
24634
24736
|
bulletStyle,
|
|
@@ -28704,6 +28806,21 @@ function appearanceSignature(el) {
|
|
|
28704
28806
|
parts.push(mediaIdentity(el) ?? "");
|
|
28705
28807
|
return parts.join("|");
|
|
28706
28808
|
}
|
|
28809
|
+
function proximityAccepts(a, b) {
|
|
28810
|
+
if (a.type !== b.type || differentText(a, b) || conflictingMorphNames(a, b)) {
|
|
28811
|
+
return false;
|
|
28812
|
+
}
|
|
28813
|
+
const ratio = (p, q) => Math.max(p, q, 1) / Math.max(Math.min(p, q), 1);
|
|
28814
|
+
if (ratio(a.width, b.width) > PROXIMITY_SIZE_RATIO_LIMIT || ratio(a.height, b.height) > PROXIMITY_SIZE_RATIO_LIMIT) {
|
|
28815
|
+
return false;
|
|
28816
|
+
}
|
|
28817
|
+
return centreDistance(a, b) < PROXIMITY_THRESHOLD;
|
|
28818
|
+
}
|
|
28819
|
+
function hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo) {
|
|
28820
|
+
const dist2 = centreDistance(fromEl, toEl);
|
|
28821
|
+
const closer = (a, b) => centreDistance(a, b) < dist2 && proximityAccepts(a, b);
|
|
28822
|
+
return toElements.some((other) => other !== toEl && !usedTo.has(other.id) && closer(fromEl, other)) || fromElements.some((other) => other !== fromEl && !usedFrom.has(other.id) && closer(other, toEl));
|
|
28823
|
+
}
|
|
28707
28824
|
|
|
28708
28825
|
// src/pptx/render/morph-heuristics.ts
|
|
28709
28826
|
function matchSameMedia(fromElements, toElements, usedFrom, usedTo) {
|
|
@@ -28797,6 +28914,9 @@ function matchNamedTextTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
|
28797
28914
|
if (differentText(fromEl, toEl)) {
|
|
28798
28915
|
continue;
|
|
28799
28916
|
}
|
|
28917
|
+
if (hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo)) {
|
|
28918
|
+
continue;
|
|
28919
|
+
}
|
|
28800
28920
|
const dist2 = centreDistance(fromEl, toEl);
|
|
28801
28921
|
if (!best || dist2 < best.dist) {
|
|
28802
28922
|
best = { toEl, dist: dist2 };
|
|
@@ -28823,6 +28943,9 @@ function matchGroupTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
|
28823
28943
|
if (!sameSizedTwinCasts(fromEl, toEl)) {
|
|
28824
28944
|
continue;
|
|
28825
28945
|
}
|
|
28946
|
+
if (hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo)) {
|
|
28947
|
+
continue;
|
|
28948
|
+
}
|
|
28826
28949
|
pairs.push({ fromElement: fromEl, toElement: toEl });
|
|
28827
28950
|
usedFrom.add(fromEl.id);
|
|
28828
28951
|
usedTo.add(toEl.id);
|
|
@@ -28832,37 +28955,38 @@ function matchGroupTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
|
28832
28955
|
return pairs;
|
|
28833
28956
|
}
|
|
28834
28957
|
function matchIdenticalTwins(fromElements, toElements, usedFrom, usedTo) {
|
|
28835
|
-
const
|
|
28958
|
+
const candidates = [];
|
|
28836
28959
|
for (const fromEl of fromElements) {
|
|
28837
|
-
if (usedFrom.has(fromEl.id)) {
|
|
28838
|
-
continue;
|
|
28839
|
-
}
|
|
28840
|
-
if (!hasDeclaredPaint(fromEl)) {
|
|
28960
|
+
if (usedFrom.has(fromEl.id) || !hasDeclaredPaint(fromEl)) {
|
|
28841
28961
|
continue;
|
|
28842
28962
|
}
|
|
28843
28963
|
const fromSignature = appearanceSignature(fromEl);
|
|
28844
28964
|
for (const toEl of toElements) {
|
|
28845
|
-
if (usedTo.has(toEl.id)) {
|
|
28846
|
-
continue;
|
|
28847
|
-
}
|
|
28848
|
-
if (appearanceSignature(toEl) !== fromSignature) {
|
|
28965
|
+
if (usedTo.has(toEl.id) || appearanceSignature(toEl) !== fromSignature) {
|
|
28849
28966
|
continue;
|
|
28850
28967
|
}
|
|
28851
28968
|
if (fromEl.width !== toEl.width || fromEl.height !== toEl.height) {
|
|
28852
28969
|
continue;
|
|
28853
28970
|
}
|
|
28854
|
-
if (differentText(fromEl, toEl)) {
|
|
28971
|
+
if (differentText(fromEl, toEl) || conflictingMorphNames(fromEl, toEl)) {
|
|
28855
28972
|
continue;
|
|
28856
28973
|
}
|
|
28857
|
-
if (
|
|
28974
|
+
if (hasCloserProximityRival(fromEl, toEl, fromElements, toElements, usedFrom, usedTo)) {
|
|
28858
28975
|
continue;
|
|
28859
28976
|
}
|
|
28860
|
-
|
|
28861
|
-
usedFrom.add(fromEl.id);
|
|
28862
|
-
usedTo.add(toEl.id);
|
|
28863
|
-
break;
|
|
28977
|
+
candidates.push({ fromEl, toEl, dist: centreDistance(fromEl, toEl) });
|
|
28864
28978
|
}
|
|
28865
28979
|
}
|
|
28980
|
+
candidates.sort((a, b) => a.dist - b.dist);
|
|
28981
|
+
const pairs = [];
|
|
28982
|
+
for (const { fromEl, toEl } of candidates) {
|
|
28983
|
+
if (usedFrom.has(fromEl.id) || usedTo.has(toEl.id)) {
|
|
28984
|
+
continue;
|
|
28985
|
+
}
|
|
28986
|
+
pairs.push({ fromElement: fromEl, toElement: toEl });
|
|
28987
|
+
usedFrom.add(fromEl.id);
|
|
28988
|
+
usedTo.add(toEl.id);
|
|
28989
|
+
}
|
|
28866
28990
|
return pairs;
|
|
28867
28991
|
}
|
|
28868
28992
|
|
|
@@ -29005,25 +29129,8 @@ function matchMorphElementsFull(fromSlide, toSlide) {
|
|
|
29005
29129
|
if (usedTo.has(toEl.id)) {
|
|
29006
29130
|
continue;
|
|
29007
29131
|
}
|
|
29008
|
-
if (fromEl
|
|
29009
|
-
|
|
29010
|
-
}
|
|
29011
|
-
if (differentText(fromEl, toEl)) {
|
|
29012
|
-
continue;
|
|
29013
|
-
}
|
|
29014
|
-
if (conflictingMorphNames(fromEl, toEl)) {
|
|
29015
|
-
continue;
|
|
29016
|
-
}
|
|
29017
|
-
const widthRatio = Math.max(fromEl.width, toEl.width, 1) / Math.max(Math.min(fromEl.width, toEl.width), 1);
|
|
29018
|
-
const heightRatio = Math.max(fromEl.height, toEl.height, 1) / Math.max(Math.min(fromEl.height, toEl.height), 1);
|
|
29019
|
-
if (widthRatio > PROXIMITY_SIZE_RATIO_LIMIT || heightRatio > PROXIMITY_SIZE_RATIO_LIMIT) {
|
|
29020
|
-
continue;
|
|
29021
|
-
}
|
|
29022
|
-
const dx = fromEl.x - toEl.x;
|
|
29023
|
-
const dy = fromEl.y - toEl.y;
|
|
29024
|
-
const dist2 = Math.sqrt(dx * dx + dy * dy);
|
|
29025
|
-
if (dist2 < PROXIMITY_THRESHOLD) {
|
|
29026
|
-
candidates.push({ fromEl, toEl, dist: dist2 });
|
|
29132
|
+
if (proximityAccepts(fromEl, toEl)) {
|
|
29133
|
+
candidates.push({ fromEl, toEl, dist: centreDistance(fromEl, toEl) });
|
|
29027
29134
|
}
|
|
29028
29135
|
}
|
|
29029
29136
|
}
|
|
@@ -59147,14 +59254,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
|
|
|
59147
59254
|
backgroundColor,
|
|
59148
59255
|
readComputedStyle = (el) => window.getComputedStyle(el)
|
|
59149
59256
|
} = options;
|
|
59150
|
-
await
|
|
59257
|
+
await chunk7DMJEYQJ_cjs.settleThreeViews(element);
|
|
59151
59258
|
const clone = element.cloneNode(true);
|
|
59152
|
-
|
|
59259
|
+
chunk7DMJEYQJ_cjs.withAuthoredStrokeWidths(
|
|
59153
59260
|
element,
|
|
59154
59261
|
() => inlineComputedStylesOnClone(element, clone, readComputedStyle)
|
|
59155
59262
|
);
|
|
59156
|
-
|
|
59157
|
-
|
|
59263
|
+
chunk7DMJEYQJ_cjs.snapshotThreeViewsIntoClone(element, clone);
|
|
59264
|
+
chunk7DMJEYQJ_cjs.prepareExportClone(clone);
|
|
59158
59265
|
const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
|
|
59159
59266
|
embedImagesOnClone(clone),
|
|
59160
59267
|
collectExternalFontFaceCss(doc, fetchAsDataUrl)
|
|
@@ -65831,6 +65938,8 @@ var OFFICE_TOKENS = {
|
|
|
65831
65938
|
"--office-print-preview-width": "420px",
|
|
65832
65939
|
"--office-find-max-width": "640px",
|
|
65833
65940
|
"--office-find-bar-height": "40px",
|
|
65941
|
+
"--office-find-replace-field-min-width": "120px",
|
|
65942
|
+
"--office-find-replace-select-min-width": "150px",
|
|
65834
65943
|
"--office-ruler-size": "18px",
|
|
65835
65944
|
"--office-avatar-size": "48px",
|
|
65836
65945
|
"--office-avatar-color": "var(--office-muted-foreground, #6b7280)",
|
|
@@ -77520,6 +77629,7 @@ exports.EditGeometryPen = EditGeometryPen;
|
|
|
77520
77629
|
exports.EditPointsSession = EditPointsSession;
|
|
77521
77630
|
exports.FILL_MODE_OPTIONS = FILL_MODE_OPTIONS;
|
|
77522
77631
|
exports.FILL_PATTERN_LABEL_KEYS = FILL_PATTERN_LABEL_KEYS;
|
|
77632
|
+
exports.FIXED_SPACING_RUN_LINE_HEIGHT = FIXED_SPACING_RUN_LINE_HEIGHT;
|
|
77523
77633
|
exports.FIXED_TAB_GALLERIES = FIXED_TAB_GALLERIES;
|
|
77524
77634
|
exports.FLY_SUBTYPE_TO_EDGE = FLY_SUBTYPE_TO_EDGE;
|
|
77525
77635
|
exports.FONT_EMBEDDING_UNAVAILABLE_KEY = FONT_EMBEDDING_UNAVAILABLE_KEY;
|
|
@@ -78281,6 +78391,8 @@ exports.collectFontsFromElement = collectFontsFromElement;
|
|
|
78281
78391
|
exports.collectReferencedFontFamilies = collectReferencedFontFamilies;
|
|
78282
78392
|
exports.collectUsedFonts = collectUsedFonts;
|
|
78283
78393
|
exports.colorDistance = colorDistance;
|
|
78394
|
+
exports.columnHandleSegments = columnHandleSegments;
|
|
78395
|
+
exports.columnIndexAtFraction = columnIndexAtFraction;
|
|
78284
78396
|
exports.combineTileRowPixels = combineTileRowPixels;
|
|
78285
78397
|
exports.commentMarkerTitle = commentMarkerTitle;
|
|
78286
78398
|
exports.commentMentionQuery = commentMentionQuery;
|
|
@@ -78334,6 +78446,7 @@ exports.computeSmartArtElementLayout = computeSmartArtElementLayout;
|
|
|
78334
78446
|
exports.computeSmartArtLayout = computeSmartArtLayout;
|
|
78335
78447
|
exports.computeTabSize = computeTabSize;
|
|
78336
78448
|
exports.computeTabbedLayout = computeTabbedLayout;
|
|
78449
|
+
exports.computeTableMergeCrossings = computeTableMergeCrossings;
|
|
78337
78450
|
exports.computeTargetLayout = computeTargetLayout;
|
|
78338
78451
|
exports.computeTimelineLayout = computeTimelineLayout;
|
|
78339
78452
|
exports.computeTrendlinePoints = computeTrendlinePoints;
|
|
@@ -78859,6 +78972,7 @@ exports.isBrowserOpenableMime = isBrowserOpenableMime;
|
|
|
78859
78972
|
exports.isChart3DViewEnabled = isChart3DViewEnabled;
|
|
78860
78973
|
exports.isChartTitleEvent = isChartTitleEvent;
|
|
78861
78974
|
exports.isClickAdvanceAllowed = isClickAdvanceAllowed;
|
|
78975
|
+
exports.isColumnBoundaryMergedAt = isColumnBoundaryMergedAt;
|
|
78862
78976
|
exports.isCornerHandle = isCornerHandle;
|
|
78863
78977
|
exports.isDensePanelCompact = isDensePanelCompact;
|
|
78864
78978
|
exports.isDialogAvailable = isDialogAvailable;
|
|
@@ -78918,6 +79032,7 @@ exports.isRibbonControlVisible = isRibbonControlVisible;
|
|
|
78918
79032
|
exports.isRibbonGroupId = isRibbonGroupId;
|
|
78919
79033
|
exports.isRibbonGroupVisible = isRibbonGroupVisible;
|
|
78920
79034
|
exports.isRoutedToLegacyBevelShadow = isRoutedToLegacyBevelShadow;
|
|
79035
|
+
exports.isRowBoundaryMergedAt = isRowBoundaryMergedAt;
|
|
78921
79036
|
exports.isSafeSvgMarkup = isSafeSvgMarkup;
|
|
78922
79037
|
exports.isSameArtisticEffect = isSameArtisticEffect;
|
|
78923
79038
|
exports.isSeriesUsingSecondaryAxis = isSeriesUsingSecondaryAxis;
|
|
@@ -79073,6 +79188,7 @@ exports.observeExternalCollaborationSession = observeExternalCollaborationSessio
|
|
|
79073
79188
|
exports.oleActionsVisible = oleActionsVisible;
|
|
79074
79189
|
exports.ooxmlDashToCssBorderStyle = ooxmlDashToCssBorderStyle;
|
|
79075
79190
|
exports.openAutosaveDb = openAutosaveDb;
|
|
79191
|
+
exports.openBoundaryRuns = openBoundaryRuns;
|
|
79076
79192
|
exports.openEditPathAtNode = openEditPathAtNode;
|
|
79077
79193
|
exports.openFilePicker = openFilePicker;
|
|
79078
79194
|
exports.openNativeEyeDropper = openNativeEyeDropper;
|
|
@@ -79446,6 +79562,8 @@ exports.roundedRectOutline = roundedRectOutline;
|
|
|
79446
79562
|
exports.routeConnector = routeConnector;
|
|
79447
79563
|
exports.routeEditLayerPointerToNodes = routeEditLayerPointerToNodes;
|
|
79448
79564
|
exports.routeOrthogonalConnector = routeOrthogonalConnector;
|
|
79565
|
+
exports.rowHandleSegments = rowHandleSegments;
|
|
79566
|
+
exports.rowIndexAtOffset = rowIndexAtOffset;
|
|
79449
79567
|
exports.rulerDragToGuidePosition = rulerDragToGuidePosition;
|
|
79450
79568
|
exports.runEditPointsCommand = runEditPointsCommand;
|
|
79451
79569
|
exports.runEquationMathMl = runEquationMathMl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-editable.d.ts","sourceRoot":"","sources":["../../../../src/pptx/dom/elements/table-editable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"table-editable.d.ts","sourceRoot":"","sources":["../../../../src/pptx/dom/elements/table-editable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAexD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA4BrD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,oBAAoB,GAC3B,IAAI,CAsLN"}
|