@harbour-enterprises/superdoc 0.22.0-next.4 → 0.22.0-next.6

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.
Files changed (29) hide show
  1. package/dist/chunks/{PdfViewer-BBpGCmdE.es.js → PdfViewer-BMfm6DSP.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-CxIz7yf-.cjs → PdfViewer-XMDxj-2m.cjs} +1 -1
  3. package/dist/chunks/{index-BE07bQaY.cjs → index-BlNiELtW.cjs} +2 -2
  4. package/dist/chunks/{index-CYCctXm3.es.js → index-Cvi1utmk.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-cZsHkhM6.cjs → super-editor.es-BDsfLrnI.cjs} +247 -61
  6. package/dist/chunks/{super-editor.es-Ccu1wOj1.es.js → super-editor.es-CmQ5GChv.es.js} +247 -61
  7. package/dist/core/types/index.d.ts.map +1 -1
  8. package/dist/super-editor/ai-writer.es.js +2 -2
  9. package/dist/super-editor/chunks/{converter-DBwwYo1I.js → converter-D9kK7Smo.js} +136 -36
  10. package/dist/super-editor/chunks/{docx-zipper-BCI-3XE9.js → docx-zipper-D8HnWWpv.js} +73 -12
  11. package/dist/super-editor/chunks/{editor-B2S-zXBF.js → editor-Ddkz97dH.js} +41 -16
  12. package/dist/super-editor/chunks/{toolbar-BX9nPPG0.js → toolbar-BxjdbiUf.js} +2 -2
  13. package/dist/super-editor/converter.es.js +1 -1
  14. package/dist/super-editor/docx-zipper.es.js +2 -2
  15. package/dist/super-editor/editor.es.js +3 -3
  16. package/dist/super-editor/file-zipper.es.js +1 -1
  17. package/dist/super-editor/src/core/DocxZipper.d.ts +1 -1
  18. package/dist/super-editor/src/core/super-converter/exporter.d.ts +1 -0
  19. package/dist/super-editor/src/core/super-converter/helpers/tableFallbackHelpers.d.ts +24 -0
  20. package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +5 -0
  21. package/dist/super-editor/super-editor.es.js +6 -6
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.cjs +2 -2
  26. package/dist/superdoc.es.js +2 -2
  27. package/dist/superdoc.umd.js +247 -61
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
@@ -27167,6 +27167,68 @@ const config$a = {
27167
27167
  decode: decode$h
27168
27168
  };
27169
27169
  const translator$a = NodeTranslator.from(config$a);
27170
+ const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
27171
+ const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
27172
+ const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
27173
+ const MIN_COLUMN_WIDTH_TWIPS = pixelsToTwips(10);
27174
+ const pctToPercent = (value) => {
27175
+ if (value == null) return null;
27176
+ return value / 50;
27177
+ };
27178
+ const resolveContentWidthTwips = () => DEFAULT_CONTENT_WIDTH_TWIPS;
27179
+ const resolveMeasurementWidthPx = (measurement) => {
27180
+ if (!measurement || typeof measurement.value !== "number" || measurement.value <= 0) return null;
27181
+ const { value, type: type2 } = measurement;
27182
+ if (!type2 || type2 === "auto") return null;
27183
+ if (type2 === "dxa") return twipsToPixels(value);
27184
+ if (type2 === "pct") {
27185
+ const percent = pctToPercent(value);
27186
+ if (percent == null || percent <= 0) return null;
27187
+ const widthTwips = resolveContentWidthTwips() * percent / 100;
27188
+ return twipsToPixels(widthTwips);
27189
+ }
27190
+ return null;
27191
+ };
27192
+ const countColumnsInRow = (row) => {
27193
+ if (!row?.elements?.length) return 0;
27194
+ return row.elements.reduce((count, element) => {
27195
+ if (element.name !== "w:tc") return count;
27196
+ const tcPr = element.elements?.find((el) => el.name === "w:tcPr");
27197
+ const gridSpan = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27198
+ const spanValue = parseInt(gridSpan?.attributes?.["w:val"] || "1", 10);
27199
+ return count + (Number.isFinite(spanValue) && spanValue > 0 ? spanValue : 1);
27200
+ }, 0);
27201
+ };
27202
+ const clampColumnWidthTwips = (value) => Math.max(Math.round(value), MIN_COLUMN_WIDTH_TWIPS);
27203
+ const createFallbackGrid = (columnCount, columnWidthTwips) => Array.from({ length: columnCount }, () => ({ col: clampColumnWidthTwips(columnWidthTwips) }));
27204
+ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasurement }) => {
27205
+ const firstRow = rows.find((row) => row.elements?.some((el) => el.name === "w:tc"));
27206
+ const columnCount = countColumnsInRow(firstRow);
27207
+ if (!columnCount) return null;
27208
+ const schemaDefaultPx = getSchemaDefaultColumnWidthPx(
27209
+ /** @type {any} */
27210
+ params
27211
+ );
27212
+ const minimumColumnWidthPx = Number.isFinite(schemaDefaultPx) && schemaDefaultPx > 0 ? schemaDefaultPx : DEFAULT_COLUMN_WIDTH_PX;
27213
+ let totalWidthPx;
27214
+ if (tableWidthMeasurement) {
27215
+ const resolved = resolveMeasurementWidthPx(tableWidthMeasurement);
27216
+ if (resolved != null) totalWidthPx = resolved;
27217
+ }
27218
+ if (totalWidthPx == null && tableWidth?.width && tableWidth.width > 0) {
27219
+ totalWidthPx = tableWidth.width;
27220
+ }
27221
+ if (totalWidthPx == null) {
27222
+ totalWidthPx = minimumColumnWidthPx * columnCount;
27223
+ }
27224
+ const rawColumnWidthPx = Math.max(totalWidthPx / columnCount, minimumColumnWidthPx);
27225
+ const columnWidthTwips = clampColumnWidthTwips(pixelsToTwips(rawColumnWidthPx));
27226
+ const fallbackColumnWidthPx = twipsToPixels(columnWidthTwips);
27227
+ return {
27228
+ grid: createFallbackGrid(columnCount, columnWidthTwips),
27229
+ columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
27230
+ };
27231
+ };
27170
27232
  const XML_NODE_NAME$9 = "w:tbl";
27171
27233
  const SD_NODE_NAME$9 = "table";
27172
27234
  const encode$g = (params, encodedAttrs) => {
@@ -27186,7 +27248,6 @@ const encode$g = (params, encodedAttrs) => {
27186
27248
  "justification",
27187
27249
  "tableLayout",
27188
27250
  ["tableIndent", ({ value, type: type2 }) => ({ width: twipsToPixels(value), type: type2 })],
27189
- ["tableWidth", ({ value, type: type2 }) => ({ width: twipsToPixels(value), type: type2 })],
27190
27251
  ["tableCellSpacing", ({ value, type: type2 }) => ({ w: String(value), type: type2 })]
27191
27252
  ].forEach((prop) => {
27192
27253
  let key;
@@ -27204,6 +27265,21 @@ const encode$g = (params, encodedAttrs) => {
27204
27265
  if (encodedAttrs.tableCellSpacing) {
27205
27266
  encodedAttrs["borderCollapse"] = "separate";
27206
27267
  }
27268
+ if (encodedAttrs.tableProperties?.tableWidth) {
27269
+ const tableWidthMeasurement = encodedAttrs.tableProperties.tableWidth;
27270
+ const widthPx = twipsToPixels(tableWidthMeasurement.value);
27271
+ if (widthPx != null) {
27272
+ encodedAttrs.tableWidth = {
27273
+ width: widthPx,
27274
+ type: tableWidthMeasurement.type
27275
+ };
27276
+ } else if (tableWidthMeasurement.type === "auto") {
27277
+ encodedAttrs.tableWidth = {
27278
+ width: 0,
27279
+ type: tableWidthMeasurement.type
27280
+ };
27281
+ }
27282
+ }
27207
27283
  const { borders, rowBorders } = _processTableBorders(encodedAttrs.tableProperties?.borders || {});
27208
27284
  const referencedStyles = _getReferencedTableStyles(encodedAttrs.tableStyleId, params);
27209
27285
  if (referencedStyles?.cellMargins && !encodedAttrs.tableProperties?.cellMargins) {
@@ -27217,7 +27293,19 @@ const encode$g = (params, encodedAttrs) => {
27217
27293
  const borderRowData = Object.assign({}, referencedStyles?.rowBorders || {}, rowBorders || {});
27218
27294
  encodedAttrs["borders"] = borderData;
27219
27295
  const tblStyleTag = tblPr?.elements?.find((el) => el.name === "w:tblStyle");
27220
- const columnWidths = (encodedAttrs["grid"] ?? []).map((item) => twipsToPixels(item.col));
27296
+ let columnWidths = Array.isArray(encodedAttrs["grid"]) ? encodedAttrs["grid"].map((item) => twipsToPixels(item.col)) : [];
27297
+ if (!columnWidths.length) {
27298
+ const fallback = buildFallbackGridForTable({
27299
+ params,
27300
+ rows,
27301
+ tableWidth: encodedAttrs.tableWidth,
27302
+ tableWidthMeasurement: encodedAttrs.tableProperties?.tableWidth
27303
+ });
27304
+ if (fallback) {
27305
+ encodedAttrs.grid = fallback.grid;
27306
+ columnWidths = fallback.columnWidths;
27307
+ }
27308
+ }
27221
27309
  const content = [];
27222
27310
  rows.forEach((row) => {
27223
27311
  const result = translator$G.encode({
@@ -30610,6 +30698,51 @@ const DEFAULT_SECTION_PROPS_TWIPS = Object.freeze({
30610
30698
  gutter: "0"
30611
30699
  })
30612
30700
  });
30701
+ const ensureSectionLayoutDefaults = (sectPr, converter) => {
30702
+ if (!sectPr) {
30703
+ return {
30704
+ type: "element",
30705
+ name: "w:sectPr",
30706
+ elements: []
30707
+ };
30708
+ }
30709
+ if (!sectPr.elements) sectPr.elements = [];
30710
+ const ensureChild = (name) => {
30711
+ let child = sectPr.elements.find((n) => n.name === name);
30712
+ if (!child) {
30713
+ child = {
30714
+ type: "element",
30715
+ name,
30716
+ elements: [],
30717
+ attributes: {}
30718
+ };
30719
+ sectPr.elements.push(child);
30720
+ } else {
30721
+ if (!child.elements) child.elements = [];
30722
+ if (!child.attributes) child.attributes = {};
30723
+ }
30724
+ return child;
30725
+ };
30726
+ const pageSize = converter?.pageStyles?.pageSize;
30727
+ const pgSz = ensureChild("w:pgSz");
30728
+ if (pageSize?.width != null) pgSz.attributes["w:w"] = String(inchesToTwips(pageSize.width));
30729
+ if (pageSize?.height != null) pgSz.attributes["w:h"] = String(inchesToTwips(pageSize.height));
30730
+ if (pgSz.attributes["w:w"] == null) pgSz.attributes["w:w"] = DEFAULT_SECTION_PROPS_TWIPS.pageSize.width;
30731
+ if (pgSz.attributes["w:h"] == null) pgSz.attributes["w:h"] = DEFAULT_SECTION_PROPS_TWIPS.pageSize.height;
30732
+ const pageMargins = converter?.pageStyles?.pageMargins;
30733
+ const pgMar = ensureChild("w:pgMar");
30734
+ if (pageMargins) {
30735
+ Object.entries(pageMargins).forEach(([key, value]) => {
30736
+ const converted = inchesToTwips(value);
30737
+ if (converted != null) pgMar.attributes[`w:${key}`] = String(converted);
30738
+ });
30739
+ }
30740
+ Object.entries(DEFAULT_SECTION_PROPS_TWIPS.pageMargins).forEach(([key, value]) => {
30741
+ const attrKey = `w:${key}`;
30742
+ if (pgMar.attributes[attrKey] == null) pgMar.attributes[attrKey] = value;
30743
+ });
30744
+ return sectPr;
30745
+ };
30613
30746
  const isLineBreakOnlyRun = (node) => {
30614
30747
  if (!node) return false;
30615
30748
  if (node.type === "lineBreak" || node.type === "hardBreak") return true;
@@ -30672,6 +30805,7 @@ function translateBodyNode(params) {
30672
30805
  } else if (!sectPr.elements) {
30673
30806
  sectPr = { ...sectPr, elements: [] };
30674
30807
  }
30808
+ sectPr = ensureSectionLayoutDefaults(sectPr, params.converter);
30675
30809
  if (params.converter) {
30676
30810
  const hasHeader = sectPr.elements?.some((n) => n.name === "w:headerReference");
30677
30811
  const hasDefaultHeader = params.converter.headerIds?.default;
@@ -30685,40 +30819,6 @@ function translateBodyNode(params) {
30685
30819
  const defaultFooter = generateDefaultHeaderFooter("footer", params.converter.footerIds?.default);
30686
30820
  sectPr.elements.push(defaultFooter);
30687
30821
  }
30688
- const newMargins = params.converter.pageStyles?.pageMargins;
30689
- if (newMargins) {
30690
- let sectPrMargins = sectPr.elements.find((n) => n.name === "w:pgMar");
30691
- if (!sectPrMargins) {
30692
- sectPrMargins = {
30693
- type: "element",
30694
- name: "w:pgMar",
30695
- attributes: {}
30696
- };
30697
- sectPr.elements.push(sectPrMargins);
30698
- } else if (!sectPrMargins.attributes) {
30699
- sectPrMargins.attributes = {};
30700
- }
30701
- Object.entries(newMargins).forEach(([key, value]) => {
30702
- const convertedValue = inchesToTwips(value);
30703
- sectPrMargins.attributes[`w:${key}`] = convertedValue;
30704
- });
30705
- }
30706
- let sectPrPgSz = sectPr.elements.find((n) => n.name === "w:pgSz");
30707
- if (!sectPrPgSz) {
30708
- sectPrPgSz = {
30709
- type: "element",
30710
- name: "w:pgSz",
30711
- attributes: {}
30712
- };
30713
- sectPr.elements.push(sectPrPgSz);
30714
- } else if (!sectPrPgSz.attributes) {
30715
- sectPrPgSz.attributes = {};
30716
- }
30717
- const pageSize = params.converter.pageStyles?.pageSize;
30718
- const widthInches = pageSize?.width;
30719
- const heightInches = pageSize?.height;
30720
- sectPrPgSz.attributes["w:w"] = widthInches ? String(inchesToTwips(widthInches)) : sectPrPgSz.attributes["w:w"] ?? DEFAULT_SECTION_PROPS_TWIPS.pageSize.width;
30721
- sectPrPgSz.attributes["w:h"] = heightInches ? String(inchesToTwips(heightInches)) : sectPrPgSz.attributes["w:h"] ?? DEFAULT_SECTION_PROPS_TWIPS.pageSize.height;
30722
30822
  }
30723
30823
  const elements = translateChildNodes(params);
30724
30824
  if (params.isHeaderFooter) {
@@ -1,4 +1,4 @@
1
- import { p as process$1, au as commonjsGlobal, B as Buffer, av as getDefaultExportFromCjs, aw as getContentTypesFromXml, ax as xmljs } from "./converter-DBwwYo1I.js";
1
+ import { p as process$1, au as commonjsGlobal, B as Buffer, av as getDefaultExportFromCjs, aw as getContentTypesFromXml, ax as xmljs } from "./converter-D9kK7Smo.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -2414,14 +2414,19 @@ class DocxZipper {
2414
2414
  /**
2415
2415
  * Update [Content_Types].xml with extensions of new Image annotations
2416
2416
  */
2417
- async updateContentTypes(docx, media, fromJson) {
2417
+ async updateContentTypes(docx, media, fromJson, updatedDocs = {}) {
2418
+ const additionalPartNames = Object.keys(updatedDocs || {});
2418
2419
  const newMediaTypes = Object.keys(media).map((name) => {
2419
2420
  return this.getFileExtension(name);
2420
2421
  }).filter(Boolean);
2421
2422
  const contentTypesPath = "[Content_Types].xml";
2422
2423
  let contentTypesXml;
2423
2424
  if (fromJson) {
2424
- contentTypesXml = docx.files.find((file) => file.name === contentTypesPath)?.content || "";
2425
+ if (Array.isArray(docx.files)) {
2426
+ contentTypesXml = docx.files.find((file) => file.name === contentTypesPath)?.content || "";
2427
+ } else {
2428
+ contentTypesXml = docx.files?.[contentTypesPath] || "";
2429
+ }
2425
2430
  } else contentTypesXml = await docx.file(contentTypesPath).async("string");
2426
2431
  let typesString = "";
2427
2432
  const defaultMediaTypes = getContentTypesFromXml(contentTypesXml);
@@ -2447,24 +2452,39 @@ class DocxZipper {
2447
2452
  const hasCommentsExtensible = types.elements?.some(
2448
2453
  (el) => el.name === "Override" && el.attributes.PartName === "/word/commentsExtensible.xml"
2449
2454
  );
2450
- if (docx.files["word/comments.xml"]) {
2455
+ const hasFile = (filename) => {
2456
+ if (!docx?.files) return false;
2457
+ if (!fromJson) return Boolean(docx.files[filename]);
2458
+ if (Array.isArray(docx.files)) return docx.files.some((file) => file.name === filename);
2459
+ return Boolean(docx.files[filename]);
2460
+ };
2461
+ if (hasFile("word/comments.xml")) {
2451
2462
  const commentsDef = `<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml" />`;
2452
2463
  if (!hasComments) typesString += commentsDef;
2453
2464
  }
2454
- if (docx.files["word/commentsExtended.xml"]) {
2465
+ if (hasFile("word/commentsExtended.xml")) {
2455
2466
  const commentsExtendedDef = `<Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml" />`;
2456
2467
  if (!hasCommentsExtended) typesString += commentsExtendedDef;
2457
2468
  }
2458
- if (docx.files["word/commentsIds.xml"]) {
2469
+ if (hasFile("word/commentsIds.xml")) {
2459
2470
  const commentsIdsDef = `<Override PartName="/word/commentsIds.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml" />`;
2460
2471
  if (!hasCommentsIds) typesString += commentsIdsDef;
2461
2472
  }
2462
- if (docx.files["word/commentsExtensible.xml"]) {
2473
+ if (hasFile("word/commentsExtensible.xml")) {
2463
2474
  const commentsExtendedDef = `<Override PartName="/word/commentsExtensible.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml" />`;
2464
2475
  if (!hasCommentsExtensible) typesString += commentsExtendedDef;
2465
2476
  }
2466
- Object.keys(docx.files).forEach((name) => {
2467
- if (name.includes(".rels") || !name.includes("header") && !name.includes("footer")) return;
2477
+ const partNames = new Set(additionalPartNames);
2478
+ if (docx?.files) {
2479
+ if (fromJson && Array.isArray(docx.files)) {
2480
+ docx.files.forEach((file) => partNames.add(file.name));
2481
+ } else {
2482
+ Object.keys(docx.files).forEach((key) => partNames.add(key));
2483
+ }
2484
+ }
2485
+ partNames.forEach((name) => {
2486
+ if (name.includes(".rels")) return;
2487
+ if (!name.includes("header") && !name.includes("footer")) return;
2468
2488
  const hasExtensible = types.elements?.some(
2469
2489
  (el) => el.name === "Override" && el.attributes.PartName === `/${name}`
2470
2490
  );
@@ -2475,7 +2495,48 @@ class DocxZipper {
2475
2495
  }
2476
2496
  });
2477
2497
  const beginningString = '<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">';
2478
- const updatedContentTypesXml = contentTypesXml.replace(beginningString, `${beginningString}${typesString}`);
2498
+ let updatedContentTypesXml = contentTypesXml.replace(beginningString, `${beginningString}${typesString}`);
2499
+ let relationshipsXml = updatedDocs["word/_rels/document.xml.rels"];
2500
+ if (!relationshipsXml) {
2501
+ if (fromJson) {
2502
+ if (Array.isArray(docx.files)) {
2503
+ relationshipsXml = docx.files.find((file) => file.name === "word/_rels/document.xml.rels")?.content;
2504
+ } else {
2505
+ relationshipsXml = docx.files?.["word/_rels/document.xml.rels"];
2506
+ }
2507
+ } else {
2508
+ relationshipsXml = await docx.file("word/_rels/document.xml.rels")?.async("string");
2509
+ }
2510
+ }
2511
+ if (relationshipsXml) {
2512
+ try {
2513
+ const relJson = xmljs.xml2js(relationshipsXml, { compact: false });
2514
+ const relationships = relJson.elements?.find((el) => el.name === "Relationships");
2515
+ relationships?.elements?.forEach((rel) => {
2516
+ const type = rel.attributes?.Type;
2517
+ const target = rel.attributes?.Target;
2518
+ if (!type || !target) return;
2519
+ const isHeader = type.includes("/header");
2520
+ const isFooter = type.includes("/footer");
2521
+ if (!isHeader && !isFooter) return;
2522
+ let sanitizedTarget = target.replace(/^\.\//, "");
2523
+ if (sanitizedTarget.startsWith("../")) sanitizedTarget = sanitizedTarget.slice(3);
2524
+ if (sanitizedTarget.startsWith("/")) sanitizedTarget = sanitizedTarget.slice(1);
2525
+ const partName = sanitizedTarget.startsWith("word/") ? sanitizedTarget : `word/${sanitizedTarget}`;
2526
+ partNames.add(partName);
2527
+ });
2528
+ } catch (error) {
2529
+ console.warn("Failed to parse document relationships while updating content types", error);
2530
+ }
2531
+ }
2532
+ partNames.forEach((name) => {
2533
+ if (name.includes(".rels")) return;
2534
+ if (!name.includes("header") && !name.includes("footer")) return;
2535
+ if (updatedContentTypesXml.includes(`PartName="/${name}"`)) return;
2536
+ const type = name.includes("header") ? "header" : "footer";
2537
+ const extendedDef = `<Override PartName="/${name}" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.${type}+xml"/>`;
2538
+ updatedContentTypesXml = updatedContentTypesXml.replace("</Types>", `${extendedDef}</Types>`);
2539
+ });
2479
2540
  if (fromJson) return updatedContentTypesXml;
2480
2541
  docx.file(contentTypesPath, updatedContentTypesXml);
2481
2542
  }
@@ -2516,7 +2577,7 @@ class DocxZipper {
2516
2577
  for (const [fontName, fontUintArray] of Object.entries(fonts)) {
2517
2578
  zip.file(fontName, fontUintArray);
2518
2579
  }
2519
- await this.updateContentTypes(zip, media);
2580
+ await this.updateContentTypes(zip, media, false, updatedDocs);
2520
2581
  return zip;
2521
2582
  }
2522
2583
  /**
@@ -2542,7 +2603,7 @@ class DocxZipper {
2542
2603
  Object.keys(media).forEach((path) => {
2543
2604
  unzippedOriginalDocx.file(path, media[path]);
2544
2605
  });
2545
- await this.updateContentTypes(unzippedOriginalDocx, media);
2606
+ await this.updateContentTypes(unzippedOriginalDocx, media, false, updatedDocs);
2546
2607
  return unzippedOriginalDocx;
2547
2608
  }
2548
2609
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as SelectionRange, ao as Transform, ap as isInTable$1, aq as generateDocxRandomId, ar as insertNewRelationship, as as updateDOMAttributes, at as htmlHandler } from "./converter-DBwwYo1I.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as SelectionRange, ao as Transform, ap as isInTable$1, aq as generateDocxRandomId, ar as insertNewRelationship, as as updateDOMAttributes, at as htmlHandler } from "./converter-D9kK7Smo.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-BCI-3XE9.js";
17
+ import { D as DocxZipper } from "./docx-zipper-D8HnWWpv.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -14822,7 +14822,8 @@ const _Editor = class _Editor extends EventEmitter {
14822
14822
  files: this.options.content
14823
14823
  },
14824
14824
  media,
14825
- true
14825
+ true,
14826
+ updatedDocs
14826
14827
  );
14827
14828
  return updatedDocs;
14828
14829
  }
@@ -17498,6 +17499,16 @@ const shouldAllowNativeContextMenu = (event) => {
17498
17499
  return prefersNativeMenu(event);
17499
17500
  };
17500
17501
  const shouldBypassContextMenu = shouldAllowNativeContextMenu;
17502
+ const DEFAULT_SELECTION_STATE = Object.freeze({
17503
+ focused: false,
17504
+ preservedSelection: null,
17505
+ showVisualSelection: false,
17506
+ skipFocusReset: false
17507
+ });
17508
+ const normalizeSelectionState = (state = {}) => ({
17509
+ ...DEFAULT_SELECTION_STATE,
17510
+ ...state
17511
+ });
17501
17512
  const CustomSelectionPluginKey = new PluginKey("CustomSelection");
17502
17513
  const handleClickOutside = (event, editor) => {
17503
17514
  const editorElem = editor?.options?.element;
@@ -17535,11 +17546,7 @@ const CustomSelection = Extension.create({
17535
17546
  const customSelectionPlugin = new Plugin({
17536
17547
  key: CustomSelectionPluginKey,
17537
17548
  state: {
17538
- init: () => ({
17539
- focused: false,
17540
- preservedSelection: null,
17541
- showVisualSelection: false
17542
- }),
17549
+ init: () => ({ ...DEFAULT_SELECTION_STATE }),
17543
17550
  apply: (tr, value) => {
17544
17551
  const meta = getFocusMeta(tr);
17545
17552
  if (meta !== void 0) {
@@ -17570,7 +17577,8 @@ const CustomSelection = Extension.create({
17570
17577
  setFocusMeta(view.state.tr, {
17571
17578
  focused: true,
17572
17579
  preservedSelection: selection,
17573
- showVisualSelection: true
17580
+ showVisualSelection: true,
17581
+ skipFocusReset: true
17574
17582
  })
17575
17583
  );
17576
17584
  }
@@ -17591,7 +17599,8 @@ const CustomSelection = Extension.create({
17591
17599
  setFocusMeta(view.state.tr, {
17592
17600
  focused: true,
17593
17601
  preservedSelection: selection2,
17594
- showVisualSelection: true
17602
+ showVisualSelection: true,
17603
+ skipFocusReset: true
17595
17604
  })
17596
17605
  );
17597
17606
  this.editor.setOptions({
@@ -17614,7 +17623,8 @@ const CustomSelection = Extension.create({
17614
17623
  setFocusMeta(view.state.tr, {
17615
17624
  focused: true,
17616
17625
  preservedSelection: selection,
17617
- showVisualSelection: true
17626
+ showVisualSelection: true,
17627
+ skipFocusReset: false
17618
17628
  })
17619
17629
  );
17620
17630
  this.editor.setOptions({
@@ -17632,7 +17642,8 @@ const CustomSelection = Extension.create({
17632
17642
  setFocusMeta(view.state.tr, {
17633
17643
  focused: true,
17634
17644
  preservedSelection: selection,
17635
- showVisualSelection: true
17645
+ showVisualSelection: true,
17646
+ skipFocusReset: false
17636
17647
  })
17637
17648
  );
17638
17649
  }
@@ -17643,7 +17654,8 @@ const CustomSelection = Extension.create({
17643
17654
  setFocusMeta(view.state.tr, {
17644
17655
  focused: false,
17645
17656
  preservedSelection: null,
17646
- showVisualSelection: false
17657
+ showVisualSelection: false,
17658
+ skipFocusReset: false
17647
17659
  })
17648
17660
  );
17649
17661
  if (!selection.empty && !this.editor.options.element?.contains(target)) {
@@ -17660,12 +17672,20 @@ const CustomSelection = Extension.create({
17660
17672
  const isElement2 = target instanceof Element;
17661
17673
  const isToolbarBtn = isElement2 && isToolbarButton(target);
17662
17674
  const isToolbarInp = isElement2 && isToolbarInput(target);
17675
+ const focusState = getFocusState(view.state);
17676
+ if (focusState?.skipFocusReset) {
17677
+ view.dispatch(
17678
+ setFocusMeta(view.state.tr, normalizeSelectionState({ ...focusState, skipFocusReset: false }))
17679
+ );
17680
+ return false;
17681
+ }
17663
17682
  if (!isToolbarBtn && !isToolbarInp) {
17664
17683
  view.dispatch(
17665
17684
  setFocusMeta(view.state.tr, {
17666
17685
  focused: false,
17667
17686
  preservedSelection: null,
17668
- showVisualSelection: false
17687
+ showVisualSelection: false,
17688
+ skipFocusReset: false
17669
17689
  })
17670
17690
  );
17671
17691
  }
@@ -17676,12 +17696,16 @@ const CustomSelection = Extension.create({
17676
17696
  const isToolbarBtn = isElement2 && isToolbarButton(target);
17677
17697
  const isToolbarInp = isElement2 && isToolbarInput(target);
17678
17698
  const state = getFocusState(view.state);
17699
+ if (state?.skipFocusReset) {
17700
+ return false;
17701
+ }
17679
17702
  if (isToolbarBtn || isToolbarInp) {
17680
17703
  view.dispatch(
17681
17704
  setFocusMeta(view.state.tr, {
17682
17705
  focused: true,
17683
17706
  preservedSelection: state.preservedSelection || view.state.selection,
17684
- showVisualSelection: true
17707
+ showVisualSelection: true,
17708
+ skipFocusReset: false
17685
17709
  })
17686
17710
  );
17687
17711
  } else {
@@ -17689,7 +17713,8 @@ const CustomSelection = Extension.create({
17689
17713
  setFocusMeta(view.state.tr, {
17690
17714
  focused: false,
17691
17715
  preservedSelection: null,
17692
- showVisualSelection: false
17716
+ showVisualSelection: false,
17717
+ skipFocusReset: false
17693
17718
  })
17694
17719
  );
17695
17720
  }
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-DBwwYo1I.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-B2S-zXBF.js";
2
+ import { p as process$1 } from "./converter-D9kK7Smo.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-Ddkz97dH.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { a5 } from "./chunks/converter-DBwwYo1I.js";
1
+ import { a5 } from "./chunks/converter-D9kK7Smo.js";
2
2
  import "vue";
3
3
  export {
4
4
  a5 as SuperConverter
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DBwwYo1I.js";
2
- import { D } from "./chunks/docx-zipper-BCI-3XE9.js";
1
+ import "./chunks/converter-D9kK7Smo.js";
2
+ import { D } from "./chunks/docx-zipper-D8HnWWpv.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-B2S-zXBF.js";
2
- import "./chunks/converter-DBwwYo1I.js";
3
- import "./chunks/docx-zipper-BCI-3XE9.js";
1
+ import { E } from "./chunks/editor-Ddkz97dH.js";
2
+ import "./chunks/converter-D9kK7Smo.js";
3
+ import "./chunks/docx-zipper-D8HnWWpv.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-BCI-3XE9.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-D8HnWWpv.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -33,7 +33,7 @@ declare class DocxZipper {
33
33
  /**
34
34
  * Update [Content_Types].xml with extensions of new Image annotations
35
35
  */
36
- updateContentTypes(docx: any, media: any, fromJson: any): Promise<any>;
36
+ updateContentTypes(docx: any, media: any, fromJson: any, updatedDocs?: {}): Promise<any>;
37
37
  unzip(file: any): Promise<any>;
38
38
  updateZip({ docx, updatedDocs, originalDocxFile, media, fonts, isHeadless }: {
39
39
  docx: any;
@@ -103,6 +103,7 @@ export function translateHardBreak(params: any): {
103
103
  };
104
104
  }[];
105
105
  };
106
+ export function ensureSectionLayoutDefaults(sectPr: any, converter: any): any;
106
107
  export function isLineBreakOnlyRun(node: any): any;
107
108
  export class DocxExporter {
108
109
  constructor(converter: any);
@@ -0,0 +1,24 @@
1
+ export const DEFAULT_PAGE_WIDTH_TWIPS: 12240;
2
+ export const DEFAULT_PAGE_MARGIN_TWIPS: 1440;
3
+ export const DEFAULT_CONTENT_WIDTH_TWIPS: number;
4
+ export const MIN_COLUMN_WIDTH_TWIPS: number;
5
+ export function pctToPercent(value: any): number;
6
+ export function resolveContentWidthTwips(): number;
7
+ export function resolveMeasurementWidthPx(measurement: any): number;
8
+ export function countColumnsInRow(row: any): any;
9
+ export function buildFallbackGridForTable({ params, rows, tableWidth, tableWidthMeasurement }: {
10
+ params: Partial<import("@translator").SCDecoderConfig>;
11
+ rows: any[];
12
+ tableWidth?: {
13
+ width?: number | null;
14
+ };
15
+ tableWidthMeasurement?: {
16
+ value?: number;
17
+ type?: string;
18
+ };
19
+ }): {
20
+ grid: Array<{
21
+ col: number;
22
+ }>;
23
+ columnWidths: number[];
24
+ } | null;
@@ -4,6 +4,7 @@
4
4
  * @property {boolean} focused - Whether editor is focused
5
5
  * @property {Object|null} preservedSelection - Stored selection
6
6
  * @property {boolean} showVisualSelection - Whether to show selection decoration
7
+ * @property {boolean} skipFocusReset - Whether to skip clearing selection on next focus
7
8
  */
8
9
  /**
9
10
  * Configuration options for CustomSelection
@@ -44,6 +45,10 @@ export type SelectionState = {
44
45
  * - Whether to show selection decoration
45
46
  */
46
47
  showVisualSelection: boolean;
48
+ /**
49
+ * - Whether to skip clearing selection on next focus
50
+ */
51
+ skipFocusReset: boolean;
47
52
  };
48
53
  /**
49
54
  * Configuration options for CustomSelection
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, b2 as translator$q, b3 as translator$r, b4 as translator$s, b5 as translator$t, b6 as translator$u, b7 as translator$v, b8 as translator$w, b9 as translator$x, ba as translator$y, bb as translator$z, bc as translator$A, bd as translator$B, be as translator$C, bf as translator$D, bg as translator$E, bh as translator$F, bi as translator$G, bj as translator$H, bk as translator$I, bl as translator$J, bm as translator$K, bn as translator$L, bo as translator$M, bp as translator$N, bq as translator$O, br as translator$P, bs as translator$Q, bt as translator$R, bu as translator$S, bv as translator$T, bw as translator$U, bx as translator$V, by as translator$W, bz as translator$X, bA as translator$Y, bB as translator$Z, bC as translator$_, bD as translator$$, bE as translator$10, a as Plugin } from "./chunks/converter-DBwwYo1I.js";
13
- import { bF, a5, i, a2 } from "./chunks/converter-DBwwYo1I.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-B2S-zXBF.js";
15
- import { n, C, o, T, l, p, m } from "./chunks/editor-B2S-zXBF.js";
12
+ import { av as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, ay as vClickOutside, H as findParentNode, az as getActiveFormatting, ap as isInTable, aA as readFromClipboard, aB as handleClipboardPaste, aC as getFileObject, aD as runPropertyTranslators, aE as translator, aF as translator$1, aG as translator$2, aH as translator$3, aI as translator$4, aJ as translator$5, aK as translator$6, aL as translator$7, aM as translator$8, aN as translator$9, aO as translator$a, aP as translator$b, aQ as translator$c, aR as translator$d, aS as translator$e, aT as translator$f, aU as translator$g, aV as translator$h, aW as translator$i, aX as translator$j, aY as translator$k, aZ as translator$l, a_ as translator$m, a$ as translator$n, b0 as translator$o, b1 as translator$p, b2 as translator$q, b3 as translator$r, b4 as translator$s, b5 as translator$t, b6 as translator$u, b7 as translator$v, b8 as translator$w, b9 as translator$x, ba as translator$y, bb as translator$z, bc as translator$A, bd as translator$B, be as translator$C, bf as translator$D, bg as translator$E, bh as translator$F, bi as translator$G, bj as translator$H, bk as translator$I, bl as translator$J, bm as translator$K, bn as translator$L, bo as translator$M, bp as translator$N, bq as translator$O, br as translator$P, bs as translator$Q, bt as translator$R, bu as translator$S, bv as translator$T, bw as translator$U, bx as translator$V, by as translator$W, bz as translator$X, bA as translator$Y, bB as translator$Z, bC as translator$_, bD as translator$$, bE as translator$10, a as Plugin } from "./chunks/converter-D9kK7Smo.js";
13
+ import { bF, a5, i, a2 } from "./chunks/converter-D9kK7Smo.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-Ddkz97dH.js";
15
+ import { n, C, o, T, l, p, m } from "./chunks/editor-Ddkz97dH.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BX9nPPG0.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BxjdbiUf.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-BCI-3XE9.js";
19
+ import { D } from "./chunks/docx-zipper-D8HnWWpv.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;