ooxml-ui 1.18.0 → 1.18.2
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 +28 -0
- package/dist/{chunk-CPHFMJOU.js → chunk-EVL7GFC7.js} +1 -1
- package/dist/{chunk-GSWCAZQ3.js → chunk-FHO7TEWA.js} +1 -0
- package/dist/{chunk-GILNGII2.js → chunk-MSXUCINT.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/pptx/{chart-3d-view-scene-6YLA75UQ.mjs → chart-3d-view-scene-6LQRJAM3.mjs} +2 -2
- package/dist/pptx/{chart-3d-view-scene-4GGMVQNN.cjs → chart-3d-view-scene-FAKI4QKT.cjs} +38 -38
- package/dist/pptx/{chunk-6ZMCXJ32.mjs → chunk-73OUATE4.mjs} +1 -1
- package/dist/pptx/{chunk-LF2X2AOK.mjs → chunk-75S3RTSS.mjs} +1 -1
- package/dist/pptx/{chunk-OFGZWYKM.mjs → chunk-AUCJIB3M.mjs} +162 -96
- package/dist/pptx/{chunk-HKHO4GDD.cjs → chunk-G3UVZ5FO.cjs} +122 -404
- package/dist/pptx/{chunk-QG2EEFAW.cjs → chunk-LCB46TH2.cjs} +12 -12
- package/dist/pptx/{chunk-NTWYYXB2.mjs → chunk-PIIYTRLE.mjs} +69 -374
- package/dist/pptx/{chunk-6OK5Z2MQ.cjs → chunk-S2Y3VUNC.cjs} +914 -842
- package/dist/pptx/{chunk-TXMIKRYG.cjs → chunk-W7CBPO77.cjs} +1 -1
- package/dist/pptx/dom/chart-pixel-subscriptions.d.ts +7 -0
- package/dist/pptx/dom/chart-pixel-subscriptions.d.ts.map +1 -0
- package/dist/pptx/dom/elements/chart.d.ts.map +1 -1
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +340 -285
- package/dist/pptx/dom/index.d.ts +1 -0
- package/dist/pptx/dom/index.d.ts.map +1 -1
- package/dist/pptx/dom/index.mjs +96 -46
- package/dist/pptx/dom/presentation-rerender.d.ts.map +1 -1
- package/dist/pptx/dom/slide-stage.d.ts +5 -0
- 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 +3202 -3174
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chart-axis-range.d.ts +2 -36
- package/dist/pptx/render/chart-axis-range.d.ts.map +1 -1
- package/dist/pptx/render/chart-axis-style.d.ts.map +1 -1
- package/dist/pptx/render/chart-bar3d-face-picture-sample.d.ts +5 -0
- package/dist/pptx/render/chart-bar3d-face-picture-sample.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-helpers.d.ts +2 -1
- package/dist/pptx/render/chart-helpers.d.ts.map +1 -1
- package/dist/pptx/render/chart-marker-shape.d.ts +4 -50
- package/dist/pptx/render/chart-marker-shape.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-view-model-scale.d.ts +3 -2
- package/dist/pptx/render/chart-view-model-scale.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/connector-markers.d.ts +3 -1
- package/dist/pptx/render/connector-markers.d.ts.map +1 -1
- package/dist/pptx/render/custom-path-markers.d.ts +11 -0
- package/dist/pptx/render/custom-path-markers.d.ts.map +1 -0
- package/dist/pptx/render/image-color-change.d.ts +3 -1
- package/dist/pptx/render/image-color-change.d.ts.map +1 -1
- package/dist/pptx/render/image-duotone-canvas.d.ts +3 -1
- package/dist/pptx/render/image-duotone-canvas.d.ts.map +1 -1
- package/dist/pptx/render/image-native-size.d.ts +3 -1
- package/dist/pptx/render/image-native-size.d.ts.map +1 -1
- package/dist/pptx/render/image-source-effects.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/render-cache-lifecycle.d.ts +10 -0
- package/dist/pptx/render/render-cache-lifecycle.d.ts.map +1 -0
- package/dist/pptx/render/render-cache.d.ts +8 -0
- package/dist/pptx/render/render-cache.d.ts.map +1 -0
- package/dist/pptx/render/shape-geometry-cascade.d.ts.map +1 -1
- package/dist/pptx/render/stroke-outline.d.ts +3 -0
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/text-build-spans.d.ts +1 -0
- package/dist/pptx/render/text-build-spans.d.ts.map +1 -1
- package/dist/{presentation-preview-HMEBDYEL.js → presentation-preview-KY56TONW.js} +1 -1
- package/dist/teams.js +2 -2
- package/dist/xlsx.js +4 -4
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -336,3 +336,31 @@ content and native media controls without editing overlays.
|
|
|
336
336
|
|
|
337
337
|
Apache-2.0. Several controls are derived from `pptx-viewer`; see
|
|
338
338
|
`PROVENANCE.md` at the repository root.
|
|
339
|
+
|
|
340
|
+
## Raw PowerPoint DOM lifecycle
|
|
341
|
+
|
|
342
|
+
Custom hosts using `ooxml-ui/pptx/dom` own the returned stage. Before replacing
|
|
343
|
+
or removing a stage (including thumbnails and offscreen export stages), call
|
|
344
|
+
`disposePptxRenderStage(stage)`, then remove its DOM. Disposal is idempotent and
|
|
345
|
+
releases that subtree's chart-sampler subscriptions immediately, even if no
|
|
346
|
+
later image-sample event occurs. It does not clear another stage's subscriptions,
|
|
347
|
+
remove nodes or revoke URLs owned by the host.
|
|
348
|
+
|
|
349
|
+
After closing all viewers/documents sharing the module instance, a host may call
|
|
350
|
+
`releasePptxRenderCaches()` to discard intrinsic-size, chart-picture-sample,
|
|
351
|
+
colour-change and duotone memoisation. This global operation invalidates pending
|
|
352
|
+
library-managed cache writes and chart notifications; pending decodes can still return results
|
|
353
|
+
to their original caller. Do not call it to close one viewer while another needs
|
|
354
|
+
pending samples. It cannot purge browser-internal decoded-image caches.
|
|
355
|
+
|
|
356
|
+
Intrinsic-size memoisation keeps at most 128 entries; colour-change and duotone
|
|
357
|
+
keep at most 64 each. These FIFO caches each have an 8 MiB conservative UTF-16
|
|
358
|
+
key/value budget. Oversized effect results still render without memoisation.
|
|
359
|
+
|
|
360
|
+
Bar-face picture sampling uses admission rather than eviction: completed samples
|
|
361
|
+
and pending requests together reserve at most 128 entries and 8 MiB (URL keys and
|
|
362
|
+
sample colours) for one cache epoch. Keeping admitted samples prevents a sample
|
|
363
|
+
notification/repaint from endlessly re-decoding a just-evicted image. If full or
|
|
364
|
+
a source key exceeds the budget, additional async sampling uses the existing
|
|
365
|
+
point/series-colour fallback until `releasePptxRenderCaches()` starts a new epoch.
|
|
366
|
+
Synchronously decoded colours still render even when they cannot be memoised.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineSmartArt } from './chunk-ANPFMQ6E.js';
|
|
2
|
-
import { TEAMS_TAGS, registerTeams } from './chunk-
|
|
2
|
+
import { TEAMS_TAGS, registerTeams } from './chunk-MSXUCINT.js';
|
|
3
3
|
import { installOfficeUiTheme } from './chunk-7E3HU7RL.js';
|
|
4
4
|
import { registerControls } from './chunk-SPRZIHUH.js';
|
|
5
5
|
import { definePresence } from './chunk-KNC2UEUR.js';
|
|
@@ -3404,6 +3404,7 @@ var TeamsPresentationPreview = class extends TeamsLitElement {
|
|
|
3404
3404
|
player.removeAttribute("src");
|
|
3405
3405
|
player.load();
|
|
3406
3406
|
}
|
|
3407
|
+
if (this.stageNode) this.renderer?.disposePptxRenderStage(this.stageNode);
|
|
3407
3408
|
this.stageNode?.remove();
|
|
3408
3409
|
this.stageNode = null;
|
|
3409
3410
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TeamsLitElement, LOCALE_HOST, teamsI18n, inheritLocale, pushLocale } from './chunk-
|
|
1
|
+
import { TeamsLitElement, LOCALE_HOST, teamsI18n, inheritLocale, pushLocale } from './chunk-FHO7TEWA.js';
|
|
2
2
|
import { THEME_CSS, installOfficeUiTheme } from './chunk-7E3HU7RL.js';
|
|
3
3
|
import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-SPRZIHUH.js';
|
|
4
4
|
import { registerIcon, getIcon } from './chunk-M6GF5ED2.js';
|
|
@@ -2253,7 +2253,7 @@ var TeamsContentPreview = class extends TeamsLitElement {
|
|
|
2253
2253
|
if (kind === "xlsx") (await import('./xlsx.js')).defineXlsxEditor();
|
|
2254
2254
|
if (kind === "vsdx") (await import('./visio.js')).registerVisioViewer();
|
|
2255
2255
|
if (kind === "pptx")
|
|
2256
|
-
(await import('./presentation-preview-
|
|
2256
|
+
(await import('./presentation-preview-KY56TONW.js')).defineTeamsPresentationPreview();
|
|
2257
2257
|
if (request.signal.aborted) return;
|
|
2258
2258
|
this.native = kind;
|
|
2259
2259
|
await this.updateComplete;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-
|
|
1
|
+
export { OFFICE_UI_TAGS, registerOfficeUi } from './chunk-EVL7GFC7.js';
|
|
2
2
|
export { RIBBON_ADD_IN_EVENT, defineRibbonAddInElements, syncRibbonAddIns } from './chunk-SVRIVUWC.js';
|
|
3
3
|
export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-ANPFMQ6E.js';
|
|
4
|
-
export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-
|
|
5
|
-
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-
|
|
4
|
+
export { EMOJI, OfficeUiActivityFeed, OfficeUiAppRail, OfficeUiAvatar, OfficeUiCalendarAgenda, OfficeUiCalendarView, OfficeUiCallControls, OfficeUiCallGrid, OfficeUiChannelList, OfficeUiChatComposer, OfficeUiChatList, OfficeUiChatSidebar, OfficeUiPeoplePicker, OfficeUiPrejoin, QUICK_REACTIONS, TEAMS_TAGS, TeamsApp, TeamsChannelTab, TeamsContentPreview, TeamsController, TeamsElement, TeamsFilesPanel, TeamsSettings, activityTime, applyTeamsProps, colorFor, createTeams, dayKind, dayLabel, defineActivityFeed, defineAppRail, defineAvatar, defineCalendarAgenda, defineCalendarView, defineCallControls, defineCallGrid, defineChannelList, defineChatComposer, defineChatList, defineChatSidebar, definePeoplePicker, definePrejoin, defineTeamsApp, defineTeamsChannelTab, defineTeamsContentPreview, defineTeamsFilesPanel, defineTeamsSettings, formatElapsed, formatSize, formatTime, formatWhen, icon, listenTeamsEvents, loadConfig, loadIdentity, parseIceLines, registerTeams, safeStorage, saveConfig, saveIdentity, withStyles } from './chunk-MSXUCINT.js';
|
|
5
|
+
export { TeamsPresentationPreview, defineTeamsPresentationPreview } from './chunk-FHO7TEWA.js';
|
|
6
6
|
export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme, shadcnBridge, themeBridge } from './chunk-7E3HU7RL.js';
|
|
7
7
|
export { CONTROL_DEFINERS, DEFAULT_COMMENTS_LABELS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_COLOR_SWATCHES, OFFICE_COLOR_SWATCH_HEXES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_SYMBOLS, OFFICE_TITLE_BAR_SEARCH_LIMIT, OFFICE_TOAST_VISIBLE_LIMIT, assignKeyTips, attachKeyTips, attachRibbonGroupOverflow, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, commentInitials, createRibbonOverflow, defineAccount, defineBackstage, defineButton, defineChartPicker, defineCheckbox, defineColorCustom, defineColorGrid, defineCommandSearch, defineCommentsPane, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineGallery, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonActions, defineRibbonGroup, defineRibbonSection, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineSymbolPicker, defineTabStrip, defineTaskPane, defineTitleBar, defineToasts, defineToolbar, defineZoomSlider, fitRibbonGroups, formatCommentTime, glyph, nextEnabledIndex, optionText, optionsLabels, parseOfficeSymbolCode, parseSvgPreview, personalizeSection, profileInitials, readOfficeProfile, registerControls, rulerDivisions, runKeyTips, sanitizeOfficeProfile, typeAheadIndex, unavailableCategory, unavailableControl, userInterfaceSection, writeOfficeProfile } from './chunk-SPRZIHUH.js';
|
|
8
8
|
export { createIconSvg, getIcon, listIcons, paintIcon, registerIcon } from './chunk-M6GF5ED2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { widenPieViewModel, buildPerspCamera, createSvgEl, appendChartLegendSvg, renderChartLineSvg, renderChartTextSvg, perspBoxMatrix, pieRimPoint, perspScreenToPlaneY, resolvePieSliceShareValue, perspToScreen, roundDragValue, buildBarChart3DHoverTooltip, isChartInteractionArmed, computePieChartLayout, obliqueBarTaper } from './chunk-
|
|
2
|
-
import { resolveChartPalette, shade, DEFAULT_BAR_GAP_WIDTH } from './chunk-
|
|
1
|
+
import { widenPieViewModel, buildPerspCamera, createSvgEl, appendChartLegendSvg, renderChartLineSvg, renderChartTextSvg, perspBoxMatrix, pieRimPoint, perspScreenToPlaneY, resolvePieSliceShareValue, perspToScreen, roundDragValue, buildBarChart3DHoverTooltip, isChartInteractionArmed, computePieChartLayout, obliqueBarTaper } from './chunk-73OUATE4.mjs';
|
|
2
|
+
import { resolveChartPalette, shade, DEFAULT_BAR_GAP_WIDTH } from './chunk-PIIYTRLE.mjs';
|
|
3
3
|
import './chunk-U5DDQYSF.mjs';
|
|
4
4
|
|
|
5
5
|
// src/pptx/render/chart-3d-shading.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkLCB46TH2_cjs = require('./chunk-LCB46TH2.cjs');
|
|
4
|
+
var chunkG3UVZ5FO_cjs = require('./chunk-G3UVZ5FO.cjs');
|
|
5
5
|
require('./chunk-MF3JURQN.cjs');
|
|
6
6
|
|
|
7
7
|
// src/pptx/render/chart-3d-shading.ts
|
|
@@ -15,7 +15,7 @@ var FACE_SHADE_AMOUNT = {
|
|
|
15
15
|
};
|
|
16
16
|
function shadeChart3DFace(baseColor, face) {
|
|
17
17
|
const amount = FACE_SHADE_AMOUNT[face];
|
|
18
|
-
return amount === 0 ? baseColor :
|
|
18
|
+
return amount === 0 ? baseColor : chunkG3UVZ5FO_cjs.shade(baseColor, amount);
|
|
19
19
|
}
|
|
20
20
|
function buildChart3DBoxFaceColors(baseColor) {
|
|
21
21
|
return [
|
|
@@ -204,7 +204,7 @@ function buildChart3DBarMeshes(three, layout, svgWidth, svgHeight) {
|
|
|
204
204
|
// src/pptx/render/chart-3d-chrome-overlay.ts
|
|
205
205
|
function renderChart3DChromeOverlaySvg(doc, source, box) {
|
|
206
206
|
const vm = box ? withBoxChromePositions(source) : source;
|
|
207
|
-
const svg =
|
|
207
|
+
const svg = chunkLCB46TH2_cjs.createSvgEl(doc, "svg", {
|
|
208
208
|
class: "pptxv-chart-3d-chrome",
|
|
209
209
|
viewBox: `0 0 ${vm.svgWidth} ${vm.svgHeight}`,
|
|
210
210
|
preserveAspectRatio: "none"
|
|
@@ -217,7 +217,7 @@ function renderChart3DChromeOverlaySvg(doc, source, box) {
|
|
|
217
217
|
svg.style.setProperty("pointer-events", "none");
|
|
218
218
|
if (vm.areaFill) {
|
|
219
219
|
svg.appendChild(
|
|
220
|
-
|
|
220
|
+
chunkLCB46TH2_cjs.createSvgEl(doc, "rect", {
|
|
221
221
|
x: 0,
|
|
222
222
|
y: 0,
|
|
223
223
|
width: vm.svgWidth,
|
|
@@ -228,7 +228,7 @@ function renderChart3DChromeOverlaySvg(doc, source, box) {
|
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
230
|
if (vm.title) {
|
|
231
|
-
const title =
|
|
231
|
+
const title = chunkLCB46TH2_cjs.createSvgEl(doc, "text", {
|
|
232
232
|
x: vm.titleX,
|
|
233
233
|
y: vm.titleY,
|
|
234
234
|
"text-anchor": "middle",
|
|
@@ -240,7 +240,7 @@ function renderChart3DChromeOverlaySvg(doc, source, box) {
|
|
|
240
240
|
});
|
|
241
241
|
if (vm.titleRunSpans && vm.titleRunSpans.length > 0) {
|
|
242
242
|
for (const run of vm.titleRunSpans) {
|
|
243
|
-
const tspan =
|
|
243
|
+
const tspan = chunkLCB46TH2_cjs.createSvgEl(doc, "tspan", {
|
|
244
244
|
"font-size": run.fontSize,
|
|
245
245
|
"font-weight": run.fontWeight,
|
|
246
246
|
"font-style": run.fontStyle,
|
|
@@ -259,28 +259,28 @@ function renderChart3DChromeOverlaySvg(doc, source, box) {
|
|
|
259
259
|
appendBoxLabels(doc, svg, vm, box.labels);
|
|
260
260
|
const legend = box.legend ?? vm.legend.map((item) => ({ ...item, lineSwatch: void 0 }));
|
|
261
261
|
const legendVm = { ...vm, legend: box.reverseLegend ? legend.reverse() : legend };
|
|
262
|
-
|
|
262
|
+
chunkLCB46TH2_cjs.appendChartLegendSvg(doc, svg, legendVm);
|
|
263
263
|
return svg;
|
|
264
264
|
}
|
|
265
265
|
for (const gl of vm.gridlines) {
|
|
266
|
-
svg.appendChild(
|
|
266
|
+
svg.appendChild(chunkLCB46TH2_cjs.renderChartLineSvg(doc, gl));
|
|
267
267
|
}
|
|
268
268
|
for (const gl of vm.secondaryGridlines ?? []) {
|
|
269
|
-
svg.appendChild(
|
|
269
|
+
svg.appendChild(chunkLCB46TH2_cjs.renderChartLineSvg(doc, gl));
|
|
270
270
|
}
|
|
271
271
|
for (const lbl of vm.axisLabels) {
|
|
272
|
-
svg.appendChild(
|
|
272
|
+
svg.appendChild(chunkLCB46TH2_cjs.renderChartTextSvg(doc, lbl));
|
|
273
273
|
}
|
|
274
274
|
for (const lbl of vm.secondaryAxisLabels ?? []) {
|
|
275
|
-
svg.appendChild(
|
|
275
|
+
svg.appendChild(chunkLCB46TH2_cjs.renderChartTextSvg(doc, lbl));
|
|
276
276
|
}
|
|
277
277
|
if (vm.zeroLine) {
|
|
278
|
-
svg.appendChild(
|
|
278
|
+
svg.appendChild(chunkLCB46TH2_cjs.renderChartLineSvg(doc, vm.zeroLine));
|
|
279
279
|
}
|
|
280
280
|
for (const lbl of vm.categoryLabels) {
|
|
281
|
-
svg.appendChild(
|
|
281
|
+
svg.appendChild(chunkLCB46TH2_cjs.renderChartTextSvg(doc, lbl));
|
|
282
282
|
}
|
|
283
|
-
|
|
283
|
+
chunkLCB46TH2_cjs.appendChartLegendSvg(doc, svg, vm);
|
|
284
284
|
return svg;
|
|
285
285
|
}
|
|
286
286
|
var PT = 4 / 3;
|
|
@@ -299,7 +299,7 @@ function appendBoxLabels(doc, svg, vm, labels) {
|
|
|
299
299
|
const style = vm.axisLabels[0];
|
|
300
300
|
for (const label of labels) {
|
|
301
301
|
svg.appendChild(
|
|
302
|
-
|
|
302
|
+
chunkLCB46TH2_cjs.renderChartTextSvg(doc, {
|
|
303
303
|
kind: "text",
|
|
304
304
|
x: label.x,
|
|
305
305
|
y: label.y,
|
|
@@ -369,7 +369,7 @@ function attachChart3DMarkInteraction(options) {
|
|
|
369
369
|
}
|
|
370
370
|
const point = pointAt(event.clientX, event.clientY);
|
|
371
371
|
const value = point ? adapter.valueOf(point) : void 0;
|
|
372
|
-
const tooltip = point && value !== void 0 ?
|
|
372
|
+
const tooltip = point && value !== void 0 ? chunkLCB46TH2_cjs.buildBarChart3DHoverTooltip(
|
|
373
373
|
{ seriesIndex: point.seriesIndex, categoryIndex: point.pointIndex, value },
|
|
374
374
|
{
|
|
375
375
|
categoryLabels: options.categoryLabels,
|
|
@@ -387,7 +387,7 @@ function attachChart3DMarkInteraction(options) {
|
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
389
|
const point = pointAt(event.clientX, event.clientY);
|
|
390
|
-
const armed = point !== null &&
|
|
390
|
+
const armed = point !== null && chunkLCB46TH2_cjs.isChartInteractionArmed(target);
|
|
391
391
|
if (armed) {
|
|
392
392
|
event.stopPropagation();
|
|
393
393
|
}
|
|
@@ -463,7 +463,7 @@ function obliqueDragValue(layout, startValue, dx, dy) {
|
|
|
463
463
|
const along = layout.horizontal ? dx : -dy;
|
|
464
464
|
const raw = startValue + along / layout.valueScale;
|
|
465
465
|
const span = layout.range.max - layout.range.min;
|
|
466
|
-
return
|
|
466
|
+
return chunkLCB46TH2_cjs.roundDragValue(raw, { min: layout.range.min, max: layout.range.max, span });
|
|
467
467
|
}
|
|
468
468
|
function obliqueDraggedExtent(layout, value) {
|
|
469
469
|
const { min, max } = layout.range;
|
|
@@ -476,7 +476,7 @@ function obliqueDraggedExtent(layout, value) {
|
|
|
476
476
|
function obliqueBarAtValue(layout, bar, value) {
|
|
477
477
|
const { from, length } = obliqueDraggedExtent(layout, value);
|
|
478
478
|
const extent = (layout.range.max - layout.range.min) * layout.valueScale;
|
|
479
|
-
const taper =
|
|
479
|
+
const taper = chunkLCB46TH2_cjs.obliqueBarTaper(bar.shape, from, from + length, extent, value);
|
|
480
480
|
return layout.horizontal ? { ...bar, x: from, w: length, value, taper } : { ...bar, y: from, h: length, value, taper };
|
|
481
481
|
}
|
|
482
482
|
|
|
@@ -568,7 +568,7 @@ function buildPerspBarPrisms(chartData, layout, override) {
|
|
|
568
568
|
const nSer = chartData.series.length;
|
|
569
569
|
const catExtent = layout.horizontal ? layout.view.box.h : layout.view.box.w;
|
|
570
570
|
const slot = nCat > 0 ? catExtent / nCat : catExtent;
|
|
571
|
-
const gapWidth = (chartData.barGapWidth ??
|
|
571
|
+
const gapWidth = (chartData.barGapWidth ?? chunkG3UVZ5FO_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
|
|
572
572
|
const slots = layout.grouping === "clustered" ? nSer : 1;
|
|
573
573
|
const barW = slot / (slots + gapWidth);
|
|
574
574
|
const depth = Math.min(barW, layout.rowDepth);
|
|
@@ -621,7 +621,7 @@ function buildPerspBarPrisms(chartData, layout, override) {
|
|
|
621
621
|
z0,
|
|
622
622
|
z1: z0 + depth,
|
|
623
623
|
shape,
|
|
624
|
-
taper:
|
|
624
|
+
taper: chunkLCB46TH2_cjs.obliqueBarTaper(
|
|
625
625
|
shape,
|
|
626
626
|
v0,
|
|
627
627
|
v1,
|
|
@@ -816,7 +816,7 @@ function buildPerspGridlines(three, layout) {
|
|
|
816
816
|
function buildPerspMeshes(three, layout, prisms) {
|
|
817
817
|
const group = new three.Group();
|
|
818
818
|
group.matrixAutoUpdate = false;
|
|
819
|
-
group.matrix.copy(
|
|
819
|
+
group.matrix.copy(chunkLCB46TH2_cjs.perspBoxMatrix(three, layout.view));
|
|
820
820
|
const gridlines = buildPerspGridlines(three, layout);
|
|
821
821
|
group.add(gridlines);
|
|
822
822
|
const material = new three.MeshBasicMaterial({ vertexColors: true, side: three.DoubleSide });
|
|
@@ -871,7 +871,7 @@ function surfaceBands(chartData, range, palette) {
|
|
|
871
871
|
const fmt = chartData.bandFmts?.find((b) => b.index === i)?.spPr;
|
|
872
872
|
const cycle = palette.length > 0 ? palette : ["#4472C4"];
|
|
873
873
|
const base = cycle[i % cycle.length];
|
|
874
|
-
const fallback = Math.floor(i / cycle.length) % 2 === 1 ?
|
|
874
|
+
const fallback = Math.floor(i / cycle.length) % 2 === 1 ? chunkG3UVZ5FO_cjs.shade(base, 0.4) : base;
|
|
875
875
|
return {
|
|
876
876
|
label: `${formatEdge(lo)}-${formatEdge(edges[i + 1])}`,
|
|
877
877
|
color: fmt?.fillColor ?? fmt?.strokeColor ?? fallback
|
|
@@ -1055,7 +1055,7 @@ function disposeObject(object) {
|
|
|
1055
1055
|
function buildSurfaceMarks(three, chartData, layout, palette) {
|
|
1056
1056
|
const group = new three.Group();
|
|
1057
1057
|
group.matrixAutoUpdate = false;
|
|
1058
|
-
group.matrix.copy(
|
|
1058
|
+
group.matrix.copy(chunkLCB46TH2_cjs.perspBoxMatrix(three, layout.view));
|
|
1059
1059
|
const gridlines = buildPerspGridlines(three, layout);
|
|
1060
1060
|
group.add(gridlines);
|
|
1061
1061
|
let visual = buildVisual(three, chartData, layout, palette);
|
|
@@ -1195,8 +1195,8 @@ function surfaceLegend(chartData, layout, palette, background, textStyle) {
|
|
|
1195
1195
|
function mountPerspChartView(input, ctx) {
|
|
1196
1196
|
const three = ctx.three;
|
|
1197
1197
|
const { vm, layout, chartData } = input;
|
|
1198
|
-
const palette =
|
|
1199
|
-
const camera =
|
|
1198
|
+
const palette = chunkG3UVZ5FO_cjs.resolveChartPalette(chartData);
|
|
1199
|
+
const camera = chunkLCB46TH2_cjs.buildPerspCamera(three, layout.view, vm.svgWidth, vm.svgHeight);
|
|
1200
1200
|
const scene = new three.Scene();
|
|
1201
1201
|
const marks = buildPerspMarkSet(three, chartData, layout, palette);
|
|
1202
1202
|
scene.add(marks.group);
|
|
@@ -1245,15 +1245,15 @@ function mountPerspChartView(input, ctx) {
|
|
|
1245
1245
|
const a = marks.anchor(point, start);
|
|
1246
1246
|
const step = unit * layout.valueScale;
|
|
1247
1247
|
const b = layout.horizontal ? [a[0] + step, a[1], a[2]] : [a[0], a[1] + step, a[2]];
|
|
1248
|
-
const s0 =
|
|
1249
|
-
const s1 =
|
|
1248
|
+
const s0 = chunkLCB46TH2_cjs.perspToScreen(layout.view, a);
|
|
1249
|
+
const s1 = chunkLCB46TH2_cjs.perspToScreen(layout.view, b);
|
|
1250
1250
|
const ux = (s1.x - s0.x) / unit;
|
|
1251
1251
|
const uy = (s1.y - s0.y) / unit;
|
|
1252
1252
|
const len2 = ux * ux + uy * uy || 1;
|
|
1253
1253
|
const span = layout.range.max - layout.range.min;
|
|
1254
1254
|
return {
|
|
1255
1255
|
preview(dx, dy) {
|
|
1256
|
-
const value =
|
|
1256
|
+
const value = chunkLCB46TH2_cjs.roundDragValue(start + (dx * ux + dy * uy) / len2, {
|
|
1257
1257
|
min: layout.range.min,
|
|
1258
1258
|
max: layout.range.max,
|
|
1259
1259
|
span
|
|
@@ -1341,7 +1341,7 @@ function sliceBuffers(three, layout, slice) {
|
|
|
1341
1341
|
const steps = Math.max(2, Math.ceil(span / (Math.PI * 2) * SEGMENTS_PER_TURN));
|
|
1342
1342
|
const angles = Array.from({ length: steps + 1 }, (_, i) => slice.startAngle + span * i / steps);
|
|
1343
1343
|
const rim = (a, y) => {
|
|
1344
|
-
const p =
|
|
1344
|
+
const p = chunkLCB46TH2_cjs.pieRimPoint(cx, cz, r, a);
|
|
1345
1345
|
return [p.x, y, p.z];
|
|
1346
1346
|
};
|
|
1347
1347
|
const radial = (a) => [Math.sin(a), 0, Math.cos(a)];
|
|
@@ -1385,7 +1385,7 @@ function sliceBuffers(three, layout, slice) {
|
|
|
1385
1385
|
function buildPieMarks(three, layout) {
|
|
1386
1386
|
const group = new three.Group();
|
|
1387
1387
|
group.matrixAutoUpdate = false;
|
|
1388
|
-
group.matrix.copy(
|
|
1388
|
+
group.matrix.copy(chunkLCB46TH2_cjs.perspBoxMatrix(three, layout.view));
|
|
1389
1389
|
const material = new three.MeshBasicMaterial({
|
|
1390
1390
|
vertexColors: true,
|
|
1391
1391
|
side: three.DoubleSide,
|
|
@@ -1449,12 +1449,12 @@ function slicesWith(input, pointIndex, value) {
|
|
|
1449
1449
|
...input.element,
|
|
1450
1450
|
chartData: { ...input.chartData, series }
|
|
1451
1451
|
};
|
|
1452
|
-
return
|
|
1452
|
+
return chunkLCB46TH2_cjs.computePieChartLayout(element, input.vm)?.slices ?? input.layout.slices;
|
|
1453
1453
|
}
|
|
1454
1454
|
function mountPieChartView(input, ctx) {
|
|
1455
1455
|
const three = ctx.three;
|
|
1456
1456
|
const { vm, layout, chartData } = input;
|
|
1457
|
-
const camera =
|
|
1457
|
+
const camera = chunkLCB46TH2_cjs.buildPerspCamera(three, layout.view, vm.svgWidth, vm.svgHeight);
|
|
1458
1458
|
const scene = new three.Scene();
|
|
1459
1459
|
const marks = buildPieMarks(three, layout);
|
|
1460
1460
|
scene.add(marks.group);
|
|
@@ -1495,7 +1495,7 @@ function mountPieChartView(input, ctx) {
|
|
|
1495
1495
|
const start = values();
|
|
1496
1496
|
return {
|
|
1497
1497
|
preview(_dx, _dy, at) {
|
|
1498
|
-
const hit =
|
|
1498
|
+
const hit = chunkLCB46TH2_cjs.perspScreenToPlaneY(layout.view, at.x, at.y, layout.center.y);
|
|
1499
1499
|
if (!hit) {
|
|
1500
1500
|
return start[point.pointIndex];
|
|
1501
1501
|
}
|
|
@@ -1503,7 +1503,7 @@ function mountPieChartView(input, ctx) {
|
|
|
1503
1503
|
hit.x - layout.center.x - slice.offset.x,
|
|
1504
1504
|
hit.z - layout.center.z - slice.offset.z
|
|
1505
1505
|
);
|
|
1506
|
-
const value =
|
|
1506
|
+
const value = chunkLCB46TH2_cjs.resolvePieSliceShareValue(
|
|
1507
1507
|
angle,
|
|
1508
1508
|
slice.startAngle,
|
|
1509
1509
|
start,
|
|
@@ -1519,7 +1519,7 @@ function mountPieChartView(input, ctx) {
|
|
|
1519
1519
|
marker.visible = slice !== void 0;
|
|
1520
1520
|
if (slice) {
|
|
1521
1521
|
const mid = (slice.startAngle + slice.endAngle) / 2;
|
|
1522
|
-
const p =
|
|
1522
|
+
const p = chunkLCB46TH2_cjs.pieRimPoint(
|
|
1523
1523
|
layout.center.x + slice.offset.x,
|
|
1524
1524
|
layout.center.z + slice.offset.z,
|
|
1525
1525
|
layout.radius * 0.6,
|
|
@@ -1584,7 +1584,7 @@ async function mountChart3DView(spec, ctx) {
|
|
|
1584
1584
|
return mountPieChartView(
|
|
1585
1585
|
{
|
|
1586
1586
|
element: spec.element,
|
|
1587
|
-
vm:
|
|
1587
|
+
vm: chunkLCB46TH2_cjs.widenPieViewModel(spec.vm, spec.element),
|
|
1588
1588
|
layout: spec.geometry.layout,
|
|
1589
1589
|
chartData: chartData2,
|
|
1590
1590
|
categoryLabels: spec.categoryLabels
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computePlotLayout, radarAngle, computeStackedSeriesPlots, computeLayoutOptions, computeStackedValueRangeForAxis, primaryValueAxis, valueToY2, collapseChartTitleRunsForEdit, computePieLayout, computeChartLegendLayout, buildMarkTooltip, formatAxisValueWithUnits, axisTickValues } from './chunk-
|
|
1
|
+
import { computePlotLayout, radarAngle, computeStackedSeriesPlots, computeLayoutOptions, computeStackedValueRangeForAxis, primaryValueAxis, valueToY2, collapseChartTitleRunsForEdit, computePieLayout, computeChartLegendLayout, buildMarkTooltip, formatAxisValueWithUnits, axisTickValues } from './chunk-PIIYTRLE.mjs';
|
|
2
2
|
|
|
3
3
|
// src/pptx/render/chart-interaction-radar.ts
|
|
4
4
|
function buildRadarDragGeometry(element, chartData, categoryLabels, pointIndex) {
|
|
@@ -112,7 +112,7 @@ async function loadChart3DThree() {
|
|
|
112
112
|
|
|
113
113
|
// src/pptx/three-view/scene-registry.ts
|
|
114
114
|
var loaders = {
|
|
115
|
-
chart: async () => (await import('./chart-3d-view-scene-
|
|
115
|
+
chart: async () => (await import('./chart-3d-view-scene-6LQRJAM3.mjs')).mountChart3DView,
|
|
116
116
|
smartart: async () => (await import('./view-scene-BSTOVMHA.mjs')).mountSmartArt3DView
|
|
117
117
|
};
|
|
118
118
|
async function loadThreeViewScene(kind) {
|