@a3s-lab/office 0.27.0 → 0.29.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 +41 -1
- package/dist/0~1403.js +1 -1
- package/dist/0~4980.js +1 -1
- package/dist/0~5093.js +164 -5
- package/dist/0~7043.js +241 -241
- package/dist/0~7048.js +1 -1
- package/dist/0~7614.js +1 -1
- package/dist/0~document-editor.js +626 -12
- package/dist/0~presentation-editor.js +1 -1
- package/dist/0~spreadsheet-editor.js +1 -2
- package/dist/0~work-docx-export.js +396 -20
- package/dist/0~work-docx-import.js +7 -3
- package/dist/0~work-office-diagnostics.js +98 -4
- package/dist/0~work-pptx-export.js +1 -1
- package/dist/0~work-pptx-import.js +1 -1
- package/dist/0~work-presentation-charts.js +1 -1
- package/dist/1544.js +1 -1
- package/dist/4104.js +2 -2
- package/dist/4121.js +1510 -0
- package/dist/6282.js +220 -682
- package/dist/8715.js +1 -1
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/features/work/editors/document-command-catalog.d.ts +9 -0
- package/dist/internal/features/work/editors/document-font-dialog-model.d.ts +33 -2
- package/dist/internal/features/work/editors/document-font-dialog-run-border-model.d.ts +24 -0
- package/dist/internal/features/work/editors/document-font-dialog-run-border-section.d.ts +10 -0
- package/dist/internal/features/work/work-document-character-formatting.d.ts +4 -0
- package/dist/internal/features/work/work-document-format-changes.d.ts +5 -0
- package/dist/internal/features/work/work-document-legacy-text-effects.d.ts +27 -0
- package/dist/internal/features/work/work-document-run-border.d.ts +11 -0
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +5 -0
- package/dist/internal/features/work/work-docx-hidden-text-export.d.ts +1 -0
- package/dist/internal/features/work/work-docx-legacy-text-effects-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-legacy-text-effects-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-legacy-text-effects.d.ts +12 -0
- package/dist/internal/features/work/work-docx-run-border-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-run-border-export.d.ts +17 -0
- package/dist/internal/features/work/work-docx-run-border.d.ts +20 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +6 -0
- package/dist/internal/features/work/work-docx-run-property-order.d.ts +2 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/styles.css +72 -0
- package/docs/latest/en/browser-editor-architecture.md +36 -0
- package/package.json +7 -1
- package/dist/5184.js +0 -649
- package/dist/9424.js +0 -16
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ baseline rather than one specific release.
|
|
|
110
110
|
|
|
111
111
|
| Capability | A3S Office today | Traditional Office baseline |
|
|
112
112
|
| --- | --- | --- |
|
|
113
|
-
| Text, paragraphs, lists, and styles | **Supported** — structured editing, independent native ASCII, high ANSI, East Asian, and complex-script font slots with direct/theme identity, native all-caps and small-caps effects, exact DOCX character scale plus signed spacing, half-point kerning thresholds, all five native East Asian emphasis marks, native hidden text with explicit visible resets, and baseline position in one advanced font dialog, all 18 native DOCX underline values with direct or theme color identity, independent native single/double strikethrough with explicit resets, formatting revisions, clipboard, format painter, and undo/redo | Mature authoring with a broader long-tail style and typography catalog |
|
|
113
|
+
| Text, paragraphs, lists, and styles | **Supported** — structured editing, independent native ASCII, high ANSI, East Asian, and complex-script font slots with direct/theme identity, native all-caps and small-caps effects, exact DOCX character scale plus signed spacing, half-point kerning thresholds, all five native East Asian emphasis marks, native hidden text with explicit visible resets, native character borders with 25 visible line styles plus `nil` and `none`, direct or theme color, width, spacing, shadow, and frame semantics, four independent native outline/shadow/emboss/imprint effects with conflict-safe authoring, and baseline position in one advanced font dialog, all 18 native DOCX underline values with direct or theme color identity, independent native single/double strikethrough with explicit resets, formatting revisions, clipboard, format painter, and undo/redo | Mature authoring with a broader long-tail style and typography catalog |
|
|
114
114
|
| Page layout and rendering | **Partial** — sections, margins, page size, columns, headers/footers, fields, and live pagination | Desktop-grade pagination, print layout, and vector output |
|
|
115
115
|
| Tables, pictures, and equations | **Partial** — rich table geometry, floating pictures, crop/wrap, and structured OMML | Broader drawings, text boxes, charts, WordArt, and SmartArt |
|
|
116
116
|
| Comments, revisions, and collaboration | **Partial** — comments, suggestions, text/format revisions, decisions, Yjs presence, and host relay contracts | Full revision families plus integrated sharing and review services |
|
|
@@ -719,6 +719,44 @@ it. Unchanged comment XML remains source-preserved without claiming rich
|
|
|
719
719
|
comment-text editing, and affected paragraphs use browser-authoritative line
|
|
720
720
|
measurement so invisible glyphs never distort Worker/WASM pagination.
|
|
721
721
|
|
|
722
|
+
Native Writer outline, shadow, emboss, and imprint retain four independent
|
|
723
|
+
nullable TextStyle properties backed by exact `w:outline`, `w:shadow`,
|
|
724
|
+
`w:emboss`, and `w:imprint` values. Missing properties continue style
|
|
725
|
+
inheritance and explicit false values remain native resets. Outline and shadow
|
|
726
|
+
can be enabled together; emboss and imprint are mutually exclusive with every
|
|
727
|
+
other enabled effect. The shared `Cmd/Ctrl+D` dialog exposes four independently
|
|
728
|
+
mixed checkboxes, clears conflicts in the same transaction, and creates one
|
|
729
|
+
Undo record. Body text, page chrome, notes, Format Painter, formatting
|
|
730
|
+
revisions, strict/transitional import, exact export, and reopen share the same
|
|
731
|
+
model. CSS provides bounded browser and PDF paint projections while eligible
|
|
732
|
+
paragraphs remain on the Worker/WASM layout path. The Playground's **文字效果**
|
|
733
|
+
template demonstrates all four effects and the conflict-safe transition.
|
|
734
|
+
|
|
735
|
+
Native Writer character borders retain all 25 visible WordprocessingML
|
|
736
|
+
`w:bdr` line styles plus explicit `nil` and `none` resets. The typed model keeps
|
|
737
|
+
direct or theme colors with tint and shade, widths from 2 through 96
|
|
738
|
+
eighth-points, text spacing from 0 through 31 points, and explicit shadow and
|
|
739
|
+
frame flags. The Home Font group exposes a direct Character Border toggle, and
|
|
740
|
+
the shared `Cmd/Ctrl+D` Advanced Font Settings dialog distinguishes mixed,
|
|
741
|
+
Follow style, explicit no-border, and editable border states. Line style,
|
|
742
|
+
color, width, spacing, shadow, and frame changes apply through one transaction
|
|
743
|
+
and one Undo record; Format Painter uses the same mark. Traditional Office
|
|
744
|
+
defines no dedicated shortcut for this command, so A3S Office does not invent
|
|
745
|
+
one.
|
|
746
|
+
|
|
747
|
+
Document defaults, paragraph and character styles, body text, headers,
|
|
748
|
+
footers, footnotes, endnotes, formatting revisions, strict or transitional
|
|
749
|
+
DOCX import, exact export, and reopen share the model. Malformed, duplicated,
|
|
750
|
+
misplaced, namespace-spoofed, child- or text-bearing, extra-attribute,
|
|
751
|
+
art-style, out-of-range, and unresolved-theme input fails closed. The DOM uses
|
|
752
|
+
`data-office-run-border`; CSS renders every edge with bounded line-style,
|
|
753
|
+
padding, shadow, and cloned-fragment projections. Visible character borders use
|
|
754
|
+
browser-authoritative line measurement because border and padding alter inline
|
|
755
|
+
geometry, while explicit `nil` and `none` remain eligible for Worker/WASM
|
|
756
|
+
layout. Browser and PDF paint are bounded visual approximations; the OOXML
|
|
757
|
+
semantics remain exact. The Playground's **字符边框** template exercises the
|
|
758
|
+
complete authoring and one-step Undo path.
|
|
759
|
+
|
|
722
760
|
Supported native OMML equations now survive as bounded structured objects in
|
|
723
761
|
the document body, headers, footers, footnotes, and endnotes. Inline and display
|
|
724
762
|
math, Unicode runs with literal/normal-text semantics, math script/style,
|
|
@@ -1419,6 +1457,8 @@ without hard-coded return URLs.
|
|
|
1419
1457
|
|
|
1420
1458
|
- [Live Playground](https://a3s-lab.github.io/Office/)
|
|
1421
1459
|
- [Documentation center](https://a3s-lab.github.io/Office/docs/)
|
|
1460
|
+
- [A3S Office 0.29.0 documentation](https://a3s-lab.github.io/Office/docs/0.29.0/)
|
|
1461
|
+
- [A3S Office 0.28.0 documentation](https://a3s-lab.github.io/Office/docs/0.28.0/)
|
|
1422
1462
|
- [A3S Office 0.27.0 documentation](https://a3s-lab.github.io/Office/docs/0.27.0/)
|
|
1423
1463
|
- [A3S Office 0.26.0 documentation](https://a3s-lab.github.io/Office/docs/0.26.0/)
|
|
1424
1464
|
- [A3S Office 0.25.0 documentation](https://a3s-lab.github.io/Office/docs/0.25.0/)
|
package/dist/0~1403.js
CHANGED
package/dist/0~4980.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import jszip from "jszip";
|
|
2
2
|
import { documentNoteKey } from "./6282.js";
|
|
3
|
-
import { directChild, xmlNamespacePrefix, attribute, parseXml } from "./
|
|
3
|
+
import { directChild, xmlNamespacePrefix, attribute, parseXml } from "./4121.js";
|
|
4
4
|
import { DEFAULT_DOCUMENT_PAGE_COLOR, normalizeDocumentPageColor } from "./0~work-document-page-color.js";
|
|
5
5
|
const MAX_NATIVE_ID = 2147483647;
|
|
6
6
|
const MIN_NATIVE_COMMENT_ID = -2147483648;
|
package/dist/0~5093.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DOCUMENT_PARAGRAPH_BORDER_STYLES, normalizeDocumentParagraphBorders as work_document_paragraph_borders_normalizeDocumentParagraphBorders, DOCUMENT_PARAGRAPH_BORDER_EDGES, documentRunBorderDomAttributes, normalizeDocumentParagraphBorder, normalizeDocumentRunBorder, serializeDocumentRunBorder, descendants, attribute as work_ooxml_package_attribute, serializeDocxThemeReference, directChildren as work_ooxml_package_directChildren, xmlNamespacePrefix, documentParagraphBordersDomAttributes, directChild, childPath } from "./4121.js";
|
|
2
2
|
import { docxThemeFont, XML_NAMESPACE as work_docx_settings_xml_XML_NAMESPACE, XMLNS_NAMESPACE as work_docx_settings_xml_XMLNS_NAMESPACE, STRICT_WORDPROCESSING_NAMESPACE, docxCharacterSpacingTwipsFromProperties, parseBoundedDocxInteger, xmlAttributeLocalName, docxCharacterScalePercentFromProperties, resolveDocxEmphasisMark, docxCharacterPositionHalfPointsFromProperties, docxThemeColor, parseDocxParagraphDefaultCollapsed, resolveDocxKerningThresholdHalfPoints, resolveDocxThemeResolver as work_docx_theme_resolveDocxThemeResolver, DOCX_WORDPROCESSING_NAMESPACES, xmlAttributeNamespace, parseDocxTwipsMeasure } from "./0~7043.js";
|
|
3
|
-
import { normalizeDocumentEmphasisMark,
|
|
3
|
+
import { normalizeDocumentEmphasisMark, documentWordLineHeightFactor, normalizeDocumentPageBorders, documentCharacterPositionDomAttributes, DOCUMENT_PAGE_BORDER_EDGES, normalizeDocumentTabStops, documentTextCaseFromWordFlags, DOCUMENT_PARAGRAPH_SHADING_PATTERNS, documentStrikeDomAttributes, documentAutoLineHeight, documentScriptFontFallbackSlots, normalizeDocumentUnderlineColor, documentScriptFontsDomAttributes, documentKerningDomAttributes, documentCharacterScaleDomAttributes, documentParagraphShadingDomAttributes, normalizeDocumentScriptFontHint, serializeDocumentParagraphFormatting, normalizeDocumentPaperSource, documentEquationText, normalizeDocumentScriptFonts, documentLegacyTextEffectsDomAttributes, documentLegacyTextEffectsConflict, documentCharacterSpacingDomAttributes, normalizeDocumentParagraphIndent, documentScriptFontFamily, normalizeDocumentThemeFont, normalizeDocumentEquation, renderDocumentAutoLineHeight, documentUnderlineDomAttributes, normalizeDocumentUnderlineStyle, normalizeDocumentFontName, applyDocumentTextCaseStyle, documentHiddenTextDomAttributes, importedDocumentCharacterFormatting, DOCUMENT_LEGACY_TEXT_EFFECT_NAMES, createDocumentEquationElement, normalizeDocumentPageGeometry, serializeDocumentTabStops, documentEmphasisMarkDomAttributes, normalizeDocumentPageMargins, documentScriptFontSegments } from "./6282.js";
|
|
4
4
|
function docxCaptionSequenceKind(instruction) {
|
|
5
5
|
const identifier = /^\s*SEQ\s+([^\s\\]+)/i.exec(instruction)?.[1]?.toLowerCase();
|
|
6
6
|
if (!identifier) return null;
|
|
@@ -4132,6 +4132,70 @@ function resolveDocxHiddenText(propertySources) {
|
|
|
4132
4132
|
}
|
|
4133
4133
|
return hiddenText;
|
|
4134
4134
|
}
|
|
4135
|
+
const work_docx_legacy_text_effects_ON_VALUES = new Set([
|
|
4136
|
+
'1',
|
|
4137
|
+
'on',
|
|
4138
|
+
'true'
|
|
4139
|
+
]);
|
|
4140
|
+
const work_docx_legacy_text_effects_OFF_VALUES = new Set([
|
|
4141
|
+
'0',
|
|
4142
|
+
'off',
|
|
4143
|
+
'false'
|
|
4144
|
+
]);
|
|
4145
|
+
function inspectDocxLegacyTextEffects(properties) {
|
|
4146
|
+
if (!properties) return {
|
|
4147
|
+
status: 'absent'
|
|
4148
|
+
};
|
|
4149
|
+
const effects = {};
|
|
4150
|
+
let present = false;
|
|
4151
|
+
for (const name of DOCUMENT_LEGACY_TEXT_EFFECT_NAMES){
|
|
4152
|
+
const localMatches = work_ooxml_package_directChildren(properties, name);
|
|
4153
|
+
if (!localMatches.length) continue;
|
|
4154
|
+
present = true;
|
|
4155
|
+
const nativeMatches = localMatches.filter((element)=>DOCX_WORDPROCESSING_NAMESPACES.has(element.namespaceURI ?? ''));
|
|
4156
|
+
if (1 !== localMatches.length || 1 !== nativeMatches.length) return {
|
|
4157
|
+
status: 'invalid'
|
|
4158
|
+
};
|
|
4159
|
+
const value = inspectOnOffLeaf(nativeMatches[0]);
|
|
4160
|
+
if (null === value) return {
|
|
4161
|
+
status: 'invalid'
|
|
4162
|
+
};
|
|
4163
|
+
effects[name] = value;
|
|
4164
|
+
}
|
|
4165
|
+
if (!present) return {
|
|
4166
|
+
status: 'absent'
|
|
4167
|
+
};
|
|
4168
|
+
return documentLegacyTextEffectsConflict(effects) ? {
|
|
4169
|
+
status: 'invalid'
|
|
4170
|
+
} : {
|
|
4171
|
+
status: 'valid',
|
|
4172
|
+
value: effects
|
|
4173
|
+
};
|
|
4174
|
+
}
|
|
4175
|
+
function resolveDocxLegacyTextEffects(propertySources) {
|
|
4176
|
+
const effects = {};
|
|
4177
|
+
let present = false;
|
|
4178
|
+
for (const properties of propertySources){
|
|
4179
|
+
const inspection = inspectDocxLegacyTextEffects(properties);
|
|
4180
|
+
if ('invalid' === inspection.status) return;
|
|
4181
|
+
if ('valid' === inspection.status) {
|
|
4182
|
+
Object.assign(effects, inspection.value);
|
|
4183
|
+
present = true;
|
|
4184
|
+
if (documentLegacyTextEffectsConflict(effects)) return;
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
return present ? effects : void 0;
|
|
4188
|
+
}
|
|
4189
|
+
function inspectOnOffLeaf(element) {
|
|
4190
|
+
if (work_ooxml_package_directChildren(element).length || Array.from(element.childNodes).some((node)=>(node.nodeType === Node.TEXT_NODE || node.nodeType === Node.CDATA_SECTION_NODE) && Boolean(node.textContent?.trim()))) return null;
|
|
4191
|
+
const attributes = Array.from(element.attributes).filter((attribute)=>xmlAttributeNamespace(element, attribute) !== work_docx_settings_xml_XMLNS_NAMESPACE && 'xmlns' !== attribute.name && !attribute.name.startsWith('xmlns:'));
|
|
4192
|
+
if (!attributes.length) return true;
|
|
4193
|
+
if (1 !== attributes.length || 'val' !== xmlAttributeLocalName(attributes[0]) || !DOCX_WORDPROCESSING_NAMESPACES.has(xmlAttributeNamespace(element, attributes[0]) ?? '')) return null;
|
|
4194
|
+
const value = attributes[0].value;
|
|
4195
|
+
if (work_docx_legacy_text_effects_ON_VALUES.has(value)) return true;
|
|
4196
|
+
if (work_docx_legacy_text_effects_OFF_VALUES.has(value)) return false;
|
|
4197
|
+
return null;
|
|
4198
|
+
}
|
|
4135
4199
|
const MAX_STYLE_INHERITANCE_DEPTH = 64;
|
|
4136
4200
|
function createDocxParagraphStyleResolver(stylesDocument) {
|
|
4137
4201
|
if (!stylesDocument) return {
|
|
@@ -4843,6 +4907,57 @@ function textNodes(root) {
|
|
|
4843
4907
|
while(walker.nextNode())nodes.push(walker.currentNode);
|
|
4844
4908
|
return nodes;
|
|
4845
4909
|
}
|
|
4910
|
+
function inspectDocxRunBorder(properties, themeSource) {
|
|
4911
|
+
return inspectDocxRunBorderWithTheme(properties, work_docx_theme_resolveDocxThemeResolver(themeSource));
|
|
4912
|
+
}
|
|
4913
|
+
function resolveDocxRunBorder(propertySources, themeSource) {
|
|
4914
|
+
const theme = work_docx_theme_resolveDocxThemeResolver(themeSource);
|
|
4915
|
+
let border;
|
|
4916
|
+
let invalidCount = 0;
|
|
4917
|
+
let spoofedCount = 0;
|
|
4918
|
+
for (const properties of propertySources){
|
|
4919
|
+
const inspection = inspectDocxRunBorderWithTheme(properties, theme);
|
|
4920
|
+
spoofedCount += inspection.spoofedCount;
|
|
4921
|
+
if ('valid' === inspection.status) border = inspection.value;
|
|
4922
|
+
else if ('invalid' === inspection.status) {
|
|
4923
|
+
invalidCount += 1;
|
|
4924
|
+
border = {
|
|
4925
|
+
style: 'nil'
|
|
4926
|
+
};
|
|
4927
|
+
}
|
|
4928
|
+
}
|
|
4929
|
+
return {
|
|
4930
|
+
border,
|
|
4931
|
+
invalidCount,
|
|
4932
|
+
spoofedCount
|
|
4933
|
+
};
|
|
4934
|
+
}
|
|
4935
|
+
function inspectDocxRunBorderWithTheme(properties, theme) {
|
|
4936
|
+
if (!properties) return {
|
|
4937
|
+
status: 'absent',
|
|
4938
|
+
spoofedCount: 0
|
|
4939
|
+
};
|
|
4940
|
+
const matches = work_ooxml_package_directChildren(properties, 'bdr');
|
|
4941
|
+
if (!matches.length) return {
|
|
4942
|
+
status: 'absent',
|
|
4943
|
+
spoofedCount: 0
|
|
4944
|
+
};
|
|
4945
|
+
const native = matches.filter((element)=>element.namespaceURI === properties.namespaceURI);
|
|
4946
|
+
const spoofedCount = matches.length - native.length;
|
|
4947
|
+
if (1 !== matches.length || 1 !== native.length) return {
|
|
4948
|
+
status: 'invalid',
|
|
4949
|
+
spoofedCount
|
|
4950
|
+
};
|
|
4951
|
+
const parsed = normalizeDocumentRunBorder(parseDocxBorderElement(native[0], theme));
|
|
4952
|
+
return parsed ? {
|
|
4953
|
+
status: 'valid',
|
|
4954
|
+
value: parsed,
|
|
4955
|
+
spoofedCount
|
|
4956
|
+
} : {
|
|
4957
|
+
status: 'invalid',
|
|
4958
|
+
spoofedCount
|
|
4959
|
+
};
|
|
4960
|
+
}
|
|
4846
4961
|
const work_docx_paragraph_shading_import_WORD_NAMESPACE = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main';
|
|
4847
4962
|
const work_docx_paragraph_shading_import_XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
4848
4963
|
const work_docx_paragraph_shading_import_XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/';
|
|
@@ -6807,6 +6922,10 @@ const SUPPORTED_RUN_PROPERTY_CHANGE_CHILDREN = new Set([
|
|
|
6807
6922
|
'u',
|
|
6808
6923
|
'strike',
|
|
6809
6924
|
'dstrike',
|
|
6925
|
+
'outline',
|
|
6926
|
+
'shadow',
|
|
6927
|
+
'emboss',
|
|
6928
|
+
'imprint',
|
|
6810
6929
|
'caps',
|
|
6811
6930
|
'smallCaps',
|
|
6812
6931
|
'vanish',
|
|
@@ -6824,7 +6943,8 @@ const SUPPORTED_RUN_PROPERTY_CHANGE_CHILDREN = new Set([
|
|
|
6824
6943
|
'cs',
|
|
6825
6944
|
'rtl',
|
|
6826
6945
|
'em',
|
|
6827
|
-
'vertAlign'
|
|
6946
|
+
'vertAlign',
|
|
6947
|
+
'bdr'
|
|
6828
6948
|
]);
|
|
6829
6949
|
function createImportedDocxRunFormattingMarkerState(documents) {
|
|
6830
6950
|
return {
|
|
@@ -6928,6 +7048,8 @@ function resolvedRunFormatting(propertySources, theme, runText, requestedFontSlo
|
|
|
6928
7048
|
const kerningThresholdHalfPoints = resolveDocxKerningThresholdHalfPoints(propertySources);
|
|
6929
7049
|
const emphasisMark = resolveDocxEmphasisMark(propertySources);
|
|
6930
7050
|
const hiddenText = resolveDocxHiddenText(propertySources);
|
|
7051
|
+
const legacyTextEffects = resolveDocxLegacyTextEffects(propertySources);
|
|
7052
|
+
const runBorder = resolveDocxRunBorder(propertySources, theme).border;
|
|
6931
7053
|
for (const properties of propertySources){
|
|
6932
7054
|
bold = overriddenBoolean(bold, onOffProperty(properties, 'b'));
|
|
6933
7055
|
complexBold = overriddenBoolean(complexBold, onOffProperty(properties, 'bCs'));
|
|
@@ -7045,6 +7167,18 @@ function resolvedRunFormatting(propertySources, theme, runText, requestedFontSlo
|
|
|
7045
7167
|
...void 0 !== hiddenText ? {
|
|
7046
7168
|
hiddenText
|
|
7047
7169
|
} : {},
|
|
7170
|
+
...legacyTextEffects?.outline !== void 0 ? {
|
|
7171
|
+
legacyTextOutline: legacyTextEffects.outline
|
|
7172
|
+
} : {},
|
|
7173
|
+
...legacyTextEffects?.shadow !== void 0 ? {
|
|
7174
|
+
legacyTextShadow: legacyTextEffects.shadow
|
|
7175
|
+
} : {},
|
|
7176
|
+
...legacyTextEffects?.emboss !== void 0 ? {
|
|
7177
|
+
legacyTextEmboss: legacyTextEffects.emboss
|
|
7178
|
+
} : {},
|
|
7179
|
+
...legacyTextEffects?.imprint !== void 0 ? {
|
|
7180
|
+
legacyTextImprint: legacyTextEffects.imprint
|
|
7181
|
+
} : {},
|
|
7048
7182
|
...fontFamily ? {
|
|
7049
7183
|
fontFamily,
|
|
7050
7184
|
wordLineHeightFactor: documentWordLineHeightFactor(fontFamily)
|
|
@@ -7073,6 +7207,9 @@ function resolvedRunFormatting(propertySources, theme, runText, requestedFontSlo
|
|
|
7073
7207
|
} : {},
|
|
7074
7208
|
...textCase ? {
|
|
7075
7209
|
textCase
|
|
7210
|
+
} : {},
|
|
7211
|
+
...runBorder ? {
|
|
7212
|
+
runBorder
|
|
7076
7213
|
} : {}
|
|
7077
7214
|
};
|
|
7078
7215
|
}
|
|
@@ -7109,6 +7246,23 @@ function formattingMarkup(document, formatting) {
|
|
|
7109
7246
|
if (void 0 !== formatting.emphasisMark) for (const [name, value] of Object.entries(documentEmphasisMarkDomAttributes(formatting.emphasisMark)))if ('style' === name) span.style.cssText += `; ${value}`;
|
|
7110
7247
|
else span.setAttribute(name, value);
|
|
7111
7248
|
if (void 0 !== formatting.hiddenText) for (const [name, value] of Object.entries(documentHiddenTextDomAttributes(formatting.hiddenText)))span.setAttribute(name, value);
|
|
7249
|
+
if (formatting.runBorder) for (const [name, value] of Object.entries(documentRunBorderDomAttributes(formatting.runBorder)))if ('style' === name) span.style.cssText += `; ${value}`;
|
|
7250
|
+
else span.setAttribute(name, value);
|
|
7251
|
+
const legacyTextEffects = {
|
|
7252
|
+
...void 0 !== formatting.legacyTextOutline ? {
|
|
7253
|
+
outline: formatting.legacyTextOutline
|
|
7254
|
+
} : {},
|
|
7255
|
+
...void 0 !== formatting.legacyTextShadow ? {
|
|
7256
|
+
shadow: formatting.legacyTextShadow
|
|
7257
|
+
} : {},
|
|
7258
|
+
...void 0 !== formatting.legacyTextEmboss ? {
|
|
7259
|
+
emboss: formatting.legacyTextEmboss
|
|
7260
|
+
} : {},
|
|
7261
|
+
...void 0 !== formatting.legacyTextImprint ? {
|
|
7262
|
+
imprint: formatting.legacyTextImprint
|
|
7263
|
+
} : {}
|
|
7264
|
+
};
|
|
7265
|
+
for (const [name, value] of Object.entries(documentLegacyTextEffectsDomAttributes(legacyTextEffects)))span.setAttribute(name, value);
|
|
7112
7266
|
if (void 0 !== formatting.wordLineHeightFactor) {
|
|
7113
7267
|
const factor = formatLineHeightFactor(formatting.wordLineHeightFactor);
|
|
7114
7268
|
span.dataset.officeWordLineHeightFactor = factor;
|
|
@@ -7195,7 +7349,12 @@ function importedRunFormattingChange(runProperties, paragraphProperties, styles,
|
|
|
7195
7349
|
themeFill: serializeDocxThemeReference(beforeFormatting.themeFill ?? null),
|
|
7196
7350
|
scriptFonts: beforeFormatting.scriptFonts,
|
|
7197
7351
|
scriptFontSlot: beforeFormatting.scriptFontSlot,
|
|
7198
|
-
textCase: beforeFormatting.textCase
|
|
7352
|
+
textCase: beforeFormatting.textCase,
|
|
7353
|
+
legacyTextOutline: beforeFormatting.legacyTextOutline,
|
|
7354
|
+
legacyTextShadow: beforeFormatting.legacyTextShadow,
|
|
7355
|
+
legacyTextEmboss: beforeFormatting.legacyTextEmboss,
|
|
7356
|
+
legacyTextImprint: beforeFormatting.legacyTextImprint,
|
|
7357
|
+
runBorder: serializeDocumentRunBorder(beforeFormatting.runBorder)
|
|
7199
7358
|
})
|
|
7200
7359
|
};
|
|
7201
7360
|
}
|
|
@@ -7358,4 +7517,4 @@ function work_docx_run_formatting_import_formatNumber(value) {
|
|
|
7358
7517
|
function formatLineHeightFactor(value) {
|
|
7359
7518
|
return Number(value.toFixed(4)).toString();
|
|
7360
7519
|
}
|
|
7361
|
-
export { applyImportedDocxEquationMarkers, applyImportedDocxParagraphAlignmentMarkers, applyImportedDocxParagraphBorderMarkers, applyImportedDocxParagraphDirectionMarkers, applyImportedDocxParagraphFormattingChangeMarkers, applyImportedDocxParagraphIndentMarkers, applyImportedDocxParagraphPaginationMarkers, applyImportedDocxParagraphShadingMarkers, applyImportedDocxParagraphSpacingMarkers, applyImportedDocxParagraphTabStopMarkers, applyImportedDocxRunFormattingMarkers, createDocxParagraphStyleResolver, createDocxTableStyleResolver, createImportedDocxRunFormattingMarkerState, docxCaptionBookmark, docxCaptionReferenceTarget, docxCaptionSequenceKind, docxEquationHtml, docxFieldInstructions, docxFieldOccurrenceIsInlineEditable, docxFieldOccurrences, docxFieldResultText, docxRunPropertySources, docxTableCellStyleLayers, docxTablePropertySources, docxTableRunPropertySources, hasImportedDocxParagraphAlignmentMarkers, hasImportedDocxParagraphBorderMarkers, hasImportedDocxParagraphDirectionMarkers, hasImportedDocxParagraphFormattingChangeMarkers, hasImportedDocxParagraphIndentMarkers, hasImportedDocxParagraphPaginationMarkers, hasImportedDocxParagraphShadingMarkers, hasImportedDocxParagraphSpacingMarkers, hasImportedDocxParagraphTabStopMarkers, hasImportedDocxRunFormattingMarkers, hasInvalidDocxFieldStructure, importedDocxStrike, importedDocxUnderline, inspectDocxEquation, inspectDocxHiddenText, inspectDocxPageBorders, inspectDocxPageMarginSettings, inspectDocxPageMargins, inspectDocxPageSize, inspectDocxPaperSource, inspectDocxRunFonts, isDocxEquationLikeRoot, isSupportedDocxEquationPlacement, isSupportedDocxParagraphFormattingChange, isSupportedDocxRunFormattingChange, markDocxPackageEquations, markDocxParagraphAlignments, markDocxParagraphBorders, markDocxParagraphDirections, markDocxParagraphFormattingChanges, markDocxParagraphIndents, markDocxParagraphPagination, markDocxParagraphShading, markDocxParagraphSpacing, markDocxParagraphTabStops, markDocxRunFormattingIntoState, parseDirectDocxParagraphShading, parseDocxPageBorders, parseDocxPageGeometry, parseDocxPageMargins, parseDocxPaperSource, resolveDocxHiddenText, resolveDocxParagraphBordersForParagraph, resolveDocxTableStyleResolver };
|
|
7520
|
+
export { applyImportedDocxEquationMarkers, applyImportedDocxParagraphAlignmentMarkers, applyImportedDocxParagraphBorderMarkers, applyImportedDocxParagraphDirectionMarkers, applyImportedDocxParagraphFormattingChangeMarkers, applyImportedDocxParagraphIndentMarkers, applyImportedDocxParagraphPaginationMarkers, applyImportedDocxParagraphShadingMarkers, applyImportedDocxParagraphSpacingMarkers, applyImportedDocxParagraphTabStopMarkers, applyImportedDocxRunFormattingMarkers, createDocxParagraphStyleResolver, createDocxTableStyleResolver, createImportedDocxRunFormattingMarkerState, docxCaptionBookmark, docxCaptionReferenceTarget, docxCaptionSequenceKind, docxEquationHtml, docxFieldInstructions, docxFieldOccurrenceIsInlineEditable, docxFieldOccurrences, docxFieldResultText, docxRunPropertySources, docxTableCellStyleLayers, docxTablePropertySources, docxTableRunPropertySources, hasImportedDocxParagraphAlignmentMarkers, hasImportedDocxParagraphBorderMarkers, hasImportedDocxParagraphDirectionMarkers, hasImportedDocxParagraphFormattingChangeMarkers, hasImportedDocxParagraphIndentMarkers, hasImportedDocxParagraphPaginationMarkers, hasImportedDocxParagraphShadingMarkers, hasImportedDocxParagraphSpacingMarkers, hasImportedDocxParagraphTabStopMarkers, hasImportedDocxRunFormattingMarkers, hasInvalidDocxFieldStructure, importedDocxStrike, importedDocxUnderline, inspectDocxEquation, inspectDocxHiddenText, inspectDocxLegacyTextEffects, inspectDocxPageBorders, inspectDocxPageMarginSettings, inspectDocxPageMargins, inspectDocxPageSize, inspectDocxPaperSource, inspectDocxRunBorder, inspectDocxRunFonts, isDocxEquationLikeRoot, isSupportedDocxEquationPlacement, isSupportedDocxParagraphFormattingChange, isSupportedDocxRunFormattingChange, markDocxPackageEquations, markDocxParagraphAlignments, markDocxParagraphBorders, markDocxParagraphDirections, markDocxParagraphFormattingChanges, markDocxParagraphIndents, markDocxParagraphPagination, markDocxParagraphShading, markDocxParagraphSpacing, markDocxParagraphTabStops, markDocxRunFormattingIntoState, parseDirectDocxParagraphShading, parseDocxPageBorders, parseDocxPageGeometry, parseDocxPageMargins, parseDocxPaperSource, resolveDocxHiddenText, resolveDocxLegacyTextEffects, resolveDocxParagraphBordersForParagraph, resolveDocxRunBorder, resolveDocxTableStyleResolver };
|