ooxml-ui 1.2.0 → 1.3.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/custom-elements.json +161 -0
- package/dist/{chunk-XNCWB2X6.js → chunk-2WLRFPMW.js} +4 -0
- package/dist/{chunk-JAJFLFAV.js → chunk-56A2JK63.js} +1 -1
- package/dist/{chunk-AYXFLBSV.js → chunk-5OFAJDMQ.js} +6 -6
- package/dist/{chunk-7FNDOWTX.js → chunk-723JC3OC.js} +72 -5
- package/dist/{chunk-YK2DPYMU.js → chunk-IY7QJLQG.js} +1 -1
- package/dist/{chunk-BOX43CZD.js → chunk-M6GF5ED2.js} +2 -1
- package/dist/{chunk-Y2E22JVO.js → chunk-NYRRH2MD.js} +1 -1
- package/dist/{chunk-VUB44CAJ.js → chunk-TWQ45BFL.js} +1 -1
- package/dist/{chunk-YP5S7DTT.js → chunk-V6P6KZCO.js} +6 -5
- package/dist/controls.d.ts +4 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +5 -5
- package/dist/docx/editor-chrome.d.ts +8 -1
- package/dist/docx/file-commands.d.ts +1 -1
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +1 -0
- package/dist/docx/localization-strings.d.ts +1 -0
- package/dist/docx/ribbon-actions.d.ts +22 -0
- package/dist/docx/title-bar.d.ts +3 -5
- package/dist/docx.js +66 -46
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/pptx/{chart-3d-view-scene-6B5TOWB6.mjs → chart-3d-view-scene-OYJ4CDCO.mjs} +3 -4
- package/dist/pptx/{chart-3d-view-scene-MJ6YNT56.cjs → chart-3d-view-scene-SE2Y6QRE.cjs} +38 -39
- package/dist/pptx/{chunk-AWKKC3VW.mjs → chunk-CIVA3MLN.mjs} +1 -1
- package/dist/pptx/{chunk-ZK344LOB.cjs → chunk-FPE5PZMI.cjs} +303 -155
- package/dist/pptx/{chunk-YRHK45AB.cjs → chunk-IURZJAWP.cjs} +233 -127
- package/dist/pptx/{chunk-XIQMFSNG.cjs → chunk-KRMMJUCO.cjs} +83 -1
- package/dist/pptx/{chunk-YI5LH5NN.mjs → chunk-MWHGUEIJ.mjs} +162 -16
- package/dist/pptx/{chunk-XQVKQD5Z.mjs → chunk-STLXPKJJ.mjs} +230 -128
- package/dist/pptx/{chunk-YMTQLZ2I.mjs → chunk-TC7HCF5M.mjs} +76 -2
- package/dist/pptx/{chunk-STKGUT5S.cjs → chunk-WKLHJEPD.cjs} +13 -13
- package/dist/pptx/dom/element-styles.d.ts.map +1 -1
- package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +254 -254
- package/dist/pptx/dom/index.mjs +26 -26
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3041 -3001
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chart-3d-oblique-layout.d.ts.map +1 -1
- package/dist/pptx/render/chart-3d-persp-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-3d-persp-layout.d.ts.map +1 -1
- package/dist/pptx/render/chart-bar-cluster-geometry.d.ts +1 -1
- package/dist/pptx/render/chart-bar-cluster-geometry.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-area.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-line-area.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-stacked-labels.d.ts +11 -7
- package/dist/pptx/render/chart-cartesian-stacked-labels.d.ts.map +1 -1
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-data-label-anchor.d.ts +4 -1
- package/dist/pptx/render/chart-data-label-anchor.d.ts.map +1 -1
- package/dist/pptx/render/chart-horizontal-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-line-path.d.ts +9 -0
- package/dist/pptx/render/chart-line-path.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-plot-clip.d.ts +37 -0
- package/dist/pptx/render/chart-plot-clip.d.ts.map +1 -0
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model-bars.d.ts +3 -2
- package/dist/pptx/render/chart-view-model-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/device-pixel-stroke.d.ts +101 -0
- package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -0
- package/dist/pptx/render/export-clone.d.ts +4 -0
- package/dist/pptx/render/export-clone.d.ts.map +1 -1
- package/dist/pptx/render/foreign-object-svg-document.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +2 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/stroke-outline.d.ts +6 -0
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/stroke-style.d.ts +8 -2
- package/dist/pptx/render/stroke-style.d.ts.map +1 -1
- package/dist/pptx/render/tab-row-actions.d.ts +40 -0
- package/dist/pptx/render/tab-row-actions.d.ts.map +1 -0
- package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-actions.d.ts +8 -0
- package/dist/pptx/web-components/ribbon-actions.d.ts.map +1 -0
- package/dist/presence.js +3 -3
- package/dist/ribbon/ribbon-actions.d.ts +119 -0
- package/dist/ribbon/ribbon-actions.d.ts.map +1 -0
- package/dist/smartart.js +3 -3
- package/dist/teams.js +7 -7
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +4 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio.js +6 -6
- package/dist/xlsx/calc-preparation.d.ts +44 -0
- package/dist/xlsx/editor-core.d.ts +3 -0
- package/dist/xlsx/ribbon-actions.d.ts +5 -4
- package/dist/xlsx.js +131 -44
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@ var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
|
|
|
4
4
|
var chunkX7FS7XHU_cjs = require('./chunk-X7FS7XHU.cjs');
|
|
5
5
|
var chunkUEF4BFW4_cjs = require('./chunk-UEF4BFW4.cjs');
|
|
6
6
|
var chunk52LKIMK3_cjs = require('./chunk-52LKIMK3.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkWKLHJEPD_cjs = require('./chunk-WKLHJEPD.cjs');
|
|
8
8
|
var chunkXOAXPD2W_cjs = require('./chunk-XOAXPD2W.cjs');
|
|
9
9
|
var chunkBSGCZ4JZ_cjs = require('./chunk-BSGCZ4JZ.cjs');
|
|
10
10
|
var chunkIOOI63TH_cjs = require('./chunk-IOOI63TH.cjs');
|
|
@@ -12,10 +12,10 @@ var chunkZJFN5POF_cjs = require('./chunk-ZJFN5POF.cjs');
|
|
|
12
12
|
var chunkSTXGHV25_cjs = require('./chunk-STXGHV25.cjs');
|
|
13
13
|
var chunkWB25PCHQ_cjs = require('./chunk-WB25PCHQ.cjs');
|
|
14
14
|
var chunkW3X2UVYQ_cjs = require('./chunk-W3X2UVYQ.cjs');
|
|
15
|
-
var
|
|
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 chunkKRMMJUCO_cjs = require('./chunk-KRMMJUCO.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');
|
|
@@ -1070,7 +1070,7 @@ function buildRectPathGradientDef(stops, id, focalPoint, fillToRect) {
|
|
|
1070
1070
|
color: stop.color,
|
|
1071
1071
|
...typeof stop.opacity === "number" ? { opacity: stop.opacity } : {}
|
|
1072
1072
|
}));
|
|
1073
|
-
const markup =
|
|
1073
|
+
const markup = chunkIURZJAWP_cjs.buildRectPathGradientSvg(rectStops, focalPoint, fillToRect);
|
|
1074
1074
|
return { kind: "rectPath", id, href: `data:image/svg+xml,${encodeURIComponent(markup)}` };
|
|
1075
1075
|
}
|
|
1076
1076
|
function rectPathGradientMarkup(def) {
|
|
@@ -1084,9 +1084,9 @@ function buildSvgStrokePatternDef(style, elementId) {
|
|
|
1084
1084
|
if (!style || style.strokeFillMode !== "pattern" || !style.strokePatternPreset) {
|
|
1085
1085
|
return void 0;
|
|
1086
1086
|
}
|
|
1087
|
-
const fg =
|
|
1088
|
-
const bg =
|
|
1089
|
-
const tile4 =
|
|
1087
|
+
const fg = chunkIURZJAWP_cjs.normalizeHexColor(style.strokeColor, "#000000");
|
|
1088
|
+
const bg = chunkIURZJAWP_cjs.normalizeHexColor(style.strokePatternBackgroundColor, "#ffffff");
|
|
1089
|
+
const tile4 = chunkIURZJAWP_cjs.getPatternTile(style.strokePatternPreset, fg, bg);
|
|
1090
1090
|
if (!tile4) {
|
|
1091
1091
|
return void 0;
|
|
1092
1092
|
}
|
|
@@ -1109,7 +1109,7 @@ function svgGradientId(elementId, suffix = "grad") {
|
|
|
1109
1109
|
return `pptx-${suffix}-${seed}`;
|
|
1110
1110
|
}
|
|
1111
1111
|
function toSvgStops(stops) {
|
|
1112
|
-
return
|
|
1112
|
+
return chunkIURZJAWP_cjs.sanitizeGradientStops(stops).map((stop) => ({
|
|
1113
1113
|
offset: round4(stop.position / 100),
|
|
1114
1114
|
color: stop.color,
|
|
1115
1115
|
...typeof stop.opacity === "number" ? { opacity: round4(stop.opacity) } : {}
|
|
@@ -1136,7 +1136,7 @@ function buildFromSource(source, id) {
|
|
|
1136
1136
|
if ((source.pathType || "circle") === "rect") {
|
|
1137
1137
|
return buildRectPathGradientDef(stops, id, source.focalPoint, source.fillToRect);
|
|
1138
1138
|
}
|
|
1139
|
-
const { cx, cy } =
|
|
1139
|
+
const { cx, cy } = chunkIURZJAWP_cjs.computeGradientCenter(source.fillToRect, source.focalPoint);
|
|
1140
1140
|
const fx = cx / 100;
|
|
1141
1141
|
const fy = cy / 100;
|
|
1142
1142
|
const r = Math.hypot(Math.max(fx, 1 - fx), Math.max(fy, 1 - fy));
|
|
@@ -1278,10 +1278,13 @@ 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, offset: 0 }];
|
|
1281
|
+
return [{ strokeWidth, cssStrokeWidth: chunkKRMMJUCO_cjs.screenStrokeWidth(strokeWidth), offset: 0 }];
|
|
1282
1282
|
}
|
|
1283
1283
|
const widths = getCompoundLineWidths(compoundLine, strokeWidth);
|
|
1284
|
-
return offsets2.map((offset, idx) =>
|
|
1284
|
+
return offsets2.map((offset, idx) => {
|
|
1285
|
+
const width = widths[idx] ?? strokeWidth;
|
|
1286
|
+
return { strokeWidth: width, cssStrokeWidth: chunkKRMMJUCO_cjs.screenStrokeWidth(width), offset };
|
|
1287
|
+
});
|
|
1285
1288
|
}
|
|
1286
1289
|
function needsCenteredStrokeOverlay(element, style, declaredWidth) {
|
|
1287
1290
|
if (!style || declaredWidth <= 0 || element.type === "connector" || !hasStrokePaint(style)) {
|
|
@@ -1316,11 +1319,11 @@ function buildStrokeOutline(element) {
|
|
|
1316
1319
|
return {
|
|
1317
1320
|
d,
|
|
1318
1321
|
paint,
|
|
1319
|
-
stroke: paint ? svgGradientFillRef(paint) :
|
|
1322
|
+
stroke: paint ? svgGradientFillRef(paint) : chunkIURZJAWP_cjs.colorWithOpacity(style?.strokeColor ?? chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR, style?.strokeOpacity),
|
|
1320
1323
|
strokeWidth,
|
|
1321
1324
|
strands: outlineStrands(style?.compoundLine, strokeWidth),
|
|
1322
|
-
dashArray:
|
|
1323
|
-
|
|
1325
|
+
dashArray: chunkIURZJAWP_cjs.getSvgStrokeDasharray(
|
|
1326
|
+
chunkIURZJAWP_cjs.normalizeStrokeDashType(style?.strokeDash),
|
|
1324
1327
|
Math.max(strokeWidth, 1),
|
|
1325
1328
|
style?.customDashSegments
|
|
1326
1329
|
),
|
|
@@ -1444,6 +1447,7 @@ function resolveShapeGeometry(element) {
|
|
|
1444
1447
|
}
|
|
1445
1448
|
var NO_STROKE = {
|
|
1446
1449
|
borderWidth: 0,
|
|
1450
|
+
cssBorderWidth: "0px",
|
|
1447
1451
|
borderStyle: void 0,
|
|
1448
1452
|
borderColor: void 0,
|
|
1449
1453
|
border: void 0,
|
|
@@ -1499,17 +1503,18 @@ function getComputedStrokeStyle(element) {
|
|
|
1499
1503
|
return { ...NO_STROKE, ...joins };
|
|
1500
1504
|
}
|
|
1501
1505
|
const borderWidth = width;
|
|
1502
|
-
const borderStyle =
|
|
1503
|
-
|
|
1506
|
+
const borderStyle = chunkIURZJAWP_cjs.getCssBorderDashStyle(
|
|
1507
|
+
chunkIURZJAWP_cjs.normalizeStrokeDashType(style.strokeDash),
|
|
1504
1508
|
style.compoundLine
|
|
1505
1509
|
);
|
|
1506
|
-
const rawColor = style.strokeColor ??
|
|
1507
|
-
const borderColor = style.strokeOpacity === void 0 ? rawColor :
|
|
1510
|
+
const rawColor = style.strokeColor ?? chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR;
|
|
1511
|
+
const borderColor = style.strokeOpacity === void 0 ? rawColor : chunkIURZJAWP_cjs.colorWithOpacity(chunkIURZJAWP_cjs.normalizeHexColor(rawColor, chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR), style.strokeOpacity);
|
|
1508
1512
|
return {
|
|
1509
1513
|
borderWidth,
|
|
1514
|
+
cssBorderWidth: chunkKRMMJUCO_cjs.screenStrokeWidth(borderWidth),
|
|
1510
1515
|
borderStyle,
|
|
1511
1516
|
borderColor,
|
|
1512
|
-
border:
|
|
1517
|
+
border: chunkKRMMJUCO_cjs.screenBorder(borderWidth, borderStyle ?? "solid", borderColor),
|
|
1513
1518
|
...joins
|
|
1514
1519
|
};
|
|
1515
1520
|
}
|
|
@@ -1665,7 +1670,7 @@ function resolveGroupChildFill(child, parentGroupFill) {
|
|
|
1665
1670
|
if (!parentGroupFill || !pptx.hasShapeProperties(child) || child.shapeStyle?.fillMode !== "group") {
|
|
1666
1671
|
return void 0;
|
|
1667
1672
|
}
|
|
1668
|
-
return
|
|
1673
|
+
return chunkIURZJAWP_cjs.getComputedFillStyle(child, parentGroupFill);
|
|
1669
1674
|
}
|
|
1670
1675
|
function getFrameInverseTransform(element) {
|
|
1671
1676
|
const transforms = [];
|
|
@@ -1717,9 +1722,9 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1717
1722
|
}
|
|
1718
1723
|
if (colorNode["a:scrgbClr"]) {
|
|
1719
1724
|
const scrgb = colorNode["a:scrgbClr"];
|
|
1720
|
-
const red =
|
|
1721
|
-
const green =
|
|
1722
|
-
const blue =
|
|
1725
|
+
const red = chunkIURZJAWP_cjs.parseDrawingPercent(scrgb["@_r"]);
|
|
1726
|
+
const green = chunkIURZJAWP_cjs.parseDrawingPercent(scrgb["@_g"]);
|
|
1727
|
+
const blue = chunkIURZJAWP_cjs.parseDrawingPercent(scrgb["@_b"]);
|
|
1723
1728
|
if (red !== void 0 && green !== void 0 && blue !== void 0) {
|
|
1724
1729
|
const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1725
1730
|
const base2 = `#${toHex2(red * 255)}${toHex2(green * 255)}${toHex2(blue * 255)}`;
|
|
@@ -1759,8 +1764,8 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1759
1764
|
const lumRaw = Number.parseFloat(String(hslNode["@_lum"] ?? ""));
|
|
1760
1765
|
if (Number.isFinite(hueRaw) && Number.isFinite(satRaw) && Number.isFinite(lumRaw)) {
|
|
1761
1766
|
const h = hueRaw / 6e4;
|
|
1762
|
-
const s =
|
|
1763
|
-
const l =
|
|
1767
|
+
const s = chunkIURZJAWP_cjs.clampUnitInterval(satRaw / 1e5);
|
|
1768
|
+
const l = chunkIURZJAWP_cjs.clampUnitInterval(lumRaw / 1e5);
|
|
1764
1769
|
const rgb = pptx.hslToRgb(h, s, l);
|
|
1765
1770
|
const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1766
1771
|
const base2 = `#${toHex2(rgb.r)}${toHex2(rgb.g)}${toHex2(rgb.b)}`;
|
|
@@ -1800,11 +1805,11 @@ function parseDrawingColorOpacity(colorNode) {
|
|
|
1800
1805
|
if (!colorChoice) {
|
|
1801
1806
|
return void 0;
|
|
1802
1807
|
}
|
|
1803
|
-
const alpha =
|
|
1804
|
-
const alphaMod =
|
|
1808
|
+
const alpha = chunkIURZJAWP_cjs.parseDrawingPercent(colorChoice["a:alpha"]?.["@_val"]);
|
|
1809
|
+
const alphaMod = chunkIURZJAWP_cjs.parseDrawingPercent(
|
|
1805
1810
|
colorChoice["a:alphaMod"]?.["@_val"]
|
|
1806
1811
|
);
|
|
1807
|
-
const alphaOff =
|
|
1812
|
+
const alphaOff = chunkIURZJAWP_cjs.parseDrawingPercent(
|
|
1808
1813
|
colorChoice["a:alphaOff"]?.["@_val"]
|
|
1809
1814
|
);
|
|
1810
1815
|
if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
|
|
@@ -1817,7 +1822,7 @@ function parseDrawingColorOpacity(colorNode) {
|
|
|
1817
1822
|
if (alphaOff !== void 0) {
|
|
1818
1823
|
opacity += alphaOff;
|
|
1819
1824
|
}
|
|
1820
|
-
return
|
|
1825
|
+
return chunkIURZJAWP_cjs.clampUnitInterval(opacity);
|
|
1821
1826
|
}
|
|
1822
1827
|
function substituteScriptFont(name, panose, baseFontFamily) {
|
|
1823
1828
|
return name ? pptx.getSubstituteFontFamily(name, pptx.parsePanoseString(panose)) : baseFontFamily;
|
|
@@ -2028,7 +2033,7 @@ function buildPatternOverlayTile(pattern) {
|
|
|
2028
2033
|
if (!pattern) {
|
|
2029
2034
|
return void 0;
|
|
2030
2035
|
}
|
|
2031
|
-
const tile4 =
|
|
2036
|
+
const tile4 = chunkIURZJAWP_cjs.getPatternTile(
|
|
2032
2037
|
pattern.preset,
|
|
2033
2038
|
pattern.foreground ?? "#000000",
|
|
2034
2039
|
pattern.background ?? "#ffffff"
|
|
@@ -3582,10 +3587,10 @@ function getMeasureCtx() {
|
|
|
3582
3587
|
return measureCtx;
|
|
3583
3588
|
}
|
|
3584
3589
|
function envelopeFontSizePx(font) {
|
|
3585
|
-
return font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx :
|
|
3590
|
+
return font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
3586
3591
|
}
|
|
3587
3592
|
function toCanvasFont(font, sizePx = envelopeFontSizePx(font)) {
|
|
3588
|
-
const family2 = font.fontFamily ||
|
|
3593
|
+
const family2 = font.fontFamily || chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY;
|
|
3589
3594
|
return `${font.italic ? "italic " : ""}${font.bold ? "bold " : ""}${sizePx}px ${family2}`;
|
|
3590
3595
|
}
|
|
3591
3596
|
function enableKerning(ctx) {
|
|
@@ -4580,7 +4585,7 @@ function createGlyphOutlineLookup(cache) {
|
|
|
4580
4585
|
return (char, font, x, y) => {
|
|
4581
4586
|
const parsed = cache.get(font.fontFamily, font.bold, font.italic);
|
|
4582
4587
|
if (parsed) {
|
|
4583
|
-
const size = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx :
|
|
4588
|
+
const size = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
4584
4589
|
const commands = extractGlyphOutlineCommands(parsed, char, x, y, size);
|
|
4585
4590
|
if (commands) {
|
|
4586
4591
|
return commands;
|
|
@@ -6768,7 +6773,7 @@ function computeTrendlinePoints(trendline, values, catCount, layout, range, mode
|
|
|
6768
6773
|
let rSquared = 0;
|
|
6769
6774
|
switch (trendline.trendlineType) {
|
|
6770
6775
|
case "linear": {
|
|
6771
|
-
const reg =
|
|
6776
|
+
const reg = chunkIURZJAWP_cjs.computeLinearRegression(xVals, yVals);
|
|
6772
6777
|
const intercept = trendline.intercept;
|
|
6773
6778
|
const slope = intercept !== void 0 ? yVals.reduce((s, y, i) => s + (y - intercept) * xVals[i], 0) / xVals.reduce((s, x) => s + x * x, 0) : reg.slope;
|
|
6774
6779
|
const b = intercept ?? reg.intercept;
|
|
@@ -6783,7 +6788,7 @@ function computeTrendlinePoints(trendline, values, catCount, layout, range, mode
|
|
|
6783
6788
|
if (logY.length < 2) {
|
|
6784
6789
|
return { points: [], equation: "", rSquared: 0 };
|
|
6785
6790
|
}
|
|
6786
|
-
const reg =
|
|
6791
|
+
const reg = chunkIURZJAWP_cjs.computeLinearRegression(filteredX, logY);
|
|
6787
6792
|
const a = Math.exp(reg.intercept);
|
|
6788
6793
|
const b = reg.slope;
|
|
6789
6794
|
evalFn = (x) => a * Math.exp(b * x);
|
|
@@ -6797,7 +6802,7 @@ function computeTrendlinePoints(trendline, values, catCount, layout, range, mode
|
|
|
6797
6802
|
if (lnX.length < 2) {
|
|
6798
6803
|
return { points: [], equation: "", rSquared: 0 };
|
|
6799
6804
|
}
|
|
6800
|
-
const reg =
|
|
6805
|
+
const reg = chunkIURZJAWP_cjs.computeLinearRegression(lnX, filteredY);
|
|
6801
6806
|
evalFn = (x) => x > 0 ? reg.slope * Math.log(x) + reg.intercept : 0;
|
|
6802
6807
|
equation = `y = ${reg.slope.toFixed(2)}ln(x) + ${reg.intercept.toFixed(2)}`;
|
|
6803
6808
|
rSquared = reg.rSquared;
|
|
@@ -6809,7 +6814,7 @@ function computeTrendlinePoints(trendline, values, catCount, layout, range, mode
|
|
|
6809
6814
|
if (logX.length < 2) {
|
|
6810
6815
|
return { points: [], equation: "", rSquared: 0 };
|
|
6811
6816
|
}
|
|
6812
|
-
const reg =
|
|
6817
|
+
const reg = chunkIURZJAWP_cjs.computeLinearRegression(logX, logY);
|
|
6813
6818
|
const a = Math.exp(reg.intercept);
|
|
6814
6819
|
evalFn = (x) => x > 0 ? a * x ** reg.slope : 0;
|
|
6815
6820
|
equation = `y = ${a.toFixed(2)}x^${reg.slope.toFixed(2)}`;
|
|
@@ -6818,10 +6823,10 @@ function computeTrendlinePoints(trendline, values, catCount, layout, range, mode
|
|
|
6818
6823
|
}
|
|
6819
6824
|
case "polynomial": {
|
|
6820
6825
|
const order = Math.min(trendline.order ?? 2, 6);
|
|
6821
|
-
const coeffs =
|
|
6826
|
+
const coeffs = chunkIURZJAWP_cjs.fitPolynomial(xVals, yVals, order);
|
|
6822
6827
|
evalFn = (x) => coeffs.reduce((s, c, i) => s + c * x ** i, 0);
|
|
6823
6828
|
equation = coeffs.map((c, i) => `${c.toFixed(2)}x^${i}`).join(" + ");
|
|
6824
|
-
rSquared =
|
|
6829
|
+
rSquared = chunkIURZJAWP_cjs.computeRSquared(xVals, yVals, evalFn);
|
|
6825
6830
|
break;
|
|
6826
6831
|
}
|
|
6827
6832
|
case "movingAvg": {
|
|
@@ -7159,7 +7164,7 @@ var COMBO_SERIES_TYPE_OPTIONS = [
|
|
|
7159
7164
|
function patchChartData(data, patch) {
|
|
7160
7165
|
const { chartType, ...rest } = patch;
|
|
7161
7166
|
if (chartType === "pareto") {
|
|
7162
|
-
return { ...
|
|
7167
|
+
return { ...chunkIURZJAWP_cjs.applyParetoConversion(data), ...rest };
|
|
7163
7168
|
}
|
|
7164
7169
|
if (chartType && chartType !== data.chartType) {
|
|
7165
7170
|
const adapted = pptx.chartDataChangeType(data, chartType);
|
|
@@ -7221,8 +7226,8 @@ function buildParetoInsertData() {
|
|
|
7221
7226
|
layout: "histogram",
|
|
7222
7227
|
binCount: PARETO_BIN_COUNT
|
|
7223
7228
|
};
|
|
7224
|
-
const bins =
|
|
7225
|
-
const ordered =
|
|
7229
|
+
const bins = chunkIURZJAWP_cjs.computeHistogramBins(PARETO_VALUES, histogramOptions);
|
|
7230
|
+
const ordered = chunkIURZJAWP_cjs.orderParetoEntries(
|
|
7226
7231
|
bins.map((bin, index) => ({ value: bin.value, label: bin.label, sourcePointIndex: index }))
|
|
7227
7232
|
);
|
|
7228
7233
|
return {
|
|
@@ -7235,7 +7240,7 @@ function buildParetoInsertData() {
|
|
|
7235
7240
|
},
|
|
7236
7241
|
{
|
|
7237
7242
|
name: "Cumulative %",
|
|
7238
|
-
values:
|
|
7243
|
+
values: chunkIURZJAWP_cjs.cumulativePercentOfTotal(ordered.map((entry5) => entry5.value)),
|
|
7239
7244
|
histogramOptions: { layout: "pareto" }
|
|
7240
7245
|
}
|
|
7241
7246
|
]
|
|
@@ -7498,7 +7503,7 @@ var FILL_PATTERN_LABEL_KEYS = {
|
|
|
7498
7503
|
trellis: "pptx.fillPatterns.trellis",
|
|
7499
7504
|
zigZag: "pptx.fillPatterns.zigZag"
|
|
7500
7505
|
};
|
|
7501
|
-
var PATTERN_PRESET_OPTIONS =
|
|
7506
|
+
var PATTERN_PRESET_OPTIONS = chunkIURZJAWP_cjs.OOXML_PATTERN_PRESETS.map(
|
|
7502
7507
|
(value) => ({ value, labelKey: FILL_PATTERN_LABEL_KEYS[value] })
|
|
7503
7508
|
);
|
|
7504
7509
|
|
|
@@ -7647,41 +7652,41 @@ var CHART_STYLE_PRESETS = [
|
|
|
7647
7652
|
id: "colorful",
|
|
7648
7653
|
labelKey: "pptx.chart.styleColorful",
|
|
7649
7654
|
styleId: 2,
|
|
7650
|
-
palette: () =>
|
|
7655
|
+
palette: () => chunkIURZJAWP_cjs.getChartStylePalette(2)
|
|
7651
7656
|
},
|
|
7652
7657
|
{
|
|
7653
7658
|
id: "monochrome",
|
|
7654
7659
|
labelKey: "pptx.chart.styleMonochrome",
|
|
7655
7660
|
styleId: 3,
|
|
7656
|
-
palette: () =>
|
|
7661
|
+
palette: () => chunkIURZJAWP_cjs.getChartStylePalette(3)
|
|
7657
7662
|
},
|
|
7658
7663
|
{
|
|
7659
7664
|
id: "colorfulLight",
|
|
7660
7665
|
labelKey: "pptx.chart.styleColorfulLight",
|
|
7661
7666
|
styleId: 18,
|
|
7662
|
-
palette: () => recolour((c) =>
|
|
7667
|
+
palette: () => recolour((c) => chunkIURZJAWP_cjs.tint(c, 0.3))
|
|
7663
7668
|
},
|
|
7664
7669
|
{
|
|
7665
7670
|
id: "colorfulDark",
|
|
7666
7671
|
labelKey: "pptx.chart.styleColorfulDark",
|
|
7667
7672
|
styleId: 26,
|
|
7668
|
-
palette: () => recolour((c) =>
|
|
7673
|
+
palette: () => recolour((c) => chunkIURZJAWP_cjs.shade(c, 0.3))
|
|
7669
7674
|
},
|
|
7670
7675
|
{
|
|
7671
7676
|
id: "mutedDark",
|
|
7672
7677
|
labelKey: "pptx.chart.styleMutedDark",
|
|
7673
7678
|
styleId: 34,
|
|
7674
|
-
palette: () => recolour((c) =>
|
|
7679
|
+
palette: () => recolour((c) => chunkIURZJAWP_cjs.shade(chunkIURZJAWP_cjs.tint(c, 0.3), 0.4))
|
|
7675
7680
|
},
|
|
7676
7681
|
{
|
|
7677
7682
|
id: "pastel",
|
|
7678
7683
|
labelKey: "pptx.chart.stylePastel",
|
|
7679
7684
|
styleId: 42,
|
|
7680
|
-
palette: () => recolour((c) =>
|
|
7685
|
+
palette: () => recolour((c) => chunkIURZJAWP_cjs.tint(c, 0.55))
|
|
7681
7686
|
}
|
|
7682
7687
|
];
|
|
7683
7688
|
function recolour(transform) {
|
|
7684
|
-
return
|
|
7689
|
+
return chunkIURZJAWP_cjs.getChartStylePalette(2).map(transform);
|
|
7685
7690
|
}
|
|
7686
7691
|
function chartStylePresetPalette(id) {
|
|
7687
7692
|
return findPreset(id)?.palette();
|
|
@@ -7795,7 +7800,7 @@ function applyChartElementToggle(chartData, key, checked) {
|
|
|
7795
7800
|
style: { ...chartData.style, ...chartDataLabelsTogglePatch(chartData.style, checked) }
|
|
7796
7801
|
});
|
|
7797
7802
|
case "gridlines":
|
|
7798
|
-
return patchChartData(chartData,
|
|
7803
|
+
return patchChartData(chartData, chunkIURZJAWP_cjs.chartGridlinesPatch(chartData, checked));
|
|
7799
7804
|
case "axes":
|
|
7800
7805
|
return patchChartData(chartData, chartAxesVisibilityPatch(chartData, checked));
|
|
7801
7806
|
case "axisTitles":
|
|
@@ -7834,7 +7839,7 @@ function buildElements(chartData) {
|
|
|
7834
7839
|
{
|
|
7835
7840
|
key: "gridlines",
|
|
7836
7841
|
labelKey: "pptx.chart.showGridlines",
|
|
7837
|
-
checked:
|
|
7842
|
+
checked: chunkIURZJAWP_cjs.chartGridlinesState(chartData)
|
|
7838
7843
|
},
|
|
7839
7844
|
{
|
|
7840
7845
|
key: "dataLabels",
|
|
@@ -8246,17 +8251,17 @@ function chartEventPathElements(event) {
|
|
|
8246
8251
|
}
|
|
8247
8252
|
function findChartPartElementInEvent(event) {
|
|
8248
8253
|
for (const el of chartEventPathElements(event)) {
|
|
8249
|
-
if (el.getAttribute(
|
|
8254
|
+
if (el.getAttribute(chunkWKLHJEPD_cjs.CHART_PART_ATTR) !== null) {
|
|
8250
8255
|
return el;
|
|
8251
8256
|
}
|
|
8252
8257
|
}
|
|
8253
8258
|
return null;
|
|
8254
8259
|
}
|
|
8255
8260
|
function findChartPartInEvent(event) {
|
|
8256
|
-
return
|
|
8261
|
+
return chunkWKLHJEPD_cjs.chartPartFromElement(findChartPartElementInEvent(event));
|
|
8257
8262
|
}
|
|
8258
8263
|
function isChartTitleEvent(event) {
|
|
8259
|
-
return findChartPartElementInEvent(event)?.getAttribute(
|
|
8264
|
+
return findChartPartElementInEvent(event)?.getAttribute(chunkWKLHJEPD_cjs.CHART_PART_ATTR) === "title";
|
|
8260
8265
|
}
|
|
8261
8266
|
|
|
8262
8267
|
// src/pptx/render/chart-interaction-mark-drag.ts
|
|
@@ -8291,14 +8296,14 @@ function advanceChartMarkDrag(state, clientX, clientY, rect3) {
|
|
|
8291
8296
|
return null;
|
|
8292
8297
|
}
|
|
8293
8298
|
const travelled = Math.hypot(clientX - state.startClientX, clientY - state.startClientY);
|
|
8294
|
-
if (!state.moved && travelled <
|
|
8299
|
+
if (!state.moved && travelled < chunkWKLHJEPD_cjs.CHART_DRAG_THRESHOLD_PX) {
|
|
8295
8300
|
return null;
|
|
8296
8301
|
}
|
|
8297
8302
|
if (rect3.width === 0 || rect3.height === 0) {
|
|
8298
8303
|
return null;
|
|
8299
8304
|
}
|
|
8300
8305
|
state.moved = true;
|
|
8301
|
-
const pointer = clientPointToViewBox(clientX, clientY, rect3, state.svgWidth, state.svgHeight), value =
|
|
8306
|
+
const pointer = clientPointToViewBox(clientX, clientY, rect3, state.svgWidth, state.svgHeight), value = chunkWKLHJEPD_cjs.resolveChartDragValue(state.geometry, pointer), chartData = chunkWKLHJEPD_cjs.withChartPointValue(
|
|
8302
8307
|
state.baseChartData,
|
|
8303
8308
|
state.part.seriesIndex,
|
|
8304
8309
|
state.part.pointIndex,
|
|
@@ -11864,7 +11869,7 @@ function getAnimationColorBaseStyle(element, options = {}) {
|
|
|
11864
11869
|
}
|
|
11865
11870
|
const style = {};
|
|
11866
11871
|
if (options.animatesFill) {
|
|
11867
|
-
const fill =
|
|
11872
|
+
const fill = chunkIURZJAWP_cjs.getComputedFillStyle(element, options.parentGroupFill);
|
|
11868
11873
|
style[ANIMATION_COLOR_BASE_PROPERTIES.fill] = fill?.backgroundColor ?? element.shapeStyle?.fillColor ?? "currentColor";
|
|
11869
11874
|
}
|
|
11870
11875
|
if (options.animatesStroke) {
|
|
@@ -19545,7 +19550,7 @@ function borderToCss(border2, resolve) {
|
|
|
19545
19550
|
const width = border2.width ?? 1;
|
|
19546
19551
|
const dash = ooxmlDashToCssBorderStyle(border2.dash);
|
|
19547
19552
|
const color = border2.color ?? resolve(border2.fill) ?? "#000000";
|
|
19548
|
-
return
|
|
19553
|
+
return chunkKRMMJUCO_cjs.screenBorder(width, dash, color);
|
|
19549
19554
|
}
|
|
19550
19555
|
function collectSections(entry5, tableData, pos) {
|
|
19551
19556
|
const { rowIndex, cellIndex, rowCount, columnCount } = pos;
|
|
@@ -19923,7 +19928,7 @@ function gradientCssFromFill(fill, colorScheme) {
|
|
|
19923
19928
|
position: stop.position
|
|
19924
19929
|
}))
|
|
19925
19930
|
};
|
|
19926
|
-
return
|
|
19931
|
+
return chunkIURZJAWP_cjs.buildGradientCss(shapeLike);
|
|
19927
19932
|
}
|
|
19928
19933
|
function applyStyleFill(fill, colorScheme, css, fallback) {
|
|
19929
19934
|
if (fill?.noFill) {
|
|
@@ -19949,13 +19954,13 @@ function applyStyleFill(fill, colorScheme, css, fallback) {
|
|
|
19949
19954
|
}
|
|
19950
19955
|
}
|
|
19951
19956
|
if (fill?.pattern) {
|
|
19952
|
-
const fg =
|
|
19957
|
+
const fg = chunkIURZJAWP_cjs.normalizeHexColor(
|
|
19953
19958
|
resolveStyleFillColor(fill.pattern.foreground, colorScheme),
|
|
19954
19959
|
"#000000"
|
|
19955
|
-
), bg =
|
|
19960
|
+
), bg = chunkIURZJAWP_cjs.normalizeHexColor(
|
|
19956
19961
|
resolveStyleFillColor(fill.pattern.background, colorScheme),
|
|
19957
19962
|
"#ffffff"
|
|
19958
|
-
), svg2 =
|
|
19963
|
+
), svg2 = chunkIURZJAWP_cjs.getPatternSvg(fill.pattern.preset, fg, bg);
|
|
19959
19964
|
clearBackground(css);
|
|
19960
19965
|
if (svg2) {
|
|
19961
19966
|
css.backgroundImage = `url("data:image/svg+xml,${encodeURIComponent(svg2)}")`;
|
|
@@ -19964,7 +19969,7 @@ function applyStyleFill(fill, colorScheme, css, fallback) {
|
|
|
19964
19969
|
return true;
|
|
19965
19970
|
}
|
|
19966
19971
|
const resolved = resolveStyleFillColor(fill, colorScheme);
|
|
19967
|
-
const color = (resolved && fill?.alpha !== void 0 ?
|
|
19972
|
+
const color = (resolved && fill?.alpha !== void 0 ? chunkIURZJAWP_cjs.colorWithOpacity(resolved, fill.alpha / 1e5) : resolved) ?? fallback;
|
|
19968
19973
|
if (color) {
|
|
19969
19974
|
layerSolidColor(css, color);
|
|
19970
19975
|
return true;
|
|
@@ -20348,8 +20353,8 @@ function getMeasureContext() {
|
|
|
20348
20353
|
return measureContext2;
|
|
20349
20354
|
}
|
|
20350
20355
|
function toCanvasFont2(font) {
|
|
20351
|
-
const size = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx :
|
|
20352
|
-
const family2 = font.fontFamily ||
|
|
20356
|
+
const size = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
20357
|
+
const family2 = font.fontFamily || chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY;
|
|
20353
20358
|
return `${font.italic ? "italic " : ""}${font.bold ? "bold " : ""}${size}px ${family2}`;
|
|
20354
20359
|
}
|
|
20355
20360
|
function advancesOf(ctx, canvasFont, chars) {
|
|
@@ -20542,7 +20547,7 @@ function resolveTextOutlineDashCss(s, fillColor) {
|
|
|
20542
20547
|
if (s.textFillGradient || s.textFillPattern || s.textFillBlipUrl || s.highlightColor) {
|
|
20543
20548
|
return void 0;
|
|
20544
20549
|
}
|
|
20545
|
-
const strokeColor =
|
|
20550
|
+
const strokeColor = chunkIURZJAWP_cjs.normalizeHexColor(s.textOutlineColor, fillColor ?? "#000000");
|
|
20546
20551
|
return {
|
|
20547
20552
|
WebkitTextStroke: `${width}px transparent`,
|
|
20548
20553
|
WebkitTextFillColor: s.textFillNone ? "transparent" : fillColor ?? "currentColor",
|
|
@@ -20706,13 +20711,13 @@ function applyExtraRunProps(style, s, text3, font) {
|
|
|
20706
20711
|
style.fontKerning = fontKerning;
|
|
20707
20712
|
}
|
|
20708
20713
|
if (s.highlightColor) {
|
|
20709
|
-
style.backgroundColor =
|
|
20714
|
+
style.backgroundColor = chunkIURZJAWP_cjs.normalizeHexColor(s.highlightColor, "transparent");
|
|
20710
20715
|
}
|
|
20711
20716
|
if (s.underlineColor) {
|
|
20712
|
-
style.textDecorationColor =
|
|
20717
|
+
style.textDecorationColor = chunkIURZJAWP_cjs.normalizeHexColor(s.underlineColor);
|
|
20713
20718
|
}
|
|
20714
20719
|
if (s.textOutlineWidth) {
|
|
20715
|
-
style.WebkitTextStroke = s.textOutlineColor ? `${s.textOutlineWidth}px ${
|
|
20720
|
+
style.WebkitTextStroke = s.textOutlineColor ? `${s.textOutlineWidth}px ${chunkIURZJAWP_cjs.normalizeHexColor(s.textOutlineColor, "#000000")}` : `${s.textOutlineWidth}px currentColor`;
|
|
20716
20721
|
style.paintOrder = "stroke fill";
|
|
20717
20722
|
}
|
|
20718
20723
|
if (s.textCaps === "all") {
|
|
@@ -20753,7 +20758,7 @@ function segmentStyleToCss(seg, fontScale = 1, context = {}) {
|
|
|
20753
20758
|
if (s.color) {
|
|
20754
20759
|
style.color = s.color;
|
|
20755
20760
|
} else if (s.hyperlink) {
|
|
20756
|
-
style.color =
|
|
20761
|
+
style.color = chunkIURZJAWP_cjs.HYPERLINK_COLOR;
|
|
20757
20762
|
}
|
|
20758
20763
|
style.fontWeight = s.bold ? "bold" : "normal";
|
|
20759
20764
|
style.fontStyle = s.italic ? "italic" : "normal";
|
|
@@ -20835,9 +20840,9 @@ function cellPatternFillCss(style) {
|
|
|
20835
20840
|
if (style.fillMode !== "pattern" || !style.patternFillPreset) {
|
|
20836
20841
|
return null;
|
|
20837
20842
|
}
|
|
20838
|
-
const fg =
|
|
20839
|
-
const bg =
|
|
20840
|
-
const svgMarkup =
|
|
20843
|
+
const fg = chunkIURZJAWP_cjs.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
20844
|
+
const bg = chunkIURZJAWP_cjs.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
20845
|
+
const svgMarkup = chunkIURZJAWP_cjs.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
20841
20846
|
if (svgMarkup) {
|
|
20842
20847
|
const encoded = encodeURIComponent(svgMarkup);
|
|
20843
20848
|
return {
|
|
@@ -21001,7 +21006,7 @@ function cellStyleToCss(style) {
|
|
|
21001
21006
|
const w = edge.width ?? 1;
|
|
21002
21007
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
21003
21008
|
const s = ooxmlDashToCssBorderStyle(edge.dash);
|
|
21004
|
-
css[edge.prefix] =
|
|
21009
|
+
css[edge.prefix] = chunkKRMMJUCO_cjs.screenBorder(w, s, c);
|
|
21005
21010
|
}
|
|
21006
21011
|
}
|
|
21007
21012
|
Object.assign(css, cellPaddingCss(style));
|
|
@@ -21223,7 +21228,7 @@ function tableCellCss(tableData, cell, position, context, base2) {
|
|
|
21223
21228
|
);
|
|
21224
21229
|
const css = { ...base2, ...band, ...cellStyleToCss(cell?.style) };
|
|
21225
21230
|
if (css.color === void 0) {
|
|
21226
|
-
css.color =
|
|
21231
|
+
css.color = chunkIURZJAWP_cjs.DEFAULT_TEXT_COLOR;
|
|
21227
21232
|
}
|
|
21228
21233
|
return { ...TABLE_CELL_TEXT_DEFAULTS, ...css };
|
|
21229
21234
|
}
|
|
@@ -21549,7 +21554,7 @@ var GRADIENT_TYPE_OPTIONS = [
|
|
|
21549
21554
|
{ value: "linear", i18nKey: "pptx.table.gradientLinear" },
|
|
21550
21555
|
{ value: "radial", i18nKey: "pptx.table.gradientRadial" }
|
|
21551
21556
|
];
|
|
21552
|
-
var PATTERN_OPTIONS =
|
|
21557
|
+
var PATTERN_OPTIONS = chunkIURZJAWP_cjs.OOXML_PATTERN_PRESETS.slice(0, 20);
|
|
21553
21558
|
|
|
21554
21559
|
// src/pptx/render/table-resize.ts
|
|
21555
21560
|
var MIN_COLUMN_PROPORTION = 0.03;
|
|
@@ -22293,10 +22298,10 @@ function imageFitTransformParts(el) {
|
|
|
22293
22298
|
return { placement: "", crop: "" };
|
|
22294
22299
|
}
|
|
22295
22300
|
return fitTransformsFromInsets({
|
|
22296
|
-
cropLeft:
|
|
22297
|
-
cropTop:
|
|
22298
|
-
cropRight:
|
|
22299
|
-
cropBottom:
|
|
22301
|
+
cropLeft: chunkIURZJAWP_cjs.clampCropValue(el.cropLeft),
|
|
22302
|
+
cropTop: chunkIURZJAWP_cjs.clampCropValue(el.cropTop),
|
|
22303
|
+
cropRight: chunkIURZJAWP_cjs.clampCropValue(el.cropRight),
|
|
22304
|
+
cropBottom: chunkIURZJAWP_cjs.clampCropValue(el.cropBottom),
|
|
22300
22305
|
fillRectLeft: el.fillRectLeft ?? 0,
|
|
22301
22306
|
fillRectTop: el.fillRectTop ?? 0,
|
|
22302
22307
|
fillRectRight: el.fillRectRight ?? 0,
|
|
@@ -22320,10 +22325,10 @@ function fitTransformsFromInsets(insets) {
|
|
|
22320
22325
|
if (hasCrop2) {
|
|
22321
22326
|
const horizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
|
|
22322
22327
|
const verticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
|
|
22323
|
-
cropLeft =
|
|
22324
|
-
cropRight =
|
|
22325
|
-
cropTop =
|
|
22326
|
-
cropBottom =
|
|
22328
|
+
cropLeft = chunkIURZJAWP_cjs.clampCropValue(cropLeft * horizontalScale);
|
|
22329
|
+
cropRight = chunkIURZJAWP_cjs.clampCropValue(cropRight * horizontalScale);
|
|
22330
|
+
cropTop = chunkIURZJAWP_cjs.clampCropValue(cropTop * verticalScale);
|
|
22331
|
+
cropBottom = chunkIURZJAWP_cjs.clampCropValue(cropBottom * verticalScale);
|
|
22327
22332
|
const remainingWidth = Math.max(0.01, 1 - cropLeft - cropRight);
|
|
22328
22333
|
const remainingHeight = Math.max(0.01, 1 - cropTop - cropBottom);
|
|
22329
22334
|
const tx = Math.round(-cropLeft / remainingWidth * 1e4) / 100;
|
|
@@ -22438,7 +22443,7 @@ function resolveShadeToTitleBackgroundImage(slide, slideWidthPx, slideHeightPx)
|
|
|
22438
22443
|
if (stops.length === 0) {
|
|
22439
22444
|
return void 0;
|
|
22440
22445
|
}
|
|
22441
|
-
return
|
|
22446
|
+
return chunkIURZJAWP_cjs.buildRectPathGradientImage(stops, void 0, fillToRect);
|
|
22442
22447
|
}
|
|
22443
22448
|
|
|
22444
22449
|
// src/pptx/render/slide-background.ts
|
|
@@ -22460,7 +22465,7 @@ function getSlideBackgroundStyle(slide, slideSize) {
|
|
|
22460
22465
|
style["background-repeat"] = "no-repeat";
|
|
22461
22466
|
}
|
|
22462
22467
|
} else if (pattern) {
|
|
22463
|
-
const svg2 =
|
|
22468
|
+
const svg2 = chunkIURZJAWP_cjs.getPatternSvg(
|
|
22464
22469
|
pattern.preset,
|
|
22465
22470
|
pattern.fgColor ?? solid ?? "#000000",
|
|
22466
22471
|
pattern.bgColor ?? DEFAULT_SLIDE_BACKGROUND
|
|
@@ -23868,12 +23873,12 @@ function buildRunTabLines(text3, ctx, nestedDecoration, measure2 = (t) => measur
|
|
|
23868
23873
|
// src/pptx/render/paragraph-run-enrich.ts
|
|
23869
23874
|
function resolveRunExtrasContext(input) {
|
|
23870
23875
|
const { seg, runFont, blockFont, blockScriptStyle, tabStops, defaultTabSize, rtl } = input;
|
|
23871
|
-
const baseFontFamily = runFont.fontFamily ?? blockFont.fontFamily ??
|
|
23876
|
+
const baseFontFamily = runFont.fontFamily ?? blockFont.fontFamily ?? chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY;
|
|
23872
23877
|
const scriptFonts = resolveScriptFontSet(seg.style, blockScriptStyle, baseFontFamily);
|
|
23873
23878
|
const tabContext = tabStops && tabStops.length > 0 ? buildTabContext(
|
|
23874
23879
|
tabStops,
|
|
23875
23880
|
defaultTabSize,
|
|
23876
|
-
runFont.fontSizePx ?? blockFont.fontSizePx ??
|
|
23881
|
+
runFont.fontSizePx ?? blockFont.fontSizePx ?? chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE,
|
|
23877
23882
|
baseFontFamily,
|
|
23878
23883
|
Boolean(seg.style?.bold),
|
|
23879
23884
|
Boolean(seg.style?.italic),
|
|
@@ -23905,7 +23910,7 @@ function resolveRunReflection(segStyle, blockFont) {
|
|
|
23905
23910
|
if (!segStyle) {
|
|
23906
23911
|
return void 0;
|
|
23907
23912
|
}
|
|
23908
|
-
const height = typeof segStyle.fontSize === "number" ? segStyle.fontSize : blockFont.fontSizePx ??
|
|
23913
|
+
const height = typeof segStyle.fontSize === "number" ? segStyle.fontSize : blockFont.fontSizePx ?? chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
23909
23914
|
return getTextReflectionWrapperStyle(segStyle, height);
|
|
23910
23915
|
}
|
|
23911
23916
|
function applyRunReflection(run, reflection2) {
|
|
@@ -24067,7 +24072,7 @@ function buildTextShadowCss(style) {
|
|
|
24067
24072
|
const ox = style.textShadowOffsetX ?? 0;
|
|
24068
24073
|
const oy = style.textShadowOffsetY ?? 0;
|
|
24069
24074
|
const blur = style.textShadowBlur ?? 4;
|
|
24070
|
-
const color =
|
|
24075
|
+
const color = chunkIURZJAWP_cjs.normalizeHexColor(style.textShadowColor, "#000000");
|
|
24071
24076
|
const opacity = style.textShadowOpacity ?? 0.5;
|
|
24072
24077
|
const r = parseInt(color.slice(1, 3), 16);
|
|
24073
24078
|
const g = parseInt(color.slice(3, 5), 16);
|
|
@@ -24080,7 +24085,7 @@ function buildTextShadowCss(style) {
|
|
|
24080
24085
|
const dirRad = dir * Math.PI / 180;
|
|
24081
24086
|
const psOx = Math.round(Math.cos(dirRad) * dist2 * 100) / 100;
|
|
24082
24087
|
const psOy = Math.round(Math.sin(dirRad) * dist2 * 100) / 100;
|
|
24083
|
-
const psColor =
|
|
24088
|
+
const psColor = chunkIURZJAWP_cjs.normalizeHexColor(style.textPresetShadowColor, "#000000");
|
|
24084
24089
|
const psOpacity = style.textPresetShadowOpacity ?? 0.5;
|
|
24085
24090
|
const psR = parseInt(psColor.slice(1, 3), 16);
|
|
24086
24091
|
const psG = parseInt(psColor.slice(3, 5), 16);
|
|
@@ -24097,7 +24102,7 @@ function buildTextInnerShadowCss(style) {
|
|
|
24097
24102
|
const ox = style.textInnerShadowOffsetX ?? 0;
|
|
24098
24103
|
const oy = style.textInnerShadowOffsetY ?? 0;
|
|
24099
24104
|
const blur = style.textInnerShadowBlur ?? 3;
|
|
24100
|
-
const color =
|
|
24105
|
+
const color = chunkIURZJAWP_cjs.normalizeHexColor(style.textInnerShadowColor, "#000000");
|
|
24101
24106
|
const opacity = style.textInnerShadowOpacity ?? 0.5;
|
|
24102
24107
|
const r = parseInt(color.slice(1, 3), 16);
|
|
24103
24108
|
const g = parseInt(color.slice(3, 5), 16);
|
|
@@ -24144,7 +24149,7 @@ function buildTextGlowFilter(style) {
|
|
|
24144
24149
|
return void 0;
|
|
24145
24150
|
}
|
|
24146
24151
|
const radius = style.textGlowRadius ?? 6;
|
|
24147
|
-
const color =
|
|
24152
|
+
const color = chunkIURZJAWP_cjs.normalizeHexColor(style.textGlowColor, "#ffff00");
|
|
24148
24153
|
const opacity = style.textGlowOpacity ?? 0.6;
|
|
24149
24154
|
const r = parseInt(color.slice(1, 3), 16);
|
|
24150
24155
|
const g = parseInt(color.slice(3, 5), 16);
|
|
@@ -24172,9 +24177,9 @@ function buildTextFillCss(style) {
|
|
|
24172
24177
|
};
|
|
24173
24178
|
}
|
|
24174
24179
|
if (style.textFillPattern) {
|
|
24175
|
-
const fg =
|
|
24176
|
-
const bg =
|
|
24177
|
-
const svgPattern =
|
|
24180
|
+
const fg = chunkIURZJAWP_cjs.normalizeHexColor(style.textFillPatternForeground, "#000000");
|
|
24181
|
+
const bg = chunkIURZJAWP_cjs.normalizeHexColor(style.textFillPatternBackground, "#ffffff");
|
|
24182
|
+
const svgPattern = chunkIURZJAWP_cjs.getPatternSvg(style.textFillPattern, fg, bg);
|
|
24178
24183
|
if (svgPattern) {
|
|
24179
24184
|
const encoded = encodeURIComponent(svgPattern);
|
|
24180
24185
|
return {
|
|
@@ -24319,15 +24324,15 @@ function resolveRunRuby(segment, baseFontSizePx, blockFont, baseColor) {
|
|
|
24319
24324
|
return void 0;
|
|
24320
24325
|
}
|
|
24321
24326
|
const authoredFamily = segment.rubyStyle?.fontFamily ?? segment.style?.fontFamily;
|
|
24322
|
-
const baseSize = Number.isFinite(baseFontSizePx) ? baseFontSizePx :
|
|
24327
|
+
const baseSize = Number.isFinite(baseFontSizePx) ? baseFontSizePx : chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
24323
24328
|
const style = {
|
|
24324
24329
|
fontSize: `${segment.rubyFontSize ?? baseSize * RUBY_SIZE_RATIO}px`,
|
|
24325
|
-
fontFamily: authoredFamily ? pptx.getSubstituteFontFamily(authoredFamily) : blockFont.fontFamily ??
|
|
24330
|
+
fontFamily: authoredFamily ? pptx.getSubstituteFontFamily(authoredFamily) : blockFont.fontFamily ?? chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY,
|
|
24326
24331
|
textAlign: rubyTextAlign(segment.rubyAlignment)
|
|
24327
24332
|
};
|
|
24328
24333
|
const color = segment.rubyStyle?.color;
|
|
24329
24334
|
if (color) {
|
|
24330
|
-
style.color =
|
|
24335
|
+
style.color = chunkIURZJAWP_cjs.normalizeHexColor(color, baseColor);
|
|
24331
24336
|
}
|
|
24332
24337
|
return { text: text3, style };
|
|
24333
24338
|
}
|
|
@@ -24399,7 +24404,7 @@ function buildParagraphRuns(input) {
|
|
|
24399
24404
|
bodyFontSizeRaw,
|
|
24400
24405
|
fontScale
|
|
24401
24406
|
);
|
|
24402
|
-
const fallbackFontSize = strutFontSize ?? blockFont.fontSizePx ??
|
|
24407
|
+
const fallbackFontSize = strutFontSize ?? blockFont.fontSizePx ?? chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
24403
24408
|
equationStyle.fontSize = `${fallbackFontSize}px`;
|
|
24404
24409
|
}
|
|
24405
24410
|
runs.push({
|
|
@@ -24436,7 +24441,7 @@ function buildParagraphRuns(input) {
|
|
|
24436
24441
|
});
|
|
24437
24442
|
const ruby = resolveRunRuby(
|
|
24438
24443
|
seg,
|
|
24439
|
-
typeof seg.style?.fontSize === "number" ? seg.style.fontSize : blockFont.fontSizePx ??
|
|
24444
|
+
typeof seg.style?.fontSize === "number" ? seg.style.fontSize : blockFont.fontSizePx ?? chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE,
|
|
24440
24445
|
blockFont,
|
|
24441
24446
|
typeof style.color === "string" ? style.color : void 0
|
|
24442
24447
|
);
|
|
@@ -24530,8 +24535,8 @@ function buildParagraphs(element, fieldContext, segmentOverrides, options) {
|
|
|
24530
24535
|
}
|
|
24531
24536
|
const fontScale = resolveAutoFitFontScale(element.textStyle);
|
|
24532
24537
|
const blockFont = {
|
|
24533
|
-
fontFamily: element.textStyle?.fontFamily ? pptx.getSubstituteFontFamily(element.textStyle.fontFamily) :
|
|
24534
|
-
fontSizePx: (element.textStyle?.fontSize ||
|
|
24538
|
+
fontFamily: element.textStyle?.fontFamily ? pptx.getSubstituteFontFamily(element.textStyle.fontFamily) : chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY,
|
|
24539
|
+
fontSizePx: (element.textStyle?.fontSize || chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE) * fontScale
|
|
24535
24540
|
};
|
|
24536
24541
|
const blockScriptStyle = element.textStyle;
|
|
24537
24542
|
const tabStops = element.textStyle?.tabStops;
|
|
@@ -27484,17 +27489,17 @@ function hasItalicRuns(element) {
|
|
|
27484
27489
|
);
|
|
27485
27490
|
}
|
|
27486
27491
|
function buildTextBlockStyle(element, options = {}) {
|
|
27487
|
-
const fallbackColor = options.fallbackColor ??
|
|
27492
|
+
const fallbackColor = options.fallbackColor ?? chunkIURZJAWP_cjs.DEFAULT_TEXT_COLOR;
|
|
27488
27493
|
if (!pptx.hasTextProperties(element)) {
|
|
27489
27494
|
return { color: fallbackColor };
|
|
27490
27495
|
}
|
|
27491
27496
|
const ts = element.textStyle;
|
|
27492
27497
|
const italic = hasItalicRuns(element);
|
|
27493
27498
|
const isRtl = ts?.rtl === true;
|
|
27494
|
-
const bodyTop = ts?.bodyInsetTop ??
|
|
27495
|
-
const bodyBottom = ts?.bodyInsetBottom ??
|
|
27496
|
-
const bodyLeft = ts?.bodyInsetLeft ??
|
|
27497
|
-
const bodyRight = ts?.bodyInsetRight ??
|
|
27499
|
+
const bodyTop = ts?.bodyInsetTop ?? chunkIURZJAWP_cjs.DEFAULT_BODY_INSET_TB_PX;
|
|
27500
|
+
const bodyBottom = ts?.bodyInsetBottom ?? chunkIURZJAWP_cjs.DEFAULT_BODY_INSET_TB_PX;
|
|
27501
|
+
const bodyLeft = ts?.bodyInsetLeft ?? chunkIURZJAWP_cjs.DEFAULT_BODY_INSET_LR_PX;
|
|
27502
|
+
const bodyRight = ts?.bodyInsetRight ?? chunkIURZJAWP_cjs.DEFAULT_BODY_INSET_LR_PX;
|
|
27498
27503
|
const hasParagraphIndents = (element.paragraphIndents?.length ?? 0) > 0;
|
|
27499
27504
|
const bodyIndent = hasParagraphIndents ? 0 : ts?.paragraphIndent || 0;
|
|
27500
27505
|
const bodyMarginLeft = hasParagraphIndents ? 0 : ts?.paragraphMarginLeft || 0;
|
|
@@ -27523,17 +27528,17 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
27523
27528
|
style.transformOrigin = "center";
|
|
27524
27529
|
}
|
|
27525
27530
|
}
|
|
27526
|
-
style.color = ts?.hyperlink ?
|
|
27531
|
+
style.color = ts?.hyperlink ? chunkIURZJAWP_cjs.normalizeHexColor(ts?.color, chunkIURZJAWP_cjs.HYPERLINK_COLOR) : chunkIURZJAWP_cjs.normalizeHexColor(ts?.color, fallbackColor);
|
|
27527
27532
|
if (!hasTextSegments && ts?.highlightColor) {
|
|
27528
|
-
style.backgroundColor =
|
|
27533
|
+
style.backgroundColor = chunkIURZJAWP_cjs.normalizeHexColor(ts.highlightColor, void 0);
|
|
27529
27534
|
}
|
|
27530
27535
|
style.textAlign = resolveCssTextAlign(ts?.align, isRtl) ?? "left";
|
|
27531
27536
|
style.direction = toCssVerticalDirection(ts?.textDirection) ?? (isRtl ? "rtl" : bodyLayoutStyle?.direction ?? "ltr");
|
|
27532
27537
|
if (isRtl) {
|
|
27533
27538
|
style.unicodeBidi = "plaintext";
|
|
27534
27539
|
}
|
|
27535
|
-
style.fontSize = ts?.fontSize ||
|
|
27536
|
-
style.fontFamily = ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily, pptx.parsePanoseString(ts.latinFontPanose)) :
|
|
27540
|
+
style.fontSize = ts?.fontSize || chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
27541
|
+
style.fontFamily = ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily, pptx.parsePanoseString(ts.latinFontPanose)) : chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY;
|
|
27537
27542
|
style.fontWeight = ts?.bold ? 700 : 400;
|
|
27538
27543
|
style.fontStyle = ts?.italic ? "italic" : "normal";
|
|
27539
27544
|
style.textDecorationLine = decorations.length > 0 ? decorations.join(" ") : "none";
|
|
@@ -27573,7 +27578,7 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
27573
27578
|
text: element.text ?? "",
|
|
27574
27579
|
width: element.width,
|
|
27575
27580
|
height: element.height,
|
|
27576
|
-
defaultFontSize:
|
|
27581
|
+
defaultFontSize: chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE
|
|
27577
27582
|
});
|
|
27578
27583
|
if (autoFit.fontSize !== void 0) {
|
|
27579
27584
|
style.fontSize = autoFit.fontSize;
|
|
@@ -27581,7 +27586,7 @@ function buildTextBlockStyle(element, options = {}) {
|
|
|
27581
27586
|
if (autoFit.lineHeight !== void 0) {
|
|
27582
27587
|
style.lineHeight = autoFit.lineHeight;
|
|
27583
27588
|
}
|
|
27584
|
-
const fontSizePx = typeof style.fontSize === "number" ? style.fontSize :
|
|
27589
|
+
const fontSizePx = typeof style.fontSize === "number" ? style.fontSize : chunkIURZJAWP_cjs.DEFAULT_TEXT_FONT_SIZE;
|
|
27585
27590
|
const lineHeightPx = lineHeightToPx(fontSizePx, style.lineHeight);
|
|
27586
27591
|
const contentHeightPx = element.height - style.paddingTop - style.paddingBottom;
|
|
27587
27592
|
Object.assign(style, resolveVertOverflowEllipsisStyle(ts, contentHeightPx, lineHeightPx));
|
|
@@ -30975,9 +30980,9 @@ function normalizeArrow(a) {
|
|
|
30975
30980
|
function buildConnectorGeometry(element, zIndex, routing) {
|
|
30976
30981
|
const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
30977
30982
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
30978
|
-
const strokeColor = ss?.strokeColor ??
|
|
30983
|
+
const strokeColor = ss?.strokeColor ?? chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR;
|
|
30979
30984
|
const strokeOpacity = ss?.strokeOpacity ?? 1;
|
|
30980
|
-
const dashArray =
|
|
30985
|
+
const dashArray = chunkIURZJAWP_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
30981
30986
|
const strokeLinecap = svgLineCap(ss?.lineCap);
|
|
30982
30987
|
const compoundOffsets = getCompoundLineOffsets(ss?.compoundLine, strokeWidth);
|
|
30983
30988
|
const compoundWidths = getCompoundLineWidths(ss?.compoundLine, strokeWidth);
|
|
@@ -37669,7 +37674,7 @@ function drawingShapeMeshOpacity(shape) {
|
|
|
37669
37674
|
// src/pptx/render/svg-text-lines.ts
|
|
37670
37675
|
var LINE_HEIGHT_RATIO = 1.2;
|
|
37671
37676
|
function centeredSvgTextLines(text3, fontSize, options = {}) {
|
|
37672
|
-
const lines = options.maxWidth !== void 0 ?
|
|
37677
|
+
const lines = options.maxWidth !== void 0 ? chunkIURZJAWP_cjs.wrapTextByEstimatedWidth(text3, options.maxWidth, fontSize) : text3.split("\n").filter((line4) => line4.length > 0);
|
|
37673
37678
|
const centerY = options.centerY ?? 0;
|
|
37674
37679
|
if (lines.length === 0) {
|
|
37675
37680
|
return [{ text: "", y: centerY }];
|
|
@@ -38466,7 +38471,7 @@ function buildObliqueLabels(layout, input) {
|
|
|
38466
38471
|
const { w, h, d } = layout.box;
|
|
38467
38472
|
const span = layout.range.max - layout.range.min;
|
|
38468
38473
|
const fontSize = input.fontSize;
|
|
38469
|
-
for (const v of
|
|
38474
|
+
for (const v of chunkIURZJAWP_cjs.axisTickValues({ ...layout.range, span })) {
|
|
38470
38475
|
const p = (v - layout.range.min) * layout.valueScale;
|
|
38471
38476
|
if (layout.horizontal) {
|
|
38472
38477
|
const at = screen2(layout, p, 0, 0);
|
|
@@ -38550,7 +38555,6 @@ var TOP_WITH_TITLE = 46.5 * PT2;
|
|
|
38550
38555
|
var TOP_NO_TITLE = 14 * PT2;
|
|
38551
38556
|
var BOTTOM_WITH_LEGEND = 57.5 * PT2;
|
|
38552
38557
|
var BOTTOM_NO_LEGEND = 31 * PT2;
|
|
38553
|
-
var DEFAULT_GAP_WIDTH = 150;
|
|
38554
38558
|
var DEFAULT_GAP_DEPTH = 150;
|
|
38555
38559
|
function resolveGrouping(chartData) {
|
|
38556
38560
|
const g = chartData.grouping;
|
|
@@ -38589,7 +38593,7 @@ function dataExtent(chartData, grouping, nCat) {
|
|
|
38589
38593
|
function valueRange(chartData, grouping, nCat, valueLengthPx) {
|
|
38590
38594
|
const axis = chartData.axes?.find((a) => a.axisType === "valAx");
|
|
38591
38595
|
const [lo, hi] = dataExtent(chartData, grouping, nCat);
|
|
38592
|
-
const auto =
|
|
38596
|
+
const auto = chunkIURZJAWP_cjs.niceValueAxisBounds(lo, hi, chunkIURZJAWP_cjs.axisTargetIntervals(valueLengthPx), 0);
|
|
38593
38597
|
const min = typeof axis?.min === "number" ? axis.min : auto.min;
|
|
38594
38598
|
let max = typeof axis?.max === "number" ? axis.max : auto.max;
|
|
38595
38599
|
if (max <= min) {
|
|
@@ -38613,22 +38617,22 @@ function computeObliqueBarLayout(element, vm) {
|
|
|
38613
38617
|
const rotX = (chartData.view3D?.rotX ?? 15) * Math.PI / 180;
|
|
38614
38618
|
const rotY = (chartData.view3D?.rotY ?? 20) * Math.PI / 180;
|
|
38615
38619
|
const shear = { x: Math.sin(rotY), y: -Math.sin(rotX) };
|
|
38616
|
-
const gapWidth = (chartData.barGapWidth ??
|
|
38620
|
+
const gapWidth = (chartData.barGapWidth ?? chunkIURZJAWP_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
|
|
38617
38621
|
const gapDepth = (chartData.gapDepth ?? DEFAULT_GAP_DEPTH) / 100;
|
|
38618
38622
|
const slots = grouping === "clustered" ? nSer : 1;
|
|
38619
38623
|
const rows = grouping === "standard" ? nSer : 1;
|
|
38620
38624
|
const labelFont = vm.axisLabels[0]?.fontSize ?? 16;
|
|
38621
38625
|
const catLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: nCat }, (_, i) => String(i + 1));
|
|
38622
|
-
const widest = (texts) => texts.reduce((m, t) => Math.max(m,
|
|
38626
|
+
const widest = (texts) => texts.reduce((m, t) => Math.max(m, chunkIURZJAWP_cjs.estimateTextWidth(t, labelFont)), 0);
|
|
38623
38627
|
const top = vm.title ? TOP_WITH_TITLE : TOP_NO_TITLE;
|
|
38624
38628
|
const hasBottomLegend = chartData.style?.hasLegend !== false && (chartData.style?.legendPosition ?? "b") === "b";
|
|
38625
38629
|
const bottom = vm.svgHeight - (hasBottomLegend ? BOTTOM_WITH_LEGEND : BOTTOM_NO_LEGEND);
|
|
38626
38630
|
const regionH = Math.max(1, bottom - top);
|
|
38627
38631
|
const provisional = valueRange(chartData, grouping, nCat, regionH);
|
|
38628
|
-
const valueTexts =
|
|
38632
|
+
const valueTexts = chunkIURZJAWP_cjs.axisTickValues({
|
|
38629
38633
|
...provisional,
|
|
38630
38634
|
span: provisional.max - provisional.min
|
|
38631
|
-
}).map((v) =>
|
|
38635
|
+
}).map((v) => chunkWKLHJEPD_cjs.formatValueLabel(chartData, grouping, v));
|
|
38632
38636
|
const leftBand = (horizontal ? widest(catLabels) : widest(valueTexts)) + (horizontal ? OBLIQUE_CATEGORY_LABEL_GAP : OBLIQUE_VALUE_LABEL_GAP);
|
|
38633
38637
|
const seriesLabelW = grouping === "standard" && !horizontal ? widest(chartData.series.map((s) => s.name)) : 0;
|
|
38634
38638
|
const seriesOverhang = (depth2) => seriesLabelW > 0 ? Math.max(0, OBLIQUE_CATEGORY_LABEL_GAP + seriesLabelW - depth2 * shear.x / (2 * rows)) : 0;
|
|
@@ -38684,13 +38688,13 @@ function computeObliqueBarLayout(element, vm) {
|
|
|
38684
38688
|
gridlines: [],
|
|
38685
38689
|
labels: []
|
|
38686
38690
|
};
|
|
38687
|
-
layout.bars =
|
|
38688
|
-
layout.gridlines =
|
|
38691
|
+
layout.bars = chunkWKLHJEPD_cjs.buildBars(chartData, vm, layout, { nCat, slots, rows, gapWidth, gapDepth });
|
|
38692
|
+
layout.gridlines = chunkWKLHJEPD_cjs.buildGridlines(layout);
|
|
38689
38693
|
layout.labels = buildObliqueLabels(layout, {
|
|
38690
38694
|
fontSize: labelFont,
|
|
38691
38695
|
categories: catLabels,
|
|
38692
38696
|
seriesNames: chartData.series.map((s) => s.name),
|
|
38693
|
-
valueText: (v) =>
|
|
38697
|
+
valueText: (v) => chunkWKLHJEPD_cjs.formatValueLabel(chartData, grouping, v)
|
|
38694
38698
|
});
|
|
38695
38699
|
return layout;
|
|
38696
38700
|
}
|
|
@@ -38703,7 +38707,7 @@ function buildPerspGridlines(box, range, horizontal) {
|
|
|
38703
38707
|
{ from: [w, 0, 0], to: [w, 0, d] }
|
|
38704
38708
|
];
|
|
38705
38709
|
const span = range.max - range.min;
|
|
38706
|
-
for (const v of
|
|
38710
|
+
for (const v of chunkIURZJAWP_cjs.axisTickValues({ ...range, span })) {
|
|
38707
38711
|
const t = (v - range.min) / span;
|
|
38708
38712
|
if (horizontal) {
|
|
38709
38713
|
const x = t * w;
|
|
@@ -38729,11 +38733,11 @@ function buildPerspLabels(layout, input) {
|
|
|
38729
38733
|
const span = range.max - range.min;
|
|
38730
38734
|
const labels = [];
|
|
38731
38735
|
const fontSize = input.fontSize;
|
|
38732
|
-
for (const v of
|
|
38736
|
+
for (const v of chunkIURZJAWP_cjs.axisTickValues({ ...range, span })) {
|
|
38733
38737
|
const t = (v - range.min) / span;
|
|
38734
|
-
const text3 = input.percent ? `${Math.round(v * 100)}%` :
|
|
38738
|
+
const text3 = input.percent ? `${Math.round(v * 100)}%` : chunkIURZJAWP_cjs.formatAxisValueWithUnits(v, input.valueAxis);
|
|
38735
38739
|
if (layout.horizontal) {
|
|
38736
|
-
const at =
|
|
38740
|
+
const at = chunkWKLHJEPD_cjs.perspToScreen(view, [t * w, 0, 0]);
|
|
38737
38741
|
labels.push({
|
|
38738
38742
|
role: "value",
|
|
38739
38743
|
text: text3,
|
|
@@ -38743,7 +38747,7 @@ function buildPerspLabels(layout, input) {
|
|
|
38743
38747
|
fontSize
|
|
38744
38748
|
});
|
|
38745
38749
|
} else {
|
|
38746
|
-
const at =
|
|
38750
|
+
const at = chunkWKLHJEPD_cjs.perspToScreen(view, [0, t * h, 0]);
|
|
38747
38751
|
labels.push({ role: "value", text: text3, x: at.x - VALUE_GAP2, y: at.y, anchor: "end", fontSize });
|
|
38748
38752
|
}
|
|
38749
38753
|
}
|
|
@@ -38753,7 +38757,7 @@ function buildPerspLabels(layout, input) {
|
|
|
38753
38757
|
return;
|
|
38754
38758
|
}
|
|
38755
38759
|
if (layout.horizontal) {
|
|
38756
|
-
const at2 =
|
|
38760
|
+
const at2 = chunkWKLHJEPD_cjs.perspToScreen(view, [0, pos, 0]);
|
|
38757
38761
|
labels.push({
|
|
38758
38762
|
role: "category",
|
|
38759
38763
|
text: text3,
|
|
@@ -38764,7 +38768,7 @@ function buildPerspLabels(layout, input) {
|
|
|
38764
38768
|
});
|
|
38765
38769
|
return;
|
|
38766
38770
|
}
|
|
38767
|
-
const at =
|
|
38771
|
+
const at = chunkWKLHJEPD_cjs.perspToScreen(view, [pos, 0, 0]);
|
|
38768
38772
|
labels.push({
|
|
38769
38773
|
role: "category",
|
|
38770
38774
|
text: text3,
|
|
@@ -38777,7 +38781,7 @@ function buildPerspLabels(layout, input) {
|
|
|
38777
38781
|
const rows = input.seriesNames.length;
|
|
38778
38782
|
input.seriesNames.forEach((text3, s) => {
|
|
38779
38783
|
const z = layout.kind === "surface" ? rows > 1 ? s / (rows - 1) * d : d / 2 : (s + 0.5) / rows * d;
|
|
38780
|
-
const at =
|
|
38784
|
+
const at = chunkWKLHJEPD_cjs.perspToScreen(view, [w, 0, z]);
|
|
38781
38785
|
labels.push({
|
|
38782
38786
|
role: "series",
|
|
38783
38787
|
text: text3,
|
|
@@ -38801,7 +38805,7 @@ var RECT_TOP_WITH_TITLE = 48 * PT4;
|
|
|
38801
38805
|
var RECT_TOP_NO_TITLE = 14 * PT4;
|
|
38802
38806
|
var RECT_BOTTOM_WITH_LEGEND = 62 * PT4;
|
|
38803
38807
|
var RECT_BOTTOM_NO_LEGEND = 31 * PT4;
|
|
38804
|
-
var
|
|
38808
|
+
var DEFAULT_GAP_DEPTH2 = 150;
|
|
38805
38809
|
var HORIZONTAL_CATEGORY_EXTENT = 0.483;
|
|
38806
38810
|
var DEPTH_FIT_MULTI_ROW = 0.96;
|
|
38807
38811
|
var DEPTH_FIT_SINGLE_ROW = 1.04;
|
|
@@ -38870,8 +38874,8 @@ function computePerspChartLayout(element, vm, options = {}) {
|
|
|
38870
38874
|
const valAx = chartData.axes?.find((a) => a.axisType === "valAx");
|
|
38871
38875
|
const midCat = (valAx?.crossBetween ?? (kind === "area" || kind === "surface" ? "midCat" : "between")) === "midCat";
|
|
38872
38876
|
const view3D = chartData.view3D;
|
|
38873
|
-
const gapWidth = (chartData.barGapWidth ??
|
|
38874
|
-
const gapDepth = (chartData.gapDepth ??
|
|
38877
|
+
const gapWidth = (chartData.barGapWidth ?? chunkIURZJAWP_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
|
|
38878
|
+
const gapDepth = (chartData.gapDepth ?? DEFAULT_GAP_DEPTH2) / 100;
|
|
38875
38879
|
const slot = 1 / nCat;
|
|
38876
38880
|
const rows = kind === "surface" ? nSer : grouping === "standard" ? nSer : 1;
|
|
38877
38881
|
const markDepth = slot / (1 + gapWidth);
|
|
@@ -38883,16 +38887,16 @@ function computePerspChartLayout(element, vm, options = {}) {
|
|
|
38883
38887
|
const valueExtent = horizontal ? 1 : baseHeight * heightScale;
|
|
38884
38888
|
const catExtent = horizontal ? HORIZONTAL_CATEGORY_EXTENT * heightScale : 1;
|
|
38885
38889
|
const box = horizontal ? { w: valueExtent, h: catExtent, d } : { w: 1, h: valueExtent, d };
|
|
38886
|
-
const camera = options.oblique ?
|
|
38890
|
+
const camera = options.oblique ? chunkWKLHJEPD_cjs.perspObliqueCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20) : chunkWKLHJEPD_cjs.perspCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20, view3D?.perspective ?? void 0);
|
|
38887
38891
|
const hasLegend = chartData.style?.hasLegend !== false && (chartData.style?.legendPosition ?? "b") === "b";
|
|
38888
|
-
const view =
|
|
38892
|
+
const view = chunkWKLHJEPD_cjs.fitPerspView(camera, {
|
|
38889
38893
|
left: RECT_LEFT,
|
|
38890
38894
|
right: vm.svgWidth - (rows > 1 ? RECT_RIGHT_WITH_SERIES : RECT_RIGHT_NO_SERIES),
|
|
38891
38895
|
top: vm.title ? RECT_TOP_WITH_TITLE : RECT_TOP_NO_TITLE,
|
|
38892
38896
|
bottom: vm.svgHeight - (hasLegend ? RECT_BOTTOM_WITH_LEGEND : RECT_BOTTOM_NO_LEGEND)
|
|
38893
38897
|
});
|
|
38894
38898
|
const [lo, hi] = dataExtent2(chartData, grouping, nCat);
|
|
38895
|
-
const auto =
|
|
38899
|
+
const auto = chunkIURZJAWP_cjs.niceValueAxisBounds(lo, hi, chunkIURZJAWP_cjs.axisTargetIntervals(view.focal * valueExtent), 0);
|
|
38896
38900
|
const min = typeof valAx?.min === "number" ? valAx.min : auto.min;
|
|
38897
38901
|
let max = typeof valAx?.max === "number" ? valAx.max : auto.max;
|
|
38898
38902
|
if (max <= min) {
|
|
@@ -38984,7 +38988,7 @@ function buildBarGeometry(element, vm) {
|
|
|
38984
38988
|
}
|
|
38985
38989
|
var PERSP_BOX_TYPES = /* @__PURE__ */ new Set(["line3D", "area3D", "surface", "bar3D"]);
|
|
38986
38990
|
function buildPieGeometry(element, vm) {
|
|
38987
|
-
const layout =
|
|
38991
|
+
const layout = chunkWKLHJEPD_cjs.computePieChartLayout(element, chunkWKLHJEPD_cjs.widenPieViewModel(vm, element));
|
|
38988
38992
|
return layout ? { kind: "pie", layout } : null;
|
|
38989
38993
|
}
|
|
38990
38994
|
function buildPerspGeometry(element, vm, oblique) {
|
|
@@ -39004,7 +39008,7 @@ function buildChart3DSpecForElement(element) {
|
|
|
39004
39008
|
if (!chartData || !is3DChartType(chartType)) {
|
|
39005
39009
|
return null;
|
|
39006
39010
|
}
|
|
39007
|
-
const vm =
|
|
39011
|
+
const vm = chunkIURZJAWP_cjs.buildChartViewModel(element);
|
|
39008
39012
|
const projection = resolveChart3DProjection(chartType, chartData.view3D);
|
|
39009
39013
|
const geometry = chartType === "bar3D" && projection.mode === "oblique" ? buildBarGeometry(element, vm) : PERSP_BOX_TYPES.has(chartType) && (projection.mode === "perspective" || chartType !== "bar3D") ? buildPerspGeometry(element, vm, projection.mode === "oblique") : chartType === "pie3D" ? buildPieGeometry(element, vm) : null;
|
|
39010
39014
|
if (!geometry) {
|
|
@@ -53102,7 +53106,7 @@ function axisTitle(current, show) {
|
|
|
53102
53106
|
return show ? current || AXIS_TITLE : void 0;
|
|
53103
53107
|
}
|
|
53104
53108
|
function applyChartQuickLayout(chartData, layout) {
|
|
53105
|
-
const withGrid = patchChartData(chartData,
|
|
53109
|
+
const withGrid = patchChartData(chartData, chunkIURZJAWP_cjs.chartGridlinesPatch(chartData, layout.majorGridlines));
|
|
53106
53110
|
const axes = (withGrid.axes ?? []).map((axis) => {
|
|
53107
53111
|
if (axis.axisType === "valAx") {
|
|
53108
53112
|
return {
|
|
@@ -53156,7 +53160,7 @@ function matchesLayout(chartData, layout) {
|
|
|
53156
53160
|
const legend = style.hasLegend ? style.legendPosition ?? "r" : null;
|
|
53157
53161
|
const isBar = chartData.chartType === "bar" || chartData.chartType === "bar3D";
|
|
53158
53162
|
const barMatches = !isBar || (chartData.barGapWidth ?? 150) === layout.gapWidth && (chartData.barOverlap ?? 0) === layout.overlap;
|
|
53159
|
-
return barMatches && Boolean(style.hasTitle) === layout.title && legend === layout.legend && Boolean(style.hasDataLabels) === layout.dataLabels && Boolean(chartData.dataTable) === layout.dataTable && Boolean(catAxis?.titleText) === layout.catAxisTitle && Boolean(valAxis?.titleText) === layout.valAxisTitle &&
|
|
53163
|
+
return barMatches && Boolean(style.hasTitle) === layout.title && legend === layout.legend && Boolean(style.hasDataLabels) === layout.dataLabels && Boolean(chartData.dataTable) === layout.dataTable && Boolean(catAxis?.titleText) === layout.catAxisTitle && Boolean(valAxis?.titleText) === layout.valAxisTitle && chunkIURZJAWP_cjs.chartGridlinesState(chartData) === layout.majorGridlines && Boolean(valAxis?.minorGridlines) === layout.minorGridlines && !valAxis?.deleted === layout.valueAxis;
|
|
53160
53164
|
}
|
|
53161
53165
|
var CHART_QUICK_LAYOUT_GALLERY = {
|
|
53162
53166
|
build(ctx) {
|
|
@@ -58605,7 +58609,7 @@ function isSeriesUsingSecondaryAxis(chartData, seriesIndex) {
|
|
|
58605
58609
|
if (!series) {
|
|
58606
58610
|
return false;
|
|
58607
58611
|
}
|
|
58608
|
-
return
|
|
58612
|
+
return chunkIURZJAWP_cjs.isSeriesOnSecondaryAxis(series, chartData.axes);
|
|
58609
58613
|
}
|
|
58610
58614
|
function resolveSecondaryAxisId(chartData, useSecondary) {
|
|
58611
58615
|
const axPos = useSecondary ? "r" : "l";
|
|
@@ -59143,11 +59147,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
|
|
|
59143
59147
|
backgroundColor,
|
|
59144
59148
|
readComputedStyle = (el) => window.getComputedStyle(el)
|
|
59145
59149
|
} = options;
|
|
59146
|
-
await
|
|
59150
|
+
await chunkKRMMJUCO_cjs.settleThreeViews(element);
|
|
59147
59151
|
const clone = element.cloneNode(true);
|
|
59148
|
-
|
|
59149
|
-
|
|
59150
|
-
|
|
59152
|
+
chunkKRMMJUCO_cjs.withAuthoredStrokeWidths(
|
|
59153
|
+
element,
|
|
59154
|
+
() => inlineComputedStylesOnClone(element, clone, readComputedStyle)
|
|
59155
|
+
);
|
|
59156
|
+
chunkKRMMJUCO_cjs.snapshotThreeViewsIntoClone(element, clone);
|
|
59157
|
+
chunkKRMMJUCO_cjs.prepareExportClone(clone);
|
|
59151
59158
|
const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
|
|
59152
59159
|
embedImagesOnClone(clone),
|
|
59153
59160
|
collectExternalFontFaceCss(doc, fetchAsDataUrl)
|
|
@@ -64482,6 +64489,37 @@ function buildTitleBarState(input) {
|
|
|
64482
64489
|
};
|
|
64483
64490
|
}
|
|
64484
64491
|
|
|
64492
|
+
// src/pptx/render/tab-row-actions.ts
|
|
64493
|
+
function buildTabRowActionsState(input) {
|
|
64494
|
+
const t = input.translate;
|
|
64495
|
+
const share = t("pptx.toolbar.share");
|
|
64496
|
+
return {
|
|
64497
|
+
commentsLabel: t("pptx.toolbar.comments"),
|
|
64498
|
+
commentsTitle: t("pptx.toolbar.comments"),
|
|
64499
|
+
commentsPressed: input.commentsOpen,
|
|
64500
|
+
commentsCount: Math.max(0, input.commentCount ?? 0),
|
|
64501
|
+
noComments: !input.showComments,
|
|
64502
|
+
shareLabel: share,
|
|
64503
|
+
shareTitle: input.isCollaborating && input.collaboratorCount !== void 0 ? t("pptx.toolbar.sharingUsers", { count: input.collaboratorCount }) : share,
|
|
64504
|
+
sharePressed: input.isCollaborating,
|
|
64505
|
+
noShare: !input.showShare
|
|
64506
|
+
};
|
|
64507
|
+
}
|
|
64508
|
+
function tabRowActionsAttributes(state) {
|
|
64509
|
+
const flag2 = (on) => on ? "" : void 0;
|
|
64510
|
+
return {
|
|
64511
|
+
"comments-label": state.commentsLabel,
|
|
64512
|
+
"comments-title": state.commentsTitle,
|
|
64513
|
+
"comments-pressed": flag2(state.commentsPressed),
|
|
64514
|
+
"comments-count": String(state.commentsCount),
|
|
64515
|
+
"no-comments": flag2(state.noComments),
|
|
64516
|
+
"share-label": state.shareLabel,
|
|
64517
|
+
"share-title": state.shareTitle,
|
|
64518
|
+
"share-pressed": flag2(state.sharePressed),
|
|
64519
|
+
"no-share": flag2(state.noShare)
|
|
64520
|
+
};
|
|
64521
|
+
}
|
|
64522
|
+
|
|
64485
64523
|
// src/pptx/render/slide-sorter-state.ts
|
|
64486
64524
|
function createSlideSorterState(slides, active2) {
|
|
64487
64525
|
return {
|
|
@@ -65623,6 +65661,8 @@ var OFFICE_TOKENS = {
|
|
|
65623
65661
|
"--office-font-size-md": "14px",
|
|
65624
65662
|
"--office-font-size-lg": "15px",
|
|
65625
65663
|
"--office-font-size-xl": "18px",
|
|
65664
|
+
/** Smallest text size that keeps mobile browsers from zooming a focused field. */
|
|
65665
|
+
"--office-font-size-touch": "16px",
|
|
65626
65666
|
"--office-font-weight-medium": "500",
|
|
65627
65667
|
"--office-font-weight-bold": "600",
|
|
65628
65668
|
"--office-line-height": "1.4",
|
|
@@ -65655,6 +65695,8 @@ var OFFICE_TOKENS = {
|
|
|
65655
65695
|
// Sizes
|
|
65656
65696
|
"--office-target-size": "28px",
|
|
65657
65697
|
"--office-target-size-touch": "44px",
|
|
65698
|
+
/** Minimum pointer target on touch layouts. */
|
|
65699
|
+
"--office-touch-target": "36px",
|
|
65658
65700
|
"--office-control-height": "24px",
|
|
65659
65701
|
"--office-control-height-md": "28px",
|
|
65660
65702
|
"--office-control-height-lg": "32px",
|
|
@@ -66144,7 +66186,8 @@ var BUILT_IN = {
|
|
|
66144
66186
|
warning: "M10 3l7.5 13H2.5ZM10 8v3.5M10 14v.1",
|
|
66145
66187
|
info: "M3 10a7 7 0 1 0 14 0 7 7 0 1 0-14 0M10 9v4.5M10 6.3v.1",
|
|
66146
66188
|
restore: "M3.5 10a6.5 6.5 0 1 0 2-4.6M3.5 3v3.5H7M10 6.5v3.8l2.5 1.6",
|
|
66147
|
-
print: "M5.5 7.5V3h9v4.5M5.5 14.5H3V8h14v6.5h-2.5M5.5 12h9v5h-9Z"
|
|
66189
|
+
print: "M5.5 7.5V3h9v4.5M5.5 14.5H3V8h14v6.5h-2.5M5.5 12h9v5h-9Z",
|
|
66190
|
+
share: "m12 4 5 5-5 5M17 9h-6a7 7 0 0 0-7 7"
|
|
66148
66191
|
};
|
|
66149
66192
|
for (const [name, d] of Object.entries(BUILT_IN)) registry.set(name, { d });
|
|
66150
66193
|
function registerIcon(name, icon2) {
|
|
@@ -66884,6 +66927,72 @@ var OfficeUiSearch = class extends OfficeElement {
|
|
|
66884
66927
|
};
|
|
66885
66928
|
var defineSearchField = definer("office-ui-search", () => OfficeUiSearch);
|
|
66886
66929
|
|
|
66930
|
+
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/ribbon/ribbon-actions.css?raw
|
|
66931
|
+
var ribbon_actions_default = ":host {\n display: inline-flex;\n flex: none;\n align-items: center;\n gap: var(--office-space-1-5);\n padding-inline-start: var(--office-space-2);\n color: var(--office-foreground);\n font: inherit;\n font-size: var(--office-font-size);\n}\n[hidden] {\n display: none !important;\n}\n.glyph {\n flex: none;\n width: var(--office-icon-size-md);\n height: var(--office-icon-size-md);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.glyph:not([data-painted]) {\n display: none;\n}\n.mode {\n position: relative;\n display: inline-flex;\n align-items: center;\n height: var(--office-control-height-md);\n}\n.mode > .glyph {\n position: absolute;\n inset-inline-start: var(--office-space-2);\n pointer-events: none;\n}\n.mode-select {\n height: var(--office-control-height-md);\n padding: 0 var(--office-space-1-5) 0 calc(var(--office-space-2) * 2 + var(--office-icon-size-md));\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-sm);\n background: var(--office-background);\n color: var(--office-foreground);\n font: inherit;\n cursor: pointer;\n}\nbutton {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-1-5);\n height: var(--office-control-height-md);\n padding: 0 var(--office-space-2-5);\n border: var(--office-border-width) solid var(--office-border);\n border-radius: var(--office-radius-sm);\n background: transparent;\n color: var(--office-foreground);\n font: inherit;\n white-space: nowrap;\n cursor: pointer;\n}\n.comments:hover {\n background: var(--office-surface);\n}\n.comments[aria-pressed='true'] {\n background: var(--office-selected);\n}\n.badge {\n min-width: var(--office-space-4);\n padding: 0 var(--office-space-1);\n border-radius: var(--office-radius-full);\n background: var(--office-accent);\n color: var(--office-accent-foreground);\n font-size: var(--office-font-size-2xs);\n line-height: var(--office-space-4);\n text-align: center;\n}\n.share {\n padding: 0 var(--office-space-3);\n border-color: var(--office-accent);\n background: var(--office-accent);\n color: var(--office-accent-foreground);\n}\n.share:hover,\n.share[aria-pressed='true'] {\n /* Darkened here rather than read from --office-accent-hover, which resolves where the theme\n is installed and so would miss a product's own accent. */\n filter: brightness(0.88);\n}\n.mode-select:focus-visible,\nbutton:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n/* Narrow windows keep the icons and drop the labels, as Office's simplified layout does. */\n@media (max-width: 900px) {\n .label {\n display: none;\n }\n button {\n padding: 0 var(--office-space-1-5);\n }\n}\n";
|
|
66932
|
+
|
|
66933
|
+
// src/ribbon/ribbon-actions.ts
|
|
66934
|
+
var OfficeUiRibbonActions = class extends OfficeElement {
|
|
66935
|
+
static modeEvent = "office-ribbon-mode";
|
|
66936
|
+
static commentsEvent = "office-ribbon-comments";
|
|
66937
|
+
static shareEvent = "office-ribbon-share";
|
|
66938
|
+
static styles = controlStyles(ribbon_actions_default);
|
|
66939
|
+
static properties = {
|
|
66940
|
+
modes: { attribute: false },
|
|
66941
|
+
mode: { type: String },
|
|
66942
|
+
modeLabel: { attribute: "mode-label", type: String },
|
|
66943
|
+
commentsLabel: { attribute: "comments-label", type: String },
|
|
66944
|
+
commentsTitle: { attribute: "comments-title", type: String },
|
|
66945
|
+
commentsPressed: { attribute: "comments-pressed", ...flag },
|
|
66946
|
+
commentsCount: { attribute: "comments-count", type: Number },
|
|
66947
|
+
noComments: { attribute: "no-comments", ...flag },
|
|
66948
|
+
shareLabel: { attribute: "share-label", type: String },
|
|
66949
|
+
shareTitle: { attribute: "share-title", type: String },
|
|
66950
|
+
sharePressed: { attribute: "share-pressed", ...flag },
|
|
66951
|
+
noShare: { attribute: "no-share", ...flag }
|
|
66952
|
+
};
|
|
66953
|
+
constructor() {
|
|
66954
|
+
super();
|
|
66955
|
+
this.modes = [];
|
|
66956
|
+
this.mode = "";
|
|
66957
|
+
this.modeLabel = "Editing mode";
|
|
66958
|
+
this.commentsLabel = "Comments";
|
|
66959
|
+
this.commentsTitle = null;
|
|
66960
|
+
this.commentsPressed = false;
|
|
66961
|
+
this.commentsCount = 0;
|
|
66962
|
+
this.noComments = false;
|
|
66963
|
+
this.shareLabel = "Share";
|
|
66964
|
+
this.shareTitle = null;
|
|
66965
|
+
this.sharePressed = false;
|
|
66966
|
+
this.noShare = false;
|
|
66967
|
+
}
|
|
66968
|
+
/** The rendered control of a part, or null before the first render. */
|
|
66969
|
+
control(part) {
|
|
66970
|
+
return this.renderRoot.querySelector(`[part="${part}"]`);
|
|
66971
|
+
}
|
|
66972
|
+
onMode(event) {
|
|
66973
|
+
event.stopPropagation();
|
|
66974
|
+
const select2 = event.target;
|
|
66975
|
+
const mode = select2.value;
|
|
66976
|
+
select2.value = this.mode;
|
|
66977
|
+
if (mode !== this.mode) this.fire(this.events().modeEvent, { mode });
|
|
66978
|
+
}
|
|
66979
|
+
events() {
|
|
66980
|
+
return this.constructor;
|
|
66981
|
+
}
|
|
66982
|
+
updated() {
|
|
66983
|
+
const select2 = this.control("mode-select");
|
|
66984
|
+
if (select2 && select2.value !== this.mode) select2.value = this.mode;
|
|
66985
|
+
}
|
|
66986
|
+
render() {
|
|
66987
|
+
const modes = this.modes ?? [];
|
|
66988
|
+
const count = Number(this.commentsCount) || 0;
|
|
66989
|
+
const commentsTitle = this.commentsTitle ?? this.commentsLabel;
|
|
66990
|
+
const shareTitle = this.shareTitle ?? this.shareLabel;
|
|
66991
|
+
return lit.html`<label class="mode" part="mode" ?hidden=${modes.length === 0}>${glyph("pencil", "glyph")}<select class="mode-select" part="mode-select" aria-label=${this.modeLabel} title=${this.modeLabel} @change=${this.onMode}>${modes.map((option) => lit.html`<option value=${option.value} ?selected=${option.value === this.mode}>${option.label}</option>`)}</select></label><button class="comments" part="comments" type="button" aria-label=${this.commentsLabel} title=${count > 0 ? `${commentsTitle} (${count})` : commentsTitle} aria-pressed=${String(present(this.commentsPressed))} ?hidden=${present(this.noComments)} @click=${() => this.fire(this.events().commentsEvent, {})}>${glyph("message", "glyph")}<span class="label">${this.commentsLabel}</span>${count > 0 ? lit.html`<span class="badge" aria-hidden="true">${count}</span>` : ""}</button><button class="share" part="share" type="button" aria-label=${this.shareLabel} title=${shareTitle} aria-pressed=${String(present(this.sharePressed))} ?hidden=${present(this.noShare)} @click=${() => this.fire(this.events().shareEvent, {})}>${glyph("share", "glyph")}<span class="label">${this.shareLabel}</span></button>`;
|
|
66992
|
+
}
|
|
66993
|
+
};
|
|
66994
|
+
var defineRibbonActions = definer("office-ui-ribbon-actions", () => OfficeUiRibbonActions);
|
|
66995
|
+
|
|
66887
66996
|
// raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/ribbon/button.css?raw
|
|
66888
66997
|
var button_default = ":host {\n display: inline-flex;\n vertical-align: middle;\n}\nbutton {\n box-sizing: border-box;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1-5);\n min-width: var(--office-target-size);\n min-height: var(--office-target-size);\n padding: 0 var(--office-space-2);\n border: var(--office-border-width) solid transparent;\n border-radius: var(--office-radius);\n background: transparent;\n color: var(--office-foreground);\n font: inherit;\n font-size: var(--office-font-size-sm);\n cursor: pointer;\n white-space: nowrap;\n}\n:host([variant='stacked']) button {\n flex-direction: column;\n padding: var(--office-space-1) var(--office-space-2);\n}\nbutton:hover:not(:disabled) {\n background: var(--office-surface);\n}\nbutton:active:not(:disabled) {\n background: var(--office-selected);\n}\nbutton:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: calc(var(--office-focus-offset) / 2);\n}\nbutton[aria-pressed='true'],\nbutton[aria-expanded='true'] {\n border-color: var(--office-accent);\n background: var(--office-surface);\n}\n:host([active]) button {\n background: var(--office-command-active);\n color: var(--office-accent);\n}\nbutton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\nsvg {\n width: var(--office-icon-size-ml);\n height: var(--office-icon-size-ml);\n flex: none;\n color: var(--office-command-icon-color);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\nsvg.glyph:not([data-painted]) {\n display: none;\n}\n.label[hidden],\n.caret[hidden],\n.badge[hidden] {\n display: none;\n}\n/* Office trails a menu chevron after the last line of the label. */\n.caret {\n display: inline-block;\n width: var(--office-icon-size-xs);\n height: var(--office-icon-size-xs);\n margin-inline-start: var(--office-space-0);\n vertical-align: middle;\n color: var(--office-muted-foreground);\n}\n.badge {\n position: absolute;\n top: 0;\n inset-inline-end: 0;\n padding: 0 var(--office-space-0);\n border-radius: var(--office-radius-full);\n background: var(--office-accent);\n color: var(--office-accent-foreground);\n font-size: var(--office-font-size-3xs);\n}\n\n/* Large ribbon command: a big glyph above a two-line label. */\n:host([size='large']) button {\n flex-direction: column;\n justify-content: flex-start;\n gap: var(--office-space-0);\n min-width: var(--office-command-large-min-width);\n max-width: var(--office-command-large-max-width);\n height: var(--office-command-large-height);\n padding: var(--office-space-0) var(--office-space-1);\n border: 0;\n white-space: normal;\n text-align: center;\n line-height: var(--office-line-height-tight);\n}\n:host([size='large']) svg.glyph {\n width: var(--office-command-large-icon);\n height: var(--office-command-large-icon);\n}\n\n/* Small ribbon command: icon and label in one row. */\n:host([size='small']) button {\n justify-content: flex-start;\n min-width: 0;\n height: var(--office-control-height);\n min-height: var(--office-control-height);\n padding: 0 var(--office-space-1-5);\n border: 0;\n text-align: start;\n}\n:host([size='small']) svg.glyph {\n width: var(--office-command-small-icon);\n height: var(--office-command-small-icon);\n}\n\n/* Tall, label-less tool tiles (pens, erasers). */\n:host([icon-only][tall]) button {\n min-width: var(--office-command-tall-min-width);\n height: var(--office-command-tall-height);\n padding: var(--office-space-1);\n}\n:host([icon-only][tall]) svg.glyph {\n width: var(--office-command-tall-icon);\n height: var(--office-command-tall-icon);\n}\n:host([icon-only][tall][active]) button {\n box-shadow: inset 0 0 0 var(--office-border-width) var(--office-accent);\n}\n\n@media (pointer: coarse), (max-width: 767px) {\n :host([size='small']) button {\n min-height: var(--office-target-size-touch);\n }\n :host([icon-only]) button {\n min-width: var(--office-target-size-touch);\n }\n}\n@media (forced-colors: active) {\n button {\n border-color: ButtonText;\n color: ButtonText;\n background: ButtonFace;\n }\n svg {\n color: ButtonText;\n }\n button:disabled {\n color: GrayText;\n border-color: GrayText;\n }\n button[aria-pressed='true'],\n button[aria-expanded='true'],\n :host([active]) button {\n background: Highlight;\n color: HighlightText;\n }\n}\n";
|
|
66889
66998
|
|
|
@@ -68863,6 +68972,9 @@ var EXTRAS = {
|
|
|
68863
68972
|
--office-launcher-inset-end: -2px; --office-launcher-inset-bottom: 1px; --office-launcher-width: 14px;
|
|
68864
68973
|
--office-launcher-height: 14px; --office-ribbon-collapse-x: var(--pptx-collapse-x, 8px);
|
|
68865
68974
|
--office-ribbon-collapse-y: var(--pptx-collapse-y, 120px); }`,
|
|
68975
|
+
// The tab row's Comments and Share at the pptx tab-row scale (11px labels, 24px controls).
|
|
68976
|
+
"pptx-ui-ribbon-actions": `:host { --office-font-size: 11px; --office-control-height-md: 24px;
|
|
68977
|
+
--office-icon-size-md: 14px; --office-font-size-2xs: 8px; padding-inline-start: 0; }`,
|
|
68866
68978
|
"pptx-ui-context-menu": `:host { --office-menu-min-width: 180px; --office-danger: var(--pptx-destructive, #f87171);
|
|
68867
68979
|
--office-selected: var(--pptx-accent, #33334d); --office-radius-md: var(--pptx-radius, 6px); }`
|
|
68868
68980
|
};
|
|
@@ -73073,6 +73185,39 @@ function definePptxStatusBar(registry2) {
|
|
|
73073
73185
|
registry2.define("pptx-ui-status-bar", PptxStatusBar);
|
|
73074
73186
|
}
|
|
73075
73187
|
|
|
73188
|
+
// src/pptx/web-components/ribbon-actions.ts
|
|
73189
|
+
function definePptxRibbonActions(registry2) {
|
|
73190
|
+
if (registry2.get("pptx-ui-ribbon-actions")) {
|
|
73191
|
+
return;
|
|
73192
|
+
}
|
|
73193
|
+
defineRibbonActions(registry2);
|
|
73194
|
+
const Base = registry2.get("office-ui-ribbon-actions");
|
|
73195
|
+
class PptxRibbonActions extends Base {
|
|
73196
|
+
static commentsEvent = "comments-toggle";
|
|
73197
|
+
static shareEvent = "share-request";
|
|
73198
|
+
#model;
|
|
73199
|
+
constructor() {
|
|
73200
|
+
super();
|
|
73201
|
+
if (this.shadowRoot) {
|
|
73202
|
+
attachControlStyles(this.shadowRoot, bridgeCss("pptx-ui-ribbon-actions"));
|
|
73203
|
+
}
|
|
73204
|
+
}
|
|
73205
|
+
get state() {
|
|
73206
|
+
return this.#model;
|
|
73207
|
+
}
|
|
73208
|
+
set state(value) {
|
|
73209
|
+
this.#model = value;
|
|
73210
|
+
if (value) {
|
|
73211
|
+
Object.assign(this, value);
|
|
73212
|
+
}
|
|
73213
|
+
}
|
|
73214
|
+
}
|
|
73215
|
+
registry2.define(
|
|
73216
|
+
"pptx-ui-ribbon-actions",
|
|
73217
|
+
PptxRibbonActions
|
|
73218
|
+
);
|
|
73219
|
+
}
|
|
73220
|
+
|
|
73076
73221
|
// src/pptx/web-components/subtitle-settings-styles.ts
|
|
73077
73222
|
var SUBTITLE_SETTINGS_STYLES = `
|
|
73078
73223
|
:host { display: inline-flex; }
|
|
@@ -74140,6 +74285,7 @@ var controls = [
|
|
|
74140
74285
|
["pptx-ui-ribbon-gallery", definePptxRibbonGallery],
|
|
74141
74286
|
["pptx-ui-ribbon-toggle", definePptxRibbonToggle],
|
|
74142
74287
|
["pptx-ui-status-bar", definePptxStatusBar],
|
|
74288
|
+
["pptx-ui-ribbon-actions", definePptxRibbonActions],
|
|
74143
74289
|
["pptx-ui-notes-toolbar", definePptxNotesToolbar],
|
|
74144
74290
|
["pptx-ui-context-menu", definePptxContextMenu],
|
|
74145
74291
|
["pptx-ui-subtitle-settings", definePptxSubtitleSettings],
|
|
@@ -74270,7 +74416,7 @@ function applyChart3DDrag(bridge, detail) {
|
|
|
74270
74416
|
return;
|
|
74271
74417
|
}
|
|
74272
74418
|
bridge.commitChartData(
|
|
74273
|
-
|
|
74419
|
+
chunkWKLHJEPD_cjs.withChartPointValue(bridge.chartData, part.seriesIndex, part.pointIndex, value)
|
|
74274
74420
|
);
|
|
74275
74421
|
}
|
|
74276
74422
|
function detailOf(event) {
|
|
@@ -74747,7 +74893,7 @@ function calculateNotesPageLayout(slideWidth, slideHeight) {
|
|
|
74747
74893
|
};
|
|
74748
74894
|
}
|
|
74749
74895
|
function wrapNotesText(text3, maxWidth, fontSize) {
|
|
74750
|
-
return
|
|
74896
|
+
return chunkIURZJAWP_cjs.wrapTextByEstimatedWidth(text3, maxWidth, fontSize, { keepBlankLines: true });
|
|
74751
74897
|
}
|
|
74752
74898
|
function calculateContinuationPageMaxLines() {
|
|
74753
74899
|
const contentHeight = NOTES_PAGE_H - 2 * NOTES_MARGIN;
|
|
@@ -78008,6 +78154,7 @@ exports.buildSvgGradientDef = buildSvgGradientDef;
|
|
|
78008
78154
|
exports.buildSvgStrokeGradientDef = buildSvgStrokeGradientDef;
|
|
78009
78155
|
exports.buildSvgStrokePatternDef = buildSvgStrokePatternDef;
|
|
78010
78156
|
exports.buildTabContext = buildTabContext;
|
|
78157
|
+
exports.buildTabRowActionsState = buildTabRowActionsState;
|
|
78011
78158
|
exports.buildTableDataGrid = buildTableDataGrid;
|
|
78012
78159
|
exports.buildTextBlockStyle = buildTextBlockStyle;
|
|
78013
78160
|
exports.buildTextBlurFilter = buildTextBlurFilter;
|
|
@@ -79483,6 +79630,7 @@ exports.svgToDataUrl = svgToDataUrl;
|
|
|
79483
79630
|
exports.swapPresentationWindows = swapPresentationWindows;
|
|
79484
79631
|
exports.switchSmartArtLayoutData = switchSmartArtLayoutData;
|
|
79485
79632
|
exports.syncGoogleWebfontStylesheet = syncGoogleWebfontStylesheet;
|
|
79633
|
+
exports.tabRowActionsAttributes = tabRowActionsAttributes;
|
|
79486
79634
|
exports.tableCellCss = tableCellCss;
|
|
79487
79635
|
exports.tableCellFillColorCommitPatch = tableCellFillColorCommitPatch;
|
|
79488
79636
|
exports.tableCellPointerIntent = tableCellPointerIntent;
|