pptx-react-viewer 3.16.5 → 3.16.7
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 +20 -0
- package/dist/{AiChatPanel-MHTKZ5DY.mjs → AiChatPanel-GLDW5OK4.mjs} +3 -3
- package/dist/AiChatPanel-GLDW5OK4.mjs.br +0 -0
- package/dist/AiChatPanel-GLDW5OK4.mjs.gz +0 -0
- package/dist/{AiChatPanel-GUZM5J7I.js → AiChatPanel-N25STHYW.js} +24 -24
- package/dist/AiChatPanel-N25STHYW.js.br +0 -0
- package/dist/AiChatPanel-N25STHYW.js.gz +0 -0
- package/dist/{Area3DChartScene-T37QB3UH.js → Area3DChartScene-5POI5LF7.js} +2 -2
- package/dist/{Area3DChartScene-T37QB3UH.js.br → Area3DChartScene-5POI5LF7.js.br} +0 -0
- package/dist/Area3DChartScene-5POI5LF7.js.gz +0 -0
- package/dist/{Area3DChartScene-SD5ED773.mjs → Area3DChartScene-FCHO4SK6.mjs} +1 -1
- package/dist/Area3DChartScene-FCHO4SK6.mjs.br +0 -0
- package/dist/Area3DChartScene-FCHO4SK6.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-LLXYWCBF.js → Bar3DChartScene-5CY5GRV5.js} +2 -2
- package/dist/{Bar3DChartScene-LLXYWCBF.js.br → Bar3DChartScene-5CY5GRV5.js.br} +0 -0
- package/dist/Bar3DChartScene-5CY5GRV5.js.gz +0 -0
- package/dist/{Bar3DChartScene-PPUHKJIO.mjs → Bar3DChartScene-M3LLHXAL.mjs} +1 -1
- package/dist/Bar3DChartScene-M3LLHXAL.mjs.br +0 -0
- package/dist/Bar3DChartScene-M3LLHXAL.mjs.gz +0 -0
- package/dist/{Line3DChartScene-THTFOM3V.js → Line3DChartScene-3TP7OUIP.js} +2 -2
- package/dist/{Line3DChartScene-THTFOM3V.js.br → Line3DChartScene-3TP7OUIP.js.br} +0 -0
- package/dist/Line3DChartScene-3TP7OUIP.js.gz +0 -0
- package/dist/{Line3DChartScene-ELNXP7GQ.mjs → Line3DChartScene-77TZRLJY.mjs} +1 -1
- package/dist/Line3DChartScene-77TZRLJY.mjs.br +0 -0
- package/dist/Line3DChartScene-77TZRLJY.mjs.gz +0 -0
- package/dist/{Model3DScene-W34B3W7F.js → Model3DScene-CBETCFMI.js} +2 -2
- package/dist/Model3DScene-CBETCFMI.js.br +0 -0
- package/dist/Model3DScene-CBETCFMI.js.gz +0 -0
- package/dist/{Model3DScene-D3QGW6D6.mjs → Model3DScene-QINKUHM2.mjs} +1 -1
- package/dist/Model3DScene-QINKUHM2.mjs.br +0 -0
- package/dist/Model3DScene-QINKUHM2.mjs.gz +0 -0
- package/dist/{PieChart3DScene-24FAOC6C.mjs → PieChart3DScene-H2DJSHW7.mjs} +1 -1
- package/dist/PieChart3DScene-H2DJSHW7.mjs.br +0 -0
- package/dist/PieChart3DScene-H2DJSHW7.mjs.gz +0 -0
- package/dist/{PieChart3DScene-HI4N4U2O.js → PieChart3DScene-NFXFVG7R.js} +2 -2
- package/dist/{PieChart3DScene-HI4N4U2O.js.br → PieChart3DScene-NFXFVG7R.js.br} +0 -0
- package/dist/PieChart3DScene-NFXFVG7R.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-JTQ67DRC.js → SurfaceChart3DScene-2IN5YKKE.js} +2 -2
- package/dist/{SurfaceChart3DScene-JTQ67DRC.js.br → SurfaceChart3DScene-2IN5YKKE.js.br} +0 -0
- package/dist/SurfaceChart3DScene-2IN5YKKE.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-PYPD5D4U.mjs → SurfaceChart3DScene-4AGI4O3L.mjs} +1 -1
- package/dist/SurfaceChart3DScene-4AGI4O3L.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-4AGI4O3L.mjs.gz +0 -0
- package/dist/{chunk-TXB7AEQK.js → chunk-3FVOKV4E.js} +229 -42
- package/dist/chunk-3FVOKV4E.js.br +0 -0
- package/dist/chunk-3FVOKV4E.js.gz +0 -0
- package/dist/{chunk-4VUCA73I.mjs → chunk-3PUFHKXW.mjs} +6 -3
- package/dist/chunk-3PUFHKXW.mjs.br +0 -0
- package/dist/chunk-3PUFHKXW.mjs.gz +0 -0
- package/dist/{chunk-4HKLMRT3.js → chunk-4NSDMKFE.js} +174 -170
- package/dist/chunk-4NSDMKFE.js.br +0 -0
- package/dist/chunk-4NSDMKFE.js.gz +0 -0
- package/dist/{chunk-4LKJG2C7.js → chunk-4Q6VIX6M.js} +455 -452
- package/dist/chunk-4Q6VIX6M.js.br +0 -0
- package/dist/chunk-4Q6VIX6M.js.gz +0 -0
- package/dist/{chunk-JJGWENCY.mjs → chunk-7ELFYC6K.mjs} +1 -1
- package/dist/chunk-7ELFYC6K.mjs.br +0 -0
- package/dist/chunk-7ELFYC6K.mjs.gz +0 -0
- package/dist/{chunk-5XZYSQBZ.mjs → chunk-B3YVURJB.mjs} +6 -2
- package/dist/chunk-B3YVURJB.mjs.br +0 -0
- package/dist/chunk-B3YVURJB.mjs.gz +0 -0
- package/dist/{chunk-AJUQBZTC.mjs → chunk-I5YSAIL5.mjs} +29 -26
- package/dist/chunk-I5YSAIL5.mjs.br +0 -0
- package/dist/chunk-I5YSAIL5.mjs.gz +0 -0
- package/dist/{chunk-AUSRKT7I.js → chunk-SQNEE6AM.js} +1306 -1303
- package/dist/chunk-SQNEE6AM.js.br +0 -0
- package/dist/chunk-SQNEE6AM.js.gz +0 -0
- package/dist/{chunk-BLS76EAT.js → chunk-TYVSLRC7.js} +5 -5
- package/dist/chunk-TYVSLRC7.js.br +0 -0
- package/dist/chunk-TYVSLRC7.js.gz +0 -0
- package/dist/{chunk-GQLEMDFZ.mjs → chunk-XMD6ZWUO.mjs} +229 -43
- package/dist/chunk-XMD6ZWUO.mjs.br +0 -0
- package/dist/chunk-XMD6ZWUO.mjs.gz +0 -0
- package/dist/index.js +45 -45
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-GUZM5J7I.js.br +0 -0
- package/dist/AiChatPanel-GUZM5J7I.js.gz +0 -0
- package/dist/AiChatPanel-MHTKZ5DY.mjs.br +0 -0
- package/dist/AiChatPanel-MHTKZ5DY.mjs.gz +0 -0
- package/dist/Area3DChartScene-SD5ED773.mjs.br +0 -0
- package/dist/Area3DChartScene-SD5ED773.mjs.gz +0 -0
- package/dist/Area3DChartScene-T37QB3UH.js.gz +0 -0
- package/dist/Bar3DChartScene-LLXYWCBF.js.gz +0 -0
- package/dist/Bar3DChartScene-PPUHKJIO.mjs.br +0 -0
- package/dist/Bar3DChartScene-PPUHKJIO.mjs.gz +0 -0
- package/dist/Line3DChartScene-ELNXP7GQ.mjs.br +0 -0
- package/dist/Line3DChartScene-ELNXP7GQ.mjs.gz +0 -0
- package/dist/Line3DChartScene-THTFOM3V.js.gz +0 -0
- package/dist/Model3DScene-D3QGW6D6.mjs.br +0 -0
- package/dist/Model3DScene-D3QGW6D6.mjs.gz +0 -0
- package/dist/Model3DScene-W34B3W7F.js.br +0 -0
- package/dist/Model3DScene-W34B3W7F.js.gz +0 -0
- package/dist/PieChart3DScene-24FAOC6C.mjs.br +0 -0
- package/dist/PieChart3DScene-24FAOC6C.mjs.gz +0 -0
- package/dist/PieChart3DScene-HI4N4U2O.js.gz +0 -0
- package/dist/SurfaceChart3DScene-JTQ67DRC.js.gz +0 -0
- package/dist/SurfaceChart3DScene-PYPD5D4U.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-PYPD5D4U.mjs.gz +0 -0
- package/dist/chunk-4HKLMRT3.js.br +0 -0
- package/dist/chunk-4HKLMRT3.js.gz +0 -0
- package/dist/chunk-4LKJG2C7.js.br +0 -0
- package/dist/chunk-4LKJG2C7.js.gz +0 -0
- package/dist/chunk-4VUCA73I.mjs.br +0 -0
- package/dist/chunk-4VUCA73I.mjs.gz +0 -0
- package/dist/chunk-5XZYSQBZ.mjs.br +0 -0
- package/dist/chunk-5XZYSQBZ.mjs.gz +0 -0
- package/dist/chunk-AJUQBZTC.mjs.br +0 -0
- package/dist/chunk-AJUQBZTC.mjs.gz +0 -0
- package/dist/chunk-AUSRKT7I.js.br +0 -0
- package/dist/chunk-AUSRKT7I.js.gz +0 -0
- package/dist/chunk-BLS76EAT.js.br +0 -0
- package/dist/chunk-BLS76EAT.js.gz +0 -0
- package/dist/chunk-GQLEMDFZ.mjs.br +0 -0
- package/dist/chunk-GQLEMDFZ.mjs.gz +0 -0
- package/dist/chunk-JJGWENCY.mjs.br +0 -0
- package/dist/chunk-JJGWENCY.mjs.gz +0 -0
- package/dist/chunk-TXB7AEQK.js.br +0 -0
- package/dist/chunk-TXB7AEQK.js.gz +0 -0
|
@@ -34239,10 +34239,10 @@ function clampByRules(value, rules, type) {
|
|
|
34239
34239
|
}
|
|
34240
34240
|
function ratioConstraint(constraints, types, fallback, rules) {
|
|
34241
34241
|
for (const type of types) {
|
|
34242
|
-
const
|
|
34242
|
+
const matches2 = (constraints ?? []).filter((constraint) => constraint.type === type);
|
|
34243
34243
|
const ordered4 = [
|
|
34244
|
-
...
|
|
34245
|
-
...
|
|
34244
|
+
...matches2.filter((constraint) => constraint.for === "ch"),
|
|
34245
|
+
...matches2.filter((constraint) => constraint.for !== "ch")
|
|
34246
34246
|
];
|
|
34247
34247
|
for (const constraint of ordered4) {
|
|
34248
34248
|
const ratio = constraintRatio(constraint);
|
|
@@ -40444,14 +40444,14 @@ var init_smartart_hierarchy_composite_child = __esm({
|
|
|
40444
40444
|
});
|
|
40445
40445
|
function findByReference(constraints, type, referenceType, preferredName) {
|
|
40446
40446
|
const list = constraints ?? [];
|
|
40447
|
-
const
|
|
40447
|
+
const matches2 = (c) => c.type === type && c.referenceType === referenceType && typeof c.factor === "number";
|
|
40448
40448
|
if (preferredName !== void 0) {
|
|
40449
|
-
const named = list.find((c) =>
|
|
40449
|
+
const named = list.find((c) => matches2(c) && c.forName === preferredName);
|
|
40450
40450
|
if (named) {
|
|
40451
40451
|
return named.factor;
|
|
40452
40452
|
}
|
|
40453
40453
|
}
|
|
40454
|
-
return list.find(
|
|
40454
|
+
return list.find(matches2)?.factor;
|
|
40455
40455
|
}
|
|
40456
40456
|
function findDirectAspectRatio(constraints, preferredName) {
|
|
40457
40457
|
const hRefW = findByReference(constraints, "h", "w", preferredName);
|
|
@@ -43119,14 +43119,14 @@ function findDrawingShapeIndex(shapes, nodes, nodeId) {
|
|
|
43119
43119
|
const node = nodes.find((n) => n.id === nodeId);
|
|
43120
43120
|
if (node?.text) {
|
|
43121
43121
|
const text22 = node.text.trim();
|
|
43122
|
-
const
|
|
43122
|
+
const matches2 = [];
|
|
43123
43123
|
for (let i2 = 0; i2 < shapes.length; i2++) {
|
|
43124
43124
|
if (shapes[i2].text?.trim() === text22) {
|
|
43125
|
-
|
|
43125
|
+
matches2.push(i2);
|
|
43126
43126
|
}
|
|
43127
43127
|
}
|
|
43128
|
-
if (
|
|
43129
|
-
return
|
|
43128
|
+
if (matches2.length === 1) {
|
|
43129
|
+
return matches2[0];
|
|
43130
43130
|
}
|
|
43131
43131
|
}
|
|
43132
43132
|
return -1;
|
|
@@ -43326,14 +43326,14 @@ function findShapeIndexForNode(shapes, nodes, nodeId) {
|
|
|
43326
43326
|
const node = nodes.find((n) => n.id === nodeId);
|
|
43327
43327
|
if (node?.text) {
|
|
43328
43328
|
const text22 = node.text.trim();
|
|
43329
|
-
const
|
|
43329
|
+
const matches2 = [];
|
|
43330
43330
|
for (let i2 = 0; i2 < shapes.length; i2++) {
|
|
43331
43331
|
if (shapes[i2].text?.trim() === text22) {
|
|
43332
|
-
|
|
43332
|
+
matches2.push(i2);
|
|
43333
43333
|
}
|
|
43334
43334
|
}
|
|
43335
|
-
if (
|
|
43336
|
-
return
|
|
43335
|
+
if (matches2.length === 1) {
|
|
43336
|
+
return matches2[0];
|
|
43337
43337
|
}
|
|
43338
43338
|
}
|
|
43339
43339
|
return -1;
|
|
@@ -92086,6 +92086,10 @@ function computeUniformSegmentOverrides(textStyle, textSegments) {
|
|
|
92086
92086
|
if (nextValue === void 0) {
|
|
92087
92087
|
return;
|
|
92088
92088
|
}
|
|
92089
|
+
const baseline = textStyle?.inheritedRunStyle;
|
|
92090
|
+
if (baseline && nextValue === (textStyle?.authoredRunStyle?.[styleKey] ?? baseline[styleKey])) {
|
|
92091
|
+
return;
|
|
92092
|
+
}
|
|
92089
92093
|
const firstValue = textSegments[0]?.style?.[styleKey];
|
|
92090
92094
|
const isUniform = textSegments.every((segment) => segment.style?.[styleKey] === firstValue);
|
|
92091
92095
|
if (isUniform) {
|
|
@@ -100418,6 +100422,46 @@ var init_save_table_merge_helpers = __esm({
|
|
|
100418
100422
|
];
|
|
100419
100423
|
}
|
|
100420
100424
|
});
|
|
100425
|
+
function writeTableColumnWidths(tbl, columnWidths) {
|
|
100426
|
+
const columns = xmlChildren(xmlChild(tbl, "a:tblGrid"), "a:gridCol");
|
|
100427
|
+
if (!columns.length || columns.length !== columnWidths.length) {
|
|
100428
|
+
return;
|
|
100429
|
+
}
|
|
100430
|
+
const existingWidths = columns.map((column) => {
|
|
100431
|
+
const value = column["@_w"];
|
|
100432
|
+
return typeof value === "number" || typeof value === "string" && value.trim() !== "" ? Number(value) : NaN;
|
|
100433
|
+
});
|
|
100434
|
+
if (existingWidths.some((width) => !Number.isSafeInteger(width) || width < 0)) {
|
|
100435
|
+
return;
|
|
100436
|
+
}
|
|
100437
|
+
const totalWidth = existingWidths.reduce((sum2, width) => sum2 + width, 0);
|
|
100438
|
+
if (!Number.isSafeInteger(totalWidth) || totalWidth <= 0) {
|
|
100439
|
+
return;
|
|
100440
|
+
}
|
|
100441
|
+
if (columnWidths.some((width) => !Number.isFinite(width) || width < 0)) {
|
|
100442
|
+
return;
|
|
100443
|
+
}
|
|
100444
|
+
const sum = columnWidths.reduce((total, width) => total + width, 0);
|
|
100445
|
+
if (Math.abs(sum - 1) > Number.EPSILON * columnWidths.length * 4) {
|
|
100446
|
+
return;
|
|
100447
|
+
}
|
|
100448
|
+
let cumulative = 0;
|
|
100449
|
+
let previousBoundary = 0;
|
|
100450
|
+
for (let index = 0; index < columns.length; index++) {
|
|
100451
|
+
cumulative += columnWidths[index];
|
|
100452
|
+
const boundary = index === columns.length - 1 ? totalWidth : Math.min(totalWidth, Math.round(cumulative * totalWidth));
|
|
100453
|
+
const width = boundary - previousBoundary;
|
|
100454
|
+
if (width !== existingWidths[index]) {
|
|
100455
|
+
columns[index]["@_w"] = String(width);
|
|
100456
|
+
}
|
|
100457
|
+
previousBoundary = boundary;
|
|
100458
|
+
}
|
|
100459
|
+
}
|
|
100460
|
+
var init_table_column_width_save = __esm({
|
|
100461
|
+
"src/core/core/runtime/table-column-width-save.ts"() {
|
|
100462
|
+
init_xml_access();
|
|
100463
|
+
}
|
|
100464
|
+
});
|
|
100421
100465
|
function runTag(run) {
|
|
100422
100466
|
return run.isLineBreak ? "a:br" : run.isField ? "a:fld" : "a:r";
|
|
100423
100467
|
}
|
|
@@ -101303,6 +101347,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
101303
101347
|
init_chart_part_family_switch();
|
|
101304
101348
|
init_PptxHandlerRuntimeChartUserShapes();
|
|
101305
101349
|
init_save_table_merge_helpers();
|
|
101350
|
+
init_table_column_width_save();
|
|
101306
101351
|
init_table_paragraph_save_order();
|
|
101307
101352
|
init_table_structural_ops();
|
|
101308
101353
|
init_table_tblpr_save();
|
|
@@ -101363,6 +101408,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
|
|
|
101363
101408
|
}
|
|
101364
101409
|
return;
|
|
101365
101410
|
}
|
|
101411
|
+
writeTableColumnWidths(tbl, tableData.columnWidths);
|
|
101366
101412
|
for (let rIdx = 0; rIdx < Math.min(tableData.rows.length, xmlRows.length); rIdx++) {
|
|
101367
101413
|
const dataRow = tableData.rows[rIdx];
|
|
101368
101414
|
const xmlRow = xmlRows[rIdx];
|
|
@@ -111154,13 +111200,13 @@ var init_PptxHandlerRuntimePlaceholderLookup = __esm({
|
|
|
111154
111200
|
findPlaceholderInShapeTree(spTree, expected) {
|
|
111155
111201
|
return this.scanPlaceholderBuckets(spTree, (info) => this.placeholderMatches(expected, info));
|
|
111156
111202
|
}
|
|
111157
|
-
scanPlaceholderBuckets(spTree,
|
|
111203
|
+
scanPlaceholderBuckets(spTree, matches2) {
|
|
111158
111204
|
if (!spTree) {
|
|
111159
111205
|
return void 0;
|
|
111160
111206
|
}
|
|
111161
111207
|
for (const { bucket, nvKey, contextKey } of PLACEHOLDER_BUCKETS) {
|
|
111162
111208
|
for (const node of this.ensureArray(spTree[bucket])) {
|
|
111163
|
-
if (
|
|
111209
|
+
if (matches2(this.extractPlaceholderInfo(xmlPath(node, nvKey, "p:nvPr")))) {
|
|
111164
111210
|
return { [contextKey]: node };
|
|
111165
111211
|
}
|
|
111166
111212
|
}
|
|
@@ -113015,7 +113061,7 @@ var init_PptxHandlerRuntimeShapeParagraphContentParsing = __esm({
|
|
|
113015
113061
|
bulletText = "\u2022 ";
|
|
113016
113062
|
}
|
|
113017
113063
|
const bulletStyle = { ...mergedDefaultRunStyle };
|
|
113018
|
-
if (paragraphBulletInfo.
|
|
113064
|
+
if (paragraphBulletInfo.sizePts === void 0) {
|
|
113019
113065
|
const firstRunSize = this.resolveFirstRunFontSize(p, paraAlign, ctx);
|
|
113020
113066
|
if (firstRunSize !== void 0) {
|
|
113021
113067
|
bulletStyle.fontSize = firstRunSize;
|
|
@@ -113248,27 +113294,22 @@ var init_PptxHandlerRuntimeShapeParagraphContentParsing = __esm({
|
|
|
113248
113294
|
}
|
|
113249
113295
|
/**
|
|
113250
113296
|
* Font size (px) of the first text run in a paragraph, or `undefined` when
|
|
113251
|
-
*
|
|
113297
|
+
* that first run inherits its size.
|
|
113252
113298
|
*
|
|
113253
|
-
* Used
|
|
113254
|
-
* `a:
|
|
113255
|
-
* size. Only `a:r` and `a:fld` carry renderable text; `a:br` does not.
|
|
113299
|
+
* Used as the base for unsized and percentage-sized bullets. Only `a:r`
|
|
113300
|
+
* and `a:fld` carry renderable text; `a:br` does not.
|
|
113256
113301
|
*/
|
|
113257
113302
|
resolveFirstRunFontSize(p, paraAlign, ctx) {
|
|
113258
|
-
for (const
|
|
113259
|
-
|
|
113260
|
-
if (!node) {
|
|
113303
|
+
for (const [tag, node] of paragraphContentEntries(p, PARAGRAPH_CONTENT_TAGS).entries) {
|
|
113304
|
+
if (tag !== "a:r" && tag !== "a:fld") {
|
|
113261
113305
|
continue;
|
|
113262
113306
|
}
|
|
113263
|
-
const
|
|
113264
|
-
const runProps = first?.["a:rPr"];
|
|
113307
|
+
const runProps = node?.["a:rPr"];
|
|
113265
113308
|
if (!runProps) {
|
|
113266
|
-
|
|
113309
|
+
return void 0;
|
|
113267
113310
|
}
|
|
113268
113311
|
const style = this.extractTextRunStyle(runProps, paraAlign, ctx.slideRelationshipMap);
|
|
113269
|
-
|
|
113270
|
-
return style.fontSize;
|
|
113271
|
-
}
|
|
113312
|
+
return typeof style.fontSize === "number" ? style.fontSize : void 0;
|
|
113272
113313
|
}
|
|
113273
113314
|
return void 0;
|
|
113274
113315
|
}
|
|
@@ -122536,6 +122577,7 @@ var init_core = __esm({
|
|
|
122536
122577
|
init_types2();
|
|
122537
122578
|
init_table_structural_ops();
|
|
122538
122579
|
init_table_style_defaults();
|
|
122580
|
+
init_auto_number_sequence();
|
|
122539
122581
|
init_table_style_editor();
|
|
122540
122582
|
init_table_style_entry_parse();
|
|
122541
122583
|
}
|
|
@@ -139391,8 +139433,8 @@ var TextSegmentRenderer = class {
|
|
|
139391
139433
|
return defaultText;
|
|
139392
139434
|
}
|
|
139393
139435
|
wrapCode(text22) {
|
|
139394
|
-
const
|
|
139395
|
-
const maxTicks =
|
|
139436
|
+
const matches2 = text22.match(/`+/g);
|
|
139437
|
+
const maxTicks = matches2 && matches2.length > 0 ? Math.max(...matches2.map((entry2) => entry2.length)) : 0;
|
|
139396
139438
|
const fence = "`".repeat(Math.max(1, maxTicks + 1));
|
|
139397
139439
|
return `${fence}${text22}${fence}`;
|
|
139398
139440
|
}
|
|
@@ -161446,9 +161488,9 @@ function resolveDrawingShapeNodeId(shape, shapeIndex, shapes, nodes) {
|
|
|
161446
161488
|
}
|
|
161447
161489
|
const text22 = shape.text?.trim();
|
|
161448
161490
|
if (text22) {
|
|
161449
|
-
const
|
|
161450
|
-
if (
|
|
161451
|
-
return
|
|
161491
|
+
const matches2 = nodes.filter((n) => n.text.trim() === text22);
|
|
161492
|
+
if (matches2.length === 1) {
|
|
161493
|
+
return matches2[0].id;
|
|
161452
161494
|
}
|
|
161453
161495
|
}
|
|
161454
161496
|
return void 0;
|
|
@@ -161461,6 +161503,57 @@ function computeInlineEditorRect(nodeRect, containerRect) {
|
|
|
161461
161503
|
height: nodeRect.height
|
|
161462
161504
|
};
|
|
161463
161505
|
}
|
|
161506
|
+
function measureSvgViewportRect(source) {
|
|
161507
|
+
const graphic = source;
|
|
161508
|
+
if (typeof graphic.getBBox !== "function" || typeof graphic.getCTM !== "function") {
|
|
161509
|
+
return null;
|
|
161510
|
+
}
|
|
161511
|
+
try {
|
|
161512
|
+
let viewport = graphic.ownerSVGElement;
|
|
161513
|
+
if (!viewport) {
|
|
161514
|
+
return null;
|
|
161515
|
+
}
|
|
161516
|
+
let matrix = graphic.getCTM();
|
|
161517
|
+
if (viewport.ownerSVGElement) {
|
|
161518
|
+
while (viewport.ownerSVGElement) {
|
|
161519
|
+
viewport = viewport.ownerSVGElement;
|
|
161520
|
+
}
|
|
161521
|
+
const viewportMatrix = viewport.getCTM();
|
|
161522
|
+
const viewportScreen = viewport.getScreenCTM();
|
|
161523
|
+
const graphicScreen = graphic.getScreenCTM();
|
|
161524
|
+
if (!viewportMatrix || !viewportScreen || !graphicScreen) {
|
|
161525
|
+
return null;
|
|
161526
|
+
}
|
|
161527
|
+
matrix = viewportMatrix.multiply(viewportScreen.inverse()).multiply(graphicScreen);
|
|
161528
|
+
}
|
|
161529
|
+
if (!matrix) {
|
|
161530
|
+
return null;
|
|
161531
|
+
}
|
|
161532
|
+
const box = graphic.getBBox();
|
|
161533
|
+
const points4 = [
|
|
161534
|
+
[box.x, box.y],
|
|
161535
|
+
[box.x + box.width, box.y],
|
|
161536
|
+
[box.x, box.y + box.height],
|
|
161537
|
+
[box.x + box.width, box.y + box.height]
|
|
161538
|
+
].map(([x, y]) => ({
|
|
161539
|
+
x: matrix.a * x + matrix.c * y + matrix.e,
|
|
161540
|
+
y: matrix.b * x + matrix.d * y + matrix.f
|
|
161541
|
+
}));
|
|
161542
|
+
if (box.width < 0 || box.height < 0 || points4.some(({ x, y }) => !Number.isFinite(x) || !Number.isFinite(y))) {
|
|
161543
|
+
return null;
|
|
161544
|
+
}
|
|
161545
|
+
const left = Math.min(...points4.map(({ x }) => x));
|
|
161546
|
+
const top = Math.min(...points4.map(({ y }) => y));
|
|
161547
|
+
return {
|
|
161548
|
+
left,
|
|
161549
|
+
top,
|
|
161550
|
+
width: Math.max(...points4.map(({ x }) => x)) - left,
|
|
161551
|
+
height: Math.max(...points4.map(({ y }) => y)) - top
|
|
161552
|
+
};
|
|
161553
|
+
} catch {
|
|
161554
|
+
return null;
|
|
161555
|
+
}
|
|
161556
|
+
}
|
|
161464
161557
|
function proportionalShapeCount(shownNodes, totalNodes, totalShapes) {
|
|
161465
161558
|
return Math.ceil(shownNodes / Math.max(totalNodes, 1) * totalShapes);
|
|
161466
161559
|
}
|
|
@@ -176242,8 +176335,8 @@ function splitWordsForUnderline(text22) {
|
|
|
176242
176335
|
return [];
|
|
176243
176336
|
}
|
|
176244
176337
|
const pieces = [];
|
|
176245
|
-
const
|
|
176246
|
-
for (const match of
|
|
176338
|
+
const matches2 = text22.matchAll(/(\s+)|(\S+)/gu);
|
|
176339
|
+
for (const match of matches2) {
|
|
176247
176340
|
if (match[1] !== void 0) {
|
|
176248
176341
|
pieces.push({ text: match[1], underline: false });
|
|
176249
176342
|
} else if (match[2] !== void 0) {
|
|
@@ -180535,6 +180628,35 @@ function hasCopyableFormat(element) {
|
|
|
180535
180628
|
}
|
|
180536
180629
|
return hasShapeProperties(element) || hasTextProperties(element);
|
|
180537
180630
|
}
|
|
180631
|
+
function renumberRemappedParagraphs(segments) {
|
|
180632
|
+
const sequence = createAutoNumberSequence();
|
|
180633
|
+
let first = true;
|
|
180634
|
+
return segments.map((segment) => {
|
|
180635
|
+
const paragraphStart = first;
|
|
180636
|
+
first = isParagraphSeparatorSegment(segment);
|
|
180637
|
+
if (!paragraphStart) {
|
|
180638
|
+
return segment;
|
|
180639
|
+
}
|
|
180640
|
+
const info = segment.bulletInfo;
|
|
180641
|
+
const level = segment.paragraphLevel ?? 0;
|
|
180642
|
+
if (!info?.autoNumType || !resolveParagraphBullet(segment)?.isNumbered) {
|
|
180643
|
+
breakAutoNumberRun(sequence, level);
|
|
180644
|
+
return segment;
|
|
180645
|
+
}
|
|
180646
|
+
const ordinal = nextAutoNumber(sequence, level, info.autoNumType, info.autoNumStartAt ?? 1) - (info.autoNumStartAt ?? 1);
|
|
180647
|
+
if (info.paragraphIndex === void 0 || info.paragraphIndex === ordinal) {
|
|
180648
|
+
return segment;
|
|
180649
|
+
}
|
|
180650
|
+
const updated = { ...segment, bulletInfo: { ...info, paragraphIndex: ordinal } };
|
|
180651
|
+
if (isBulletMarkerSegment(segment)) {
|
|
180652
|
+
const resolved = resolveParagraphBullet(updated);
|
|
180653
|
+
if (resolved) {
|
|
180654
|
+
updated.text = resolved.marker + (segment.text.match(/\s+$/u)?.[0] ?? "");
|
|
180655
|
+
}
|
|
180656
|
+
}
|
|
180657
|
+
return updated;
|
|
180658
|
+
});
|
|
180659
|
+
}
|
|
180538
180660
|
function withoutRenderedBulletPrefix(text22, originalSegments, dedicatedMarker) {
|
|
180539
180661
|
if (!dedicatedMarker) {
|
|
180540
180662
|
return text22;
|
|
@@ -180581,6 +180703,61 @@ function continueAutoNumberedParagraph(segments, donorSegments, offset) {
|
|
|
180581
180703
|
}
|
|
180582
180704
|
return [continued, ...rest];
|
|
180583
180705
|
}
|
|
180706
|
+
function matches(text22, paragraph) {
|
|
180707
|
+
const first = paragraph.segments[0];
|
|
180708
|
+
const marker = first && isBulletMarkerSegment(first) && (!first.bulletInfo?.autoNumType || first.bulletInfo.paragraphIndex !== void 0) ? first : void 0;
|
|
180709
|
+
const body = paragraph.segments.slice(marker ? 1 : 0).map((segment) => segment.text).join("");
|
|
180710
|
+
return text22 === body || withoutRenderedBulletPrefix(text22, paragraph.segments, marker) === body;
|
|
180711
|
+
}
|
|
180712
|
+
function alignParagraphSources(texts, original) {
|
|
180713
|
+
const sources = Array.from({ length: texts.length });
|
|
180714
|
+
let prefix = 0;
|
|
180715
|
+
while (prefix < texts.length && prefix < original.length && matches(texts[prefix], original[prefix])) {
|
|
180716
|
+
sources[prefix] = prefix;
|
|
180717
|
+
prefix += 1;
|
|
180718
|
+
}
|
|
180719
|
+
let oldEnd = original.length;
|
|
180720
|
+
let newEnd = texts.length;
|
|
180721
|
+
while (oldEnd > prefix && newEnd > prefix && matches(texts[newEnd - 1], original[oldEnd - 1])) {
|
|
180722
|
+
sources[--newEnd] = --oldEnd;
|
|
180723
|
+
}
|
|
180724
|
+
const anchors = [];
|
|
180725
|
+
const oldCount = oldEnd - prefix;
|
|
180726
|
+
const newCount = newEnd - prefix;
|
|
180727
|
+
if (oldCount * newCount <= 1e4) {
|
|
180728
|
+
const lengths = Array.from({ length: oldCount + 1 }, () => new Uint16Array(newCount + 1));
|
|
180729
|
+
for (let old2 = oldCount - 1; old2 >= 0; old2--) {
|
|
180730
|
+
for (let next2 = newCount - 1; next2 >= 0; next2--) {
|
|
180731
|
+
lengths[old2][next2] = matches(texts[prefix + next2], original[prefix + old2]) ? lengths[old2 + 1][next2 + 1] + 1 : Math.max(lengths[old2 + 1][next2], lengths[old2][next2 + 1]);
|
|
180732
|
+
}
|
|
180733
|
+
}
|
|
180734
|
+
let old = 0;
|
|
180735
|
+
let next = 0;
|
|
180736
|
+
while (old < oldCount && next < newCount) {
|
|
180737
|
+
if (matches(texts[prefix + next], original[prefix + old])) {
|
|
180738
|
+
anchors.push([prefix + next++, prefix + old++]);
|
|
180739
|
+
} else if (lengths[old + 1][next] >= lengths[old][next + 1]) {
|
|
180740
|
+
old++;
|
|
180741
|
+
} else {
|
|
180742
|
+
next++;
|
|
180743
|
+
}
|
|
180744
|
+
}
|
|
180745
|
+
}
|
|
180746
|
+
anchors.push([newEnd, oldEnd]);
|
|
180747
|
+
let oldCursor = prefix;
|
|
180748
|
+
let newCursor = prefix;
|
|
180749
|
+
for (const [newAnchor, oldAnchor] of anchors) {
|
|
180750
|
+
while (oldCursor < oldAnchor && newCursor < newAnchor) {
|
|
180751
|
+
sources[newCursor++] = oldCursor++;
|
|
180752
|
+
}
|
|
180753
|
+
if (newAnchor < newEnd) {
|
|
180754
|
+
sources[newAnchor] = oldAnchor;
|
|
180755
|
+
}
|
|
180756
|
+
oldCursor = oldAnchor + 1;
|
|
180757
|
+
newCursor = newAnchor + 1;
|
|
180758
|
+
}
|
|
180759
|
+
return sources;
|
|
180760
|
+
}
|
|
180584
180761
|
function isAtomicOriginalSegment(seg) {
|
|
180585
180762
|
return seg.fieldType !== void 0 || seg.equationXml !== void 0;
|
|
180586
180763
|
}
|
|
@@ -180642,6 +180819,7 @@ function remapTextToSegments(newText, originalSegments, elementTextStyle) {
|
|
|
180642
180819
|
}
|
|
180643
180820
|
}
|
|
180644
180821
|
const newParagraphTexts = newText.split("\n");
|
|
180822
|
+
const paragraphSources = alignParagraphSources(newParagraphTexts, originalParagraphs);
|
|
180645
180823
|
const firstContentSeg = originalParagraphs.flatMap((paragraph) => paragraph.segments).find((s) => s.text.trim().length > 0);
|
|
180646
180824
|
const baseFallbackStyle = firstContentSeg?.style ? { ...firstContentSeg.style } : fallbackStyle;
|
|
180647
180825
|
function remapParagraph(paraNewText, paraOrigSegments) {
|
|
@@ -180730,19 +180908,24 @@ function remapTextToSegments(newText, originalSegments, elementTextStyle) {
|
|
|
180730
180908
|
}
|
|
180731
180909
|
const output = [];
|
|
180732
180910
|
const lastOrigPara = originalParagraphs[originalParagraphs.length - 1]?.segments;
|
|
180911
|
+
const lastSourceOffset = [...paragraphSources].reverse().findIndex((source) => source !== void 0);
|
|
180912
|
+
const appendStart = Math.max(
|
|
180913
|
+
originalParagraphs.length,
|
|
180914
|
+
lastSourceOffset < 0 ? 0 : paragraphSources.length - lastSourceOffset
|
|
180915
|
+
);
|
|
180733
180916
|
for (let pi = 0; pi < newParagraphTexts.length; pi++) {
|
|
180734
180917
|
if (pi > 0) {
|
|
180735
|
-
const precedingOrigPara = originalParagraphs[pi - 1]?.segments ?? [];
|
|
180918
|
+
const precedingOrigPara = originalParagraphs[paragraphSources[pi - 1] ?? -1]?.segments ?? [];
|
|
180736
180919
|
const breakStyle = precedingOrigPara[0]?.style ? { ...precedingOrigPara[0].style } : { ...baseFallbackStyle };
|
|
180737
180920
|
output.push({ text: "\n", style: breakStyle, isParagraphBreak: true });
|
|
180738
180921
|
}
|
|
180739
|
-
const originalParagraph = originalParagraphs[pi];
|
|
180922
|
+
const originalParagraph = originalParagraphs[paragraphSources[pi] ?? -1];
|
|
180740
180923
|
const origPara = originalParagraph?.segments ?? lastOrigPara ?? [];
|
|
180741
180924
|
let paraSegments = restoreParagraphMetadata(
|
|
180742
180925
|
originalParagraph?.segments[0] ?? originalParagraph?.terminator,
|
|
180743
180926
|
remapParagraph(newParagraphTexts[pi], origPara)
|
|
180744
180927
|
);
|
|
180745
|
-
if (!originalParagraph) {
|
|
180928
|
+
if (!originalParagraph && pi >= appendStart) {
|
|
180746
180929
|
paraSegments = continueAutoNumberedParagraph(
|
|
180747
180930
|
paraSegments,
|
|
180748
180931
|
lastOrigPara ?? [],
|
|
@@ -180751,6 +180934,9 @@ function remapTextToSegments(newText, originalSegments, elementTextStyle) {
|
|
|
180751
180934
|
}
|
|
180752
180935
|
output.push(...paraSegments);
|
|
180753
180936
|
}
|
|
180937
|
+
if (paragraphSources.some((source, index) => source !== void 0 && source !== index)) {
|
|
180938
|
+
return renumberRemappedParagraphs(output);
|
|
180939
|
+
}
|
|
180754
180940
|
return output.length > 0 ? output : [{ text: "", style: { ...baseFallbackStyle } }];
|
|
180755
180941
|
}
|
|
180756
180942
|
function mergeCoincidentHandles(handles) {
|
|
@@ -193513,8 +193699,8 @@ function applyFindReplacements(slides, toReplace, replacement) {
|
|
|
193513
193699
|
}
|
|
193514
193700
|
const nextSlides = slides.slice();
|
|
193515
193701
|
let totalReplacements = 0;
|
|
193516
|
-
for (const [,
|
|
193517
|
-
const sorted =
|
|
193702
|
+
for (const [, matches2] of grouped) {
|
|
193703
|
+
const sorted = matches2.slice().sort((a, b) => b.startOffset - a.startOffset);
|
|
193518
193704
|
for (const match of sorted) {
|
|
193519
193705
|
const slide = nextSlides[match.slideIndex];
|
|
193520
193706
|
if (!slide) {
|
|
@@ -203545,6 +203731,7 @@ exports.masterViewElements = masterViewElements;
|
|
|
203545
203731
|
exports.masterViewPseudoSlide = masterViewPseudoSlide;
|
|
203546
203732
|
exports.matchCommentMentionAuthors = matchCommentMentionAuthors;
|
|
203547
203733
|
exports.mayLeaveSlideShow = mayLeaveSlideShow;
|
|
203734
|
+
exports.measureSvgViewportRect = measureSvgViewportRect;
|
|
203548
203735
|
exports.mediaFallbackIcon = mediaFallbackIcon;
|
|
203549
203736
|
exports.mediaFallbackLabelKey = mediaFallbackLabelKey;
|
|
203550
203737
|
exports.mediaFallbackVisual = mediaFallbackVisual;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-
|
|
2
|
-
import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, hasTextProperties, remapTextToSegments, updateMasterViewElement, isTemplateElementId, updateElement, hasShapeProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, collectReferencedFontFamilies, resolveGoogleWebfontHref, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, downloadBlob, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterResultToPngBlob, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, rasterizeElementTiledToCanvas, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, ACTION_BUTTON_PRESETS, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, clampGifDimensions, rasterizeElement, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset } from './chunk-
|
|
1
|
+
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-B3YVURJB.mjs';
|
|
2
|
+
import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, hasTextProperties, remapTextToSegments, updateMasterViewElement, isTemplateElementId, updateElement, hasShapeProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, collectReferencedFontFamilies, resolveGoogleWebfontHref, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, downloadBlob, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterResultToPngBlob, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, rasterizeElementTiledToCanvas, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, ACTION_BUTTON_PRESETS, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, clampGifDimensions, rasterizeElement, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset } from './chunk-XMD6ZWUO.mjs';
|
|
3
3
|
import { translationsEn } from './chunk-HMX3MQR7.mjs';
|
|
4
4
|
import { createContext, useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect, useContext, useImperativeHandle, useSyncExternalStore } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -4968,6 +4968,8 @@ function processPointerUp(input) {
|
|
|
4968
4968
|
setSnapLines([]);
|
|
4969
4969
|
if (wasMoved) {
|
|
4970
4970
|
markDirty();
|
|
4971
|
+
}
|
|
4972
|
+
if (drag || rs || adj || marquee) {
|
|
4971
4973
|
setPointerCommitNonce((n) => n + 1);
|
|
4972
4974
|
}
|
|
4973
4975
|
}
|
|
@@ -11688,7 +11690,8 @@ function useViewerBuildingBlocksState(input) {
|
|
|
11688
11690
|
preMasterMode: state.preMasterMode,
|
|
11689
11691
|
hasDigitalSignatures: state.hasDigitalSignatures,
|
|
11690
11692
|
isDirty: state.isDirty,
|
|
11691
|
-
history
|
|
11693
|
+
history,
|
|
11694
|
+
embeddedFontFamilies: state.embeddedFonts.map((font) => font.name)
|
|
11692
11695
|
});
|
|
11693
11696
|
const readOnlyRec = useReadOnlyRecommendationState(content);
|
|
11694
11697
|
const compatToastsState = useCompatibilityToastsState();
|
|
Binary file
|
|
Binary file
|