@a3s-lab/office 0.44.0 → 0.46.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 (25) hide show
  1. package/README.md +24 -0
  2. package/dist/{0~2330.js → 0~2133.js} +325 -19
  3. package/dist/{0~5024.js → 0~4042.js} +110 -2
  4. package/dist/0~document-editor.js +562 -9
  5. package/dist/0~work-docx-export.js +206 -8
  6. package/dist/0~work-docx-import.js +22 -7
  7. package/dist/0~work-office-diagnostics.js +19 -3
  8. package/dist/4174.js +508 -3
  9. package/dist/internal/features/work/editors/document-command-catalog.d.ts +15 -1
  10. package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +4 -1
  11. package/dist/internal/features/work/editors/document-text-box-ribbon.d.ts +4 -0
  12. package/dist/internal/features/work/editors/document-toolbar.d.ts +2 -1
  13. package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +1 -0
  14. package/dist/internal/features/work/work-document-image-layout.d.ts +14 -0
  15. package/dist/internal/features/work/work-document-text-box.d.ts +64 -0
  16. package/dist/internal/features/work/work-docx-export-image.d.ts +2 -1
  17. package/dist/internal/features/work/work-docx-image-layout-import.d.ts +2 -1
  18. package/dist/internal/features/work/work-docx-image-transform.d.ts +17 -0
  19. package/dist/internal/features/work/work-docx-import.d.ts +3 -1
  20. package/dist/internal/features/work/work-docx-text-box-export.d.ts +25 -0
  21. package/dist/internal/features/work/work-docx-text-box-import.d.ts +26 -0
  22. package/dist/office-kernel.wasm +0 -0
  23. package/dist/styles.css +101 -2
  24. package/docs/latest/en/browser-editor-architecture.md +7 -3
  25. package/package.json +6 -3
package/dist/4174.js CHANGED
@@ -12711,6 +12711,9 @@ const DEFAULT_IMAGE_ALIGNMENT = 'center';
12711
12711
  const DEFAULT_WRAP_DISTANCE_MILLIMETERS = 3;
12712
12712
  const MAX_WRAP_DISTANCE_MILLIMETERS = 25;
12713
12713
  const DEFAULT_LOCK_ASPECT_RATIO = true;
12714
+ const DEFAULT_IMAGE_ROTATION = 0;
12715
+ const DEFAULT_IMAGE_FLIP_HORIZONTAL = false;
12716
+ const DEFAULT_IMAGE_FLIP_VERTICAL = false;
12714
12717
  const DEFAULT_HORIZONTAL_REFERENCE = 'column';
12715
12718
  const DEFAULT_VERTICAL_REFERENCE = 'paragraph';
12716
12719
  const MAX_IMAGE_OFFSET_MILLIMETERS = 558.7;
@@ -12854,6 +12857,9 @@ const DocumentImage = extension_image.extend({
12854
12857
  cropRight: imageCropNumberAttribute('right'),
12855
12858
  cropBottom: imageCropNumberAttribute('bottom'),
12856
12859
  cropLeft: imageCropNumberAttribute('left'),
12860
+ rotation: imageTransformRotationAttribute(),
12861
+ flipHorizontal: imageTransformBooleanAttribute('flipHorizontal', 'data-office-image-flip-horizontal'),
12862
+ flipVertical: imageTransformBooleanAttribute('flipVertical', 'data-office-image-flip-vertical'),
12857
12863
  wrapPolygon: imageWrapPolygonAttribute(),
12858
12864
  wrapPolygonEdited: {
12859
12865
  default: false,
@@ -12935,6 +12941,7 @@ function documentImageProperties(editor) {
12935
12941
  const layout = normalizeDocumentImageLayoutOptions(attributes);
12936
12942
  const position = normalizeDocumentImagePosition(attributes);
12937
12943
  const crop = normalizeDocumentImageCrop(attributes);
12944
+ const transform = normalizeDocumentImageTransform(attributes);
12938
12945
  const contour = effectiveDocumentImageWrapContour(attributes);
12939
12946
  return {
12940
12947
  ...layout,
@@ -12948,6 +12955,9 @@ function documentImageProperties(editor) {
12948
12955
  ...crop ? {
12949
12956
  crop
12950
12957
  } : {},
12958
+ ...documentImageTransformIsDefault(transform) ? {} : {
12959
+ transform
12960
+ },
12951
12961
  ...contour ? {
12952
12962
  contour
12953
12963
  } : {},
@@ -12986,6 +12996,14 @@ function documentImageCropFromElement(element) {
12986
12996
  cropLeft: element.getAttribute('data-office-image-crop-left')
12987
12997
  });
12988
12998
  }
12999
+ function documentImageTransformFromElement(element) {
13000
+ const transform = normalizeDocumentImageTransform({
13001
+ rotation: element.getAttribute('data-office-image-rotation'),
13002
+ flipHorizontal: element.getAttribute('data-office-image-flip-horizontal'),
13003
+ flipVertical: element.getAttribute('data-office-image-flip-vertical')
13004
+ });
13005
+ return documentImageTransformIsDefault(transform) ? null : transform;
13006
+ }
12989
13007
  function documentImageLayerFromElement(element) {
12990
13008
  return normalizeDocumentImageLayer({
12991
13009
  relativeHeight: element.getAttribute('data-office-image-relative-height'),
@@ -13061,6 +13079,56 @@ function normalizeDocumentImageCropEdge(value) {
13061
13079
  if (!Number.isFinite(number)) return 0;
13062
13080
  return Math.round(100 * Math.min(99.99, Math.max(0, number))) / 100;
13063
13081
  }
13082
+ function defaultDocumentImageTransform() {
13083
+ return {
13084
+ rotation: DEFAULT_IMAGE_ROTATION,
13085
+ flipHorizontal: DEFAULT_IMAGE_FLIP_HORIZONTAL,
13086
+ flipVertical: DEFAULT_IMAGE_FLIP_VERTICAL
13087
+ };
13088
+ }
13089
+ function normalizeDocumentImageTransform(value) {
13090
+ return {
13091
+ rotation: normalizeDocumentImageRotation(value.rotation),
13092
+ flipHorizontal: normalizeDocumentImageTransformBoolean(value.flipHorizontal, DEFAULT_IMAGE_FLIP_HORIZONTAL),
13093
+ flipVertical: normalizeDocumentImageTransformBoolean(value.flipVertical, DEFAULT_IMAGE_FLIP_VERTICAL)
13094
+ };
13095
+ }
13096
+ function normalizeDocumentImageRotation(value) {
13097
+ const number = 'number' == typeof value ? value : 'string' == typeof value && value.trim() ? Number(value) : DEFAULT_IMAGE_ROTATION;
13098
+ if (!Number.isFinite(number)) return DEFAULT_IMAGE_ROTATION;
13099
+ const normalized = (Math.round(number) % 360 + 360) % 360;
13100
+ return 90 === normalized || 180 === normalized || 270 === normalized ? normalized : DEFAULT_IMAGE_ROTATION;
13101
+ }
13102
+ function documentImageTransformIsDefault(transform) {
13103
+ return transform.rotation === DEFAULT_IMAGE_ROTATION && !transform.flipHorizontal && !transform.flipVertical;
13104
+ }
13105
+ function documentImageTransformCss(transform) {
13106
+ const normalized = normalizeDocumentImageTransform(transform);
13107
+ if (documentImageTransformIsDefault(normalized)) return '';
13108
+ return [
13109
+ `--work-document-image-rotation:${normalized.rotation}deg`,
13110
+ `--work-document-image-flip-x:${normalized.flipHorizontal ? -1 : 1}`,
13111
+ `--work-document-image-flip-y:${normalized.flipVertical ? -1 : 1}`
13112
+ ].join(';');
13113
+ }
13114
+ function applyDocumentImageTransformToElement(element, transform) {
13115
+ const normalized = normalizeDocumentImageTransform(transform ?? {});
13116
+ if (normalized.rotation === DEFAULT_IMAGE_ROTATION) delete element.dataset.officeImageRotation;
13117
+ else element.dataset.officeImageRotation = String(normalized.rotation);
13118
+ if (normalized.flipHorizontal) element.dataset.officeImageFlipHorizontal = 'true';
13119
+ else delete element.dataset.officeImageFlipHorizontal;
13120
+ if (normalized.flipVertical) element.dataset.officeImageFlipVertical = 'true';
13121
+ else delete element.dataset.officeImageFlipVertical;
13122
+ if (documentImageTransformIsDefault(normalized)) {
13123
+ element.style.removeProperty('--work-document-image-rotation');
13124
+ element.style.removeProperty('--work-document-image-flip-x');
13125
+ element.style.removeProperty('--work-document-image-flip-y');
13126
+ return;
13127
+ }
13128
+ element.style.setProperty('--work-document-image-rotation', `${normalized.rotation}deg`);
13129
+ element.style.setProperty('--work-document-image-flip-x', normalized.flipHorizontal ? '-1' : '1');
13130
+ element.style.setProperty('--work-document-image-flip-y', normalized.flipVertical ? '-1' : '1');
13131
+ }
13064
13132
  function normalizeDocumentImageLayer(value) {
13065
13133
  return {
13066
13134
  relativeHeight: normalizeDocumentImageRelativeHeight(value.relativeHeight),
@@ -13115,6 +13183,12 @@ function documentImageAttributesForChanges(value) {
13115
13183
  attributes.cropBottom = crop?.bottom ?? 0;
13116
13184
  attributes.cropLeft = crop?.left ?? 0;
13117
13185
  }
13186
+ if (Object.hasOwn(value, 'transform')) {
13187
+ const transform = value.transform ? normalizeDocumentImageTransform(value.transform) : defaultDocumentImageTransform();
13188
+ attributes.rotation = transform.rotation;
13189
+ attributes.flipHorizontal = transform.flipHorizontal;
13190
+ attributes.flipVertical = transform.flipVertical;
13191
+ }
13118
13192
  if (Object.hasOwn(value, 'contour')) {
13119
13193
  const contour = value.contour ? normalizeDocumentImageWrapContour(value.contour) : null;
13120
13194
  attributes.wrapPolygon = contour ? serializeDocumentImageWrapPoints(contour.points) : null;
@@ -13147,6 +13221,7 @@ function syncDocumentImageNodeView(element, container, attributes) {
13147
13221
  const lockAspectRatio = normalizeDocumentImageLockAspectRatio(attributes.lockAspectRatio);
13148
13222
  const position = normalizeDocumentImagePosition(attributes);
13149
13223
  const crop = normalizeDocumentImageCrop(attributes);
13224
+ const transform = normalizeDocumentImageTransform(attributes);
13150
13225
  const wrapSide = normalizeDocumentImageWrapSide(attributes.wrapSide);
13151
13226
  const contour = effectiveDocumentImageWrapContour(attributes);
13152
13227
  const layer = normalizeDocumentImageLayer(attributes);
@@ -13161,6 +13236,7 @@ function syncDocumentImageNodeView(element, container, attributes) {
13161
13236
  element.dataset.officeImageWrapSide = wrapSide;
13162
13237
  syncDocumentImagePosition(element, position);
13163
13238
  applyDocumentImageCropToElement(element, crop);
13239
+ applyDocumentImageTransformToElement(element, transform);
13164
13240
  applyDocumentImageWrapContourToElement(element, contour);
13165
13241
  applyDocumentImageLayerToElement(element, layer);
13166
13242
  if (identity) applyDocumentImageIdentityToElement(element, identity);
@@ -13175,6 +13251,7 @@ function syncDocumentImageNodeView(element, container, attributes) {
13175
13251
  container.dataset.officeImageWrapSide = wrapSide;
13176
13252
  syncDocumentImagePosition(container, position);
13177
13253
  applyDocumentImageCropToElement(container, crop);
13254
+ applyDocumentImageTransformToElement(container, transform);
13178
13255
  applyDocumentImageWrapContourToElement(container, contour);
13179
13256
  applyDocumentImageLayerToElement(container, layer);
13180
13257
  if (identity) applyDocumentImageIdentityToElement(container, identity);
@@ -13219,6 +13296,32 @@ function imageCropNumberAttribute(edge) {
13219
13296
  }
13220
13297
  };
13221
13298
  }
13299
+ function imageTransformRotationAttribute() {
13300
+ return {
13301
+ default: DEFAULT_IMAGE_ROTATION,
13302
+ parseHTML: (element)=>normalizeDocumentImageRotation(element.getAttribute('data-office-image-rotation')),
13303
+ renderHTML: (attributes)=>{
13304
+ const transform = normalizeDocumentImageTransform(attributes);
13305
+ const result = {};
13306
+ if (transform.rotation !== DEFAULT_IMAGE_ROTATION) result['data-office-image-rotation'] = String(transform.rotation);
13307
+ const style = documentImageTransformCss(transform);
13308
+ if (style) result.style = style;
13309
+ return result;
13310
+ }
13311
+ };
13312
+ }
13313
+ function imageTransformBooleanAttribute(key, name) {
13314
+ return {
13315
+ default: false,
13316
+ parseHTML: (element)=>normalizeDocumentImageTransformBoolean(element.getAttribute(name), false),
13317
+ renderHTML: (attributes)=>{
13318
+ const value = normalizeDocumentImageTransformBoolean(attributes[key], false);
13319
+ return value ? {
13320
+ [name]: 'true'
13321
+ } : {};
13322
+ }
13323
+ };
13324
+ }
13222
13325
  function imageWrapPolygonAttribute() {
13223
13326
  return {
13224
13327
  default: null,
@@ -13338,6 +13441,11 @@ function normalizeDocumentImageLayerBoolean(value, fallback) {
13338
13441
  if (false === value || 0 === value || '0' === value || 'false' === value) return false;
13339
13442
  return fallback;
13340
13443
  }
13444
+ function normalizeDocumentImageTransformBoolean(value, fallback) {
13445
+ if (true === value || 1 === value || '1' === value || 'true' === value) return true;
13446
+ if (false === value || 0 === value || '0' === value || 'false' === value) return false;
13447
+ return fallback;
13448
+ }
13341
13449
  function documentImageCropStyle(crop) {
13342
13450
  return documentImageCropStyleEntries(crop).map(([name, value])=>`${name}:${value}`).join(';');
13343
13451
  }
@@ -14848,7 +14956,7 @@ function measuredDocumentBlock({ block, element, from, to }) {
14848
14956
  };
14849
14957
  }
14850
14958
  function shouldKeepDocumentBlockTogether(node) {
14851
- return 'table' === node.type.name || 'blockquote' === node.type.name || 'codeBlock' === node.type.name || 'image' === node.type.name || 'documentNote' === node.type.name;
14959
+ return 'table' === node.type.name || 'blockquote' === node.type.name || 'codeBlock' === node.type.name || 'image' === node.type.name || 'documentTextBox' === node.type.name || 'documentNote' === node.type.name;
14852
14960
  }
14853
14961
  function documentBlockId(sectionPosition, index, position) {
14854
14962
  return `section-${sectionPosition}-block-${index}-${position}`;
@@ -17985,6 +18093,402 @@ function work_document_table_of_contents_node_hiddenAttribute(defaultValue) {
17985
18093
  function work_document_table_of_contents_node_stringAttribute(value) {
17986
18094
  return 'string' == typeof value ? value.trim() : '';
17987
18095
  }
18096
+ const DOCUMENT_TEXT_BOX_DEFAULTS = {
18097
+ id: '',
18098
+ width: 120,
18099
+ height: 45,
18100
+ layout: 'inline',
18101
+ horizontalOffset: null,
18102
+ verticalOffset: null,
18103
+ horizontalReference: 'column',
18104
+ verticalReference: 'paragraph',
18105
+ fill: '#fff2cc',
18106
+ borderColor: '#4472c4',
18107
+ borderWidth: 0.35,
18108
+ padding: 3,
18109
+ verticalAlign: 'top',
18110
+ docPropertiesId: null
18111
+ };
18112
+ const DOCUMENT_TEXT_BOX_LIMITS = {
18113
+ width: {
18114
+ min: 20,
18115
+ max: 558.7
18116
+ },
18117
+ height: {
18118
+ min: 10,
18119
+ max: 558.7
18120
+ },
18121
+ offset: {
18122
+ min: -558.7,
18123
+ max: 558.7
18124
+ },
18125
+ borderWidth: {
18126
+ min: 0,
18127
+ max: 10
18128
+ },
18129
+ padding: {
18130
+ min: 0,
18131
+ max: 25
18132
+ }
18133
+ };
18134
+ const TEXT_BOX_ID_MAX_LENGTH = 160;
18135
+ const TEXT_BOX_COLOR_PATTERN = /^#[0-9a-f]{6}$/i;
18136
+ const TEXT_BOX_MARKER_ATTRIBUTES = [
18137
+ 'id',
18138
+ 'width',
18139
+ 'height',
18140
+ 'layout',
18141
+ 'horizontalOffset',
18142
+ 'verticalOffset',
18143
+ 'horizontalReference',
18144
+ 'verticalReference',
18145
+ 'fill',
18146
+ 'borderColor',
18147
+ 'borderWidth',
18148
+ 'padding',
18149
+ 'verticalAlign',
18150
+ 'docPropertiesId'
18151
+ ];
18152
+ const DocumentTextBox = core_Node.create({
18153
+ name: 'documentTextBox',
18154
+ group: 'block',
18155
+ content: 'inline*',
18156
+ defining: true,
18157
+ isolating: true,
18158
+ selectable: true,
18159
+ addAttributes () {
18160
+ return {
18161
+ id: dataAttribute(''),
18162
+ width: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.width),
18163
+ height: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.height),
18164
+ layout: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.layout),
18165
+ horizontalOffset: nullableDataAttribute(),
18166
+ verticalOffset: nullableDataAttribute(),
18167
+ horizontalReference: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.horizontalReference),
18168
+ verticalReference: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.verticalReference),
18169
+ fill: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.fill),
18170
+ borderColor: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.borderColor),
18171
+ borderWidth: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.borderWidth),
18172
+ padding: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.padding),
18173
+ verticalAlign: dataAttribute(DOCUMENT_TEXT_BOX_DEFAULTS.verticalAlign),
18174
+ docPropertiesId: nullableDataAttribute()
18175
+ };
18176
+ },
18177
+ parseHTML () {
18178
+ return [
18179
+ {
18180
+ tag: 'div[data-document-text-box]',
18181
+ getAttrs: (element)=>{
18182
+ if (!(element instanceof HTMLElement)) return false;
18183
+ return textBoxAttributesFromElement(element);
18184
+ }
18185
+ }
18186
+ ];
18187
+ },
18188
+ renderHTML ({ node, HTMLAttributes }) {
18189
+ const properties = normalizeDocumentTextBoxProperties(node.attrs);
18190
+ return [
18191
+ 'div',
18192
+ mergeAttributes(HTMLAttributes, textBoxDomAttributes(properties), {
18193
+ class: 'work-document-text-box',
18194
+ contenteditable: void 0,
18195
+ style: textBoxCss(properties),
18196
+ role: 'textbox',
18197
+ 'aria-label': '文本框'
18198
+ }),
18199
+ 0
18200
+ ];
18201
+ },
18202
+ renderText ({ node }) {
18203
+ return node.textContent;
18204
+ },
18205
+ addCommands () {
18206
+ return {
18207
+ insertDocumentTextBox: (text = '', options = {})=>({ dispatch, editor, state, tr })=>insertDocumentTextBoxCommand({
18208
+ dispatch,
18209
+ editor,
18210
+ state,
18211
+ tr
18212
+ }, text, options),
18213
+ setDocumentTextBoxProperties: (value, options = {})=>({ chain, state, tr })=>{
18214
+ if (!selectedDocumentTextBox(state)) return false;
18215
+ const attributes = textBoxAttributesForChanges(value);
18216
+ if (!Object.keys(attributes).length) return false;
18217
+ closeHistory(tr);
18218
+ let commandChain = chain();
18219
+ if (false !== options.restoreFocus) commandChain = commandChain.focus();
18220
+ return commandChain.updateAttributes(this.name, attributes).run();
18221
+ },
18222
+ deleteDocumentTextBox: (options = {})=>({ dispatch, editor, state, tr })=>{
18223
+ const selected = selectedDocumentTextBox(state);
18224
+ if (!selected) return false;
18225
+ if (!dispatch) return true;
18226
+ closeHistory(tr);
18227
+ tr.delete(selected.position, selected.position + selected.node.nodeSize);
18228
+ tr.setSelection(TextSelection.near(tr.doc.resolve(Math.min(selected.position, tr.doc.content.size)), -1));
18229
+ dispatch(tr.scrollIntoView());
18230
+ if (false !== options.restoreFocus) editor.view.focus();
18231
+ return true;
18232
+ }
18233
+ };
18234
+ },
18235
+ addKeyboardShortcuts () {
18236
+ return {
18237
+ Backspace: ()=>deleteEmptyDocumentTextBox(this.editor),
18238
+ Delete: ()=>deleteEmptyDocumentTextBox(this.editor)
18239
+ };
18240
+ },
18241
+ addProseMirrorPlugins () {
18242
+ return [
18243
+ new Plugin({
18244
+ appendTransaction: (transactions, _oldState, state)=>{
18245
+ if (!transactions.some((transaction)=>transaction.docChanged)) return null;
18246
+ const seen = new Set();
18247
+ const updates = [];
18248
+ state.doc.descendants((node, position)=>{
18249
+ if (node.type.name !== this.name) return;
18250
+ const current = normalizeDocumentTextBoxId(node.attrs.id);
18251
+ const id = current && !seen.has(current) ? current : createWorkId('text-box');
18252
+ seen.add(id);
18253
+ if (id !== node.attrs.id) updates.push({
18254
+ position,
18255
+ id
18256
+ });
18257
+ });
18258
+ if (!updates.length) return null;
18259
+ const transaction = state.tr;
18260
+ for (const update of updates){
18261
+ const node = state.doc.nodeAt(update.position);
18262
+ if (node) transaction.setNodeMarkup(update.position, void 0, {
18263
+ ...node.attrs,
18264
+ id: update.id
18265
+ });
18266
+ }
18267
+ transaction.setMeta('addToHistory', false);
18268
+ return transaction;
18269
+ }
18270
+ })
18271
+ ];
18272
+ }
18273
+ });
18274
+ function documentTextBoxProperties(editor) {
18275
+ return normalizeDocumentTextBoxProperties(editor.getAttributes('documentTextBox'));
18276
+ }
18277
+ function normalizeDocumentTextBoxProperties(value) {
18278
+ return {
18279
+ id: normalizeDocumentTextBoxId(value.id),
18280
+ width: boundedNumber(value.width, DOCUMENT_TEXT_BOX_DEFAULTS.width, DOCUMENT_TEXT_BOX_LIMITS.width.min, DOCUMENT_TEXT_BOX_LIMITS.width.max),
18281
+ height: boundedNumber(value.height, DOCUMENT_TEXT_BOX_DEFAULTS.height, DOCUMENT_TEXT_BOX_LIMITS.height.min, DOCUMENT_TEXT_BOX_LIMITS.height.max),
18282
+ layout: 'floating' === value.layout ? 'floating' : 'inline',
18283
+ horizontalOffset: nullableBoundedNumber(value.horizontalOffset, DOCUMENT_TEXT_BOX_LIMITS.offset.min, DOCUMENT_TEXT_BOX_LIMITS.offset.max),
18284
+ verticalOffset: nullableBoundedNumber(value.verticalOffset, DOCUMENT_TEXT_BOX_LIMITS.offset.min, DOCUMENT_TEXT_BOX_LIMITS.offset.max),
18285
+ horizontalReference: textBoxHorizontalReference(value.horizontalReference),
18286
+ verticalReference: textBoxVerticalReference(value.verticalReference),
18287
+ fill: normalizeTextBoxFill(value.fill),
18288
+ borderColor: normalizeTextBoxBorderColor(value.borderColor),
18289
+ borderWidth: boundedNumber(value.borderWidth, DOCUMENT_TEXT_BOX_DEFAULTS.borderWidth, DOCUMENT_TEXT_BOX_LIMITS.borderWidth.min, DOCUMENT_TEXT_BOX_LIMITS.borderWidth.max),
18290
+ padding: boundedNumber(value.padding, DOCUMENT_TEXT_BOX_DEFAULTS.padding, DOCUMENT_TEXT_BOX_LIMITS.padding.min, DOCUMENT_TEXT_BOX_LIMITS.padding.max),
18291
+ verticalAlign: textBoxVerticalAlign(value.verticalAlign),
18292
+ docPropertiesId: nullableInteger(value.docPropertiesId, 0, 0xffffffff)
18293
+ };
18294
+ }
18295
+ function textBoxCss(value) {
18296
+ const properties = normalizeDocumentTextBoxProperties(value);
18297
+ return [
18298
+ `--work-document-text-box-width:${work_document_text_box_formatNumber(properties.width)}mm`,
18299
+ `--work-document-text-box-height:${work_document_text_box_formatNumber(properties.height)}mm`,
18300
+ `--work-document-text-box-padding:${work_document_text_box_formatNumber(properties.padding)}mm`,
18301
+ `--work-document-text-box-fill:${properties.fill}`,
18302
+ `--work-document-text-box-border-color:${'none' === properties.borderColor ? 'transparent' : properties.borderColor}`,
18303
+ `--work-document-text-box-border-width:${work_document_text_box_formatNumber(properties.borderWidth)}mm`,
18304
+ `--work-document-text-box-vertical-align:${properties.verticalAlign}`,
18305
+ ...'floating' === properties.layout ? [
18306
+ `--work-document-text-box-horizontal-offset:${formatNullableNumber(properties.horizontalOffset)}mm`,
18307
+ `--work-document-text-box-vertical-offset:${formatNullableNumber(properties.verticalOffset)}mm`
18308
+ ] : []
18309
+ ].join(';');
18310
+ }
18311
+ function textBoxDomAttributes(value) {
18312
+ const properties = normalizeDocumentTextBoxProperties(value);
18313
+ return {
18314
+ 'data-document-text-box': 'true',
18315
+ 'data-text-box-id': properties.id || void 0,
18316
+ 'data-text-box-width': work_document_text_box_formatNumber(properties.width),
18317
+ 'data-text-box-height': work_document_text_box_formatNumber(properties.height),
18318
+ 'data-text-box-layout': properties.layout,
18319
+ 'data-text-box-horizontal-offset': null === properties.horizontalOffset ? void 0 : work_document_text_box_formatNumber(properties.horizontalOffset),
18320
+ 'data-text-box-vertical-offset': null === properties.verticalOffset ? void 0 : work_document_text_box_formatNumber(properties.verticalOffset),
18321
+ 'data-text-box-horizontal-reference': properties.horizontalReference,
18322
+ 'data-text-box-vertical-reference': properties.verticalReference,
18323
+ 'data-text-box-fill': properties.fill,
18324
+ 'data-text-box-border-color': properties.borderColor,
18325
+ 'data-text-box-border-width': work_document_text_box_formatNumber(properties.borderWidth),
18326
+ 'data-text-box-padding': work_document_text_box_formatNumber(properties.padding),
18327
+ 'data-text-box-vertical-align': properties.verticalAlign,
18328
+ 'data-text-box-doc-properties-id': null === properties.docPropertiesId ? void 0 : String(properties.docPropertiesId)
18329
+ };
18330
+ }
18331
+ function insertDocumentTextBoxCommand({ dispatch, editor, state, tr }, text, options) {
18332
+ const section = activeDocumentSectionFromState(state);
18333
+ const textBoxType = editor.schema.nodes.documentTextBox;
18334
+ const paragraphType = editor.schema.nodes.paragraph;
18335
+ if (!section || !textBoxType || !paragraphType) return false;
18336
+ const child = work_document_text_box_activeSectionChild(section, state.selection.from);
18337
+ if (!child) return false;
18338
+ if (!dispatch) return true;
18339
+ const properties = normalizeDocumentTextBoxProperties({
18340
+ ...DOCUMENT_TEXT_BOX_DEFAULTS,
18341
+ ...options,
18342
+ id: options.id || createWorkId('text-box')
18343
+ });
18344
+ const content = text ? editor.schema.text(text) : void 0;
18345
+ const textBox = textBoxType.create(properties, content);
18346
+ const insertPosition = section.position + 1 + child.offset + child.nodeSize;
18347
+ tr.insert(insertPosition, textBox);
18348
+ const selectionPosition = insertPosition + 1;
18349
+ if (child.index === section.node.childCount - 1) {
18350
+ const paragraphPosition = insertPosition + textBox.nodeSize;
18351
+ tr.insert(paragraphPosition, paragraphType.create());
18352
+ }
18353
+ tr.setSelection(TextSelection.near(tr.doc.resolve(selectionPosition)));
18354
+ tr.scrollIntoView();
18355
+ return true;
18356
+ }
18357
+ function selectedDocumentTextBox(state) {
18358
+ const { $from } = state.selection;
18359
+ for(let depth = $from.depth; depth > 0; depth -= 1){
18360
+ const node = $from.node(depth);
18361
+ if ('documentTextBox' === node.type.name) return {
18362
+ node,
18363
+ position: $from.before(depth)
18364
+ };
18365
+ }
18366
+ if (state.selection instanceof NodeSelection && 'documentTextBox' === state.selection.node.type.name) return {
18367
+ node: state.selection.node,
18368
+ position: state.selection.from
18369
+ };
18370
+ return null;
18371
+ }
18372
+ function deleteEmptyDocumentTextBox(editor) {
18373
+ const selected = selectedDocumentTextBox(editor.state);
18374
+ if (!selected || selected.node.content.size > 0) return false;
18375
+ return editor.commands.deleteDocumentTextBox();
18376
+ }
18377
+ function textBoxAttributesForChanges(value) {
18378
+ const attributes = {};
18379
+ for (const name of TEXT_BOX_MARKER_ATTRIBUTES)if (name in value) attributes[name] = normalizeDocumentTextBoxProperties({
18380
+ ...DOCUMENT_TEXT_BOX_DEFAULTS,
18381
+ ...value
18382
+ })[name];
18383
+ return attributes;
18384
+ }
18385
+ function textBoxAttributesFromElement(element) {
18386
+ return {
18387
+ id: element.dataset.textBoxId ?? '',
18388
+ width: element.dataset.textBoxWidth,
18389
+ height: element.dataset.textBoxHeight,
18390
+ layout: element.dataset.textBoxLayout,
18391
+ horizontalOffset: element.dataset.textBoxHorizontalOffset,
18392
+ verticalOffset: element.dataset.textBoxVerticalOffset,
18393
+ horizontalReference: element.dataset.textBoxHorizontalReference,
18394
+ verticalReference: element.dataset.textBoxVerticalReference,
18395
+ fill: element.dataset.textBoxFill,
18396
+ borderColor: element.dataset.textBoxBorderColor,
18397
+ borderWidth: element.dataset.textBoxBorderWidth,
18398
+ padding: element.dataset.textBoxPadding,
18399
+ verticalAlign: element.dataset.textBoxVerticalAlign,
18400
+ docPropertiesId: element.dataset.textBoxDocPropertiesId
18401
+ };
18402
+ }
18403
+ function documentTextBoxPropertiesFromElement(element) {
18404
+ return normalizeDocumentTextBoxProperties({
18405
+ id: element.getAttribute('data-text-box-id'),
18406
+ width: element.getAttribute('data-text-box-width'),
18407
+ height: element.getAttribute('data-text-box-height'),
18408
+ layout: element.getAttribute('data-text-box-layout'),
18409
+ horizontalOffset: element.getAttribute('data-text-box-horizontal-offset'),
18410
+ verticalOffset: element.getAttribute('data-text-box-vertical-offset'),
18411
+ horizontalReference: element.getAttribute('data-text-box-horizontal-reference'),
18412
+ verticalReference: element.getAttribute('data-text-box-vertical-reference'),
18413
+ fill: element.getAttribute('data-text-box-fill'),
18414
+ borderColor: element.getAttribute('data-text-box-border-color'),
18415
+ borderWidth: element.getAttribute('data-text-box-border-width'),
18416
+ padding: element.getAttribute('data-text-box-padding'),
18417
+ verticalAlign: element.getAttribute('data-text-box-vertical-align'),
18418
+ docPropertiesId: element.getAttribute('data-text-box-doc-properties-id')
18419
+ });
18420
+ }
18421
+ function dataAttribute(defaultValue) {
18422
+ return {
18423
+ default: defaultValue,
18424
+ parseHTML: ()=>defaultValue,
18425
+ rendered: false
18426
+ };
18427
+ }
18428
+ function nullableDataAttribute() {
18429
+ return {
18430
+ default: null,
18431
+ parseHTML: ()=>null,
18432
+ rendered: false
18433
+ };
18434
+ }
18435
+ function normalizeDocumentTextBoxId(value) {
18436
+ return 'string' == typeof value ? value.trim().slice(0, TEXT_BOX_ID_MAX_LENGTH) : '';
18437
+ }
18438
+ function normalizeTextBoxFill(value) {
18439
+ if ('transparent' === value) return 'transparent';
18440
+ return normalizeTextBoxColor(value, DOCUMENT_TEXT_BOX_DEFAULTS.fill);
18441
+ }
18442
+ function normalizeTextBoxBorderColor(value) {
18443
+ if ('none' === value) return 'none';
18444
+ return normalizeTextBoxColor(value, DOCUMENT_TEXT_BOX_DEFAULTS.borderColor);
18445
+ }
18446
+ function normalizeTextBoxColor(value, fallback) {
18447
+ if ('string' != typeof value) return fallback;
18448
+ const normalized = value.trim().toLowerCase();
18449
+ return TEXT_BOX_COLOR_PATTERN.test(normalized) ? normalized : fallback;
18450
+ }
18451
+ function textBoxHorizontalReference(value) {
18452
+ return 'margin' === value || 'page' === value ? value : 'column';
18453
+ }
18454
+ function textBoxVerticalReference(value) {
18455
+ return 'margin' === value || 'page' === value ? value : 'paragraph';
18456
+ }
18457
+ function textBoxVerticalAlign(value) {
18458
+ return 'center' === value || 'bottom' === value ? value : 'top';
18459
+ }
18460
+ function boundedNumber(value, fallback, min, max) {
18461
+ const number = 'number' == typeof value ? value : Number(value);
18462
+ if (!Number.isFinite(number)) return fallback;
18463
+ return Number(Math.min(max, Math.max(min, number)).toFixed(2));
18464
+ }
18465
+ function nullableBoundedNumber(value, min, max) {
18466
+ if (null == value || '' === value) return null;
18467
+ return boundedNumber(value, 0, min, max);
18468
+ }
18469
+ function nullableInteger(value, min, max) {
18470
+ if (null == value || '' === value) return null;
18471
+ const number = 'number' == typeof value ? value : Number(value);
18472
+ return Number.isSafeInteger(number) ? Math.min(max, Math.max(min, number)) : null;
18473
+ }
18474
+ function work_document_text_box_formatNumber(value) {
18475
+ return Number(value.toFixed(2)).toString();
18476
+ }
18477
+ function formatNullableNumber(value) {
18478
+ return null === value ? '0' : work_document_text_box_formatNumber(value);
18479
+ }
18480
+ function work_document_text_box_activeSectionChild(section, selectionPosition) {
18481
+ const relativePosition = Math.max(0, selectionPosition - section.position - 1);
18482
+ let active = null;
18483
+ section.node.forEach((node, offset, index)=>{
18484
+ if (relativePosition >= offset) active = {
18485
+ index,
18486
+ offset,
18487
+ nodeSize: node.nodeSize
18488
+ };
18489
+ });
18490
+ return active;
18491
+ }
17988
18492
  const BORDER_EDGES = [
17989
18493
  'top',
17990
18494
  'right',
@@ -19913,6 +20417,7 @@ function createWorkDocumentExtensions(options = {}) {
19913
20417
  minHeight: 40
19914
20418
  }
19915
20419
  }),
20420
+ DocumentTextBox,
19916
20421
  TableKit.configure({
19917
20422
  table: false,
19918
20423
  tableCell: false,
@@ -21805,7 +22310,7 @@ async function importWorkDocumentFile(file, extension, context) {
21805
22310
  recordDocumentImportMeasure('a3s-office.document.mammoth', mammothStartedAt, documentImportNow());
21806
22311
  context?.controller.report('parsing', 0.8);
21807
22312
  const markersStartedAt = documentImportNow();
21808
- 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.numberingChangeMarkers, 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;
22313
+ 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.numberingChangeMarkers, 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, prepared.textBoxMarkers) : result.value;
21809
22314
  recordDocumentImportMeasure('a3s-office.document.markers', markersStartedAt, documentImportNow());
21810
22315
  const layout = prepared ? {
21811
22316
  ...documentContentLayoutProperties(prepared.sections[0].layout),
@@ -22003,4 +22508,4 @@ function registerDocumentPageSurfaceGeometry(element, provider) {
22003
22508
  function documentPageSurfaceGeometryForElement(element) {
22004
22509
  return documentPageSurfaceProviders.get(element)?.() ?? null;
22005
22510
  }
22006
- 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_OPEN_TYPE_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, documentOpenTypeCssProperties, documentOpenTypeDomAttributes, documentOpenTypeFeaturesFromElement, 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, isDocumentOpenTypeFeaturePatch, 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, normalizeDocumentOpenTypeFeatures, normalizeDocumentOpenTypeLigatures, normalizeDocumentOpenTypeNumberForm, normalizeDocumentOpenTypeNumberSpacing, normalizeDocumentOpenTypeStylisticSets, normalizeDocumentPageBorders, normalizeDocumentPageChrome, normalizeDocumentPageGeometry, normalizeDocumentPageMargins, normalizeDocumentPaperSource, normalizeDocumentParagraphIndent, normalizeDocumentStrikeStyle, normalizeDocumentTabStops, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeDocumentTableRowHeightRule, normalizeDocumentTableRowIdentity, normalizeDocumentTableVerticalAlign, normalizeDocumentTextCase, normalizeDocumentUnderlineColor, normalizeDocumentUnderlineStyle, normalizeTableColor, normalizedTabPosition, numberingTypeFromFormat, pageTwipsToMillimeters, parseDocumentCharacterFormatting, parseDocumentNumberingChange, parseDocumentOpenTypeFeatures, parseDocumentParagraphFormatting, patchDocumentLazyHtmlProjection, patchDocumentOpenTypeFeatures, 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, serializeDocumentNumberingChange, serializeDocumentOpenTypeFeatures, 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 };
22511
+ 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_OPEN_TYPE_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_TEXT_BOX_DEFAULTS, DOCUMENT_TEXT_BOX_LIMITS, 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, applyDocumentImageTransformToElement, applyDocumentImageWrapContourToElement, applyDocumentPageGeometry, applyDocumentTableGeometryToElement, applyDocumentTableRowIdentityToElement, applyDocumentTextCaseStyle, canChangeDocumentIndent, canInsertDocumentComment, canSetDocumentTableRowRepeatHeader, clampDocumentMargin, collectDocumentChanges, collectDocumentCommentAnchors, collectDocumentNotes, collectDocumentTextLayoutParagraphs, createDocumentBibliography, createDocumentEquationElement, createDocumentImageIdentityRegistry, createDocumentNoteElement, createSchemaDerivedWorkDocumentModel, createWorkDocumentBlob, createWorkDocumentExtensions, createWorkDocumentModel, createWorkOfficeDocumentCollaborationBinding as createOfficeDocumentCollaborationBinding, defaultDocumentImageTransform, 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, documentImageTransformFromElement, documentImageWrapContourFromElement, documentInitialSectionLayout, documentKerningDomAttributes, documentKerningIsEffective, documentKerningThresholdHalfPointsFromElement, documentKerningThresholdPoints, documentLazyHtmlChunkFragment, documentLazyHtmlProjection, documentLazyHtmlProjectionFingerprint, documentLegacyTextEffectsConflict, documentLegacyTextEffectsCss, documentLegacyTextEffectsDomAttributes, documentLegacyTextEffectsFromElement, documentLegacyTextEffectsFromTextStyleAttributes, documentModelForContent, documentModelForHtml, documentModelHasTrustedInitialIntegrityFeatures, documentModelUsesWindowing, documentNoteKey, documentNoteKind, documentOpenTypeCssProperties, documentOpenTypeDomAttributes, documentOpenTypeFeaturesFromElement, 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, documentTextBoxProperties, documentTextBoxPropertiesFromElement, 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, isDocumentOpenTypeFeaturePatch, 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, normalizeDocumentImageTransform, normalizeDocumentImageWrapContour, normalizeDocumentImageWrapSide, normalizeDocumentKerningThresholdHalfPoints, normalizeDocumentLegacyTextEffect, normalizeDocumentLegacyTextEffects, normalizeDocumentNotesHtml, normalizeDocumentOpenTypeFeatures, normalizeDocumentOpenTypeLigatures, normalizeDocumentOpenTypeNumberForm, normalizeDocumentOpenTypeNumberSpacing, normalizeDocumentOpenTypeStylisticSets, normalizeDocumentPageBorders, normalizeDocumentPageChrome, normalizeDocumentPageGeometry, normalizeDocumentPageMargins, normalizeDocumentPaperSource, normalizeDocumentParagraphIndent, normalizeDocumentStrikeStyle, normalizeDocumentTabStops, normalizeDocumentTableBorderStyle, normalizeDocumentTableBorderWidth, normalizeDocumentTableRowHeightRule, normalizeDocumentTableRowIdentity, normalizeDocumentTableVerticalAlign, normalizeDocumentTextBoxProperties, normalizeDocumentTextCase, normalizeDocumentUnderlineColor, normalizeDocumentUnderlineStyle, normalizeTableColor, normalizedTabPosition, numberingTypeFromFormat, pageTwipsToMillimeters, parseDocumentCharacterFormatting, parseDocumentNumberingChange, parseDocumentOpenTypeFeatures, parseDocumentParagraphFormatting, patchDocumentLazyHtmlProjection, patchDocumentOpenTypeFeatures, 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, serializeDocumentNumberingChange, serializeDocumentOpenTypeFeatures, serializeDocumentParagraphFormatting, serializeDocumentTabStops, serializeWorkDocumentNode, setCustomDocumentColumns, supportedDocxBookmarkReferenceInstruction, syncDocumentContentFromHtml, textBoxCss, textBoxDomAttributes, 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 };