@a3s-lab/office 0.27.0 → 0.28.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/dist/6282.js CHANGED
@@ -6899,6 +6899,108 @@ function documentHiddenTextDomAttributes(value) {
6899
6899
  [DOCUMENT_HIDDEN_TEXT_ATTRIBUTE]: String(hiddenText)
6900
6900
  };
6901
6901
  }
6902
+ const DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE = 'data-office-legacy-text-outline';
6903
+ const DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE = 'data-office-legacy-text-shadow';
6904
+ const DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE = 'data-office-legacy-text-emboss';
6905
+ const DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE = 'data-office-legacy-text-imprint';
6906
+ const DOCUMENT_LEGACY_TEXT_EFFECT_NAMES = [
6907
+ 'outline',
6908
+ 'shadow',
6909
+ 'emboss',
6910
+ 'imprint'
6911
+ ];
6912
+ const ATTRIBUTE_BY_EFFECT = {
6913
+ outline: DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE,
6914
+ shadow: DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE,
6915
+ emboss: DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE,
6916
+ imprint: DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE
6917
+ };
6918
+ const TEXT_STYLE_ATTRIBUTE_BY_EFFECT = {
6919
+ outline: 'legacyTextOutline',
6920
+ shadow: 'legacyTextShadow',
6921
+ emboss: 'legacyTextEmboss',
6922
+ imprint: 'legacyTextImprint'
6923
+ };
6924
+ function normalizeDocumentLegacyTextEffect(value) {
6925
+ if (true === value || 'true' === value || '1' === value) return true;
6926
+ if (false === value || 'false' === value || '0' === value) return false;
6927
+ return null;
6928
+ }
6929
+ function normalizeDocumentLegacyTextEffects(value) {
6930
+ if (!work_document_legacy_text_effects_isRecord(value)) return null;
6931
+ const allowed = new Set(DOCUMENT_LEGACY_TEXT_EFFECT_NAMES);
6932
+ if (Object.keys(value).some((key)=>!allowed.has(key))) return null;
6933
+ const effects = {};
6934
+ for (const name of DOCUMENT_LEGACY_TEXT_EFFECT_NAMES)if (Object.hasOwn(value, name)) {
6935
+ if ('boolean' != typeof value[name]) return null;
6936
+ effects[name] = value[name];
6937
+ }
6938
+ return documentLegacyTextEffectsConflict(effects) ? null : effects;
6939
+ }
6940
+ function documentLegacyTextEffectsConflict(effects) {
6941
+ if (true === effects.emboss && (true === effects.outline || true === effects.shadow || true === effects.imprint)) return true;
6942
+ return true === effects.imprint && (true === effects.outline || true === effects.shadow || true === effects.emboss);
6943
+ }
6944
+ function documentLegacyTextEffectFromElement(element, effect) {
6945
+ return normalizeDocumentLegacyTextEffect(element.getAttribute(ATTRIBUTE_BY_EFFECT[effect]));
6946
+ }
6947
+ function documentLegacyTextEffectsFromElement(element) {
6948
+ const effects = {};
6949
+ for (const name of DOCUMENT_LEGACY_TEXT_EFFECT_NAMES){
6950
+ const attribute = ATTRIBUTE_BY_EFFECT[name];
6951
+ const value = documentLegacyTextEffectFromElement(element, name);
6952
+ if (element.hasAttribute(attribute) && null === value) return null;
6953
+ if (null !== value) effects[name] = value;
6954
+ }
6955
+ return documentLegacyTextEffectsConflict(effects) ? null : effects;
6956
+ }
6957
+ function documentLegacyTextEffectsFromTextStyleAttributes(attributes) {
6958
+ const effects = {};
6959
+ for (const name of DOCUMENT_LEGACY_TEXT_EFFECT_NAMES){
6960
+ const rawValue = attributes[TEXT_STYLE_ATTRIBUTE_BY_EFFECT[name]];
6961
+ if (null == rawValue) continue;
6962
+ const value = normalizeDocumentLegacyTextEffect(rawValue);
6963
+ if (null === value) return null;
6964
+ if (null !== value) effects[name] = value;
6965
+ }
6966
+ return documentLegacyTextEffectsConflict(effects) ? null : effects;
6967
+ }
6968
+ function documentLegacyTextEffectsDomAttributes(value) {
6969
+ const effects = normalizeDocumentLegacyTextEffects(value);
6970
+ if (!effects) return {};
6971
+ return Object.fromEntries(DOCUMENT_LEGACY_TEXT_EFFECT_NAMES.flatMap((name)=>void 0 === effects[name] ? [] : [
6972
+ [
6973
+ ATTRIBUTE_BY_EFFECT[name],
6974
+ String(effects[name])
6975
+ ]
6976
+ ]));
6977
+ }
6978
+ function documentLegacyTextEffectsCss(value) {
6979
+ const effects = normalizeDocumentLegacyTextEffects(value);
6980
+ if (!effects) return {};
6981
+ if (effects.emboss) return {
6982
+ textShadow: '-0.045em -0.045em 0 rgba(255, 255, 255, 0.9), 0.045em 0.045em 0 rgba(0, 0, 0, 0.52)'
6983
+ };
6984
+ if (effects.imprint) return {
6985
+ textShadow: '0.045em 0.045em 0 rgba(255, 255, 255, 0.9), -0.045em -0.045em 0 rgba(0, 0, 0, 0.52)'
6986
+ };
6987
+ return {
6988
+ ...effects.outline ? {
6989
+ WebkitTextFillColor: 'transparent',
6990
+ WebkitTextStroke: '0.045em currentColor',
6991
+ paintOrder: 'stroke fill'
6992
+ } : {},
6993
+ ...effects.shadow ? {
6994
+ textShadow: '0.08em 0.08em 0 currentColor'
6995
+ } : {}
6996
+ };
6997
+ }
6998
+ function documentLegacyTextStyleAttributeName(effect) {
6999
+ return TEXT_STYLE_ATTRIBUTE_BY_EFFECT[effect];
7000
+ }
7001
+ function work_document_legacy_text_effects_isRecord(value) {
7002
+ return 'object' == typeof value && null !== value && !Array.isArray(value);
7003
+ }
6902
7004
  const IMAGE_OBJECT_ID_PATTERN = /^[0-9A-F]{8}$/;
6903
7005
  const MAX_DOC_PROPERTIES_ID = 0xffffffff;
6904
7006
  const MAX_WORDPROCESSING_ID = 0x7fffffff;
@@ -8925,6 +9027,8 @@ function sanitizeAttributes(element, tag) {
8925
9027
  const emphasisMark = 'span' === tag ? documentEmphasisMarkFromElement(element) : null;
8926
9028
  const emphasisAttributes = documentEmphasisMarkDomAttributes(emphasisMark);
8927
9029
  const hiddenText = 'span' === tag ? documentHiddenTextFromElement(element) : null;
9030
+ const legacyTextEffects = 'span' === tag ? documentLegacyTextEffectsFromElement(element) ?? {} : {};
9031
+ const legacyTextEffectAttributes = documentLegacyTextEffectsDomAttributes(legacyTextEffects);
8928
9032
  const underline = 'u' === tag ? documentUnderlineFormattingFromElement(element) : null;
8929
9033
  const underlineAttributes = underline ? documentUnderlineDomAttributes(underline) : {};
8930
9034
  const strike = 's' === tag || 'strike' === tag ? documentStrikeFormattingFromElement(element) : null;
@@ -8947,6 +9051,10 @@ function sanitizeAttributes(element, tag) {
8947
9051
  element.removeAttribute(DOCUMENT_KERNING_THRESHOLD_ATTRIBUTE);
8948
9052
  element.removeAttribute(DOCUMENT_EMPHASIS_MARK_ATTRIBUTE);
8949
9053
  element.removeAttribute(DOCUMENT_HIDDEN_TEXT_ATTRIBUTE);
9054
+ element.removeAttribute(DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE);
9055
+ element.removeAttribute(DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE);
9056
+ element.removeAttribute(DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE);
9057
+ element.removeAttribute(DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE);
8950
9058
  element.removeAttribute(DOCUMENT_SCRIPT_FONTS_ATTRIBUTE);
8951
9059
  element.removeAttribute(DOCUMENT_SCRIPT_FONT_SLOT_ATTRIBUTE);
8952
9060
  const styles = [
@@ -9008,6 +9116,7 @@ function sanitizeAttributes(element, tag) {
9008
9116
  if ('span' === tag && null !== kerningThreshold) element.setAttribute(DOCUMENT_KERNING_THRESHOLD_ATTRIBUTE, String(kerningThreshold));
9009
9117
  if ('span' === tag && null !== emphasisMark) element.setAttribute(DOCUMENT_EMPHASIS_MARK_ATTRIBUTE, emphasisMark);
9010
9118
  if ('span' === tag && null !== hiddenText) element.setAttribute(DOCUMENT_HIDDEN_TEXT_ATTRIBUTE, String(hiddenText));
9119
+ if ('span' === tag) for (const [name, value] of Object.entries(legacyTextEffectAttributes))element.setAttribute(name, value);
9011
9120
  if ('span' === tag && scriptFonts) {
9012
9121
  for (const [name, value] of Object.entries(scriptFontAttributes))if ('style' !== name) element.setAttribute(name, value);
9013
9122
  }
@@ -9056,6 +9165,10 @@ function sanitizeAttributes(element, tag) {
9056
9165
  DOCUMENT_KERNING_THRESHOLD_ATTRIBUTE,
9057
9166
  DOCUMENT_EMPHASIS_MARK_ATTRIBUTE,
9058
9167
  DOCUMENT_HIDDEN_TEXT_ATTRIBUTE,
9168
+ DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE,
9169
+ DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE,
9170
+ DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE,
9171
+ DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE,
9059
9172
  DOCUMENT_SCRIPT_FONTS_ATTRIBUTE,
9060
9173
  DOCUMENT_SCRIPT_FONT_SLOT_ATTRIBUTE
9061
9174
  ] : [],
@@ -9983,6 +10096,10 @@ const ALLOWED_ATTRIBUTES = {
9983
10096
  'emphasisMark',
9984
10097
  'kerningThresholdHalfPoints',
9985
10098
  'hiddenText',
10099
+ 'legacyTextOutline',
10100
+ 'legacyTextShadow',
10101
+ 'legacyTextEmboss',
10102
+ 'legacyTextImprint',
9986
10103
  "scriptFonts",
9987
10104
  "scriptFontSlot",
9988
10105
  'themeColor',
@@ -10074,6 +10191,10 @@ function importedDocumentCharacterFormatting(formatting) {
10074
10191
  kerningThresholdHalfPoints: formatting.kerningThresholdHalfPoints,
10075
10192
  emphasisMark: formatting.emphasisMark,
10076
10193
  hiddenText: formatting.hiddenText,
10194
+ legacyTextOutline: formatting.legacyTextOutline,
10195
+ legacyTextShadow: formatting.legacyTextShadow,
10196
+ legacyTextEmboss: formatting.legacyTextEmboss,
10197
+ legacyTextImprint: formatting.legacyTextImprint,
10077
10198
  color: formatting.color,
10078
10199
  fontFamily: formatting.fontFamily,
10079
10200
  scriptFonts: serializeDocumentScriptFonts(formatting.scriptFonts) ?? void 0,
@@ -10144,6 +10265,17 @@ function normalizeCharacterFormatMark(value) {
10144
10265
  attrs[key] = hiddenText;
10145
10266
  continue;
10146
10267
  }
10268
+ if ('textStyle' === type && [
10269
+ 'legacyTextOutline',
10270
+ 'legacyTextShadow',
10271
+ 'legacyTextEmboss',
10272
+ 'legacyTextImprint'
10273
+ ].includes(key)) {
10274
+ const effect = normalizeDocumentLegacyTextEffect(candidate);
10275
+ if (null === effect) return null;
10276
+ attrs[key] = effect;
10277
+ continue;
10278
+ }
10147
10279
  if ('textStyle' === type && "scriptFonts" === key) {
10148
10280
  const fonts = 'string' == typeof candidate ? serializeDocumentScriptFonts(parseDocumentScriptFonts(candidate)) : serializeDocumentScriptFonts(normalizeDocumentScriptFonts(candidate));
10149
10281
  if (!fonts) return null;
@@ -10175,6 +10307,12 @@ function normalizeCharacterFormatMark(value) {
10175
10307
  }
10176
10308
  return null;
10177
10309
  }
10310
+ if ('textStyle' === type && documentLegacyTextEffectsConflict({
10311
+ outline: 'boolean' == typeof attrs.legacyTextOutline ? attrs.legacyTextOutline : void 0,
10312
+ shadow: 'boolean' == typeof attrs.legacyTextShadow ? attrs.legacyTextShadow : void 0,
10313
+ emboss: 'boolean' == typeof attrs.legacyTextEmboss ? attrs.legacyTextEmboss : void 0,
10314
+ imprint: 'boolean' == typeof attrs.legacyTextImprint ? attrs.legacyTextImprint : void 0
10315
+ })) return null;
10178
10316
  const keys = Object.keys(attrs).sort();
10179
10317
  const normalizedAttributes = keys.length ? Object.fromEntries(keys.map((key)=>[
10180
10318
  key,
@@ -17475,7 +17613,16 @@ const DocumentTextStyle = TextStyle.extend({
17475
17613
  {
17476
17614
  tag: `span[${DOCUMENT_HIDDEN_TEXT_ATTRIBUTE}]`,
17477
17615
  consuming: false
17478
- }
17616
+ },
17617
+ ...[
17618
+ DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE,
17619
+ DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE,
17620
+ DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE,
17621
+ DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE
17622
+ ].map((attribute)=>({
17623
+ tag: `span[${attribute}]`,
17624
+ consuming: false
17625
+ }))
17479
17626
  ];
17480
17627
  },
17481
17628
  addCommands () {
@@ -17520,6 +17667,10 @@ const DocumentTextStyle = TextStyle.extend({
17520
17667
  parseHTML: (element)=>documentHiddenTextFromElement(element),
17521
17668
  renderHTML: (attributes)=>documentHiddenTextDomAttributes(attributes.hiddenText)
17522
17669
  },
17670
+ legacyTextOutline: legacyTextEffectAttribute('outline'),
17671
+ legacyTextShadow: legacyTextEffectAttribute('shadow'),
17672
+ legacyTextEmboss: legacyTextEffectAttribute('emboss'),
17673
+ legacyTextImprint: legacyTextEffectAttribute('imprint'),
17523
17674
  kerningThresholdHalfPoints: {
17524
17675
  default: null,
17525
17676
  parseHTML: (element)=>documentKerningThresholdHalfPointsFromElement(element),
@@ -17576,6 +17727,18 @@ const DocumentTextStyle = TextStyle.extend({
17576
17727
  };
17577
17728
  }
17578
17729
  });
17730
+ function legacyTextEffectAttribute(effect) {
17731
+ return {
17732
+ default: null,
17733
+ parseHTML: (element)=>documentLegacyTextEffectFromElement(element, effect),
17734
+ renderHTML: (attributes)=>{
17735
+ const value = normalizeDocumentLegacyTextEffect(attributes[documentLegacyTextStyleAttributeName(effect)]);
17736
+ return null === value ? {} : documentLegacyTextEffectsDomAttributes({
17737
+ [effect]: value
17738
+ });
17739
+ }
17740
+ };
17741
+ }
17579
17742
  function documentTextStyleAttributesAreEmpty(attributes) {
17580
17743
  return Object.values(attributes).every((value)=>null == value || '' === value);
17581
17744
  }
@@ -21703,4 +21866,4 @@ function registerDocumentPageSurfaceGeometry(element, provider) {
21703
21866
  function documentPageSurfaceGeometryForElement(element) {
21704
21867
  return documentPageSurfaceProviders.get(element)?.() ?? null;
21705
21868
  }
21706
- export { DEFAULT_DOCUMENT_TABLE_CELL_FORMAT, DEFAULT_DOCUMENT_TABLE_CELL_MARGINS, DEFAULT_DOCUMENT_TABLE_GEOMETRY, DOCUMENT_BOOKMARK_DUPLICATE_MESSAGE, DOCUMENT_CHUNK_HYDRATION_META, DOCUMENT_CHUNK_PAGINATION_META, DOCUMENT_CHUNK_VISIBLE_IDS_META, DOCUMENT_PAGE_BORDER_EDGES, DOCUMENT_PAGE_MARGIN_KEYS, DOCUMENT_PARAGRAPH_BORDER_EDGES, DOCUMENT_PARAGRAPH_BORDER_STYLES, DOCUMENT_PARAGRAPH_SHADING_PATTERNS, DOCUMENT_STRIKE_STYLE_ATTRIBUTE, DOCUMENT_TABLE_ROW_ID_ATTRIBUTE, DOCUMENT_TABLE_ROW_TEXT_ID_ATTRIBUTE, DOCUMENT_TABLE_STYLE_OPTIONS, DOCUMENT_UNDERLINE_STYLE_ATTRIBUTE, DocumentCharacterFormatting, DocumentEquation, DocumentFontFamily, DocumentImage, DocumentParagraphFormatting, DocumentParagraphIdentity, DocumentScriptFontFormatting, DocumentStrike, DocumentSubscript, DocumentSuperscript, DocumentTableRowIdentity, DocumentTextStyle, DocumentUnderline, DocxThemePatchCollector, MAX_DOCUMENT_IMAGE_RELATIVE_HEIGHT, MAX_DOCUMENT_NUMBERING_START, activeDocumentBookmark, activeDocumentSection, activeDocumentTableStyle, applyDocumentImageCropToElement, applyDocumentImageIdentityToElement, applyDocumentImageLayerToElement, applyDocumentImageWrapContourToElement, applyDocumentPageGeometry, applyDocumentParagraphIdentityToElement, applyDocumentTableGeometryToElement, applyDocumentTableRowIdentityToElement, applyDocumentTextCaseStyle, canChangeDocumentIndent, canInsertDocumentComment, canSetDocumentTableRowRepeatHeader, clampDocumentMargin, collectDocumentChanges, collectDocumentCommentAnchors, collectDocumentNotes, collectDocumentTextLayoutParagraphs, createDocumentBibliography, createDocumentEquationElement, createDocumentImageIdentityRegistry, createDocumentNoteElement, createDocumentParagraphIdentityRegistry, createSchemaDerivedWorkDocumentModel, createSchemaValidatedWorkDocumentModel, createWorkDocumentExtensions, createWorkDocumentModel, createWorkDocumentModelFromContent, createWorkOfficeDocumentCollaborationBinding as createOfficeDocumentCollaborationBinding, cssDocumentFontFamily, defaultDocumentImageWrapContour, documentAutoLineHeight, documentBookmarkNameExists, documentBookmarkReferenceInstruction, documentBulletListStyle, documentCaptionKind, documentCaptionLabel, documentCharacterPositionDomAttributes, documentCharacterPositionHalfPointsFromElement, documentCharacterPositionPoints, documentCharacterScaleDomAttributes, documentCharacterScalePercentFromElement, documentCharacterSpacingDomAttributes, documentCharacterSpacingPoints, documentCharacterSpacingTwipsFromElement, documentChunkMountedIds, documentCitationCount, documentCitationInstruction, documentCitationStyle, documentCitationStyleDetails, documentCitationTags, documentCitationTagsFromInstruction, documentCommentDraftRange, documentCommentViews, documentContentLayoutProperties, documentEmphasisMarkDomAttributes, documentEmphasisMarkFromElement, documentEquationFromElement, documentEquationText, documentFontNameFromCssFamily, documentHiddenTextDomAttributes, documentHiddenTextFromElement, documentHiddenTextKeyboardShortcut, documentImageCropFromElement, documentImageIdentityFromElement, documentImageLayerFromElement, documentImageLayoutFromElement, documentImageLayoutOptions, documentImagePositionFromElement, documentImageProperties, documentImageWrapContourFromElement, documentInitialSectionLayout, documentKerningDomAttributes, documentKerningIsEffective, documentKerningThresholdHalfPointsFromElement, documentKerningThresholdPoints, documentLazyHtmlChunkFragment, documentLazyHtmlProjection, documentLazyHtmlProjectionFingerprint, documentModelForContent, documentModelForHtml, documentModelHasTrustedInitialIntegrityFeatures, documentModelUsesWindowing, documentNoteKey, documentNoteKind, documentOrderedListState, documentPageBordersVisible, documentPageChromeLegacyFields, documentPageGeometryForLayout, documentPageHorizontalMarginTwips, documentPageMarginBody, documentPageMarginsForLayout, documentPageMetrics, documentPageSurfaceGeometryForElement, documentPaperSizeForGeometry, documentParagraphBordersDomAttributes, documentParagraphDirection, documentParagraphIdentityFromElement, documentParagraphIndent, documentParagraphPagination, documentParagraphShadingDomAttributes, documentParagraphSpacing, documentParagraphTabStops, documentScriptFontDirectFamily, documentScriptFontFallbackSlots, documentScriptFontFamily, documentScriptFontFamilyForRendering, documentScriptFontSegments, documentScriptFontSlotFromElement, documentScriptFontSlotFromHint, documentScriptFontsDomAttributes, documentScriptFontsFromElement, documentSectionById, documentSectionDomAttributes, documentSections, documentStrikeDomAttributes, documentStrikeFormattingFromElement, documentStrikeStyle, documentTabLeaderLabel, documentTableBordersFromElement, documentTableCellFormat, documentTableCellMarginOverridesFromElement, documentTableColumnPercentagesFromElement, documentTableGeometryFromElement, documentTableHorizontalAlignment, documentTableRowIdentityFromElement, documentTableRowOptions, documentTableSizing, documentTextCaseFromWordFlags, documentTextCaseKeyboardShortcuts, documentTextLayoutBatches, documentTextStatistics, documentTransactionsOnlyHydrateChunks, documentUnderlineColor, documentUnderlineDomAttributes, documentUnderlineFormattingFromElement, documentUnderlineKeyboardShortcuts, documentUnderlineStyle, documentWordLineHeightFactor, docxBookmarkReferenceTarget, docxDocumentFieldKind, editorDocumentBookmarkReferenceTargets, editorDocumentCaptionTargets, importedDocumentCharacterFormatting, initializeWorkOfficeDocumentCollaboration as initializeOfficeDocumentCollaboration, invalidateDocumentLazyHtmlProjection, isContourImageLayout, isDocumentParagraphArtBorderStyle, isValidDocumentCitationTag, materializeLazyDocumentEditorRoot, materializeWorkDocumentContent, measureDocumentLayoutBlocksIncrementally, millimetersToPixels, mountWorkLiveDocumentCapture, nextDocumentTabAlignment, normalizeDocumentBookmarkName, normalizeDocumentBookmarkNativeId, normalizeDocumentBookmarkReferencesHtml, normalizeDocumentBookmarksHtml, normalizeDocumentCaptionsHtml, normalizeDocumentCharacterPositionHalfPoints, normalizeDocumentCharacterScalePercent, normalizeDocumentCharacterSpacingTwips, normalizeDocumentCitationsHtml, normalizeDocumentColumns, normalizeDocumentEmphasisMark, normalizeDocumentEquation, normalizeDocumentFieldsHtml, normalizeDocumentFontName, normalizeDocumentHiddenText, normalizeDocumentHtml, normalizeDocumentImageAlignment, normalizeDocumentImageCrop, normalizeDocumentImageIdentity, normalizeDocumentImageLayer, normalizeDocumentImageLayoutOptions, normalizeDocumentImagePosition, normalizeDocumentImageWrapContour, normalizeDocumentImageWrapSide, normalizeDocumentKerningThresholdHalfPoints, normalizeDocumentNotesHtml, normalizeDocumentPageBorders, normalizeDocumentPageChrome, normalizeDocumentPageGeometry, normalizeDocumentPageMargins, normalizeDocumentPaperSource, normalizeDocumentParagraphBorder, normalizeDocumentParagraphBorders, normalizeDocumentParagraphId, normalizeDocumentParagraphIdentity, normalizeDocumentParagraphIndent, normalizeDocumentScriptFontHint, normalizeDocumentScriptFontSlot, normalizeDocumentScriptFonts, normalizeDocumentStrikeStyle, normalizeDocumentTabStops, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeDocumentTableRowHeightRule, normalizeDocumentTableRowIdentity, normalizeDocumentTableVerticalAlign, normalizeDocumentTextCase, normalizeDocumentThemeFont, normalizeDocumentUnderlineColor, normalizeDocumentUnderlineStyle, normalizeTableColor, normalizedTabPosition, pageTwipsToMillimeters, parseDocumentCharacterFormatting, parseDocumentParagraphBordersElement, parseDocumentParagraphFormatting, parseDocumentParagraphShadingElement, parseDocumentScriptFonts, parseDocxThemeReference, patchDocumentLazyHtmlProjection, patchDocumentScriptFonts, patchDocxThemeReferences, positionWorkLiveDocumentCapture, readWorkOfficeDocumentCollaboration as readOfficeDocumentCollaboration, registerDocumentPageSurfaceGeometry, renderDocumentAutoLineHeight, renderDocumentTableBorders, renderDocumentTableCellMarginOverrides, resolveDocumentPageBorders, resolveDocumentPageChrome, resolveDocumentPageMargins, resolveDocumentPageSize, resolveWorkDocumentEditorInput, retainAnchoredDocumentComments, sanitizeDocumentPageChromeHtml, selectedDocumentChunkId, serializeDocumentParagraphFormatting, serializeDocumentScriptFonts, serializeDocumentTabStops, serializeDocxThemeReference, serializeWorkDocumentNode, setCustomDocumentColumns, supportedDocxBookmarkReferenceInstruction, syncDocumentContentFromHtml, transferChangedDocumentTextStatistics, uniqueDocumentImageIdentity, uniqueDocumentParagraphIdentity, updateDocumentColumnWidth, updateDocumentCustomPageMillimeters, updateDocumentGutterPosition, updateDocumentMirrorMargins, updateDocumentPageChromeVariant, updateDocumentPageMarginMillimeters, updateDocumentPageMarginMode, updateDocumentPageOrientation, updateDocumentPaperSizePreset, validateDocumentBookmarkName, windowDocumentModel, workDocumentSchema, workOfficeDocumentCollaborationFragment as officeDocumentCollaborationFragment, work_document_page_margins_twipsToMillimeters, wrapsBesideImage };
21869
+ export { DEFAULT_DOCUMENT_TABLE_CELL_FORMAT, DEFAULT_DOCUMENT_TABLE_CELL_MARGINS, DEFAULT_DOCUMENT_TABLE_GEOMETRY, DOCUMENT_BOOKMARK_DUPLICATE_MESSAGE, DOCUMENT_CHUNK_HYDRATION_META, DOCUMENT_CHUNK_PAGINATION_META, DOCUMENT_CHUNK_VISIBLE_IDS_META, DOCUMENT_LEGACY_TEXT_EFFECT_NAMES, DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE, DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE, DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE, DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE, DOCUMENT_PAGE_BORDER_EDGES, DOCUMENT_PAGE_MARGIN_KEYS, DOCUMENT_PARAGRAPH_BORDER_EDGES, DOCUMENT_PARAGRAPH_BORDER_STYLES, DOCUMENT_PARAGRAPH_SHADING_PATTERNS, DOCUMENT_STRIKE_STYLE_ATTRIBUTE, DOCUMENT_TABLE_ROW_ID_ATTRIBUTE, DOCUMENT_TABLE_ROW_TEXT_ID_ATTRIBUTE, DOCUMENT_TABLE_STYLE_OPTIONS, DOCUMENT_UNDERLINE_STYLE_ATTRIBUTE, DocumentCharacterFormatting, DocumentEquation, DocumentFontFamily, DocumentImage, DocumentParagraphFormatting, DocumentParagraphIdentity, DocumentScriptFontFormatting, DocumentStrike, DocumentSubscript, DocumentSuperscript, DocumentTableRowIdentity, DocumentTextStyle, DocumentUnderline, DocxThemePatchCollector, MAX_DOCUMENT_IMAGE_RELATIVE_HEIGHT, MAX_DOCUMENT_NUMBERING_START, activeDocumentBookmark, activeDocumentSection, activeDocumentTableStyle, applyDocumentImageCropToElement, applyDocumentImageIdentityToElement, applyDocumentImageLayerToElement, applyDocumentImageWrapContourToElement, applyDocumentPageGeometry, applyDocumentParagraphIdentityToElement, applyDocumentTableGeometryToElement, applyDocumentTableRowIdentityToElement, applyDocumentTextCaseStyle, canChangeDocumentIndent, canInsertDocumentComment, canSetDocumentTableRowRepeatHeader, clampDocumentMargin, collectDocumentChanges, collectDocumentCommentAnchors, collectDocumentNotes, collectDocumentTextLayoutParagraphs, createDocumentBibliography, createDocumentEquationElement, createDocumentImageIdentityRegistry, createDocumentNoteElement, createDocumentParagraphIdentityRegistry, createSchemaDerivedWorkDocumentModel, createSchemaValidatedWorkDocumentModel, createWorkDocumentExtensions, createWorkDocumentModel, createWorkDocumentModelFromContent, createWorkOfficeDocumentCollaborationBinding as createOfficeDocumentCollaborationBinding, cssDocumentFontFamily, defaultDocumentImageWrapContour, documentAutoLineHeight, documentBookmarkNameExists, documentBookmarkReferenceInstruction, documentBulletListStyle, documentCaptionKind, documentCaptionLabel, documentCharacterPositionDomAttributes, documentCharacterPositionHalfPointsFromElement, documentCharacterPositionPoints, documentCharacterScaleDomAttributes, documentCharacterScalePercentFromElement, documentCharacterSpacingDomAttributes, documentCharacterSpacingPoints, documentCharacterSpacingTwipsFromElement, documentChunkMountedIds, documentCitationCount, documentCitationInstruction, documentCitationStyle, documentCitationStyleDetails, documentCitationTags, documentCitationTagsFromInstruction, documentCommentDraftRange, documentCommentViews, documentContentLayoutProperties, documentEmphasisMarkDomAttributes, documentEmphasisMarkFromElement, documentEquationFromElement, documentEquationText, documentFontNameFromCssFamily, documentHiddenTextDomAttributes, documentHiddenTextFromElement, documentHiddenTextKeyboardShortcut, documentImageCropFromElement, documentImageIdentityFromElement, documentImageLayerFromElement, documentImageLayoutFromElement, documentImageLayoutOptions, documentImagePositionFromElement, documentImageProperties, documentImageWrapContourFromElement, documentInitialSectionLayout, documentKerningDomAttributes, documentKerningIsEffective, documentKerningThresholdHalfPointsFromElement, documentKerningThresholdPoints, documentLazyHtmlChunkFragment, documentLazyHtmlProjection, documentLazyHtmlProjectionFingerprint, documentLegacyTextEffectsConflict, documentLegacyTextEffectsCss, documentLegacyTextEffectsDomAttributes, documentLegacyTextEffectsFromElement, documentLegacyTextEffectsFromTextStyleAttributes, documentModelForContent, documentModelForHtml, documentModelHasTrustedInitialIntegrityFeatures, documentModelUsesWindowing, documentNoteKey, documentNoteKind, documentOrderedListState, documentPageBordersVisible, documentPageChromeLegacyFields, documentPageGeometryForLayout, documentPageHorizontalMarginTwips, documentPageMarginBody, documentPageMarginsForLayout, documentPageMetrics, documentPageSurfaceGeometryForElement, documentPaperSizeForGeometry, documentParagraphBordersDomAttributes, documentParagraphDirection, documentParagraphIdentityFromElement, documentParagraphIndent, documentParagraphPagination, documentParagraphShadingDomAttributes, documentParagraphSpacing, documentParagraphTabStops, documentScriptFontDirectFamily, documentScriptFontFallbackSlots, documentScriptFontFamily, documentScriptFontFamilyForRendering, documentScriptFontSegments, documentScriptFontSlotFromElement, documentScriptFontSlotFromHint, documentScriptFontsDomAttributes, documentScriptFontsFromElement, documentSectionById, documentSectionDomAttributes, documentSections, documentStrikeDomAttributes, documentStrikeFormattingFromElement, documentStrikeStyle, documentTabLeaderLabel, documentTableBordersFromElement, documentTableCellFormat, documentTableCellMarginOverridesFromElement, documentTableColumnPercentagesFromElement, documentTableGeometryFromElement, documentTableHorizontalAlignment, documentTableRowIdentityFromElement, documentTableRowOptions, documentTableSizing, documentTextCaseFromWordFlags, documentTextCaseKeyboardShortcuts, documentTextLayoutBatches, documentTextStatistics, documentTransactionsOnlyHydrateChunks, documentUnderlineColor, documentUnderlineDomAttributes, documentUnderlineFormattingFromElement, documentUnderlineKeyboardShortcuts, documentUnderlineStyle, documentWordLineHeightFactor, docxBookmarkReferenceTarget, docxDocumentFieldKind, editorDocumentBookmarkReferenceTargets, editorDocumentCaptionTargets, importedDocumentCharacterFormatting, initializeWorkOfficeDocumentCollaboration as initializeOfficeDocumentCollaboration, invalidateDocumentLazyHtmlProjection, isContourImageLayout, isDocumentParagraphArtBorderStyle, isValidDocumentCitationTag, materializeLazyDocumentEditorRoot, materializeWorkDocumentContent, measureDocumentLayoutBlocksIncrementally, millimetersToPixels, mountWorkLiveDocumentCapture, nextDocumentTabAlignment, normalizeDocumentBookmarkName, normalizeDocumentBookmarkNativeId, normalizeDocumentBookmarkReferencesHtml, normalizeDocumentBookmarksHtml, normalizeDocumentCaptionsHtml, normalizeDocumentCharacterPositionHalfPoints, normalizeDocumentCharacterScalePercent, normalizeDocumentCharacterSpacingTwips, normalizeDocumentCitationsHtml, normalizeDocumentColumns, normalizeDocumentEmphasisMark, normalizeDocumentEquation, normalizeDocumentFieldsHtml, normalizeDocumentFontName, normalizeDocumentHiddenText, normalizeDocumentHtml, normalizeDocumentImageAlignment, normalizeDocumentImageCrop, normalizeDocumentImageIdentity, normalizeDocumentImageLayer, normalizeDocumentImageLayoutOptions, normalizeDocumentImagePosition, normalizeDocumentImageWrapContour, normalizeDocumentImageWrapSide, normalizeDocumentKerningThresholdHalfPoints, normalizeDocumentLegacyTextEffect, normalizeDocumentLegacyTextEffects, normalizeDocumentNotesHtml, normalizeDocumentPageBorders, normalizeDocumentPageChrome, normalizeDocumentPageGeometry, normalizeDocumentPageMargins, normalizeDocumentPaperSource, normalizeDocumentParagraphBorder, normalizeDocumentParagraphBorders, normalizeDocumentParagraphId, normalizeDocumentParagraphIdentity, normalizeDocumentParagraphIndent, normalizeDocumentScriptFontHint, normalizeDocumentScriptFontSlot, normalizeDocumentScriptFonts, normalizeDocumentStrikeStyle, normalizeDocumentTabStops, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeDocumentTableRowHeightRule, normalizeDocumentTableRowIdentity, normalizeDocumentTableVerticalAlign, normalizeDocumentTextCase, normalizeDocumentThemeFont, normalizeDocumentUnderlineColor, normalizeDocumentUnderlineStyle, normalizeTableColor, normalizedTabPosition, pageTwipsToMillimeters, parseDocumentCharacterFormatting, parseDocumentParagraphBordersElement, parseDocumentParagraphFormatting, parseDocumentParagraphShadingElement, parseDocumentScriptFonts, parseDocxThemeReference, patchDocumentLazyHtmlProjection, patchDocumentScriptFonts, patchDocxThemeReferences, positionWorkLiveDocumentCapture, readWorkOfficeDocumentCollaboration as readOfficeDocumentCollaboration, registerDocumentPageSurfaceGeometry, renderDocumentAutoLineHeight, renderDocumentTableBorders, renderDocumentTableCellMarginOverrides, resolveDocumentPageBorders, resolveDocumentPageChrome, resolveDocumentPageMargins, resolveDocumentPageSize, resolveWorkDocumentEditorInput, retainAnchoredDocumentComments, sanitizeDocumentPageChromeHtml, selectedDocumentChunkId, serializeDocumentParagraphFormatting, serializeDocumentScriptFonts, serializeDocumentTabStops, serializeDocxThemeReference, serializeWorkDocumentNode, setCustomDocumentColumns, supportedDocxBookmarkReferenceInstruction, syncDocumentContentFromHtml, transferChangedDocumentTextStatistics, uniqueDocumentImageIdentity, uniqueDocumentParagraphIdentity, updateDocumentColumnWidth, updateDocumentCustomPageMillimeters, updateDocumentGutterPosition, updateDocumentMirrorMargins, updateDocumentPageChromeVariant, updateDocumentPageMarginMillimeters, updateDocumentPageMarginMode, updateDocumentPageOrientation, updateDocumentPaperSizePreset, validateDocumentBookmarkName, windowDocumentModel, workDocumentSchema, workOfficeDocumentCollaborationFragment as officeDocumentCollaborationFragment, work_document_page_margins_twipsToMillimeters, wrapsBesideImage };
@@ -31,6 +31,22 @@ export interface DocumentFontDialogSource {
31
31
  mixed: boolean;
32
32
  value: boolean | null;
33
33
  };
34
+ legacyTextOutline: {
35
+ mixed: boolean;
36
+ value: boolean | null;
37
+ };
38
+ legacyTextShadow: {
39
+ mixed: boolean;
40
+ value: boolean | null;
41
+ };
42
+ legacyTextEmboss: {
43
+ mixed: boolean;
44
+ value: boolean | null;
45
+ };
46
+ legacyTextImprint: {
47
+ mixed: boolean;
48
+ value: boolean | null;
49
+ };
34
50
  latinFont: DocumentFontFamilySource;
35
51
  eastAsiaFont: DocumentFontFamilySource;
36
52
  complexScriptFont: DocumentFontFamilySource;
@@ -50,6 +66,10 @@ export interface DocumentFontDialogDraft {
50
66
  kerningThresholdPoints: string;
51
67
  emphasisMark: DocumentEmphasisMarkMode;
52
68
  hiddenText: boolean;
69
+ legacyTextOutline: boolean;
70
+ legacyTextShadow: boolean;
71
+ legacyTextEmboss: boolean;
72
+ legacyTextImprint: boolean;
53
73
  latinFont: string;
54
74
  eastAsiaFont: string;
55
75
  complexScriptFont: string;
@@ -61,6 +81,10 @@ export interface DocumentFontDialogPatch extends DocumentFontDialogScriptFontPat
61
81
  kerningThresholdHalfPoints?: number | null;
62
82
  emphasisMark?: WorkDocumentEmphasisMark | null;
63
83
  hiddenText?: boolean;
84
+ legacyTextOutline?: boolean;
85
+ legacyTextShadow?: boolean;
86
+ legacyTextEmboss?: boolean;
87
+ legacyTextImprint?: boolean;
64
88
  }
65
89
  export interface DocumentFontDialogTouched {
66
90
  characterPosition: boolean;
@@ -70,6 +94,10 @@ export interface DocumentFontDialogTouched {
70
94
  eastAsiaFont: boolean;
71
95
  emphasisMark: boolean;
72
96
  hiddenText: boolean;
97
+ legacyTextOutline: boolean;
98
+ legacyTextShadow: boolean;
99
+ legacyTextEmboss: boolean;
100
+ legacyTextImprint: boolean;
73
101
  kerning: boolean;
74
102
  latinFont: boolean;
75
103
  }
@@ -31,6 +31,10 @@ export declare function importedDocumentCharacterFormatting(formatting: {
31
31
  kerningThresholdHalfPoints?: number;
32
32
  emphasisMark?: WorkDocumentEmphasisMark;
33
33
  hiddenText?: boolean;
34
+ legacyTextOutline?: boolean;
35
+ legacyTextShadow?: boolean;
36
+ legacyTextEmboss?: boolean;
37
+ legacyTextImprint?: boolean;
34
38
  wordLineHeightFactor?: number;
35
39
  wordSnapToGrid?: boolean;
36
40
  fontSize?: number;
@@ -0,0 +1,27 @@
1
+ export declare const DOCUMENT_LEGACY_TEXT_OUTLINE_ATTRIBUTE = "data-office-legacy-text-outline";
2
+ export declare const DOCUMENT_LEGACY_TEXT_SHADOW_ATTRIBUTE = "data-office-legacy-text-shadow";
3
+ export declare const DOCUMENT_LEGACY_TEXT_EMBOSS_ATTRIBUTE = "data-office-legacy-text-emboss";
4
+ export declare const DOCUMENT_LEGACY_TEXT_IMPRINT_ATTRIBUTE = "data-office-legacy-text-imprint";
5
+ export declare const DOCUMENT_LEGACY_TEXT_EFFECT_NAMES: readonly ["outline", "shadow", "emboss", "imprint"];
6
+ export type WorkDocumentLegacyTextEffectName = (typeof DOCUMENT_LEGACY_TEXT_EFFECT_NAMES)[number];
7
+ export interface WorkDocumentLegacyTextEffects {
8
+ outline?: boolean;
9
+ shadow?: boolean;
10
+ emboss?: boolean;
11
+ imprint?: boolean;
12
+ }
13
+ export interface WorkDocumentLegacyTextEffectCss {
14
+ WebkitTextFillColor?: string;
15
+ WebkitTextStroke?: string;
16
+ paintOrder?: string;
17
+ textShadow?: string;
18
+ }
19
+ export declare function normalizeDocumentLegacyTextEffect(value: unknown): boolean | null;
20
+ export declare function normalizeDocumentLegacyTextEffects(value: unknown): WorkDocumentLegacyTextEffects | null;
21
+ export declare function documentLegacyTextEffectsConflict(effects: WorkDocumentLegacyTextEffects): boolean;
22
+ export declare function documentLegacyTextEffectFromElement(element: HTMLElement, effect: WorkDocumentLegacyTextEffectName): boolean | null;
23
+ export declare function documentLegacyTextEffectsFromElement(element: HTMLElement): WorkDocumentLegacyTextEffects | null;
24
+ export declare function documentLegacyTextEffectsFromTextStyleAttributes(attributes: Record<string, unknown>): WorkDocumentLegacyTextEffects | null;
25
+ export declare function documentLegacyTextEffectsDomAttributes(value: WorkDocumentLegacyTextEffects): Record<string, string>;
26
+ export declare function documentLegacyTextEffectsCss(value: WorkDocumentLegacyTextEffects): WorkDocumentLegacyTextEffectCss;
27
+ export declare function documentLegacyTextStyleAttributeName(effect: WorkDocumentLegacyTextEffectName): string;
@@ -9,6 +9,10 @@ declare module '@tiptap/extension-text-style' {
9
9
  characterSpacingTwips?: number | null;
10
10
  emphasisMark?: WorkDocumentEmphasisMark | null;
11
11
  hiddenText?: boolean | null;
12
+ legacyTextOutline?: boolean | null;
13
+ legacyTextShadow?: boolean | null;
14
+ legacyTextEmboss?: boolean | null;
15
+ legacyTextImprint?: boolean | null;
12
16
  kerningThresholdHalfPoints?: number | null;
13
17
  scriptFonts?: string | null;
14
18
  scriptFontSlot?: WorkDocumentScriptFontSlot | null;
@@ -11,6 +11,7 @@ export declare class DocxHiddenTextPatchCollector {
11
11
  private readonly markersByValueAndStyle;
12
12
  constructor(source: string);
13
13
  marker(value: boolean, inheritedStyle?: string): string;
14
+ lookup(marker: string | undefined): DocxHiddenTextPatch | undefined;
14
15
  private originalStyle;
15
16
  }
16
17
  export declare function patchDocxHiddenText(buffer: ArrayBuffer, patches: readonly DocxHiddenTextPatch[]): Promise<ArrayBuffer>;
@@ -0,0 +1,3 @@
1
+ import { type OoxmlPackage } from './work-ooxml-package';
2
+ import type { WorkCompatibilityIssue } from './work-types';
3
+ export declare function diagnoseDocxLegacyTextEffects(archive: OoxmlPackage, document: Document): Promise<WorkCompatibilityIssue[]>;
@@ -0,0 +1,18 @@
1
+ import { type WorkDocumentLegacyTextEffects } from './work-document-legacy-text-effects';
2
+ export interface DocxLegacyTextEffectsPatch {
3
+ marker: string;
4
+ style?: string;
5
+ effects: WorkDocumentLegacyTextEffects;
6
+ }
7
+ export declare class DocxLegacyTextEffectsPatchCollector {
8
+ readonly patches: DocxLegacyTextEffectsPatch[];
9
+ private nextMarker;
10
+ private readonly occupied;
11
+ private readonly patchesByMarker;
12
+ private readonly markersByEffectsAndStyle;
13
+ constructor(source: string);
14
+ marker(value: WorkDocumentLegacyTextEffects, inheritedStyle?: string): string;
15
+ lookup(marker: string | undefined): DocxLegacyTextEffectsPatch | undefined;
16
+ private originalStyle;
17
+ }
18
+ export declare function patchDocxLegacyTextEffects(buffer: ArrayBuffer, patches: readonly DocxLegacyTextEffectsPatch[]): Promise<ArrayBuffer>;
@@ -0,0 +1,12 @@
1
+ import { type WorkDocumentLegacyTextEffects } from './work-document-legacy-text-effects';
2
+ export type DocxLegacyTextEffectsInspection = {
3
+ status: 'absent';
4
+ } | {
5
+ status: 'invalid';
6
+ } | {
7
+ status: 'valid';
8
+ value: WorkDocumentLegacyTextEffects;
9
+ };
10
+ export declare function inspectDocxLegacyTextEffects(properties: Element | null | undefined): DocxLegacyTextEffectsInspection;
11
+ export declare function docxLegacyTextEffectsFromProperties(properties: Element | null | undefined): WorkDocumentLegacyTextEffects | undefined;
12
+ export declare function resolveDocxLegacyTextEffects(propertySources: readonly Element[]): WorkDocumentLegacyTextEffects | undefined;
@@ -20,6 +20,10 @@ export interface ImportedDocxRunFormatting {
20
20
  kerningThresholdHalfPoints?: number;
21
21
  emphasisMark?: WorkDocumentEmphasisMark;
22
22
  hiddenText?: boolean;
23
+ legacyTextOutline?: boolean;
24
+ legacyTextShadow?: boolean;
25
+ legacyTextEmboss?: boolean;
26
+ legacyTextImprint?: boolean;
23
27
  fontFamily?: string;
24
28
  scriptFonts?: WorkDocumentScriptFonts;
25
29
  scriptFontSlot?: WorkDocumentScriptFontSlot;
@@ -0,0 +1,2 @@
1
+ export declare const DOCX_RUN_PROPERTY_ORDER: readonly ["rStyle", "rFonts", "b", "bCs", "i", "iCs", "caps", "smallCaps", "strike", "dstrike", "outline", "shadow", "emboss", "imprint", "noProof", "snapToGrid", "vanish", "webHidden", "color", "spacing", "w", "kern", "position", "sz", "szCs", "highlight", "u", "effect", "bdr", "shd", "fitText", "vertAlign", "rtl", "cs", "em", "lang", "eastAsianLayout", "specVanish", "rPrChange"];
2
+ export declare const DOCX_RUN_PROPERTY_RANK: Map<string, number>;
Binary file
package/dist/styles.css CHANGED
@@ -9705,6 +9705,19 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
9705
9705
  min-height: 32px;
9706
9706
  }
9707
9707
 
9708
+ .work-document-font-dialog-legacy-effects {
9709
+ border: 1px solid color-mix(in srgb, var(--a3s-line) 78%, transparent);
9710
+ background: var(--a3s-panel-soft);
9711
+ border-radius: 8px;
9712
+ grid-column: 1 / -1;
9713
+ grid-template-columns: repeat(4, minmax(0, 1fr));
9714
+ gap: 8px 16px;
9715
+ min-width: 0;
9716
+ margin: 0;
9717
+ padding: 10px 12px;
9718
+ display: grid;
9719
+ }
9720
+
9708
9721
  .work-document-font-dialog-field > .work-office-select, .work-document-font-dialog-field .work-office-number-field, .work-document-font-dialog-field button[role="combobox"] {
9709
9722
  width: 100%;
9710
9723
  }
@@ -9771,6 +9784,10 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
9771
9784
  grid-template-columns: minmax(0, 1fr);
9772
9785
  }
9773
9786
 
9787
+ .work-document-font-dialog-legacy-effects {
9788
+ grid-template-columns: repeat(2, minmax(0, 1fr));
9789
+ }
9790
+
9774
9791
  .work-document-font-dialog-preview {
9775
9792
  min-height: 88px;
9776
9793
  }
@@ -9806,6 +9823,30 @@ sub [data-office-character-position-half-points], sup [data-office-character-pos
9806
9823
  display: none;
9807
9824
  }
9808
9825
 
9826
+ [data-office-legacy-text-outline="true"] {
9827
+ -webkit-text-fill-color: transparent;
9828
+ -webkit-text-stroke: .045em currentColor;
9829
+ paint-order: stroke fill;
9830
+ }
9831
+
9832
+ [data-office-legacy-text-shadow="true"] {
9833
+ text-shadow: .08em .08em;
9834
+ }
9835
+
9836
+ [data-office-legacy-text-emboss="true"] {
9837
+ -webkit-text-fill-color: currentColor;
9838
+ -webkit-text-stroke: 0 transparent;
9839
+ paint-order: normal;
9840
+ text-shadow: -.045em -.045em #ffffffe6, .045em .045em #00000085;
9841
+ }
9842
+
9843
+ [data-office-legacy-text-imprint="true"] {
9844
+ -webkit-text-fill-color: currentColor;
9845
+ -webkit-text-stroke: 0 transparent;
9846
+ paint-order: normal;
9847
+ text-shadow: .045em .045em #ffffffe6, -.045em -.045em #00000085;
9848
+ }
9849
+
9809
9850
  .work-document-list-tools {
9810
9851
  align-items: center;
9811
9852
  gap: 2px;
@@ -685,6 +685,20 @@ uses browser-authoritative measurement because its invisible run must not
685
685
  contribute Worker/WASM advances. This is an explicit per-paragraph fallback,
686
686
  not a second document tree or a second pagination model.
687
687
 
688
+ Native outline, shadow, emboss, and imprint are resolved through four nullable
689
+ TextStyle properties before DOM serialization and DOCX export. Outline and
690
+ shadow may coexist; emboss and imprint are each exclusive with the other
691
+ enabled effects. Import rejects duplicate, misplaced, namespace-spoofed,
692
+ text-bearing, child-bearing, extra-attribute, unknown, and conflicting property
693
+ sets before they reach paint. Export uses the canonical WordprocessingML run
694
+ property order and collision-safe nested `w:rStyle` markers. Legacy effects are
695
+ the inner marker and hidden text is the outer marker; hidden text is patched
696
+ first and effects second, while only markers that reach a real generated text
697
+ run are committed. This retains an original character style without orphaning
698
+ an empty nested container. The four effects change paint but not advances, so
699
+ eligible paragraphs remain on Worker/WASM layout and the browser/PDF CSS
700
+ projection stays an explicitly bounded approximation.
701
+
688
702
  Tables, images, code blocks, and other complex content use explicit
689
703
  format-specific measurement. Top-level tables are row flows; eligible rows can
690
704
  additionally expose synchronized direct-cell block fragments. Ordered and bullet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/office",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
5
5
  "keywords": [
6
6
  "office",
@@ -89,6 +89,7 @@
89
89
  "playground:visual": "playwright test --config playwright.config.ts",
90
90
  "playground:visual:document-emphasis": "playwright test visual-tests/document-emphasis.functional.spec.ts --config playwright.config.ts",
91
91
  "playground:visual:document-hidden-text": "playwright test visual-tests/document-hidden-text.functional.spec.ts --config playwright.config.ts",
92
+ "playground:visual:document-legacy-text-effects": "playwright test visual-tests/document-legacy-text-effects.functional.spec.ts --config playwright.config.ts",
92
93
  "playground:visual:document-kerning": "playwright test visual-tests/document-kerning.functional.spec.ts --config playwright.config.ts",
93
94
  "playground:visual:document-character-scale": "playwright test visual-tests/document-character-scale.functional.spec.ts --config playwright.config.ts",
94
95
  "playground:visual:document-character-position": "playwright test visual-tests/document-character-position.functional.spec.ts --config playwright.config.ts",
@@ -198,6 +199,8 @@
198
199
  "test:e2e:writer-emphasis:check": "a3s-test check tests/e2e/word-emphasis.acl --json",
199
200
  "test:e2e:writer-hidden-text": "A3S_TEST_SUITE=tests/e2e/word-hidden-text.acl bash scripts/run-a3s-test-web-gate.sh",
200
201
  "test:e2e:writer-hidden-text:check": "a3s-test check tests/e2e/word-hidden-text.acl --json",
202
+ "test:e2e:writer-legacy-text-effects": "A3S_TEST_SUITE=tests/e2e/word-legacy-text-effects.acl bash scripts/run-a3s-test-web-gate.sh",
203
+ "test:e2e:writer-legacy-text-effects:check": "a3s-test check tests/e2e/word-legacy-text-effects.acl --json",
201
204
  "test:e2e:writer-kerning": "A3S_TEST_SUITE=tests/e2e/word-kerning.acl bash scripts/run-a3s-test-web-gate.sh",
202
205
  "test:e2e:writer-kerning:check": "a3s-test check tests/e2e/word-kerning.acl --json",
203
206
  "test:e2e:writer-character-scale": "A3S_TEST_SUITE=tests/e2e/word-character-scale.acl bash scripts/run-a3s-test-web-gate.sh",