@a3s-lab/office 0.31.0 → 0.33.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.
Files changed (63) hide show
  1. package/README.md +63 -8
  2. package/dist/0~3539.js +2 -2
  3. package/dist/0~3557.js +1 -1
  4. package/dist/0~3635.js +1 -1
  5. package/dist/0~4808.js +1 -1
  6. package/dist/0~4980.js +1 -1
  7. package/dist/0~7048.js +1 -2
  8. package/dist/0~7240.js +1 -1
  9. package/dist/0~7614.js +1 -1
  10. package/dist/{0~6090.js → 0~8136.js} +71 -2
  11. package/dist/{0~4595.js → 0~9073.js} +3 -72
  12. package/dist/0~9445.js +1 -1
  13. package/dist/0~document-editor.js +1087 -6
  14. package/dist/0~markdown-editor.js +2 -2
  15. package/dist/0~pdf-page-organization-engine.js +187 -0
  16. package/dist/0~pdf-viewer.js +1014 -30
  17. package/dist/0~presentation-editor.js +2 -2
  18. package/dist/0~spreadsheet-editor.js +4 -3
  19. package/dist/0~work-docx-export.js +1 -1
  20. package/dist/0~work-docx-import.js +10 -27
  21. package/dist/0~work-docx-large-document-import.js +1 -1
  22. package/dist/0~work-office-diagnostics.js +3 -3
  23. package/dist/0~work-pptx-import.js +1 -1
  24. package/dist/{1544.js → 3266.js} +17 -1862
  25. package/dist/4121.js +13 -0
  26. package/dist/4166.js +3848 -0
  27. package/dist/{6282.js → 4174.js} +383 -10
  28. package/dist/9333.js +1849 -0
  29. package/dist/core.d.ts +1 -0
  30. package/dist/core.js +5259 -4
  31. package/dist/index.js +3 -3
  32. package/dist/internal/features/work/editors/document-compare-dialog.d.ts +14 -0
  33. package/dist/internal/features/work/editors/document-toolbar.d.ts +3 -1
  34. package/dist/internal/features/work/editors/pdf-editor-extensions.d.ts +11 -0
  35. package/dist/internal/features/work/editors/pdf-page-organization-engine.d.ts +2 -0
  36. package/dist/internal/features/work/editors/pdf-page-organization-plan.d.ts +10 -0
  37. package/dist/internal/features/work/editors/pdf-page-organization-types.d.ts +68 -0
  38. package/dist/internal/features/work/editors/pdf-page-organization-worker-client.d.ts +2 -0
  39. package/dist/internal/features/work/editors/pdf-page-organization-worker-protocol.d.ts +13 -0
  40. package/dist/internal/features/work/editors/pdf-page-organization.d.ts +3 -0
  41. package/dist/internal/features/work/editors/pdf-page-organization.worker.d.ts +1 -0
  42. package/dist/internal/features/work/editors/pdf-page-organizer-dialog.d.ts +17 -0
  43. package/dist/internal/features/work/editors/pdf-thumbnail-rail.d.ts +4 -0
  44. package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
  45. package/dist/internal/features/work/editors/pdf-viewer.d.ts +3 -1
  46. package/dist/internal/features/work/editors/use-document-comparison.d.ts +9 -0
  47. package/dist/internal/features/work/editors/use-pdf-page-organization.d.ts +38 -0
  48. package/dist/internal/features/work/work-document-changes.d.ts +5 -0
  49. package/dist/internal/features/work/work-document-compare-diff.d.ts +38 -0
  50. package/dist/internal/features/work/work-document-compare-stability.d.ts +5 -0
  51. package/dist/internal/features/work/work-document-compare.d.ts +27 -0
  52. package/dist/office-kernel.wasm +0 -0
  53. package/dist/pdf-page-organization.worker.js +19667 -0
  54. package/dist/pdf-page-organization.worker.js.LICENSE.txt +14 -0
  55. package/dist/react.d.ts +1 -0
  56. package/dist/styles.css +509 -0
  57. package/dist/vue.d.ts +3 -1
  58. package/dist/vue.js +2 -0
  59. package/dist/web-component.d.ts +3 -1
  60. package/dist/web-component.js +9 -0
  61. package/docs/latest/en/browser-editor-architecture.md +52 -6
  62. package/package.json +10 -3
  63. package/dist/4104.js +0 -9336
@@ -1,6 +1,7 @@
1
+ import { __webpack_require__ } from "./0~rslib-runtime.js";
1
2
  import { Extension, Mark, Node as core_Node, ResizableNodeView, generateHTML, getSchema, mergeAttributes } from "@tiptap/core";
2
3
  import { Collaboration, isChangeOrigin } from "@tiptap/extension-collaboration";
3
- import { NodeSelection, Plugin, PluginKey, Selection, TextSelection } from "@tiptap/pm/state";
4
+ import { EditorState, NodeSelection, Plugin, PluginKey, Selection, TextSelection } from "@tiptap/pm/state";
4
5
  import { AddMarkStep, Mapping, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from "@tiptap/pm/transform";
5
6
  import { defaultDeleteFilter, defaultProtectedNodes, prosemirrorJSONToYXmlFragment, ySyncPluginKey, yXmlFragmentToProsemirrorJSON } from "@tiptap/y-tiptap";
6
7
  import extension_color from "@tiptap/extension-color";
@@ -21,10 +22,29 @@ import { CellSelection, TableMap, isInTable, selectedRect } from "@tiptap/pm/tab
21
22
  import font_family from "@tiptap/extension-text-style/font-family";
22
23
  import { TextStyle } from "@tiptap/extension-text-style";
23
24
  import extension_highlight from "@tiptap/extension-highlight";
24
- import { documentRunBorderDomAttributes, DOCUMENT_SCRIPT_FONT_SLOT_ATTRIBUTE, DOCUMENT_RUN_SHADING_ATTRIBUTE, serializeDocumentRunBorder, documentScriptFontSlotFromElement, documentScriptFontsForAllText, serializeDocumentScriptFonts, primeDocumentIntegrityFeatures, uniqueDocumentParagraphIdentity, documentScriptFontsDomAttributes, documentHighlightForCssColor, documentTableOfContentsValueFromElement, buildDocumentIndexEntries, normalizeDocumentScriptFonts, buildDocumentTableOfContentsEntries, serializeDocumentParagraphShading, documentHasIntegrityFeature, parseDocumentRunBorder, documentIndexValueFromElement, normalizeDocumentParagraphId, DOCUMENT_PARAGRAPH_TEXT_ID_ATTRIBUTE, documentProofingLanguagesFromElement, normalizeDocumentProofingLanguages, normalizeDocumentIndexOptions, parseDocumentParagraphBordersElement, parseDocumentParagraphBorders, documentScriptFontsFromElement, DOCUMENT_RUN_BORDER_ATTRIBUTE, normalizeDocumentTableOfContentsValue, DOCUMENT_PARAGRAPH_ID_ATTRIBUTE, documentNoProofFromElement, normalizeDocumentRunShading, documentIndexEntryFromElement, documentScriptFontSegments, normalizeDocumentIndexEntry, documentFontNameFromCssFamily, documentRunShadingDomAttributes, normalizeDocumentIndexEntryDraft, parseDocumentScriptFonts, normalizeDocumentRunBorder, normalizeDocumentParagraphBorder, serializeDocumentParagraphBorders, parseDocxThemeReference, parseDocumentRunShading, DOCUMENT_HIGHLIGHT_ATTRIBUTE, serializeDocumentRunShading, workDocumentOutlineLevel, DOCUMENT_PARAGRAPH_BORDERS_ATTRIBUTE, createDocumentParagraphIdentityRegistry, DOCUMENT_NO_PROOF_ATTRIBUTE, serializeDocxThemeReference, documentRunBorderIsVisible, normalizeDocumentTableOfContentsHtml, cssDocumentFontFamily, documentParagraphShadingDomAttributes, normalizeDocumentIndexValue, DOCUMENT_PROOFING_LANGUAGES_ATTRIBUTE, documentParagraphBordersDomAttributes, DOCUMENT_SCRIPT_FONTS_ATTRIBUTE, normalizeDocumentHighlight, normalizeDocumentParagraphIdentity, createOfficeId as createWorkId, DEFAULT_DOCUMENT_TABLE_OF_CONTENTS_OPTIONS, DEFAULT_DOCUMENT_INDEX_OPTIONS, documentHighlightFromElement, normalizeDocumentLanguageTag, parseDocumentParagraphShading, normalizeDocumentNoProof, parseDocumentParagraphShadingElement, createDocumentParagraphIdentity, documentHighlightDomAttributes, DocumentParagraphIdentity, parseDocumentRunShadingElement, parseDocumentProofingLanguages, collectWorkDocumentOutline, documentScriptFontSlotFromHint, normalizeDocumentTableOfContentsOptions, documentBorderPresentation, documentScriptFontFamilyForRendering, parseDocumentRunBorderElement, documentProofingDomAttributes, normalizeDocumentScriptFontSlot, serializeDocumentProofingLanguages } from "./4121.js";
25
+ import { documentRunBorderDomAttributes, DOCUMENT_SCRIPT_FONT_SLOT_ATTRIBUTE, DOCUMENT_RUN_SHADING_ATTRIBUTE, serializeDocumentRunBorder, documentScriptFontSlotFromElement, documentScriptFontsForAllText, createArtifact as createWorkArtifact, serializeDocumentScriptFonts, primeDocumentIntegrityFeatures, uniqueDocumentParagraphIdentity, documentScriptFontsDomAttributes, documentHighlightForCssColor, documentTableOfContentsValueFromElement, buildDocumentIndexEntries, normalizeDocumentScriptFonts, buildDocumentTableOfContentsEntries, serializeDocumentParagraphShading, documentHasIntegrityFeature, parseDocumentRunBorder, documentIndexValueFromElement, normalizeDocumentParagraphId, DOCUMENT_PARAGRAPH_TEXT_ID_ATTRIBUTE, documentProofingLanguagesFromElement, normalizeDocumentProofingLanguages, normalizeDocumentIndexOptions, parseDocumentParagraphBordersElement, parseDocumentParagraphBorders, documentScriptFontsFromElement, DOCUMENT_RUN_BORDER_ATTRIBUTE, normalizeDocumentTableOfContentsValue, DOCUMENT_PARAGRAPH_ID_ATTRIBUTE, documentNoProofFromElement, normalizeDocumentRunShading, documentIndexEntryFromElement, documentScriptFontSegments, normalizeDocumentIndexEntry, documentFontNameFromCssFamily, documentRunShadingDomAttributes, normalizeDocumentIndexEntryDraft, parseDocumentScriptFonts, normalizeDocumentRunBorder, normalizeDocumentParagraphBorder, serializeDocumentParagraphBorders, parseDocxThemeReference, parseDocumentRunShading, DOCUMENT_HIGHLIGHT_ATTRIBUTE, serializeDocumentRunShading, workDocumentOutlineLevel, DOCUMENT_PARAGRAPH_BORDERS_ATTRIBUTE, createDocumentParagraphIdentityRegistry, DOCUMENT_NO_PROOF_ATTRIBUTE, serializeDocxThemeReference, documentRunBorderIsVisible, normalizeDocumentTableOfContentsHtml, cssDocumentFontFamily, documentParagraphShadingDomAttributes, normalizeDocumentIndexValue, DOCUMENT_PROOFING_LANGUAGES_ATTRIBUTE, documentParagraphBordersDomAttributes, DOCUMENT_SCRIPT_FONTS_ATTRIBUTE, normalizeDocumentHighlight, normalizeDocumentParagraphIdentity, createOfficeId as createWorkId, DEFAULT_DOCUMENT_TABLE_OF_CONTENTS_OPTIONS, DEFAULT_DOCUMENT_INDEX_OPTIONS, documentHighlightFromElement, normalizeDocumentLanguageTag, parseDocumentParagraphShading, normalizeDocumentNoProof, parseDocumentParagraphShadingElement, createDocumentParagraphIdentity, documentHighlightDomAttributes, DocumentParagraphIdentity, parseDocumentRunShadingElement, parseDocumentProofingLanguages, collectWorkDocumentOutline, documentScriptFontSlotFromHint, normalizeDocumentTableOfContentsOptions, documentBorderPresentation, documentScriptFontFamilyForRendering, parseDocumentRunBorderElement, documentProofingDomAttributes, normalizeDocumentScriptFontSlot, serializeDocumentProofingLanguages } from "./4121.js";
25
26
  import { workOfficeCollaborationJsonEqual, canonicalWorkOfficeCollaborationJson, isWorkOfficeCollaborationRecord, cloneWorkOfficeCollaborationJson } from "./4650.js";
26
27
  import { assertWorkOfficeCollaborationEditable, markWorkOfficeCollaborationInitialized, assertWorkOfficeCollaborationOrigin, initializeWorkOfficeCollaborationMetadata, assertWorkOfficeCollaborationWritable, OfficeCollaborationError as WorkOfficeCollaborationError, readOfficeCollaborationMetadata as readWorkOfficeCollaborationMetadata, registerWorkOfficeCollaborationInitializer } from "./9787.js";
27
28
  import * as __rspack_external_yjs from "yjs";
29
+ var work_document_model_codec_namespaceObject = {};
30
+ __webpack_require__.r(work_document_model_codec_namespaceObject);
31
+ __webpack_require__.d(work_document_model_codec_namespaceObject, {
32
+ createWorkDocumentModelFromContent: ()=>work_document_model_codec_createWorkDocumentModelFromContent,
33
+ materializeWorkDocumentContent: ()=>work_document_model_codec_materializeWorkDocumentContent,
34
+ L: ()=>serializeWorkDocumentNode,
35
+ m: ()=>workDocumentSchema
36
+ });
37
+ var work_document_model_namespaceObject = {};
38
+ __webpack_require__.r(work_document_model_namespaceObject);
39
+ __webpack_require__.d(work_document_model_namespaceObject, {
40
+ U7: ()=>createSchemaDerivedWorkDocumentModel,
41
+ createSchemaValidatedWorkDocumentModel: ()=>work_document_model_createSchemaValidatedWorkDocumentModel,
42
+ MQ: ()=>createWorkDocumentModel,
43
+ hs: ()=>documentModelForContent,
44
+ BK: ()=>documentModelForHtml,
45
+ gK: ()=>documentModelHasTrustedInitialIntegrityFeatures,
46
+ Kh: ()=>resolveWorkDocumentEditorInput
47
+ });
28
48
  const BOOKMARK_REFERENCE_SELECTOR = 'span[data-document-cross-reference][data-reference-target-type="bookmark"]';
29
49
  const BLOCK_TEXT_CONTAINER_NAMES = new Set([
30
50
  'ADDRESS',
@@ -1828,7 +1848,7 @@ function createWorkDocumentModelWithFingerprint(root, htmlFingerprint, previous)
1828
1848
  transferLazyDocumentModelState(previous, model);
1829
1849
  return model;
1830
1850
  }
1831
- function createSchemaValidatedWorkDocumentModel(html, root, options = {}) {
1851
+ function work_document_model_createSchemaValidatedWorkDocumentModel(html, root, options = {}) {
1832
1852
  const model = createWorkDocumentModel(html, root, options.previous);
1833
1853
  schemaValidatedDocumentModels.set(model, {
1834
1854
  html,
@@ -8887,6 +8907,14 @@ function activeParagraphNodeTypes(editor) {
8887
8907
  function work_document_tab_stops_isRecord(value) {
8888
8908
  return 'object' == typeof value && null !== value && !Array.isArray(value);
8889
8909
  }
8910
+ const DOCUMENT_PARAGRAPH_CHANGE_ATTRIBUTES = [
8911
+ 'paragraphChangeKind',
8912
+ 'paragraphChangeId',
8913
+ 'paragraphChangeActorId',
8914
+ 'paragraphChangeAuthor',
8915
+ 'paragraphChangeDate',
8916
+ 'paragraphChangeBefore'
8917
+ ];
8890
8918
  const DOCUMENT_PARAGRAPH_FORMAT_ATTRIBUTES = [
8891
8919
  'textAlign',
8892
8920
  'paragraphDirection',
@@ -9261,7 +9289,12 @@ const DocumentChange = Mark.create({
9261
9289
  paragraphChangeActorId: paragraphChangeAttribute('actorId', 'data-change-actor-id'),
9262
9290
  paragraphChangeAuthor: paragraphChangeAttribute('author', 'data-change-author'),
9263
9291
  paragraphChangeDate: paragraphChangeAttribute('date', 'data-change-date'),
9264
- paragraphChangeBefore: paragraphChangeAttribute('before', 'data-change-before')
9292
+ paragraphChangeBefore: paragraphChangeAttribute('before', 'data-change-before'),
9293
+ blockChangeKind: blockChangeAttribute('kind'),
9294
+ blockChangeId: blockChangeAttribute('id'),
9295
+ blockChangeActorId: blockChangeAttribute('actorId'),
9296
+ blockChangeAuthor: blockChangeAttribute('author'),
9297
+ blockChangeDate: blockChangeAttribute('date')
9265
9298
  }
9266
9299
  }
9267
9300
  ];
@@ -9379,7 +9412,33 @@ const DocumentChange = Mark.create({
9379
9412
  });
9380
9413
  function collectDocumentChanges(document1) {
9381
9414
  const changes = new Map();
9415
+ const blockChangeRanges = new Map();
9382
9416
  document1.descendants((node, position)=>{
9417
+ if (('paragraph' === node.type.name || 'heading' === node.type.name) && ('insertion' === node.attrs.blockChangeKind || 'deletion' === node.attrs.blockChangeKind)) {
9418
+ const kind = node.attrs.blockChangeKind;
9419
+ const id = work_document_changes_stringAttribute(node.attrs.blockChangeId) || `block-change-at-${position}`;
9420
+ const key = `${kind}:${id}`;
9421
+ const from = position;
9422
+ const to = position + node.nodeSize;
9423
+ changes.set(key, {
9424
+ id,
9425
+ kind,
9426
+ ...work_document_changes_stringAttribute(node.attrs.blockChangeActorId) ? {
9427
+ actorId: work_document_changes_stringAttribute(node.attrs.blockChangeActorId)
9428
+ } : {},
9429
+ author: work_document_changes_stringAttribute(node.attrs.blockChangeAuthor) || '未知审阅者',
9430
+ date: work_document_changes_stringAttribute(node.attrs.blockChangeDate),
9431
+ from,
9432
+ to,
9433
+ text: node.textContent
9434
+ });
9435
+ const ranges = blockChangeRanges.get(key) ?? [];
9436
+ ranges.push({
9437
+ from,
9438
+ to
9439
+ });
9440
+ blockChangeRanges.set(key, ranges);
9441
+ }
9383
9442
  if (('paragraph' === node.type.name || 'heading' === node.type.name) && 'paragraph-formatting' === node.attrs.paragraphChangeKind) {
9384
9443
  const id = work_document_changes_stringAttribute(node.attrs.paragraphChangeId) || `paragraph-change-at-${position}`;
9385
9444
  const key = `paragraph-formatting:${id}`;
@@ -9409,6 +9468,7 @@ function collectDocumentChanges(document1) {
9409
9468
  const kind = changeKind(mark.attrs.kind);
9410
9469
  const id = work_document_changes_stringAttribute(mark.attrs.id) || `change-at-${position}`;
9411
9470
  const key = `${kind}:${id}`;
9471
+ if (blockChangeRanges.get(key)?.some((range)=>position >= range.from && position + node.nodeSize <= range.to)) return;
9412
9472
  const current = changes.get(key);
9413
9473
  if (current) {
9414
9474
  current.from = Math.min(current.from, position);
@@ -9431,10 +9491,24 @@ function collectDocumentChanges(document1) {
9431
9491
  });
9432
9492
  return Array.from(changes.values()).sort((left, right)=>left.from - right.from);
9433
9493
  }
9494
+ function resolveAllDocumentChanges(document1, decision) {
9495
+ if (!collectDocumentChanges(document1).length) return document1;
9496
+ const type = document1.type.schema.marks.documentChange;
9497
+ if (!type) return null;
9498
+ const state = EditorState.create({
9499
+ doc: document1
9500
+ });
9501
+ const transaction = state.tr;
9502
+ return resolveDocumentChangesTransaction(state, transaction, type, decision) > 0 ? transaction.doc : null;
9503
+ }
9434
9504
  function resolveDocumentChangesCommand({ state, tr }, type, decision, ids) {
9505
+ return resolveDocumentChangesTransaction(state, tr, type, decision, ids);
9506
+ }
9507
+ function resolveDocumentChangesTransaction(state, tr, type, decision, ids) {
9435
9508
  const segments = documentChangeSegments(state.doc, type).filter((segment)=>!ids || ids.has(segment.id));
9436
9509
  const paragraphSegments = paragraphChangeSegments(state.doc).filter((segment)=>!ids || ids.has(segment.id));
9437
- if (!segments.length && !paragraphSegments.length) return 0;
9510
+ const blockSegments = blockChangeSegments(state.doc).filter((segment)=>!ids || ids.has(segment.id));
9511
+ if (!segments.length && !paragraphSegments.length && !blockSegments.length) return 0;
9438
9512
  if (paragraphSegments.some((segment)=>!parseDocumentParagraphFormatting(segment.before)) || 'reject' === decision && segments.some((segment)=>'formatting' === segment.kind && !parseDocumentCharacterFormatting(segment.before))) return 0;
9439
9513
  closeHistory(tr);
9440
9514
  tr.setMeta(documentChangePluginKey, {
@@ -9443,7 +9517,9 @@ function resolveDocumentChangesCommand({ state, tr }, type, decision, ids) {
9443
9517
  const markRemovals = [];
9444
9518
  const contentDeletions = [];
9445
9519
  const formattingRejections = [];
9520
+ const removedBlockIds = new Set(blockSegments.filter((segment)=>'accept' === decision && 'deletion' === segment.kind || 'reject' === decision && 'insertion' === segment.kind).map((segment)=>segment.id));
9446
9521
  for (const segment of segments){
9522
+ if (removedBlockIds.has(segment.id)) continue;
9447
9523
  if ('formatting' === segment.kind) {
9448
9524
  markRemovals.push(segment);
9449
9525
  if ('reject' === decision) formattingRejections.push(segment);
@@ -9460,11 +9536,25 @@ function resolveDocumentChangesCommand({ state, tr }, type, decision, ids) {
9460
9536
  if (!attributes) return 0;
9461
9537
  tr.setNodeMarkup(segment.position, void 0, attributes);
9462
9538
  }
9539
+ for (const segment of blockSegments){
9540
+ if (removedBlockIds.has(segment.id)) continue;
9541
+ const position = tr.mapping.map(segment.position);
9542
+ const node = tr.doc.nodeAt(position);
9543
+ if (!node || 'paragraph' !== node.type.name && 'heading' !== node.type.name) return 0;
9544
+ tr.setNodeMarkup(position, void 0, clearDocumentBlockChangeAttributes(node.attrs));
9545
+ }
9463
9546
  for (const segment of markRemovals)tr.removeMark(segment.from, segment.to, type);
9464
9547
  for (const segment of contentDeletions.sort((left, right)=>right.from - left.from))tr.delete(segment.from, segment.to);
9548
+ for (const segment of blockSegments.filter((candidate)=>removedBlockIds.has(candidate.id)).sort((left, right)=>right.position - left.position)){
9549
+ const from = tr.mapping.map(segment.position);
9550
+ const node = tr.doc.nodeAt(from);
9551
+ if (!node || 'paragraph' !== node.type.name && 'heading' !== node.type.name) return 0;
9552
+ tr.delete(from, from + node.nodeSize);
9553
+ }
9465
9554
  return tr.docChanged ? new Set([
9466
9555
  ...segments,
9467
- ...paragraphSegments
9556
+ ...paragraphSegments,
9557
+ ...blockSegments
9468
9558
  ].map((segment)=>segment.id)).size : 0;
9469
9559
  }
9470
9560
  function trackedReplacement(transaction, document1, type, from, to, text, createChange) {
@@ -9533,6 +9623,20 @@ function paragraphChangeSegments(document1) {
9533
9623
  });
9534
9624
  return segments;
9535
9625
  }
9626
+ function blockChangeSegments(document1) {
9627
+ const segments = [];
9628
+ document1.descendants((node, position)=>{
9629
+ if ('paragraph' !== node.type.name && 'heading' !== node.type.name || 'insertion' !== node.attrs.blockChangeKind && 'deletion' !== node.attrs.blockChangeKind) return;
9630
+ segments.push({
9631
+ id: work_document_changes_stringAttribute(node.attrs.blockChangeId) || `block-change-at-${position}`,
9632
+ kind: node.attrs.blockChangeKind,
9633
+ position,
9634
+ from: position + 1,
9635
+ to: position + 1 + node.content.size
9636
+ });
9637
+ });
9638
+ return segments;
9639
+ }
9536
9640
  function markFragment(fragment, insertion, type) {
9537
9641
  const nodes = [];
9538
9642
  fragment.forEach((node)=>{
@@ -9609,6 +9713,41 @@ function paragraphChangeAttribute(field, htmlName) {
9609
9713
  }
9610
9714
  };
9611
9715
  }
9716
+ function blockChangeAttribute(field) {
9717
+ const modelName = `blockChange${field[0]?.toUpperCase() ?? ''}${field.slice(1)}`;
9718
+ const htmlName = 'kind' === field ? 'data-block-change-kind' : `data-block-change-${field.replace('actorId', 'actor-id')}`;
9719
+ return {
9720
+ default: 'kind' === field ? null : '',
9721
+ parseHTML: (element)=>{
9722
+ if ('true' !== element.getAttribute('data-document-block-change')) return 'kind' === field ? null : '';
9723
+ const value = element.getAttribute(htmlName) ?? '';
9724
+ if ('kind' === field) return 'insertion' === value || 'deletion' === value ? value : null;
9725
+ return value;
9726
+ },
9727
+ renderHTML: (attributes)=>{
9728
+ const kind = attributes.blockChangeKind;
9729
+ if ('insertion' !== kind && 'deletion' !== kind) return {};
9730
+ if ('kind' === field) return {
9731
+ 'data-document-block-change': 'true',
9732
+ 'data-block-change-kind': kind
9733
+ };
9734
+ const value = work_document_changes_stringAttribute(attributes[modelName]);
9735
+ return value ? {
9736
+ [htmlName]: value
9737
+ } : {};
9738
+ }
9739
+ };
9740
+ }
9741
+ function clearDocumentBlockChangeAttributes(attributes) {
9742
+ return {
9743
+ ...attributes,
9744
+ blockChangeKind: null,
9745
+ blockChangeId: '',
9746
+ blockChangeActorId: '',
9747
+ blockChangeAuthor: '',
9748
+ blockChangeDate: ''
9749
+ };
9750
+ }
9612
9751
  function work_document_changes_stringAttribute(value) {
9613
9752
  return 'string' == typeof value ? value : '';
9614
9753
  }
@@ -19374,7 +19513,7 @@ function workDocumentSchema() {
19374
19513
  function serializeWorkDocumentNode(root) {
19375
19514
  return generateHTML(materializeWindowedDocumentModel(root), documentExtensions());
19376
19515
  }
19377
- function createWorkDocumentModelFromContent(content) {
19516
+ function work_document_model_codec_createWorkDocumentModelFromContent(content) {
19378
19517
  const previous = content.model;
19379
19518
  const synchronized = syncDocumentContentFromHtml(content, content.html);
19380
19519
  const document1 = new DOMParser().parseFromString(synchronized.html, 'text/html');
@@ -19384,7 +19523,7 @@ function createWorkDocumentModelFromContent(content) {
19384
19523
  model: createWorkDocumentModel(synchronized.html, root, previous)
19385
19524
  };
19386
19525
  }
19387
- function materializeWorkDocumentContent(content) {
19526
+ function work_document_model_codec_materializeWorkDocumentContent(content) {
19388
19527
  const model = documentModelForContent(content);
19389
19528
  if (!model) return content;
19390
19529
  let html;
@@ -20977,7 +21116,7 @@ function workOfficeDocumentCollaborationNode(session) {
20977
21116
  }
20978
21117
  function preparedDocumentContent(content) {
20979
21118
  if (!content || 'document' !== content.type || 'string' != typeof content.html) throw new WorkOfficeCollaborationError('office.collaboration.content_invalid', 'Document collaboration initialization requires a valid Document content value.');
20980
- const prepared = documentModelForContent(content) ? content : createWorkDocumentModelFromContent(content);
21119
+ const prepared = documentModelForContent(content) ? content : work_document_model_codec_createWorkDocumentModelFromContent(content);
20981
21120
  requiredDocumentModel(prepared);
20982
21121
  return prepared;
20983
21122
  }
@@ -21066,6 +21205,240 @@ function documentCollaborationPermissionExtension(session) {
21066
21205
  function transactionTouchesRoot(transaction, root) {
21067
21206
  return new Set(transaction.changedParentTypes.keys()).has(root);
21068
21207
  }
21208
+ function fileNameWithoutExtension(value) {
21209
+ return value.replace(/\.[^.]+$/, '').trim() || '导入的文件';
21210
+ }
21211
+ function work_file_download_safeFileName(value) {
21212
+ return value.replace(/[<>:"/\\|?*\u0000-\u001f]/g, '_').trim() || 'A3S Work 文件';
21213
+ }
21214
+ function work_file_download_downloadBlob(blob, name) {
21215
+ const url = URL.createObjectURL(blob);
21216
+ const anchor = document.createElement('a');
21217
+ anchor.href = url;
21218
+ anchor.download = name;
21219
+ anchor.click();
21220
+ window.setTimeout(()=>URL.revokeObjectURL(url), 0);
21221
+ }
21222
+ const sourceBlobs = new Map();
21223
+ function rememberWorkSourceBlob(artifactId, source) {
21224
+ sourceBlobs.set(artifactId, source);
21225
+ }
21226
+ function forgetWorkSourceBlob(artifactId) {
21227
+ sourceBlobs.delete(artifactId);
21228
+ }
21229
+ function moveWorkSourceBlob(sourceArtifactId, targetArtifactId) {
21230
+ if (sourceArtifactId === targetArtifactId) return;
21231
+ const source = sourceBlobs.get(sourceArtifactId);
21232
+ if (!source) return;
21233
+ if (sourceBlobs.has(targetArtifactId)) throw new Error(`The target artifact '${targetArtifactId}' already owns a source file.`);
21234
+ sourceBlobs.set(targetArtifactId, source);
21235
+ sourceBlobs.delete(sourceArtifactId);
21236
+ }
21237
+ async function readWorkSourceBlob(artifact) {
21238
+ const source = sourceBlobs.get(artifact.id);
21239
+ if (source) return source;
21240
+ throw new Error(artifact.source ? 'The original file is not available in this browser session. Register it again before opening or exporting this source-backed artifact.' : 'This document has no original source file.');
21241
+ }
21242
+ async function readVerifiedWorkSourceBytes(artifact) {
21243
+ const source = await readWorkSourceBlob(artifact);
21244
+ const bytes = await source.arrayBuffer();
21245
+ const expected = artifact.source?.fingerprint;
21246
+ if (expected && await workSourceFingerprint(bytes) !== expected) throw new Error('The registered source file does not match the imported source fingerprint.');
21247
+ return bytes;
21248
+ }
21249
+ async function workSourceFingerprint(bytes) {
21250
+ const subtle = globalThis.crypto?.subtle;
21251
+ if (!subtle) throw new Error('SHA-256 source fingerprinting is unavailable.');
21252
+ const digest = new Uint8Array(await subtle.digest('SHA-256', bytes));
21253
+ return `sha256:${Array.from(digest, (value)=>value.toString(16).padStart(2, '0')).join('')}`;
21254
+ }
21255
+ const DOCX_CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
21256
+ async function importWorkDocumentFile(file, extension, context) {
21257
+ let html;
21258
+ if ('docx' === extension) {
21259
+ const importStartedAt = documentImportNow();
21260
+ const arrayBuffer = context?.bytes ?? await file.arrayBuffer();
21261
+ context?.controller.report('parsing', 0.1);
21262
+ const { OoxmlPackage } = await import("./4121.js");
21263
+ const packageStartedAt = documentImportNow();
21264
+ const sourcePackage = await OoxmlPackage.load(arrayBuffer).catch(()=>null);
21265
+ recordDocumentImportMeasure('a3s-office.document.package', packageStartedAt, documentImportNow());
21266
+ const largeSimpleStartedAt = documentImportNow();
21267
+ const { largeSimpleDocxPackageIsCandidate, largeSimpleDocxCompatibilityReport, largeSimpleDocxContent, parseLargeSimpleDocxPackage } = await import("./0~work-docx-large-document-import.js");
21268
+ let largeSimple = null;
21269
+ let largeSimplePath = 'ineligible';
21270
+ if (sourcePackage && largeSimpleDocxPackageIsCandidate(sourcePackage)) {
21271
+ const { parseLargeSimpleDocxInWorker } = await import("./0~work-document-import-worker-client.js");
21272
+ const inflateStartedAt = documentImportNow();
21273
+ const documentXmlBytes = await sourcePackage.bytes('word/document.xml').catch(()=>null);
21274
+ recordDocumentImportMeasure('a3s-office.document.large-simple-inflate', inflateStartedAt, documentImportNow());
21275
+ const workerAttempt = documentXmlBytes ? await parseLargeSimpleDocxInWorker(transferableDocumentXmlBuffer(documentXmlBytes), {}, context?.controller.signal) : null;
21276
+ if (workerAttempt?.status === 'accepted') {
21277
+ largeSimple = workerAttempt.result;
21278
+ largeSimplePath = 'worker';
21279
+ } else if (!workerAttempt) {
21280
+ largeSimple = await parseLargeSimpleDocxPackage(sourcePackage).catch(()=>null);
21281
+ largeSimplePath = largeSimple ? 'synchronous-fallback' : 'ineligible';
21282
+ }
21283
+ }
21284
+ recordDocumentImportMeasure('a3s-office.document.large-simple-inspection', largeSimpleStartedAt, documentImportNow(), {
21285
+ accepted: Boolean(largeSimple),
21286
+ path: largeSimplePath
21287
+ });
21288
+ if (largeSimple) {
21289
+ context?.controller.report('parsing', 0.8);
21290
+ const modelStartedAt = documentImportNow();
21291
+ const { createSchemaValidatedWorkDocumentModel } = await Promise.resolve(work_document_model_namespaceObject);
21292
+ const artifact = createWorkArtifact('blank-document');
21293
+ artifact.title = fileNameWithoutExtension(file.name);
21294
+ const fastContent = largeSimpleDocxContent(largeSimple);
21295
+ artifact.content = {
21296
+ ...fastContent,
21297
+ model: createSchemaValidatedWorkDocumentModel(largeSimple.html, largeSimple.root, {
21298
+ initialIntegrityFeatures: 0,
21299
+ previous: fastContent.model
21300
+ })
21301
+ };
21302
+ recordDocumentImportMeasure('a3s-office.document.structured-model', modelStartedAt, documentImportNow(), {
21303
+ logicalBlocks: largeSimple.logicalBlockCount,
21304
+ tableRows: largeSimple.tableRowCount,
21305
+ windowed: true
21306
+ });
21307
+ context?.controller.report('analyzing', 0);
21308
+ artifact.compatibility = largeSimpleDocxCompatibilityReport(file, largeSimple);
21309
+ context?.controller.report('analyzing', 1);
21310
+ artifact.source = {
21311
+ name: file.name,
21312
+ contentType: file.type || DOCX_CONTENT_TYPE,
21313
+ size: file.size,
21314
+ updatedAt: file.lastModified || Date.now(),
21315
+ fingerprint: await workSourceFingerprint(arrayBuffer)
21316
+ };
21317
+ rememberWorkSourceBlob(artifact.id, file);
21318
+ recordDocumentImportMeasure('a3s-office.document.import-total', importStartedAt, documentImportNow(), {
21319
+ path: 'large-simple'
21320
+ });
21321
+ return artifact;
21322
+ }
21323
+ const mammoth = await import("mammoth");
21324
+ const { applyDocxSectionsToHtml, prepareDocxImport, readDocxLayout } = await import("./0~work-docx-import.js");
21325
+ const prepareStartedAt = documentImportNow();
21326
+ const prepared = await prepareDocxImport(arrayBuffer, sourcePackage ?? void 0).catch(()=>null);
21327
+ recordDocumentImportMeasure('a3s-office.document.prepare', prepareStartedAt, documentImportNow());
21328
+ context?.controller.report('parsing', 0.45);
21329
+ const conversionBuffer = prepared?.conversionBuffer ?? arrayBuffer;
21330
+ const input = {
21331
+ arrayBuffer: conversionBuffer,
21332
+ buffer: conversionBuffer
21333
+ };
21334
+ const mammothStartedAt = documentImportNow();
21335
+ const result = await mammoth.convertToHtml(input, {
21336
+ styleMap: [
21337
+ "br[type='page'] => hr.work-page-break[data-page-break='true']:fresh"
21338
+ ]
21339
+ });
21340
+ recordDocumentImportMeasure('a3s-office.document.mammoth', mammothStartedAt, documentImportNow());
21341
+ context?.controller.report('parsing', 0.8);
21342
+ const markersStartedAt = documentImportNow();
21343
+ html = prepared ? applyDocxSectionsToHtml(result.value, prepared.sections, prepared.captionMarkers, prepared.bookmarkMarkers, prepared.changeMarkers, prepared.commentMarkers, prepared.fieldMarkers, prepared.tableOfContentsMarkers, prepared.indexMarkers, prepared.equationMarkers, prepared.citationMarkers, prepared.listMarkers, prepared.imageLayoutMarkers, prepared.paragraphIdentityMarkers, prepared.paragraphFormattingChangeMarkers, prepared.paragraphAlignmentMarkers, prepared.runFormattingMarkers, prepared.paragraphDirectionMarkers, prepared.paragraphIndentMarkers, prepared.paragraphSpacingMarkers, prepared.paragraphBorderMarkers, prepared.paragraphShadingMarkers, prepared.paragraphPaginationMarkers, prepared.bibliography, prepared.tabStopMarkers, prepared.tableCellMarkers, prepared.tableRowMarkers, prepared.tableSizingMarkers) : result.value;
21344
+ recordDocumentImportMeasure('a3s-office.document.markers', markersStartedAt, documentImportNow());
21345
+ const layout = prepared ? {
21346
+ ...documentContentLayoutProperties(prepared.sections[0].layout),
21347
+ ...prepared.pageColor ? {
21348
+ pageColor: prepared.pageColor
21349
+ } : {}
21350
+ } : await readDocxLayout(arrayBuffer).catch(()=>({
21351
+ pageSize: 'a4'
21352
+ }));
21353
+ const { analyzeDocxCompatibility } = await import("./0~work-office-diagnostics.js").then((m)=>m.work_office_diagnostics_namespaceObject);
21354
+ const artifact = createWorkArtifact('blank-document');
21355
+ artifact.title = fileNameWithoutExtension(file.name);
21356
+ const modelStartedAt = documentImportNow();
21357
+ artifact.content = await withStructuredDocumentModel({
21358
+ type: 'document',
21359
+ html,
21360
+ ...layout,
21361
+ ...prepared?.trackChanges ? {
21362
+ trackChanges: true
21363
+ } : {},
21364
+ ...prepared?.commentMarkers.comments.length ? {
21365
+ comments: prepared.commentMarkers.comments
21366
+ } : {},
21367
+ ...prepared?.bibliography ? {
21368
+ bibliography: prepared.bibliography
21369
+ } : {}
21370
+ });
21371
+ recordDocumentImportMeasure('a3s-office.document.structured-model', modelStartedAt, documentImportNow(), {
21372
+ windowed: false
21373
+ });
21374
+ context?.controller.report('analyzing', 0);
21375
+ const compatibilityStartedAt = documentImportNow();
21376
+ artifact.compatibility = await analyzeDocxCompatibility(file, result.messages, sourcePackage);
21377
+ recordDocumentImportMeasure('a3s-office.document.compatibility', compatibilityStartedAt, documentImportNow());
21378
+ context?.controller.report('analyzing', 1);
21379
+ artifact.source = {
21380
+ name: file.name,
21381
+ contentType: file.type || DOCX_CONTENT_TYPE,
21382
+ size: file.size,
21383
+ updatedAt: file.lastModified || Date.now(),
21384
+ fingerprint: await workSourceFingerprint(arrayBuffer)
21385
+ };
21386
+ rememberWorkSourceBlob(artifact.id, file);
21387
+ recordDocumentImportMeasure('a3s-office.document.import-total', importStartedAt, documentImportNow(), {
21388
+ path: 'complete'
21389
+ });
21390
+ return artifact;
21391
+ }
21392
+ const source = context ? new TextDecoder().decode(context.bytes) : await file.text();
21393
+ html = 'html' === extension || 'htm' === extension ? source : textToHtml(source);
21394
+ const artifact = createWorkArtifact('blank-document');
21395
+ artifact.title = fileNameWithoutExtension(file.name);
21396
+ artifact.content = await withStructuredDocumentModel({
21397
+ type: 'document',
21398
+ html,
21399
+ pageSize: 'a4'
21400
+ });
21401
+ context?.controller.report('parsing', 1);
21402
+ return artifact;
21403
+ }
21404
+ async function createWorkDocumentBlob(artifact) {
21405
+ if ('document' !== artifact.content.type) throw new Error('当前文件不是文档。');
21406
+ const { materializeWorkDocumentContent } = await Promise.resolve(work_document_model_codec_namespaceObject);
21407
+ const { createDocxBlob } = await import("./0~work-docx-export.js");
21408
+ const sourcePackage = artifact.source ? await readVerifiedWorkSourceBytes(artifact) : void 0;
21409
+ return createDocxBlob(materializeWorkDocumentContent(artifact.content), sourcePackage);
21410
+ }
21411
+ function textToHtml(source) {
21412
+ const blocks = source.replace(/\r\n?/g, '\n').split(/\n{2,}/).map((block)=>block.trim()).filter(Boolean);
21413
+ return blocks.map((block)=>{
21414
+ if (block.startsWith('# ')) return `<h1>${work_document_file_io_escapeHtml(block.slice(2))}</h1>`;
21415
+ if (block.startsWith('## ')) return `<h2>${work_document_file_io_escapeHtml(block.slice(3))}</h2>`;
21416
+ return `<p>${work_document_file_io_escapeHtml(block).replace(/\n/g, '<br>')}</p>`;
21417
+ }).join('');
21418
+ }
21419
+ async function withStructuredDocumentModel(content) {
21420
+ const { createWorkDocumentModelFromContent } = await Promise.resolve(work_document_model_codec_namespaceObject);
21421
+ return createWorkDocumentModelFromContent(content);
21422
+ }
21423
+ function work_document_file_io_escapeHtml(value) {
21424
+ return value.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;');
21425
+ }
21426
+ function documentImportNow() {
21427
+ return globalThis.performance?.now?.() ?? Date.now();
21428
+ }
21429
+ function transferableDocumentXmlBuffer(bytes) {
21430
+ if (0 === bytes.byteOffset && bytes.byteLength === bytes.buffer.byteLength && bytes.buffer instanceof ArrayBuffer) return bytes.buffer;
21431
+ return bytes.slice().buffer;
21432
+ }
21433
+ function recordDocumentImportMeasure(name, start, end, detail) {
21434
+ try {
21435
+ globalThis.performance?.measure(name, {
21436
+ detail,
21437
+ end,
21438
+ start
21439
+ });
21440
+ } catch {}
21441
+ }
21069
21442
  function mountWorkLiveDocumentCapture(surface, firstPageIndex = 0, captureHeight) {
21070
21443
  const host = document.createElement('div');
21071
21444
  host.className = 'work-pdf-export-surface';
@@ -21165,4 +21538,4 @@ function registerDocumentPageSurfaceGeometry(element, provider) {
21165
21538
  function documentPageSurfaceGeometryForElement(element) {
21166
21539
  return documentPageSurfaceProviders.get(element)?.() ?? null;
21167
21540
  }
21168
- 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_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, DocumentHighlight, DocumentImage, DocumentParagraphFormatting, DocumentScriptFontFormatting, DocumentStrike, DocumentSubscript, DocumentSuperscript, DocumentTableRowIdentity, DocumentTextStyle, DocumentUnderline, MAX_DOCUMENT_IMAGE_RELATIVE_HEIGHT, MAX_DOCUMENT_NUMBERING_START, activeDocumentBookmark, activeDocumentSection, activeDocumentTableStyle, applyDocumentImageCropToElement, applyDocumentImageIdentityToElement, applyDocumentImageLayerToElement, applyDocumentImageWrapContourToElement, applyDocumentPageGeometry, applyDocumentTableGeometryToElement, applyDocumentTableRowIdentityToElement, applyDocumentTextCaseStyle, canChangeDocumentIndent, canInsertDocumentComment, canSetDocumentTableRowRepeatHeader, clampDocumentMargin, collectDocumentChanges, collectDocumentCommentAnchors, collectDocumentNotes, collectDocumentTextLayoutParagraphs, createDocumentBibliography, createDocumentEquationElement, createDocumentImageIdentityRegistry, createDocumentNoteElement, createSchemaDerivedWorkDocumentModel, createSchemaValidatedWorkDocumentModel, createWorkDocumentExtensions, createWorkDocumentModel, createWorkDocumentModelFromContent, createWorkOfficeDocumentCollaborationBinding as createOfficeDocumentCollaborationBinding, 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, documentHasIndex, documentHasTableOfContents, 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, documentParagraphDirection, documentParagraphIndent, documentParagraphPagination, documentParagraphSpacing, documentParagraphTabStops, 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, isValidDocumentCitationTag, materializeLazyDocumentEditorRoot, materializeWorkDocumentContent, measureDocumentLayoutBlocksIncrementally, millimetersToPixels, mountWorkLiveDocumentCapture, nextDocumentTabAlignment, normalizeDocumentBookmarkName, normalizeDocumentBookmarkNativeId, normalizeDocumentBookmarkReferencesHtml, normalizeDocumentBookmarksHtml, normalizeDocumentCaptionsHtml, normalizeDocumentCharacterPositionHalfPoints, normalizeDocumentCharacterScalePercent, normalizeDocumentCharacterSpacingTwips, normalizeDocumentCitationsHtml, normalizeDocumentColumns, normalizeDocumentEmphasisMark, normalizeDocumentEquation, normalizeDocumentFieldsHtml, normalizeDocumentHiddenText, normalizeDocumentHtml, normalizeDocumentImageAlignment, normalizeDocumentImageCrop, normalizeDocumentImageIdentity, normalizeDocumentImageLayer, normalizeDocumentImageLayoutOptions, normalizeDocumentImagePosition, normalizeDocumentImageWrapContour, normalizeDocumentImageWrapSide, normalizeDocumentKerningThresholdHalfPoints, normalizeDocumentLegacyTextEffect, normalizeDocumentLegacyTextEffects, normalizeDocumentNotesHtml, normalizeDocumentPageBorders, normalizeDocumentPageChrome, normalizeDocumentPageGeometry, normalizeDocumentPageMargins, normalizeDocumentPaperSource, normalizeDocumentParagraphIndent, normalizeDocumentStrikeStyle, normalizeDocumentTabStops, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeDocumentTableRowHeightRule, normalizeDocumentTableRowIdentity, normalizeDocumentTableVerticalAlign, normalizeDocumentTextCase, normalizeDocumentUnderlineColor, normalizeDocumentUnderlineStyle, normalizeTableColor, normalizedTabPosition, pageTwipsToMillimeters, parseDocumentCharacterFormatting, parseDocumentParagraphFormatting, patchDocumentLazyHtmlProjection, positionWorkLiveDocumentCapture, readWorkOfficeDocumentCollaboration as readOfficeDocumentCollaboration, registerDocumentPageSurfaceGeometry, renderDocumentAutoLineHeight, renderDocumentTableBorders, renderDocumentTableCellMarginOverrides, resolveDocumentPageBorders, resolveDocumentPageChrome, resolveDocumentPageMargins, resolveDocumentPageSize, resolveWorkDocumentEditorInput, retainAnchoredDocumentComments, sanitizeDocumentPageChromeHtml, selectedDocumentChunkId, selectedDocumentIndexDraft, selectedDocumentIndexEntry, selectedDocumentIndexOptions, selectedDocumentTableOfContentsOptions, serializeDocumentParagraphFormatting, serializeDocumentTabStops, serializeWorkDocumentNode, setCustomDocumentColumns, supportedDocxBookmarkReferenceInstruction, syncDocumentContentFromHtml, transferChangedDocumentTextStatistics, uniqueDocumentImageIdentity, updateDocumentColumnWidth, updateDocumentCustomPageMillimeters, updateDocumentGutterPosition, updateDocumentMirrorMargins, updateDocumentPageChromeVariant, updateDocumentPageMarginMillimeters, updateDocumentPageMarginMode, updateDocumentPageOrientation, updateDocumentPaperSizePreset, validateDocumentBookmarkName, windowDocumentModel, workDocumentSchema, workOfficeDocumentCollaborationFragment as officeDocumentCollaborationFragment, work_document_page_margins_twipsToMillimeters, wrapsBesideImage };
21541
+ 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_CHANGE_ATTRIBUTES, DOCUMENT_PARAGRAPH_FORMAT_ATTRIBUTES, 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, DocumentHighlight, DocumentImage, DocumentParagraphFormatting, DocumentScriptFontFormatting, DocumentStrike, DocumentSubscript, DocumentSuperscript, DocumentTableRowIdentity, DocumentTextStyle, DocumentUnderline, MAX_DOCUMENT_IMAGE_RELATIVE_HEIGHT, MAX_DOCUMENT_NUMBERING_START, activeDocumentBookmark, activeDocumentSection, activeDocumentTableStyle, applyDocumentImageCropToElement, applyDocumentImageIdentityToElement, applyDocumentImageLayerToElement, applyDocumentImageWrapContourToElement, applyDocumentPageGeometry, applyDocumentTableGeometryToElement, applyDocumentTableRowIdentityToElement, applyDocumentTextCaseStyle, canChangeDocumentIndent, canInsertDocumentComment, canSetDocumentTableRowRepeatHeader, clampDocumentMargin, collectDocumentChanges, collectDocumentCommentAnchors, collectDocumentNotes, collectDocumentTextLayoutParagraphs, createDocumentBibliography, createDocumentEquationElement, createDocumentImageIdentityRegistry, createDocumentNoteElement, createSchemaDerivedWorkDocumentModel, createWorkDocumentBlob, createWorkDocumentExtensions, createWorkDocumentModel, createWorkOfficeDocumentCollaborationBinding as createOfficeDocumentCollaborationBinding, 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, documentHasIndex, documentHasTableOfContents, 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, documentParagraphDirection, documentParagraphIndent, documentParagraphPagination, documentParagraphSpacing, documentParagraphTabStops, 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, fileNameWithoutExtension, forgetWorkSourceBlob as forgetSourceBlob, importWorkDocumentFile, importedDocumentCharacterFormatting, initializeWorkOfficeDocumentCollaboration as initializeOfficeDocumentCollaboration, invalidateDocumentLazyHtmlProjection, isContourImageLayout, isDocumentCharacterFormatMark, isValidDocumentCitationTag, materializeLazyDocumentEditorRoot, measureDocumentLayoutBlocksIncrementally, millimetersToPixels, mountWorkLiveDocumentCapture, moveWorkSourceBlob, nextDocumentTabAlignment, normalizeDocumentBookmarkName, normalizeDocumentBookmarkNativeId, normalizeDocumentBookmarkReferencesHtml, normalizeDocumentBookmarksHtml, normalizeDocumentCaptionsHtml, normalizeDocumentCharacterPositionHalfPoints, normalizeDocumentCharacterScalePercent, normalizeDocumentCharacterSpacingTwips, normalizeDocumentCitationsHtml, normalizeDocumentColumns, normalizeDocumentEmphasisMark, normalizeDocumentEquation, normalizeDocumentFieldsHtml, normalizeDocumentHiddenText, normalizeDocumentHtml, normalizeDocumentImageAlignment, normalizeDocumentImageCrop, normalizeDocumentImageIdentity, normalizeDocumentImageLayer, normalizeDocumentImageLayoutOptions, normalizeDocumentImagePosition, normalizeDocumentImageWrapContour, normalizeDocumentImageWrapSide, normalizeDocumentKerningThresholdHalfPoints, normalizeDocumentLegacyTextEffect, normalizeDocumentLegacyTextEffects, normalizeDocumentNotesHtml, normalizeDocumentPageBorders, normalizeDocumentPageChrome, normalizeDocumentPageGeometry, normalizeDocumentPageMargins, normalizeDocumentPaperSource, normalizeDocumentParagraphIndent, normalizeDocumentStrikeStyle, normalizeDocumentTabStops, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeDocumentTableRowHeightRule, normalizeDocumentTableRowIdentity, normalizeDocumentTableVerticalAlign, normalizeDocumentTextCase, normalizeDocumentUnderlineColor, normalizeDocumentUnderlineStyle, normalizeTableColor, normalizedTabPosition, pageTwipsToMillimeters, parseDocumentCharacterFormatting, parseDocumentParagraphFormatting, patchDocumentLazyHtmlProjection, positionWorkLiveDocumentCapture, readWorkOfficeDocumentCollaboration as readOfficeDocumentCollaboration, readWorkSourceBlob as readSourceBlob, registerDocumentPageSurfaceGeometry, rememberWorkSourceBlob as registerSourceBlob, renderDocumentAutoLineHeight, renderDocumentTableBorders, renderDocumentTableCellMarginOverrides, resolveAllDocumentChanges, resolveDocumentPageBorders, resolveDocumentPageChrome, resolveDocumentPageMargins, resolveDocumentPageSize, resolveWorkDocumentEditorInput, retainAnchoredDocumentComments, sanitizeDocumentPageChromeHtml, selectedDocumentChunkId, selectedDocumentIndexDraft, selectedDocumentIndexEntry, selectedDocumentIndexOptions, selectedDocumentTableOfContentsOptions, serializeDocumentCharacterFormatting, serializeDocumentParagraphFormatting, serializeDocumentTabStops, serializeWorkDocumentNode, setCustomDocumentColumns, supportedDocxBookmarkReferenceInstruction, syncDocumentContentFromHtml, transferChangedDocumentTextStatistics, uniqueDocumentImageIdentity, updateDocumentColumnWidth, updateDocumentCustomPageMillimeters, updateDocumentGutterPosition, updateDocumentMirrorMargins, updateDocumentPageChromeVariant, updateDocumentPageMarginMillimeters, updateDocumentPageMarginMode, updateDocumentPageOrientation, updateDocumentPaperSizePreset, validateDocumentBookmarkName, windowDocumentModel, workDocumentSchema, workOfficeDocumentCollaborationFragment as officeDocumentCollaborationFragment, work_document_model_codec_createWorkDocumentModelFromContent as createWorkDocumentModelFromContent, work_document_model_codec_materializeWorkDocumentContent as materializeWorkDocumentContent, work_document_model_createSchemaValidatedWorkDocumentModel as createSchemaValidatedWorkDocumentModel, work_document_page_margins_twipsToMillimeters, work_file_download_downloadBlob, work_file_download_safeFileName, wrapsBesideImage };