ooxml-ui 0.31.0 → 1.0.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 +14 -0
- package/custom-elements.json +10 -0
- package/dist/{chunk-RAZAJMHK.js → chunk-4QQASR5A.js} +2 -2
- package/dist/{chunk-HZ422LTR.js → chunk-BOX43CZD.js} +1 -0
- package/dist/{chunk-3GE2NHNG.js → chunk-FLHM5Q4O.js} +119 -81
- package/dist/{chunk-2QW4QE56.js → chunk-T3HB5LMH.js} +103 -68
- package/dist/controls.js +2 -2
- package/dist/docx/hard-break-command.d.ts +1 -3
- package/dist/docx/link-commands.d.ts +4 -15
- package/dist/docx/note-editor.d.ts +3 -2
- package/dist/docx/run-styles.d.ts +1 -1
- package/dist/docx/schema.d.ts +1 -1
- package/dist/docx/toggle-commands.d.ts +2 -8
- package/dist/docx.js +109 -302
- package/dist/form/gradient-direction-gallery.d.ts +19 -0
- package/dist/form/gradient-gallery-preview.d.ts +3 -0
- package/dist/form/gradient-preset-gallery.d.ts +16 -0
- package/dist/form/gradient-stop-track.d.ts +20 -0
- package/dist/form/number-range.d.ts +12 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.js +4 -4
- package/dist/menu/menu-button.d.ts +10 -0
- package/dist/menu/menu-button.d.ts.map +1 -1
- package/dist/pptx/{chart-3d-view-scene-IANLDFIE.mjs → chart-3d-view-scene-2KRQ5667.mjs} +2 -2
- package/dist/pptx/{chart-3d-view-scene-3DK5TUBZ.cjs → chart-3d-view-scene-36DMZWZ3.cjs} +37 -37
- package/dist/pptx/{chunk-C42ZL35K.mjs → chunk-ADOC5JLI.mjs} +1 -1
- package/dist/pptx/{chunk-QM4FGZG4.cjs → chunk-AIL3BNZS.cjs} +31 -131
- package/dist/pptx/{chunk-WLETAW3T.cjs → chunk-CJU4P5FT.cjs} +33 -13
- package/dist/pptx/{chunk-6SCK57RJ.cjs → chunk-FEFQTZDM.cjs} +158 -245
- package/dist/pptx/{chunk-EVGSFPUV.mjs → chunk-XWE5GSE7.mjs} +16 -109
- package/dist/pptx/{chunk-7JEMQW6R.mjs → chunk-YARCML7O.mjs} +11 -122
- package/dist/pptx/{chunk-OHE5UXST.cjs → chunk-YHA6XAB3.cjs} +1 -1
- package/dist/pptx/{chunk-X2F6PA2D.mjs → chunk-YOGDIDPB.mjs} +22 -3
- package/dist/pptx/dom/index.cjs +235 -235
- package/dist/pptx/dom/index.mjs +6 -6
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +2993 -2989
- package/dist/pptx/index.mjs +4 -4
- 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-manual-layout.d.ts +2 -20
- package/dist/pptx/render/chart-manual-layout.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-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-svg-def-types.d.ts +6 -1
- package/dist/pptx/render/chart-svg-def-types.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model-dom-helpers.d.ts +1 -1
- package/dist/pptx/render/chart-view-model-dom-helpers.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +41 -41
- 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/element-interaction.d.ts +1 -1
- package/dist/pptx/render/element-interaction.d.ts.map +1 -1
- package/dist/pptx/render/gradient-picker.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/path-gradient-rect.d.ts +1 -75
- package/dist/pptx/render/path-gradient-rect.d.ts.map +1 -1
- package/dist/pptx/render/rotate-handle-placement.d.ts +1 -27
- package/dist/pptx/render/rotate-handle-placement.d.ts.map +1 -1
- package/dist/pptx/render/rotation-drag.d.ts +1 -7
- package/dist/pptx/render/rotation-drag.d.ts.map +1 -1
- package/dist/teams/app/files-panel.d.ts +8 -3
- package/dist/teams/app/teams-app.d.ts +1 -0
- package/dist/teams/app/teams-settings.d.ts +6 -0
- package/dist/teams.js +3 -3
- package/dist/visio/render-fill.d.ts +2 -1
- package/dist/visio/render-svg.d.ts +2 -0
- package/dist/visio/ribbon-action.d.ts +8 -1
- package/dist/visio/ribbon-parts.d.ts +2 -1
- package/dist/visio/ribbon-router.d.ts +4 -2
- package/dist/visio/viewer-commands.d.ts +3 -3
- package/dist/visio/viewer-draw-tool.d.ts +16 -6
- package/dist/visio/viewer-handle-events.d.ts +19 -0
- package/dist/visio/viewer-line-endpoints.d.ts +14 -0
- package/dist/visio/viewer-rotation-handle.d.ts +14 -0
- package/dist/visio/viewer-rotation-preview.d.ts +7 -0
- package/dist/visio.js +734 -88
- package/dist/xlsx/chart-area-pane.d.ts +9 -0
- package/dist/xlsx/chart-fill-binding.d.ts +23 -0
- package/dist/xlsx/chart-gradient-preview.d.ts +8 -0
- package/dist/xlsx/chart-series-fill.d.ts +2 -1
- package/dist/xlsx/chart-series-gradient-type.d.ts +9 -0
- package/dist/xlsx/chart-series-gradient.d.ts +8 -0
- package/dist/xlsx/chart-series-pane.d.ts +2 -1
- package/dist/xlsx/chart-series-range-preview.d.ts +7 -0
- package/dist/xlsx/chart-series-transparency.d.ts +2 -1
- package/dist/xlsx/grid/measure.d.ts +5 -0
- package/dist/xlsx/grid/styles.d.ts +1 -1
- package/dist/xlsx.js +962 -102
- package/package.json +2 -2
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { getSubstituteFonts, buildFontFamilyString, hasShapeProperties, ooxmlGradientAngleToCssDegrees, chartDataChangeType, isParetoChartData, resolveDisplayedChartTypeName, evaluateCustomGeometryPaths, customGeometryPathsToSvgSubpaths, evaluatePresetShape, parseDataUrlToBytes, sampleFirstPixelColorFromBytes, flattenChartUserShapes } from 'ooxml-core/pptx';
|
|
2
2
|
import { colorWithOpacity, clampUnitInterval, normalizeHexColor, hexToRgbChannels } from 'ooxml-core/color';
|
|
3
3
|
export { clampUnitInterval, colorWithOpacity, hexToRgbChannels, normalizeHexColor } from 'ooxml-core/color';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
4
|
+
import { buildRectPathGradientImage } from 'ooxml-core/diagram';
|
|
5
|
+
export { buildRectPathGradientImage, buildRectPathGradientSvg } from 'ooxml-core/diagram';
|
|
6
|
+
import { niceValueAxisBounds, axisTargetIntervals, hasManualLayoutFields, resolveManualLayoutRect, groupRowsByCategory, computeBoxStats, computeHistogramBins as computeHistogramBins$1, aggregateByCategory, radarRingPoints, radarAngle, computeRadarPoints, clusteredBarGeometry, resolveBlankDisplay, computeStackedSeriesPlots, visibleRuns, placeBestFitLabel, nudgeOutsideLabels, buildChartGradientDef, fitPolynomial, formatPolynomialEquation, computeRSquared, computeLinearRegression, formatPowerEquation, formatLogarithmicEquation, formatExponentialEquation, formatLinearEquation, squarify } from 'ooxml-core/chart';
|
|
7
|
+
export { axisTargetIntervals, computeBoxStats, computeLinearRegression, computeRSquared, computeRadarPoints, computeStackedSeriesPlots, fitPolynomial, hasManualLayoutFields, niceValueAxisBounds, radarAngle, radarRingPoints, resolveManualLayoutRect } from 'ooxml-core/chart';
|
|
6
8
|
|
|
7
9
|
// src/pptx/render/chart-font.ts
|
|
8
10
|
var CHART_PX_PER_PT = 4 / 3;
|
|
@@ -295,104 +297,6 @@ var DEFAULT_TEXT_FONT_SIZE = 24;
|
|
|
295
297
|
var DEFAULT_BODY_INSET_LR_PX = 91440 / 9525;
|
|
296
298
|
var DEFAULT_BODY_INSET_TB_PX = 45720 / 9525;
|
|
297
299
|
|
|
298
|
-
// src/pptx/render/path-gradient-rect.ts
|
|
299
|
-
var BAND_COUNT = 40;
|
|
300
|
-
function hexToRgb(color) {
|
|
301
|
-
const hex = color.replace("#", "");
|
|
302
|
-
return {
|
|
303
|
-
r: Number.parseInt(hex.slice(0, 2), 16) || 0,
|
|
304
|
-
g: Number.parseInt(hex.slice(2, 4), 16) || 0,
|
|
305
|
-
b: Number.parseInt(hex.slice(4, 6), 16) || 0
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
function toHexChannel(value) {
|
|
309
|
-
return Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0");
|
|
310
|
-
}
|
|
311
|
-
function lerpStops(a, b, t) {
|
|
312
|
-
const ca = hexToRgb(a.color);
|
|
313
|
-
const cb = hexToRgb(b.color);
|
|
314
|
-
const oa = a.opacity ?? 1;
|
|
315
|
-
const ob = b.opacity ?? 1;
|
|
316
|
-
return {
|
|
317
|
-
color: `#${toHexChannel(ca.r + (cb.r - ca.r) * t)}${toHexChannel(ca.g + (cb.g - ca.g) * t)}${toHexChannel(ca.b + (cb.b - ca.b) * t)}`,
|
|
318
|
-
opacity: oa + (ob - oa) * t
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
function colorAt(stops, position) {
|
|
322
|
-
const first = stops[0];
|
|
323
|
-
const last = stops[stops.length - 1];
|
|
324
|
-
if (position <= first.position) {
|
|
325
|
-
return { color: first.color, opacity: first.opacity ?? 1 };
|
|
326
|
-
}
|
|
327
|
-
if (position >= last.position) {
|
|
328
|
-
return { color: last.color, opacity: last.opacity ?? 1 };
|
|
329
|
-
}
|
|
330
|
-
for (let i = 0; i < stops.length - 1; i += 1) {
|
|
331
|
-
const from = stops[i];
|
|
332
|
-
const to = stops[i + 1];
|
|
333
|
-
if (position >= from.position && position <= to.position) {
|
|
334
|
-
const span = to.position - from.position;
|
|
335
|
-
const t = span > 0 ? (position - from.position) / span : 0;
|
|
336
|
-
return lerpStops(from, to, t);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
return { color: last.color, opacity: last.opacity ?? 1 };
|
|
340
|
-
}
|
|
341
|
-
function resolveInnerRect(fillToRect, focalPoint) {
|
|
342
|
-
let centerX = 50;
|
|
343
|
-
let centerY = 50;
|
|
344
|
-
let width = 0;
|
|
345
|
-
let height = 0;
|
|
346
|
-
if (fillToRect) {
|
|
347
|
-
const { l, t, r, b } = fillToRect;
|
|
348
|
-
centerX = (l + (1 - r)) / 2 * 100;
|
|
349
|
-
centerY = (t + (1 - b)) / 2 * 100;
|
|
350
|
-
width = Math.max(0, Math.min(1, 1 - l - r)) * 100;
|
|
351
|
-
height = Math.max(0, Math.min(1, 1 - t - b)) * 100;
|
|
352
|
-
if (focalPoint) {
|
|
353
|
-
centerX = (centerX + focalPoint.x * 100) / 2;
|
|
354
|
-
centerY = (centerY + focalPoint.y * 100) / 2;
|
|
355
|
-
}
|
|
356
|
-
} else if (focalPoint) {
|
|
357
|
-
centerX = focalPoint.x * 100;
|
|
358
|
-
centerY = focalPoint.y * 100;
|
|
359
|
-
}
|
|
360
|
-
return {
|
|
361
|
-
left: centerX - width / 2,
|
|
362
|
-
top: centerY - height / 2,
|
|
363
|
-
right: centerX + width / 2,
|
|
364
|
-
bottom: centerY + height / 2
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function lerpEdge(inner, outer, t) {
|
|
368
|
-
return inner + (outer - inner) * t;
|
|
369
|
-
}
|
|
370
|
-
function buildRectPathGradientSvg(stops, focalPoint, fillToRect) {
|
|
371
|
-
if (stops.length === 0) {
|
|
372
|
-
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"/>';
|
|
373
|
-
}
|
|
374
|
-
const sorted = [...stops].sort((a, b) => a.position - b.position);
|
|
375
|
-
const inner = resolveInnerRect(fillToRect, focalPoint);
|
|
376
|
-
const rects = [];
|
|
377
|
-
for (let i = BAND_COUNT; i >= 0; i -= 1) {
|
|
378
|
-
const t = i / BAND_COUNT;
|
|
379
|
-
const { color, opacity } = colorAt(sorted, t * 100);
|
|
380
|
-
const left = lerpEdge(inner.left, 0, t);
|
|
381
|
-
const top = lerpEdge(inner.top, 0, t);
|
|
382
|
-
const right = lerpEdge(inner.right, 100, t);
|
|
383
|
-
const bottom = lerpEdge(inner.bottom, 100, t);
|
|
384
|
-
const opacityAttr = opacity < 1 ? ` fill-opacity="${Math.max(0, opacity).toFixed(3)}"` : "";
|
|
385
|
-
rects.push(
|
|
386
|
-
`<rect x="${left.toFixed(2)}" y="${top.toFixed(2)}" width="${(right - left).toFixed(2)}" height="${(bottom - top).toFixed(2)}" fill="${color}"${opacityAttr}/>`
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">${rects.join("")}</svg>`;
|
|
390
|
-
}
|
|
391
|
-
function buildRectPathGradientImage(stops, focalPoint, fillToRect) {
|
|
392
|
-
const markup = buildRectPathGradientSvg(stops, focalPoint, fillToRect);
|
|
393
|
-
return `url("data:image/svg+xml,${encodeURIComponent(markup)}")`;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
300
|
// src/pptx/render/vector-subpath-paint.ts
|
|
397
301
|
function toHexByte(value) {
|
|
398
302
|
const clamped = Math.max(0, Math.min(255, Math.round(value)));
|
|
@@ -1830,7 +1734,7 @@ var DEFAULT_CHART_PALETTE = [
|
|
|
1830
1734
|
"#FF0000",
|
|
1831
1735
|
"#00B0F0"
|
|
1832
1736
|
];
|
|
1833
|
-
function
|
|
1737
|
+
function hexToRgb(hex) {
|
|
1834
1738
|
const h = hex.replace("#", "");
|
|
1835
1739
|
return [
|
|
1836
1740
|
parseInt(h.substring(0, 2), 16),
|
|
@@ -1843,11 +1747,11 @@ function rgbToHex(r, g, b) {
|
|
|
1843
1747
|
return `#${clamp3(r).toString(16).padStart(2, "0")}${clamp3(g).toString(16).padStart(2, "0")}${clamp3(b).toString(16).padStart(2, "0")}`;
|
|
1844
1748
|
}
|
|
1845
1749
|
function tint(hex, amount) {
|
|
1846
|
-
const [r, g, b] =
|
|
1750
|
+
const [r, g, b] = hexToRgb(hex);
|
|
1847
1751
|
return rgbToHex(r + (255 - r) * amount, g + (255 - g) * amount, b + (255 - b) * amount);
|
|
1848
1752
|
}
|
|
1849
1753
|
function shade(hex, amount) {
|
|
1850
|
-
const [r, g, b] =
|
|
1754
|
+
const [r, g, b] = hexToRgb(hex);
|
|
1851
1755
|
return rgbToHex(r * (1 - amount), g * (1 - amount), b * (1 - amount));
|
|
1852
1756
|
}
|
|
1853
1757
|
function colorfulSequential(offset) {
|
|
@@ -2481,7 +2385,7 @@ function resolveDataPointPictureFill(series, pointIndex, seriesIndex, face) {
|
|
|
2481
2385
|
}
|
|
2482
2386
|
|
|
2483
2387
|
// src/pptx/render/chart-palette.ts
|
|
2484
|
-
function
|
|
2388
|
+
function hexToRgb2(hex) {
|
|
2485
2389
|
const h = hex.replace("#", "");
|
|
2486
2390
|
return [
|
|
2487
2391
|
parseInt(h.substring(0, 2), 16),
|
|
@@ -2494,11 +2398,11 @@ function rgbToHex2(r, g, b) {
|
|
|
2494
2398
|
return `#${clamp3(r).toString(16).padStart(2, "0")}${clamp3(g).toString(16).padStart(2, "0")}${clamp3(b).toString(16).padStart(2, "0")}`;
|
|
2495
2399
|
}
|
|
2496
2400
|
function tint2(hex, amount) {
|
|
2497
|
-
const [r, g, b] =
|
|
2401
|
+
const [r, g, b] = hexToRgb2(hex);
|
|
2498
2402
|
return rgbToHex2(r + (255 - r) * amount, g + (255 - g) * amount, b + (255 - b) * amount);
|
|
2499
2403
|
}
|
|
2500
2404
|
function shade2(hex, amount) {
|
|
2501
|
-
const [r, g, b] =
|
|
2405
|
+
const [r, g, b] = hexToRgb2(hex);
|
|
2502
2406
|
return rgbToHex2(r * (1 - amount), g * (1 - amount), b * (1 - amount));
|
|
2503
2407
|
}
|
|
2504
2408
|
|
|
@@ -3127,25 +3031,10 @@ function computeDataTableHeight(dataTable, seriesCount) {
|
|
|
3127
3031
|
const rowCount = Math.max(seriesCount, 1);
|
|
3128
3032
|
return 14 + rowCount * 14;
|
|
3129
3033
|
}
|
|
3130
|
-
|
|
3131
|
-
// src/pptx/render/chart-manual-layout.ts
|
|
3132
|
-
function hasManualLayoutFields(layout) {
|
|
3133
|
-
return layout !== null && layout !== void 0 && (layout.x !== void 0 || layout.y !== void 0 || layout.width !== void 0 || layout.height !== void 0);
|
|
3134
|
-
}
|
|
3135
3034
|
function manualLayoutOf(chartData, region) {
|
|
3136
3035
|
const layout = chartData?.layouts?.[region];
|
|
3137
3036
|
return hasManualLayoutFields(layout) ? layout : void 0;
|
|
3138
3037
|
}
|
|
3139
|
-
function resolveManualLayoutRect(layout, frame, auto) {
|
|
3140
|
-
if (!hasManualLayoutFields(layout)) {
|
|
3141
|
-
return void 0;
|
|
3142
|
-
}
|
|
3143
|
-
const x = layout.x === void 0 ? auto.x : layout.xMode === "edge" ? layout.x * frame.width : auto.x + layout.x * frame.width;
|
|
3144
|
-
const y = layout.y === void 0 ? auto.y : layout.yMode === "edge" ? layout.y * frame.height : auto.y + layout.y * frame.height;
|
|
3145
|
-
const width = layout.width === void 0 ? auto.width : layout.widthMode === "edge" ? layout.width * frame.width - x : layout.width * frame.width;
|
|
3146
|
-
const height = layout.height === void 0 ? auto.height : layout.heightMode === "edge" ? layout.height * frame.height - y : layout.height * frame.height;
|
|
3147
|
-
return { x, y, width: Math.max(width, 1), height: Math.max(height, 1) };
|
|
3148
|
-
}
|
|
3149
3038
|
var CHART_TITLE_FONT_PX = 12;
|
|
3150
3039
|
var TITLE_GLYPH_ADVANCE = 0.6;
|
|
3151
3040
|
var LEGEND_ITEM_WIDTH = 80;
|
|
@@ -10851,4 +10740,4 @@ function computeTrendlinePrimitives(chartData, catCount, layout, range, mode = "
|
|
|
10851
10740
|
return out;
|
|
10852
10741
|
}
|
|
10853
10742
|
|
|
10854
|
-
export { AXIS_LABEL_COLOR, CHART_PX_PER_PT, CHART_TITLE_FONT_PX, CHART_TITLE_TOP_INSET_PX, DATA_LABEL_LINE_HEIGHT, DATA_LABEL_PAD_X, DATA_LABEL_PAD_Y, DATA_TABLE_HEADER_H, DATA_TABLE_KEY_W, DATA_TABLE_PADDING, DATA_TABLE_ROW_H, DEFAULT_BODY_INSET_LR_PX, DEFAULT_BODY_INSET_TB_PX, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_CHART_AREA_FILL, DEFAULT_CHART_DATA_LABEL_PX, DEFAULT_CHART_PALETTE, DEFAULT_CHART_TEXT_PX, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_PALETTE, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRIDLINE_COLOR3 as GRIDLINE_COLOR, HYPERLINK_COLOR, LEGACY_CHART_TITLE_BAND_PX, LEGEND_LINE_SWATCH_WIDTH, LEGEND_MARKER_RADIUS, OOXML_PATTERN_PRESETS, PIE_AUTO_INSET_PX, TEXT_ORIENTATION_IDENTITY, ZERO_LINE_COLOR, adjustFillForMode, applyDataPointPictureFills, applyLabelManualLayout, applyLegendEntryOverrides, applyParetoConversion, axisTickValues, buildBoxWhiskerViewModel, buildCartesianViewModel, buildCategoryLabels, buildChartViewModel, buildCirclePathGradient, buildComboViewModel, buildCssGradientFromShapeStyle, buildDashArray, buildDataLabelText, buildFallbackViewModel, buildFunnelViewModel, buildGradientCss, buildGridlinesAndLabels, buildHistogramViewModel, buildLegend, buildLineLegendSwatch, buildMarkTooltip, buildPatternFill, buildPatternFillCss, buildPieViewModel, buildPrimaryAxis, buildRadarViewModel, buildRectPathGradient,
|
|
10743
|
+
export { AXIS_LABEL_COLOR, CHART_PX_PER_PT, CHART_TITLE_FONT_PX, CHART_TITLE_TOP_INSET_PX, DATA_LABEL_LINE_HEIGHT, DATA_LABEL_PAD_X, DATA_LABEL_PAD_Y, DATA_TABLE_HEADER_H, DATA_TABLE_KEY_W, DATA_TABLE_PADDING, DATA_TABLE_ROW_H, DEFAULT_BODY_INSET_LR_PX, DEFAULT_BODY_INSET_TB_PX, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_CHART_AREA_FILL, DEFAULT_CHART_DATA_LABEL_PX, DEFAULT_CHART_PALETTE, DEFAULT_CHART_TEXT_PX, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_PALETTE, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRIDLINE_COLOR3 as GRIDLINE_COLOR, HYPERLINK_COLOR, LEGACY_CHART_TITLE_BAND_PX, LEGEND_LINE_SWATCH_WIDTH, LEGEND_MARKER_RADIUS, OOXML_PATTERN_PRESETS, PIE_AUTO_INSET_PX, TEXT_ORIENTATION_IDENTITY, ZERO_LINE_COLOR, adjustFillForMode, applyDataPointPictureFills, applyLabelManualLayout, applyLegendEntryOverrides, applyParetoConversion, axisTickValues, buildBoxWhiskerViewModel, buildCartesianViewModel, buildCategoryLabels, buildChartViewModel, buildCirclePathGradient, buildComboViewModel, buildCssGradientFromShapeStyle, buildDashArray, buildDataLabelText, buildFallbackViewModel, buildFunnelViewModel, buildGradientCss, buildGridlinesAndLabels, buildHistogramViewModel, buildLegend, buildLineLegendSwatch, buildMarkTooltip, buildPatternFill, buildPatternFillCss, buildPieViewModel, buildPrimaryAxis, buildRadarViewModel, buildRectPathGradient, buildReflectedGradientStops, buildRegionMapEntries, buildRegionMapViewModel, buildSecondaryAxis, buildShapePathGradient, buildStockCloseLabel, buildStockViewModel, buildSubpathFillOverlay, buildSubpathPaints, buildSunburstViewModel, buildSurfaceViewModel, buildTreemapViewModel, buildTrendlineLegendSwatch, buildValueAxisGridlinesAndLabels, buildWaterfallViewModel, buildZeroLine, canvasFontFamily, chartAreaCornerRadius, chartAreaFill, chartFontPx, chartFrameToViewOffset, chartGridlinesPatch, chartGridlinesState, chartPreserveAspectRatio, chartTextFontFamily, chartTitleBand, chartTitleBandFor, chartTitleFontPx, chartTitleReservePx, clampCropValue, collapseChartTitleRunsForEdit, computeAxisTitlePrimitives, computeBarRects, computeBoxWhiskerGeometry, computeBubbleRadius, computeDataTableHeight, computeDataTablePrimitives, computeErrorBarPrimitives, computeFunnelSegments, computeGradientCenter, computeHierarchicalSunburstArcs, computeHistogramBars, computeHistogramBins, computeLayout, computeLayoutOptions, computeLinePoints, computeLogValueRange, computePieLayout, computePieSlicePath, computePieSlices, computePlotLayout, computeScatterDots, computeScatterXDomain, computeStackedBarRects, computeStackedValueRange, computeSunburstArcs, computeTrendlinePrimitives, computeValueRange, computeValueRange2, computeValueRangeForAxis, computeValueRangeForChart, convertOoxmlAngleToCss, createArrayBufferCopy, cumulativePercentOfTotal, dataLabelBox, dataLabelBoxSize, dataLabelFontOverride, decodeFirstPixelColor, ensureBarFacePicturePixelSampled, estimateChartTextWidth, estimateTextWidth, findDataPoint, findLogAxis, findPointLabel, findValueAxis, fitTitleBand, formatAxisValue, formatAxisValue2, formatAxisValueWithUnits, formatChartNumber, formatChartNumberWithColor, formatRegionMapValue, generateAxisTicks, generateLogTicks, generateMinorAxisTicks, getBarFacePicturePixelSampleVersion, getCachedBarFacePicturePixelColor, getChartStylePalette, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineStyle, getComputedFillStyle, getCssBorderDashStyle, getDisplayUnitDivisor, getDisplayUnitLabel, getElementOrientationMatrix, getElementTransform, getElementTransformWithoutRotation, getGradientTileFlipCss, getGradientTileRectCss, getPatternSvg, getPatternTile, getPrimaryValueAxis, getPrimaryValueAxisId, getSecondaryCategoryAxis, getSecondaryValueAxis, getSecondaryValueAxisId, getSvgStrokeDasharray, getTextCompensationTransform, hasSecondaryCategoryAxis, hasSecondaryValueAxis, isParetoChart, isPrimaryCategoryAxisAtTop, isSeriesOnSecondaryAxis, isTextOrientationMatrix, linePointsToSvgString, manualLayoutOf, manualLegendAnchor, manualTitleAnchor, measureChartTextWidth, multiplyTextOrientationMatrices, normalizeStrokeDashType, normalizeValue, orderParetoEntries, paletteColor, paletteColor2, parseDrawingPercent, plotAreaFill, reserveLegendSpace, resetBarFacePicturePixelCacheForTests, resolveActiveDataPointPicture, resolveBarFacePicturePixelColor, resolveBarFaceTargets, resolveBarLabelAnchor, resolveBarLabelPlacement, resolveCategoryLabels, resolveChartKind, resolveChartStyleDefaults, resolveChartTitleRunSpans, resolveChartTitleTextStyle, resolveDataLabelContent, resolveDataLabelTextStyle, resolveDataPointExplosion, resolveDataPointFill, resolveDataPointMarker, resolveDataPointPictureFill, resolveDisplayedChartType, resolveExtrusionFaceFill, resolveLabelPosition, resolveLegendAnchorPosition, resolveLegendPlacement, resolveLegendSwatchKind, resolveMarkerLabelAnchor, resolveMarkerLabelPlacement, resolveRegionCode, resolveRegionEntityCode, resolveUntargetedBarFaceFill, resolveVaryColorFill, sanitizeGradientStops, sequentialColorScale, seriesColor, seriesColor2, seriesXValues, setChartTextMeasurer, shade2 as shade, shouldRenderMajorGridlines, shouldRenderRegionLabel, splitLabelLines, splitSeriesByAxis, subscribeBarFacePicturePixelSamples, suppressesCssFill, surfaceColor, tint2 as tint, titleBaselineFor, toCssGradientStop, unitsCaptionOffset, upsertDataPoint, valueToY, valueToY2, valueToYLog, withChartTitleBand, withManualLayouts, wrapTextByEstimatedWidth };
|
|
@@ -32,7 +32,7 @@ async function loadChart3DThree() {
|
|
|
32
32
|
|
|
33
33
|
// src/pptx/three-view/scene-registry.ts
|
|
34
34
|
var loaders = {
|
|
35
|
-
chart: async () => (await import('./chart-3d-view-scene-
|
|
35
|
+
chart: async () => (await import('./chart-3d-view-scene-36DMZWZ3.cjs')).mountChart3DView,
|
|
36
36
|
smartart: async () => (await import('./view-scene-4ZFUCP6S.cjs')).mountSmartArt3DView
|
|
37
37
|
};
|
|
38
38
|
async function loadThreeViewScene(kind) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chartTextFontFamily, chartFontPx, computePlotLayout, radarAngle, computeStackedSeriesPlots, computeLayoutOptions, computeStackedValueRange, valueToY2, collapseChartTitleRunsForEdit, computePieLayout, buildMarkTooltip, formatAxisValueWithUnits, axisTickValues } from './chunk-
|
|
1
|
+
import { chartTextFontFamily, chartFontPx, computePlotLayout, radarAngle, computeStackedSeriesPlots, computeLayoutOptions, computeStackedValueRange, valueToY2, collapseChartTitleRunsForEdit, computePieLayout, buildMarkTooltip, formatAxisValueWithUnits, axisTickValues } from './chunk-YARCML7O.mjs';
|
|
2
2
|
|
|
3
3
|
// src/pptx/render/chart-legend-layout.ts
|
|
4
4
|
var LEGEND_ITEM_WIDTH = 80;
|
|
@@ -350,6 +350,23 @@ function advanceChartValueDrag(state, clientY, svgHeight) {
|
|
|
350
350
|
return { chartData, value };
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
+
// src/pptx/render/chart-svg-def-types.ts
|
|
354
|
+
function resolveChartSvgDef(def) {
|
|
355
|
+
if (def.kind !== "rectPath") return def;
|
|
356
|
+
return {
|
|
357
|
+
kind: "pattern",
|
|
358
|
+
id: def.id,
|
|
359
|
+
href: def.href,
|
|
360
|
+
patternUnits: "objectBoundingBox",
|
|
361
|
+
patternContentUnits: "objectBoundingBox",
|
|
362
|
+
x: 0,
|
|
363
|
+
y: 0,
|
|
364
|
+
width: 1,
|
|
365
|
+
height: 1,
|
|
366
|
+
preserveAspectRatio: "none"
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
353
370
|
// src/pptx/render/chart-view-model-dom-helpers.ts
|
|
354
371
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
355
372
|
function setSvgAttrs(el, attrs) {
|
|
@@ -366,7 +383,8 @@ function createSvgEl(doc, tag, attrs) {
|
|
|
366
383
|
}
|
|
367
384
|
return el;
|
|
368
385
|
}
|
|
369
|
-
function renderPatternDef(doc,
|
|
386
|
+
function renderPatternDef(doc, input) {
|
|
387
|
+
const def = resolveChartSvgDef(input);
|
|
370
388
|
if (def.kind !== "pattern") {
|
|
371
389
|
const gradient = def.kind === "linearGradient" ? createSvgEl(doc, "linearGradient", {
|
|
372
390
|
id: def.id,
|
|
@@ -389,6 +407,7 @@ function renderPatternDef(doc, def) {
|
|
|
389
407
|
const pattern = createSvgEl(doc, "pattern", {
|
|
390
408
|
id: def.id,
|
|
391
409
|
patternUnits: def.patternUnits,
|
|
410
|
+
patternContentUnits: def.patternContentUnits,
|
|
392
411
|
x: def.x,
|
|
393
412
|
y: def.y,
|
|
394
413
|
width: def.width,
|
|
@@ -1042,4 +1061,4 @@ function buildGridlines(layout) {
|
|
|
1042
1061
|
return lines;
|
|
1043
1062
|
}
|
|
1044
1063
|
|
|
1045
|
-
export { CHART_DRAG_THRESHOLD_PX, CHART_INTERACTIVE_CLASS, CHART_PART_ATTR, CHART_PART_POINT_ATTR, CHART_PART_SELECTED_CLASS, CHART_PART_SERIES_ATTR, advanceChartValueDrag, appendChartLegendSvg, applyChartPartHighlight, beginChartValueDrag, buildBarChart3DHoverTooltip, buildBars, buildChartMarkDragGeometry, buildGridlines, buildPerspCamera, buildPieDragGeometry, buildRadarDragGeometry, buildStackedDragGeometry, chartPartFromElement, chartPartToAttrs, computeChartLegendLayout, computePieChartLayout, createSvgEl, dragAnchorViewY, dragValueForPart, ensureChartInteractionStyles, findChartPartTarget, fitPerspView, formatValueLabel, isChartInteractionArmed, isSameChartPart, obliqueBarTaper, perspBoxMatrix, perspCameraFor, perspObliqueCameraFor, perspScreenToPlaneY, perspToScreen, pieRimPoint, renderChartLineSvg, renderChartPrimitiveSvg, renderChartTextSvg, renderChartViewModelSvg, resolveChartDragValue, resolvePieDragValue, resolvePieSliceShareValue, resolveRadarDragValue, resolveStackedDragValue, roundDragValue, shareToValue, valueFromY, widenPieViewModel, withChartPointValue, withChartTitle };
|
|
1064
|
+
export { CHART_DRAG_THRESHOLD_PX, CHART_INTERACTIVE_CLASS, CHART_PART_ATTR, CHART_PART_POINT_ATTR, CHART_PART_SELECTED_CLASS, CHART_PART_SERIES_ATTR, advanceChartValueDrag, appendChartLegendSvg, applyChartPartHighlight, beginChartValueDrag, buildBarChart3DHoverTooltip, buildBars, buildChartMarkDragGeometry, buildGridlines, buildPerspCamera, buildPieDragGeometry, buildRadarDragGeometry, buildStackedDragGeometry, chartPartFromElement, chartPartToAttrs, computeChartLegendLayout, computePieChartLayout, createSvgEl, dragAnchorViewY, dragValueForPart, ensureChartInteractionStyles, findChartPartTarget, fitPerspView, formatValueLabel, isChartInteractionArmed, isSameChartPart, obliqueBarTaper, perspBoxMatrix, perspCameraFor, perspObliqueCameraFor, perspScreenToPlaneY, perspToScreen, pieRimPoint, renderChartLineSvg, renderChartPrimitiveSvg, renderChartTextSvg, renderChartViewModelSvg, resolveChartDragValue, resolveChartSvgDef, resolvePieDragValue, resolvePieSliceShareValue, resolveRadarDragValue, resolveStackedDragValue, roundDragValue, shareToValue, valueFromY, widenPieViewModel, withChartPointValue, withChartTitle };
|