pptx-angular-viewer 4.24.2 → 4.24.3

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/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs re-releases a package whenever any of its files
8
8
  change, not only on conventional ones.
9
9
 
10
+ ## [4.24.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@4.24.2) - 2026-10-05
11
+
12
+ ### Bug Fixes
13
+
14
+ - **shared:** Draw zero-height and zero-width line shapes ([#404](https://github.com/ChristopherVR/pptx-viewer/issues/404)) (by @IHAGI-c) ([8366e0c](https://github.com/ChristopherVR/pptx-viewer/commit/8366e0c672c0838dfc2a5ab894797774d37860d6))
15
+ - **shared:** Skip defining the 3D view element without HTMLElement (by @ChristopherVR) ([8a08d33](https://github.com/ChristopherVR/pptx-viewer/commit/8a08d33560c06c555bf137465022d1a30fdc402a))
16
+ - **vanilla:** Follow the ooxml-ui 0.28 gallery and select contracts (by @ChristopherVR) ([2dd5a64](https://github.com/ChristopherVR/pptx-viewer/commit/2dd5a646ff526a1065fea853e29d25b056e231dc))
17
+
10
18
  ## [4.24.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-angular-viewer@4.24.1) - 2026-10-05
11
19
 
12
20
  ### Testing
@@ -40120,19 +40120,152 @@ function buildSmartArt3DSpecForElement(element, options = {}) {
40120
40120
  });
40121
40121
  return model.meshes.length > 0 ? model : null;
40122
40122
  }
40123
+ const GEOMETRY_SELECTOR = "path, rect, polygon, polyline, ellipse, circle";
40124
+ function nodeShapeContainsPoint(node, x, y) {
40125
+ let tested = false;
40126
+ for (const shape of node.querySelectorAll(GEOMETRY_SELECTOR)) {
40127
+ const geometry = shape;
40128
+ const matrix = geometry.getScreenCTM?.();
40129
+ if (!matrix || typeof geometry.isPointInFill !== "function") continue;
40130
+ const det = matrix.a * matrix.d - matrix.b * matrix.c;
40131
+ if (!det) continue;
40132
+ tested = true;
40133
+ const dx = x - matrix.e;
40134
+ const dy = y - matrix.f;
40135
+ const local = {
40136
+ x: (matrix.d * dx - matrix.c * dy) / det,
40137
+ y: (matrix.a * dy - matrix.b * dx) / det
40138
+ };
40139
+ if (geometry.isPointInFill(local) || geometry.isPointInStroke?.(local)) return true;
40140
+ }
40141
+ return tested ? false : null;
40142
+ }
40123
40143
  function smartArtNodeAtPoint(root, x, y) {
40124
40144
  let best = null;
40125
40145
  let bestArea = Number.POSITIVE_INFINITY;
40126
40146
  for (const node of root.querySelectorAll("[data-smartart-node-id]")) {
40127
40147
  const box = node.getBoundingClientRect();
40128
40148
  const area = box.width * box.height;
40129
- if (area > 0 && x >= box.left && x <= box.right && y >= box.top && y <= box.bottom && area < bestArea) {
40149
+ if (area <= 0 || area >= bestArea) continue;
40150
+ if (nodeShapeContainsPoint(node, x, y) ?? (x >= box.left && x <= box.right && y >= box.top && y <= box.bottom)) {
40130
40151
  best = node;
40131
40152
  bestArea = area;
40132
40153
  }
40133
40154
  }
40134
40155
  return best;
40135
40156
  }
40157
+ function polygonBounds(points) {
40158
+ const pairs = points.trim().split(/\s+/u);
40159
+ let minX = Infinity;
40160
+ let minY = Infinity;
40161
+ let maxX = -Infinity;
40162
+ let maxY = -Infinity;
40163
+ for (const pair of pairs) {
40164
+ const comma = pair.indexOf(",");
40165
+ if (comma < 0) continue;
40166
+ const x = parseFloat(pair.slice(0, comma));
40167
+ const y = parseFloat(pair.slice(comma + 1));
40168
+ if (!isFinite(x) || !isFinite(y)) continue;
40169
+ if (x < minX) minX = x;
40170
+ if (x > maxX) maxX = x;
40171
+ if (y < minY) minY = y;
40172
+ if (y > maxY) maxY = y;
40173
+ }
40174
+ if (!isFinite(minX)) return {
40175
+ x: 0,
40176
+ y: 0,
40177
+ width: 0,
40178
+ height: 0
40179
+ };
40180
+ return {
40181
+ x: minX,
40182
+ y: minY,
40183
+ width: maxX - minX,
40184
+ height: maxY - minY
40185
+ };
40186
+ }
40187
+ function renderedNodeToShape(rn, nodeId, family) {
40188
+ const id = `reflow-${family}-${nodeId}`;
40189
+ const text = rn.text || void 0;
40190
+ if (rn.kind === "rect") return {
40191
+ id,
40192
+ shapeType: rn.rx > 0 ? "roundRect" : "rect",
40193
+ x: rn.x,
40194
+ y: rn.y,
40195
+ width: rn.width,
40196
+ height: rn.height,
40197
+ rotation: 0,
40198
+ fillColor: rn.fill,
40199
+ strokeColor: rn.stroke,
40200
+ strokeWidth: rn.strokeWidth,
40201
+ text,
40202
+ fontSize: rn.fontSize
40203
+ };
40204
+ if (rn.kind === "circle") return {
40205
+ id,
40206
+ shapeType: "ellipse",
40207
+ x: rn.cx - rn.r,
40208
+ y: rn.cy - rn.r,
40209
+ width: rn.r * 2,
40210
+ height: rn.r * 2,
40211
+ rotation: 0,
40212
+ fillColor: rn.fill,
40213
+ strokeColor: rn.stroke,
40214
+ strokeWidth: rn.strokeWidth,
40215
+ text,
40216
+ fontSize: rn.fontSize
40217
+ };
40218
+ const bounds = polygonBounds(rn.points);
40219
+ return {
40220
+ id,
40221
+ shapeType: "chevron",
40222
+ x: bounds.x,
40223
+ y: bounds.y,
40224
+ width: bounds.width,
40225
+ height: bounds.height,
40226
+ rotation: 0,
40227
+ fillColor: rn.fill,
40228
+ strokeColor: rn.stroke,
40229
+ strokeWidth: rn.strokeWidth,
40230
+ text,
40231
+ fontSize: rn.fontSize
40232
+ };
40233
+ }
40234
+ function reflowToDrawingShapes(layoutResult, nodes) {
40235
+ const flat = flattenNodes$1([...nodes]);
40236
+ const family = layoutResult.family;
40237
+ const shapes = [];
40238
+ for (let i = 0; i < layoutResult.nodes.length; i++) {
40239
+ const rn = layoutResult.nodes[i];
40240
+ const nodeId = flat[i]?.id ?? rn.key;
40241
+ shapes.push(renderedNodeToShape(rn, nodeId, family));
40242
+ }
40243
+ return shapes;
40244
+ }
40245
+ function rebuildDrawingShapesIfCleared(smartArtData, layout, palette, style, elementId, box) {
40246
+ const shapes = smartArtData.drawingShapes;
40247
+ if (shapes === void 0 || shapes.length > 0 || smartArtData.nodes.length === 0) return smartArtData;
40248
+ const layoutResult = computeSmartArtElementLayout({
40249
+ ...smartArtData,
40250
+ layout
40251
+ }, smartArtData.nodes, box, palette, style, elementId);
40252
+ return {
40253
+ ...smartArtData,
40254
+ drawingShapes: reflowToDrawingShapes(layoutResult, smartArtData.nodes)
40255
+ };
40256
+ }
40257
+ function reflowed(element, next) {
40258
+ return rebuildDrawingShapesIfCleared(next, next.layout, resolvePalette(next), next.style ?? "flat", element.id, {
40259
+ width: element.width,
40260
+ height: element.height
40261
+ });
40262
+ }
40263
+ function commitSmartArtNodeFill(element, nodeId, fill) {
40264
+ if (element.type !== "smartArt" || !element.smartArtData) return null;
40265
+ const data = element.smartArtData;
40266
+ const next = setSmartArtNodeStyle(data, nodeId, { fillColor: fill });
40267
+ return next === data ? null : reflowed(element, next);
40268
+ }
40136
40269
  const OBLIQUE_CATEGORY_LABEL_GAP = 14 * (4 / 3);
40137
40270
  const VALUE_GAP$1 = 18;
40138
40271
  const CATEGORY_GAP = OBLIQUE_CATEGORY_LABEL_GAP;
@@ -48186,106 +48319,6 @@ function createDefaultChartElement(chartKind = DEFAULT_INSERT_CHART_KIND, positi
48186
48319
  height: position?.height ?? DEFAULT_CHART_POSITION.height
48187
48320
  });
48188
48321
  }
48189
- function polygonBounds(points) {
48190
- const pairs = points.trim().split(/\s+/u);
48191
- let minX = Infinity;
48192
- let minY = Infinity;
48193
- let maxX = -Infinity;
48194
- let maxY = -Infinity;
48195
- for (const pair of pairs) {
48196
- const comma = pair.indexOf(",");
48197
- if (comma < 0) continue;
48198
- const x = parseFloat(pair.slice(0, comma));
48199
- const y = parseFloat(pair.slice(comma + 1));
48200
- if (!isFinite(x) || !isFinite(y)) continue;
48201
- if (x < minX) minX = x;
48202
- if (x > maxX) maxX = x;
48203
- if (y < minY) minY = y;
48204
- if (y > maxY) maxY = y;
48205
- }
48206
- if (!isFinite(minX)) return {
48207
- x: 0,
48208
- y: 0,
48209
- width: 0,
48210
- height: 0
48211
- };
48212
- return {
48213
- x: minX,
48214
- y: minY,
48215
- width: maxX - minX,
48216
- height: maxY - minY
48217
- };
48218
- }
48219
- function renderedNodeToShape(rn, nodeId, family) {
48220
- const id = `reflow-${family}-${nodeId}`;
48221
- const text = rn.text || void 0;
48222
- if (rn.kind === "rect") return {
48223
- id,
48224
- shapeType: rn.rx > 0 ? "roundRect" : "rect",
48225
- x: rn.x,
48226
- y: rn.y,
48227
- width: rn.width,
48228
- height: rn.height,
48229
- rotation: 0,
48230
- fillColor: rn.fill,
48231
- strokeColor: rn.stroke,
48232
- strokeWidth: rn.strokeWidth,
48233
- text,
48234
- fontSize: rn.fontSize
48235
- };
48236
- if (rn.kind === "circle") return {
48237
- id,
48238
- shapeType: "ellipse",
48239
- x: rn.cx - rn.r,
48240
- y: rn.cy - rn.r,
48241
- width: rn.r * 2,
48242
- height: rn.r * 2,
48243
- rotation: 0,
48244
- fillColor: rn.fill,
48245
- strokeColor: rn.stroke,
48246
- strokeWidth: rn.strokeWidth,
48247
- text,
48248
- fontSize: rn.fontSize
48249
- };
48250
- const bounds = polygonBounds(rn.points);
48251
- return {
48252
- id,
48253
- shapeType: "chevron",
48254
- x: bounds.x,
48255
- y: bounds.y,
48256
- width: bounds.width,
48257
- height: bounds.height,
48258
- rotation: 0,
48259
- fillColor: rn.fill,
48260
- strokeColor: rn.stroke,
48261
- strokeWidth: rn.strokeWidth,
48262
- text,
48263
- fontSize: rn.fontSize
48264
- };
48265
- }
48266
- function reflowToDrawingShapes(layoutResult, nodes) {
48267
- const flat = flattenNodes$1([...nodes]);
48268
- const family = layoutResult.family;
48269
- const shapes = [];
48270
- for (let i = 0; i < layoutResult.nodes.length; i++) {
48271
- const rn = layoutResult.nodes[i];
48272
- const nodeId = flat[i]?.id ?? rn.key;
48273
- shapes.push(renderedNodeToShape(rn, nodeId, family));
48274
- }
48275
- return shapes;
48276
- }
48277
- function rebuildDrawingShapesIfCleared(smartArtData, layout, palette, style, elementId, box) {
48278
- const shapes = smartArtData.drawingShapes;
48279
- if (shapes === void 0 || shapes.length > 0 || smartArtData.nodes.length === 0) return smartArtData;
48280
- const layoutResult = computeSmartArtElementLayout({
48281
- ...smartArtData,
48282
- layout
48283
- }, smartArtData.nodes, box, palette, style, elementId);
48284
- return {
48285
- ...smartArtData,
48286
- drawingShapes: reflowToDrawingShapes(layoutResult, smartArtData.nodes)
48287
- };
48288
- }
48289
48322
  function startMediaAutoplay(el, options) {
48290
48323
  const trimStartMs = options?.trimStartMs;
48291
48324
  if (trimStartMs !== void 0 && trimStartMs > 0) try {
@@ -61795,10 +61828,89 @@ function computeThreeViewSize(layoutWidth, layoutHeight, screenWidth, screenHeig
61795
61828
  pixelHeight: clamp(onScreenH * dpr)
61796
61829
  };
61797
61830
  }
61831
+ const IDENTITY = {
61832
+ a: 1,
61833
+ b: 0,
61834
+ c: 0,
61835
+ d: 1
61836
+ };
61837
+ function compose(outer, inner) {
61838
+ return {
61839
+ a: outer.a * inner.a + outer.c * inner.b,
61840
+ b: outer.b * inner.a + outer.d * inner.b,
61841
+ c: outer.a * inner.c + outer.c * inner.d,
61842
+ d: outer.b * inner.c + outer.d * inner.d
61843
+ };
61844
+ }
61845
+ function parseComputedTransform(value) {
61846
+ const match = /^(matrix3d|matrix)\(([^)]*)\)$/u.exec((value ?? "").trim());
61847
+ if (!match) return null;
61848
+ const n = (match[2] ?? "").split(",").map((part) => Number.parseFloat(part));
61849
+ const [a, b, c, d] = (match[1] === "matrix3d" ? [
61850
+ 0,
61851
+ 1,
61852
+ 4,
61853
+ 5
61854
+ ] : [
61855
+ 0,
61856
+ 1,
61857
+ 2,
61858
+ 3
61859
+ ]).map((i) => n[i]);
61860
+ return [
61861
+ a,
61862
+ b,
61863
+ c,
61864
+ d
61865
+ ].every((v) => v !== void 0 && Number.isFinite(v)) ? {
61866
+ a,
61867
+ b,
61868
+ c,
61869
+ d
61870
+ } : null;
61871
+ }
61872
+ function matrixScale(m) {
61873
+ return {
61874
+ x: Math.hypot(m.a, m.b),
61875
+ y: Math.hypot(m.c, m.d)
61876
+ };
61877
+ }
61878
+ function parentOf(node) {
61879
+ if (node.parentElement) return node.parentElement;
61880
+ const root = node.getRootNode?.();
61881
+ return root && "host" in root ? root.host ?? null : null;
61882
+ }
61883
+ function measureTransformScale(element) {
61884
+ const win = element.ownerDocument?.defaultView;
61885
+ if (!win) return {
61886
+ x: 1,
61887
+ y: 1
61888
+ };
61889
+ let total = IDENTITY;
61890
+ for (let node = element; node; node = parentOf(node)) {
61891
+ const style = win.getComputedStyle(node);
61892
+ if (style.scale && style.scale !== "none") {
61893
+ const [sx = "1", sy = sx] = style.scale.split(/\s+/u);
61894
+ const x = Number.parseFloat(sx);
61895
+ const y = Number.parseFloat(sy);
61896
+ if (Number.isFinite(x) && Number.isFinite(y)) total = compose({
61897
+ a: x,
61898
+ b: 0,
61899
+ c: 0,
61900
+ d: y
61901
+ }, total);
61902
+ }
61903
+ const transform = parseComputedTransform(style.transform);
61904
+ if (transform) total = compose(transform, total);
61905
+ }
61906
+ return matrixScale(total);
61907
+ }
61798
61908
  function measureThreeViewSize(element) {
61799
- const rect = element.getBoundingClientRect();
61800
61909
  const win = element.ownerDocument?.defaultView;
61801
- return computeThreeViewSize(element.clientWidth, element.clientHeight, rect.width, rect.height, win?.devicePixelRatio ?? 1);
61910
+ const layoutWidth = element.clientWidth;
61911
+ const layoutHeight = element.clientHeight;
61912
+ const scale = measureTransformScale(element);
61913
+ return computeThreeViewSize(layoutWidth, layoutHeight, layoutWidth * scale.x, layoutHeight * scale.y, win?.devicePixelRatio ?? 1);
61802
61914
  }
61803
61915
  const THREE_VIEW_TAG = "pptx-three-view";
61804
61916
  const THREE_VIEW_MARKER_ATTR = "data-pptx-three-view";
@@ -93861,12 +93973,25 @@ i0.ɵɵngDeclareClassMetadata({
93861
93973
  function getSmartArtData(element) {
93862
93974
  return element.type === "smartArt" ? element.smartArtData : void 0;
93863
93975
  }
93864
- function computeNode3DEditBox(nodeRect, containerRect) {
93976
+ function toNode3DEditBox(rect) {
93865
93977
  return {
93866
- x: nodeRect.left - containerRect.left,
93867
- y: nodeRect.top - containerRect.top,
93868
- width: nodeRect.width,
93869
- height: nodeRect.height
93978
+ x: rect.left,
93979
+ y: rect.top,
93980
+ width: rect.width,
93981
+ height: rect.height
93982
+ };
93983
+ }
93984
+ const STYLE_BAR_WIDTH = 168;
93985
+ const STYLE_BAR_HEIGHT = 40;
93986
+ function computeNode3DStyleBarStyle(rect, container) {
93987
+ if (!rect || !container) return null;
93988
+ const maxLeft = Math.max(0, container.clientWidth - STYLE_BAR_WIDTH);
93989
+ const maxTop = Math.max(0, container.clientHeight - STYLE_BAR_HEIGHT);
93990
+ return {
93991
+ position: "absolute",
93992
+ left: `${Math.min(maxLeft, Math.max(0, rect.left + rect.width - STYLE_BAR_WIDTH))}px`,
93993
+ top: `${Math.min(maxTop, Math.max(0, rect.top - 22))}px`,
93994
+ "z-index": "25"
93870
93995
  };
93871
93996
  }
93872
93997
  var SmartArt3DRendererComponent = class SmartArt3DRendererComponent {
@@ -93892,6 +94017,10 @@ var SmartArt3DRendererComponent = class SmartArt3DRendererComponent {
93892
94017
  this.containerStyle = computed(() => getContainerStyle(this.element(), this.zIndex()), ...ngDevMode ? [{ debugName: "containerStyle" }] : /* istanbul ignore next */ []);
93893
94018
  this.hitTargetStyle = computed(() => shouldRenderHitTarget(this.editable(), this.presenting()) ? elementHitTargetStyle(this.element()) : void 0, ...ngDevMode ? [{ debugName: "hitTargetStyle" }] : /* istanbul ignore next */ []);
93894
94019
  this.smartArtData = computed(() => getSmartArtData(this.element()), ...ngDevMode ? [{ debugName: "smartArtData" }] : /* istanbul ignore next */ []);
94020
+ this.palette = computed(() => resolvePalette(this.smartArtData()), ...ngDevMode ? [{ debugName: "palette" }] : /* istanbul ignore next */ []);
94021
+ this.hoveredNodeId = signal(null, ...ngDevMode ? [{ debugName: "hoveredNodeId" }] : /* istanbul ignore next */ []);
94022
+ this.hoveredNodeRect = signal(null, ...ngDevMode ? [{ debugName: "hoveredNodeRect" }] : /* istanbul ignore next */ []);
94023
+ this.styleBarStyle = computed(() => computeNode3DStyleBarStyle(this.hoveredNodeRect(), this.containerEl()?.nativeElement), ...ngDevMode ? [{ debugName: "styleBarStyle" }] : /* istanbul ignore next */ []);
93895
94024
  effect(() => {
93896
94025
  if (this.editState()) afterNextRender(() => {
93897
94026
  const el = this.nodeEditor3d()?.nativeElement;
@@ -93909,17 +94038,45 @@ var SmartArt3DRendererComponent = class SmartArt3DRendererComponent {
93909
94038
  if (!container || !data || !(overlay instanceof Element)) return;
93910
94039
  const nodeEl = smartArtNodeAtPoint(overlay, event.clientX, event.clientY);
93911
94040
  const nodeId = nodeEl?.getAttribute("data-smartart-node-id");
93912
- if (!nodeEl || !nodeId) return;
94041
+ const rect = nodeEl ? measureSvgViewportRect(nodeEl) : null;
94042
+ if (!nodeEl || !nodeId || !rect) return;
93913
94043
  event.stopPropagation();
93914
94044
  const currentText = data.nodes.find((n) => n.id === nodeId)?.text ?? "";
93915
94045
  this.draftText = currentText;
93916
94046
  this.editSettled = false;
94047
+ this.hoveredNodeId.set(null);
94048
+ this.hoveredNodeRect.set(null);
93917
94049
  this.editState.set({
93918
94050
  nodeId,
93919
- box: computeNode3DEditBox(nodeEl.getBoundingClientRect(), container.getBoundingClientRect()),
94051
+ box: toNode3DEditBox(rect),
93920
94052
  text: currentText
93921
94053
  });
93922
94054
  }
94055
+ onOverlayMouseMove(event) {
94056
+ const overlay = event.currentTarget;
94057
+ if (!(overlay instanceof Element) || this.editState()) return;
94058
+ const nodeEl = smartArtNodeAtPoint(overlay, event.clientX, event.clientY);
94059
+ const id = nodeEl?.getAttribute("data-smartart-node-id") ?? null;
94060
+ if (id !== this.hoveredNodeId()) {
94061
+ this.hoveredNodeId.set(id);
94062
+ this.hoveredNodeRect.set(id && nodeEl ? measureSvgViewportRect(nodeEl) : null);
94063
+ }
94064
+ }
94065
+ onHoverLeave(event) {
94066
+ const to = event.relatedTarget;
94067
+ if (to instanceof Node && this.containerEl()?.nativeElement.contains(to)) return;
94068
+ this.hoveredNodeId.set(null);
94069
+ this.hoveredNodeRect.set(null);
94070
+ }
94071
+ handleChangeNodeStyle(nodeId, fill) {
94072
+ const next = commitSmartArtNodeFill(this.element(), nodeId, fill);
94073
+ if (!next || !this.editor) return;
94074
+ const slideIndex = findOwningSlideIndex(this.editor.slides(), this.element().id, this.slideContext?.slideId() ?? null);
94075
+ if (slideIndex < 0) return;
94076
+ this.hoveredNodeId.set(null);
94077
+ this.hoveredNodeRect.set(null);
94078
+ this.editor.updateElement(slideIndex, this.element().id, { smartArtData: next });
94079
+ }
93923
94080
  updateDraft(event) {
93924
94081
  this.draftText = event.target.value;
93925
94082
  }
@@ -94039,8 +94196,8 @@ var SmartArt3DRendererComponent = class SmartArt3DRendererComponent {
94039
94196
  isSignal: true
94040
94197
  }],
94041
94198
  ngImport: i0,
94042
- template: "@if (useFallback()) {\n <!--\n The SVG renderer only fills a box, so the positioned, id-bearing,\n marked element node has to be drawn here.\n -->\n <div\n class=\"pptx-ng-element pptx-ng-smartart\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-smart-art-renderer [element]=\"element()\" />\n </div>\n} @else {\n <div\n #container3d\n class=\"pptx-ng-element pptx-ng-smartart-3d\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-ng-three-view [spec]=\"spec()\" [interactive]=\"canEdit()\" [textStyle]=\"textStyle()\">\n <pptx-smart-art-renderer [element]=\"element()\" />\n </pptx-ng-three-view>\n @if (canEdit()) {\n <!-- Invisible SVG overlay: provides data-smartart-node-id hit targets -->\n <div class=\"pptx-ng-smartart-3d-hittest\" (dblclick)=\"onOverlayDblClick($event)\">\n <pptx-smart-art-renderer [element]=\"element()\" [editable]=\"false\" />\n </div>\n @if (editState()) {\n <textarea\n #nodeEditor3d\n class=\"pptx-ng-smartart-3d-node-editor\"\n [style.left.px]=\"editState()!.box.x\"\n [style.top.px]=\"editState()!.box.y\"\n [style.width.px]=\"editState()!.box.width\"\n [style.height.px]=\"editState()!.box.height\"\n [value]=\"editState()!.text\"\n spellcheck=\"false\"\n [attr.aria-label]=\"'pptx.smartArt.editNodeText' | translate\"\n (input)=\"updateDraft($event)\"\n (blur)=\"commitEdit()\"\n (keydown)=\"onEditorKeydown($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"$event.stopPropagation()\"\n ></textarea>\n }\n }\n </div>\n}\n",
94043
- styles: [".pptx-ng-smartart-3d-hittest{position:absolute;inset:0;opacity:0;pointer-events:auto}.pptx-ng-smartart-3d-node-editor{position:absolute;box-sizing:border-box;margin:0;padding:1px 2px;border:1px solid var(--pptx-inspector-active, #0078d4);border-radius:2px;background:#fff;color:#111;font-size:11px;line-height:1.1;text-align:center;resize:none;overflow:hidden;z-index:20;outline:none}\n"],
94199
+ template: "@if (useFallback()) {\n <!--\n The SVG renderer only fills a box, so the positioned, id-bearing,\n marked element node has to be drawn here.\n -->\n <div\n class=\"pptx-ng-element pptx-ng-smartart\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-smart-art-renderer [element]=\"element()\" />\n </div>\n} @else {\n <div\n #container3d\n class=\"pptx-ng-element pptx-ng-smartart-3d\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-ng-three-view [spec]=\"spec()\" [interactive]=\"canEdit()\" [textStyle]=\"textStyle()\">\n <pptx-smart-art-renderer [element]=\"element()\" />\n </pptx-ng-three-view>\n @if (canEdit()) {\n <!-- Invisible SVG overlay: provides data-smartart-node-id hit targets -->\n <div\n class=\"pptx-ng-smartart-3d-hittest\"\n (dblclick)=\"onOverlayDblClick($event)\"\n (mousemove)=\"onOverlayMouseMove($event)\"\n (mouseleave)=\"onHoverLeave($event)\"\n >\n <pptx-smart-art-renderer [element]=\"element()\" [editable]=\"false\" />\n </div>\n @if (hoveredNodeId() && !editState() && styleBarStyle()) {\n <!-- Per-node fill colour picker (hover swatch bar), as on the 2D diagram -->\n <div\n class=\"pptx-ng-smartart-3d-style-bar\"\n [ngStyle]=\"styleBarStyle()!\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (mouseleave)=\"onHoverLeave($event)\"\n >\n @for (color of palette().slice(0, 6); track color) {\n <button\n type=\"button\"\n class=\"pptx-ng-smartart-3d-swatch\"\n data-pptx-compact\n [attr.aria-label]=\"'pptx.smartArt.setFill' | translate: { color: color }\"\n [style.background]=\"color\"\n (click)=\"handleChangeNodeStyle(hoveredNodeId()!, color)\"\n ></button>\n }\n </div>\n }\n @if (editState()) {\n <textarea\n #nodeEditor3d\n class=\"pptx-ng-smartart-3d-node-editor\"\n [style.left.px]=\"editState()!.box.x\"\n [style.top.px]=\"editState()!.box.y\"\n [style.width.px]=\"editState()!.box.width\"\n [style.height.px]=\"editState()!.box.height\"\n [value]=\"editState()!.text\"\n spellcheck=\"false\"\n [attr.aria-label]=\"'pptx.smartArt.editNodeText' | translate\"\n (input)=\"updateDraft($event)\"\n (blur)=\"commitEdit()\"\n (keydown)=\"onEditorKeydown($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"$event.stopPropagation()\"\n ></textarea>\n }\n }\n </div>\n}\n",
94200
+ styles: [".pptx-ng-smartart-3d-hittest{position:absolute;inset:0;opacity:0;pointer-events:auto}.pptx-ng-smartart-3d-node-editor{position:absolute;box-sizing:border-box;margin:0;padding:1px 2px;border:1px solid var(--pptx-inspector-active, #0078d4);border-radius:2px;background:#fff;color:#111;font-size:11px;line-height:1.1;text-align:center;resize:none;overflow:hidden;z-index:20;outline:none}.pptx-ng-smartart-3d-style-bar{position:absolute;pointer-events:auto;display:flex;gap:6px;padding:6px 8px;background:#ffffffe6;border:1px solid var(--border, #e2e8f0);border-radius:9999px;box-shadow:0 1px 2px #0000001a}.pptx-ng-smartart-3d-swatch{width:20px;height:20px;border-radius:50%;border:1px solid rgba(0,0,0,.1);cursor:pointer;transition:transform .1s}.pptx-ng-smartart-3d-swatch:hover{transform:scale(1.25)}\n"],
94044
94201
  dependencies: [
94045
94202
  {
94046
94203
  kind: "directive",
@@ -94101,8 +94258,8 @@ i0.ɵɵngDeclareClassMetadata({
94101
94258
  ThreeViewComponent,
94102
94259
  TranslatePipe
94103
94260
  ],
94104
- template: "@if (useFallback()) {\n <!--\n The SVG renderer only fills a box, so the positioned, id-bearing,\n marked element node has to be drawn here.\n -->\n <div\n class=\"pptx-ng-element pptx-ng-smartart\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-smart-art-renderer [element]=\"element()\" />\n </div>\n} @else {\n <div\n #container3d\n class=\"pptx-ng-element pptx-ng-smartart-3d\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-ng-three-view [spec]=\"spec()\" [interactive]=\"canEdit()\" [textStyle]=\"textStyle()\">\n <pptx-smart-art-renderer [element]=\"element()\" />\n </pptx-ng-three-view>\n @if (canEdit()) {\n <!-- Invisible SVG overlay: provides data-smartart-node-id hit targets -->\n <div class=\"pptx-ng-smartart-3d-hittest\" (dblclick)=\"onOverlayDblClick($event)\">\n <pptx-smart-art-renderer [element]=\"element()\" [editable]=\"false\" />\n </div>\n @if (editState()) {\n <textarea\n #nodeEditor3d\n class=\"pptx-ng-smartart-3d-node-editor\"\n [style.left.px]=\"editState()!.box.x\"\n [style.top.px]=\"editState()!.box.y\"\n [style.width.px]=\"editState()!.box.width\"\n [style.height.px]=\"editState()!.box.height\"\n [value]=\"editState()!.text\"\n spellcheck=\"false\"\n [attr.aria-label]=\"'pptx.smartArt.editNodeText' | translate\"\n (input)=\"updateDraft($event)\"\n (blur)=\"commitEdit()\"\n (keydown)=\"onEditorKeydown($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"$event.stopPropagation()\"\n ></textarea>\n }\n }\n </div>\n}\n",
94105
- styles: [".pptx-ng-smartart-3d-hittest{position:absolute;inset:0;opacity:0;pointer-events:auto}.pptx-ng-smartart-3d-node-editor{position:absolute;box-sizing:border-box;margin:0;padding:1px 2px;border:1px solid var(--pptx-inspector-active, #0078d4);border-radius:2px;background:#fff;color:#111;font-size:11px;line-height:1.1;text-align:center;resize:none;overflow:hidden;z-index:20;outline:none}\n"]
94261
+ template: "@if (useFallback()) {\n <!--\n The SVG renderer only fills a box, so the positioned, id-bearing,\n marked element node has to be drawn here.\n -->\n <div\n class=\"pptx-ng-element pptx-ng-smartart\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-smart-art-renderer [element]=\"element()\" />\n </div>\n} @else {\n <div\n #container3d\n class=\"pptx-ng-element pptx-ng-smartart-3d\"\n [ngStyle]=\"containerStyle()\"\n [attr.data-element-id]=\"element().id\"\n [attr.data-pptx-element]=\"markElement() ? 'true' : null\"\n >\n <!-- Interaction-only hit target for a degenerate SmartArt; see `hitTargetStyle`. -->\n @if (hitTargetStyle(); as hit) {\n <div aria-hidden=\"true\" data-pptx-hit-target=\"true\" [ngStyle]=\"hit\"></div>\n }\n <pptx-ng-three-view [spec]=\"spec()\" [interactive]=\"canEdit()\" [textStyle]=\"textStyle()\">\n <pptx-smart-art-renderer [element]=\"element()\" />\n </pptx-ng-three-view>\n @if (canEdit()) {\n <!-- Invisible SVG overlay: provides data-smartart-node-id hit targets -->\n <div\n class=\"pptx-ng-smartart-3d-hittest\"\n (dblclick)=\"onOverlayDblClick($event)\"\n (mousemove)=\"onOverlayMouseMove($event)\"\n (mouseleave)=\"onHoverLeave($event)\"\n >\n <pptx-smart-art-renderer [element]=\"element()\" [editable]=\"false\" />\n </div>\n @if (hoveredNodeId() && !editState() && styleBarStyle()) {\n <!-- Per-node fill colour picker (hover swatch bar), as on the 2D diagram -->\n <div\n class=\"pptx-ng-smartart-3d-style-bar\"\n [ngStyle]=\"styleBarStyle()!\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (mouseleave)=\"onHoverLeave($event)\"\n >\n @for (color of palette().slice(0, 6); track color) {\n <button\n type=\"button\"\n class=\"pptx-ng-smartart-3d-swatch\"\n data-pptx-compact\n [attr.aria-label]=\"'pptx.smartArt.setFill' | translate: { color: color }\"\n [style.background]=\"color\"\n (click)=\"handleChangeNodeStyle(hoveredNodeId()!, color)\"\n ></button>\n }\n </div>\n }\n @if (editState()) {\n <textarea\n #nodeEditor3d\n class=\"pptx-ng-smartart-3d-node-editor\"\n [style.left.px]=\"editState()!.box.x\"\n [style.top.px]=\"editState()!.box.y\"\n [style.width.px]=\"editState()!.box.width\"\n [style.height.px]=\"editState()!.box.height\"\n [value]=\"editState()!.text\"\n spellcheck=\"false\"\n [attr.aria-label]=\"'pptx.smartArt.editNodeText' | translate\"\n (input)=\"updateDraft($event)\"\n (blur)=\"commitEdit()\"\n (keydown)=\"onEditorKeydown($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n (dblclick)=\"$event.stopPropagation()\"\n ></textarea>\n }\n }\n </div>\n}\n",
94262
+ styles: [".pptx-ng-smartart-3d-hittest{position:absolute;inset:0;opacity:0;pointer-events:auto}.pptx-ng-smartart-3d-node-editor{position:absolute;box-sizing:border-box;margin:0;padding:1px 2px;border:1px solid var(--pptx-inspector-active, #0078d4);border-radius:2px;background:#fff;color:#111;font-size:11px;line-height:1.1;text-align:center;resize:none;overflow:hidden;z-index:20;outline:none}.pptx-ng-smartart-3d-style-bar{position:absolute;pointer-events:auto;display:flex;gap:6px;padding:6px 8px;background:#ffffffe6;border:1px solid var(--border, #e2e8f0);border-radius:9999px;box-shadow:0 1px 2px #0000001a}.pptx-ng-smartart-3d-swatch{width:20px;height:20px;border-radius:50%;border:1px solid rgba(0,0,0,.1);cursor:pointer;transition:transform .1s}.pptx-ng-smartart-3d-swatch:hover{transform:scale(1.25)}\n"]
94106
94263
  }]
94107
94264
  }],
94108
94265
  ctorParameters: () => [],
@@ -121405,7 +121562,7 @@ i0.ɵɵngDeclareClassMetadata({
121405
121562
  }]
121406
121563
  }
121407
121564
  });
121408
- const PPTX_ANGULAR_VIEWER_VERSION = "4.24.1";
121565
+ const PPTX_ANGULAR_VIEWER_VERSION = "4.24.2";
121409
121566
  var AccountPageComponent = class AccountPageComponent {
121410
121567
  constructor() {
121411
121568
  this.accountAuth = input(void 0, ...ngDevMode ? [{ debugName: "accountAuth" }] : /* istanbul ignore next */ []);