@docx-editor.dev/core 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +39 -1
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +6 -6
- package/dist/automation.d.ts +6 -6
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +12 -12
- package/dist/binding.d.ts +12 -12
- package/dist/binding.js +1 -1
- package/dist/chunk-4GQXAXTZ.js +5 -0
- package/dist/chunk-DGUHCJPF.cjs +18 -0
- package/dist/{chunk-2GSRLGUI.cjs → chunk-DY3QVCWC.cjs} +6 -6
- package/dist/{chunk-45FL7KH4.js → chunk-E7BXJ4BF.js} +1 -1
- package/dist/chunk-F7Z6PWAZ.cjs +2 -0
- package/dist/chunk-JEMP5YI5.cjs +15 -0
- package/dist/{chunk-3FRSOOND.cjs → chunk-JZXK4DKV.cjs} +1 -1
- package/dist/chunk-NIGGABAA.js +15 -0
- package/dist/chunk-OPKOTVQQ.js +18 -0
- package/dist/{chunk-GOEBQ26R.js → chunk-PSZH2VXP.js} +1 -1
- package/dist/{chunk-LJIX4ZDF.js → chunk-R75OLPL6.js} +6 -6
- package/dist/{chunk-JDHTCMFA.cjs → chunk-SFMAIFEN.cjs} +1 -1
- package/dist/chunk-SKWYEZCO.cjs +5 -0
- package/dist/{chunk-YTZIGUXT.js → chunk-SMRD66T5.js} +1 -1
- package/dist/chunk-WAVN7MAT.js +2 -0
- package/dist/chunk-WU7PUTVA.js +2 -0
- package/dist/{chunk-OHJQ7GPZ.cjs → chunk-YMYCPY5Y.cjs} +1 -1
- package/dist/{content-control-walk-BeAFh6Xi.d.cts → content-control-walk-CbTqHq6O.d.cts} +1 -1
- package/dist/{content-control-walk-CQp8l6eS.d.ts → content-control-walk-D06GijR0.d.ts} +1 -1
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +10 -10
- package/dist/contracts/editor.d.ts +10 -10
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.cts +9 -9
- package/dist/contracts/interaction.d.ts +9 -9
- package/dist/contracts/modules.d.cts +5 -5
- package/dist/contracts/modules.d.ts +5 -5
- package/dist/contracts/types.d.cts +3 -1
- package/dist/contracts/types.d.ts +3 -1
- package/dist/{custom-node-writes-CIC_-wad.d.cts → custom-node-writes-D9G3GKQ7.d.cts} +7 -7
- package/dist/{custom-node-writes-2clI36T9.d.ts → custom-node-writes-tJw8U9MO.d.ts} +7 -7
- package/dist/dist-YFULGVS3.js +2 -0
- package/dist/{editor-CUul9IuY.d.cts → editor-BZEJL3vv.d.cts} +33 -19
- package/dist/{editor-DIwctMcU.d.ts → editor-D2zOJztO.d.ts} +33 -19
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +375 -38
- package/dist/editor.d.cts +42 -26
- package/dist/editor.d.ts +42 -26
- package/dist/editor.js +1 -1
- package/dist/harfbuzz.wasm +0 -0
- package/dist/{hf-references-CAp1xTv6.d.ts → hf-references-BdjsQNE_.d.ts} +2 -2
- package/dist/{hf-references-BPET4tlK.d.cts → hf-references-CgEOSw3i.d.cts} +2 -2
- package/dist/{image-resources-CSlQmPIm.d.cts → image-resources-BaHz4QAd.d.cts} +10 -10
- package/dist/{image-resources-e13t-pgy.d.ts → image-resources-Cl5_cNi9.d.ts} +10 -10
- package/dist/{index-BUsYjxF5.d.ts → index-D8L8WrNF.d.ts} +111 -21
- package/dist/{index-8t44iXTY.d.cts → index-_xF7n_z0.d.cts} +111 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +71 -23
- package/dist/layout.d.ts +71 -23
- package/dist/layout.js +1 -1
- package/dist/node-module-shim-TTKTT66I.js +1 -0
- package/dist/{note-nodes-CZQXU6Fg.d.ts → note-nodes-BPSTVDMr.d.ts} +1 -1
- package/dist/{note-nodes-B2wWES2L.d.cts → note-nodes-C6DLxlvj.d.cts} +1 -1
- package/dist/{ooxml-package-Cmbe_M04.d.cts → ooxml-package-CR5us6ad.d.cts} +115 -115
- package/dist/{ooxml-package-BrxTmTsZ.d.ts → ooxml-package-D_CtywTW.d.ts} +115 -115
- package/dist/{ooxml-tree-CG0odFyi.d.cts → ooxml-tree-BU0e3DVi.d.cts} +1 -1
- package/dist/{ooxml-tree-CG0odFyi.d.ts → ooxml-tree-BU0e3DVi.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +22 -8
- package/dist/output.d.ts +22 -8
- package/dist/output.js +1 -1
- package/dist/{protocol-B5oSt08P.d.cts → protocol-CD7slqvl.d.cts} +2 -2
- package/dist/{protocol-ooK7PAXz.d.ts → protocol-DsbfgBwA.d.ts} +2 -2
- package/dist/{note-properties-Dhqkro--.d.cts → review-reads-Dr0CpW6u.d.cts} +67 -67
- package/dist/{note-properties-BS66XmcC.d.ts → review-reads-HDvoQXK2.d.ts} +67 -67
- package/dist/{review-support-Bl9sN8cv.d.ts → review-support-D4ZBdUXa.d.ts} +2 -2
- package/dist/{review-support-CHuJxHmz.d.cts → review-support-T-riLz4Y.d.cts} +2 -2
- package/dist/{revision-projection-u4nT52xT.d.ts → revision-projection-UKqvPa4-.d.ts} +1 -1
- package/dist/{revision-projection-DRZMzoLD.d.cts → revision-projection-WzlQGBJx.d.cts} +1 -1
- package/dist/{semantic-cell-selection-Dc-_enhm.d.ts → semantic-cell-selection-B5vfPz4Q.d.ts} +4 -4
- package/dist/{semantic-cell-selection-CdNQ-a9-.d.cts → semantic-cell-selection-BTQFpN0S.d.cts} +4 -4
- package/dist/{semantic-interaction-DgaWs-5w.d.cts → semantic-interaction-CDNEU_Tx.d.cts} +1 -1
- package/dist/{semantic-interaction-CCVwyw2A.d.ts → semantic-interaction-lvpzZRpA.d.ts} +1 -1
- package/dist/{semantic-paint-6iIB4fhx.d.cts → semantic-paint-BBPL3u5w.d.ts} +111 -3
- package/dist/{semantic-paint-CKIbFkQ7.d.ts → semantic-paint-IjbL-4CT.d.cts} +111 -3
- package/dist/{semantic-records-B-qbrnp2.d.ts → semantic-records-CdQvpUj1.d.ts} +4 -4
- package/dist/{semantic-records-Dq8SlCY8.d.cts → semantic-records-DEOs3_tE.d.cts} +4 -4
- package/dist/{shaped-measurer-Dx4llNhK.d.cts → shaped-measurer-C2SJAjV0.d.cts} +1 -1
- package/dist/{shaped-measurer-BT4FqYe9.d.ts → shaped-measurer-l4o5ITJ0.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +238 -238
- package/dist/store.d.ts +238 -238
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-DOYNkKqD.d.cts → tree-op-types-CUCwPWjT.d.cts} +219 -219
- package/dist/{tree-op-types-CZw9QhWX.d.ts → tree-op-types-D0fTNBVW.d.ts} +219 -219
- package/dist/{tree-session-CF_EOhTW.d.ts → tree-session-CH1oA75f.d.ts} +61 -45
- package/dist/{tree-session-CtK3KgFU.d.cts → tree-session-b7bggR-S.d.cts} +61 -45
- package/dist/{tree-store-Jg-q7fyf.d.cts → tree-store-BqgeCa1Q.d.cts} +3 -3
- package/dist/{tree-store-9TaX-L0V.d.ts → tree-store-CIKASRHk.d.ts} +3 -3
- package/licenses/HarfBuzz-COPYING.txt +42 -0
- package/package.json +5 -3
- package/dist/chunk-2QIA75K3.js +0 -2
- package/dist/chunk-32NXPFYL.js +0 -5
- package/dist/chunk-3C533HSQ.cjs +0 -18
- package/dist/chunk-7GYF33B5.cjs +0 -2
- package/dist/chunk-H3DZP4LE.cjs +0 -5
- package/dist/chunk-L2GMLEHX.cjs +0 -14
- package/dist/chunk-QUZM6LWQ.js +0 -14
- package/dist/chunk-T252F4US.js +0 -18
package/dist/editor.d.cts
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
import {
|
|
1
|
+
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-BaHz4QAd.cjs';
|
|
2
|
+
import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-CUCwPWjT.cjs';
|
|
3
|
+
export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-CUCwPWjT.cjs';
|
|
4
|
+
import { g as DocumentThemeColorEntry } from './tree-session-b7bggR-S.cjs';
|
|
5
|
+
export { a as TreeApplyResult, c as TreeDocxSessionView } from './tree-session-b7bggR-S.cjs';
|
|
6
|
+
import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-BZEJL3vv.cjs';
|
|
7
|
+
export { I as ImageContext, c as ImageCropPercent, d as ImageCropPermille, S as SelectedImageState, e as cropPercentFromCropPermille, f as cropPercentFromPermille, g as cropPercentFromSourceCrop, h as cropPermilleFromCropPercent, i as cropPermilleFromPercent, s as sourceCropFromCropPercent, v as validateImageCropPercent } from './editor-BZEJL3vv.cjs';
|
|
8
|
+
import { L as LayoutShapingOptions } from './shaped-measurer-C2SJAjV0.cjs';
|
|
9
|
+
import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-_xF7n_z0.cjs';
|
|
10
|
+
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 DEFAULT_TABLE_CHROME_DRAFT, q as DocxEditorConfig, E as EMU_PER_POINT, F as FinalizedImageOverlayInteraction, r as FontConfigurationBase, s as FontConfigurationFragment, t as FontLoadFailure, u as FontLoadFailureReason, v as FontMeasurementState, w as FontResolutionRequest, x as FontResolver, y as FontUrlSource, H as HyperlinkActivation, z as HyperlinkChromeHandlers, B as HyperlinkOps, I as IMAGE_OVERLAY_NUDGE_PT, G as IMAGE_OVERLAY_NUDGE_SHIFT_PT, J as ImageInteractionSession, K as ImageOverlayScrollPort, L as ImageResizeHandle, M as ImageResizeResult, N as LoadFontsRequest, Q as LoadFontsResult, R as MAX_RESOLVER_FAMILIES, S as OverlayFrameRect, U as PaginatedSurfaceState, V as RunTableChromeCommandResult, W as SelectedDrawingOverlayTarget, X as SurfaceFormatting, Y as SurfaceHyperlink, Z as SurfaceNavigation, _ as SurfaceOverlayCoordinates, $ as TABLE_BORDER_STYLE_OPTIONS, a0 as TABLE_BORDER_TARGET_OPTIONS, a1 as TABLE_BORDER_WIDTH_OPTIONS, a2 as TABLE_CHROME_SLOT_IDS, a3 as TableBorderStyleOption, a4 as TableBorderTargetOption, a5 as TableBorderTargetValue, a6 as TableBorderWidthOption, a7 as TableChromeDraft, a8 as TableChromePick, a9 as TableChromeSlotId, aa as TableInteractionLabelKey, ab as ToolbarCommandState, ac as WORD_DEFAULT_FONT, ad as applyTableChromePick, ae as blankDocumentBytes, af as canExecuteImageCommand, ag as captureImageMutationPreconditions, ah as chromeControlCount, ai as chromeMenuSlots, aj as chromeProbeForSlot, ak as chromeSlotId, al as commandForSlot, am as commandForSlotValue, an as commandForTableChromeSlotValue, ao as composeFontConfiguration, ap as computeImageResizeResult, aq as computeMovedImagePosition, ar as computeResizedImageExtentEmu, as as createDocxEditor, at as createFontSource, au as createImageOverlayScrollPort, av as cssPixelsToLayoutPoints, aw as defaultChromeGroups, ax as defaultTableLabel, ay as emuToOverlayPoints, az as executeImageCommand, aA as finalizeImageOverlayInteraction, aB as formattingBarChromeGroups, aC as isStaleImageInteractionCommit, aD as isTableChromeSlot, aE as layoutPointsToCssPixels, aF as loadFonts, aG as overlayFrameToSheetCssPixels, aH as pointsToEmu, aI as probeTableChromeCommand, aJ as resizePreservesAspect, aK as runSave, aL as runTableChromeCommand, aM as runTableCommand, aN as runToolbarCommand, aO as selectedDrawingOverlayTargetOf, aP as selectedImageStateOf, aQ as surfacePaintScale, aR as tableChromeIconPaths, aS as tableChromeLabelKeyForTarget, aT as tableChromeToolbarState, aU as tableChromeVisible, aV as tableCommandToolbarState, aW as toolbarCommandState, aX as toolbarCommandStates } from './index-_xF7n_z0.cjs';
|
|
11
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CD7slqvl.cjs';
|
|
7
12
|
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.cjs';
|
|
8
13
|
import { ColorValue } from './contracts/types.cjs';
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import './
|
|
20
|
-
import './
|
|
21
|
-
import './ooxml-tree-CG0odFyi.cjs';
|
|
22
|
-
import './note-properties-Dhqkro--.cjs';
|
|
23
|
-
import './ooxml-package-Cmbe_M04.cjs';
|
|
24
|
-
import './custom-node-writes-CIC_-wad.cjs';
|
|
25
|
-
import './hf-references-BPET4tlK.cjs';
|
|
26
|
-
import './note-nodes-B2wWES2L.cjs';
|
|
27
|
-
import './tree-store-Jg-q7fyf.cjs';
|
|
14
|
+
import { S as SemanticLayout } from './semantic-records-DEOs3_tE.cjs';
|
|
15
|
+
export { T as TextMeasurer } from './semantic-records-DEOs3_tE.cjs';
|
|
16
|
+
export { S as SectionProperties } from './semantic-cell-selection-BTQFpN0S.cjs';
|
|
17
|
+
export { R as ReviewModelInput } from './review-support-T-riLz4Y.cjs';
|
|
18
|
+
export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-CDNEU_Tx.cjs';
|
|
19
|
+
export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-IjbL-4CT.cjs';
|
|
20
|
+
import './ooxml-package-CR5us6ad.cjs';
|
|
21
|
+
import './ooxml-tree-BU0e3DVi.cjs';
|
|
22
|
+
import './custom-node-writes-D9G3GKQ7.cjs';
|
|
23
|
+
import './hf-references-CgEOSw3i.cjs';
|
|
24
|
+
import './note-nodes-C6DLxlvj.cjs';
|
|
25
|
+
import './tree-store-BqgeCa1Q.cjs';
|
|
28
26
|
import 'prosemirror-model';
|
|
27
|
+
import './contracts/document.cjs';
|
|
28
|
+
import './revision-projection-WzlQGBJx.cjs';
|
|
29
|
+
import './review-reads-Dr0CpW6u.cjs';
|
|
29
30
|
|
|
30
31
|
interface LayoutShapingInstrumentation {
|
|
31
32
|
readonly onFontByteCopy?: () => void;
|
|
@@ -50,6 +51,14 @@ declare function createLayoutShaping(configuration: FontConfiguration, instrumen
|
|
|
50
51
|
*/
|
|
51
52
|
declare function disposeLayoutShaping(shaping: LayoutShapingOptions): void;
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* What `snapshot()` reports before an editor exists: loading, not editable, nothing
|
|
56
|
+
* selected, nothing undoable — never invented state.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
declare const LOADING_SNAPSHOT: EditorSnapshot;
|
|
61
|
+
|
|
53
62
|
/** The engine paints at 96 px per inch (twips / 15, 1440 twips per inch). */
|
|
54
63
|
declare const PX_PER_INCH = 96;
|
|
55
64
|
/** Painted pixels per centimetre, derived from {@link PX_PER_INCH}. */
|
|
@@ -149,6 +158,13 @@ declare function dragIndent(handle: RulerIndentHandle, positionTwips: number, in
|
|
|
149
158
|
*/
|
|
150
159
|
declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array, options?: PaginatedSurfaceOptions): OpenPaginatedResult;
|
|
151
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Stable value identity for a command, including nested payloads.
|
|
163
|
+
*
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
declare function editorCommandKey(command: EditorCommand): string;
|
|
167
|
+
|
|
152
168
|
/** Planner-backed can/plan pair — production gate for table commands. Task 9 maps chrome slots. */
|
|
153
169
|
declare function tableCommandState(command: EditorCommand, surface: PaginatedSurface): {
|
|
154
170
|
readonly can: CanResult;
|
|
@@ -308,4 +324,4 @@ declare function validateSetImagePositionCommand(command: {
|
|
|
308
324
|
readonly relativeToV?: string;
|
|
309
325
|
}, mode: 'frame' | 'simple'): boolean;
|
|
310
326
|
|
|
311
|
-
export { AUTO_ZOOM_MODE, BROWSER_AUTOMATION_CAPABILITIES, type ColorLowerResult, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, type RulerDragOptions, type RulerIndent, type RulerIndentHandle, type RulerPageMetrics, type RulerTick, type RulerUnit, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, type SurfaceExtent, TWIPS_PER_CM, TWIPS_PER_INCH, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, createBrowserAutomationHost, createLayoutShaping, disposeLayoutShaping, dragIndent, generateRulerTicks, handlePosition, lowerColorValueForBorder, lowerColorValueForFill, mountPaginatedSurface, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameZoomMode, snapTwips, surfaceExtent, tableCommandState, toEditorFontError, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier };
|
|
327
|
+
export { AUTO_ZOOM_MODE, BROWSER_AUTOMATION_CAPABILITIES, type ColorLowerResult, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, LOADING_SNAPSHOT, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, type RulerDragOptions, type RulerIndent, type RulerIndentHandle, type RulerPageMetrics, type RulerTick, type RulerUnit, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, type SurfaceExtent, TWIPS_PER_CM, TWIPS_PER_INCH, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, createBrowserAutomationHost, createLayoutShaping, disposeLayoutShaping, dragIndent, editorCommandKey, generateRulerTicks, handlePosition, lowerColorValueForBorder, lowerColorValueForFill, mountPaginatedSurface, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameZoomMode, snapTwips, surfaceExtent, tableCommandState, toEditorFontError, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier };
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
-
import {
|
|
1
|
+
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-Cl5_cNi9.js';
|
|
2
|
+
import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-D0fTNBVW.js';
|
|
3
|
+
export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-D0fTNBVW.js';
|
|
4
|
+
import { g as DocumentThemeColorEntry } from './tree-session-CH1oA75f.js';
|
|
5
|
+
export { a as TreeApplyResult, c as TreeDocxSessionView } from './tree-session-CH1oA75f.js';
|
|
6
|
+
import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-D2zOJztO.js';
|
|
7
|
+
export { I as ImageContext, c as ImageCropPercent, d as ImageCropPermille, S as SelectedImageState, e as cropPercentFromCropPermille, f as cropPercentFromPermille, g as cropPercentFromSourceCrop, h as cropPermilleFromCropPercent, i as cropPermilleFromPercent, s as sourceCropFromCropPercent, v as validateImageCropPercent } from './editor-D2zOJztO.js';
|
|
8
|
+
import { L as LayoutShapingOptions } from './shaped-measurer-l4o5ITJ0.js';
|
|
9
|
+
import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-D8L8WrNF.js';
|
|
10
|
+
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 DEFAULT_TABLE_CHROME_DRAFT, q as DocxEditorConfig, E as EMU_PER_POINT, F as FinalizedImageOverlayInteraction, r as FontConfigurationBase, s as FontConfigurationFragment, t as FontLoadFailure, u as FontLoadFailureReason, v as FontMeasurementState, w as FontResolutionRequest, x as FontResolver, y as FontUrlSource, H as HyperlinkActivation, z as HyperlinkChromeHandlers, B as HyperlinkOps, I as IMAGE_OVERLAY_NUDGE_PT, G as IMAGE_OVERLAY_NUDGE_SHIFT_PT, J as ImageInteractionSession, K as ImageOverlayScrollPort, L as ImageResizeHandle, M as ImageResizeResult, N as LoadFontsRequest, Q as LoadFontsResult, R as MAX_RESOLVER_FAMILIES, S as OverlayFrameRect, U as PaginatedSurfaceState, V as RunTableChromeCommandResult, W as SelectedDrawingOverlayTarget, X as SurfaceFormatting, Y as SurfaceHyperlink, Z as SurfaceNavigation, _ as SurfaceOverlayCoordinates, $ as TABLE_BORDER_STYLE_OPTIONS, a0 as TABLE_BORDER_TARGET_OPTIONS, a1 as TABLE_BORDER_WIDTH_OPTIONS, a2 as TABLE_CHROME_SLOT_IDS, a3 as TableBorderStyleOption, a4 as TableBorderTargetOption, a5 as TableBorderTargetValue, a6 as TableBorderWidthOption, a7 as TableChromeDraft, a8 as TableChromePick, a9 as TableChromeSlotId, aa as TableInteractionLabelKey, ab as ToolbarCommandState, ac as WORD_DEFAULT_FONT, ad as applyTableChromePick, ae as blankDocumentBytes, af as canExecuteImageCommand, ag as captureImageMutationPreconditions, ah as chromeControlCount, ai as chromeMenuSlots, aj as chromeProbeForSlot, ak as chromeSlotId, al as commandForSlot, am as commandForSlotValue, an as commandForTableChromeSlotValue, ao as composeFontConfiguration, ap as computeImageResizeResult, aq as computeMovedImagePosition, ar as computeResizedImageExtentEmu, as as createDocxEditor, at as createFontSource, au as createImageOverlayScrollPort, av as cssPixelsToLayoutPoints, aw as defaultChromeGroups, ax as defaultTableLabel, ay as emuToOverlayPoints, az as executeImageCommand, aA as finalizeImageOverlayInteraction, aB as formattingBarChromeGroups, aC as isStaleImageInteractionCommit, aD as isTableChromeSlot, aE as layoutPointsToCssPixels, aF as loadFonts, aG as overlayFrameToSheetCssPixels, aH as pointsToEmu, aI as probeTableChromeCommand, aJ as resizePreservesAspect, aK as runSave, aL as runTableChromeCommand, aM as runTableCommand, aN as runToolbarCommand, aO as selectedDrawingOverlayTargetOf, aP as selectedImageStateOf, aQ as surfacePaintScale, aR as tableChromeIconPaths, aS as tableChromeLabelKeyForTarget, aT as tableChromeToolbarState, aU as tableChromeVisible, aV as tableCommandToolbarState, aW as toolbarCommandState, aX as toolbarCommandStates } from './index-D8L8WrNF.js';
|
|
11
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-DsbfgBwA.js';
|
|
7
12
|
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.js';
|
|
8
13
|
import { ColorValue } from './contracts/types.js';
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import './
|
|
20
|
-
import './
|
|
21
|
-
import './ooxml-tree-CG0odFyi.js';
|
|
22
|
-
import './note-properties-BS66XmcC.js';
|
|
23
|
-
import './ooxml-package-BrxTmTsZ.js';
|
|
24
|
-
import './custom-node-writes-2clI36T9.js';
|
|
25
|
-
import './hf-references-CAp1xTv6.js';
|
|
26
|
-
import './note-nodes-CZQXU6Fg.js';
|
|
27
|
-
import './tree-store-9TaX-L0V.js';
|
|
14
|
+
import { S as SemanticLayout } from './semantic-records-CdQvpUj1.js';
|
|
15
|
+
export { T as TextMeasurer } from './semantic-records-CdQvpUj1.js';
|
|
16
|
+
export { S as SectionProperties } from './semantic-cell-selection-B5vfPz4Q.js';
|
|
17
|
+
export { R as ReviewModelInput } from './review-support-D4ZBdUXa.js';
|
|
18
|
+
export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-lvpzZRpA.js';
|
|
19
|
+
export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-BBPL3u5w.js';
|
|
20
|
+
import './ooxml-package-D_CtywTW.js';
|
|
21
|
+
import './ooxml-tree-BU0e3DVi.js';
|
|
22
|
+
import './custom-node-writes-tJw8U9MO.js';
|
|
23
|
+
import './hf-references-BdjsQNE_.js';
|
|
24
|
+
import './note-nodes-BPSTVDMr.js';
|
|
25
|
+
import './tree-store-CIKASRHk.js';
|
|
28
26
|
import 'prosemirror-model';
|
|
27
|
+
import './contracts/document.js';
|
|
28
|
+
import './revision-projection-UKqvPa4-.js';
|
|
29
|
+
import './review-reads-HDvoQXK2.js';
|
|
29
30
|
|
|
30
31
|
interface LayoutShapingInstrumentation {
|
|
31
32
|
readonly onFontByteCopy?: () => void;
|
|
@@ -50,6 +51,14 @@ declare function createLayoutShaping(configuration: FontConfiguration, instrumen
|
|
|
50
51
|
*/
|
|
51
52
|
declare function disposeLayoutShaping(shaping: LayoutShapingOptions): void;
|
|
52
53
|
|
|
54
|
+
/**
|
|
55
|
+
* What `snapshot()` reports before an editor exists: loading, not editable, nothing
|
|
56
|
+
* selected, nothing undoable — never invented state.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
declare const LOADING_SNAPSHOT: EditorSnapshot;
|
|
61
|
+
|
|
53
62
|
/** The engine paints at 96 px per inch (twips / 15, 1440 twips per inch). */
|
|
54
63
|
declare const PX_PER_INCH = 96;
|
|
55
64
|
/** Painted pixels per centimetre, derived from {@link PX_PER_INCH}. */
|
|
@@ -149,6 +158,13 @@ declare function dragIndent(handle: RulerIndentHandle, positionTwips: number, in
|
|
|
149
158
|
*/
|
|
150
159
|
declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array, options?: PaginatedSurfaceOptions): OpenPaginatedResult;
|
|
151
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Stable value identity for a command, including nested payloads.
|
|
163
|
+
*
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
declare function editorCommandKey(command: EditorCommand): string;
|
|
167
|
+
|
|
152
168
|
/** Planner-backed can/plan pair — production gate for table commands. Task 9 maps chrome slots. */
|
|
153
169
|
declare function tableCommandState(command: EditorCommand, surface: PaginatedSurface): {
|
|
154
170
|
readonly can: CanResult;
|
|
@@ -308,4 +324,4 @@ declare function validateSetImagePositionCommand(command: {
|
|
|
308
324
|
readonly relativeToV?: string;
|
|
309
325
|
}, mode: 'frame' | 'simple'): boolean;
|
|
310
326
|
|
|
311
|
-
export { AUTO_ZOOM_MODE, BROWSER_AUTOMATION_CAPABILITIES, type ColorLowerResult, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, type RulerDragOptions, type RulerIndent, type RulerIndentHandle, type RulerPageMetrics, type RulerTick, type RulerUnit, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, type SurfaceExtent, TWIPS_PER_CM, TWIPS_PER_INCH, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, createBrowserAutomationHost, createLayoutShaping, disposeLayoutShaping, dragIndent, generateRulerTicks, handlePosition, lowerColorValueForBorder, lowerColorValueForFill, mountPaginatedSurface, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameZoomMode, snapTwips, surfaceExtent, tableCommandState, toEditorFontError, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier };
|
|
327
|
+
export { AUTO_ZOOM_MODE, BROWSER_AUTOMATION_CAPABILITIES, type ColorLowerResult, DRAWING_REL_FROM_H, DRAWING_REL_FROM_V, DocxEditorInstance, DrawingPositionInput, FIT_WIDTH_ZOOM_MODE, LOADING_SNAPSHOT, OpenPaginatedResult, PX_PER_CM, PX_PER_INCH, PaginatedSurface, PaginatedSurfaceOptions, type RulerDragOptions, type RulerIndent, type RulerIndentHandle, type RulerPageMetrics, type RulerTick, type RulerUnit, SNAP_TWIPS_CM, SNAP_TWIPS_INCH, type SurfaceExtent, TWIPS_PER_CM, TWIPS_PER_INCH, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, createBrowserAutomationHost, createLayoutShaping, disposeLayoutShaping, dragIndent, editorCommandKey, generateRulerTicks, handlePosition, lowerColorValueForBorder, lowerColorValueForFill, mountPaginatedSurface, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameZoomMode, snapTwips, surfaceExtent, tableCommandState, toEditorFontError, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier };
|
package/dist/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Ga as AUTO_ZOOM_MODE,La as BROWSER_AUTOMATION_CAPABILITIES,ua as CHROME_GROUPS,ya as CHROME_MENUS,Ba as CHROME_UNAVAILABLE_KEY,X as DEFAULT_TABLE_CHROME_DRAFT,P as EMU_PER_POINT,Ha as FIT_WIDTH_ZOOM_MODE,N as IMAGE_OVERLAY_NUDGE_PT,O as IMAGE_OVERLAY_NUDGE_SHIFT_PT,d as LOADING_SNAPSHOT,e as MAX_RESOLVER_FAMILIES,l as PX_PER_CM,k as PX_PER_INCH,r as SNAP_TWIPS_CM,q as SNAP_TWIPS_INCH,ba as TABLE_BORDER_STYLE_OPTIONS,aa as TABLE_BORDER_TARGET_OPTIONS,ca as TABLE_BORDER_WIDTH_OPTIONS,Y as TABLE_CHROME_SLOT_IDS,p as TWIPS_PER_CM,o as TWIPS_PER_INCH,f as WORD_DEFAULT_FONT,Fa as ZOOM_MAX,Ea as ZOOM_MIN,da as applyTableChromePick,x as applyThemeShade,w as applyThemeTint,h as blankDocumentBytes,L as canExecuteImageCommand,K as captureImageMutationPreconditions,Aa as chromeControlCount,za as chromeMenuSlots,ha as chromeProbeForSlot,va as chromeSlotId,ia as commandForSlot,ka as commandForSlotValue,ja as commandForTableChromeSlotValue,g as composeFontConfiguration,Sa as computeImageResizeResult,U as computeMovedImagePosition,T as computeResizedImageExtentEmu,Ma as createBrowserAutomationHost,Ka as createDocxEditor,j as createFontSource,Ta as createImageOverlayScrollPort,b as createLayoutShaping,H as cropPercentFromCropPermille,F as cropPercentFromPermille,C as cropPercentFromSourceCrop,G as cropPermilleFromCropPercent,E as cropPermilleFromPercent,Pa as cssPixelsToLayoutPoints,wa as defaultChromeGroups,Z as defaultTableLabel,c as disposeLayoutShaping,u as dragIndent,ta as editorCommandKey,S as emuToOverlayPoints,M as executeImageCommand,Ua as finalizeImageOverlayInteraction,xa as formattingBarChromeGroups,m as generateRulerTicks,s as handlePosition,V as isStaleImageInteractionCommit,_ as isTableChromeSlot,Oa as layoutPointsToCssPixels,i as loadFonts,z as lowerColorValueForBorder,A as lowerColorValueForFill,Da as mountPaginatedSurface,Qa as overlayFrameToSheetCssPixels,R as pointsToEmu,ea as probeTableChromeCommand,Ra as resizePreservesAspect,B as resolveColorValueToCss,y as resolveThemeColorHex,Ia as resolveZoomMode,n as rulerPageBox,qa as runSave,oa as runTableChromeCommand,sa as runTableCommand,pa as runToolbarCommand,Ja as sameZoomMode,Q as selectedDrawingOverlayTargetOf,J as selectedImageStateOf,t as snapTwips,D as sourceCropFromCropPercent,Ca as surfaceExtent,Na as surfacePaintScale,ga as tableChromeIconPaths,fa as tableChromeLabelKeyForTarget,la as tableChromeToolbarState,$ as tableChromeVisible,W as tableCommandState,ra as tableCommandToolbarState,a as toEditorFontError,ma as toolbarCommandState,na as toolbarCommandStates,I as validateImageCropPercent,v as validateThemeModifier}from'./chunk-NIGGABAA.js';import'./chunk-WAVN7MAT.js';import'./chunk-OPKOTVQQ.js';import'./chunk-WU7PUTVA.js';import'./chunk-E7BXJ4BF.js';import'./chunk-4GQXAXTZ.js';import'./chunk-UVIUNAQ6.js';import'./chunk-SMRD66T5.js';export{E as DEFAULT_IMAGE_RESOURCE_LIMITS,vf as DRAWING_REL_FROM_H,wf as DRAWING_REL_FROM_V,Xa as IMAGE_WRAP_TARGETS,yf as positionInputFromPropertiesCommand,xf as propertiesCommandHasPositionFields,F as resolveImageResourceLimits,ob as resolveSvgIntrinsicSize,kb as sniffImageMime,uf as validateDrawingPositionInput,pb as validateRasterHeader,zf as validateSetImagePositionCommand}from'./chunk-R75OLPL6.js';import'./chunk-PSZH2VXP.js';export{a as resolveEditorModules}from'./chunk-GQQOL4PV.js';
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as OoxmlPart, O as OoxmlNode, a as OoxmlElement } from './ooxml-tree-
|
|
2
|
-
import { O as OoxmlPackage } from './ooxml-package-
|
|
1
|
+
import { e as OoxmlPart, O as OoxmlNode, a as OoxmlElement } from './ooxml-tree-BU0e3DVi.js';
|
|
2
|
+
import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
|
|
3
3
|
|
|
4
4
|
/** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
|
|
5
5
|
type HeaderFooterVariant = 'default' | 'first' | 'even';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as OoxmlPart, O as OoxmlNode, a as OoxmlElement } from './ooxml-tree-
|
|
2
|
-
import { O as OoxmlPackage } from './ooxml-package-
|
|
1
|
+
import { e as OoxmlPart, O as OoxmlNode, a as OoxmlElement } from './ooxml-tree-BU0e3DVi.cjs';
|
|
2
|
+
import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
|
|
3
3
|
|
|
4
4
|
/** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
|
|
5
5
|
type HeaderFooterVariant = 'default' | 'first' | 'even';
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { D as DrawingProjection } from './tree-op-types-
|
|
2
|
-
import { O as OoxmlPackage } from './ooxml-package-
|
|
3
|
-
|
|
4
|
-
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
5
|
-
interface ValidatedImageBytesHandle {
|
|
6
|
-
readonly registryId: number;
|
|
7
|
-
readonly resourceKey: string;
|
|
8
|
-
readonly contentId: string;
|
|
9
|
-
readonly generation: number;
|
|
10
|
-
}
|
|
1
|
+
import { D as DrawingProjection } from './tree-op-types-CUCwPWjT.cjs';
|
|
2
|
+
import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
|
|
11
3
|
|
|
12
4
|
/**
|
|
13
5
|
* The engine's trust-boundary caps: recursion depth, element counts, and the rest.
|
|
@@ -63,6 +55,14 @@ declare const DEFAULT_IMAGE_RESOURCE_LIMITS: ImageResourceLimits;
|
|
|
63
55
|
/** Resolve caller overrides into frozen image limits; hard ceilings cannot be raised. */
|
|
64
56
|
declare function resolveImageResourceLimits(overrides?: Partial<ImageResourceLimits>): ImageResourceLimits;
|
|
65
57
|
|
|
58
|
+
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
59
|
+
interface ValidatedImageBytesHandle {
|
|
60
|
+
readonly registryId: number;
|
|
61
|
+
readonly resourceKey: string;
|
|
62
|
+
readonly contentId: string;
|
|
63
|
+
readonly generation: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
/**
|
|
67
67
|
* Raster media the decode port measures and any authoring path may write.
|
|
68
68
|
*
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { D as DrawingProjection } from './tree-op-types-
|
|
2
|
-
import { O as OoxmlPackage } from './ooxml-package-
|
|
3
|
-
|
|
4
|
-
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
5
|
-
interface ValidatedImageBytesHandle {
|
|
6
|
-
readonly registryId: number;
|
|
7
|
-
readonly resourceKey: string;
|
|
8
|
-
readonly contentId: string;
|
|
9
|
-
readonly generation: number;
|
|
10
|
-
}
|
|
1
|
+
import { D as DrawingProjection } from './tree-op-types-D0fTNBVW.js';
|
|
2
|
+
import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
|
|
11
3
|
|
|
12
4
|
/**
|
|
13
5
|
* The engine's trust-boundary caps: recursion depth, element counts, and the rest.
|
|
@@ -63,6 +55,14 @@ declare const DEFAULT_IMAGE_RESOURCE_LIMITS: ImageResourceLimits;
|
|
|
63
55
|
/** Resolve caller overrides into frozen image limits; hard ceilings cannot be raised. */
|
|
64
56
|
declare function resolveImageResourceLimits(overrides?: Partial<ImageResourceLimits>): ImageResourceLimits;
|
|
65
57
|
|
|
58
|
+
/** Opaque handle — bytes are reachable only through {@link mintValidatedImageBytes}. */
|
|
59
|
+
interface ValidatedImageBytesHandle {
|
|
60
|
+
readonly registryId: number;
|
|
61
|
+
readonly resourceKey: string;
|
|
62
|
+
readonly contentId: string;
|
|
63
|
+
readonly generation: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
/**
|
|
67
67
|
* Raster media the decode port measures and any authoring path may write.
|
|
68
68
|
*
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { R as RevisionDisplayMode } from './revision-projection-u4nT52xT.js';
|
|
5
|
-
import './review-support-Bl9sN8cv.js';
|
|
6
|
-
import { a as SemanticSelection, S as SemanticPosition, N as NavigationCommand } from './semantic-interaction-CCVwyw2A.js';
|
|
7
|
-
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties, l as ReviewRevisionKind } from './note-properties-BS66XmcC.js';
|
|
8
|
-
import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-B-qbrnp2.js';
|
|
9
|
-
import { S as StoryScope, A as ApplyImagePropertiesInput, d as ImageIntentResult, c as InsertImageInput, B as BookmarkIndex } from './custom-node-writes-2clI36T9.js';
|
|
10
|
-
import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-Dc-_enhm.js';
|
|
1
|
+
import { T as TreeDocOp, d as DrawingPositionInput, l as DrawingTransform, h as DrawingTreeDocOp } from './tree-op-types-D0fTNBVW.js';
|
|
2
|
+
import { b as ImageDecodePort, S as SupportedImageMime } from './image-resources-Cl5_cNi9.js';
|
|
3
|
+
import './review-support-D4ZBdUXa.js';
|
|
11
4
|
import { EditorModule, ReviewModuleContribution } from './contracts/modules.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
5
|
+
import { j as FontSource, k as FontSourceSubstitution, F as FontConfiguration, l as FontFaceRequest, I as ImageContext, D as DocumentSource, Z as ZoomMode, E as EditorFontError, m as Editor, b as EditorCommand, C as CanResult, S as SelectedImageState, V as ViewScope, T as TableBorderEdgeTarget, n as TableBorderSpec, o as TableBorderStyle, p as TableContext } from './editor-D2zOJztO.js';
|
|
6
|
+
import { R as RevisionDisplayMode } from './revision-projection-UKqvPa4-.js';
|
|
7
|
+
import { a as SemanticSelection, S as SemanticPosition, N as NavigationCommand } from './semantic-interaction-lvpzZRpA.js';
|
|
8
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties, A as AuthoredNoteProperties, l as ReviewRevisionKind } from './review-reads-HDvoQXK2.js';
|
|
9
|
+
import { S as SemanticLayout, C as ContentControlBoundaryRecord, T as TextMeasurer } from './semantic-records-CdQvpUj1.js';
|
|
10
|
+
import { S as StoryScope, A as ApplyImagePropertiesInput, d as ImageIntentResult, c as InsertImageInput, B as BookmarkIndex } from './custom-node-writes-tJw8U9MO.js';
|
|
11
|
+
import { C as CellSelection, S as SectionProperties } from './semantic-cell-selection-B5vfPz4Q.js';
|
|
12
|
+
import { c as RevisionStyles, R as ReviewAuthorInfo, b as RevisionAuthorStyle, F as FieldShadingMode, d as DrawingPaintStrings } from './semantic-paint-BBPL3u5w.js';
|
|
13
|
+
import { Unsubscribe, ExecResult, IndentFormatting, SelectionPin } from './contracts/types.js';
|
|
14
|
+
import { c as TreeDocxSessionView, a as TreeApplyResult } from './tree-session-CH1oA75f.js';
|
|
15
15
|
import './contracts/document.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1087,9 +1087,10 @@ interface DocxEditorConfig {
|
|
|
1087
1087
|
*/
|
|
1088
1088
|
container?: HTMLElement;
|
|
1089
1089
|
/**
|
|
1090
|
-
* A document to load at construction
|
|
1091
|
-
* be re-opened (the handle is identity, not
|
|
1092
|
-
* `error` event rather than silently loading
|
|
1090
|
+
* A document to load at construction: DOCX bytes, or `'blank'` for Word's blank
|
|
1091
|
+
* template. A `DocumentHandle` cannot be re-opened (the handle is identity, not
|
|
1092
|
+
* content), so passing one emits a typed `error` event rather than silently loading
|
|
1093
|
+
* nothing. Omitting this mounts NO document, which is not the same as an empty one.
|
|
1093
1094
|
*/
|
|
1094
1095
|
document?: DocumentSource;
|
|
1095
1096
|
/**
|
|
@@ -1133,6 +1134,25 @@ interface DocxEditorConfig {
|
|
|
1133
1134
|
* suggesting, everything else in editing.
|
|
1134
1135
|
*/
|
|
1135
1136
|
mode?: 'edit' | 'view' | 'suggesting';
|
|
1137
|
+
/**
|
|
1138
|
+
* How painted tracked changes are coloured. Presentation only — nothing is serialised.
|
|
1139
|
+
*
|
|
1140
|
+
* - `'author'` (the DEFAULT) — every change takes its author's colour from the
|
|
1141
|
+
* `--doc-review-author-N` ramp, by order of first appearance, as Word does. Restyle a
|
|
1142
|
+
* slot under `.docx-editor` to change the ramp.
|
|
1143
|
+
* - `'kind'` — insertions green, deletions red, so "added" and "removed" are what a
|
|
1144
|
+
* glance tells apart, whoever proposed them.
|
|
1145
|
+
* - {@link RevisionAuthorAssignments} — style the named authors; `others` decides
|
|
1146
|
+
* whether the rest take the ramp (the default) or the kind colours.
|
|
1147
|
+
*
|
|
1148
|
+
* The opening value. In React this is authored declaratively — `DocxEditor.ColorByChangeType`
|
|
1149
|
+
* and `DocxEditor.AuthorStyle` compose and apply it, seeding this config for the first
|
|
1150
|
+
* paint — so React hosts never pass it by hand; it is the entry for headless hosts. Read
|
|
1151
|
+
* the document's resolved roster with `getReviewAuthors`. Applies wherever revision
|
|
1152
|
+
* markup paints: the full all-markup view needs a review module registered; without one
|
|
1153
|
+
* the proposed view still marks surviving insertions.
|
|
1154
|
+
*/
|
|
1155
|
+
revisionStyles?: RevisionStyles;
|
|
1136
1156
|
/** Override raster decode for insert/replace image commands; defaults to browser/headless. */
|
|
1137
1157
|
imageDecodePort?: ImageDecodePort;
|
|
1138
1158
|
/**
|
|
@@ -1222,6 +1242,58 @@ interface DocxEditorInstance extends Editor {
|
|
|
1222
1242
|
* `stateVersion()`.
|
|
1223
1243
|
*/
|
|
1224
1244
|
fontMeasurement(): FontMeasurementState;
|
|
1245
|
+
/**
|
|
1246
|
+
* Every author the review surface DRAWS, in Word's slot order, with the colour the review
|
|
1247
|
+
* chrome draws them in. The discovery surface a legend or colour picker builds on —
|
|
1248
|
+
* authors depend on the loaded file, so they cannot be known at configuration time.
|
|
1249
|
+
*
|
|
1250
|
+
* The colour is the author's, not the document's: under `'kind'` the painted text goes to
|
|
1251
|
+
* the insertion/deletion colours while the cards keep these accents, so a legend built
|
|
1252
|
+
* from this describes the rail rather than the page.
|
|
1253
|
+
*
|
|
1254
|
+
* BOTH HALVES OF REVIEW. Authors of tracked changes come first, numbered by where their
|
|
1255
|
+
* first change appears; authors who only commented follow. One person therefore draws in
|
|
1256
|
+
* one colour across their comments and their edits, which is what a reader assumes the
|
|
1257
|
+
* moment they learn the pairing on either. The order puts commenters last so that adding
|
|
1258
|
+
* a comment can never renumber a tracked change the painter has already drawn.
|
|
1259
|
+
*
|
|
1260
|
+
* Read of the rendered projection, not of the package: a resolved view hides the
|
|
1261
|
+
* revisions it has resolved away, so an author whose only change is hidden there is
|
|
1262
|
+
* listed only if they also commented. Empty while detached. Reference-stable between
|
|
1263
|
+
* changes, so it is safe as a dependency; changes bump `stateVersion()`.
|
|
1264
|
+
*/
|
|
1265
|
+
getReviewAuthors(): readonly ReviewAuthorInfo[];
|
|
1266
|
+
/**
|
|
1267
|
+
* The configured author used when a comment or reply omits an explicit author.
|
|
1268
|
+
*
|
|
1269
|
+
* @internal Review compose chrome uses this to draw an unfinished comment in the same
|
|
1270
|
+
* author colour it will receive after commit.
|
|
1271
|
+
*/
|
|
1272
|
+
getConfiguredAuthor(): string | null;
|
|
1273
|
+
/**
|
|
1274
|
+
* The style declared for one author, whether or not the SURFACE has published them yet —
|
|
1275
|
+
* so review chrome can draw a card the rail is holding before the roster catches up.
|
|
1276
|
+
*
|
|
1277
|
+
* {@link DocxEditorInstance.getReviewAuthors} answers for every author of a tracked
|
|
1278
|
+
* change or a comment, so this is a narrow fallback rather than the way to reach a
|
|
1279
|
+
* commenter.
|
|
1280
|
+
*
|
|
1281
|
+
* @internal The seam `@docx-editor.dev/pro`'s review rail resolves those authors
|
|
1282
|
+
* through. A consumer reads `useReviewAuthor` (pro) or `useReviewAuthors` (react)
|
|
1283
|
+
* instead; nothing here answers a question those two do not.
|
|
1284
|
+
*/
|
|
1285
|
+
getReviewAuthorStyle(author: string): RevisionAuthorStyle | undefined;
|
|
1286
|
+
/**
|
|
1287
|
+
* Replace how tracked changes are coloured, live. Paint-level: pages repaint without a
|
|
1288
|
+
* layout pass, and the caret, selection and undo history stay where they are. Pass
|
|
1289
|
+
* `'author'` to restore the default, or `'kind'` to opt out to the green/red
|
|
1290
|
+
* rendering. Survives a document reload.
|
|
1291
|
+
*
|
|
1292
|
+
* The imperative PRIMITIVE beneath React's declarative lane: `DocxEditor.ColorByChangeType`
|
|
1293
|
+
* and `DocxEditor.AuthorStyle` drive this seam, and React hosts declare those instead
|
|
1294
|
+
* of calling it. Call it directly from headless and non-React hosts.
|
|
1295
|
+
*/
|
|
1296
|
+
setRevisionStyles(styles: RevisionStyles): void;
|
|
1225
1297
|
/**
|
|
1226
1298
|
* Mount into `el`. If the instance holds pending document bytes (created without a
|
|
1227
1299
|
* container, or previously detached), they mount now — under the shaped measurer when
|
|
@@ -1614,6 +1686,13 @@ interface PaginatedSurfaceOptions {
|
|
|
1614
1686
|
* without remeasuring a single line.
|
|
1615
1687
|
*/
|
|
1616
1688
|
readonly fieldShading?: FieldShadingMode;
|
|
1689
|
+
/**
|
|
1690
|
+
* How tracked changes are coloured: by AUTHOR (the default), by kind, or by author with
|
|
1691
|
+
* host-pinned colours. A paint-level option like {@link fieldShading}: it changes no
|
|
1692
|
+
* geometry, so switching it repaints without remeasuring a line. Applies wherever
|
|
1693
|
+
* revision markup paints, whatever the {@link revisionDisplayMode} leaves visible.
|
|
1694
|
+
*/
|
|
1695
|
+
readonly revisionStyles?: RevisionStyles;
|
|
1617
1696
|
/**
|
|
1618
1697
|
* The review module's derivation hooks for this surface's session. Absent,
|
|
1619
1698
|
* `session.reviewItems()` is the typed empty queue and every review affordance
|
|
@@ -1831,10 +1910,10 @@ interface ContentControlSurfaceState {
|
|
|
1831
1910
|
* `session` to apply ops directly bypasses the layout invalidation and the caret bookkeeping.
|
|
1832
1911
|
*/
|
|
1833
1912
|
interface PaginatedSurface {
|
|
1834
|
-
readonly session:
|
|
1913
|
+
readonly session: TreeDocxSessionView;
|
|
1835
1914
|
storyScope(): StoryScope;
|
|
1836
1915
|
imageDecodePort(): ImageDecodePort;
|
|
1837
|
-
applyDrawingOps(ops: readonly DrawingTreeDocOp[]):
|
|
1916
|
+
applyDrawingOps(ops: readonly DrawingTreeDocOp[]): TreeApplyResult;
|
|
1838
1917
|
applyImageProperties(input: ApplyImagePropertiesInput): ImageIntentResult;
|
|
1839
1918
|
deleteImage(drawingNodeId: string): ImageIntentResult;
|
|
1840
1919
|
insertImage(input: Omit<InsertImageInput, 'decodePort'>): Promise<ImageIntentResult>;
|
|
@@ -2131,9 +2210,9 @@ interface PaginatedSurface {
|
|
|
2131
2210
|
* which is what lets a host close its panel on "the user clicked somewhere else" without
|
|
2132
2211
|
* every adapter reimplementing that comparison.
|
|
2133
2212
|
*/
|
|
2134
|
-
retainSelection():
|
|
2135
|
-
/** Drop
|
|
2136
|
-
releaseSelection(): void;
|
|
2213
|
+
retainSelection(): SelectionPin;
|
|
2214
|
+
/** Drop one owned pin. Another owner's pin remains visible. */
|
|
2215
|
+
releaseSelection(pin: SelectionPin): void;
|
|
2137
2216
|
/** The pinned range, or null once it was released or escaped. */
|
|
2138
2217
|
retainedSelection(): SemanticSelection | null;
|
|
2139
2218
|
/**
|
|
@@ -2145,6 +2224,17 @@ interface PaginatedSurface {
|
|
|
2145
2224
|
*/
|
|
2146
2225
|
editingMode(): SurfaceEditingMode;
|
|
2147
2226
|
setEditingMode(mode: SurfaceEditingMode): void;
|
|
2227
|
+
/**
|
|
2228
|
+
* Every author with a revision in the CURRENT layout, mapped to Word's colour slot by
|
|
2229
|
+
* order of first appearance. One map instance per layout, so a caller can key caches on
|
|
2230
|
+
* its identity.
|
|
2231
|
+
*/
|
|
2232
|
+
revisionAuthors(): ReadonlyMap<string, number>;
|
|
2233
|
+
/**
|
|
2234
|
+
* Replace how tracked changes are coloured, live. Paint-level: the pages repaint without
|
|
2235
|
+
* remeasuring a line, and the caret, selection and undo history stay where they are.
|
|
2236
|
+
*/
|
|
2237
|
+
setRevisionStyles(colors: RevisionStyles | undefined): void;
|
|
2148
2238
|
/**
|
|
2149
2239
|
* Commit ops that came from automation, through the gate a keystroke goes through.
|
|
2150
2240
|
*
|