@docx-editor.dev/core 2.21.1 → 2.22.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 (99) hide show
  1. package/README.md +11 -5
  2. package/dist/automation.cjs +1 -1
  3. package/dist/automation.d.ts +10 -10
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.ts +8 -8
  7. package/dist/binding.js +1 -1
  8. package/dist/{chunk-BF2TOG2V.js → chunk-5RKCJ5DF.js} +1 -1
  9. package/dist/chunk-65GJRSZ5.cjs +18 -0
  10. package/dist/chunk-6TBRG6SA.cjs +20 -0
  11. package/dist/chunk-A72MJGY7.cjs +4 -0
  12. package/dist/chunk-AZ7QSAXH.js +4 -0
  13. package/dist/chunk-BL57VQ7E.js +1 -0
  14. package/dist/chunk-CB6RQ3GD.cjs +11 -0
  15. package/dist/chunk-GG4IAKFI.js +5 -0
  16. package/dist/chunk-HJYLFMLX.js +2 -0
  17. package/dist/chunk-HL6NO7IH.cjs +2 -0
  18. package/dist/chunk-HZQFGB2X.cjs +5 -0
  19. package/dist/{chunk-FPDIJ4RF.js → chunk-IWAUA732.js} +1 -1
  20. package/dist/chunk-OZXBAEWW.js +2 -0
  21. package/dist/{chunk-4TYA4RLP.cjs → chunk-P5PWSRNW.cjs} +1 -1
  22. package/dist/{chunk-DZYKU2HG.js → chunk-PD5XKBJA.js} +1 -1
  23. package/dist/{chunk-7N77EN2Z.cjs → chunk-REMFTPDL.cjs} +1 -1
  24. package/dist/{chunk-T5B4NMKF.cjs → chunk-RLKX7BIP.cjs} +1 -1
  25. package/dist/chunk-UGLO2GA5.cjs +1 -0
  26. package/dist/chunk-UOQONZVQ.js +11 -0
  27. package/dist/chunk-VD2MWTR6.js +20 -0
  28. package/dist/chunk-VIXH2OVP.js +1 -0
  29. package/dist/chunk-W2JIZ5JH.js +18 -0
  30. package/dist/chunk-W5H62AWM.cjs +1 -0
  31. package/dist/{chunk-E5OUYRNM.cjs → chunk-X2LJDR53.cjs} +5 -5
  32. package/dist/chunk-YQXY6TQ3.js +5 -0
  33. package/dist/{chunk-RA2TDTEQ.cjs → chunk-YYFBYVW4.cjs} +1 -1
  34. package/dist/collaboration/replication.cjs +1 -1
  35. package/dist/collaboration/replication.d.ts +4 -4
  36. package/dist/collaboration/replication.js +1 -1
  37. package/dist/collaboration.d.ts +3 -3
  38. package/dist/contracts/document.d.ts +2 -2
  39. package/dist/contracts/editor.d.ts +8 -8
  40. package/dist/contracts/modules.d.ts +6 -6
  41. package/dist/contracts/types.d.ts +1 -1
  42. package/dist/{custom-node-writes-CncR6KfC.d.ts → custom-node-writes-Ck6eOiJ3.d.ts} +2 -2
  43. package/dist/{document-protection-DM6mA8Rf.d.ts → document-protection-CMPEonQc.d.ts} +1 -1
  44. package/dist/{editor-BRh7GuZF.d.ts → editor-BKDVqXyk.d.ts} +70 -49
  45. package/dist/editor.cjs +1 -1
  46. package/dist/editor.css +1 -1
  47. package/dist/editor.d.ts +188 -26
  48. package/dist/editor.js +1 -1
  49. package/dist/export.cjs +2 -2
  50. package/dist/export.d.ts +31 -14
  51. package/dist/export.js +2 -2
  52. package/dist/{font-resolver-DwuQYj3P.d.ts → font-resolver-PBc8Vuxs.d.ts} +1 -1
  53. package/dist/{headless-document-view-C3fc_jV0.d.ts → headless-document-view-9wjJT20Y.d.ts} +2 -2
  54. package/dist/{image-resources-DxF-SN_8.d.ts → image-resources-B0v-XaTM.d.ts} +2 -2
  55. package/dist/{index-3pNnG4z4.d.ts → index-DQA53aR1.d.ts} +134 -16
  56. package/dist/index.cjs +1 -1
  57. package/dist/index.d.ts +17 -17
  58. package/dist/index.js +1 -1
  59. package/dist/{layout-shaping-_GGjhhVc.d.ts → layout-shaping-Dyr0ZSOI.d.ts} +5 -2
  60. package/dist/layout.cjs +1 -1
  61. package/dist/layout.d.ts +376 -33
  62. package/dist/layout.js +1 -1
  63. package/dist/{note-properties-CjT31AuP.d.ts → note-properties-D_lmG9xx.d.ts} +1 -1
  64. package/dist/{omml-equation-Bk3OP1fv.d.ts → omml-equation-CfTm3jOK.d.ts} +1 -1
  65. package/dist/output.cjs +1 -1
  66. package/dist/output.d.ts +7 -7
  67. package/dist/output.js +1 -1
  68. package/dist/{protocol-CrbTIW2Z.d.ts → protocol-CkVDxyQ3.d.ts} +2 -2
  69. package/dist/{review-paragraph-order-D3KZohIL.d.ts → review-paragraph-order-BjUs-tDd.d.ts} +1 -1
  70. package/dist/{revision-projection-kVd7p6Wd.d.ts → revision-projection-DDVBYTIG.d.ts} +1 -1
  71. package/dist/{semantic-cell-selection-CkSsZHDL.d.ts → semantic-cell-selection-DW6qsmoC.d.ts} +4 -4
  72. package/dist/{semantic-interaction-Z2Xa68U5.d.ts → semantic-interaction-BNiYSBcB.d.ts} +1 -1
  73. package/dist/{semantic-paint-BHKprI9P.d.ts → semantic-paint-DE236npp.d.ts} +2 -2
  74. package/dist/{semantic-records-StH-AnHK.d.ts → semantic-records-C5OeXnaL.d.ts} +545 -569
  75. package/dist/store.cjs +1 -1
  76. package/dist/store.d.ts +13 -13
  77. package/dist/store.js +1 -1
  78. package/dist/{tree-package-fragment-CpEV1gl3.d.ts → tree-package-fragment-DBb97w3F.d.ts} +2 -2
  79. package/dist/{tree-session-contract-CTT9nM7Z.d.ts → tree-session-contract-BYat3RKx.d.ts} +5 -5
  80. package/dist/{types-barrel-PwcfEkaX.d.ts → types-barrel-ChGvWjkO.d.ts} +3 -1
  81. package/package.json +2 -2
  82. package/dist/chunk-25OQBAKA.js +0 -2
  83. package/dist/chunk-3B3DQMSL.js +0 -11
  84. package/dist/chunk-3P3DNJYM.js +0 -5
  85. package/dist/chunk-3PA64KPK.js +0 -5
  86. package/dist/chunk-AGWWNVIJ.cjs +0 -1
  87. package/dist/chunk-DFTVN25X.cjs +0 -5
  88. package/dist/chunk-DGONGMAV.js +0 -2
  89. package/dist/chunk-F4H3LC6M.cjs +0 -2
  90. package/dist/chunk-IUTTOBQW.cjs +0 -20
  91. package/dist/chunk-IYCXQAFT.cjs +0 -4
  92. package/dist/chunk-JL3SI5SZ.js +0 -18
  93. package/dist/chunk-OFWUHH52.js +0 -20
  94. package/dist/chunk-OKY6JRJL.js +0 -4
  95. package/dist/chunk-P24FHMQW.cjs +0 -1
  96. package/dist/chunk-QBKAOSVF.cjs +0 -18
  97. package/dist/chunk-U5GUJKTS.js +0 -1
  98. package/dist/chunk-XRYSPKKC.js +0 -1
  99. package/dist/chunk-ZZRCVDQU.cjs +0 -11
package/dist/editor.d.ts CHANGED
@@ -1,36 +1,36 @@
1
- import { O as OoxmlPart, aD as TreeDocColorValue, t as ColorValue, aa as DrawingPositionInput, G as ParagraphTabStop } from './types-barrel-PwcfEkaX.js';
2
- export { aE as IMAGE_WRAP_TARGETS, a9 as ImageWrapTarget, F as ParagraphFlags, R as ReviewModelInput, aF as TEXT_FORM_FORMATS } from './types-barrel-PwcfEkaX.js';
3
- export { D as DEFAULT_IMAGE_RESOURCE_LIMITS, b as ImageDecodePort, c as ImageResourceLimits, R as RenderableImageMime, S as SupportedImageMime, a as VectorImageMime, r as resolveImageResourceLimits, d as resolveSvgIntrinsicSize, s as sniffImageMime, v as validateRasterHeader } from './image-resources-DxF-SN_8.js';
1
+ import { O as OoxmlPart, aD as TreeDocColorValue, t as ColorValue, ab as DrawingPositionInput, G as ParagraphTabStop } from './types-barrel-ChGvWjkO.js';
2
+ export { aE as IMAGE_WRAP_TARGETS, aa as ImageWrapTarget, F as ParagraphFlags, R as ReviewModelInput, aF as TEXT_FORM_FORMATS } from './types-barrel-ChGvWjkO.js';
3
+ export { D as DEFAULT_IMAGE_RESOURCE_LIMITS, I as ImageDecodePort, a as ImageResourceLimits, R as RenderableImageMime, S as SupportedImageMime, c as VectorImageMime, r as resolveImageResourceLimits, d as resolveSvgIntrinsicSize, s as sniffImageMime, v as validateRasterHeader } from './image-resources-B0v-XaTM.js';
4
4
  export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.js';
5
- import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-CTT9nM7Z.js';
6
- export { a as TreeApplyResult } from './tree-session-contract-CTT9nM7Z.js';
7
- import { a as FontConfiguration, E as EditorFontError, d as EditorSnapshot, e as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-BRh7GuZF.js';
8
- export { I as ImageContext, f as ImageCropPercent, g as ImageCropPermille, S as SelectedImageState, T as TrackedChangeFilterMode, h as TrackedChangePredicate, i as cropPercentFromCropPermille, j as cropPercentFromPermille, k as cropPercentFromSourceCrop, l as cropPermilleFromCropPercent, m as cropPermilleFromPercent, s as sourceCropFromCropPercent, v as validateImageCropPercent } from './editor-BRh7GuZF.js';
9
- import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-_GGjhhVc.js';
10
- export { d as disposeLayoutShaping } from './layout-shaping-_GGjhhVc.js';
11
- export { C as ComposeFontOriginsOptions, b as FONT_RESOLVER_BRAND, c as FONT_RESOLVER_MARK_KEY, d as FontConfigurationBase, e as FontConfigurationFragment, a as FontOrigin, F as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, M as MAX_RESOLVER_FAMILIES, i as MarkedFontResolver, W as WORD_DEFAULT_FONT, j as composeFontConfiguration, k as composeFontOrigins, l as defineFontResolver, m as isFontResolver } from './font-resolver-DwuQYj3P.js';
12
- import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-3pNnG4z4.js';
13
- export { A as AnchorFrameOrigin, C as CHROME_GROUPS, b as CHROME_MENUS, c as CHROME_UNAVAILABLE_KEY, d as ChromeControl, e as ChromeControlId, f as ChromeControlState, g as ChromeGroup, h as ChromeGroupId, i as ChromeMenu, j as ChromeMenuEntry, k as ChromeMenuId, l as ChromeMenuItemEntry, m as ChromeMenuSeparatorEntry, n as ChromeMenuSubmenuEntry, o as ChromeSlotId, p as ContentControlWidgetChromeHandlers, q as ContentControlWidgetSession, r as CustomFontsOptions, s as CustomFontsResolver, t as DEFAULT_TABLE_CHROME_DRAFT, u as DocxEditorConfig, v as DrawingSelectionIntent, E as EMU_PER_POINT, w as EditorCommandExecute, x as EquationActivation, y as EquationChromeHandlers, z as EquationOps, F as FinalizedImageOverlayInteraction, B as FontLoadFailure, G as FontLoadFailureReason, H as FontMeasurementState, I as FontUrlSource, J as HistoryGroupBinding, K as HistoryGroupBindingOptions, L as HyperlinkActivation, M as HyperlinkChromeHandlers, N as HyperlinkOps, Q as IMAGE_OVERLAY_NUDGE_PT, R as IMAGE_OVERLAY_NUDGE_SHIFT_PT, S as ImageInteractionSession, U as ImageOverlayScrollPort, V as ImageResizeHandle, W as ImageResizeResult, X as InvalidTextFormFieldChromeHandlers, Y as InvalidTextFormFieldSession, Z as LoadFontsRequest, _ as LoadFontsResult, $ as OverlayFrameRect, a0 as PaginatedSurfaceState, a1 as ParagraphPropertyEdit, a2 as PopupChromeRegistrationOptions, a3 as RemoteCaretLabelAnchor, a4 as RemoteCaretLabelHost, a5 as ReviewWriteIntent, a6 as RunTableChromeCommandResult, a7 as SectionAnchor, a8 as SectionBreakInsertType, a9 as SelectedDrawingOverlayTarget, aa as SurfaceEquation, ab as SurfaceFormatting, ac as SurfaceHyperlink, ad as SurfaceInsertImageInput, ae as SurfaceNavigation, af as SurfaceOverlayCoordinates, ag as SurfaceParagraphFormat, ah as TABLE_BORDER_STYLE_OPTIONS, ai as TABLE_BORDER_TARGET_OPTIONS, aj as TABLE_BORDER_WIDTH_OPTIONS, ak as TABLE_CHROME_SLOT_IDS, al as TableBorderStyleOption, am as TableBorderTargetOption, an as TableBorderTargetValue, ao as TableBorderWidthOption, ap as TableChromeDraft, aq as TableChromePick, ar as TableChromeSlotId, as as TableInteractionLabelKey, at as TextFormFieldChromeHandlers, au as TextFormFieldDialogSession, av as ToolbarCommandState, aw as ToolbarSlotValue, ax as ToolbarValueMap, ay as ToolbarValueSlot, az as applyTableChromePick, aA as bindHistoryGroup, aB as blankDocumentBytes, aC as canExecuteImageCommand, aD as captureImageMutationPreconditions, aE as chromeControlCount, aF as chromeMenuSlots, aG as chromeProbeForSlot, aH as chromeSlotId, aI as chromeSlotIsToggle, aJ as commandExecOptions, aK as commandForSlot, aL as commandForSlotValue, aM as commandForTableChromeSlotValue, aN as computeImageResizeResult, aO as computeMovedImagePosition, aP as computeResizedImageExtentEmu, aQ as createDocxEditor, aR as createFontSource, aS as createImageOverlayScrollPort, aT as cssPixelsToLayoutPoints, aU as customFonts, aV as defaultChromeGroups, aW as defaultTableLabel, aX as emuToOverlayPoints, aY as equationAtPosition, aZ as executeImageCommand, a_ as finalizeImageOverlayInteraction, a$ as formattingBarChromeGroups, b0 as isStaleImageInteractionCommit, b1 as isTableChromeSlot, b2 as layoutPointsToCssPixels, b3 as loadFonts, b4 as overlayFrameToSheetCssPixels, b5 as overlayHostOrigin, b6 as pointsToEmu, b7 as probeTableChromeCommand, b8 as resizePreservesAspect, b9 as runSave, ba as runTableChromeCommand, bb as runTableCommand, bc as runToolbarCommand, bd as selectedDrawingOverlayTargetOf, be as selectedImageStateOf, bf as surfacePaintScale, bg as tableChromeIconPaths, bh as tableChromeLabelKeyForTarget, bi as tableChromeToolbarState, bj as tableChromeVisible, bk as tableCommandToolbarState, bl as toolbarCommandState, bm as toolbarCommandStates } from './index-3pNnG4z4.js';
14
- import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CrbTIW2Z.js';
15
- import { S as SemanticLayout } from './semantic-records-StH-AnHK.js';
16
- export { T as TextMeasurer } from './semantic-records-StH-AnHK.js';
17
- export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-Z2Xa68U5.js';
18
- export { S as SectionProperties } from './semantic-cell-selection-CkSsZHDL.js';
19
- export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-BHKprI9P.js';
5
+ import { T as TreeDocxSessionView, f as DocumentThemeColorEntry } from './tree-session-contract-BYat3RKx.js';
6
+ export { a as TreeApplyResult } from './tree-session-contract-BYat3RKx.js';
7
+ import { a as FontConfiguration, E as EditorFontError, d as EditorSnapshot, e as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-BKDVqXyk.js';
8
+ export { I as ImageContext, f as ImageCropPercent, g as ImageCropPermille, S as SelectedImageState, T as TrackedChangeFilterMode, h as TrackedChangePredicate, i as cropPercentFromCropPermille, j as cropPercentFromPermille, k as cropPercentFromSourceCrop, l as cropPermilleFromCropPercent, m as cropPermilleFromPercent, s as sourceCropFromCropPercent, v as validateImageCropPercent } from './editor-BKDVqXyk.js';
9
+ import { L as LayoutShapingInstrumentation, a as LayoutShapingOptions } from './layout-shaping-Dyr0ZSOI.js';
10
+ export { d as disposeLayoutShaping } from './layout-shaping-Dyr0ZSOI.js';
11
+ export { C as ComposeFontOriginsOptions, b as FONT_RESOLVER_BRAND, c as FONT_RESOLVER_MARK_KEY, d as FontConfigurationBase, e as FontConfigurationFragment, a as FontOrigin, F as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, M as MAX_RESOLVER_FAMILIES, i as MarkedFontResolver, W as WORD_DEFAULT_FONT, j as composeFontConfiguration, k as composeFontOrigins, l as defineFontResolver, m as isFontResolver } from './font-resolver-PBc8Vuxs.js';
12
+ import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-DQA53aR1.js';
13
+ export { A as AnchorFrameOrigin, C as CHROME_GROUPS, b as CHROME_MENUS, c as CHROME_UNAVAILABLE_KEY, d as ChromeControl, e as ChromeControlId, f as ChromeControlState, g as ChromeExportError, h as ChromeExportFormat, i as ChromeExportHandlers, j as ChromeExportResult, k as ChromeGroup, l as ChromeGroupId, m as ChromeMenu, n as ChromeMenuEntry, o as ChromeMenuId, p as ChromeMenuItemEntry, q as ChromeMenuSeparatorEntry, r as ChromeMenuSubmenuEntry, s as ChromePrintError, t as ChromePrintErrorCode, u as ChromePrintJob, v as ChromePrintOptions, w as ChromeSlotId, x as ContentControlWidgetChromeHandlers, y as ContentControlWidgetSession, z as CustomFontsOptions, B as CustomFontsResolver, E as DEFAULT_TABLE_CHROME_DRAFT, F as DocxEditorConfig, G as DrawingSelectionIntent, H as EMU_PER_POINT, I as EditorCommandExecute, J as EquationActivation, K as EquationChromeHandlers, L as EquationOps, M as FinalizedImageOverlayInteraction, N as FontLoadFailure, Q as FontLoadFailureReason, R as FontMeasurementState, S as FontUrlSource, U as HistoryGroupBinding, V as HistoryGroupBindingOptions, W as HyperlinkActivation, X as HyperlinkChromeHandlers, Y as HyperlinkOps, Z as IMAGE_OVERLAY_NUDGE_PT, _ as IMAGE_OVERLAY_NUDGE_SHIFT_PT, $ as ImageInteractionSession, a0 as ImageOverlayScrollPort, a1 as ImageResizeHandle, a2 as ImageResizeResult, a3 as InvalidTextFormFieldChromeHandlers, a4 as InvalidTextFormFieldSession, a5 as LoadFontsRequest, a6 as LoadFontsResult, a7 as OverlayFrameRect, a8 as PaginatedSurfaceState, a9 as ParagraphPropertyEdit, aa as PopupChromeRegistrationOptions, ab as RemoteCaretLabelAnchor, ac as RemoteCaretLabelHost, ad as ReviewWriteIntent, ae as RunTableChromeCommandResult, af as SectionAnchor, ag as SectionBreakInsertType, ah as SelectedDrawingOverlayTarget, ai as SurfaceEquation, aj as SurfaceFormatting, ak as SurfaceHyperlink, al as SurfaceInsertImageInput, am as SurfaceNavigation, an as SurfaceOverlayCoordinates, ao as SurfaceParagraphFormat, ap as TABLE_BORDER_STYLE_OPTIONS, aq as TABLE_BORDER_TARGET_OPTIONS, ar as TABLE_BORDER_WIDTH_OPTIONS, as as TABLE_CHROME_SLOT_IDS, at as TableBorderStyleOption, au as TableBorderTargetOption, av as TableBorderTargetValue, aw as TableBorderWidthOption, ax as TableChromeDraft, ay as TableChromePick, az as TableChromeSlotId, aA as TableInteractionLabelKey, aB as TextFormFieldChromeHandlers, aC as TextFormFieldDialogSession, aD as ToolbarCommandState, aE as ToolbarSlotValue, aF as ToolbarValueMap, aG as ToolbarValueSlot, aH as applyTableChromePick, aI as bindHistoryGroup, aJ as blankDocumentBytes, aK as canExecuteImageCommand, aL as captureImageMutationPreconditions, aM as chromeControlCount, aN as chromeMenuSlots, aO as chromeProbeForSlot, aP as chromeSlotId, aQ as chromeSlotIsToggle, aR as commandExecOptions, aS as commandForSlot, aT as commandForSlotValue, aU as commandForTableChromeSlotValue, aV as computeImageResizeResult, aW as computeMovedImagePosition, aX as computeResizedImageExtentEmu, aY as createDocxEditor, aZ as createFontSource, a_ as createImageOverlayScrollPort, a$ as cssPixelsToLayoutPoints, b0 as customFonts, b1 as defaultChromeGroups, b2 as defaultTableLabel, b3 as emuToOverlayPoints, b4 as equationAtPosition, b5 as executeImageCommand, b6 as finalizeImageOverlayInteraction, b7 as formattingBarChromeGroups, b8 as isChromePrintShortcut, b9 as isStaleImageInteractionCommit, ba as isTableChromeSlot, bb as layoutPointsToCssPixels, bc as loadFonts, bd as overlayFrameToSheetCssPixels, be as overlayHostOrigin, bf as pointsToEmu, bg as probeTableChromeCommand, bh as resizePreservesAspect, bi as runChromeExport, bj as runChromePrint, bk as runSave, bl as runTableChromeCommand, bm as runTableCommand, bn as runToolbarCommand, bo as selectedDrawingOverlayTargetOf, bp as selectedImageStateOf, bq as surfacePaintScale, br as tableChromeIconPaths, bs as tableChromeLabelKeyForTarget, bt as tableChromeToolbarState, bu as tableChromeVisible, bv as tableCommandToolbarState, bw as toolbarCommandState, bx as toolbarCommandStates } from './index-DQA53aR1.js';
14
+ import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CkVDxyQ3.js';
15
+ import { S as SemanticLayout } from './semantic-records-C5OeXnaL.js';
16
+ export { T as TextMeasurer } from './semantic-records-C5OeXnaL.js';
17
+ export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-BNiYSBcB.js';
18
+ export { S as SectionProperties } from './semantic-cell-selection-DW6qsmoC.js';
19
+ export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-DE236npp.js';
20
20
  export { CollaborationModuleContribution } from './collaboration.js';
21
21
  import './editor-scope-OHPwVQ5l.js';
22
- import './revision-projection-kVd7p6Wd.js';
23
- import './tree-package-fragment-CpEV1gl3.js';
22
+ import './revision-projection-DDVBYTIG.js';
23
+ import './tree-package-fragment-DBb97w3F.js';
24
24
  import './collaboration/replication.js';
25
25
  import './failure-DNNmwsgD.js';
26
- import './custom-node-writes-CncR6KfC.js';
27
- import './headless-document-view-C3fc_jV0.js';
26
+ import './custom-node-writes-Ck6eOiJ3.js';
27
+ import './headless-document-view-9wjJT20Y.js';
28
28
  import 'prosemirror-model';
29
29
  import './contracts/document.js';
30
30
  import './contracts/interaction.js';
31
- import './document-protection-DM6mA8Rf.js';
32
- import './note-properties-CjT31AuP.js';
33
- import './omml-equation-Bk3OP1fv.js';
31
+ import './document-protection-CMPEonQc.js';
32
+ import './note-properties-D_lmG9xx.js';
33
+ import './omml-equation-CfTm3jOK.js';
34
34
 
35
35
  declare function toEditorFontError(error: unknown): EditorFontError;
36
36
  declare function createLayoutShaping(configuration: FontConfiguration, instrumentation?: LayoutShapingInstrumentation): Promise<LayoutShapingOptions>;
@@ -707,4 +707,166 @@ declare function createContentControlListNavigation(locale?: string): ContentCon
707
707
  /** The `accept` list of the engine's picker: what `replaceImage` takes. */
708
708
  declare const CONTENT_CONTROL_PICTURE_ACCEPT = "image/png,image/jpeg,image/gif,image/bmp,image/webp";
709
709
 
710
- export { AUTO_ZOOM_MODE, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, type CalendarDay, type CalendarMonth, type CalendarMonthOptions, type ColorLowerResult, type ContentControlListNavigation, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, LOADING_SNAPSHOT, NO_MIXED_FIELDS, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, type ParagraphDialogFields, type ParagraphDialogMixed, type ParagraphFlagKey, type ParagraphFlagState, type ParagraphFormatRead, type ParagraphFormatUpdate, ParagraphTabStop, type RulerDragOptions, type RulerIndent, type RulerIndentHandle, type RulerPageMetrics, type RulerTick, type RulerUnit, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, type SpecialIndent, type SurfaceExtent, TAB_ALIGNMENT_LABELS, TWIPS_PER_CM, TWIPS_PER_INCH, type TabAlignment, type TabLeaderName, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, clipboardDropLandsText, clipboardPasteLandsContent, contentControlPopupKeyDown, contentControlPopupOpener, createBrowserAutomationHost, createContentControlListNavigation, createLayoutShaping, dragIndent, editorCommandKey, firstDayOfWeek, formatInches, generateRulerTicks, handlePosition, inchesToTwips, isoDateOf, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, parseIsoDate, partOfNodeId, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameTabStops, sameZoomMode, seedFields, shiftMonth, signedFirstLineOf, snapTwips, specialOf, surfaceExtent, tableCommandState, toEditorFontError, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, withTabStop };
710
+ /** A processor location in the returned document's body, including table paragraphs. @public */
711
+ interface RefreshLocation {
712
+ /** OOXML w14:paraId. Use this or paragraphIndex, not both. */
713
+ readonly paragraphId?: string;
714
+ /** Zero-based body paragraph index in document order. */
715
+ readonly paragraphIndex?: number;
716
+ /** UTF-16 offsets in the returned paragraph. */
717
+ readonly start: number;
718
+ readonly end: number;
719
+ /** Exact returned text at these offsets. Required to reject mismatched metadata. */
720
+ readonly text: string;
721
+ }
722
+ /** One processor change. Keep its id stable across cumulative results. @public */
723
+ interface RefreshChangeInput {
724
+ readonly id: string;
725
+ readonly location?: RefreshLocation;
726
+ /** Deletions without a surviving range have no highlight. */
727
+ readonly unavailableReason?: 'deleted' | 'unavailable';
728
+ }
729
+ /** One validated change for an accepted result. @public */
730
+ interface RefreshChange {
731
+ readonly id: string;
732
+ /** Identity of the accepted submission and processor sequence. */
733
+ readonly resultId: string;
734
+ /** True for a new change id or changed text in an existing change id. */
735
+ readonly isNew: boolean;
736
+ readonly status: 'available' | 'deleted' | 'unavailable' | 'invalid' | 'unsupported-story';
737
+ readonly location?: RefreshLocation;
738
+ }
739
+ /** A document captured for external processing. Treat this object as an opaque token. @public */
740
+ interface RefreshSubmission {
741
+ readonly id: string;
742
+ readonly bytes: ArrayBuffer;
743
+ }
744
+ /** Cumulative output for one submission. Assign sequence at the processor, before delivery. @public */
745
+ interface RefreshUpdate {
746
+ readonly submission: RefreshSubmission;
747
+ readonly sequence: number;
748
+ readonly bytes: ArrayBuffer | Uint8Array;
749
+ /** Omit to derive changes from tracked revisions when a review module is registered. */
750
+ readonly changes?: readonly RefreshChangeInput[];
751
+ /** Stable failed operation ids. The controller reports these and never retries processor work. */
752
+ readonly failures?: readonly string[];
753
+ }
754
+ /** Stable refusal codes for external document replacement. @public */
755
+ type RefreshFailureCode = 'unavailable' | 'collaboration' | 'busy' | 'cancelled' | 'superseded' | 'document-changed' | 'local-edits' | 'out-of-order' | 'invalid-result' | 'invalid-document' | 'input-failed' | 'load-failed' | 'recovery-failed';
756
+ /** Completion belongs to one result, including refusals and recovery failures. @public */
757
+ type RefreshResult = {
758
+ readonly ok: true;
759
+ readonly resultId: string;
760
+ readonly changes: readonly RefreshChange[];
761
+ readonly changeInformation: 'available' | 'unavailable';
762
+ readonly failures: readonly string[];
763
+ } | {
764
+ readonly ok: false;
765
+ readonly resultId: string;
766
+ readonly code: RefreshFailureCode;
767
+ readonly recovered?: boolean;
768
+ };
769
+ /** Observable controller state. Document editing stays available during processing. @public */
770
+ interface DocumentRefreshState {
771
+ readonly phase: 'idle' | 'capturing' | 'processing' | 'refreshing' | 'recovering' | 'complete' | 'failed';
772
+ readonly result: RefreshResult | null;
773
+ readonly changes: readonly RefreshChange[];
774
+ /** Whether highlights are requested for available locations. False when the whole set starts dismissal. */
775
+ readonly highlightsVisible: boolean;
776
+ /** Offer restore and download controls when true. */
777
+ readonly recoveryAvailable: boolean;
778
+ }
779
+ /** Opacity fade settings. Reduced motion caps fades at 125ms. @public */
780
+ interface RefreshHighlightAnimation {
781
+ /** Fade duration in milliseconds. Default: 180. Must be finite and between 0 and 10000. */
782
+ readonly durationMs?: number;
783
+ /** Automatic and explicit exit fade duration. Defaults to durationMs. Range: 0 through 10000. */
784
+ readonly exitDurationMs?: number;
785
+ /** CSS timing function for both fades. Defaults to --doc-motion-ease-out. CSS variables are not accepted here. */
786
+ readonly easing?: string;
787
+ }
788
+ /** Presentation for temporary paragraph highlights. Each call starts from these defaults. @public */
789
+ interface RefreshHighlightOptions {
790
+ /** Include earlier changes from the latest cumulative result. Default: false. */
791
+ readonly includePrevious?: boolean;
792
+ /** Select these change IDs instead of the recent/all filter. Unknown or unavailable IDs are skipped. Empty means none. */
793
+ readonly changeIds?: readonly string[];
794
+ /** CSS color, including var(). Default: var(--doc-refresh-highlight-color), a light blue. */
795
+ readonly color?: string;
796
+ /** Fill opacity, from 0 to 1. Default: 0.14. Does not change document text opacity. */
797
+ readonly opacity?: number;
798
+ /** Extra space on each edge, in CSS pixels at 100% zoom. Default: 4. Must be finite and nonnegative. */
799
+ readonly padding?: number;
800
+ /** Corner radius in CSS pixels at 100% zoom. Default: 6. Must be finite and nonnegative. */
801
+ readonly borderRadius?: number;
802
+ /** Border width in CSS pixels at 100% zoom. Default: 0. Finite and nonnegative. */
803
+ readonly borderWidth?: number;
804
+ /** CSS border color. Defaults to color. Use an alpha color for a translucent border; opacity controls only the fill. */
805
+ readonly borderColor?: string;
806
+ /** Border pattern. Default: solid. */
807
+ readonly borderStyle?: 'solid' | 'dashed' | 'dotted';
808
+ /** Optional CSS classes for extra decoration, such as shadows or patterns. Geometry remains engine-owned. */
809
+ readonly className?: string;
810
+ /** Milliseconds before dismissal starts. Default: 3000. Null keeps highlights until cleared. Maximum: 2147483647. */
811
+ readonly timeoutMs?: number | null;
812
+ /** Default: true, a 180ms fade. False disables motion. Repeated calls do not replay the entrance. */
813
+ readonly animation?: boolean | RefreshHighlightAnimation;
814
+ }
815
+ /** Explicit highlight dismissal. Document edits always remove stale highlights immediately. @public */
816
+ interface ClearRefreshHighlightsOptions {
817
+ /** Defaults to the last highlightChanges() animation. False removes highlights immediately. */
818
+ readonly animation?: boolean | RefreshHighlightAnimation;
819
+ }
820
+ /** Explicit change navigation. Does not change the default scroll preservation during refresh. @public */
821
+ interface NavigateToChangeOptions {
822
+ /** Move the caret and focus to the changed range start. Default: false. */
823
+ readonly focus?: boolean;
824
+ /** Target alignment. Default: center. centerIfNeeded preserves scroll for an already visible target. */
825
+ readonly block?: 'start' | 'center' | 'centerIfNeeded' | 'nearest';
826
+ /** Default: instant. Reduced motion uses instant even when smooth is requested. */
827
+ readonly behavior?: 'instant' | 'smooth';
828
+ /** Edge padding for start/nearest placement, in CSS pixels. Default: 24. Finite and nonnegative. */
829
+ readonly offsetPx?: number;
830
+ }
831
+ /** External file transport stays in your application. Reload resets selection and undo history. @public */
832
+ interface DocumentRefresh {
833
+ /** Finish pending input and capture bytes with their document revision. Supersedes earlier submissions. */
834
+ capture(): Promise<RefreshSubmission>;
835
+ /** Accept cumulative output. Preserve a clamped scroll position without moving focus. */
836
+ applyUpdate(update: RefreshUpdate): Promise<RefreshResult>;
837
+ /** Cancel pending processing. An accepted result stays loaded. */
838
+ cancel(): void;
839
+ /** End processing when no further output will arrive. */
840
+ finish(submission: RefreshSubmission): void;
841
+ /** Cached state, suitable for framework external-store subscriptions. */
842
+ snapshot(): DocumentRefreshState;
843
+ /** Observe state changes. Returns an unsubscribe function. */
844
+ subscribe(listener: () => void): () => void;
845
+ /** Completion notification for every `applyUpdate()` call, including a refused result. */
846
+ onResult(listener: (result: RefreshResult) => void): () => void;
847
+ /** Highlight available changes and return their count, including offscreen locations. Zero means none. Always validates options. */
848
+ highlightChanges(options?: RefreshHighlightOptions): number;
849
+ /** Remove temporary paragraph highlights without changing document content or history. */
850
+ clearHighlights(options?: ClearRefreshHighlightsOptions): void;
851
+ /** Explicit navigation. Does not focus unless requested. Returns false for unavailable locations. */
852
+ navigateToChange(id: string, options?: NavigateToChangeOptions): boolean;
853
+ /** Return a copy for download after recovery fails. */
854
+ recoveryBytes(): ArrayBuffer | null;
855
+ /** Retry recovery only while the failed document session is still active. */
856
+ recover(): Promise<boolean>;
857
+ }
858
+ /** A capture failure with a stable code. `applyUpdate()` failures use RefreshResult instead. @public */
859
+ declare class DocumentRefreshError extends Error {
860
+ /** Machine-readable reason. */
861
+ readonly code: RefreshFailureCode;
862
+ constructor(code: RefreshFailureCode, cause?: unknown);
863
+ }
864
+
865
+ /**
866
+ * Get the engine-owned controller for updated DOCX files. React and Vue use the same controller.
867
+ * Transport and processor jobs belong to your application. This is a host API, not an Office.js document member.
868
+ * @public
869
+ */
870
+ declare function createDocumentRefresh(editor: DocxEditorInstance): DocumentRefresh;
871
+
872
+ export { AUTO_ZOOM_MODE, BROWSER_AUTOMATION_CAPABILITIES, CONTENT_CONTROL_PICTURE_ACCEPT, type CalendarDay, type CalendarMonth, type CalendarMonthOptions, type ClearRefreshHighlightsOptions, type ColorLowerResult, type ContentControlListNavigation, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, type DocumentRefresh, DocumentRefreshError, type DocumentRefreshState, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, LOADING_SNAPSHOT, NO_MIXED_FIELDS, type NavigateToChangeOptions, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, type ParagraphDialogFields, type ParagraphDialogMixed, type ParagraphFlagKey, type ParagraphFlagState, type ParagraphFormatRead, type ParagraphFormatUpdate, ParagraphTabStop, type RefreshChange, type RefreshChangeInput, type RefreshFailureCode, type RefreshHighlightAnimation, type RefreshHighlightOptions, type RefreshLocation, type RefreshResult, type RefreshSubmission, type RefreshUpdate, type RulerDragOptions, type RulerIndent, type RulerIndentHandle, type RulerPageMetrics, type RulerTick, type RulerUnit, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, type SpecialIndent, type SurfaceExtent, TAB_ALIGNMENT_LABELS, TWIPS_PER_CM, TWIPS_PER_INCH, type TabAlignment, type TabLeaderName, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, calendarDateForKey, calendarDateFromText, calendarDateText, calendarMonth, calendarMonthNames, calendarMonthTitle, calendarWeekdays, changedFields, clipboardDropLandsText, clipboardPasteLandsContent, contentControlPopupKeyDown, contentControlPopupOpener, createBrowserAutomationHost, createContentControlListNavigation, createDocumentRefresh, createLayoutShaping, dragIndent, editorCommandKey, firstDayOfWeek, formatInches, generateRulerTicks, handlePosition, inchesToTwips, isoDateOf, lowerColorValueForBorder, lowerColorValueForFill, mixedFieldsOf, mountPaginatedSurface, observeContentControlPopup, parseIsoDate, partOfNodeId, positionContentControlPopup, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameTabStops, sameZoomMode, seedFields, shiftMonth, signedFirstLineOf, snapTwips, specialOf, surfaceExtent, tableCommandState, toEditorFontError, trapTabWithin, twipsToInches, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier, withTabStop };
package/dist/editor.js CHANGED
@@ -1 +1 @@
1
- export{_a as AUTO_ZOOM_MODE,db as BROWSER_AUTOMATION_CAPABILITIES,wa as CHROME_GROUPS,Aa as CHROME_MENUS,Da as CHROME_UNAVAILABLE_KEY,Ia as CONTENT_CONTROL_PICTURE_ACCEPT,Y as DEFAULT_TABLE_CHROME_DRAFT,Q as EMU_PER_POINT,$a as FIT_WIDTH_ZOOM_MODE,O as IMAGE_OVERLAY_NUDGE_PT,P as IMAGE_OVERLAY_NUDGE_SHIFT_PT,c as LOADING_SNAPSHOT,vb as NO_MIXED_FIELDS,l as PX_PER_CM,k as PX_PER_INCH,r as SNAP_TWIPS_CM,q as SNAP_TWIPS_INCH,ca as TABLE_BORDER_STYLE_OPTIONS,ba as TABLE_BORDER_TARGET_OPTIONS,da as TABLE_BORDER_WIDTH_OPTIONS,Z as TABLE_CHROME_SLOT_IDS,rb as TAB_ALIGNMENT_LABELS,p as TWIPS_PER_CM,o as TWIPS_PER_INCH,Za as ZOOM_MAX,Ya as ZOOM_MIN,ea as applyTableChromePick,y as applyThemeShade,x as applyThemeTint,Bb as bindHistoryGroup,d as blankDocumentBytes,Qa as calendarDateForKey,Sa as calendarDateFromText,Ra as calendarDateText,Oa as calendarMonth,Ta as calendarMonthNames,Ma as calendarMonthTitle,Na as calendarWeekdays,M as canExecuteImageCommand,L as captureImageMutationPreconditions,yb as changedFields,Ca as chromeControlCount,Ba as chromeMenuSlots,ia as chromeProbeForSlot,xa as chromeSlotId,oa as chromeSlotIsToggle,f as clipboardDropLandsText,e as clipboardPasteLandsContent,v as commandExecOptions,ja as commandForSlot,la as commandForSlotValue,ka as commandForTableChromeSlotValue,lb as computeImageResizeResult,V as computeMovedImagePosition,U as computeResizedImageExtentEmu,Ga as contentControlPopupKeyDown,Ha as contentControlPopupOpener,eb as createBrowserAutomationHost,Ua as createContentControlListNavigation,cb as createDocxEditor,i as createFontSource,mb as createImageOverlayScrollPort,b as createLayoutShaping,I as cropPercentFromCropPermille,G as cropPercentFromPermille,D as cropPercentFromSourceCrop,H as cropPermilleFromCropPercent,F as cropPermilleFromPercent,hb as cssPixelsToLayoutPoints,j as customFonts,ya as defaultChromeGroups,_ as defaultTableLabel,u as dragIndent,va as editorCommandKey,T as emuToOverlayPoints,Wa as equationAtPosition,N as executeImageCommand,nb as finalizeImageOverlayInteraction,La as firstDayOfWeek,pb as formatInches,za as formattingBarChromeGroups,m as generateRulerTicks,s as handlePosition,qb as inchesToTwips,W as isStaleImageInteractionCommit,$ as isTableChromeSlot,Ja as isoDateOf,gb as layoutPointsToCssPixels,h as loadFonts,A as lowerColorValueForBorder,B as lowerColorValueForFill,wb as mixedFieldsOf,Xa as mountPaginatedSurface,Fa as observeContentControlPopup,ib as overlayFrameToSheetCssPixels,jb as overlayHostOrigin,Ka as parseIsoDate,g as partOfNodeId,S as pointsToEmu,Ea as positionContentControlPopup,fa as probeTableChromeCommand,kb as resizePreservesAspect,C as resolveColorValueToCss,z as resolveThemeColorHex,ab as resolveZoomMode,n as rulerPageBox,sa as runSave,qa as runTableChromeCommand,ua as runTableCommand,ra as runToolbarCommand,xb as sameTabStops,bb as sameZoomMode,ub as seedFields,R as selectedDrawingOverlayTargetOf,K as selectedImageStateOf,Pa as shiftMonth,tb as signedFirstLineOf,t as snapTwips,E as sourceCropFromCropPercent,sb as specialOf,Va as surfaceExtent,fb as surfacePaintScale,ha as tableChromeIconPaths,ga as tableChromeLabelKeyForTarget,ma as tableChromeToolbarState,aa as tableChromeVisible,X as tableCommandState,ta as tableCommandToolbarState,a as toEditorFontError,na as toolbarCommandState,pa as toolbarCommandStates,Ab as trapTabWithin,ob as twipsToInches,J as validateImageCropPercent,w as validateThemeModifier,zb as withTabStop}from'./chunk-OFWUHH52.js';export{a as resolveEditorModules}from'./chunk-AJCCS53D.js';import'./chunk-DGONGMAV.js';export{h as FONT_RESOLVER_BRAND,g as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,d as WORD_DEFAULT_FONT,e as composeFontConfiguration,k as composeFontOrigins,i as defineFontResolver,j as isFontResolver}from'./chunk-U5GUJKTS.js';export{H as disposeLayoutShaping}from'./chunk-OKY6JRJL.js';import'./chunk-RIYSCEFQ.js';import'./chunk-25OQBAKA.js';import'./chunk-XRYSPKKC.js';import'./chunk-JL3SI5SZ.js';import'./chunk-3PA64KPK.js';import'./chunk-FPDIJ4RF.js';import'./chunk-DZYKU2HG.js';import'./chunk-VP7SDFCM.js';import'./chunk-3P3DNJYM.js';import'./chunk-6JIJOZDW.js';import'./chunk-BF2TOG2V.js';export{m as DEFAULT_IMAGE_RESOURCE_LIMITS,xi as DRAWING_REL_FROM_H,yi as DRAWING_REL_FROM_V,db as IMAGE_WRAP_TARGETS,kh as TEXT_FORM_FORMATS,Ai as positionInputFromPropertiesCommand,zi as propertiesCommandHasPositionFields,n as resolveImageResourceLimits,yb as resolveSvgIntrinsicSize,ub as sniffImageMime,wi as validateDrawingPositionInput,zb as validateRasterHeader,Bi as validateSetImagePositionCommand}from'./chunk-3B3DQMSL.js';import'./chunk-S6J4O5XP.js';
1
+ export{_a as AUTO_ZOOM_MODE,db as BROWSER_AUTOMATION_CAPABILITIES,wa as CHROME_GROUPS,Aa as CHROME_MENUS,Da as CHROME_UNAVAILABLE_KEY,Ia as CONTENT_CONTROL_PICTURE_ACCEPT,Eb as ChromeExportError,Gb as ChromePrintError,Y as DEFAULT_TABLE_CHROME_DRAFT,Cb as DocumentRefreshError,Q as EMU_PER_POINT,$a as FIT_WIDTH_ZOOM_MODE,O as IMAGE_OVERLAY_NUDGE_PT,P as IMAGE_OVERLAY_NUDGE_SHIFT_PT,c as LOADING_SNAPSHOT,vb as NO_MIXED_FIELDS,l as PX_PER_CM,k as PX_PER_INCH,r as SNAP_TWIPS_CM,q as SNAP_TWIPS_INCH,ca as TABLE_BORDER_STYLE_OPTIONS,ba as TABLE_BORDER_TARGET_OPTIONS,da as TABLE_BORDER_WIDTH_OPTIONS,Z as TABLE_CHROME_SLOT_IDS,rb as TAB_ALIGNMENT_LABELS,p as TWIPS_PER_CM,o as TWIPS_PER_INCH,Za as ZOOM_MAX,Ya as ZOOM_MIN,ea as applyTableChromePick,y as applyThemeShade,x as applyThemeTint,Bb as bindHistoryGroup,d as blankDocumentBytes,Qa as calendarDateForKey,Sa as calendarDateFromText,Ra as calendarDateText,Oa as calendarMonth,Ta as calendarMonthNames,Ma as calendarMonthTitle,Na as calendarWeekdays,M as canExecuteImageCommand,L as captureImageMutationPreconditions,yb as changedFields,Ca as chromeControlCount,Ba as chromeMenuSlots,ia as chromeProbeForSlot,xa as chromeSlotId,oa as chromeSlotIsToggle,f as clipboardDropLandsText,e as clipboardPasteLandsContent,v as commandExecOptions,ja as commandForSlot,la as commandForSlotValue,ka as commandForTableChromeSlotValue,lb as computeImageResizeResult,V as computeMovedImagePosition,U as computeResizedImageExtentEmu,Ga as contentControlPopupKeyDown,Ha as contentControlPopupOpener,eb as createBrowserAutomationHost,Ua as createContentControlListNavigation,Db as createDocumentRefresh,cb as createDocxEditor,i as createFontSource,mb as createImageOverlayScrollPort,b as createLayoutShaping,I as cropPercentFromCropPermille,G as cropPercentFromPermille,D as cropPercentFromSourceCrop,H as cropPermilleFromCropPercent,F as cropPermilleFromPercent,hb as cssPixelsToLayoutPoints,j as customFonts,ya as defaultChromeGroups,_ as defaultTableLabel,u as dragIndent,va as editorCommandKey,T as emuToOverlayPoints,Wa as equationAtPosition,N as executeImageCommand,nb as finalizeImageOverlayInteraction,La as firstDayOfWeek,pb as formatInches,za as formattingBarChromeGroups,m as generateRulerTicks,s as handlePosition,qb as inchesToTwips,Hb as isChromePrintShortcut,W as isStaleImageInteractionCommit,$ as isTableChromeSlot,Ja as isoDateOf,gb as layoutPointsToCssPixels,h as loadFonts,A as lowerColorValueForBorder,B as lowerColorValueForFill,wb as mixedFieldsOf,Xa as mountPaginatedSurface,Fa as observeContentControlPopup,ib as overlayFrameToSheetCssPixels,jb as overlayHostOrigin,Ka as parseIsoDate,g as partOfNodeId,S as pointsToEmu,Ea as positionContentControlPopup,fa as probeTableChromeCommand,kb as resizePreservesAspect,C as resolveColorValueToCss,z as resolveThemeColorHex,ab as resolveZoomMode,n as rulerPageBox,Fb as runChromeExport,Ib as runChromePrint,sa as runSave,qa as runTableChromeCommand,ua as runTableCommand,ra as runToolbarCommand,xb as sameTabStops,bb as sameZoomMode,ub as seedFields,R as selectedDrawingOverlayTargetOf,K as selectedImageStateOf,Pa as shiftMonth,tb as signedFirstLineOf,t as snapTwips,E as sourceCropFromCropPercent,sb as specialOf,Va as surfaceExtent,fb as surfacePaintScale,ha as tableChromeIconPaths,ga as tableChromeLabelKeyForTarget,ma as tableChromeToolbarState,aa as tableChromeVisible,X as tableCommandState,ta as tableCommandToolbarState,a as toEditorFontError,na as toolbarCommandState,pa as toolbarCommandStates,Ab as trapTabWithin,ob as twipsToInches,J as validateImageCropPercent,w as validateThemeModifier,zb as withTabStop}from'./chunk-VD2MWTR6.js';export{a as resolveEditorModules}from'./chunk-AJCCS53D.js';import'./chunk-OZXBAEWW.js';export{h as FONT_RESOLVER_BRAND,g as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,d as WORD_DEFAULT_FONT,e as composeFontConfiguration,k as composeFontOrigins,i as defineFontResolver,j as isFontResolver}from'./chunk-VIXH2OVP.js';export{H as disposeLayoutShaping}from'./chunk-AZ7QSAXH.js';import'./chunk-RIYSCEFQ.js';import'./chunk-HJYLFMLX.js';import'./chunk-BL57VQ7E.js';import'./chunk-W2JIZ5JH.js';import'./chunk-YQXY6TQ3.js';import'./chunk-IWAUA732.js';import'./chunk-PD5XKBJA.js';import'./chunk-VP7SDFCM.js';import'./chunk-GG4IAKFI.js';import'./chunk-6JIJOZDW.js';import'./chunk-5RKCJ5DF.js';export{m as DEFAULT_IMAGE_RESOURCE_LIMITS,Ci as DRAWING_REL_FROM_H,Di as DRAWING_REL_FROM_V,ib as IMAGE_WRAP_TARGETS,ph as TEXT_FORM_FORMATS,Fi as positionInputFromPropertiesCommand,Ei as propertiesCommandHasPositionFields,n as resolveImageResourceLimits,Db as resolveSvgIntrinsicSize,zb as sniffImageMime,Bi as validateDrawingPositionInput,Eb as validateRasterHeader,Gi as validateSetImagePositionCommand}from'./chunk-UOQONZVQ.js';import'./chunk-S6J4O5XP.js';
package/dist/export.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkP24FHMQW_cjs=require('./chunk-P24FHMQW.cjs'),chunkIYCXQAFT_cjs=require('./chunk-IYCXQAFT.cjs'),chunkAGWWNVIJ_cjs=require('./chunk-AGWWNVIJ.cjs'),chunkQBKAOSVF_cjs=require('./chunk-QBKAOSVF.cjs'),chunkT5B4NMKF_cjs=require('./chunk-T5B4NMKF.cjs');require('./chunk-FGBADUSK.cjs');var chunkDFTVN25X_cjs=require('./chunk-DFTVN25X.cjs'),chunkZZRCVDQU_cjs=require('./chunk-ZZRCVDQU.cjs');var B=chunkIYCXQAFT_cjs.b;function q(e){return typeof e.admittedFontFace=="function"}var yt=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function P(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function j(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:P(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:P(o.requested),resolved:P(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function ht(e){return Object.freeze({...j(e),bytes:chunkIYCXQAFT_cjs.h(e)})}function Ft(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkIYCXQAFT_cjs.d?null:ht(t)}catch{return null}}function Ge(e){return o=>{if(e.status()!=="active")throw e.unavailable();return Ft(e.resolve(),o)}}function xt(e){return Object.freeze(e.slice(0,B).map(o=>Object.freeze({request:P(o.request),partName:o.partName,reason:o.reason})))}function z(e,o,t,n,r=[]){let i=new Map;for(let l of [...e,o]){let u=l.toLowerCase();i.has(u)||i.set(u,l);}let a=[...i.values()].map(l=>{let u=[];for(let c of yt){let s=n?.({family:l,...c});!s||s instanceof chunkIYCXQAFT_cjs.d||u.push(Object.freeze({...c,sourceFamily:s.family,via:s.substitution?"substitution":"direct",identity:s.identity,id:s.id,hash:s.hash,faceIndex:s.faceIndex,substitution:s.substitution}));}return Object.freeze({family:l,coverage:u.length===4?"complete":u.length>0?"partial":"none",faces:Object.freeze(u)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(a),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:xt(r)})}function V(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function H(e,o){if(o.fontPolicy!=="strict"||e.originFailures.length===0&&e.families.every(n=>n.coverage==="complete"))return;let t=e.families.filter(n=>n.coverage!=="complete").map(n=>n.family).join(", ");throw new chunkAGWWNVIJ_cjs.d("layoutFailed",`Strict font policy refused export${t?`; incomplete families: ${t}`:"; a font origin failed"}`)}function N(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let r={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},i=chunkIYCXQAFT_cjs.g(r),a=o.get(i);if(!a){try{a=e.fonts.resolve(r);}catch{return null}o.set(i,a);}return a instanceof chunkIYCXQAFT_cjs.d?null:a}function Xe(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function X(e){return typeof e.shapeLaidOutText=="function"}function W(e){let o=N(),t=new WeakMap;return n=>{let r=chunkQBKAOSVF_cjs.z(n.style,n.fontSlot),i=chunkQBKAOSVF_cjs.j(n.text,r);if(i.length===0)return null;let a=r.fontFamily??e.defaultFont.family,l=G(e,o,a,r);if(!l)return null;try{if(r.smallCaps&&!chunkIYCXQAFT_cjs.na(e.shaper,e.environment,l,r,t))return null;let u=chunkIYCXQAFT_cjs.ma(e.shaper,e.environment,l,r,i);return Object.freeze({run:u,font:j(l),fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function We(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var A=new Map,I=new WeakMap,$=0,T,Y=32,$e=chunkIYCXQAFT_cjs.c;function Ye(){if(T)return T;let e=(async()=>(await chunkIYCXQAFT_cjs.s(),chunkIYCXQAFT_cjs.x(chunkIYCXQAFT_cjs.y)))();return T=e,e.catch(()=>{T===e&&(T=void 0);}),e}function Ke(e){let o=N();return chunkIYCXQAFT_cjs.pa(e,{resolveFont(t){return Xe(e,o,t)},fallback:chunkQBKAOSVF_cjs.b()})}async function Ze(e,o){if(!chunkIYCXQAFT_cjs.A(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let t=await Ye(),n=await chunkIYCXQAFT_cjs.H(e,t,chunkIYCXQAFT_cjs.y,o);return Object.freeze({createMeasurer:()=>Ke(n),resolveFont:r=>n.fonts.resolve(r),shapeLaidOutText:W(n),producer:["node-export-session",e.fingerprint,n.operation.shapingHash,`producer:${n.operation.producerVersion}`,`fallback:${chunkQBKAOSVF_cjs.a}`].join("|"),extensionFingerprint:e.fingerprint})}function gt(e,o){if(!chunkIYCXQAFT_cjs.A(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let t=I.get(e);if(t)return t;let n=chunkIYCXQAFT_cjs.C(e),r=A.get(n);if(!r){if(A.size>=Y)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${Y} process-wide configurations`));r=(async()=>{let u=chunkIYCXQAFT_cjs.B(e).sources.reduce((s,p)=>s+(p.availability==="forbidden"?0:p.bytes.byteLength),0);if($+u>$e)throw new RangeError(`Shared exporter shaping font bytes are limited to ${$e} process-wide`);$+=u;let c;try{let s=await Ye();c=await chunkIYCXQAFT_cjs.H(e,s,chunkIYCXQAFT_cjs.y,o);}catch(s){throw $-=u,s}return Object.freeze({createMeasurer:()=>Ke(c),shapeLaidOutText:W(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),A.set(n,r),r.catch(()=>{A.get(n)===r&&A.delete(n);});}let i=e.fingerprint,a=r.then(l=>Object.freeze({createMeasurer:l.createMeasurer,shapeLaidOutText:l.shapeLaidOutText,producer:["node-export",i,l.shapingHash,`producer:${l.producerVersion}`,`fallback:${chunkQBKAOSVF_cjs.a}`].join("|"),extensionFingerprint:i}));return I.set(e,a),a.catch(()=>{I.get(e)===a&&I.delete(e);}),a}var Et="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function bt(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(r=>r.type===Et),n;if(t){let r=chunkZZRCVDQU_cjs.E(t);r.mode==="Internal"&&r.target.ok&&(n=o.parts.get(r.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkZZRCVDQU_cjs.Td(o,n)}function Qe(e,o){let t=bt(e);if(t.length!==0)return chunkP24FHMQW_cjs.i(n=>{let r=new Set((n.resolvedFaces??[]).map(a=>chunkIYCXQAFT_cjs.g(a))),i=chunkP24FHMQW_cjs.o(t,{maxFontBytes:chunkIYCXQAFT_cjs.a,aggregateBudget:Rt(n),shadowedRequests:r});if(o)for(let a of i.dropped){if(o.dropped.length>=B)break;o.dropped.push(a);}return {sources:i.sources}})}function Rt(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkIYCXQAFT_cjs.c:Math.max(0,chunkIYCXQAFT_cjs.c-o)}function Ot(e){return q(e)&&X(e)}var R=0,Je=Symbol("font-resolution-timeout");function St(e){let o=0,t=false;return e?.(R),{reserve:r=>{if(t)throw new Error("Document font-byte lease is already released");if(R+r>chunkIYCXQAFT_cjs.c)throw new chunkAGWWNVIJ_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkIYCXQAFT_cjs.c}; requested ${r} bytes with ${R} bytes already active`);R+=r,o+=r,e?.(R);let i=false;return ()=>{i||t||(i=true,R-=r,o-=r,e?.(R));}},release:()=>{t||(t=true,R-=o,o=0,e?.(R));}}}function Z(e,o){return e.attributes.find(t=>t.localName===o)?.value}function wt(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkZZRCVDQU_cjs.da||t.namespaceUri===""))?.value}async function vt(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkDFTVN25X_cjs.$a(e);if(!t.ok)return t;let{fonts:n,fontResolutionTimeoutMs:r,fontPolicy:i,onFontResolution:a,...l}=o,u=Array.isArray(n)?n:[n],c,s;try{s=await At(t.view,u,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:i,onFontResolution:y=>(c=y,a?.(y))});}catch(y){if(y instanceof chunkAGWWNVIJ_cjs.d&&y.code==="aborted")return {ok:false,reason:"aborted"};throw y}if(!c)throw s?.dispose(),new chunkAGWWNVIJ_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let p;try{p=chunkAGWWNVIJ_cjs.e(t.view,{...l,reuseAcrossRevisions:!1,...s?{measurer:s.createMeasurer(),producer:o.producer??s.producer}:o.producer?{producer:o.producer}:{}});}catch(y){throw s?.dispose(),y}if(!p.ok)return s?.dispose(),p;let d=p.session,m=s,f="active",x=()=>f==="aborted"?new chunkAGWWNVIJ_cjs.d("aborted","Export resource settlement was aborted"):new chunkAGWWNVIJ_cjs.d("disposed","Export session has been disposed"),F=y=>{if(f==="active"){f=y,o.signal?.removeEventListener("abort",h);try{d.dispose();}finally{m?.dispose(),m=void 0;}}},h=()=>F("aborted");return o.signal?.addEventListener("abort",h,{once:true}),o.signal?.aborted&&h(),{ok:true,session:Object.freeze({fontResolution:c,layout:()=>f==="active"?d.layout():Promise.reject(x()),layoutFor:y=>f==="active"?d.layoutFor(y):Promise.reject(x()),validatedImageBytes:y=>f==="active"?d.validatedImageBytes(y):null,admittedFontFace:Ge({status:()=>f,unavailable:x,resolve:()=>m?.resolveFont}),shapeLaidOutText:We({status:()=>f,unavailable:x,shaping:()=>m}),dispose:()=>F("disposed")})}}async function At(e,o,t={}){let n=Tt(t.timeoutMs),r=new AbortController,i=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",i,{once:true}),t.signal?.aborted&&i();let a=setTimeout(()=>r.abort(Je),n);try{K(r.signal);let l=(async()=>{let u=St(t.onActiveFontBytesChange),c=!1;try{let s=Dt(e).slice(0,chunkP24FHMQW_cjs.c),p=[],d={dropped:[]},m=Qe(e,d),f=m?[...o,m]:o,x=await chunkP24FHMQW_cjs.l(f,{families:s,defaultFamily:chunkP24FHMQW_cjs.d.family,signal:r.signal},{onOriginFailure:E=>p.push(E),reserveOwnedBytes:u.reserve});K(r.signal);let F=chunkP24FHMQW_cjs.e(x??{});if(F.sources.length===0){let E=z(s,F.defaultFont.family,p,void 0,d.dropped);V(E,t),H(E,t);return}let h=await Ze(chunkIYCXQAFT_cjs.E(F));K(r.signal);let y=z(s,F.defaultFont.family,p,h.resolveFont,d.dropped);return V(y,t),H(y,t),c=!0,Object.freeze({...h,dispose:u.release})}finally{c||u.release();}})();return await Promise.race([l,Lt(r.signal)])}finally{clearTimeout(a),t.signal?.removeEventListener("abort",i);}}function Tt(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function Lt(e){return new Promise((o,t)=>{let n=()=>{t(et(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function et(e){let o=e.reason===Je;return new chunkAGWWNVIJ_cjs.d(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function K(e){if(e.aborted)throw et(e)}function Dt(e){let o=[e.part().root],t=[],n=[],r=new Set([e.part().name]),i=(s,p)=>{!p||r.has(p.name)||(r.add(p.name),s.push(p.root));};for(let s of e.headerFooterPartsBySection()){for(let p of s.headers.values())i(t,p);for(let p of s.footers.values())i(t,p);}for(let s of ["footnote","endnote"])n.push(...Pt(e,s));let a=e.documentThemeFonts(),l={...a,major:a.major,minor:a.minor,majorEastAsia:a.majorEastAsia??null,minorEastAsia:a.minorEastAsia??null},u=new Map,c=(s,p)=>{let d=chunkT5B4NMKF_cjs.d(s,e.stylesRoot(),l,It(s,p)),m=chunkP24FHMQW_cjs.v(s,e.numberingRoot(),e.stylesRoot(),l);for(let f of [...d.direct,...Ut(s),...m,...chunkP24FHMQW_cjs.s(s,e.stylesRoot(),l),...d.inherited]){let x=f.toLowerCase();u.has(x)||u.set(x,f);}};return c(o,"body"),c(t,"furniture"),c(n,"note"),[...u.values()]}function Pt(e,o){let t=chunkZZRCVDQU_cjs.Wf(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkZZRCVDQU_cjs.Xf(e.part()).filter(i=>i.noteKind===o).map(i=>i.noteId)),r=[];for(let i of t.root.children){if(i.kind==="textValue")continue;let a=chunkZZRCVDQU_cjs.jd(i),l=chunkZZRCVDQU_cjs.id(i);(a==="separator"||a==="continuationSeparator"||l!==null&&n.has(l))&&r.push(i);}return r}var Nt="http://schemas.openxmlformats.org/officeDocument/2006/math";function It(e,o){let t=new Set;for(let n of e){let r=[],i=[{node:n,context:o}];for(;i.length>0;){let{node:a,context:l}=i.pop();a.namespaceUri===chunkZZRCVDQU_cjs.da&&a.localName==="p"&&r.push({paragraph:a,context:l});let u=a.namespaceUri===chunkZZRCVDQU_cjs.da&&a.localName==="txbxContent"&&(l==="body"||l==="note")?"detached":l;for(let c=a.children.length-1;c>=0;c-=1){let s=a.children[c];s.kind!=="textValue"&&i.push({node:s,context:u});}}for(let a of r)_t(a.paragraph,t,a.context);}return t}function _t(e,o,t){let n=chunkQBKAOSVF_cjs.ia(),r=null,i=null,a="",l=false,u=false,c=false,s=0,p=[];for(let d=e.children.length-1;d>=0;d-=1){let m=e.children[d];m.kind!=="textValue"&&p.push({node:m,runId:null,visibility:S,containerDepth:0});}for(;p.length>0;){let{node:d,runId:m,visibility:f,containerDepth:x}=p.pop();if(x>=chunkZZRCVDQU_cjs.la||d.namespaceUri===chunkZZRCVDQU_cjs.da&&d.localName==="p")continue;let F=d.namespaceUri===chunkZZRCVDQU_cjs.da&&d.localName==="r"?d.id:m;if(d.namespaceUri===chunkZZRCVDQU_cjs.da&&d.localName==="fldSimple"){let h=Z(d,"instr")??"";chunkQBKAOSVF_cjs.qc(h,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&kt(d)!==S&&o.add(d.id);}if(d.namespaceUri===chunkZZRCVDQU_cjs.da&&d.localName==="fldChar"){let h=Z(d,"fldCharType");if(h==="begin")chunkQBKAOSVF_cjs.la(n),n.nesting===1&&(r=F,i=null,a="",l=false,u=false,c=chunkZZRCVDQU_cjs.le(d),s=0);else if(h==="separate"){let y=n.nesting===1;if(chunkQBKAOSVF_cjs.na(n),y){let E=chunkQBKAOSVF_cjs.ka(n);a=E.instruction,l=E.overflow||n.nestingOverflow,i=F,u=true;}}else if(h==="end"){if(n.nesting===1){if(n.phase==="instruction"){let E=chunkQBKAOSVF_cjs.ka(n);a=E.instruction,l=E.overflow||n.nestingOverflow;}if(!l&&chunkQBKAOSVF_cjs.pc(a,{hasSeparate:u,hasLegacyFormData:c,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&s!==S){let E=i??r;E&&o.add(E);}}chunkQBKAOSVF_cjs.oa(n);}continue}if(d.namespaceUri===chunkZZRCVDQU_cjs.da&&(d.localName==="instrText"||d.localName==="delInstrText")){chunkQBKAOSVF_cjs.ma(n,it(d),d.localName==="delInstrText");continue}n.nesting>0&&chunkQBKAOSVF_cjs.pa(n)&&d.namespaceUri===chunkZZRCVDQU_cjs.da&&tt(d)&&(s|=f);for(let h=d.children.length-1;h>=0;h-=1){let y=d.children[h];y.kind!=="textValue"&&p.push({node:y,runId:F,visibility:f&rt(d),containerDepth:chunkZZRCVDQU_cjs.ma(d,x)});}}chunkQBKAOSVF_cjs.ja(n);}function tt(e){return e.localName==="t"||e.localName==="delText"?it(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var Q=1,ot=2,nt=4,S=Q|ot|nt;function kt(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:S});let t=0;for(;o.length>0;){let{node:n,visibility:r}=o.pop();if(!(n.namespaceUri===chunkZZRCVDQU_cjs.da&&n.localName==="p")){if(n.namespaceUri===chunkZZRCVDQU_cjs.da&&tt(n)&&(t|=r,t===S))return t;for(let i of n.children)i.kind!=="textValue"&&o.push({node:i,visibility:r&rt(n)});}}return t}function rt(e){return e.namespaceUri!==chunkZZRCVDQU_cjs.da?S:e.localName==="ins"||e.localName==="moveTo"?Q|ot:e.localName==="del"||e.localName==="moveFrom"?Q|nt:S}function Ut(e){let o=new Map,t=n=>{let r=chunkT5B4NMKF_cjs.a(n??void 0);if(r===null)return;let i=r.toLowerCase();o.has(i)||o.set(i,r);};for(let n of e){let r=[n];for(;r.length>0;){let i=r.pop();if(i.namespaceUri===Nt&&t(chunkQBKAOSVF_cjs.yb),i.namespaceUri===chunkZZRCVDQU_cjs.da&&i.localName==="sym"&&t(chunkT5B4NMKF_cjs.b(wt(i,"font"))),i.namespaceUri===chunkZZRCVDQU_cjs.da&&i.localName==="fldSimple"){let a=Z(i,"instr");t(chunkQBKAOSVF_cjs.kc(a??"")?.font??null);}if(i.namespaceUri===chunkZZRCVDQU_cjs.da&&i.localName==="p")for(let a of chunkP24FHMQW_cjs.u(i))t(a);for(let a=i.children.length-1;a>=0;a-=1){let l=i.children[a];l.kind!=="textValue"&&r.push(l);}}}return [...o.values()]}function it(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let r=n.children.length-1;r>=0;r-=1)t.push(n.children[r]);}return o}var lt="FILE_TOO_LARGE",at=8;function Mt(e){return typeof e=="object"&&e!==null}function dt(e){if(!(!Mt(e)||typeof e.code!="string"))return e.code}function ut(e){return e===""||e.toLowerCase()==="localhost"}function Ct(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function ct(e){let o=Ct(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function pt(e){let o=ct(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Bt(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function qt(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!ut(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=pt(o.pathname);if(t===null||Bt(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function jt(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function zt(e){let o=jt(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>at)throw new TypeError(`trustedRoot must not exceed ${at} directories`);return o.map(qt)}function Vt(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkIYCXQAFT_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkIYCXQAFT_cjs.a}`);return e}function Ht(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!ut(e.host))return null;let t=ct(e.pathname);if(t===null)return null;for(let n of o){let r=pt(n.pathname);if(r===null||!t.startsWith(r)||t.length<=r.length)continue;let i=new URL("file:///");return i.pathname=t,i}return null}function Gt(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Xt(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function st(e,o,t){return e.some(n=>Xt(n,o,t))}async function Wt(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(r){if(dt(r)==="ENOENT")continue;throw r}return t}function $t(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:r,realpath:i},{constants:a},{fileURLToPath:l},u]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),c=e.map(f=>u.resolve(l(f.href))),s=u.resolve(l(typeof o=="string"?o:o.href));if(!st(c,s,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let p=typeof a.O_NOFOLLOW=="number"?a.O_RDONLY|a.O_NOFOLLOW:"r",d=await r(s,p),m=()=>{d.close();};t?.addEventListener("abort",m,{once:true});try{if(t?.aborted)throw t.reason;let f=await i(s);if(!st(await Wt(c,i),f,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let x=(await d.stat()).size;if(!Number.isSafeInteger(x)||x<0||x>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:lt});let F=new Uint8Array(x),h=0;for(;h<F.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:y}=await d.read(F,h,F.byteLength-h,h);if(y===0)break;h+=y;}if(t?.aborted)throw t.reason;return h===F.byteLength?F:F.slice(0,h)}catch(f){throw t?.aborted?t.reason:f}finally{t?.removeEventListener("abort",m),await d.close().catch(()=>{});}}}function Yt(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=zt(e.trustedRoot),t=Vt(e.maxBytes),n=e.read??$t(o),r=e.networkFetch??fetch;return(async(i,a)=>{let l=a?.signal;if(l?.aborted)throw l.reason;let u=Gt(i);if(u.protocol!=="file:")return r(u,a);let c=Ht(u,o);if(!c)return new Response(null,{status:404});let s=l?new AbortController:void 0,p=()=>s?.abort(l?.reason);l?.addEventListener("abort",p,{once:true});let d;try{if(d=await n(c,{maxBytes:t,...s?{signal:s.signal}:{}}),l?.aborted)throw l.reason;if(d.byteLength>t)return new Response(null,{status:413})}catch(m){if(l?.aborted)throw l.reason;if(s?.signal.aborted)throw s.signal.reason??m;if(m instanceof DOMException&&m.name==="AbortError"||m instanceof Error&&m.name==="AbortError")throw m;let f=dt(m);if(f===lt)return new Response(null,{status:413});if(f==="ENOENT"||f==="ENOTDIR"||f==="ELOOP")return new Response(null,{status:404});throw m}finally{l?.removeEventListener("abort",p);}return new Response(d,{status:200})})}
2
- Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkAGWWNVIJ_cjs.d}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkAGWWNVIJ_cjs.c}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkAGWWNVIJ_cjs.b}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkAGWWNVIJ_cjs.e}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=Y;exports.acquireSharedExportShaping=gt;exports.createPackagedFileFetch=Yt;exports.hasExportAdmittedFont=q;exports.hasExportLaidOutText=X;exports.hasFontBackedExportCapabilities=Ot;exports.openFontBackedDocumentForExport=vt;
1
+ 'use strict';var chunkUGLO2GA5_cjs=require('./chunk-UGLO2GA5.cjs'),chunkA72MJGY7_cjs=require('./chunk-A72MJGY7.cjs'),chunkW5H62AWM_cjs=require('./chunk-W5H62AWM.cjs'),chunk65GJRSZ5_cjs=require('./chunk-65GJRSZ5.cjs'),chunkRLKX7BIP_cjs=require('./chunk-RLKX7BIP.cjs');require('./chunk-FGBADUSK.cjs');var chunkHZQFGB2X_cjs=require('./chunk-HZQFGB2X.cjs'),chunkCB6RQ3GD_cjs=require('./chunk-CB6RQ3GD.cjs');function I(e,t,o){if(t.environment.features.smcp!==1||!/\p{Ll}/u.test(t.text))return o;let n={...t,environment:{...t.environment,features:{...t.environment.features,smcp:0}}},i=e.shape(n);if(o.glyphs.length!==i.glyphs.length||o.glyphs.some((d,f)=>d.id!==i.glyphs[f]?.id))return o;let r=[],s=0;for(let d of t.text){let f=d.toUpperCase()!==d,y=r.at(-1);y&&(y.lower===f||/\p{M}/u.test(d))?y.text+=d:r.push({text:d,start:s,lower:f}),s+=d.length;}let a=[],u=[],p=[],l=true,x=0;for(let d of t.environment.direction==="rtl"?r.reverse():r){let f=d.lower?.8:1,y=[],b=[],E="",c=d.start;for(let R of d.text){let h=d.lower?R.toUpperCase():R;for(let F=0;F<h.length;F++)y.push(c),b.push(c+R.length);E+=h,c+=R.length;}let m=e.shape({...n,text:E}),g=a.length;for(let[R,h]of m.glyphs.entries()){let F=m.exactAdvancesX?.[R];F===void 0?l=false:p.push(F*f),a.push({...h,cluster:y[h.cluster]??d.start,originX:chunkA72MJGY7_cjs.k(x+Math.round(h.originX*f)),originY:chunkA72MJGY7_cjs.k(Math.round(h.originY*f)),offsetX:chunkA72MJGY7_cjs.k(Math.round(h.offsetX*f)),offsetY:chunkA72MJGY7_cjs.k(Math.round(h.offsetY*f)),advanceX:chunkA72MJGY7_cjs.k(Math.round(h.advanceX*f)),advanceY:chunkA72MJGY7_cjs.k(Math.round(h.advanceY*f)),drawScale:f});}for(let R of m.clusters){let h=y[R.textStart]??d.start,F=b[R.textEnd-1]??c,L=chunkA72MJGY7_cjs.k(Math.round(R.advance*f)),A=u.at(-1);A&&A.textStart===h&&A.textEnd===F?u[u.length-1]={...A,glyphEnd:g+R.glyphEnd,advance:chunkA72MJGY7_cjs.k(A.advance+L),caretEdges:[chunkA72MJGY7_cjs.k(0),chunkA72MJGY7_cjs.k(A.advance+L)]}:u.push({...R,textStart:h,textEnd:F,glyphStart:g+R.glyphStart,glyphEnd:g+R.glyphEnd,advance:L,caretEdges:R.caretEdges.map(V=>chunkA72MJGY7_cjs.k(Math.round(V*f))),fontSpan:0});}x+=m.glyphs.reduce((R,h)=>R+Math.round(h.advanceX*f),0);}return {...o,glyphs:a,clusters:u,fontSpans:[{...o.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:l&&p.length===a.length?p:void 0}}var nt=new WeakMap;function kt(e){let t=nt.get(e);return t===void 0&&(t=_t(e.bytes,e.faceIndex),nt.set(e,t)),t}var It=new Set(["COLR","CBDT","sbix"]),Nt=512;function _t(e,t){let o=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(rt(e,0)==="ttcf"){let r=o.getUint32(8);if(t<0||t>=r||12+4*t+4>e.byteLength||(n=o.getUint32(12+4*t),n+12>e.byteLength))return false}let i=Math.min(o.getUint16(n+4),Nt);for(let r=0;r<i;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(It.has(rt(e,s)))return true}return false}function rt(e,t){return String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])}var Mt=/\p{Emoji_Presentation}|️/u;function Ct(e){return Mt.test(e)}function q(e,t){if(e.length<2)return e;let o=e.filter(kt);if(o.length===0||o.length===e.length)return e;let n=e.filter(i=>!o.includes(i));return Ct(t)?[...o,...n]:[...n,...o]}var Ut=2048;function it(e,t,o,n){if(!o.clusters.length||o.clusters.length>Ut)return null;let i=(c,m)=>{let g={...t,text:m,environment:chunkA72MJGY7_cjs.l({...t.environment,font:c})};return I(e,g,e.shape(g))},r=[],s=new Map;for(let c of [...o.clusters].sort((m,g)=>m.textStart-g.textStart)){let m=t.environment.font,g=t.text.slice(c.textStart,c.textEnd),R=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(g)&&R&&R.end===c.textStart){R.end=c.textEnd;continue}if(o.glyphs.slice(c.glyphStart,c.glyphEnd).some(F=>F.id===0)){let F=t.text.slice(c.textStart,c.textEnd+1),L=s.get(g)??q(n,F).find(A=>{try{return !i(A,g).glyphs.some(V=>V.id===0)}catch{return false}});if(!L)return null;s.set(g,L),m=L;}let h=r.at(-1);h&&h.font===m&&h.end===c.textStart?h.end=c.textEnd:r.push({start:c.textStart,end:c.textEnd,font:m});}let a=[],u=[],p=[],l=[],x=true,d=0,f=0,y=0,b=0,E=0;for(let c of t.environment.direction==="rtl"?r.reverse():r){let m=i(c.font,t.text.slice(c.start,c.end));if(m.glyphs.some(h=>h.id===0))return null;let g=a.length,R=p.length;for(let h of m.glyphs)a.push({...h,cluster:c.start+h.cluster,originX:chunkA72MJGY7_cjs.k(d+h.originX),originY:chunkA72MJGY7_cjs.k(f+h.originY)});if(m.exactAdvancesX===void 0)x=false;else for(let h of m.exactAdvancesX)l.push(h);for(let h of m.clusters)u.push({...h,textStart:c.start+h.textStart,textEnd:c.start+h.textEnd,glyphStart:g+h.glyphStart,glyphEnd:g+h.glyphEnd,fontSpan:R});m.glyphs.length&&p.push({font:c.font,glyphStart:g,glyphEnd:a.length,fallbackIndex:c.font===t.environment.font?null:n.indexOf(c.font)}),d+=m.glyphs.reduce((h,F)=>h+F.advanceX,0),f+=m.glyphs.reduce((h,F)=>h+F.advanceY,0),y=Math.max(y,m.metrics.ascent),b=Math.max(b,m.metrics.descent),E=Math.max(E,m.metrics.lineGap);}return chunkA72MJGY7_cjs.o({...o,glyphs:a,clusters:u,fontSpans:p,exactAdvancesX:x&&l.length===a.length?l:void 0,metrics:{ascent:chunkA72MJGY7_cjs.k(y),descent:chunkA72MJGY7_cjs.k(b),lineGap:chunkA72MJGY7_cjs.k(E)}},{...t.environment,fallbackOrder:n})}function J(e,t,o){if(!t.text.includes("\u2011"))return o;let n=new Set(o.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return o;let i=t.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(i===t.text)return o;try{let r=e.shape({...t,text:i});return chunkA72MJGY7_cjs.o({...r,text:t.text},t.environment)}catch{return o}}function at(e,t){if(t.length===0)return e;if(t.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let o=t.map(a=>e.fonts.resolve(a)).filter(a=>!(a instanceof chunkA72MJGY7_cjs.d)),n={shape(a){return J(e.shaper,a,e.shaper.shape(a))}},i=new WeakMap,r={shape(a){let u=e.shaper.shape(a),p=i.get(u);if(p&&p.input.text===a.text&&p.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&p.input.bidiLevel===a.bidiLevel&&p.input.environment===a.environment)return p.run;let l=s(a,J(e.shaper,a,u));return i.set(u,{input:a,run:l}),l}},s=(a,u)=>{let p=I(n,a,u);if(!p.glyphs.some(l=>l.id===0)||/^[\t\n\r\f]*$/.test(a.text))return p;if(/^(Latn|Cyrl|Grek|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let l=it(n,a,p,o);if(l)return l}for(let l of q(o,a.text))if(!(l.hash===a.environment.font.hash&&l.faceIndex===a.environment.font.faceIndex))try{let x={...a,environment:chunkA72MJGY7_cjs.l({...a.environment,font:l})},d=I(n,x,n.shape(x));if(!d.glyphs.some(f=>f.id===0))return d}catch{}return p};return {...e,shaper:r}}var Q=chunkA72MJGY7_cjs.b;function ee(e){return typeof e.admittedFontFace=="function"}var Bt=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function z(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var st=new WeakMap;function j(e){let t=st.get(e);return t||st.set(e,t=qt(e)),t}function qt(e){let t=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:z(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:t?Object.freeze({requested:z(t.requested),resolved:z(t.resolved),...t.lineMetrics?{lineMetrics:Object.freeze({...t.lineMetrics})}:{}}):null})}function zt(e){return Object.freeze({...j(e),bytes:chunkA72MJGY7_cjs.h(e)})}function jt(e,t){if(!e)return null;try{let o=e(t);return !o||o instanceof chunkA72MJGY7_cjs.d?null:zt(o)}catch{return null}}function lt(e){return t=>{if(e.status()!=="active")throw e.unavailable();return jt(e.resolve(),t)}}function Ht(e){return Object.freeze(e.slice(0,Q).map(t=>Object.freeze({request:z(t.request),partName:t.partName,reason:t.reason})))}function te(e,t,o,n,i=[]){let r=new Map;for(let a of [...e,t]){let u=a.toLowerCase();r.has(u)||r.set(u,a);}let s=[...r.values()].map(a=>{let u=[];for(let p of Bt){let l=n?.({family:a,...p});!l||l instanceof chunkA72MJGY7_cjs.d||u.push(Object.freeze({...p,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}return Object.freeze({family:a,coverage:u.length===4?"complete":u.length>0?"partial":"none",faces:Object.freeze(u)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:t,families:Object.freeze(s),originFailures:Object.freeze([...o]),droppedEmbeddedFonts:Ht(i)})}function oe(e,t){if(t.onFontResolution){try{let o=t.onFontResolution(e);Promise.resolve(o).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(o){console.warn("[fonts] font-resolution diagnostics callback failed",o);}return}for(let o of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",o);for(let o of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",o);}function ne(e,t){if(t.fontPolicy!=="strict"||e.originFailures.length===0&&e.families.every(n=>n.coverage==="complete"))return;let o=e.families.filter(n=>n.coverage!=="complete").map(n=>n.family).join(", ");throw new chunkW5H62AWM_cjs.d("layoutFailed",`Strict font policy refused export${o?`; incomplete families: ${o}`:"; a font origin failed"}`)}function H(){return new Map}function re(e,t,o,n){if(o.trim().length===0)return null;let i={family:o,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkA72MJGY7_cjs.g(i),s=t.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}t.set(r,s);}return s instanceof chunkA72MJGY7_cjs.d?null:s}function dt(e,t,o){let n=o.fontFamily??e.defaultFont.family;return re(e,t,n,o)}function ie(e){return typeof e.shapeLaidOutText=="function"}function ae(e){let t=H(),o=new WeakMap;return n=>{let i=chunk65GJRSZ5_cjs._(n.style,n.fontSlot),r=chunk65GJRSZ5_cjs.H(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=re(e,t,s,i);if(!a)return null;try{if(i.smallCaps&&!chunkA72MJGY7_cjs.oa(e.shaper,e.environment,a,i,o))return null;let u=chunkA72MJGY7_cjs.na(e.shaper,e.environment,a,i,r);return Object.freeze({run:u,font:j(u.fontSpans[0]?.font??a),...u.fontSpans.length>1?{fonts:Object.freeze(u.fontSpans.map(p=>j(p.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function ut(e){return t=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(t)??null}}var N=new Map,X=new WeakMap,se=0,_,le=32,ct=chunkA72MJGY7_cjs.c;function pt(){if(_)return _;let e=(async()=>(await chunkA72MJGY7_cjs.s(),chunkA72MJGY7_cjs.x(chunkA72MJGY7_cjs.y)))();return _=e,e.catch(()=>{_===e&&(_=void 0);}),e}function ft(e){let t=H();return chunkA72MJGY7_cjs.qa(e,{resolveFont(o){return dt(e,t,o)},fallback:chunk65GJRSZ5_cjs.N()})}async function mt(e,t,o=[],n=false){if(!chunkA72MJGY7_cjs.A(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let i=await pt(),r=at(await chunkA72MJGY7_cjs.H(e,i,chunkA72MJGY7_cjs.y,t,n),o);return Object.freeze({createMeasurer:()=>ft(r),resolveFont:s=>r.fonts.resolve(s),shapeLaidOutText:ae(r),producer:["node-export-session",JSON.stringify(o),e.fingerprint,r.operation.shapingHash,`producer:${r.operation.producerVersion}`,`fallback:${chunk65GJRSZ5_cjs.M}`].join("|"),extensionFingerprint:e.fingerprint})}function Xt(e,t){if(!chunkA72MJGY7_cjs.A(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let o=X.get(e);if(o)return o;let n=chunkA72MJGY7_cjs.C(e),i=N.get(n);if(!i){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));i=(async()=>{let u=chunkA72MJGY7_cjs.B(e).sources.reduce((l,x)=>l+(x.availability==="forbidden"?0:x.bytes.byteLength),0);if(se+u>ct)throw new RangeError(`Shared exporter shaping font bytes are limited to ${ct} process-wide`);se+=u;let p;try{let l=await pt();p=await chunkA72MJGY7_cjs.H(e,l,chunkA72MJGY7_cjs.y,t);}catch(l){throw se-=u,l}return Object.freeze({createMeasurer:()=>ft(p),shapeLaidOutText:ae(p),shapingHash:p.operation.shapingHash,producerVersion:p.operation.producerVersion})})(),N.set(n,i),i.catch(()=>{N.get(n)===i&&N.delete(n);});}let r=e.fingerprint,s=i.then(a=>Object.freeze({createMeasurer:a.createMeasurer,shapeLaidOutText:a.shapeLaidOutText,producer:["node-export",r,a.shapingHash,`producer:${a.producerVersion}`,`fallback:${chunk65GJRSZ5_cjs.M}`].join("|"),extensionFingerprint:r}));return X.set(e,s),s.catch(()=>{X.get(e)===s&&X.delete(e);}),s}var Vt="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function Gt(e){let t=e.currentPackage(),o=(t.relationships.get(t.mainDocumentPart)??[]).find(i=>i.type===Vt),n;if(o){let i=chunkCB6RQ3GD_cjs.E(o);i.mode==="Internal"&&i.target.ok&&(n=t.parts.get(i.target.partName));}return n??=t.parts.get("/word/fontTable.xml"),chunkCB6RQ3GD_cjs.Yd(t,n)}function ht(e,t){let o=Gt(e);if(o.length!==0)return chunkUGLO2GA5_cjs.i(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>chunkA72MJGY7_cjs.g(s))),r=chunkUGLO2GA5_cjs.o(o,{maxFontBytes:chunkA72MJGY7_cjs.a,aggregateBudget:Wt(n),shadowedRequests:i});if(t)for(let s of r.dropped){if(t.dropped.length>=Q)break;t.dropped.push(s);}return {sources:r.sources}})}function Wt(e){let t=e.committedSourceBytes;return t===void 0||!Number.isSafeInteger(t)||t<=0?chunkA72MJGY7_cjs.c:Math.max(0,chunkA72MJGY7_cjs.c-t)}function Yt(e){return ee(e)&&ie(e)}var w=0,yt=Symbol("font-resolution-timeout");function $t(e){let t=0,o=false;return e?.(w),{reserve:i=>{if(o)throw new Error("Document font-byte lease is already released");if(w+i>chunkA72MJGY7_cjs.c)throw new chunkW5H62AWM_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkA72MJGY7_cjs.c}; requested ${i} bytes with ${w} bytes already active`);w+=i,t+=i,e?.(w);let r=false;return ()=>{r||o||(r=true,w-=i,t-=i,e?.(w));}},release:()=>{o||(o=true,w-=t,t=0,e?.(w));}}}function ue(e,t){return e.attributes.find(o=>o.localName===t)?.value}function Kt(e,t){return e.attributes.find(o=>o.localName===t&&(o.namespaceUri===chunkCB6RQ3GD_cjs.da||o.namespaceUri===""))?.value}async function Zt(e,t){if(t.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(t.signal?.aborted)return {ok:false,reason:"aborted"};let o=chunkHZQFGB2X_cjs.ab(e);if(!o.ok)return o;let{fonts:n,lastResortFonts:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:u,documentLigatures:p,...l}=t,x=Array.isArray(n)?n:[n],d=i===void 0?[]:Array.isArray(i)?i:[i],f,y;try{y=await Jt(o.view,x,{signal:t.signal,timeoutMs:r??t.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:u,documentLigatures:p,lastResortFonts:d,onFontResolution:F=>(f=F,a?.(F))});}catch(F){if(F instanceof chunkW5H62AWM_cjs.d&&F.code==="aborted")return {ok:false,reason:"aborted"};throw F}if(!f)throw y?.dispose(),new chunkW5H62AWM_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=chunkW5H62AWM_cjs.e(o.view,{...l,reuseAcrossRevisions:!1,...y?{measurer:y.createMeasurer(),producer:t.producer??y.producer}:t.producer?{producer:t.producer}:{}});}catch(F){throw y?.dispose(),F}if(!b.ok)return y?.dispose(),b;let E=b.session,c=y,m="active",g=()=>m==="aborted"?new chunkW5H62AWM_cjs.d("aborted","Export resource settlement was aborted"):new chunkW5H62AWM_cjs.d("disposed","Export session has been disposed"),R=F=>{if(m==="active"){m=F,t.signal?.removeEventListener("abort",h);try{E.dispose();}finally{c?.dispose(),c=void 0;}}},h=()=>R("aborted");return t.signal?.addEventListener("abort",h,{once:true}),t.signal?.aborted&&h(),{ok:true,session:Object.freeze({fontResolution:f,layout:()=>m==="active"?E.layout():Promise.reject(g()),layoutFor:F=>m==="active"?E.layoutFor(F):Promise.reject(g()),validatedImageBytes:F=>m==="active"?E.validatedImageBytes(F):null,admittedFontFace:lt({status:()=>m,unavailable:g,resolve:()=>c?.resolveFont}),shapeLaidOutText:ut({status:()=>m,unavailable:g,shaping:()=>c}),dispose:()=>R("disposed")})}}async function Jt(e,t,o={}){if((o.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let n=Qt(o.timeoutMs),i=new AbortController,r=()=>i.abort(o.signal?.reason);o.signal?.addEventListener("abort",r,{once:true}),o.signal?.aborted&&r();let s=setTimeout(()=>i.abort(yt),n);try{de(i.signal);let a=(async()=>{let u=$t(o.onActiveFontBytesChange),p=!1;try{let l=to(e).slice(0,chunkUGLO2GA5_cjs.c),x=[],d={dropped:[]},f=ht(e,d),y=[...t,...f?[f]:[],...o.lastResortFonts??[]],b=await chunkUGLO2GA5_cjs.l(y,{families:[...new Set([...(o.glyphFallbacks??[]).map(g=>g.family),...l])].slice(0,chunkUGLO2GA5_cjs.c),defaultFamily:chunkUGLO2GA5_cjs.d.family,signal:i.signal},{onOriginFailure:g=>x.push(g),reserveOwnedBytes:u.reserve});de(i.signal);let E=chunkUGLO2GA5_cjs.e(b??{});if(E.sources.length===0){let g=te(l,E.defaultFont.family,x,void 0,d.dropped);oe(g,o),ne(g,o);return}let c=await mt(chunkA72MJGY7_cjs.E(E),void 0,o.glyphFallbacks,o.documentLigatures);de(i.signal);let m=te(l,E.defaultFont.family,x,c.resolveFont,d.dropped);return oe(m,o),ne(m,o),p=!0,Object.freeze({...c,dispose:u.release})}finally{p||u.release();}})();return await Promise.race([a,eo(i.signal)])}finally{clearTimeout(s),o.signal?.removeEventListener("abort",r);}}function Qt(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function eo(e){return new Promise((t,o)=>{let n=()=>{o(xt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function xt(e){let t=e.reason===yt;return new chunkW5H62AWM_cjs.d(t?"timedOut":"aborted",t?"Font resolution timed out":"Font resolution was aborted",t?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw xt(e)}function to(e){let t=[e.part().root],o=[],n=[],i=new Set([e.part().name]),r=(l,x)=>{!x||i.has(x.name)||(i.add(x.name),l.push(x.root));};for(let l of e.headerFooterPartsBySection()){for(let x of l.headers.values())r(o,x);for(let x of l.footers.values())r(o,x);}for(let l of ["footnote","endnote"])n.push(...oo(e,l));let s=e.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},u=new Map,p=(l,x)=>{let d=chunkRLKX7BIP_cjs.d(l,e.stylesRoot(),a,ro(l,x)),f=chunkUGLO2GA5_cjs.v(l,e.numberingRoot(),e.stylesRoot(),a);for(let y of [...d.direct,...so(l),...f,...chunkUGLO2GA5_cjs.s(l,e.stylesRoot(),a),...d.inherited]){let b=y.toLowerCase();u.has(b)||u.set(b,y);}};return p(t,"body"),p(o,"furniture"),p(n,"note"),[...u.values()]}function oo(e,t){let o=chunkCB6RQ3GD_cjs.$f(e.currentPackage(),t);if(!o)return [];let n=new Set(chunkCB6RQ3GD_cjs.ag(e.part()).filter(r=>r.noteKind===t).map(r=>r.noteId)),i=[];for(let r of o.root.children){if(r.kind==="textValue")continue;let s=chunkCB6RQ3GD_cjs.od(r),a=chunkCB6RQ3GD_cjs.nd(r);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&i.push(r);}return i}var no="http://schemas.openxmlformats.org/officeDocument/2006/math";function ro(e,t){let o=new Set;for(let n of e){let i=[],r=[{node:n,context:t}];for(;r.length>0;){let{node:s,context:a}=r.pop();s.namespaceUri===chunkCB6RQ3GD_cjs.da&&s.localName==="p"&&i.push({paragraph:s,context:a});let u=s.namespaceUri===chunkCB6RQ3GD_cjs.da&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let p=s.children.length-1;p>=0;p-=1){let l=s.children[p];l.kind!=="textValue"&&r.push({node:l,context:u});}}for(let s of i)io(s.paragraph,o,s.context);}return o}function io(e,t,o){let n=chunk65GJRSZ5_cjs.La(),i=null,r=null,s="",a=false,u=false,p=false,l=0,x=[];for(let d=e.children.length-1;d>=0;d-=1){let f=e.children[d];f.kind!=="textValue"&&x.push({node:f,runId:null,visibility:D,containerDepth:0});}for(;x.length>0;){let{node:d,runId:f,visibility:y,containerDepth:b}=x.pop();if(b>=chunkCB6RQ3GD_cjs.la||d.namespaceUri===chunkCB6RQ3GD_cjs.da&&d.localName==="p")continue;let E=d.namespaceUri===chunkCB6RQ3GD_cjs.da&&d.localName==="r"?d.id:f;if(d.namespaceUri===chunkCB6RQ3GD_cjs.da&&d.localName==="fldSimple"){let c=ue(d,"instr")??"";chunk65GJRSZ5_cjs.wc(c,{allowPageFields:o==="body"||o==="furniture",allowRefFields:o==="body"||o==="note",allowPageRef:o==="body",allowAutonum:o==="body"||o==="note"})&&ao(d)!==D&&t.add(d.id);}if(d.namespaceUri===chunkCB6RQ3GD_cjs.da&&d.localName==="fldChar"){let c=ue(d,"fldCharType");if(c==="begin")chunk65GJRSZ5_cjs.Oa(n),n.nesting===1&&(i=E,r=null,s="",a=false,u=false,p=chunkCB6RQ3GD_cjs.qe(d),l=0);else if(c==="separate"){let m=n.nesting===1;if(chunk65GJRSZ5_cjs.Qa(n),m){let g=chunk65GJRSZ5_cjs.Na(n);s=g.instruction,a=g.overflow||n.nestingOverflow,r=E,u=true;}}else if(c==="end"){if(n.nesting===1){if(n.phase==="instruction"){let g=chunk65GJRSZ5_cjs.Na(n);s=g.instruction,a=g.overflow||n.nestingOverflow;}if(!a&&chunk65GJRSZ5_cjs.vc(s,{hasSeparate:u,hasLegacyFormData:p,allowPageFields:o==="body"||o==="furniture",allowRefFields:o==="body"||o==="note",allowPageRef:o==="body",allowAutonum:o==="body"||o==="note"})&&l!==D){let g=r??i;g&&t.add(g);}}chunk65GJRSZ5_cjs.Ra(n);}continue}if(d.namespaceUri===chunkCB6RQ3GD_cjs.da&&(d.localName==="instrText"||d.localName==="delInstrText")){chunk65GJRSZ5_cjs.Pa(n,bt(d),d.localName==="delInstrText");continue}n.nesting>0&&chunk65GJRSZ5_cjs.Sa(n)&&d.namespaceUri===chunkCB6RQ3GD_cjs.da&&gt(d)&&(l|=y);for(let c=d.children.length-1;c>=0;c-=1){let m=d.children[c];m.kind!=="textValue"&&x.push({node:m,runId:E,visibility:y&Rt(d),containerDepth:chunkCB6RQ3GD_cjs.ma(d,b)});}}chunk65GJRSZ5_cjs.Ma(n);}function gt(e){return e.localName==="t"||e.localName==="delText"?bt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ce=1,Ft=2,Et=4,D=ce|Ft|Et;function ao(e){let t=[];for(let n of e.children)n.kind!=="textValue"&&t.push({node:n,visibility:D});let o=0;for(;t.length>0;){let{node:n,visibility:i}=t.pop();if(!(n.namespaceUri===chunkCB6RQ3GD_cjs.da&&n.localName==="p")){if(n.namespaceUri===chunkCB6RQ3GD_cjs.da&&gt(n)&&(o|=i,o===D))return o;for(let r of n.children)r.kind!=="textValue"&&t.push({node:r,visibility:i&Rt(n)});}}return o}function Rt(e){return e.namespaceUri!==chunkCB6RQ3GD_cjs.da?D:e.localName==="ins"||e.localName==="moveTo"?ce|Ft:e.localName==="del"||e.localName==="moveFrom"?ce|Et:D}function so(e){let t=new Map,o=n=>{let i=chunkRLKX7BIP_cjs.a(n??void 0);if(i===null)return;let r=i.toLowerCase();t.has(r)||t.set(r,i);};for(let n of e){let i=[n];for(;i.length>0;){let r=i.pop();if(r.namespaceUri===no&&o(chunk65GJRSZ5_cjs.Eb),r.namespaceUri===chunkCB6RQ3GD_cjs.da&&r.localName==="sym"&&o(chunkRLKX7BIP_cjs.b(Kt(r,"font"))),r.namespaceUri===chunkCB6RQ3GD_cjs.da&&r.localName==="fldSimple"){let s=ue(r,"instr");o(chunk65GJRSZ5_cjs.qc(s??"")?.font??null);}if(r.namespaceUri===chunkCB6RQ3GD_cjs.da&&r.localName==="p")for(let s of chunkUGLO2GA5_cjs.u(r))o(s);for(let s=r.children.length-1;s>=0;s-=1){let a=r.children[s];a.kind!=="textValue"&&i.push(a);}}}return [...t.values()]}function bt(e){let t="",o=[...e.children].reverse();for(;o.length>0&&t.length<=256;){let n=o.pop();if(n.kind==="textValue")t+=n.value;else for(let i=n.children.length-1;i>=0;i-=1)o.push(n.children[i]);}return t}var vt="FILE_TOO_LARGE",St=8;function lo(e){return typeof e=="object"&&e!==null}function wt(e){if(!(!lo(e)||typeof e.code!="string"))return e.code}function At(e){return e===""||e.toLowerCase()==="localhost"}function uo(e){try{let t=decodeURIComponent(e);return t.includes("\0")?null:t}catch{return null}}function Tt(e){let t=uo(e);if(t===null)return null;let o=[];for(let n of t.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(o.length===0)return null;o.pop();continue}o.push(n);}return `/${o.join("/")}`}function Lt(e){let t=Tt(e);return t===null?null:t.endsWith("/")?t:`${t}/`}function co(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function po(e){let t;try{t=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(t.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(t.username!==""||t.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!At(t.host))throw new TypeError("trustedRoot must be a local file: URL");let o=Lt(t.pathname);if(o===null||co(o))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=o,n}function fo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function mo(e){let t=fo(e);if(t.length===0)throw new TypeError("trustedRoot must name at least one directory");if(t.length>St)throw new TypeError(`trustedRoot must not exceed ${St} directories`);return t.map(po)}function ho(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkA72MJGY7_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkA72MJGY7_cjs.a}`);return e}function yo(e,t){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!At(e.host))return null;let o=Tt(e.pathname);if(o===null)return null;for(let n of t){let i=Lt(n.pathname);if(i===null||!o.startsWith(i)||o.length<=i.length)continue;let r=new URL("file:///");return r.pathname=o,r}return null}function xo(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function go(e,t,o){let n=o.relative(o.resolve(e),o.resolve(t));return n!==""&&!n.startsWith("..")&&!o.isAbsolute(n)}function Ot(e,t,o){return e.some(n=>go(n,t,o))}async function Fo(e,t){let o=[];for(let n of e)try{o.push(await t(n));}catch(i){if(wt(i)==="ENOENT")continue;throw i}return o}function Eo(e){return async(t,{signal:o,maxBytes:n})=>{if(o?.aborted)throw o.reason;let[{open:i,realpath:r},{constants:s},{fileURLToPath:a},u]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),p=e.map(y=>u.resolve(a(y.href))),l=u.resolve(a(typeof t=="string"?t:t.href));if(!Ot(p,l,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let x=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",d=await i(l,x),f=()=>{d.close();};o?.addEventListener("abort",f,{once:true});try{if(o?.aborted)throw o.reason;let y=await r(l);if(!Ot(await Fo(p,r),y,u))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let b=(await d.stat()).size;if(!Number.isSafeInteger(b)||b<0||b>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:vt});let E=new Uint8Array(b),c=0;for(;c<E.byteLength;){if(o?.aborted)throw o.reason;let{bytesRead:m}=await d.read(E,c,E.byteLength-c,c);if(m===0)break;c+=m;}if(o?.aborted)throw o.reason;return c===E.byteLength?E:E.slice(0,c)}catch(y){throw o?.aborted?o.reason:y}finally{o?.removeEventListener("abort",f),await d.close().catch(()=>{});}}}function Ro(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let t=mo(e.trustedRoot),o=ho(e.maxBytes),n=e.read??Eo(t),i=e.networkFetch??fetch;return(async(r,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let u=xo(r);if(u.protocol!=="file:")return i(u,s);let p=yo(u,t);if(!p)return new Response(null,{status:404});let l=a?new AbortController:void 0,x=()=>l?.abort(a?.reason);a?.addEventListener("abort",x,{once:true});let d;try{if(d=await n(p,{maxBytes:o,...l?{signal:l.signal}:{}}),a?.aborted)throw a.reason;if(d.byteLength>o)return new Response(null,{status:413})}catch(f){if(a?.aborted)throw a.reason;if(l?.signal.aborted)throw l.signal.reason??f;if(f instanceof DOMException&&f.name==="AbortError"||f instanceof Error&&f.name==="AbortError")throw f;let y=wt(f);if(y===vt)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw f}finally{a?.removeEventListener("abort",x);}return new Response(d,{status:200})})}
2
+ Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkW5H62AWM_cjs.d}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkW5H62AWM_cjs.c}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkW5H62AWM_cjs.b}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkW5H62AWM_cjs.e}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=Xt;exports.createPackagedFileFetch=Ro;exports.hasExportAdmittedFont=ee;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=Yt;exports.openFontBackedDocumentForExport=Zt;
package/dist/export.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { P as PreservedImageMime, c as ImageResourceLimits, S as SupportedImageMime, b as ImageDecodePort } from './image-resources-DxF-SN_8.js';
2
- import { a as RevisionDisplayMode } from './revision-projection-kVd7p6Wd.js';
3
- import { S as SemanticLayout, j as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, T as TextMeasurer, i as FontRequest, k as FontSubstitution, l as ShapedRun, a as StyleSpanRecord } from './semantic-records-StH-AnHK.js';
4
- import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-C3fc_jV0.js';
5
- import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-_GGjhhVc.js';
6
- import { F as FontOriginFailure, a as FontOrigin } from './font-resolver-DwuQYj3P.js';
7
- import './types-barrel-PwcfEkaX.js';
1
+ import { P as PreservedImageMime, a as ImageResourceLimits, S as SupportedImageMime, I as ImageDecodePort } from './image-resources-B0v-XaTM.js';
2
+ import { a as RevisionDisplayMode } from './revision-projection-DDVBYTIG.js';
3
+ import { S as SemanticLayout, j as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, k as ListMarkerPictureRecord, T as TextMeasurer, i as FontRequest, l as FontSubstitution, m as ShapedRun, a as StyleSpanRecord } from './semantic-records-C5OeXnaL.js';
4
+ import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-9wjJT20Y.js';
5
+ import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-Dyr0ZSOI.js';
6
+ import { F as FontOriginFailure, a as FontOrigin } from './font-resolver-PBc8Vuxs.js';
7
+ import './types-barrel-ChGvWjkO.js';
8
8
  import './editor-scope-OHPwVQ5l.js';
9
- import './omml-equation-Bk3OP1fv.js';
10
- import './tree-package-fragment-CpEV1gl3.js';
11
- import './editor-BRh7GuZF.js';
9
+ import './omml-equation-CfTm3jOK.js';
10
+ import './tree-package-fragment-DBb97w3F.js';
11
+ import './editor-BKDVqXyk.js';
12
12
  import './contracts/document.js';
13
13
  import './contracts/interaction.js';
14
- import './semantic-interaction-Z2Xa68U5.js';
15
- import './document-protection-DM6mA8Rf.js';
14
+ import './semantic-interaction-BNiYSBcB.js';
15
+ import './document-protection-CMPEonQc.js';
16
16
  import './failure-DNNmwsgD.js';
17
17
 
18
18
  /** Source content that cannot be certified by the layout snapshot. @public */
@@ -139,8 +139,13 @@ interface ExportSession {
139
139
  layout(): Promise<ExportSemanticLayout>;
140
140
  /** Settle resources and cache one explicit revision projection. */
141
141
  layoutFor(displayMode: RevisionDisplayMode): Promise<ExportSemanticLayout>;
142
- /** Mint a defensive copy only for a ready drawing from this session. */
143
- validatedImageBytes(drawing: InlineDrawingRecord | AnchoredDrawingRecord): Uint8Array | null;
142
+ /**
143
+ * Mint a defensive copy only for a ready image published by this session.
144
+ *
145
+ * Takes any record that carries a validated `resource`: an inline or anchored drawing, or
146
+ * a list marker's picture bullet. A resource that is not `ready` answers null.
147
+ */
148
+ validatedImageBytes(source: InlineDrawingRecord | AnchoredDrawingRecord | ListMarkerPictureRecord): Uint8Array | null;
144
149
  /**
145
150
  * Release per-document caches, pending resource work, and image-byte capabilities. Idempotent.
146
151
  * Previously resolved layout snapshots remain immutable and traversable after disposal.
@@ -243,6 +248,8 @@ declare function hasExportAdmittedFont<T extends object>(value: T): value is T &
243
248
  interface ExportLaidOutText {
244
249
  readonly run: ShapedRun;
245
250
  readonly font: ExportAdmittedFontIdentity;
251
+ /** Face descriptors indexed by run.fontSpans when a run needs multiple faces. */
252
+ readonly fonts?: readonly ExportAdmittedFontIdentity[];
246
253
  readonly fixedPointScale: number;
247
254
  }
248
255
  /** Additive laid-out text shaping for font-backed export sessions and shared shaping. @public */
@@ -298,12 +305,22 @@ type OpenFontBackedDocumentForExportResult = {
298
305
  }>;
299
306
  /** Font-backed one-shot session options shared by Markdown and future exporters. @public */
300
307
  interface OpenFontBackedDocumentForExportOptions extends Omit<OpenDocumentForExportOptions, 'measurer' | 'reuseAcrossRevisions'> {
308
+ /** Apply document optional ligatures to both layout measurement and exported glyphs. */
309
+ readonly documentLigatures?: boolean;
301
310
  /** Immutable font-backed byte sessions reject incremental revision reuse. */
302
311
  readonly reuseAcrossRevisions?: false;
303
312
  /** Ordered first-wins font origins resolved against this immutable DOCX. */
304
313
  readonly fonts: FontOrigin | readonly FontOrigin[];
314
+ /**
315
+ * Origins composed AFTER the document's own embedded fonts, for faces nothing else covers.
316
+ * An origin here sees every face the explicit origins and the embedded fonts can paint in
317
+ * `resolvedFaces`, so a stand-in it offers cannot shadow a face the document carries.
318
+ */
319
+ readonly lastResortFonts?: FontOrigin | readonly FontOrigin[];
305
320
  /** Font provisioning deadline; defaults to `resourceTimeoutMs`, then 60 seconds. */
306
321
  readonly fontResolutionTimeoutMs?: number;
322
+ /** Ordered admitted faces used when a complete text span lacks glyph coverage. Maximum 16. */
323
+ readonly glyphFallbacks?: readonly FontRequest[];
307
324
  /** `strict` refuses incomplete face coverage or any failed origin. Default: `best-effort`. */
308
325
  readonly fontPolicy?: 'best-effort' | 'strict';
309
326
  /** Fire-and-forget diagnostics; returned promises are observed but do not delay export. */