ooxml-core 1.41.0 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/PptxHandler-73QIJ6SD.cjs +14 -0
- package/dist/{PptxHandler-3AGIITR7.mjs → PptxHandler-A2J4PCOB.mjs} +2 -2
- package/dist/PptxHandler-OGLVLX2T.mjs +5 -0
- package/dist/{PresentationBuilder-MZBKYOYD.cjs → PresentationBuilder-6S5PJXXF.cjs} +6 -6
- package/dist/{PresentationBuilder-JNID4B4Z.mjs → PresentationBuilder-APJKCMVS.mjs} +2 -2
- package/dist/{PresentationBuilder-5DPKFUXP.mjs → PresentationBuilder-F3BWDERK.mjs} +3 -3
- package/dist/automation/index.cjs +75 -89
- package/dist/automation/index.mjs +75 -89
- package/dist/chart/index.cjs +5 -5
- package/dist/chart/index.mjs +5 -5
- package/dist/{chunk-LRBWCRQ3.cjs → chunk-3J6VIKLP.cjs} +3 -3
- package/dist/chunk-CODMW5KF.cjs +110 -0
- package/dist/{chunk-KKVD3R6O.mjs → chunk-CPSTCCRD.mjs} +4 -4
- package/dist/{chunk-P3WAKBVS.mjs → chunk-IPV3J3I5.mjs} +82 -90
- package/dist/{chunk-6LGRRQ3K.mjs → chunk-MXA67O7R.mjs} +1 -1
- package/dist/{chunk-JXR6YWBW.mjs → chunk-N6X5CJZP.mjs} +125 -126
- package/dist/chunk-O3YGBYGZ.mjs +104 -0
- package/dist/{chunk-75KBNUKS.cjs → chunk-QZPOPUI5.cjs} +82 -89
- package/dist/{chunk-UE23HF2N.mjs → chunk-VKFKEVHK.mjs} +1 -1
- package/dist/{chunk-DD7COXWR.mjs → chunk-VV724DWE.mjs} +19 -7
- package/dist/{chunk-HTELXT2N.mjs → chunk-XVB3CBNM.mjs} +19 -6
- package/dist/{chunk-3BIFRTU4.cjs → chunk-YNQRXFTC.cjs} +1283 -1270
- package/dist/{chunk-ZYCBJKAE.mjs → chunk-ZUEN4RQG.mjs} +1 -1
- package/dist/diagram/index.cjs +499 -370
- package/dist/diagram/index.d.ts +1 -0
- package/dist/diagram/index.d.ts.map +1 -1
- package/dist/diagram/index.mjs +495 -371
- package/dist/docx/embedded.cjs +67 -89
- package/dist/docx/embedded.mjs +67 -89
- package/dist/docx/index.cjs +118 -106
- package/dist/docx/index.mjs +118 -106
- package/dist/docx/layout/index.cjs +118 -106
- package/dist/docx/layout/index.mjs +118 -106
- package/dist/docx/load/index.cjs +67 -89
- package/dist/docx/load/index.mjs +67 -89
- package/dist/docx/shape-svg.d.ts.map +1 -1
- package/dist/docx/ui/index.cjs +72 -94
- package/dist/docx/ui/index.mjs +72 -94
- package/dist/drawingml/dash-pattern.d.ts +61 -0
- package/dist/drawingml/dash-pattern.d.ts.map +1 -0
- package/dist/drawingml/index.cjs +249 -43
- package/dist/drawingml/index.d.ts +3 -0
- package/dist/drawingml/index.d.ts.map +1 -1
- package/dist/drawingml/index.mjs +241 -44
- package/dist/drawingml/rect-path-gradient.d.ts +5 -0
- package/dist/drawingml/rect-path-gradient.d.ts.map +1 -1
- package/dist/drawingml/shape-path-gradient.d.ts +57 -0
- package/dist/drawingml/shape-path-gradient.d.ts.map +1 -0
- package/dist/geometry/index.cjs +68 -90
- package/dist/geometry/index.mjs +68 -90
- package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts +2 -2
- package/dist/geometry/preset-shape-definitions-exact-action-buttons.d.ts.map +1 -1
- package/dist/geometry/preset-shape-definitions-exact-arrows.d.ts.map +1 -1
- package/dist/geometry/preset-shape-definitions-exact-scrolls.d.ts.map +1 -1
- package/dist/index.cjs +686 -489
- package/dist/index.mjs +686 -489
- package/dist/pptx/automation/index.cjs +355 -191
- package/dist/pptx/automation/index.d.ts +11 -17
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +156 -71
- package/dist/pptx/chunks/{elements-6BMEOo7i.d.ts → elements-PBugbKtv.d.ts} +3 -873
- package/dist/pptx/chunks/elements-PBugbKtv.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-BbXLv6As.d.ts → index-BJuR8GLL.d.ts} +4 -4
- package/dist/pptx/chunks/{index-BbXLv6As.d.ts.map → index-BJuR8GLL.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-DvN0TkJJ.d.ts → index-Rbvl2WaM.d.ts} +14 -10
- package/dist/pptx/chunks/index-Rbvl2WaM.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-Dija_Wth.d.ts → index-xoJGYTgQ.d.ts} +5 -3
- package/dist/pptx/chunks/index-xoJGYTgQ.d.ts.map +1 -0
- package/dist/pptx/chunks/table-C7ITXL3Y.d.ts +875 -0
- package/dist/pptx/chunks/table-C7ITXL3Y.d.ts.map +1 -0
- package/dist/pptx/chunks/{text-operations-DorONr3h.d.ts → text-operations-BNJr7aGa.d.ts} +3 -2
- package/dist/pptx/chunks/text-operations-BNJr7aGa.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +169 -96
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.cjs +69 -91
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
- package/dist/pptx/editor/render/find-replace.cjs +15 -15
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +2 -2
- package/dist/pptx/editor/render/slide-operations.cjs +9 -9
- package/dist/pptx/editor/render/slide-operations.mjs +3 -3
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +5 -5
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/editor/render/table-layout.cjs +6 -6
- package/dist/pptx/editor/render/table-layout.d.ts +8 -37
- package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
- package/dist/pptx/editor/render/table-layout.mjs +1 -1
- package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
- package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
- package/dist/pptx/index.cjs +214 -129
- package/dist/pptx/index.d.ts +6 -5
- package/dist/pptx/index.mjs +5 -5
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/teams/index.cjs +136 -91
- package/dist/teams/index.mjs +136 -91
- package/dist/text/font-metrics/design-advances.generated.d.ts +3 -1
- package/dist/text/font-metrics/design-advances.generated.d.ts.map +1 -1
- package/dist/text/index.cjs +8 -0
- package/dist/text/index.mjs +8 -0
- package/dist/visio/index.cjs +8 -0
- package/dist/visio/index.mjs +8 -0
- package/dist/visio/ui/index.cjs +8 -0
- package/dist/visio/ui/index.mjs +8 -0
- package/dist/xlsx/collab/index.cjs +67 -89
- package/dist/xlsx/collab/index.mjs +67 -89
- package/dist/xlsx/index.cjs +116 -108
- package/dist/xlsx/index.mjs +116 -108
- package/dist/xlsx/layout/shape-paint.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +67 -89
- package/dist/xlsx/load/index.mjs +67 -89
- package/dist/xlsx/ui/index.cjs +72 -94
- package/dist/xlsx/ui/index.mjs +72 -94
- package/package.json +1 -1
- package/dist/PptxHandler-EL4E4SPH.mjs +0 -5
- package/dist/PptxHandler-OIZ3R3DJ.cjs +0 -14
- package/dist/chunk-3IT6ZD7K.mjs +0 -213
- package/dist/chunk-FRUB573B.cjs +0 -219
- package/dist/pptx/chunks/elements-6BMEOo7i.d.ts.map +0 -1
- package/dist/pptx/chunks/index-Dija_Wth.d.ts.map +0 -1
- package/dist/pptx/chunks/index-DvN0TkJJ.d.ts.map +0 -1
- package/dist/pptx/chunks/text-operations-DorONr3h.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SlideProcessor, B as generateMediaFilename, C as PptxJsonAssetStats, D as SvgExportOptions, E as isPptxJsonText, F as deriveOutputPath, H as ConversionResult, I as getDirectory, L as normalizePath, M as PptxConverterOptions, N as PptxMarkdownConverter, O as SvgExporter, P as DocumentConverter, R as MediaContext, S as PPTX_JSON_VERSION, T as decodePptxJsonText, U as FileSystemAdapter, V as ConversionOptions, _ as decodeJsonValue, a as deserializePptxFromJson, b as PPTX_JSON_FORMAT, c as pptxDataFromJsonDocument, d as serializePptxToJson, f as PRESENTATION_FIELD_KEYS, g as bytesToBase64, h as base64ToBytes, i as PptxJsonFormatError, j as SlideProcessorOptions, k as SlideMetadataRenderer, l as PptxJsonSerializeOptions, m as JsonAssetAccumulator, n as PptxJsonConverterOptions, o as parsePptxJson, p as PRESENTATION_FIELD_NAMES, r as applyImportedPptxData, s as parsePptxJsonDocument, t as PptxJsonConverter, u as buildPptxJsonDocument, v as encodeJsonValue, w as PptxJsonDocument, x as PPTX_JSON_MIME_TYPE, y as PPTX_JSON_FILE_EXTENSION, z as dataUrlToMediaBytes } from "../chunks/index-
|
|
1
|
+
import { A as SlideProcessor, B as generateMediaFilename, C as PptxJsonAssetStats, D as SvgExportOptions, E as isPptxJsonText, F as deriveOutputPath, H as ConversionResult, I as getDirectory, L as normalizePath, M as PptxConverterOptions, N as PptxMarkdownConverter, O as SvgExporter, P as DocumentConverter, R as MediaContext, S as PPTX_JSON_VERSION, T as decodePptxJsonText, U as FileSystemAdapter, V as ConversionOptions, _ as decodeJsonValue, a as deserializePptxFromJson, b as PPTX_JSON_FORMAT, c as pptxDataFromJsonDocument, d as serializePptxToJson, f as PRESENTATION_FIELD_KEYS, g as bytesToBase64, h as base64ToBytes, i as PptxJsonFormatError, j as SlideProcessorOptions, k as SlideMetadataRenderer, l as PptxJsonSerializeOptions, m as JsonAssetAccumulator, n as PptxJsonConverterOptions, o as parsePptxJson, p as PRESENTATION_FIELD_NAMES, r as applyImportedPptxData, s as parsePptxJsonDocument, t as PptxJsonConverter, u as buildPptxJsonDocument, v as encodeJsonValue, w as PptxJsonDocument, x as PPTX_JSON_MIME_TYPE, y as PPTX_JSON_FILE_EXTENSION, z as dataUrlToMediaBytes } from "../chunks/index-BJuR8GLL.js";
|
|
2
2
|
export { type ConversionOptions, type ConversionResult, DocumentConverter, type FileSystemAdapter, type JsonAssetAccumulator, MediaContext, PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, type PptxConverterOptions, type PptxJsonAssetStats, PptxJsonConverter, type PptxJsonConverterOptions, type PptxJsonDocument, PptxJsonFormatError, type PptxJsonSerializeOptions, PptxMarkdownConverter, SlideMetadataRenderer, SlideProcessor, type SlideProcessorOptions, type SvgExportOptions, SvgExporter, applyImportedPptxData, base64ToBytes, buildPptxJsonDocument, bytesToBase64, dataUrlToMediaBytes, decodeJsonValue, decodePptxJsonText, deriveOutputPath, deserializePptxFromJson, encodeJsonValue, generateMediaFilename, getDirectory, isPptxJsonText, normalizePath, parsePptxJson, parsePptxJsonDocument, pptxDataFromJsonDocument, serializePptxToJson };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../chunk-6Q7TP72Y.mjs';
|
|
2
|
-
export { DocumentConverter, MediaContext, PptxMarkdownConverter, SlideMetadataRenderer, SlideProcessor, dataUrlToMediaBytes, deriveOutputPath, generateMediaFilename, getDirectory, normalizePath } from '../../chunk-
|
|
3
|
-
export { PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, PptxJsonConverter, PptxJsonFormatError, SvgExporter, applyImportedPptxData, base64ToBytes, buildPptxJsonDocument, bytesToBase64, decodeJsonValue, decodePptxJsonText, deserializePptxFromJson, encodeJsonValue, isPptxJsonText, parsePptxJson, parsePptxJsonDocument, pptxDataFromJsonDocument, serializePptxToJson } from '../../chunk-
|
|
2
|
+
export { DocumentConverter, MediaContext, PptxMarkdownConverter, SlideMetadataRenderer, SlideProcessor, dataUrlToMediaBytes, deriveOutputPath, generateMediaFilename, getDirectory, normalizePath } from '../../chunk-MXA67O7R.mjs';
|
|
3
|
+
export { PPTX_JSON_FILE_EXTENSION, PPTX_JSON_FORMAT, PPTX_JSON_MIME_TYPE, PPTX_JSON_VERSION, PRESENTATION_FIELD_KEYS, PRESENTATION_FIELD_NAMES, PptxJsonConverter, PptxJsonFormatError, SvgExporter, applyImportedPptxData, base64ToBytes, buildPptxJsonDocument, bytesToBase64, decodeJsonValue, decodePptxJsonText, deserializePptxFromJson, encodeJsonValue, isPptxJsonText, parsePptxJson, parsePptxJsonDocument, pptxDataFromJsonDocument, serializePptxToJson } from '../../chunk-N6X5CJZP.mjs';
|
|
4
4
|
import '../../chunk-EYCM7RVL.mjs';
|
|
5
5
|
import '../../chunk-VDUNZTJC.mjs';
|
|
6
6
|
import '../../chunk-7DJEJTN7.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQZPOPUI5_cjs = require('../../../chunk-QZPOPUI5.cjs');
|
|
4
4
|
require('../../../chunk-XZPZHXV4.cjs');
|
|
5
5
|
require('../../../chunk-5W2QL4SB.cjs');
|
|
6
6
|
|
|
@@ -114,7 +114,7 @@ function customShowSlides(show, slides) {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
function clearCustomShowActions(slides, id) {
|
|
117
|
-
const result =
|
|
117
|
+
const result = chunkQZPOPUI5_cjs.mapCustomShowActions(slides, (target) => target === id ? null : target);
|
|
118
118
|
return { slides: result.slides, cleared: result.changed };
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk3J6VIKLP_cjs = require('../../../chunk-3J6VIKLP.cjs');
|
|
4
|
+
var chunkQZPOPUI5_cjs = require('../../../chunk-QZPOPUI5.cjs');
|
|
5
5
|
var chunkXZPZHXV4_cjs = require('../../../chunk-XZPZHXV4.cjs');
|
|
6
6
|
require('../../../chunk-5W2QL4SB.cjs');
|
|
7
7
|
var chunkAWIDASUW_cjs = require('../../../chunk-AWIDASUW.cjs');
|
|
@@ -146,10 +146,10 @@ function* findSlideTextTargets(slide, includeNotes = false, includeChartTitles =
|
|
|
146
146
|
function patchTableXml(element, rowIndex, colIndex, original, runs) {
|
|
147
147
|
if (!element.rawXml) return void 0;
|
|
148
148
|
const rawXml = structuredClone(element.rawXml);
|
|
149
|
-
const table =
|
|
150
|
-
const row =
|
|
151
|
-
const cell =
|
|
152
|
-
const paragraphs =
|
|
149
|
+
const table = chunk3J6VIKLP_cjs.getTblFromRawXml(rawXml);
|
|
150
|
+
const row = chunk3J6VIKLP_cjs.ensureArray(table?.["a:tr"])[rowIndex];
|
|
151
|
+
const cell = chunk3J6VIKLP_cjs.ensureArray(row?.["a:tc"])[colIndex];
|
|
152
|
+
const paragraphs = chunk3J6VIKLP_cjs.ensureArray(
|
|
153
153
|
cell?.["a:txBody"]?.["a:p"]
|
|
154
154
|
);
|
|
155
155
|
let paragraphIndex = 0, runIndex = 0, fieldIndex = 0;
|
|
@@ -164,7 +164,7 @@ function patchTableXml(element, rowIndex, colIndex, original, runs) {
|
|
|
164
164
|
if (previous.isLineBreak) continue;
|
|
165
165
|
const paragraph = paragraphs[paragraphIndex];
|
|
166
166
|
const key = previous.isField ? "a:fld" : "a:r";
|
|
167
|
-
const xmlRun =
|
|
167
|
+
const xmlRun = chunk3J6VIKLP_cjs.ensureArray(paragraph?.[key])[previous.isField ? fieldIndex++ : runIndex++];
|
|
168
168
|
if (!xmlRun) return void 0;
|
|
169
169
|
if (previous.text !== runs[index].text) xmlRun["a:t"] = runs[index].text;
|
|
170
170
|
}
|
|
@@ -174,7 +174,7 @@ function updateNode(nodes, nodeId, text) {
|
|
|
174
174
|
return nodes.map((node) => {
|
|
175
175
|
if (node.id === nodeId) {
|
|
176
176
|
const originalParagraphs = node.paragraphs ?? (node.runs?.length ? [{ items: node.runs.map((run) => ({ kind: "run", run })) }] : void 0);
|
|
177
|
-
const paragraphs = originalParagraphs ?
|
|
177
|
+
const paragraphs = originalParagraphs ? chunkQZPOPUI5_cjs.reconcileSmartArtTextParagraphs(originalParagraphs, text) : void 0;
|
|
178
178
|
return { ...node, text, ...paragraphs ? { paragraphs } : {} };
|
|
179
179
|
}
|
|
180
180
|
if (!node.children) return node;
|
|
@@ -253,14 +253,14 @@ function replaceLeaf(element, match, replacement) {
|
|
|
253
253
|
);
|
|
254
254
|
if (!runs) return element;
|
|
255
255
|
let text = runs.map((run) => run.isParagraphBreak ? "\n" : run.isLineBreak ? "" : run.text).join("");
|
|
256
|
-
let rawXml = cell.textRuns?.length ? patchTableXml(element, rowIndex, colIndex, original2, runs) :
|
|
256
|
+
let rawXml = cell.textRuns?.length ? patchTableXml(element, rowIndex, colIndex, original2, runs) : chunk3J6VIKLP_cjs.updateCellTextInRawXml(element, rowIndex, colIndex, text);
|
|
257
257
|
if (rawXml) {
|
|
258
|
-
const table =
|
|
259
|
-
const xmlRow =
|
|
260
|
-
const xmlCell =
|
|
261
|
-
text =
|
|
258
|
+
const table = chunk3J6VIKLP_cjs.getTblFromRawXml(rawXml);
|
|
259
|
+
const xmlRow = chunk3J6VIKLP_cjs.ensureArray(table?.["a:tr"])[rowIndex];
|
|
260
|
+
const xmlCell = chunk3J6VIKLP_cjs.ensureArray(xmlRow?.["a:tc"])[colIndex];
|
|
261
|
+
text = chunk3J6VIKLP_cjs.flattenCellTxBodyText(
|
|
262
262
|
xmlCell?.["a:txBody"],
|
|
263
|
-
(value) =>
|
|
263
|
+
(value) => chunk3J6VIKLP_cjs.ensureArray(value)
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
266
|
const rows = [...element.tableData.rows], cells = [...row.cells];
|
|
@@ -274,7 +274,7 @@ function replaceLeaf(element, match, replacement) {
|
|
|
274
274
|
if (!node || match.startOffset < 0 || match.startOffset + match.length > node.text.length)
|
|
275
275
|
return element;
|
|
276
276
|
const text = node.text.slice(0, match.startOffset) + replacement + node.text.slice(match.startOffset + match.length);
|
|
277
|
-
const next =
|
|
277
|
+
const next = chunkQZPOPUI5_cjs.updateSmartArtNodeText({ ...data, nodes }, node.id, text);
|
|
278
278
|
const drawingShapes = next.drawingShapes?.map((shape, index) => {
|
|
279
279
|
if (shape === data.drawingShapes?.[index] || !shape.textSegments) return shape;
|
|
280
280
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../chunks/index-
|
|
2
|
-
import { C as PptxSlide } from "../../chunks/text-operations-
|
|
1
|
+
import "../../chunks/index-Rbvl2WaM.js";
|
|
2
|
+
import { C as PptxSlide } from "../../chunks/text-operations-BNJr7aGa.js";
|
|
3
3
|
/** Identifies a single match of the find query at segment-level precision. */
|
|
4
4
|
export interface FindResult {
|
|
5
5
|
/** Zero-based index of the slide in the slides array. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { updateCellTextInRawXml, getTblFromRawXml, ensureArray, flattenCellTxBodyText } from '../../../chunk-
|
|
2
|
-
import { updateSmartArtNodeText, reconcileSmartArtTextParagraphs } from '../../../chunk-
|
|
1
|
+
import { updateCellTextInRawXml, getTblFromRawXml, ensureArray, flattenCellTxBodyText } from '../../../chunk-VKFKEVHK.mjs';
|
|
2
|
+
import { updateSmartArtNodeText, reconcileSmartArtTextParagraphs } from '../../../chunk-IPV3J3I5.mjs';
|
|
3
3
|
import { hasTextProperties } from '../../../chunk-GXHKNSZX.mjs';
|
|
4
4
|
import '../../../chunk-CA7KCNL3.mjs';
|
|
5
5
|
import { remapTextToSegments } from '../../../chunk-CBNKBVX5.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../../../chunk-
|
|
4
|
-
require('../../../chunk-
|
|
5
|
-
var
|
|
3
|
+
require('../../../chunk-YNQRXFTC.cjs');
|
|
4
|
+
require('../../../chunk-3J6VIKLP.cjs');
|
|
5
|
+
var chunkQZPOPUI5_cjs = require('../../../chunk-QZPOPUI5.cjs');
|
|
6
6
|
require('../../../chunk-XZPZHXV4.cjs');
|
|
7
7
|
require('../../../chunk-5W2QL4SB.cjs');
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ function reassignElementId(element) {
|
|
|
21
21
|
return newElement;
|
|
22
22
|
}
|
|
23
23
|
function duplicateSlide(slide, newSlideNumber) {
|
|
24
|
-
const cloned =
|
|
24
|
+
const cloned = chunkQZPOPUI5_cjs.cloneSlide(slide);
|
|
25
25
|
cloned.sourceSlideId = slide.id.startsWith("ppt/slides/") ? slide.id : slide.sourceSlideId ?? slide.id;
|
|
26
26
|
cloned.id = `slide${newSlideNumber}`;
|
|
27
27
|
cloned.rId = `rId${newSlideNumber + 1}`;
|
|
@@ -51,7 +51,7 @@ function duplicateSlide(slide, newSlideNumber) {
|
|
|
51
51
|
function captureSlideClipboard(slides, ids) {
|
|
52
52
|
return ids.flatMap((id) => {
|
|
53
53
|
const slide = slides.find((candidate) => candidate.id === id);
|
|
54
|
-
return slide ? [
|
|
54
|
+
return slide ? [chunkQZPOPUI5_cjs.cloneSlide(slide)] : [];
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
function createSlidePaste(clipboard, insertAt, templates = {}) {
|
|
@@ -62,14 +62,14 @@ function createSlidePaste(clipboard, insertAt, templates = {}) {
|
|
|
62
62
|
})),
|
|
63
63
|
sourceIds: clipboard.map((slide) => slide.id),
|
|
64
64
|
insertAt,
|
|
65
|
-
templateElements: clipboard.map((slide) => (templates[slide.id] ?? []).map(
|
|
65
|
+
templateElements: clipboard.map((slide) => (templates[slide.id] ?? []).map(chunkQZPOPUI5_cjs.cloneElement))
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
function insertSlidePaste(slides, request) {
|
|
69
69
|
const index = Math.max(0, Math.min(slides.length, request.insertAt));
|
|
70
70
|
const next = [
|
|
71
71
|
...slides.slice(0, index),
|
|
72
|
-
...request.copies.map(
|
|
72
|
+
...request.copies.map(chunkQZPOPUI5_cjs.cloneSlide),
|
|
73
73
|
...slides.slice(index)
|
|
74
74
|
];
|
|
75
75
|
return next.map(
|
|
@@ -79,12 +79,12 @@ function insertSlidePaste(slides, request) {
|
|
|
79
79
|
function applySlidePasteTemplates(mapping, request) {
|
|
80
80
|
const next = { ...mapping };
|
|
81
81
|
request.copies.forEach((copy, index) => {
|
|
82
|
-
next[copy.id] = (request.templateElements[index] ?? []).map(
|
|
82
|
+
next[copy.id] = (request.templateElements[index] ?? []).map(chunkQZPOPUI5_cjs.cloneElement);
|
|
83
83
|
});
|
|
84
84
|
return next;
|
|
85
85
|
}
|
|
86
86
|
function captureSlideClipboardTemplates(mapping, ids) {
|
|
87
|
-
return Object.fromEntries(ids.map((id) => [id, (mapping[id] ?? []).map(
|
|
87
|
+
return Object.fromEntries(ids.map((id) => [id, (mapping[id] ?? []).map(chunkQZPOPUI5_cjs.cloneElement)]));
|
|
88
88
|
}
|
|
89
89
|
function makeSlideId(idGenerator) {
|
|
90
90
|
if (idGenerator) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
3
|
-
import { cloneSlide, cloneElement } from '../../../chunk-
|
|
1
|
+
import '../../../chunk-XVB3CBNM.mjs';
|
|
2
|
+
import '../../../chunk-VKFKEVHK.mjs';
|
|
3
|
+
import { cloneSlide, cloneElement } from '../../../chunk-IPV3J3I5.mjs';
|
|
4
4
|
import '../../../chunk-GXHKNSZX.mjs';
|
|
5
5
|
import '../../../chunk-CA7KCNL3.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCODMW5KF_cjs = require('../../../chunk-CODMW5KF.cjs');
|
|
4
4
|
var chunk7XYVFUB3_cjs = require('../../../chunk-7XYVFUB3.cjs');
|
|
5
5
|
var pptx = require('ooxml-core/pptx');
|
|
6
6
|
|
|
@@ -31,28 +31,28 @@ function setTableElementCellText(element, rowIndex, colIndex, text) {
|
|
|
31
31
|
return rawXml ? { ...updated, rawXml } : updated;
|
|
32
32
|
}
|
|
33
33
|
function insertTableElementRow(element, rowIdx, position) {
|
|
34
|
-
return withTableData(element, (data) =>
|
|
34
|
+
return withTableData(element, (data) => chunkCODMW5KF_cjs.insertTableRow(data, rowIdx, position), {
|
|
35
35
|
axis: "row",
|
|
36
36
|
action: "insert",
|
|
37
37
|
index: position === "above" ? rowIdx : rowIdx + 1
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
function removeTableElementRow(element, rowIdx) {
|
|
41
|
-
return withTableData(element, (data) =>
|
|
41
|
+
return withTableData(element, (data) => chunkCODMW5KF_cjs.deleteTableRow(data, rowIdx), {
|
|
42
42
|
axis: "row",
|
|
43
43
|
action: "delete",
|
|
44
44
|
index: rowIdx
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
function insertTableElementColumn(element, colIdx, position) {
|
|
48
|
-
return withTableData(element, (data) =>
|
|
48
|
+
return withTableData(element, (data) => chunkCODMW5KF_cjs.insertTableColumn(data, colIdx, position), {
|
|
49
49
|
axis: "column",
|
|
50
50
|
action: "insert",
|
|
51
51
|
index: position === "left" ? colIdx : colIdx + 1
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
function removeTableElementColumn(element, colIdx) {
|
|
55
|
-
return withTableData(element, (data) =>
|
|
55
|
+
return withTableData(element, (data) => chunkCODMW5KF_cjs.deleteTableColumn(data, colIdx), {
|
|
56
56
|
axis: "column",
|
|
57
57
|
action: "delete",
|
|
58
58
|
index: colIdx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { insertTableRow, deleteTableRow, insertTableColumn, deleteTableColumn } from '../../../chunk-
|
|
1
|
+
import { insertTableRow, deleteTableRow, insertTableColumn, deleteTableColumn } from '../../../chunk-O3YGBYGZ.mjs';
|
|
2
2
|
import { setCellText } from '../../../chunk-NBMXEVHL.mjs';
|
|
3
3
|
import { updateCellTextInRawXml, rebuildTableStructureInRawXml } from 'ooxml-core/pptx';
|
|
4
4
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCODMW5KF_cjs = require('../../../chunk-CODMW5KF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "DEFAULT_INSERTED_ROW_HEIGHT", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkCODMW5KF_cjs.DEFAULT_INSERTED_ROW_HEIGHT; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "deleteTableColumn", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkCODMW5KF_cjs.deleteTableColumn; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "deleteTableRow", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkCODMW5KF_cjs.deleteTableRow; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "insertTableColumn", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkCODMW5KF_cjs.insertTableColumn; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "insertTableRow", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkCODMW5KF_cjs.insertTableRow; }
|
|
26
26
|
});
|
|
@@ -1,41 +1,12 @@
|
|
|
1
|
-
import { PptxTableData } from "
|
|
2
|
-
/** Default pixel height assigned to a freshly
|
|
1
|
+
import { v as PptxTableData } from "../../chunks/table-C7ITXL3Y.js";
|
|
2
|
+
/** Default pixel height assigned to a freshly inserted row. */
|
|
3
3
|
export declare const DEFAULT_INSERTED_ROW_HEIGHT = 40;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @param tableData - Source table (not mutated).
|
|
8
|
-
* @param rowIdx - The reference row the insertion is relative to.
|
|
9
|
-
* @param position - `'above'` inserts before `rowIdx`, `'below'` after it.
|
|
10
|
-
* @returns A new `PptxTableData` with the row inserted and any vertical merge
|
|
11
|
-
* anchors that span the insertion point grown by one.
|
|
12
|
-
*/
|
|
13
|
-
export declare function insertTableRow(tableData: PptxTableData, rowIdx: number, position: 'above' | 'below'): PptxTableData;
|
|
14
|
-
/**
|
|
15
|
-
* Delete a row from `tableData`, adjusting vertical merge spans.
|
|
16
|
-
*
|
|
17
|
-
* Returns the original `tableData` unchanged when there is only one row or the
|
|
18
|
-
* index is out of range.
|
|
19
|
-
*/
|
|
4
|
+
/** Insert a row and extend each vertical merge crossing the insertion point. */
|
|
5
|
+
export declare function insertTableRow(tableData: PptxTableData, rowIdx: number, position: 'above' | 'below', cellTexts?: readonly string[]): PptxTableData;
|
|
6
|
+
/** Delete a row, retaining the title and formatting of any surviving merge. */
|
|
20
7
|
export declare function deleteTableRow(tableData: PptxTableData, rowIdx: number): PptxTableData;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* The source column's width is split in half between it and the new column,
|
|
25
|
-
* then the whole array is renormalised. Horizontal merge spans that straddle
|
|
26
|
-
* the insertion point are grown by one.
|
|
27
|
-
*
|
|
28
|
-
* @param tableData - Source table (not mutated).
|
|
29
|
-
* @param colIdx - Reference column.
|
|
30
|
-
* @param position - `'left'` inserts before `colIdx`, `'right'` after it.
|
|
31
|
-
*/
|
|
32
|
-
export declare function insertTableColumn(tableData: PptxTableData, colIdx: number, position: 'left' | 'right'): PptxTableData;
|
|
33
|
-
/**
|
|
34
|
-
* Delete a column from `tableData`, adjusting horizontal merge spans and
|
|
35
|
-
* renormalising the column widths.
|
|
36
|
-
*
|
|
37
|
-
* Returns the original `tableData` unchanged when there is only one column or
|
|
38
|
-
* the index is out of range.
|
|
39
|
-
*/
|
|
8
|
+
/** Insert a column, splitting a neighbour's width and extending intersected merges. */
|
|
9
|
+
export declare function insertTableColumn(tableData: PptxTableData, colIdx: number, position: 'left' | 'right', cellTexts?: readonly string[]): PptxTableData;
|
|
10
|
+
/** Delete a column and move any surviving merge's anchor onto the remaining grid. */
|
|
40
11
|
export declare function deleteTableColumn(tableData: PptxTableData, colIdx: number): PptxTableData;
|
|
41
12
|
//# sourceMappingURL=table-layout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-layout.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-layout.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"table-layout.d.ts","names":[],"sources":["../../../../pptx/editor/render/table-layout.ts"],"mappings":";;qBAKa;;wBAoFG,eACf,WAAW,eACX,gBACA,6BACA,gCACE;;wBAYa,eAAe,WAAW,eAAe,iBAAiB;;wBAW1D,kBACf,WAAW,eACX,gBACA,4BACA,gCACE;;wBAmBa,kBAAkB,WAAW,eAAe,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DEFAULT_INSERTED_ROW_HEIGHT, deleteTableColumn, deleteTableRow, insertTableColumn, insertTableRow } from '../../../chunk-
|
|
1
|
+
export { DEFAULT_INSERTED_ROW_HEIGHT, deleteTableColumn, deleteTableRow, insertTableColumn, insertTableRow } from '../../../chunk-O3YGBYGZ.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as TextStyle } from "../../chunks/text-t_wJ2OwM.js";
|
|
2
|
-
import { _ as PptxElementWithText, m as PptxElement } from "../../chunks/elements-
|
|
2
|
+
import { _ as PptxElementWithText, m as PptxElement } from "../../chunks/elements-PBugbKtv.js";
|
|
3
3
|
/** Immutable whole-text edit, using the pre-edit body style for run inheritance. */
|
|
4
4
|
export declare function textRunsStylePatch(element: PptxElement, updates: Partial<TextStyle>): Pick<Partial<PptxElementWithText>, 'textStyle' | 'textSegments'>;
|
|
5
5
|
//# sourceMappingURL=text-runs-style-patch.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as TextStyle, r as TextSegment } from "../../chunks/text-t_wJ2OwM.js";
|
|
2
|
-
import { m as PptxElement } from "../../chunks/elements-
|
|
2
|
+
import { m as PptxElement } from "../../chunks/elements-PBugbKtv.js";
|
|
3
3
|
import { TextDecorationFlag } from "./text-content-style.js";
|
|
4
4
|
/**
|
|
5
5
|
* Keys read from `element.textStyle` only: `a:bodyPr` attributes, the text
|