@docx-editor.dev/core 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +5 -6
- package/dist/automation.d.ts +5 -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-2RDMWJPF.cjs +2 -0
- package/dist/chunk-5VC5HGJA.js +2 -0
- package/dist/chunk-A2JIBG75.js +1 -0
- package/dist/chunk-DKMKH77K.cjs +5 -0
- package/dist/chunk-DTQPINIM.js +15 -0
- package/dist/chunk-HHFMXG25.js +2 -0
- package/dist/chunk-IEXDXWTA.cjs +1 -0
- package/dist/chunk-IMMAG4QP.cjs +10 -0
- package/dist/chunk-KBCC66CI.js +5 -0
- package/dist/chunk-P5YSGSYC.cjs +15 -0
- package/dist/chunk-Q66ZJFRE.js +18 -0
- package/dist/chunk-TP4EHWEX.cjs +18 -0
- package/dist/chunk-VUJGPCPU.js +10 -0
- package/dist/chunk-XMHWBL3K.cjs +2 -0
- package/dist/contracts/document.d.cts +25 -3
- package/dist/contracts/document.d.ts +25 -3
- package/dist/contracts/editor.d.cts +10 -10
- package/dist/contracts/editor.d.ts +10 -10
- package/dist/contracts/interaction.d.cts +9 -9
- package/dist/contracts/interaction.d.ts +9 -9
- package/dist/contracts/modules.d.cts +6 -5
- package/dist/contracts/modules.d.ts +6 -5
- package/dist/contracts/types.d.cts +101 -1
- package/dist/contracts/types.d.ts +101 -1
- package/dist/{custom-node-writes-BpOBjNzo.d.ts → custom-node-writes-7ERv0f_X.d.cts} +25 -11
- package/dist/{custom-node-writes-C_AlNvds.d.cts → custom-node-writes-QyVZdTUA.d.ts} +25 -11
- package/dist/{editor-CXaGlcUa.d.cts → editor-CojjwMmF.d.cts} +78 -67
- package/dist/{editor-C--WWCBA.d.ts → editor-PUlv5Pp7.d.ts} +78 -67
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +124 -14
- package/dist/editor.d.cts +68 -36
- package/dist/editor.d.ts +68 -36
- package/dist/editor.js +1 -1
- package/dist/{hf-references-BdjsQNE_.d.ts → hf-references-Dvk6De4Q.d.cts} +1 -2
- package/dist/{hf-references-CgEOSw3i.d.cts → hf-references-z5Y4N1ab.d.ts} +1 -2
- package/dist/{image-resources-Bkmu1Jei.d.cts → image-resources-DQOiwOuE.d.cts} +2 -2
- package/dist/{image-resources-BWd5u-op.d.ts → image-resources-eZqD_-vC.d.ts} +2 -2
- package/dist/{index-QsE1xXyT.d.cts → index-DGPSeLI0.d.cts} +1632 -1435
- package/dist/{index-DW0TsrYl.d.ts → index-oN-v8DQ5.d.ts} +1632 -1435
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +19 -19
- package/dist/index.d.ts +19 -19
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +545 -336
- package/dist/layout.d.ts +545 -336
- package/dist/layout.js +1 -1
- package/dist/{note-nodes-BPSTVDMr.d.ts → note-nodes-BNCANoGN.d.ts} +1 -1
- package/dist/{note-nodes-C6DLxlvj.d.cts → note-nodes-DL-Au22P.d.cts} +1 -1
- package/dist/note-properties-CQlxjic_.d.cts +67 -0
- package/dist/note-properties-jvnw_DGG.d.ts +67 -0
- package/dist/omml-equation-BD-LsmWE.d.cts +84 -0
- package/dist/omml-equation-Dd3mBep-.d.ts +84 -0
- package/dist/{ooxml-tree-BU0e3DVi.d.ts → ooxml-package-CdEy9ufK.d.cts} +352 -1
- package/dist/{ooxml-tree-BU0e3DVi.d.cts → ooxml-package-CdEy9ufK.d.ts} +352 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +9 -8
- package/dist/output.d.ts +9 -8
- package/dist/output.js +1 -1
- package/dist/{protocol-CD7slqvl.d.cts → protocol-C7ahrdUx.d.ts} +28 -4
- package/dist/{protocol-DsbfgBwA.d.ts → protocol-UuZOcOp7.d.cts} +28 -4
- package/dist/{review-support-Cr2n7f1-.d.ts → review-items-D5SPFtsO.d.ts} +49 -102
- package/dist/{review-support-oQrX6Xu3.d.cts → review-items-DpsqTHio.d.cts} +49 -102
- package/dist/review-reads-B2Ji3fVU.d.ts +176 -0
- package/dist/review-reads-CP106AHp.d.cts +176 -0
- package/dist/{revision-projection-UKqvPa4-.d.ts → revision-projection-CILpvv4M.d.ts} +1 -1
- package/dist/{revision-projection-WzlQGBJx.d.cts → revision-projection-Cc4wz30g.d.cts} +1 -1
- package/dist/{semantic-cell-selection-C8RC0VnN.d.ts → semantic-cell-selection-BWhVAk5B.d.ts} +16 -4
- package/dist/{semantic-cell-selection-CQOgvtbT.d.cts → semantic-cell-selection-DJPjBWzf.d.cts} +16 -4
- package/dist/{semantic-interaction-f4GyBQ_1.d.cts → semantic-interaction-BjOcDB06.d.cts} +14 -2
- package/dist/{semantic-interaction-C45D_oG2.d.ts → semantic-interaction-Cca1-X_a.d.ts} +14 -2
- package/dist/{semantic-paint-DUkGLJ_L.d.ts → semantic-paint-CufpIQFw.d.ts} +7 -7
- package/dist/{semantic-paint-BUt0ePEW.d.cts → semantic-paint-Ur7pAINj.d.cts} +7 -7
- package/dist/{semantic-records-DoW_xNgJ.d.ts → semantic-records-C3Z76KeN.d.cts} +77 -31
- package/dist/{semantic-records-CuT3Wsd-.d.cts → semantic-records-Cc1MJrhM.d.ts} +77 -31
- package/dist/{shaped-measurer-CakZ7g1s.d.ts → shaped-measurer-CYSK20E2.d.cts} +2 -4
- package/dist/{shaped-measurer-CDcHzjhf.d.cts → shaped-measurer-CwlTPDJO.d.ts} +2 -4
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +90 -18
- package/dist/store.d.ts +90 -18
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-fZgbrR5F.d.ts → tree-op-types-B0-sCtw-.d.cts} +79 -10
- package/dist/{tree-op-types-QujrzgCz.d.cts → tree-op-types-XMVsJSpe.d.ts} +79 -10
- package/dist/{tree-session-5UWKAQ41.d.cts → tree-session-D945D43B.d.cts} +45 -19
- package/dist/{tree-session--6LDTNjR.d.ts → tree-session-DBJgmdmc.d.ts} +45 -19
- package/dist/{tree-store-Dy9FZ1pa.d.ts → tree-store-C6vc8E_2.d.cts} +14 -3
- package/dist/{tree-store-DhYIACNE.d.cts → tree-store-ClA-qng4.d.ts} +14 -3
- package/package.json +2 -2
- package/dist/chunk-32HTRN7R.js +0 -10
- package/dist/chunk-42PRWWVE.js +0 -2
- package/dist/chunk-BRBRYJKE.cjs +0 -2
- package/dist/chunk-DTR64XCS.cjs +0 -2
- package/dist/chunk-EMQSFPJO.cjs +0 -15
- package/dist/chunk-GBK7Z6F4.cjs +0 -5
- package/dist/chunk-GPJXQDHC.js +0 -2
- package/dist/chunk-JLSB6KNZ.js +0 -5
- package/dist/chunk-LEV2X47E.cjs +0 -18
- package/dist/chunk-NDTLLSG7.js +0 -1
- package/dist/chunk-O4VILLOM.cjs +0 -1
- package/dist/chunk-OB6JFVYA.js +0 -15
- package/dist/chunk-QTUZFJ4O.js +0 -18
- package/dist/chunk-UE7KTQLK.js +0 -2
- package/dist/chunk-WC3LI6FC.cjs +0 -10
- package/dist/chunk-XRDTD4X3.cjs +0 -2
- package/dist/content-control-walk-CbTqHq6O.d.cts +0 -56
- package/dist/content-control-walk-D06GijR0.d.ts +0 -56
- package/dist/ooxml-package-CR5us6ad.d.cts +0 -354
- package/dist/ooxml-package-D_CtywTW.d.ts +0 -354
- package/dist/review-reads-C5E7u-pt.d.ts +0 -432
- package/dist/review-reads-ChgUq41I.d.cts +0 -432
package/dist/editor.css
CHANGED
|
@@ -3544,6 +3544,13 @@ a.docx-hyperlink:focus-visible {
|
|
|
3544
3544
|
transition: padding-inline-start 0.2s ease;
|
|
3545
3545
|
}
|
|
3546
3546
|
|
|
3547
|
+
/* A deferred open gives the loading overlay one frame before parsing. The parse blocks
|
|
3548
|
+
layout transitions, so snap both ruler reservations before that frame or the right edge
|
|
3549
|
+
moves while the start edge remains frozen, leaving the ruler half a strip off the page. */
|
|
3550
|
+
.docx-ruler-frame--opening {
|
|
3551
|
+
transition: none;
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3547
3554
|
@media (prefers-reduced-motion: reduce) {
|
|
3548
3555
|
.docx-ruler-frame {
|
|
3549
3556
|
transition: none;
|
|
@@ -4269,6 +4276,9 @@ a.docx-hyperlink:focus-visible {
|
|
|
4269
4276
|
.docx-toolbar {
|
|
4270
4277
|
display: flex;
|
|
4271
4278
|
align-items: center;
|
|
4279
|
+
min-inline-size: 0;
|
|
4280
|
+
margin: 0;
|
|
4281
|
+
border: 0;
|
|
4272
4282
|
/* NOT overflow-scroll like the chrome spec's pill: this toolbar hosts LIVE popups
|
|
4273
4283
|
* (font menu, swatch grids) positioned absolutely inside their parts, and any
|
|
4274
4284
|
* overflow clipping on the bar would cut them off. A bar that does not measure
|
|
@@ -4386,6 +4396,22 @@ a.docx-hyperlink:focus-visible {
|
|
|
4386
4396
|
overflow-y: visible;
|
|
4387
4397
|
}
|
|
4388
4398
|
|
|
4399
|
+
/* Right-edge controls open toward the panel instead of beyond the viewport. */
|
|
4400
|
+
.docx-toolbar__more-panel .docx-toolbar__font-size-menu {
|
|
4401
|
+
right: 0;
|
|
4402
|
+
left: auto;
|
|
4403
|
+
}
|
|
4404
|
+
|
|
4405
|
+
/* The lower controls have no room below them in a small scrollport. Their compact menus
|
|
4406
|
+
* open upward and toward the panel, while the panel keeps its scroll position and bounds. */
|
|
4407
|
+
.docx-toolbar__more-panel .docx-toolbar__alignment-popup,
|
|
4408
|
+
.docx-toolbar__more-panel .docx-toolbar__line-spacing-menu {
|
|
4409
|
+
top: auto;
|
|
4410
|
+
right: 0;
|
|
4411
|
+
bottom: 100%;
|
|
4412
|
+
left: auto;
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4389
4415
|
.docx-toolbar__more-section + .docx-toolbar__more-section {
|
|
4390
4416
|
margin-top: 4px;
|
|
4391
4417
|
padding-top: 4px;
|
|
@@ -4509,8 +4535,10 @@ a.docx-hyperlink:focus-visible {
|
|
|
4509
4535
|
user-select: none;
|
|
4510
4536
|
}
|
|
4511
4537
|
|
|
4512
|
-
.docx-toolbar__picker[aria-disabled='true']
|
|
4538
|
+
.docx-toolbar__picker[aria-disabled='true'],
|
|
4539
|
+
.docx-toolbar__picker:disabled {
|
|
4513
4540
|
opacity: 0.5;
|
|
4541
|
+
cursor: default;
|
|
4514
4542
|
}
|
|
4515
4543
|
|
|
4516
4544
|
.docx-toolbar__picker-caret {
|
|
@@ -5486,17 +5514,15 @@ a.docx-hyperlink:focus-visible {
|
|
|
5486
5514
|
Loading surface (`DocxEditor.Loading`)
|
|
5487
5515
|
--------------------------------------------------------------------------- */
|
|
5488
5516
|
|
|
5489
|
-
/* Fills whatever box the host places it in
|
|
5490
|
-
|
|
5517
|
+
/* Fills whatever box the host places it in. The default child uses the real paginated
|
|
5518
|
+
surface and page classes, so its position and paper styling match a loaded document. */
|
|
5491
5519
|
.docx-editor__loading {
|
|
5492
|
-
display:
|
|
5493
|
-
|
|
5494
|
-
align-items: center;
|
|
5495
|
-
justify-content: center;
|
|
5496
|
-
gap: 16px;
|
|
5520
|
+
display: block;
|
|
5521
|
+
box-sizing: border-box;
|
|
5497
5522
|
width: 100%;
|
|
5498
5523
|
height: 100%;
|
|
5499
5524
|
min-height: 0;
|
|
5525
|
+
overflow: auto;
|
|
5500
5526
|
color: var(--doc-text-muted);
|
|
5501
5527
|
font-size: 14px;
|
|
5502
5528
|
}
|
|
@@ -5530,11 +5556,38 @@ a.docx-hyperlink:focus-visible {
|
|
|
5530
5556
|
}
|
|
5531
5557
|
}
|
|
5532
5558
|
|
|
5533
|
-
/* The
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5559
|
+
/* The loading sheet uses the same surface tree as a painted document:
|
|
5560
|
+
`.docx-paginated-surface > .docx-pages > .docx-page`. React and Vue apply the layout
|
|
5561
|
+
page size and zoom to the surface. The shared surface margin and page rule then control
|
|
5562
|
+
centring, paper colour, and shadow without a second approximation. */
|
|
5563
|
+
.docx-editor__loading-surface > .docx-pages {
|
|
5564
|
+
position: relative;
|
|
5565
|
+
width: 100%;
|
|
5566
|
+
height: 100%;
|
|
5567
|
+
}
|
|
5568
|
+
|
|
5569
|
+
.docx-editor__loading-page {
|
|
5570
|
+
position: absolute;
|
|
5571
|
+
inset: 0;
|
|
5572
|
+
box-sizing: border-box;
|
|
5573
|
+
width: 100%;
|
|
5574
|
+
height: 100%;
|
|
5575
|
+
overflow: hidden;
|
|
5576
|
+
}
|
|
5577
|
+
|
|
5578
|
+
.docx-editor__loading-page-status {
|
|
5579
|
+
position: absolute;
|
|
5580
|
+
top: 50%;
|
|
5581
|
+
right: 0;
|
|
5582
|
+
left: 0;
|
|
5583
|
+
display: flex;
|
|
5584
|
+
align-items: center;
|
|
5585
|
+
justify-content: center;
|
|
5586
|
+
transform: translateY(-50%);
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
/* `display` and `box-sizing` are explicit rather than inherited from Tailwind's
|
|
5590
|
+
preflight. The loading part can sit outside the host's utility scope. */
|
|
5538
5591
|
.docx-editor__loading-spinner {
|
|
5539
5592
|
display: block;
|
|
5540
5593
|
box-sizing: border-box;
|
|
@@ -5555,7 +5608,7 @@ a.docx-hyperlink:focus-visible {
|
|
|
5555
5608
|
}
|
|
5556
5609
|
}
|
|
5557
5610
|
|
|
5558
|
-
/* Respect a reduced-motion preference
|
|
5611
|
+
/* Respect a reduced-motion preference by keeping the indicator still. */
|
|
5559
5612
|
@media (prefers-reduced-motion: reduce) {
|
|
5560
5613
|
.docx-editor__loading-spinner {
|
|
5561
5614
|
animation: none;
|
|
@@ -5709,6 +5762,63 @@ a.docx-hyperlink:focus-visible {
|
|
|
5709
5762
|
line-height: 1.35;
|
|
5710
5763
|
}
|
|
5711
5764
|
|
|
5765
|
+
/* Compact linear-math editor for one selected equation atom. */
|
|
5766
|
+
.docx-equation-popup {
|
|
5767
|
+
position: absolute;
|
|
5768
|
+
z-index: var(--doc-z-overlay);
|
|
5769
|
+
display: flex;
|
|
5770
|
+
flex-direction: column;
|
|
5771
|
+
align-items: stretch;
|
|
5772
|
+
gap: 6px;
|
|
5773
|
+
width: min(340px, calc(100% - 16px));
|
|
5774
|
+
margin-top: 4px;
|
|
5775
|
+
padding: 6px 8px;
|
|
5776
|
+
border: 1px solid var(--doc-border);
|
|
5777
|
+
border-radius: 8px;
|
|
5778
|
+
background: var(--doc-surface);
|
|
5779
|
+
color: var(--doc-text);
|
|
5780
|
+
box-shadow: 0 2px 10px var(--doc-shadow);
|
|
5781
|
+
font-size: 13px;
|
|
5782
|
+
}
|
|
5783
|
+
|
|
5784
|
+
.docx-equation-popup__input {
|
|
5785
|
+
width: 100%;
|
|
5786
|
+
padding: 4px 6px;
|
|
5787
|
+
border: 1px solid var(--doc-border-input);
|
|
5788
|
+
border-radius: 4px;
|
|
5789
|
+
background: var(--doc-bg-input);
|
|
5790
|
+
color: var(--doc-text);
|
|
5791
|
+
font: inherit;
|
|
5792
|
+
}
|
|
5793
|
+
|
|
5794
|
+
.docx-equation-popup__input:focus-visible {
|
|
5795
|
+
outline: 2px solid var(--doc-focus-ring);
|
|
5796
|
+
outline-offset: -1px;
|
|
5797
|
+
}
|
|
5798
|
+
|
|
5799
|
+
.docx-equation-popup__error {
|
|
5800
|
+
color: var(--doc-error);
|
|
5801
|
+
font-size: 12px;
|
|
5802
|
+
line-height: 1.35;
|
|
5803
|
+
}
|
|
5804
|
+
|
|
5805
|
+
.docx-equation-popup__actions {
|
|
5806
|
+
display: flex;
|
|
5807
|
+
justify-content: flex-end;
|
|
5808
|
+
gap: 6px;
|
|
5809
|
+
}
|
|
5810
|
+
|
|
5811
|
+
.docx-equation-popup__apply,
|
|
5812
|
+
.docx-equation-popup__delete {
|
|
5813
|
+
padding: 4px 10px;
|
|
5814
|
+
border: 1px solid var(--doc-border-input);
|
|
5815
|
+
border-radius: 4px;
|
|
5816
|
+
background: var(--doc-bg-input);
|
|
5817
|
+
color: var(--doc-text);
|
|
5818
|
+
font: inherit;
|
|
5819
|
+
cursor: pointer;
|
|
5820
|
+
}
|
|
5821
|
+
|
|
5712
5822
|
/* Room for the review pane. The page centres inside the scroller's padding box, so
|
|
5713
5823
|
* reserving the rail's width here shifts the sheet left by half of it and the document and
|
|
5714
5824
|
* its cards read as one centred pair.
|
package/dist/editor.d.cts
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
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-
|
|
2
|
-
import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-
|
|
3
|
-
export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-
|
|
4
|
-
import { g as DocumentThemeColorEntry } from './tree-session-5UWKAQ41.cjs';
|
|
5
|
-
export { a as TreeApplyResult, c as TreeDocxSessionView } from './tree-session-5UWKAQ41.cjs';
|
|
6
|
-
import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-CXaGlcUa.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-CXaGlcUa.cjs';
|
|
8
|
-
import { L as LayoutShapingOptions } from './shaped-measurer-CDcHzjhf.cjs';
|
|
9
|
-
import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-QsE1xXyT.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-QsE1xXyT.cjs';
|
|
11
|
-
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-CD7slqvl.cjs';
|
|
12
|
-
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.cjs';
|
|
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-DQOiwOuE.cjs';
|
|
2
|
+
import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-B0-sCtw-.cjs';
|
|
3
|
+
export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-B0-sCtw-.cjs';
|
|
13
4
|
import { ColorValue } from './contracts/types.cjs';
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
22
|
-
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
25
|
-
|
|
5
|
+
export { ParagraphFlags, ParagraphTabStop } from './contracts/types.cjs';
|
|
6
|
+
export { R as ReviewModelInput } from './review-items-DpsqTHio.cjs';
|
|
7
|
+
import { c as TreeDocxSessionView, g as DocumentThemeColorEntry } from './tree-session-D945D43B.cjs';
|
|
8
|
+
export { a as TreeApplyResult } from './tree-session-D945D43B.cjs';
|
|
9
|
+
import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-CojjwMmF.cjs';
|
|
10
|
+
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-CojjwMmF.cjs';
|
|
11
|
+
import { L as LayoutShapingOptions } from './shaped-measurer-CYSK20E2.cjs';
|
|
12
|
+
import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-DGPSeLI0.cjs';
|
|
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 DEFAULT_TABLE_CHROME_DRAFT, q as DocxEditorConfig, E as EMU_PER_POINT, r as EquationActivation, s as EquationChromeHandlers, t as EquationOps, F as FinalizedImageOverlayInteraction, u as FontConfigurationBase, v as FontConfigurationFragment, w as FontLoadFailure, x as FontLoadFailureReason, y as FontMeasurementState, z as FontResolutionRequest, B as FontResolver, G as FontUrlSource, H as HyperlinkActivation, I as HyperlinkChromeHandlers, J as HyperlinkOps, K as IMAGE_OVERLAY_NUDGE_PT, L as IMAGE_OVERLAY_NUDGE_SHIFT_PT, M as ImageInteractionSession, N as ImageOverlayScrollPort, Q as ImageResizeHandle, R as ImageResizeResult, S as LoadFontsRequest, U as LoadFontsResult, V as MAX_RESOLVER_FAMILIES, W as OverlayFrameRect, X as PaginatedSurfaceState, Y as ParagraphPropertyEdit, Z as RunTableChromeCommandResult, _ as SectionAnchor, $ as SelectedDrawingOverlayTarget, a0 as SurfaceEquation, a1 as SurfaceFormatting, a2 as SurfaceHyperlink, a3 as SurfaceNavigation, a4 as SurfaceOverlayCoordinates, a5 as SurfaceParagraphFormat, a6 as TABLE_BORDER_STYLE_OPTIONS, a7 as TABLE_BORDER_TARGET_OPTIONS, a8 as TABLE_BORDER_WIDTH_OPTIONS, a9 as TABLE_CHROME_SLOT_IDS, aa as TableBorderStyleOption, ab as TableBorderTargetOption, ac as TableBorderTargetValue, ad as TableBorderWidthOption, ae as TableChromeDraft, af as TableChromePick, ag as TableChromeSlotId, ah as TableInteractionLabelKey, ai as ToolbarCommandState, aj as WORD_DEFAULT_FONT, ak as applyTableChromePick, al as blankDocumentBytes, am as canExecuteImageCommand, an as captureImageMutationPreconditions, ao as chromeControlCount, ap as chromeMenuSlots, aq as chromeProbeForSlot, ar as chromeSlotId, as as commandForSlot, at as commandForSlotValue, au as commandForTableChromeSlotValue, av as composeFontConfiguration, aw as computeImageResizeResult, ax as computeMovedImagePosition, ay as computeResizedImageExtentEmu, az as createDocxEditor, aA as createFontSource, aB as createImageOverlayScrollPort, aC as cssPixelsToLayoutPoints, aD as defaultChromeGroups, aE as defaultTableLabel, aF as emuToOverlayPoints, aG as equationAtPosition, aH as executeImageCommand, aI as finalizeImageOverlayInteraction, aJ as formattingBarChromeGroups, aK as isStaleImageInteractionCommit, aL as isTableChromeSlot, aM as layoutPointsToCssPixels, aN as loadFonts, aO as overlayFrameToSheetCssPixels, aP as pointsToEmu, aQ as probeTableChromeCommand, aR as resizePreservesAspect, aS as runSave, aT as runTableChromeCommand, aU as runTableCommand, aV as runToolbarCommand, aW as selectedDrawingOverlayTargetOf, aX as selectedImageStateOf, aY as surfacePaintScale, aZ as tableChromeIconPaths, a_ as tableChromeLabelKeyForTarget, a$ as tableChromeToolbarState, b0 as tableChromeVisible, b1 as tableCommandToolbarState, b2 as toolbarCommandState, b3 as toolbarCommandStates } from './index-DGPSeLI0.cjs';
|
|
14
|
+
import { O as OoxmlPart } from './ooxml-package-CdEy9ufK.cjs';
|
|
15
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-UuZOcOp7.cjs';
|
|
16
|
+
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.cjs';
|
|
17
|
+
import { S as SemanticLayout } from './semantic-records-C3Z76KeN.cjs';
|
|
18
|
+
export { T as TextMeasurer } from './semantic-records-C3Z76KeN.cjs';
|
|
19
|
+
export { S as SectionProperties } from './semantic-cell-selection-DJPjBWzf.cjs';
|
|
20
|
+
export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-BjOcDB06.cjs';
|
|
21
|
+
export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-Ur7pAINj.cjs';
|
|
22
|
+
import './custom-node-writes-7ERv0f_X.cjs';
|
|
23
|
+
import './hf-references-Dvk6De4Q.cjs';
|
|
24
|
+
import './note-nodes-DL-Au22P.cjs';
|
|
25
|
+
import './tree-store-C6vc8E_2.cjs';
|
|
26
26
|
import 'prosemirror-model';
|
|
27
27
|
import './contracts/document.cjs';
|
|
28
|
-
import './revision-projection-
|
|
29
|
-
import './
|
|
28
|
+
import './revision-projection-Cc4wz30g.cjs';
|
|
29
|
+
import './note-properties-CQlxjic_.cjs';
|
|
30
|
+
import './omml-equation-BD-LsmWE.cjs';
|
|
30
31
|
|
|
31
32
|
interface LayoutShapingInstrumentation {
|
|
32
33
|
readonly onFontByteCopy?: () => void;
|
|
@@ -59,6 +60,46 @@ declare function disposeLayoutShaping(shaping: LayoutShapingOptions): void;
|
|
|
59
60
|
*/
|
|
60
61
|
declare const LOADING_SNAPSHOT: EditorSnapshot;
|
|
61
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Mount a paginated surface over DOCX bytes.
|
|
65
|
+
*
|
|
66
|
+
* Returns a typed rejection rather than throwing: a failure here is a property of the file,
|
|
67
|
+
* and a host must be able to tell "not a package" from "no body" without parsing an error
|
|
68
|
+
* message.
|
|
69
|
+
*/
|
|
70
|
+
declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array, options?: PaginatedSurfaceOptions): OpenPaginatedResult;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The story a NODE lives in, which is what a write about that node must target.
|
|
74
|
+
*
|
|
75
|
+
* The open scope is a near-enough proxy most of the time and wrong exactly when it matters:
|
|
76
|
+
* nothing binds a node id to it, so a verb invoked on a control, a chip or a paragraph the
|
|
77
|
+
* reader is not currently standing in wrote against the wrong store — or, where the id came
|
|
78
|
+
* from a body-only index, against body content the reader could not see.
|
|
79
|
+
*
|
|
80
|
+
* Answered from the id's own PART NAME. Node ids are minted `${partName}#${path}`, so the
|
|
81
|
+
* question is constant-time and needs no store to be opened. That last part is load-bearing:
|
|
82
|
+
* asking each scope for its paragraph list instead OPENS a story store, the store cap is 64,
|
|
83
|
+
* and a store whose part is still in the package is never evicted — on a many-section
|
|
84
|
+
* document that left later headers unopenable for the rest of the session.
|
|
85
|
+
*
|
|
86
|
+
* Falls back to `fallback` for an id no story claims, so the store refuses it rather than this.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* The part a NODE lives in, WITHOUT opening a story store.
|
|
90
|
+
*
|
|
91
|
+
* `session.partFor(scope)` resolves a scope by opening that story's store, and an open store is
|
|
92
|
+
* retained for as long as its part is in the package. The cap is 64. So routing a pure READ —
|
|
93
|
+
* "is this control locked", "what is its tab index" — through `partFor` spent a permanent slot
|
|
94
|
+
* per part touched, and an id naming no node at all still spent one, because the part name is
|
|
95
|
+
* matched from the id's prefix before anything is looked up. Sixty-four such reads and no
|
|
96
|
+
* further header could be opened for the rest of the session, silently.
|
|
97
|
+
*
|
|
98
|
+
* Read straight from the live package instead. Ids carry the canonical part name, so this is a
|
|
99
|
+
* map lookup.
|
|
100
|
+
*/
|
|
101
|
+
declare function partOfNodeId(session: Pick<TreeDocxSessionView, 'currentPackage' | 'part'>, nodeId: string | undefined): OoxmlPart | null;
|
|
102
|
+
|
|
62
103
|
/** The engine paints at 96 px per inch (twips / 15, 1440 twips per inch). */
|
|
63
104
|
declare const PX_PER_INCH = 96;
|
|
64
105
|
/** Painted pixels per centimetre, derived from {@link PX_PER_INCH}. */
|
|
@@ -149,15 +190,6 @@ declare function snapTwips(value: number, unit: RulerUnit, precise: boolean): nu
|
|
|
149
190
|
*/
|
|
150
191
|
declare function dragIndent(handle: RulerIndentHandle, positionTwips: number, indent: RulerIndent, page: RulerPageMetrics, options?: RulerDragOptions): RulerIndent;
|
|
151
192
|
|
|
152
|
-
/**
|
|
153
|
-
* Mount a paginated surface over DOCX bytes.
|
|
154
|
-
*
|
|
155
|
-
* Returns a typed rejection rather than throwing: a failure here is a property of the file,
|
|
156
|
-
* and a host must be able to tell "not a package" from "no body" without parsing an error
|
|
157
|
-
* message.
|
|
158
|
-
*/
|
|
159
|
-
declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array, options?: PaginatedSurfaceOptions): OpenPaginatedResult;
|
|
160
|
-
|
|
161
193
|
/**
|
|
162
194
|
* Stable value identity for a command, including nested payloads.
|
|
163
195
|
*
|
|
@@ -324,4 +356,4 @@ declare function validateSetImagePositionCommand(command: {
|
|
|
324
356
|
readonly relativeToV?: string;
|
|
325
357
|
}, mode: 'frame' | 'simple'): boolean;
|
|
326
358
|
|
|
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 };
|
|
359
|
+
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, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, createBrowserAutomationHost, createLayoutShaping, disposeLayoutShaping, dragIndent, editorCommandKey, generateRulerTicks, handlePosition, lowerColorValueForBorder, lowerColorValueForFill, mountPaginatedSurface, partOfNodeId, positionInputFromPropertiesCommand, propertiesCommandHasPositionFields, resolveColorValueToCss, resolveThemeColorHex, resolveZoomMode, rulerPageBox, sameZoomMode, snapTwips, surfaceExtent, tableCommandState, toEditorFontError, validateDrawingPositionInput, validateSetImagePositionCommand, validateThemeModifier };
|
package/dist/editor.d.ts
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
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-
|
|
2
|
-
import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-
|
|
3
|
-
export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-
|
|
4
|
-
import { g as DocumentThemeColorEntry } from './tree-session--6LDTNjR.js';
|
|
5
|
-
export { a as TreeApplyResult, c as TreeDocxSessionView } from './tree-session--6LDTNjR.js';
|
|
6
|
-
import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-C--WWCBA.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-C--WWCBA.js';
|
|
8
|
-
import { L as LayoutShapingOptions } from './shaped-measurer-CakZ7g1s.js';
|
|
9
|
-
import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-DW0TsrYl.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-DW0TsrYl.js';
|
|
11
|
-
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-DsbfgBwA.js';
|
|
12
|
-
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.js';
|
|
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-eZqD_-vC.js';
|
|
2
|
+
import { i as TreeDocColorValue, d as DrawingPositionInput } from './tree-op-types-XMVsJSpe.js';
|
|
3
|
+
export { j as IMAGE_WRAP_TARGETS, b as ImageWrapTarget } from './tree-op-types-XMVsJSpe.js';
|
|
13
4
|
import { ColorValue } from './contracts/types.js';
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
import './
|
|
21
|
-
import './
|
|
22
|
-
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
25
|
-
|
|
5
|
+
export { ParagraphFlags, ParagraphTabStop } from './contracts/types.js';
|
|
6
|
+
export { R as ReviewModelInput } from './review-items-D5SPFtsO.js';
|
|
7
|
+
import { c as TreeDocxSessionView, g as DocumentThemeColorEntry } from './tree-session-DBJgmdmc.js';
|
|
8
|
+
export { a as TreeApplyResult } from './tree-session-DBJgmdmc.js';
|
|
9
|
+
import { F as FontConfiguration, E as EditorFontError, a as EditorSnapshot, b as EditorCommand, C as CanResult, Z as ZoomMode } from './editor-PUlv5Pp7.js';
|
|
10
|
+
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-PUlv5Pp7.js';
|
|
11
|
+
import { L as LayoutShapingOptions } from './shaped-measurer-CwlTPDJO.js';
|
|
12
|
+
import { P as PaginatedSurfaceOptions, O as OpenPaginatedResult, a as PaginatedSurface, T as TableCommandPlan, D as DocxEditorInstance } from './index-oN-v8DQ5.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 DEFAULT_TABLE_CHROME_DRAFT, q as DocxEditorConfig, E as EMU_PER_POINT, r as EquationActivation, s as EquationChromeHandlers, t as EquationOps, F as FinalizedImageOverlayInteraction, u as FontConfigurationBase, v as FontConfigurationFragment, w as FontLoadFailure, x as FontLoadFailureReason, y as FontMeasurementState, z as FontResolutionRequest, B as FontResolver, G as FontUrlSource, H as HyperlinkActivation, I as HyperlinkChromeHandlers, J as HyperlinkOps, K as IMAGE_OVERLAY_NUDGE_PT, L as IMAGE_OVERLAY_NUDGE_SHIFT_PT, M as ImageInteractionSession, N as ImageOverlayScrollPort, Q as ImageResizeHandle, R as ImageResizeResult, S as LoadFontsRequest, U as LoadFontsResult, V as MAX_RESOLVER_FAMILIES, W as OverlayFrameRect, X as PaginatedSurfaceState, Y as ParagraphPropertyEdit, Z as RunTableChromeCommandResult, _ as SectionAnchor, $ as SelectedDrawingOverlayTarget, a0 as SurfaceEquation, a1 as SurfaceFormatting, a2 as SurfaceHyperlink, a3 as SurfaceNavigation, a4 as SurfaceOverlayCoordinates, a5 as SurfaceParagraphFormat, a6 as TABLE_BORDER_STYLE_OPTIONS, a7 as TABLE_BORDER_TARGET_OPTIONS, a8 as TABLE_BORDER_WIDTH_OPTIONS, a9 as TABLE_CHROME_SLOT_IDS, aa as TableBorderStyleOption, ab as TableBorderTargetOption, ac as TableBorderTargetValue, ad as TableBorderWidthOption, ae as TableChromeDraft, af as TableChromePick, ag as TableChromeSlotId, ah as TableInteractionLabelKey, ai as ToolbarCommandState, aj as WORD_DEFAULT_FONT, ak as applyTableChromePick, al as blankDocumentBytes, am as canExecuteImageCommand, an as captureImageMutationPreconditions, ao as chromeControlCount, ap as chromeMenuSlots, aq as chromeProbeForSlot, ar as chromeSlotId, as as commandForSlot, at as commandForSlotValue, au as commandForTableChromeSlotValue, av as composeFontConfiguration, aw as computeImageResizeResult, ax as computeMovedImagePosition, ay as computeResizedImageExtentEmu, az as createDocxEditor, aA as createFontSource, aB as createImageOverlayScrollPort, aC as cssPixelsToLayoutPoints, aD as defaultChromeGroups, aE as defaultTableLabel, aF as emuToOverlayPoints, aG as equationAtPosition, aH as executeImageCommand, aI as finalizeImageOverlayInteraction, aJ as formattingBarChromeGroups, aK as isStaleImageInteractionCommit, aL as isTableChromeSlot, aM as layoutPointsToCssPixels, aN as loadFonts, aO as overlayFrameToSheetCssPixels, aP as pointsToEmu, aQ as probeTableChromeCommand, aR as resizePreservesAspect, aS as runSave, aT as runTableChromeCommand, aU as runTableCommand, aV as runToolbarCommand, aW as selectedDrawingOverlayTargetOf, aX as selectedImageStateOf, aY as surfacePaintScale, aZ as tableChromeIconPaths, a_ as tableChromeLabelKeyForTarget, a$ as tableChromeToolbarState, b0 as tableChromeVisible, b1 as tableCommandToolbarState, b2 as toolbarCommandState, b3 as toolbarCommandStates } from './index-oN-v8DQ5.js';
|
|
14
|
+
import { O as OoxmlPart } from './ooxml-package-CdEy9ufK.js';
|
|
15
|
+
import { A as AutomationCapabilities, a as AutomationHost } from './protocol-C7ahrdUx.js';
|
|
16
|
+
export { CollectReviewItems, EditorModule, EditorModuleRegistry, ReviewModuleContribution, resolveEditorModules } from './contracts/modules.js';
|
|
17
|
+
import { S as SemanticLayout } from './semantic-records-Cc1MJrhM.js';
|
|
18
|
+
export { T as TextMeasurer } from './semantic-records-Cc1MJrhM.js';
|
|
19
|
+
export { S as SectionProperties } from './semantic-cell-selection-BWhVAk5B.js';
|
|
20
|
+
export { N as NavigationCommand, S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-Cca1-X_a.js';
|
|
21
|
+
export { F as FieldShadingMode, R as ReviewAuthorInfo, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles } from './semantic-paint-CufpIQFw.js';
|
|
22
|
+
import './custom-node-writes-QyVZdTUA.js';
|
|
23
|
+
import './hf-references-z5Y4N1ab.js';
|
|
24
|
+
import './note-nodes-BNCANoGN.js';
|
|
25
|
+
import './tree-store-ClA-qng4.js';
|
|
26
26
|
import 'prosemirror-model';
|
|
27
27
|
import './contracts/document.js';
|
|
28
|
-
import './revision-projection-
|
|
29
|
-
import './
|
|
28
|
+
import './revision-projection-CILpvv4M.js';
|
|
29
|
+
import './note-properties-jvnw_DGG.js';
|
|
30
|
+
import './omml-equation-Dd3mBep-.js';
|
|
30
31
|
|
|
31
32
|
interface LayoutShapingInstrumentation {
|
|
32
33
|
readonly onFontByteCopy?: () => void;
|
|
@@ -59,6 +60,46 @@ declare function disposeLayoutShaping(shaping: LayoutShapingOptions): void;
|
|
|
59
60
|
*/
|
|
60
61
|
declare const LOADING_SNAPSHOT: EditorSnapshot;
|
|
61
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Mount a paginated surface over DOCX bytes.
|
|
65
|
+
*
|
|
66
|
+
* Returns a typed rejection rather than throwing: a failure here is a property of the file,
|
|
67
|
+
* and a host must be able to tell "not a package" from "no body" without parsing an error
|
|
68
|
+
* message.
|
|
69
|
+
*/
|
|
70
|
+
declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array, options?: PaginatedSurfaceOptions): OpenPaginatedResult;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The story a NODE lives in, which is what a write about that node must target.
|
|
74
|
+
*
|
|
75
|
+
* The open scope is a near-enough proxy most of the time and wrong exactly when it matters:
|
|
76
|
+
* nothing binds a node id to it, so a verb invoked on a control, a chip or a paragraph the
|
|
77
|
+
* reader is not currently standing in wrote against the wrong store — or, where the id came
|
|
78
|
+
* from a body-only index, against body content the reader could not see.
|
|
79
|
+
*
|
|
80
|
+
* Answered from the id's own PART NAME. Node ids are minted `${partName}#${path}`, so the
|
|
81
|
+
* question is constant-time and needs no store to be opened. That last part is load-bearing:
|
|
82
|
+
* asking each scope for its paragraph list instead OPENS a story store, the store cap is 64,
|
|
83
|
+
* and a store whose part is still in the package is never evicted — on a many-section
|
|
84
|
+
* document that left later headers unopenable for the rest of the session.
|
|
85
|
+
*
|
|
86
|
+
* Falls back to `fallback` for an id no story claims, so the store refuses it rather than this.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* The part a NODE lives in, WITHOUT opening a story store.
|
|
90
|
+
*
|
|
91
|
+
* `session.partFor(scope)` resolves a scope by opening that story's store, and an open store is
|
|
92
|
+
* retained for as long as its part is in the package. The cap is 64. So routing a pure READ —
|
|
93
|
+
* "is this control locked", "what is its tab index" — through `partFor` spent a permanent slot
|
|
94
|
+
* per part touched, and an id naming no node at all still spent one, because the part name is
|
|
95
|
+
* matched from the id's prefix before anything is looked up. Sixty-four such reads and no
|
|
96
|
+
* further header could be opened for the rest of the session, silently.
|
|
97
|
+
*
|
|
98
|
+
* Read straight from the live package instead. Ids carry the canonical part name, so this is a
|
|
99
|
+
* map lookup.
|
|
100
|
+
*/
|
|
101
|
+
declare function partOfNodeId(session: Pick<TreeDocxSessionView, 'currentPackage' | 'part'>, nodeId: string | undefined): OoxmlPart | null;
|
|
102
|
+
|
|
62
103
|
/** The engine paints at 96 px per inch (twips / 15, 1440 twips per inch). */
|
|
63
104
|
declare const PX_PER_INCH = 96;
|
|
64
105
|
/** Painted pixels per centimetre, derived from {@link PX_PER_INCH}. */
|
|
@@ -149,15 +190,6 @@ declare function snapTwips(value: number, unit: RulerUnit, precise: boolean): nu
|
|
|
149
190
|
*/
|
|
150
191
|
declare function dragIndent(handle: RulerIndentHandle, positionTwips: number, indent: RulerIndent, page: RulerPageMetrics, options?: RulerDragOptions): RulerIndent;
|
|
151
192
|
|
|
152
|
-
/**
|
|
153
|
-
* Mount a paginated surface over DOCX bytes.
|
|
154
|
-
*
|
|
155
|
-
* Returns a typed rejection rather than throwing: a failure here is a property of the file,
|
|
156
|
-
* and a host must be able to tell "not a package" from "no body" without parsing an error
|
|
157
|
-
* message.
|
|
158
|
-
*/
|
|
159
|
-
declare function mountPaginatedSurface(container: HTMLElement, bytes: Uint8Array, options?: PaginatedSurfaceOptions): OpenPaginatedResult;
|
|
160
|
-
|
|
161
193
|
/**
|
|
162
194
|
* Stable value identity for a command, including nested payloads.
|
|
163
195
|
*
|
|
@@ -324,4 +356,4 @@ declare function validateSetImagePositionCommand(command: {
|
|
|
324
356
|
readonly relativeToV?: string;
|
|
325
357
|
}, mode: 'frame' | 'simple'): boolean;
|
|
326
358
|
|
|
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 };
|
|
359
|
+
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, TreeDocxSessionView, ZOOM_MAX, ZOOM_MIN, applyThemeShade, applyThemeTint, createBrowserAutomationHost, createLayoutShaping, disposeLayoutShaping, dragIndent, editorCommandKey, generateRulerTicks, handlePosition, lowerColorValueForBorder, lowerColorValueForFill, mountPaginatedSurface, partOfNodeId, 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{Ia as AUTO_ZOOM_MODE,Na as BROWSER_AUTOMATION_CAPABILITIES,va as CHROME_GROUPS,za as CHROME_MENUS,Ca as CHROME_UNAVAILABLE_KEY,Y as DEFAULT_TABLE_CHROME_DRAFT,Q as EMU_PER_POINT,Ja as FIT_WIDTH_ZOOM_MODE,O as IMAGE_OVERLAY_NUDGE_PT,P as IMAGE_OVERLAY_NUDGE_SHIFT_PT,d as LOADING_SNAPSHOT,e as MAX_RESOLVER_FAMILIES,m as PX_PER_CM,l as PX_PER_INCH,s as SNAP_TWIPS_CM,r 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,q as TWIPS_PER_CM,p as TWIPS_PER_INCH,f as WORD_DEFAULT_FONT,Ha as ZOOM_MAX,Ga as ZOOM_MIN,ea as applyTableChromePick,y as applyThemeShade,x as applyThemeTint,h as blankDocumentBytes,M as canExecuteImageCommand,L as captureImageMutationPreconditions,Ba as chromeControlCount,Aa as chromeMenuSlots,ia as chromeProbeForSlot,wa as chromeSlotId,ja as commandForSlot,la as commandForSlotValue,ka as commandForTableChromeSlotValue,g as composeFontConfiguration,Ua as computeImageResizeResult,V as computeMovedImagePosition,U as computeResizedImageExtentEmu,Oa as createBrowserAutomationHost,Ma as createDocxEditor,k as createFontSource,Va as createImageOverlayScrollPort,b as createLayoutShaping,I as cropPercentFromCropPermille,G as cropPercentFromPermille,D as cropPercentFromSourceCrop,H as cropPermilleFromCropPercent,F as cropPermilleFromPercent,Ra as cssPixelsToLayoutPoints,xa as defaultChromeGroups,_ as defaultTableLabel,c as disposeLayoutShaping,v as dragIndent,ua as editorCommandKey,T as emuToOverlayPoints,Ea as equationAtPosition,N as executeImageCommand,Wa as finalizeImageOverlayInteraction,ya as formattingBarChromeGroups,n as generateRulerTicks,t as handlePosition,W as isStaleImageInteractionCommit,$ as isTableChromeSlot,Qa as layoutPointsToCssPixels,j as loadFonts,A as lowerColorValueForBorder,B as lowerColorValueForFill,Fa as mountPaginatedSurface,Sa as overlayFrameToSheetCssPixels,i as partOfNodeId,S as pointsToEmu,fa as probeTableChromeCommand,Ta as resizePreservesAspect,C as resolveColorValueToCss,z as resolveThemeColorHex,Ka as resolveZoomMode,o as rulerPageBox,ra as runSave,pa as runTableChromeCommand,ta as runTableCommand,qa as runToolbarCommand,La as sameZoomMode,R as selectedDrawingOverlayTargetOf,K as selectedImageStateOf,u as snapTwips,E as sourceCropFromCropPercent,Da as surfaceExtent,Pa as surfacePaintScale,ha as tableChromeIconPaths,ga as tableChromeLabelKeyForTarget,ma as tableChromeToolbarState,aa as tableChromeVisible,X as tableCommandState,sa as tableCommandToolbarState,a as toEditorFontError,na as toolbarCommandState,oa as toolbarCommandStates,J as validateImageCropPercent,w as validateThemeModifier}from'./chunk-DTQPINIM.js';import'./chunk-HHFMXG25.js';import'./chunk-Q66ZJFRE.js';import'./chunk-WU7PUTVA.js';import'./chunk-A2JIBG75.js';import'./chunk-KBCC66CI.js';import'./chunk-5VC5HGJA.js';export{m as DEFAULT_IMAGE_RESOURCE_LIMITS,xf as DRAWING_REL_FROM_H,yf as DRAWING_REL_FROM_V,Na as IMAGE_WRAP_TARGETS,Af as positionInputFromPropertiesCommand,zf as propertiesCommandHasPositionFields,n as resolveImageResourceLimits,eb as resolveSvgIntrinsicSize,ab as sniffImageMime,wf as validateDrawingPositionInput,fb as validateRasterHeader,Bf as validateSetImagePositionCommand}from'./chunk-VUJGPCPU.js';import'./chunk-PSZH2VXP.js';export{a as resolveEditorModules}from'./chunk-GQQOL4PV.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
|
|
1
|
+
import { O as OoxmlPart, a as OoxmlNode, b as OoxmlElement, c as OoxmlPackage } from './ooxml-package-CdEy9ufK.cjs';
|
|
3
2
|
|
|
4
3
|
/** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
|
|
5
4
|
type HeaderFooterVariant = 'default' | 'first' | 'even';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
|
|
1
|
+
import { O as OoxmlPart, a as OoxmlNode, b as OoxmlElement, c as OoxmlPackage } from './ooxml-package-CdEy9ufK.js';
|
|
3
2
|
|
|
4
3
|
/** `w:headerReference w:type` vocabulary (ECMA-376 §17.10.5): default, first page, even pages. */
|
|
5
4
|
type HeaderFooterVariant = 'default' | 'first' | 'even';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DrawingProjection } from './tree-op-types-
|
|
2
|
-
import {
|
|
1
|
+
import { D as DrawingProjection } from './tree-op-types-B0-sCtw-.cjs';
|
|
2
|
+
import { c as OoxmlPackage } from './ooxml-package-CdEy9ufK.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The engine's trust-boundary caps: recursion depth, element counts, and the rest.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DrawingProjection } from './tree-op-types-
|
|
2
|
-
import {
|
|
1
|
+
import { D as DrawingProjection } from './tree-op-types-XMVsJSpe.js';
|
|
2
|
+
import { c as OoxmlPackage } from './ooxml-package-CdEy9ufK.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The engine's trust-boundary caps: recursion depth, element counts, and the rest.
|