oasis-editor 0.0.101 → 0.0.103
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/dist/{OasisEditorApp-B421ezvO.js → OasisEditorApp-CLzJ9zyp.js} +46 -16
- package/dist/assets/{importDocxWorker-DkjxuxwM.js → importDocxWorker-thqRCD9m.js} +1 -1
- package/dist/core/model/index.d.ts +1 -1
- package/dist/core/model/types/document.d.ts +27 -0
- package/dist/export/docx/docxPackageXml.d.ts +9 -3
- package/dist/import/docx/fontTable.d.ts +13 -0
- package/dist/import/docx/paragraphStyle.d.ts +2 -1
- package/dist/import/docx/styleUtils.d.ts +2 -1
- package/dist/import/docx/tableProperties.d.ts +2 -1
- package/dist/{index-BPpHyg6q.js → index-DLL7O0m4.js} +95 -26
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +4 -4
- package/package.json +1 -1
|
@@ -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 resolveOpenTypeFeatureTags, aN as DEFAULT_FONT_SIZE_PX, aO as isDoubleUnderlineStyle, aP as isWavyUnderlineStyle, aQ as underlineStyleLineWidthPx, aR as underlineStyleDashArray, aS as resolveListLabel, aT as getListLabelInset, aU as getAlignedListLabelInset, aV as getParagraphBorderInsets, aW as buildSegmentTable, aX as buildCanvasTableLayout, aY as resolveCanvasTableWidth, aZ as resolveFloatingTableRect, a_ as normalizeFamily, a$ as ROBOTO_FONT_FILES, b0 as loadFontAsset, b1 as OFFICE_COMPAT_FONT_FAMILIES, b2 as BinaryReader, b3 as buildSfnt, b4 as defaultFontDecoderRegistry, b5 as SfntFontProgram, b6 as collectPdfFontFamilies, b7 as projectDocumentLayout, b8 as getPageContentWidth, b9 as getPageHeaderZoneTop, ba as getPageBodyTop, bb as getPageColumnRects, bc as findFootnoteReference, bd as FOOTNOTE_MARKER_GUTTER_PX, be as resolveImporterForFile, bf as getDocumentSectionsCanonical, bg as getDocumentParagraphsCanonical, bh as getDocumentParagraphs, bi as getDocumentPageSettings, bj as getTableCellContentWidthForParagraph, bk as on, bl as debounce, bm as unwrap, bn as perfTimer, bo as getRunTextBox, bp as createEditorDocument, bq as resolveResizedDimensions, br as resolveTextBoxRenderHeight, bs as getToolbarStyleState, bt as getCachedCanvasImage, bu as measureParagraphMinContentWidthPx, bv as getEditableBlocksForZone, bw as findParagraphLocation, bx as createSectionBoundaryParagraph, by as normalizePageSettings, bz as DEFAULT_EDITOR_PAGE_SETTINGS, bA as markStart, bB as markEnd, bC as getParagraphEntries, bD as getParagraphById, bE as createEditorFootnote, bF as createFootnoteReferenceRun, bG as renumberFootnotes, bH as getFootnoteDisplayMarker, bI as getHeadingLevel, bJ as preciseFontModeVersion, bK as isPreciseFontModeEnabled, bL as resolveNamedTextStyle, bM as togglePreciseFontMode, bN as nextFontSizePt, bO as previousFontSizePt, bP as fontSizePtToPx, bQ as createDefaultToolbarPreset, bR as MenuRegistry, bS as createToolbarRegistry, bT as Editor, bU as resolveCommandRef, bV as commandRefName, bW as createOasisEditorClient, bX as createEditorZoom, bY as startLongTaskObserver, bZ as installGlobalReport, b_ as applyStoredPreciseFontPreference, b$ as getWelcomeSeen, c0 as isLocalFontAccessSupported, c1 as EDITOR_SCROLL_PADDING_PX, c2 as Toolbar, c3 as OasisEditorLoading, c4 as I18nProvider, c5 as createTranslator, c6 as createEditorLogger, c7 as registerDomStatsSurface } from "./index-
|
|
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 resolveOpenTypeFeatureTags, aN as DEFAULT_FONT_SIZE_PX, aO as isDoubleUnderlineStyle, aP as isWavyUnderlineStyle, aQ as underlineStyleLineWidthPx, aR as underlineStyleDashArray, aS as resolveListLabel, aT as getListLabelInset, aU as getAlignedListLabelInset, aV as getParagraphBorderInsets, aW as buildSegmentTable, aX as buildCanvasTableLayout, aY as resolveCanvasTableWidth, aZ as resolveFloatingTableRect, a_ as normalizeFamily, a$ as ROBOTO_FONT_FILES, b0 as loadFontAsset, b1 as OFFICE_COMPAT_FONT_FAMILIES, b2 as BinaryReader, b3 as buildSfnt, b4 as defaultFontDecoderRegistry, b5 as SfntFontProgram, b6 as collectPdfFontFamilies, b7 as projectDocumentLayout, b8 as getPageContentWidth, b9 as getPageHeaderZoneTop, ba as getPageBodyTop, bb as getPageColumnRects, bc as findFootnoteReference, bd as FOOTNOTE_MARKER_GUTTER_PX, be as resolveImporterForFile, bf as getDocumentSectionsCanonical, bg as getDocumentParagraphsCanonical, bh as getDocumentParagraphs, bi as getDocumentPageSettings, bj as getTableCellContentWidthForParagraph, bk as on, bl as debounce, bm as unwrap, bn as perfTimer, bo as getRunTextBox, bp as createEditorDocument, bq as resolveResizedDimensions, br as resolveTextBoxRenderHeight, bs as getToolbarStyleState, bt as getCachedCanvasImage, bu as measureParagraphMinContentWidthPx, bv as getEditableBlocksForZone, bw as findParagraphLocation, bx as createSectionBoundaryParagraph, by as normalizePageSettings, bz as DEFAULT_EDITOR_PAGE_SETTINGS, bA as markStart, bB as markEnd, bC as getParagraphEntries, bD as getParagraphById, bE as createEditorFootnote, bF as createFootnoteReferenceRun, bG as renumberFootnotes, bH as getFootnoteDisplayMarker, bI as getHeadingLevel, bJ as preciseFontModeVersion, bK as isPreciseFontModeEnabled, bL as resolveNamedTextStyle, bM as togglePreciseFontMode, bN as nextFontSizePt, bO as previousFontSizePt, bP as fontSizePtToPx, bQ as createDefaultToolbarPreset, bR as MenuRegistry, bS as createToolbarRegistry, bT as Editor, bU as resolveCommandRef, bV as commandRefName, bW as createOasisEditorClient, bX as createEditorZoom, bY as startLongTaskObserver, bZ as installGlobalReport, b_ as applyStoredPreciseFontPreference, b$ as getWelcomeSeen, c0 as isLocalFontAccessSupported, c1 as EDITOR_SCROLL_PADDING_PX, c2 as Toolbar, c3 as OasisEditorLoading, c4 as I18nProvider, c5 as createTranslator, c6 as createEditorLogger, c7 as registerDomStatsSurface } from "./index-DLL7O0m4.js";
|
|
5
5
|
function cloneStyle(style2) {
|
|
6
6
|
return style2 ? { ...style2 } : void 0;
|
|
7
7
|
}
|
|
@@ -35149,19 +35149,19 @@ function buildStylesXml(styles) {
|
|
|
35149
35149
|
const styleElements = Object.values(styles).map(serializeNamedStyle).join("");
|
|
35150
35150
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="${WORD_NS}" xmlns:w14="${WORD14_NS}">${styleElements}</w:styles>`;
|
|
35151
35151
|
}
|
|
35152
|
-
function buildContentTypesXml(hasNumbering, imageExtensions, hasSettings, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments) {
|
|
35152
|
+
function buildContentTypesXml(hasNumbering, imageExtensions, hasSettings, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments, hasFontTable) {
|
|
35153
35153
|
const overrides = parts.map((part) => {
|
|
35154
35154
|
const contentType = part.kind === "header" ? "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml" : "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml";
|
|
35155
35155
|
return `<Override PartName="/word/${part.path}" ContentType="${contentType}"/>`;
|
|
35156
35156
|
}).join("");
|
|
35157
35157
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>${imageContentTypeDefaults(
|
|
35158
35158
|
imageExtensions
|
|
35159
|
-
)}<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>${hasStyles ? '<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>' : ""}${hasNumbering ? '<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>' : ""}${hasSettings ? '<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>' : ""}${hasFootnotes ? '<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>' : ""}${hasEndnotes ? '<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>' : ""}${hasComments ? '<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/>' : ""}${overrides}</Types>`;
|
|
35159
|
+
)}<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>${hasStyles ? '<Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>' : ""}${hasNumbering ? '<Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>' : ""}${hasSettings ? '<Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/>' : ""}${hasFootnotes ? '<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>' : ""}${hasEndnotes ? '<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>' : ""}${hasComments ? '<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/><Override PartName="/word/commentsExtended.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml"/>' : ""}${hasFontTable ? '<Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/>' : ""}${overrides}</Types>`;
|
|
35160
35160
|
}
|
|
35161
35161
|
function buildRootRelationshipsXml() {
|
|
35162
35162
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${PACKAGE_REL_NS}"><Relationship Id="rId1" Type="${OFFICE_REL_NS}/officeDocument" Target="word/document.xml"/></Relationships>`;
|
|
35163
35163
|
}
|
|
35164
|
-
function buildDocumentRelationshipsXml(hasNumbering, hasSettings, images, hyperlinks, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments) {
|
|
35164
|
+
function buildDocumentRelationshipsXml(hasNumbering, hasSettings, images, hyperlinks, parts, hasFootnotes, hasEndnotes, hasStyles, hasComments, hasFontTable) {
|
|
35165
35165
|
let rels = "";
|
|
35166
35166
|
if (hasStyles)
|
|
35167
35167
|
rels += `<Relationship Id="rIdStyles" Type="${OFFICE_REL_NS}/styles" Target="styles.xml"/>`;
|
|
@@ -35190,8 +35190,32 @@ function buildDocumentRelationshipsXml(hasNumbering, hasSettings, images, hyperl
|
|
|
35190
35190
|
rels += `<Relationship Id="rIdComments" Type="${OFFICE_REL_NS}/comments" Target="comments.xml"/>`;
|
|
35191
35191
|
rels += `<Relationship Id="rIdCommentsExtended" Type="http://schemas.microsoft.com/office/2011/relationships/commentsExtended" Target="commentsExtended.xml"/>`;
|
|
35192
35192
|
}
|
|
35193
|
+
if (hasFontTable) {
|
|
35194
|
+
rels += `<Relationship Id="rIdFontTable" Type="${OFFICE_REL_NS}/fontTable" Target="fontTable.xml"/>`;
|
|
35195
|
+
}
|
|
35193
35196
|
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="${PACKAGE_REL_NS}">${rels}</Relationships>`;
|
|
35194
35197
|
}
|
|
35198
|
+
function buildFontTableXml(fonts) {
|
|
35199
|
+
const fontXml = fonts.map((font) => {
|
|
35200
|
+
const children = [];
|
|
35201
|
+
if (font.altName)
|
|
35202
|
+
children.push(`<w:altName w:val="${escapeXml(font.altName)}"/>`);
|
|
35203
|
+
if (font.panose1)
|
|
35204
|
+
children.push(`<w:panose1 w:val="${escapeXml(font.panose1)}"/>`);
|
|
35205
|
+
if (font.charset)
|
|
35206
|
+
children.push(`<w:charset w:val="${escapeXml(font.charset)}"/>`);
|
|
35207
|
+
if (font.family)
|
|
35208
|
+
children.push(`<w:family w:val="${escapeXml(font.family)}"/>`);
|
|
35209
|
+
if (font.pitch)
|
|
35210
|
+
children.push(`<w:pitch w:val="${escapeXml(font.pitch)}"/>`);
|
|
35211
|
+
if (font.sig) {
|
|
35212
|
+
const attrs = Object.entries(font.sig).map(([key, value]) => `w:${key}="${escapeXml(value)}"`).join(" ");
|
|
35213
|
+
if (attrs) children.push(`<w:sig ${attrs}/>`);
|
|
35214
|
+
}
|
|
35215
|
+
return `<w:font w:name="${escapeXml(font.name)}">${children.join("")}</w:font>`;
|
|
35216
|
+
}).join("");
|
|
35217
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:fonts xmlns:w="${WORD_NS$1}">${fontXml}</w:fonts>`;
|
|
35218
|
+
}
|
|
35195
35219
|
const NOTE_NUMBER_FORMATS = {
|
|
35196
35220
|
decimal: "decimal",
|
|
35197
35221
|
lowerRoman: "lowerRoman",
|
|
@@ -35687,7 +35711,7 @@ function buildPartContext(blocks, numberingContext, state, document2) {
|
|
|
35687
35711
|
};
|
|
35688
35712
|
}
|
|
35689
35713
|
async function exportEditorDocumentToDocx(document2) {
|
|
35690
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
35714
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
35691
35715
|
document2 = renumberImageCaptionsInDocument(document2);
|
|
35692
35716
|
const zip = new JSZip();
|
|
35693
35717
|
const numberingContext = buildNumberingContext(document2);
|
|
@@ -35806,6 +35830,7 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
35806
35830
|
return (_a2 = img.target.split(".").pop()) == null ? void 0 : _a2.toLowerCase();
|
|
35807
35831
|
}).filter((ext) => Boolean(ext));
|
|
35808
35832
|
const hasStyles = document2.styles != null && Object.keys(document2.styles).length > 0;
|
|
35833
|
+
const hasFontTable = (((_i = document2.fontTable) == null ? void 0 : _i.length) ?? 0) > 0;
|
|
35809
35834
|
zip.file(
|
|
35810
35835
|
"[Content_Types].xml",
|
|
35811
35836
|
buildContentTypesXml(
|
|
@@ -35816,7 +35841,8 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
35816
35841
|
hasFootnotes,
|
|
35817
35842
|
hasEndnotes,
|
|
35818
35843
|
hasStyles,
|
|
35819
|
-
hasComments
|
|
35844
|
+
hasComments,
|
|
35845
|
+
hasFontTable
|
|
35820
35846
|
)
|
|
35821
35847
|
);
|
|
35822
35848
|
zip.file("_rels/.rels", buildRootRelationshipsXml());
|
|
@@ -35833,7 +35859,7 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
35833
35859
|
buildNumberingXml(numberingContext.definitions)
|
|
35834
35860
|
);
|
|
35835
35861
|
}
|
|
35836
|
-
if (hasStyles || hasNumbering || hasDocumentSettings || bodyContext.images.length > 0 || bodyContext.hyperlinks.length > 0 || parts.length > 0 || hasFootnotes || hasEndnotes || hasComments) {
|
|
35862
|
+
if (hasStyles || hasNumbering || hasDocumentSettings || bodyContext.images.length > 0 || bodyContext.hyperlinks.length > 0 || parts.length > 0 || hasFootnotes || hasEndnotes || hasComments || hasFontTable) {
|
|
35837
35863
|
zip.file(
|
|
35838
35864
|
"word/_rels/document.xml.rels",
|
|
35839
35865
|
buildDocumentRelationshipsXml(
|
|
@@ -35845,24 +35871,28 @@ async function exportEditorDocumentToDocx(document2) {
|
|
|
35845
35871
|
hasFootnotes,
|
|
35846
35872
|
hasEndnotes,
|
|
35847
35873
|
hasStyles,
|
|
35848
|
-
hasComments
|
|
35874
|
+
hasComments,
|
|
35875
|
+
hasFontTable
|
|
35849
35876
|
)
|
|
35850
35877
|
);
|
|
35851
35878
|
}
|
|
35879
|
+
if (hasFontTable) {
|
|
35880
|
+
zip.file("word/fontTable.xml", buildFontTableXml(document2.fontTable));
|
|
35881
|
+
}
|
|
35852
35882
|
if (hasDocumentSettings) {
|
|
35853
35883
|
zip.file(
|
|
35854
35884
|
"word/settings.xml",
|
|
35855
35885
|
buildSettingsXml(
|
|
35856
35886
|
hasEvenAndOddHeaders,
|
|
35857
|
-
(
|
|
35858
|
-
(
|
|
35859
|
-
(
|
|
35860
|
-
(
|
|
35887
|
+
(_j = document2.settings) == null ? void 0 : _j.defaultTabStop,
|
|
35888
|
+
(_k = document2.footnotes) == null ? void 0 : _k.settings,
|
|
35889
|
+
(_l = document2.endnotes) == null ? void 0 : _l.settings,
|
|
35890
|
+
(_m = document2.settings) == null ? void 0 : _m.allowSpaceOfSameStyleInTable,
|
|
35861
35891
|
{
|
|
35862
|
-
autoHyphenation: (
|
|
35863
|
-
consecutiveHyphenLimit: (
|
|
35864
|
-
hyphenationZone: (
|
|
35865
|
-
doNotHyphenateCaps: (
|
|
35892
|
+
autoHyphenation: (_n = document2.settings) == null ? void 0 : _n.autoHyphenation,
|
|
35893
|
+
consecutiveHyphenLimit: (_o = document2.settings) == null ? void 0 : _o.consecutiveHyphenLimit,
|
|
35894
|
+
hyphenationZone: (_p = document2.settings) == null ? void 0 : _p.hyphenationZone,
|
|
35895
|
+
doNotHyphenateCaps: (_q = document2.settings) == null ? void 0 : _q.doNotHyphenateCaps
|
|
35866
35896
|
}
|
|
35867
35897
|
)
|
|
35868
35898
|
);
|