pptx-react-viewer 1.13.1 → 1.14.1
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 +17 -0
- package/dist/{Model3DScene-C5O6LDSN.js → Model3DScene-E2FDY2TX.js} +3 -3
- package/dist/Model3DScene-E2FDY2TX.js.br +0 -0
- package/dist/Model3DScene-E2FDY2TX.js.gz +0 -0
- package/dist/{Model3DScene-SGFNVFB2.mjs → Model3DScene-JUJB4MJX.mjs} +2 -2
- package/dist/{Model3DScene-SGFNVFB2.mjs.br → Model3DScene-JUJB4MJX.mjs.br} +0 -0
- package/dist/Model3DScene-JUJB4MJX.mjs.gz +0 -0
- package/dist/{PowerPointViewer-C2a7iXAK.d.ts → PowerPointViewer-BsaUH3ZT.d.ts} +3 -3
- package/dist/{PowerPointViewer-BzsjqMzg.d.mts → PowerPointViewer-Nxku67uL.d.mts} +3 -3
- package/dist/{SurfaceChart3DScene-CDWIMU7C.mjs → SurfaceChart3DScene-2DEB7NMW.mjs} +2 -2
- package/dist/SurfaceChart3DScene-2DEB7NMW.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-2DEB7NMW.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-NWZ2GCPS.js → SurfaceChart3DScene-Z64TSGR5.js} +3 -3
- package/dist/SurfaceChart3DScene-Z64TSGR5.js.br +0 -0
- package/dist/SurfaceChart3DScene-Z64TSGR5.js.gz +0 -0
- package/dist/{chunk-LARZRLKB.js → chunk-6CNJINIT.js} +322 -27
- package/dist/chunk-6CNJINIT.js.br +0 -0
- package/dist/chunk-6CNJINIT.js.gz +0 -0
- package/dist/{chunk-AMFNG44P.js → chunk-CHG7GPGB.js} +471 -626
- package/dist/chunk-CHG7GPGB.js.br +0 -0
- package/dist/chunk-CHG7GPGB.js.gz +0 -0
- package/dist/{chunk-ASB757HI.mjs → chunk-CZOMQPLZ.mjs} +65 -220
- package/dist/chunk-CZOMQPLZ.mjs.br +0 -0
- package/dist/chunk-CZOMQPLZ.mjs.gz +0 -0
- package/dist/{chunk-4ZYUPWYP.mjs → chunk-MAXS6AU7.mjs} +38 -18
- package/dist/chunk-MAXS6AU7.mjs.br +0 -0
- package/dist/chunk-MAXS6AU7.mjs.gz +0 -0
- package/dist/{chunk-S52XBUDM.js → chunk-OBLHB72P.js} +10 -0
- package/dist/chunk-OBLHB72P.js.br +0 -0
- package/dist/{chunk-S52XBUDM.js.gz → chunk-OBLHB72P.js.gz} +0 -0
- package/dist/{chunk-XBOHG5BO.mjs → chunk-QFRXMAFR.mjs} +10 -0
- package/dist/chunk-QFRXMAFR.mjs.br +0 -0
- package/dist/{chunk-XBOHG5BO.mjs.gz → chunk-QFRXMAFR.mjs.gz} +0 -0
- package/dist/{chunk-3VVUDMB7.js → chunk-RXIGJGJN.js} +856 -836
- package/dist/chunk-RXIGJGJN.js.br +0 -0
- package/dist/chunk-RXIGJGJN.js.gz +0 -0
- package/dist/{chunk-KULOGKNE.mjs → chunk-ZK4SPHDQ.mjs} +291 -3
- package/dist/chunk-ZK4SPHDQ.mjs.br +0 -0
- package/dist/chunk-ZK4SPHDQ.mjs.gz +0 -0
- package/dist/{dist-JVXXDMU7.mjs → dist-D5LQ7PW7.mjs} +1 -1
- package/dist/dist-D5LQ7PW7.mjs.br +0 -0
- package/dist/dist-D5LQ7PW7.mjs.gz +0 -0
- package/dist/{dist-TRWOWXDT.js → dist-MVSQ6PWP.js} +505 -505
- package/dist/dist-MVSQ6PWP.js.br +0 -0
- package/dist/dist-MVSQ6PWP.js.gz +0 -0
- package/dist/hooks-unstable.d.mts +127 -121
- package/dist/hooks-unstable.d.ts +127 -121
- package/dist/hooks-unstable.js +74 -74
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +18 -18
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/pptx-viewer.css +2 -2
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{types-ui-DlsqFx7_.d.mts → types-ui-NG29h55h.d.mts} +31 -20
- package/dist/{types-ui-DlsqFx7_.d.ts → types-ui-NG29h55h.d.ts} +31 -20
- package/dist/{usePresenterWindow-BKx5DLJy.d.ts → usePresenterWindow-DToCijGy.d.ts} +44 -44
- package/dist/{usePresenterWindow-BQwzr87T.d.mts → usePresenterWindow-DeTm-unp.d.mts} +44 -44
- package/dist/viewer/index.d.mts +6 -6
- package/dist/viewer/index.d.ts +6 -6
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/y-webrtc-6CRYHAXH.mjs +2 -2
- package/dist/y-webrtc-6CRYHAXH.mjs.br +0 -0
- package/dist/y-webrtc-6CRYHAXH.mjs.gz +0 -0
- package/dist/y-webrtc-QCZF75JW.js +2 -2
- package/dist/y-webrtc-QCZF75JW.js.br +0 -0
- package/dist/y-webrtc-QCZF75JW.js.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-C5O6LDSN.js.br +0 -0
- package/dist/Model3DScene-C5O6LDSN.js.gz +0 -0
- package/dist/Model3DScene-SGFNVFB2.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-CDWIMU7C.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-CDWIMU7C.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-NWZ2GCPS.js.br +0 -0
- package/dist/SurfaceChart3DScene-NWZ2GCPS.js.gz +0 -0
- package/dist/chunk-3VVUDMB7.js.br +0 -0
- package/dist/chunk-3VVUDMB7.js.gz +0 -0
- package/dist/chunk-4ZYUPWYP.mjs.br +0 -0
- package/dist/chunk-4ZYUPWYP.mjs.gz +0 -0
- package/dist/chunk-AMFNG44P.js.br +0 -0
- package/dist/chunk-AMFNG44P.js.gz +0 -0
- package/dist/chunk-ASB757HI.mjs.br +0 -0
- package/dist/chunk-ASB757HI.mjs.gz +0 -0
- package/dist/chunk-KULOGKNE.mjs.br +0 -0
- package/dist/chunk-KULOGKNE.mjs.gz +0 -0
- package/dist/chunk-LARZRLKB.js.br +0 -0
- package/dist/chunk-LARZRLKB.js.gz +0 -0
- package/dist/chunk-S52XBUDM.js.br +0 -0
- package/dist/chunk-XBOHG5BO.mjs.br +0 -0
- package/dist/dist-JVXXDMU7.mjs.br +0 -0
- package/dist/dist-JVXXDMU7.mjs.gz +0 -0
- package/dist/dist-TRWOWXDT.js.br +0 -0
- package/dist/dist-TRWOWXDT.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkOBLHB72P_js = require('./chunk-OBLHB72P.js');
|
|
4
4
|
var DOMPurify = require('dompurify');
|
|
5
5
|
|
|
6
6
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -222,7 +222,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
222
222
|
guides.push({
|
|
223
223
|
id: g.id,
|
|
224
224
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
225
|
-
position:
|
|
225
|
+
position: chunkOBLHB72P_js.guideEmuToPx(g.positionEmu)
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}
|
|
@@ -231,7 +231,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
231
231
|
guides.push({
|
|
232
232
|
id: g.id,
|
|
233
233
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
234
|
-
position:
|
|
234
|
+
position: chunkOBLHB72P_js.guideEmuToPx(g.positionEmu)
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -244,23 +244,23 @@ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
|
|
|
244
244
|
return void 0;
|
|
245
245
|
}
|
|
246
246
|
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
247
|
-
return
|
|
247
|
+
return chunkOBLHB72P_js.getShapeClipPath(shapeType);
|
|
248
248
|
}
|
|
249
249
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
250
|
-
const adjusted =
|
|
250
|
+
const adjusted = chunkOBLHB72P_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
|
|
251
251
|
if (adjusted !== void 0) {
|
|
252
252
|
return adjusted;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
const fromPreset =
|
|
255
|
+
const fromPreset = chunkOBLHB72P_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
|
|
256
256
|
if (fromPreset !== void 0) {
|
|
257
257
|
return fromPreset;
|
|
258
258
|
}
|
|
259
|
-
const cloud =
|
|
259
|
+
const cloud = chunkOBLHB72P_js.getCloudPathForRendering(shapeType, width, height);
|
|
260
260
|
if (cloud !== void 0) {
|
|
261
261
|
return cloud;
|
|
262
262
|
}
|
|
263
|
-
return
|
|
263
|
+
return chunkOBLHB72P_js.getShapeClipPath(shapeType);
|
|
264
264
|
}
|
|
265
265
|
function getResolvedShapeClipPath(element, width, height) {
|
|
266
266
|
const shapeType = element.shapeType;
|
|
@@ -975,7 +975,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
975
975
|
phclr: "#4472C4"
|
|
976
976
|
};
|
|
977
977
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
978
|
-
return
|
|
978
|
+
return chunkOBLHB72P_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
979
979
|
}
|
|
980
980
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
981
981
|
if (!colorNode) {
|
|
@@ -1027,7 +1027,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1027
1027
|
const h = hueRaw / 6e4;
|
|
1028
1028
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1029
1029
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1030
|
-
const rgb =
|
|
1030
|
+
const rgb = chunkOBLHB72P_js.hslToRgb(h, s, l);
|
|
1031
1031
|
const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1032
1032
|
const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
|
|
1033
1033
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1037,7 +1037,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1037
1037
|
const preset = String(
|
|
1038
1038
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1039
1039
|
).toLowerCase();
|
|
1040
|
-
const mapped =
|
|
1040
|
+
const mapped = chunkOBLHB72P_js.PRESET_COLOR_MAP[preset];
|
|
1041
1041
|
if (!mapped) {
|
|
1042
1042
|
return void 0;
|
|
1043
1043
|
}
|
|
@@ -1370,7 +1370,7 @@ function normalizeRadius01(radius) {
|
|
|
1370
1370
|
return clamp(radius / 100, 0, 1);
|
|
1371
1371
|
}
|
|
1372
1372
|
function getEffects(element) {
|
|
1373
|
-
if (!
|
|
1373
|
+
if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
|
|
1374
1374
|
return void 0;
|
|
1375
1375
|
}
|
|
1376
1376
|
return element.imageEffects;
|
|
@@ -10125,7 +10125,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
10125
10125
|
}
|
|
10126
10126
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
10127
10127
|
const scale = zoom || 1;
|
|
10128
|
-
const minSize = opts.minSize ??
|
|
10128
|
+
const minSize = opts.minSize ?? chunkOBLHB72P_js.MIN_ELEMENT_SIZE;
|
|
10129
10129
|
const rotation = rotationOf(box);
|
|
10130
10130
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
10131
10131
|
const dx = local.x;
|
|
@@ -10152,7 +10152,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
10152
10152
|
}
|
|
10153
10153
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
10154
10154
|
}
|
|
10155
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
10155
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkOBLHB72P_js.MIN_ELEMENT_SIZE) {
|
|
10156
10156
|
if (handle === null || gridSpacingPx <= 0) {
|
|
10157
10157
|
return box;
|
|
10158
10158
|
}
|
|
@@ -10182,7 +10182,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkS52XBUDM_js.MI
|
|
|
10182
10182
|
}
|
|
10183
10183
|
return { x, y, width, height };
|
|
10184
10184
|
}
|
|
10185
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
10185
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunkOBLHB72P_js.MIN_ELEMENT_SIZE) {
|
|
10186
10186
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
10187
10187
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
10188
10188
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -11668,7 +11668,7 @@ var THEME_COLOR_LABELS = {
|
|
|
11668
11668
|
};
|
|
11669
11669
|
function buildThemeColorGrid(colorScheme) {
|
|
11670
11670
|
return THEME_COLOR_TINT_ROWS.map(
|
|
11671
|
-
(row) =>
|
|
11671
|
+
(row) => chunkOBLHB72P_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
11672
11672
|
hex: row.transform(colorScheme[key]),
|
|
11673
11673
|
schemeKey: key,
|
|
11674
11674
|
rowLabel: row.label,
|
|
@@ -11931,6 +11931,59 @@ function findTextPositionInSegment(editor, segIdx, charOffset) {
|
|
|
11931
11931
|
}
|
|
11932
11932
|
return null;
|
|
11933
11933
|
}
|
|
11934
|
+
var SENTENCE_END_RE = /([.!?]\s+)/u;
|
|
11935
|
+
function transformTextCase(text, mode) {
|
|
11936
|
+
switch (mode) {
|
|
11937
|
+
case "upper":
|
|
11938
|
+
return text.toUpperCase();
|
|
11939
|
+
case "lower":
|
|
11940
|
+
return text.toLowerCase();
|
|
11941
|
+
case "toggle":
|
|
11942
|
+
return Array.from(text).map((ch) => ch === ch.toUpperCase() ? ch.toLowerCase() : ch.toUpperCase()).join("");
|
|
11943
|
+
case "capitalize":
|
|
11944
|
+
return text.replace(
|
|
11945
|
+
/\p{L}[\p{L}\p{N}'’]*/gu,
|
|
11946
|
+
(word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
|
11947
|
+
);
|
|
11948
|
+
case "sentence":
|
|
11949
|
+
return text.toLowerCase().split(SENTENCE_END_RE).map((part) => {
|
|
11950
|
+
const firstLetter = part.search(/\p{L}/u);
|
|
11951
|
+
if (firstLetter === -1) {
|
|
11952
|
+
return part;
|
|
11953
|
+
}
|
|
11954
|
+
return part.slice(0, firstLetter) + part.charAt(firstLetter).toUpperCase() + part.slice(firstLetter + 1);
|
|
11955
|
+
}).join("");
|
|
11956
|
+
default:
|
|
11957
|
+
return text;
|
|
11958
|
+
}
|
|
11959
|
+
}
|
|
11960
|
+
function applyCaseTransformToSegments(segments, selection, mode) {
|
|
11961
|
+
if (!selection) {
|
|
11962
|
+
return segments.map(
|
|
11963
|
+
(seg) => seg.isParagraphBreak || seg.text === "\n" ? seg : { ...seg, text: transformTextCase(seg.text, mode) }
|
|
11964
|
+
);
|
|
11965
|
+
}
|
|
11966
|
+
const { startSegIdx, startOffset, endSegIdx, endOffset } = selection;
|
|
11967
|
+
const result = [];
|
|
11968
|
+
for (let i = 0; i < segments.length; i++) {
|
|
11969
|
+
const seg = segments[i];
|
|
11970
|
+
if (seg.isParagraphBreak || seg.text === "\n" || i < startSegIdx || i > endSegIdx) {
|
|
11971
|
+
result.push(seg);
|
|
11972
|
+
continue;
|
|
11973
|
+
}
|
|
11974
|
+
const from = i === startSegIdx ? startOffset : 0;
|
|
11975
|
+
const to = i === endSegIdx ? endOffset : seg.text.length;
|
|
11976
|
+
if (from >= to) {
|
|
11977
|
+
result.push(seg);
|
|
11978
|
+
continue;
|
|
11979
|
+
}
|
|
11980
|
+
const before = seg.text.slice(0, from);
|
|
11981
|
+
const selected = transformTextCase(seg.text.slice(from, to), mode);
|
|
11982
|
+
const after = seg.text.slice(to);
|
|
11983
|
+
result.push({ ...seg, text: before + selected + after });
|
|
11984
|
+
}
|
|
11985
|
+
return result;
|
|
11986
|
+
}
|
|
11934
11987
|
function getConnectionSites(width, height) {
|
|
11935
11988
|
return [
|
|
11936
11989
|
{ x: width / 2, y: 0, index: 0 },
|
|
@@ -12091,7 +12144,7 @@ function svgLineCap(lineCap) {
|
|
|
12091
12144
|
}
|
|
12092
12145
|
function copyFormatFromElement(element) {
|
|
12093
12146
|
const result = {};
|
|
12094
|
-
if (
|
|
12147
|
+
if (chunkOBLHB72P_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
12095
12148
|
const s = element.shapeStyle;
|
|
12096
12149
|
result.shapeStyle = {
|
|
12097
12150
|
fillColor: s.fillColor,
|
|
@@ -12120,7 +12173,7 @@ function copyFormatFromElement(element) {
|
|
|
12120
12173
|
softEdgeRadius: s.softEdgeRadius
|
|
12121
12174
|
};
|
|
12122
12175
|
}
|
|
12123
|
-
if (
|
|
12176
|
+
if (chunkOBLHB72P_js.hasTextProperties(element) && element.textStyle) {
|
|
12124
12177
|
const t = element.textStyle;
|
|
12125
12178
|
result.textStyle = {
|
|
12126
12179
|
fontFamily: t.fontFamily,
|
|
@@ -12151,7 +12204,7 @@ function definedEntries(obj) {
|
|
|
12151
12204
|
}
|
|
12152
12205
|
function applyFormatToElement(element, format) {
|
|
12153
12206
|
let updated = { ...element };
|
|
12154
|
-
if (format.shapeStyle &&
|
|
12207
|
+
if (format.shapeStyle && chunkOBLHB72P_js.hasShapeProperties(updated)) {
|
|
12155
12208
|
updated = {
|
|
12156
12209
|
...updated,
|
|
12157
12210
|
shapeStyle: {
|
|
@@ -12160,7 +12213,7 @@ function applyFormatToElement(element, format) {
|
|
|
12160
12213
|
}
|
|
12161
12214
|
};
|
|
12162
12215
|
}
|
|
12163
|
-
if (format.textStyle &&
|
|
12216
|
+
if (format.textStyle && chunkOBLHB72P_js.hasTextProperties(updated)) {
|
|
12164
12217
|
updated = {
|
|
12165
12218
|
...updated,
|
|
12166
12219
|
textStyle: {
|
|
@@ -12175,7 +12228,7 @@ function hasCopyableFormat(element) {
|
|
|
12175
12228
|
if (!element) {
|
|
12176
12229
|
return false;
|
|
12177
12230
|
}
|
|
12178
|
-
return
|
|
12231
|
+
return chunkOBLHB72P_js.hasShapeProperties(element) || chunkOBLHB72P_js.hasTextProperties(element);
|
|
12179
12232
|
}
|
|
12180
12233
|
function copySegmentMetadata(from, to) {
|
|
12181
12234
|
if (from.equationXml !== void 0) {
|
|
@@ -12312,7 +12365,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
12312
12365
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
12313
12366
|
}
|
|
12314
12367
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
12315
|
-
if (!
|
|
12368
|
+
if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
|
|
12316
12369
|
return null;
|
|
12317
12370
|
}
|
|
12318
12371
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -13112,7 +13165,7 @@ function reconcileSlidesInYDoc(slides, ydoc, factories, origin = LOCAL_SYNC_ORIG
|
|
|
13112
13165
|
var POSITION_THRESHOLD = 2;
|
|
13113
13166
|
var SIZE_THRESHOLD = 2;
|
|
13114
13167
|
function getElementText(element) {
|
|
13115
|
-
if (!
|
|
13168
|
+
if (!chunkOBLHB72P_js.hasTextProperties(element)) {
|
|
13116
13169
|
return "";
|
|
13117
13170
|
}
|
|
13118
13171
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -16278,7 +16331,7 @@ function getAriaRole(element) {
|
|
|
16278
16331
|
case "text":
|
|
16279
16332
|
return void 0;
|
|
16280
16333
|
case "shape": {
|
|
16281
|
-
if (
|
|
16334
|
+
if (chunkOBLHB72P_js.hasTextProperties(element) && element.text) {
|
|
16282
16335
|
return void 0;
|
|
16283
16336
|
}
|
|
16284
16337
|
return "img";
|
|
@@ -16291,7 +16344,7 @@ function getAriaLabel(element) {
|
|
|
16291
16344
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
16292
16345
|
return element.altText.trim();
|
|
16293
16346
|
}
|
|
16294
|
-
if (
|
|
16347
|
+
if (chunkOBLHB72P_js.hasTextProperties(element) && element.text) {
|
|
16295
16348
|
const text = element.text.trim();
|
|
16296
16349
|
if (text) {
|
|
16297
16350
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -16629,7 +16682,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
16629
16682
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
16630
16683
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
16631
16684
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
16632
|
-
return
|
|
16685
|
+
return chunkOBLHB72P_js.createChartElement(
|
|
16633
16686
|
chartType,
|
|
16634
16687
|
{
|
|
16635
16688
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -16791,6 +16844,241 @@ var ARTISTIC_EFFECTS = [
|
|
|
16791
16844
|
["texturizer", "pptx.image.effectTexturizer", "contrast(110%) brightness(105%)"],
|
|
16792
16845
|
["crisscrossEtching", "pptx.image.effectCrisscross", "grayscale(60%) contrast(120%)"]
|
|
16793
16846
|
];
|
|
16847
|
+
var PASTE_OFFSET_PX = 20;
|
|
16848
|
+
function generateElementId() {
|
|
16849
|
+
return `el-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
16850
|
+
}
|
|
16851
|
+
function makeCloneId(intoTemplate, sourceId) {
|
|
16852
|
+
if (!intoTemplate) {
|
|
16853
|
+
return generateElementId();
|
|
16854
|
+
}
|
|
16855
|
+
if (sourceId.startsWith("master-")) {
|
|
16856
|
+
return `master-${generateElementId()}`;
|
|
16857
|
+
}
|
|
16858
|
+
return `layout-${generateElementId()}`;
|
|
16859
|
+
}
|
|
16860
|
+
function buildElementClipboardPayload(element, isTemplate) {
|
|
16861
|
+
return { element: structuredClone(element), isTemplate };
|
|
16862
|
+
}
|
|
16863
|
+
function cloneElementForPaste(element, options = {}) {
|
|
16864
|
+
const clone = structuredClone(element);
|
|
16865
|
+
clone.id = makeCloneId(options.intoTemplate ?? false, element.id);
|
|
16866
|
+
clone.x += options.offsetX ?? PASTE_OFFSET_PX;
|
|
16867
|
+
clone.y += options.offsetY ?? PASTE_OFFSET_PX;
|
|
16868
|
+
return clone;
|
|
16869
|
+
}
|
|
16870
|
+
var SHAPE_PRESET_DEFS = [
|
|
16871
|
+
{
|
|
16872
|
+
type: "rect",
|
|
16873
|
+
label: "Rectangle",
|
|
16874
|
+
i18nKey: "pptx.editorToolbar.shapeRectangle",
|
|
16875
|
+
glyph: "square",
|
|
16876
|
+
glyphClass: ""
|
|
16877
|
+
},
|
|
16878
|
+
{
|
|
16879
|
+
type: "roundRect",
|
|
16880
|
+
label: "Rounded",
|
|
16881
|
+
i18nKey: "pptx.shapePresets.rounded",
|
|
16882
|
+
glyph: "square",
|
|
16883
|
+
glyphClass: ""
|
|
16884
|
+
},
|
|
16885
|
+
{
|
|
16886
|
+
type: "ellipse",
|
|
16887
|
+
label: "Circle",
|
|
16888
|
+
i18nKey: "pptx.shapePresets.circle",
|
|
16889
|
+
glyph: "circle",
|
|
16890
|
+
glyphClass: ""
|
|
16891
|
+
},
|
|
16892
|
+
{
|
|
16893
|
+
type: "cylinder",
|
|
16894
|
+
label: "Cylinder",
|
|
16895
|
+
i18nKey: "pptx.shapePresets.cylinder",
|
|
16896
|
+
glyph: "database",
|
|
16897
|
+
glyphClass: ""
|
|
16898
|
+
},
|
|
16899
|
+
{
|
|
16900
|
+
type: "rtArrow",
|
|
16901
|
+
label: "Right Arrow",
|
|
16902
|
+
i18nKey: "pptx.shapePresets.rightArrow",
|
|
16903
|
+
glyph: "moveRight",
|
|
16904
|
+
glyphClass: ""
|
|
16905
|
+
},
|
|
16906
|
+
{
|
|
16907
|
+
type: "leftArrow",
|
|
16908
|
+
label: "Left Arrow",
|
|
16909
|
+
i18nKey: "pptx.shapePresets.leftArrow",
|
|
16910
|
+
glyph: "moveRight",
|
|
16911
|
+
glyphClass: "rotate-180"
|
|
16912
|
+
},
|
|
16913
|
+
{
|
|
16914
|
+
type: "upArrow",
|
|
16915
|
+
label: "Up Arrow",
|
|
16916
|
+
i18nKey: "pptx.shapePresets.upArrow",
|
|
16917
|
+
glyph: "moveRight",
|
|
16918
|
+
glyphClass: "-rotate-90"
|
|
16919
|
+
},
|
|
16920
|
+
{
|
|
16921
|
+
type: "downArrow",
|
|
16922
|
+
label: "Down Arrow",
|
|
16923
|
+
i18nKey: "pptx.shapePresets.downArrow",
|
|
16924
|
+
glyph: "moveRight",
|
|
16925
|
+
glyphClass: "rotate-90"
|
|
16926
|
+
},
|
|
16927
|
+
{
|
|
16928
|
+
type: "triangle",
|
|
16929
|
+
label: "Triangle",
|
|
16930
|
+
i18nKey: "pptx.editorToolbar.shapeTriangle",
|
|
16931
|
+
glyph: "triangle",
|
|
16932
|
+
glyphClass: ""
|
|
16933
|
+
},
|
|
16934
|
+
{
|
|
16935
|
+
type: "rtTriangle",
|
|
16936
|
+
label: "Right Triangle",
|
|
16937
|
+
i18nKey: "pptx.shapePresets.rightTriangle",
|
|
16938
|
+
glyph: "triangle",
|
|
16939
|
+
glyphClass: "rotate-90"
|
|
16940
|
+
},
|
|
16941
|
+
{
|
|
16942
|
+
type: "diamond",
|
|
16943
|
+
label: "Diamond",
|
|
16944
|
+
i18nKey: "pptx.shapePresets.diamond",
|
|
16945
|
+
glyph: "diamond",
|
|
16946
|
+
glyphClass: ""
|
|
16947
|
+
},
|
|
16948
|
+
{
|
|
16949
|
+
type: "parallelogram",
|
|
16950
|
+
label: "Parallelogram",
|
|
16951
|
+
i18nKey: "pptx.shapePresets.parallelogram",
|
|
16952
|
+
glyph: "square",
|
|
16953
|
+
glyphClass: "-skew-x-12"
|
|
16954
|
+
},
|
|
16955
|
+
{
|
|
16956
|
+
type: "trapezoid",
|
|
16957
|
+
label: "Trapezoid",
|
|
16958
|
+
i18nKey: "pptx.shapePresets.trapezoid",
|
|
16959
|
+
glyph: "square",
|
|
16960
|
+
glyphClass: ""
|
|
16961
|
+
},
|
|
16962
|
+
{
|
|
16963
|
+
type: "pentagon",
|
|
16964
|
+
label: "Pentagon",
|
|
16965
|
+
i18nKey: "pptx.shapePresets.pentagon",
|
|
16966
|
+
glyph: "diamond",
|
|
16967
|
+
glyphClass: ""
|
|
16968
|
+
},
|
|
16969
|
+
{
|
|
16970
|
+
type: "hexagon",
|
|
16971
|
+
label: "Hexagon",
|
|
16972
|
+
i18nKey: "pptx.shapePresets.hexagon",
|
|
16973
|
+
glyph: "diamond",
|
|
16974
|
+
glyphClass: ""
|
|
16975
|
+
},
|
|
16976
|
+
{
|
|
16977
|
+
type: "octagon",
|
|
16978
|
+
label: "Octagon",
|
|
16979
|
+
i18nKey: "pptx.shapePresets.octagon",
|
|
16980
|
+
glyph: "circle",
|
|
16981
|
+
glyphClass: ""
|
|
16982
|
+
},
|
|
16983
|
+
{
|
|
16984
|
+
type: "chevron",
|
|
16985
|
+
label: "Chevron",
|
|
16986
|
+
i18nKey: "pptx.shapePresets.chevron",
|
|
16987
|
+
glyph: "moveRight",
|
|
16988
|
+
glyphClass: ""
|
|
16989
|
+
},
|
|
16990
|
+
{
|
|
16991
|
+
type: "star5",
|
|
16992
|
+
label: "Star",
|
|
16993
|
+
i18nKey: "pptx.shapePresets.star",
|
|
16994
|
+
glyph: "diamond",
|
|
16995
|
+
glyphClass: "rotate-45"
|
|
16996
|
+
},
|
|
16997
|
+
{
|
|
16998
|
+
type: "star6",
|
|
16999
|
+
label: "Star 6",
|
|
17000
|
+
i18nKey: "pptx.shapePresets.star6",
|
|
17001
|
+
glyph: "diamond",
|
|
17002
|
+
glyphClass: ""
|
|
17003
|
+
},
|
|
17004
|
+
{
|
|
17005
|
+
type: "star8",
|
|
17006
|
+
label: "Star 8",
|
|
17007
|
+
i18nKey: "pptx.shapePresets.star8",
|
|
17008
|
+
glyph: "diamond",
|
|
17009
|
+
glyphClass: "rotate-45"
|
|
17010
|
+
},
|
|
17011
|
+
{
|
|
17012
|
+
type: "plus",
|
|
17013
|
+
label: "Plus",
|
|
17014
|
+
i18nKey: "pptx.shapePresets.plus",
|
|
17015
|
+
glyph: "plus",
|
|
17016
|
+
glyphClass: ""
|
|
17017
|
+
},
|
|
17018
|
+
{
|
|
17019
|
+
type: "heart",
|
|
17020
|
+
label: "Heart",
|
|
17021
|
+
i18nKey: "pptx.shapePresets.heart",
|
|
17022
|
+
glyph: "circle",
|
|
17023
|
+
glyphClass: ""
|
|
17024
|
+
},
|
|
17025
|
+
{
|
|
17026
|
+
type: "cloud",
|
|
17027
|
+
label: "Cloud",
|
|
17028
|
+
i18nKey: "pptx.shapePresets.cloud",
|
|
17029
|
+
glyph: "circle",
|
|
17030
|
+
glyphClass: ""
|
|
17031
|
+
},
|
|
17032
|
+
{
|
|
17033
|
+
type: "sun",
|
|
17034
|
+
label: "Sun",
|
|
17035
|
+
i18nKey: "pptx.shapePresets.sun",
|
|
17036
|
+
glyph: "circle",
|
|
17037
|
+
glyphClass: ""
|
|
17038
|
+
},
|
|
17039
|
+
{
|
|
17040
|
+
type: "moon",
|
|
17041
|
+
label: "Moon",
|
|
17042
|
+
i18nKey: "pptx.shapePresets.moon",
|
|
17043
|
+
glyph: "circle",
|
|
17044
|
+
glyphClass: ""
|
|
17045
|
+
},
|
|
17046
|
+
{
|
|
17047
|
+
type: "pie",
|
|
17048
|
+
label: "Pie",
|
|
17049
|
+
i18nKey: "pptx.shapePresets.pie",
|
|
17050
|
+
glyph: "circle",
|
|
17051
|
+
glyphClass: ""
|
|
17052
|
+
},
|
|
17053
|
+
{
|
|
17054
|
+
type: "plaque",
|
|
17055
|
+
label: "Plaque",
|
|
17056
|
+
i18nKey: "pptx.shapePresets.plaque",
|
|
17057
|
+
glyph: "square",
|
|
17058
|
+
glyphClass: ""
|
|
17059
|
+
},
|
|
17060
|
+
{
|
|
17061
|
+
type: "teardrop",
|
|
17062
|
+
label: "Teardrop",
|
|
17063
|
+
i18nKey: "pptx.shapePresets.teardrop",
|
|
17064
|
+
glyph: "circle",
|
|
17065
|
+
glyphClass: ""
|
|
17066
|
+
},
|
|
17067
|
+
{
|
|
17068
|
+
type: "line",
|
|
17069
|
+
label: "Line",
|
|
17070
|
+
i18nKey: "pptx.shapePresets.line",
|
|
17071
|
+
glyph: "minus",
|
|
17072
|
+
glyphClass: ""
|
|
17073
|
+
},
|
|
17074
|
+
{
|
|
17075
|
+
type: "connector",
|
|
17076
|
+
label: "Connector",
|
|
17077
|
+
i18nKey: "pptx.elementType.connector",
|
|
17078
|
+
glyph: "moveRight",
|
|
17079
|
+
glyphClass: ""
|
|
17080
|
+
}
|
|
17081
|
+
];
|
|
16794
17082
|
function resolveTitleBarStatusKey(input) {
|
|
16795
17083
|
const { autosaveState, isDirty, autosaveEnabled, disabledReason } = input;
|
|
16796
17084
|
if (autosaveState === "disabled") {
|
|
@@ -17238,7 +17526,7 @@ function encodeGif(frames, delay = {}) {
|
|
|
17238
17526
|
const { palette, indexed } = quantizeFrame(frame.imageData);
|
|
17239
17527
|
out.push(33, 249, 4);
|
|
17240
17528
|
out.push(0);
|
|
17241
|
-
writeU16(out, delayCs);
|
|
17529
|
+
writeU16(out, frame.delayCs ?? delayCs);
|
|
17242
17530
|
out.push(0);
|
|
17243
17531
|
out.push(0);
|
|
17244
17532
|
out.push(44);
|
|
@@ -18755,6 +19043,7 @@ exports.RULER_FONT_SIZE = RULER_FONT_SIZE;
|
|
|
18755
19043
|
exports.RULER_THICKNESS = RULER_THICKNESS;
|
|
18756
19044
|
exports.SECTION_HEADING = SECTION_HEADING;
|
|
18757
19045
|
exports.SEL = SEL;
|
|
19046
|
+
exports.SHAPE_PRESET_DEFS = SHAPE_PRESET_DEFS;
|
|
18758
19047
|
exports.SLIDE_TRANSITION_KEYFRAMES = SLIDE_TRANSITION_KEYFRAMES;
|
|
18759
19048
|
exports.TABLET_BREAKPOINT = TABLET_BREAKPOINT;
|
|
18760
19049
|
exports.TABLE_STYLE_PRESETS = TABLE_STYLE_PRESETS;
|
|
@@ -18768,6 +19057,7 @@ exports.WEBM_MIME_CANDIDATES = WEBM_MIME_CANDIDATES;
|
|
|
18768
19057
|
exports.addSection = addSection;
|
|
18769
19058
|
exports.alignElements = alignElements;
|
|
18770
19059
|
exports.apply3dEffects = apply3dEffects;
|
|
19060
|
+
exports.applyCaseTransformToSegments = applyCaseTransformToSegments;
|
|
18771
19061
|
exports.applyColorChange = applyColorChange;
|
|
18772
19062
|
exports.applyDuotone = applyDuotone;
|
|
18773
19063
|
exports.applyFormatToElement = applyFormatToElement;
|
|
@@ -18782,6 +19072,7 @@ exports.buildCacheKey = buildCacheKey;
|
|
|
18782
19072
|
exports.buildChartViewModel = buildChartViewModel;
|
|
18783
19073
|
exports.buildCssGradientFromShapeStyle = buildCssGradientFromShapeStyle;
|
|
18784
19074
|
exports.buildDuotoneCacheKey = buildDuotoneCacheKey;
|
|
19075
|
+
exports.buildElementClipboardPayload = buildElementClipboardPayload;
|
|
18785
19076
|
exports.buildGlowBoxShadow = buildGlowBoxShadow;
|
|
18786
19077
|
exports.buildHandoutsHtml = buildHandoutsHtml;
|
|
18787
19078
|
exports.buildInitialGuides = buildInitialGuides;
|
|
@@ -18813,6 +19104,7 @@ exports.clampCropValue = clampCropValue;
|
|
|
18813
19104
|
exports.clampNotesFontSize = clampNotesFontSize;
|
|
18814
19105
|
exports.clampPercent = clampPercent;
|
|
18815
19106
|
exports.clampUnitInterval = clampUnitInterval;
|
|
19107
|
+
exports.cloneElementForPaste = cloneElementForPaste;
|
|
18816
19108
|
exports.cloneHistorySnapshot = cloneHistorySnapshot;
|
|
18817
19109
|
exports.cloneSlide = cloneSlide;
|
|
18818
19110
|
exports.cloneTemplateElementsBySlideId = cloneTemplateElementsBySlideId;
|
|
@@ -18880,6 +19172,7 @@ exports.formatTime = formatTime;
|
|
|
18880
19172
|
exports.formatVersionTimestamp = formatVersionTimestamp;
|
|
18881
19173
|
exports.fpsToFrameIntervalMs = fpsToFrameIntervalMs;
|
|
18882
19174
|
exports.generateBroadcastRoomId = generateBroadcastRoomId;
|
|
19175
|
+
exports.generateElementId = generateElementId;
|
|
18883
19176
|
exports.generateLogTicks = generateLogTicks;
|
|
18884
19177
|
exports.generateNoteLineCount = generateNoteLineCount;
|
|
18885
19178
|
exports.generatePressureCircles = generatePressureCircles;
|
|
@@ -18945,6 +19238,7 @@ exports.isPpactionUrl = isPpactionUrl;
|
|
|
18945
19238
|
exports.isTemplateElement = isTemplateElement;
|
|
18946
19239
|
exports.isTemplateElementId = isTemplateElementId;
|
|
18947
19240
|
exports.isUrlSafe = isUrlSafe;
|
|
19241
|
+
exports.makeCloneId = makeCloneId;
|
|
18948
19242
|
exports.makeSlideId = makeSlideId;
|
|
18949
19243
|
exports.mergeAdditiveSelection = mergeAdditiveSelection;
|
|
18950
19244
|
exports.mergeCells = mergeCells;
|
|
@@ -19027,6 +19321,7 @@ exports.tintColor2 = tintColor2;
|
|
|
19027
19321
|
exports.toCssTextOrientation = toCssTextOrientation;
|
|
19028
19322
|
exports.toCssVerticalDirection = toCssVerticalDirection;
|
|
19029
19323
|
exports.toCssWritingMode = toCssWritingMode;
|
|
19324
|
+
exports.transformTextCase = transformTextCase;
|
|
19030
19325
|
exports.validateRoomId = validateRoomId;
|
|
19031
19326
|
exports.valueToY = valueToY;
|
|
19032
19327
|
exports.vermilionDarkColors = vermilionDarkColors;
|
|
Binary file
|
|
Binary file
|