oasis-editor 0.0.90 → 0.0.92

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.
@@ -1,7 +1,7 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { v as visitRun, a as assertNever, c as createSignal, b as createEditorStateFromDocument, d as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, f as fontSizePxToPt, p as probeLocalFontFamilies, e as createEditorParagraphFromRuns, i as isInlineObjectRun, g as createEditorStyledRun, h as getParagraphLength, j as getParagraphText, k as getActiveZone, l as getDocumentSections, m as getActiveSectionIndex, n as getParagraphs, o as normalizeSelection, q as positionToParagraphOffset, r as paragraphOffsetToPosition, s as clampPosition, t as findParagraphIndex, u as createCollapsedSelection, w as isSelectionCollapsed, x as parseFontSizePtToPx, y as formatFontSizePt, z as createEditorParagraph, A as getBlockParagraphs, B as findParagraphTableLocation, C as buildTableCellLayout, P as PT_PER_PX, D as createEditorTableCell, E as createEditorTableRow, F as createEditorTable, G as underlineStyleToCssDecorationStyle, H as resolveImageSrc, I as listKindForTag, J as isParagraphTag, K as collectInlineRuns, L as parseParagraphStyle, M as getRunImage, N as InlineShell, O as BalloonShell, Q as DocumentShell, R as createMemo, T as buildCanvasLayoutSnapshot, U as getCaretRectFromSnapshot, V as getParagraphRectFromSnapshot, W as createComponent, X as CaretOverlay, Y as Show, Z as createRenderEffect, _ as style, $ as setAttribute, a0 as setStyleProperty, a1 as memo, a2 as template, a3 as useI18n, a4 as createEffect, a5 as insert, a6 as use, a7 as addEventListener, a8 as Dialog, a9 as delegateEvents, aa as className, ab as For, ac as UNDERLINE_STYLE_OPTIONS, ad as Tabs, ae as onMount, af as onCleanup, ag as PluginUiHost, ah as OasisEditorEditor, ai as OasisBrandMark, aj as setPreciseFontPreference, ak as setWelcomeSeen, al as enablePreciseFontMode, am as TWIPS_PER_POINT, an as PX_PER_INCH, ao as TWIPS_PER_INCH, ap as resolveEffectiveParagraphStyle, aq as resolveEffectiveTextStyleForParagraph, ar as EMU_PER_PX, as as EMU_PER_PT, at as getRunFootnoteReference, au as getRunEndnoteReference, av as iterateFootnoteReferenceRuns, aw as iterateEndnoteReferenceRuns, ax as imageContentTypeDefaults, ay as getRunFieldChar, az as getRunFieldInstruction, aA as createEditorRun, aB as JSZip, aC as imageExtensionFromMime, aD as pxToPt$1, aE as resolveFloatingObjectRect, aF as getTextBoxFloatingGeometry, aG as getPresetPathSegments, aH as projectBlocksLayout, aI as buildListLabels, aJ as getImageFloatingGeometry, aK as textStyleToFontSizePt, aL as PX_PER_POINT, aM as DEFAULT_FONT_SIZE_PX, aN as isDoubleUnderlineStyle, aO as isWavyUnderlineStyle, aP as underlineStyleLineWidthPx, aQ as underlineStyleDashArray, aR as resolveListLabel, aS as getListLabelInset, aT as getAlignedListLabelInset, aU as getParagraphBorderInsets, aV as buildSegmentTable, aW as buildCanvasTableLayout, aX as resolveCanvasTableWidth, aY as resolveFloatingTableRect, aZ as normalizeFamily, a_ as ROBOTO_FONT_FILES, a$ as loadFontAsset, b0 as OFFICE_COMPAT_FONT_FAMILIES, b1 as buildSfnt, b2 as defaultFontDecoderRegistry, b3 as SfntFontProgram, b4 as collectPdfFontFamilies, b5 as projectDocumentLayout, b6 as getPageContentWidth, b7 as getPageHeaderZoneTop, b8 as getPageBodyTop, b9 as getPageColumnRects, ba as findFootnoteReference, bb as FOOTNOTE_MARKER_GUTTER_PX, bc as resolveImporterForFile, bd as getDocumentSectionsCanonical, be as getDocumentParagraphsCanonical, bf as getDocumentParagraphs, bg as getDocumentPageSettings, bh as getTableCellContentWidthForParagraph, bi as on, bj as debounce, bk as unwrap, bl as perfTimer, bm as getRunTextBox, bn as createEditorDocument, bo as resolveResizedDimensions, bp as resolveTextBoxRenderHeight, bq as getToolbarStyleState, br as getCachedCanvasImage, bs as measureParagraphMinContentWidthPx, bt as getEditableBlocksForZone, bu as findParagraphLocation, bv as createSectionBoundaryParagraph, bw as normalizePageSettings, bx as DEFAULT_EDITOR_PAGE_SETTINGS, by as markStart, bz as markEnd, bA as getParagraphEntries, bB as getParagraphById, bC as createEditorFootnote, bD as createFootnoteReferenceRun, bE as renumberFootnotes, bF as getFootnoteDisplayMarker, bG as getHeadingLevel, bH as preciseFontModeVersion, bI as isPreciseFontModeEnabled, bJ as resolveNamedTextStyle, bK as togglePreciseFontMode, bL as nextFontSizePt, bM as previousFontSizePt, bN as fontSizePtToPx, bO as createDefaultToolbarPreset, bP as MenuRegistry, bQ as createToolbarRegistry, bR as Editor, bS as resolveCommandRef, bT as commandRefName, bU as createOasisEditorClient, bV as createEditorZoom, bW as startLongTaskObserver, bX as installGlobalReport, bY as applyStoredPreciseFontPreference, bZ as getWelcomeSeen, b_ as isLocalFontAccessSupported, b$ as EDITOR_SCROLL_PADDING_PX, c0 as Toolbar, c1 as OasisEditorLoading, c2 as I18nProvider, c3 as createTranslator, c4 as createEditorLogger, c5 as registerDomStatsSurface } from "./index-DcElQi6c.js";
4
+ import { v as visitRun, a as assertNever, c as createSignal, b as createEditorStateFromDocument, d as createInitialEditorState, S as STANDARD_FONT_SIZES_PT, f as fontSizePxToPt, p as probeLocalFontFamilies, e as createEditorParagraphFromRuns, i as isInlineObjectRun, g as createEditorStyledRun, h as getParagraphLength, j as getParagraphText, k as getActiveZone, l as getDocumentSections, m as getActiveSectionIndex, n as getParagraphs, o as normalizeSelection, q as positionToParagraphOffset, r as paragraphOffsetToPosition, s as clampPosition, t as findParagraphIndex, u as createCollapsedSelection, w as isSelectionCollapsed, x as parseFontSizePtToPx, y as formatFontSizePt, z as createEditorParagraph, A as getBlockParagraphs, B as findParagraphTableLocation, C as buildTableCellLayout, P as PT_PER_PX, D as createEditorTableCell, E as createEditorTableRow, F as createEditorTable, G as underlineStyleToCssDecorationStyle, H as resolveImageSrc, I as listKindForTag, J as isParagraphTag, K as collectInlineRuns, L as parseParagraphStyle, M as getRunImage, N as InlineShell, O as BalloonShell, Q as DocumentShell, R as createMemo, T as buildCanvasLayoutSnapshot, U as getCaretRectFromSnapshot, V as getParagraphRectFromSnapshot, W as createComponent, X as CaretOverlay, Y as Show, Z as createRenderEffect, _ as style, $ as setAttribute, a0 as setStyleProperty, a1 as memo, a2 as template, a3 as useI18n, a4 as createEffect, a5 as insert, a6 as use, a7 as addEventListener, a8 as Dialog, a9 as delegateEvents, aa as className, ab as For, ac as UNDERLINE_STYLE_OPTIONS, ad as Tabs, ae as onMount, af as onCleanup, ag as PluginUiHost, ah as OasisEditorEditor, ai as OasisBrandMark, aj as setPreciseFontPreference, ak as setWelcomeSeen, al as enablePreciseFontMode, am as TWIPS_PER_POINT, an as PX_PER_INCH, ao as TWIPS_PER_INCH, ap as resolveEffectiveParagraphStyle, aq as resolveEffectiveTextStyleForParagraph, ar as EMU_PER_PX, as as EMU_PER_PT, at as getRunFootnoteReference, au as getRunEndnoteReference, av as iterateFootnoteReferenceRuns, aw as iterateEndnoteReferenceRuns, ax as imageContentTypeDefaults, ay as getRunFieldChar, az as getRunFieldInstruction, aA as createEditorRun, aB as JSZip, aC as imageExtensionFromMime, aD as pxToPt$1, aE as resolveFloatingObjectRect, aF as getTextBoxFloatingGeometry, aG as getPresetPathSegments, aH as projectBlocksLayout, aI as buildListLabels, aJ as getImageFloatingGeometry, aK as textStyleToFontSizePt, aL as PX_PER_POINT, aM as DEFAULT_FONT_SIZE_PX, aN as isDoubleUnderlineStyle, aO as isWavyUnderlineStyle, aP as underlineStyleLineWidthPx, aQ as underlineStyleDashArray, aR as resolveListLabel, aS as getListLabelInset, aT as getAlignedListLabelInset, aU as getParagraphBorderInsets, aV as buildSegmentTable, aW as buildCanvasTableLayout, aX as resolveCanvasTableWidth, aY as resolveFloatingTableRect, aZ as normalizeFamily, a_ as ROBOTO_FONT_FILES, a$ as loadFontAsset, b0 as OFFICE_COMPAT_FONT_FAMILIES, b1 as buildSfnt, b2 as defaultFontDecoderRegistry, b3 as SfntFontProgram, b4 as collectPdfFontFamilies, b5 as projectDocumentLayout, b6 as getPageContentWidth, b7 as getPageHeaderZoneTop, b8 as getPageBodyTop, b9 as getPageColumnRects, ba as findFootnoteReference, bb as FOOTNOTE_MARKER_GUTTER_PX, bc as resolveImporterForFile, bd as getDocumentSectionsCanonical, be as getDocumentParagraphsCanonical, bf as getDocumentParagraphs, bg as getDocumentPageSettings, bh as getTableCellContentWidthForParagraph, bi as on, bj as debounce, bk as unwrap, bl as perfTimer, bm as getRunTextBox, bn as createEditorDocument, bo as resolveResizedDimensions, bp as resolveTextBoxRenderHeight, bq as getToolbarStyleState, br as getCachedCanvasImage, bs as measureParagraphMinContentWidthPx, bt as getEditableBlocksForZone, bu as findParagraphLocation, bv as createSectionBoundaryParagraph, bw as normalizePageSettings, bx as DEFAULT_EDITOR_PAGE_SETTINGS, by as markStart, bz as markEnd, bA as getParagraphEntries, bB as getParagraphById, bC as createEditorFootnote, bD as createFootnoteReferenceRun, bE as renumberFootnotes, bF as getFootnoteDisplayMarker, bG as getHeadingLevel, bH as preciseFontModeVersion, bI as isPreciseFontModeEnabled, bJ as resolveNamedTextStyle, bK as togglePreciseFontMode, bL as nextFontSizePt, bM as previousFontSizePt, bN as fontSizePtToPx, bO as createDefaultToolbarPreset, bP as MenuRegistry, bQ as createToolbarRegistry, bR as Editor, bS as resolveCommandRef, bT as commandRefName, bU as createOasisEditorClient, bV as createEditorZoom, bW as startLongTaskObserver, bX as installGlobalReport, bY as applyStoredPreciseFontPreference, bZ as getWelcomeSeen, b_ as isLocalFontAccessSupported, b$ as EDITOR_SCROLL_PADDING_PX, c0 as Toolbar, c1 as OasisEditorLoading, c2 as I18nProvider, c3 as createTranslator, c4 as createEditorLogger, c5 as registerDomStatsSurface } from "./index-BQEtsRa0.js";
5
5
  function cloneStyle(style2) {
6
6
  return style2 ? { ...style2 } : void 0;
7
7
  }
@@ -30434,7 +30434,11 @@ function createEditorTableContextMenuActions(deps) {
30434
30434
  };
30435
30435
  }
30436
30436
  function createEditorChrome(deps) {
30437
- const { computeFontFamilyOptions: computeFontFamilyOptions2, computeFontSizeOptions: computeFontSizeOptions2, loadLocalFontFamilyOptions } = createEditorFontOptions({
30437
+ const {
30438
+ computeFontFamilyOptions: computeFontFamilyOptions2,
30439
+ computeFontSizeOptions: computeFontSizeOptions2,
30440
+ loadLocalFontFamilyOptions
30441
+ } = createEditorFontOptions({
30438
30442
  state: deps.state,
30439
30443
  toolbarStyleState: deps.toolbarStyleState
30440
30444
  });
@@ -33181,6 +33185,10 @@ function serializeParagraphBorders(style2) {
33181
33185
  const DEFAULT_TABLE_BORDER_COLOR = "6F6F6F";
33182
33186
  const DEFAULT_TABLE_BORDER_WIDTH_PT = 0.75;
33183
33187
  const DEFAULT_CELL_PADDING_LEFT_RIGHT_PT = 5.4;
33188
+ function serializeExtAttributes(attrs) {
33189
+ if (!attrs) return "";
33190
+ return Object.entries(attrs).map(([name, value]) => ` ${name}="${escapeXml(value)}"`).join("");
33191
+ }
33184
33192
  function serializeRevisionAttrs(revision) {
33185
33193
  const numericId = /^\d+$/.test(revision.id) ? revision.id : String(
33186
33194
  Array.from(revision.id).reduce(
@@ -33441,10 +33449,11 @@ function serializeTableRowStyleXml(style2) {
33441
33449
  if (hidden) parts.push(hidden);
33442
33450
  const header = serializeOnOffElement("tblHeader", style2.isHeader);
33443
33451
  if (header) parts.push(header);
33452
+ if (style2.align) parts.push(`<w:jc w:val="${style2.align}"/>`);
33444
33453
  return parts.length > 0 ? `<w:trPr>${parts.join("")}</w:trPr>` : "";
33445
33454
  }
33446
33455
  function serializeTableRowProperties(row) {
33447
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
33456
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
33448
33457
  const parts = [];
33449
33458
  const conditional = serializeConditionalFlags(row.conditionalStyle);
33450
33459
  if (conditional) parts.push(conditional);
@@ -33471,13 +33480,14 @@ function serializeTableRowProperties(row) {
33471
33480
  if (((_g = row.style) == null ? void 0 : _g.isHeader) ?? row.isHeader) parts.push("<w:tblHeader/>");
33472
33481
  const hidden = serializeOnOffElement("hidden", (_h = row.style) == null ? void 0 : _h.hidden);
33473
33482
  if (hidden) parts.push(hidden);
33474
- if ((_i = row.style) == null ? void 0 : _i.propertyRevision) {
33483
+ if ((_i = row.style) == null ? void 0 : _i.align) parts.push(`<w:jc w:val="${row.style.align}"/>`);
33484
+ if ((_j = row.style) == null ? void 0 : _j.propertyRevision) {
33475
33485
  const revision = row.style.propertyRevision;
33476
33486
  parts.push(
33477
33487
  `<w:trPrChange ${serializeRevisionAttrs(revision)}>${serializeTableRowStyleXml(revision.previous)}</w:trPrChange>`
33478
33488
  );
33479
33489
  }
33480
- if (((_j = row.style) == null ? void 0 : _j.revision) && row.style.revision.type !== "merge") {
33490
+ if (((_k = row.style) == null ? void 0 : _k.revision) && row.style.revision.type !== "merge") {
33481
33491
  const revision = row.style.revision;
33482
33492
  const element = revision.type === "insert" ? "ins" : "del";
33483
33493
  parts.push(`<w:${element} ${serializeRevisionAttrs(revision)}/>`);
@@ -33595,6 +33605,46 @@ function serializeTableProperties(table) {
33595
33605
  }
33596
33606
  return `<w:tblPr>${parts.join("")}</w:tblPr>`;
33597
33607
  }
33608
+ function serializeTablePropertyExceptions(exceptions, tblPrExChangeXml) {
33609
+ if (!exceptions && !tblPrExChangeXml) {
33610
+ return "";
33611
+ }
33612
+ const parts = [];
33613
+ if ((exceptions == null ? void 0 : exceptions.width) !== void 0) {
33614
+ parts.push(serializeTableWidth(exceptions.width));
33615
+ }
33616
+ if (exceptions == null ? void 0 : exceptions.align) {
33617
+ parts.push(`<w:jc w:val="${exceptions.align}"/>`);
33618
+ }
33619
+ const cellSpacingXml = serializeDocxWidthElement(
33620
+ "tblCellSpacing",
33621
+ exceptions == null ? void 0 : exceptions.cellSpacing
33622
+ );
33623
+ if (cellSpacingXml) {
33624
+ parts.push(cellSpacingXml);
33625
+ }
33626
+ const indentXml = serializeDocxWidthElement("tblInd", exceptions == null ? void 0 : exceptions.indentLeft);
33627
+ if (indentXml) {
33628
+ parts.push(indentXml);
33629
+ }
33630
+ const bordersXml = exceptions ? serializeTableBorders(exceptions) : "";
33631
+ if (bordersXml) {
33632
+ parts.push(bordersXml);
33633
+ }
33634
+ if (exceptions == null ? void 0 : exceptions.layout) {
33635
+ parts.push(`<w:tblLayout w:type="${exceptions.layout}"/>`);
33636
+ }
33637
+ const marginsXml = serializeTableDefaultCellMargins(
33638
+ exceptions == null ? void 0 : exceptions.defaultCellMargins
33639
+ );
33640
+ if (marginsXml) {
33641
+ parts.push(marginsXml);
33642
+ }
33643
+ if (tblPrExChangeXml) {
33644
+ parts.push(tblPrExChangeXml);
33645
+ }
33646
+ return parts.length > 0 ? `<w:tblPrEx>${parts.join("")}</w:tblPrEx>` : "";
33647
+ }
33598
33648
  function serializeTableXml(table, serializeParagraphXml2) {
33599
33649
  const tableLayout = buildTableCellLayout(table);
33600
33650
  const tableEntriesByKey = new Map(
@@ -33618,9 +33668,9 @@ function serializeTableXml(table, serializeParagraphXml2) {
33618
33668
  ];
33619
33669
  const paragraphsXml = paragraphs.map((paragraph) => serializeParagraphXml2(paragraph, cell)).join("");
33620
33670
  const contentXml = cell.vMerge === "continue" ? "<w:p/>" : paragraphsXml;
33621
- return `<w:tc>${serializeTableCellProperties(cell, fallbackWidthPt)}${contentXml}</w:tc>`;
33671
+ return `<w:tc${serializeExtAttributes(cell.extAttributes)}>${serializeTableCellProperties(cell, fallbackWidthPt)}${contentXml}</w:tc>`;
33622
33672
  }).join("");
33623
- return `<w:tr>${row.tblPrExXml ?? ""}${serializeTableRowProperties(row)}${cellsXml}</w:tr>`;
33673
+ return `<w:tr${serializeExtAttributes(row.extAttributes)}>${serializeTablePropertyExceptions(row.propertyExceptions, row.tblPrExChangeXml)}${serializeTableRowProperties(row)}${cellsXml}</w:tr>`;
33624
33674
  }).join("");
33625
33675
  const gridXml = table.gridCols ? `<w:tblGrid>${table.gridCols.map((width) => `<w:gridCol w:w="${pointsToTwips(width) ?? 0}"/>`).join("")}${table.gridRevision ? `<w:tblGridChange ${serializeRevisionAttrs(table.gridRevision)}><w:tblGrid>${table.gridRevision.previous.map((width) => `<w:gridCol w:w="${pointsToTwips(width) ?? 0}"/>`).join("")}</w:tblGrid></w:tblGridChange>` : ""}</w:tblGrid>` : "";
33626
33676
  return `<w:tbl>${serializeTableProperties(table)}${gridXml}${rowsXml}</w:tbl>`;
@@ -34806,31 +34856,17 @@ const CONDITIONAL_TYPE_ORDER = [
34806
34856
  "seCell"
34807
34857
  ];
34808
34858
  function serializeConditionalTcPr(cond) {
34809
- if (cond.cellStyle) {
34810
- return serializeTableCellStyleXml(cond.cellStyle);
34811
- }
34812
- const parts = [];
34813
- if (cond.borders) {
34814
- const b = cond.borders;
34815
- const edges = [
34816
- ["top", b.borderTop],
34817
- ["left", b.borderLeft],
34818
- ["bottom", b.borderBottom],
34819
- ["right", b.borderRight]
34820
- ];
34821
- const borderXml = edges.filter(
34822
- (entry) => entry[1] != null
34823
- ).map(([name, border]) => `<w:${name} ${serializeDocxBorderAttrs(border)}`).join("");
34824
- if (borderXml) {
34825
- parts.push(`<w:tcBorders>${borderXml}</w:tcBorders>`);
34826
- }
34827
- }
34828
- if (cond.shading) {
34829
- parts.push(
34830
- `<w:shd w:val="clear" w:color="auto" w:fill="${normalizeDocxColor(cond.shading, "FFFFFF")}"/>`
34831
- );
34832
- }
34833
- return parts.length > 0 ? `<w:tcPr>${parts.join("")}</w:tcPr>` : "";
34859
+ const cellStyle = {
34860
+ ...cond.borders ? {
34861
+ ...cond.borders.borderTop ? { borderTop: cond.borders.borderTop } : {},
34862
+ ...cond.borders.borderLeft ? { borderLeft: cond.borders.borderLeft } : {},
34863
+ ...cond.borders.borderBottom ? { borderBottom: cond.borders.borderBottom } : {},
34864
+ ...cond.borders.borderRight ? { borderRight: cond.borders.borderRight } : {}
34865
+ } : {},
34866
+ ...cond.shading ? { shading: cond.shading } : {},
34867
+ ...cond.cellStyle
34868
+ };
34869
+ return Object.keys(cellStyle).length > 0 ? serializeTableCellStyleXml(cellStyle) : "";
34834
34870
  }
34835
34871
  function serializeWidthElement(name, value) {
34836
34872
  if (typeof value === "number") {
@@ -35029,12 +35065,27 @@ function serializeNoteSettings(tagName, settings) {
35029
35065
  }
35030
35066
  return parts.length > 0 ? `<w:${tagName}>${parts.join("")}</w:${tagName}>` : null;
35031
35067
  }
35032
- function buildSettingsXml(hasEvenAndOddHeaders, defaultTabStop, footnoteSettings, endnoteSettings) {
35068
+ function buildSettingsXml(hasEvenAndOddHeaders, defaultTabStop, footnoteSettings, endnoteSettings, allowSpaceOfSameStyleInTable, hyphenation) {
35033
35069
  const parts = [];
35034
35070
  const defaultTabStopTwips = pointsToTwips(defaultTabStop);
35035
35071
  if (defaultTabStopTwips !== null) {
35036
35072
  parts.push(`<w:defaultTabStop w:val="${defaultTabStopTwips}"/>`);
35037
35073
  }
35074
+ if (hyphenation == null ? void 0 : hyphenation.autoHyphenation) {
35075
+ parts.push("<w:autoHyphenation/>");
35076
+ }
35077
+ if ((hyphenation == null ? void 0 : hyphenation.consecutiveHyphenLimit) !== void 0 && hyphenation.consecutiveHyphenLimit >= 0) {
35078
+ parts.push(
35079
+ `<w:consecutiveHyphenLimit w:val="${hyphenation.consecutiveHyphenLimit}"/>`
35080
+ );
35081
+ }
35082
+ const hyphenationZoneTwips = pointsToTwips(hyphenation == null ? void 0 : hyphenation.hyphenationZone);
35083
+ if (hyphenationZoneTwips !== null) {
35084
+ parts.push(`<w:hyphenationZone w:val="${hyphenationZoneTwips}"/>`);
35085
+ }
35086
+ if (hyphenation == null ? void 0 : hyphenation.doNotHyphenateCaps) {
35087
+ parts.push("<w:doNotHyphenateCaps/>");
35088
+ }
35038
35089
  const footnotePr = serializeNoteSettings("footnotePr", footnoteSettings);
35039
35090
  if (footnotePr) {
35040
35091
  parts.push(footnotePr);
@@ -35046,6 +35097,9 @@ function buildSettingsXml(hasEvenAndOddHeaders, defaultTabStop, footnoteSettings
35046
35097
  if (hasEvenAndOddHeaders) {
35047
35098
  parts.push("<w:evenAndOddHeaders/>");
35048
35099
  }
35100
+ if (allowSpaceOfSameStyleInTable) {
35101
+ parts.push(`<w:compat><w:allowSpaceOfSameStyleInTable/></w:compat>`);
35102
+ }
35049
35103
  return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="${WORD_NS$1}">${parts.join("")}</w:settings>`;
35050
35104
  }
35051
35105
  function buildPartRelationshipsXml(images, hyperlinks) {
@@ -35478,7 +35532,7 @@ function buildPartContext(blocks, numberingContext, state, document2) {
35478
35532
  };
35479
35533
  }
35480
35534
  async function exportEditorDocumentToDocx(document2) {
35481
- var _a, _b, _c, _d, _e, _f;
35535
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
35482
35536
  document2 = renumberImageCaptionsInDocument(document2);
35483
35537
  const zip = new JSZip();
35484
35538
  const numberingContext = buildNumberingContext(document2);
@@ -35563,7 +35617,7 @@ async function exportEditorDocumentToDocx(document2) {
35563
35617
  return (((_a2 = section.evenPageHeader) == null ? void 0 : _a2.length) ?? 0) > 0 || (((_b2 = section.evenPageFooter) == null ? void 0 : _b2.length) ?? 0) > 0;
35564
35618
  }
35565
35619
  );
35566
- const hasDocumentSettings = hasEvenAndOddHeaders || ((_a = document2.settings) == null ? void 0 : _a.defaultTabStop) !== void 0 || ((_b = document2.footnotes) == null ? void 0 : _b.settings) !== void 0 || ((_c = document2.endnotes) == null ? void 0 : _c.settings) !== void 0;
35620
+ const hasDocumentSettings = hasEvenAndOddHeaders || ((_a = document2.settings) == null ? void 0 : _a.defaultTabStop) !== void 0 || ((_b = document2.settings) == null ? void 0 : _b.allowSpaceOfSameStyleInTable) !== void 0 || ((_c = document2.settings) == null ? void 0 : _c.autoHyphenation) !== void 0 || ((_d = document2.settings) == null ? void 0 : _d.consecutiveHyphenLimit) !== void 0 || ((_e = document2.settings) == null ? void 0 : _e.hyphenationZone) !== void 0 || ((_f = document2.settings) == null ? void 0 : _f.doNotHyphenateCaps) !== void 0 || ((_g = document2.footnotes) == null ? void 0 : _g.settings) !== void 0 || ((_h = document2.endnotes) == null ? void 0 : _h.settings) !== void 0;
35567
35621
  const allImages = [
35568
35622
  ...bodyContext.images,
35569
35623
  ...parts.flatMap((part) => part.context.images)
@@ -35645,9 +35699,16 @@ async function exportEditorDocumentToDocx(document2) {
35645
35699
  "word/settings.xml",
35646
35700
  buildSettingsXml(
35647
35701
  hasEvenAndOddHeaders,
35648
- (_d = document2.settings) == null ? void 0 : _d.defaultTabStop,
35649
- (_e = document2.footnotes) == null ? void 0 : _e.settings,
35650
- (_f = document2.endnotes) == null ? void 0 : _f.settings
35702
+ (_i = document2.settings) == null ? void 0 : _i.defaultTabStop,
35703
+ (_j = document2.footnotes) == null ? void 0 : _j.settings,
35704
+ (_k = document2.endnotes) == null ? void 0 : _k.settings,
35705
+ (_l = document2.settings) == null ? void 0 : _l.allowSpaceOfSameStyleInTable,
35706
+ {
35707
+ autoHyphenation: (_m = document2.settings) == null ? void 0 : _m.autoHyphenation,
35708
+ consecutiveHyphenLimit: (_n = document2.settings) == null ? void 0 : _n.consecutiveHyphenLimit,
35709
+ hyphenationZone: (_o = document2.settings) == null ? void 0 : _o.hyphenationZone,
35710
+ doNotHyphenateCaps: (_p = document2.settings) == null ? void 0 : _p.doNotHyphenateCaps
35711
+ }
35651
35712
  )
35652
35713
  );
35653
35714
  }
@@ -36562,6 +36623,12 @@ async function drawFragmentText(writer, pageIndex, paragraph, line, fragment, do
36562
36623
  if (chunkText.length === 0) continue;
36563
36624
  emitChunk(originX + chunk[0].left, chunkText);
36564
36625
  }
36626
+ if (line.trailingHyphen && fragment.endOffset >= line.endOffset) {
36627
+ const endSlot = line.slots.find((slot) => slot.offset === line.endOffset) ?? line.slots[line.slots.length - 1];
36628
+ if (endSlot) {
36629
+ emitChunk(originX + endSlot.left, "-");
36630
+ }
36631
+ }
36565
36632
  if (styles.underline) {
36566
36633
  drawFragmentDecoration(
36567
36634
  writer,
@@ -44972,7 +45039,9 @@ function createEditorTextDrag(deps) {
44972
45039
  current,
44973
45040
  (temp) => moveOrCopySelectionToPosition(temp, destination, { copy })
44974
45041
  ),
44975
- { mergeKey: copy ? MERGE_KEYS.copyTextByDrag : MERGE_KEYS.moveTextByDrag }
45042
+ {
45043
+ mergeKey: copy ? MERGE_KEYS.copyTextByDrag : MERGE_KEYS.moveTextByDrag
45044
+ }
44976
45045
  );
44977
45046
  (_b = deps.logger) == null ? void 0 : _b.info("text-drag:apply", {
44978
45047
  mode: copy ? "copy" : "move",
@@ -47346,7 +47415,12 @@ function collectTocHeadings(state, maxLevel = DEFAULT_TOC_MAX_LEVEL) {
47346
47415
  function makeRun(partial) {
47347
47416
  const id = createEditorRun(partial.text).id;
47348
47417
  if (partial.fieldChar) {
47349
- return { id, text: partial.text, kind: "fieldChar", fieldChar: partial.fieldChar };
47418
+ return {
47419
+ id,
47420
+ text: partial.text,
47421
+ kind: "fieldChar",
47422
+ fieldChar: partial.fieldChar
47423
+ };
47350
47424
  }
47351
47425
  if (partial.fieldInstruction !== void 0) {
47352
47426
  return {