@docx-editor.dev/core 2.0.1 → 2.1.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/README.md +32 -33
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +2 -2
- package/dist/automation.d.ts +2 -2
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +14 -8
- package/dist/binding.d.ts +14 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-2DTQDAN7.js +2 -0
- package/dist/chunk-3JKQE4QJ.cjs +2 -0
- package/dist/chunk-4WWEDTTE.js +2 -0
- package/dist/chunk-6WIIHJFY.js +1 -0
- package/dist/chunk-7VQ7YLW3.cjs +1 -0
- package/dist/chunk-BS554B6D.cjs +2 -0
- package/dist/chunk-BZK64YU3.cjs +10 -0
- package/dist/chunk-F2VQQW5R.cjs +12 -0
- package/dist/chunk-GQQOL4PV.js +1 -0
- package/dist/chunk-JQFDLZXQ.cjs +2 -0
- package/dist/chunk-O2WQY7IT.cjs +5 -0
- package/dist/chunk-PC76F2HR.cjs +1 -0
- package/dist/chunk-QRAUDDVY.js +2 -0
- package/dist/chunk-RKNH4ZFT.js +12 -0
- package/dist/chunk-STCITBJK.js +12 -0
- package/dist/chunk-TBBXCC7D.js +5 -0
- package/dist/chunk-TSXT537P.cjs +12 -0
- package/dist/chunk-Y7TA7TPF.js +10 -0
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.cts +30 -3
- package/dist/contracts/modules.d.ts +30 -3
- package/dist/contracts/modules.js +1 -1
- package/dist/{tree-package-store-DOKMtCnh.d.cts → custom-node-writes-YqISlSRl.d.cts} +181 -4
- package/dist/{tree-package-store-D5S7VKs5.d.ts → custom-node-writes-ttKuYd0M.d.ts} +181 -4
- package/dist/{editor-D0UDock4.d.cts → editor-B93PggnR.d.cts} +24 -5
- package/dist/{editor-C1QRi1v4.d.ts → editor-CFsSrxGR.d.ts} +24 -5
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1368 -279
- package/dist/editor.d.cts +19 -19
- package/dist/editor.d.ts +19 -19
- package/dist/editor.js +1 -1
- package/dist/{image-resources-BJnTpG66.d.ts → image-resources-C_YnqPhn.d.ts} +19 -11
- package/dist/{image-resources-BpIydXtU.d.cts → image-resources-DwpNnTg3.d.cts} +19 -11
- package/dist/{index-CrW-IxXt.d.cts → index-DQhDm4o0.d.cts} +34 -13
- package/dist/{index-ZqBEOrTV.d.ts → index-DTbKoFJL.d.ts} +34 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +869 -819
- package/dist/layout.d.ts +869 -819
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +4 -4
- package/dist/output.d.ts +4 -4
- package/dist/output.js +1 -1
- package/dist/{protocol-oxHaWmt4.d.ts → protocol-BWVA3Q1p.d.ts} +56 -2
- package/dist/{protocol-CAkOBBGE.d.cts → protocol-FAz_nPm_.d.cts} +56 -2
- package/dist/review-reads-CsoXSvUg.d.ts +401 -0
- package/dist/review-reads-qW0jvdF1.d.cts +401 -0
- package/dist/{review-support-DS8DYX2a.d.cts → review-support-D64Wu236.d.cts} +37 -5
- package/dist/{review-support-Fy3vdIea.d.ts → review-support-nsLXC9jf.d.ts} +37 -5
- package/dist/{semantic-cell-selection-DsmHmLJ5.d.ts → semantic-cell-selection-D_8RbPII.d.ts} +2 -2
- package/dist/{semantic-cell-selection-CZjBSmMv.d.cts → semantic-cell-selection-DwLB71fF.d.cts} +2 -2
- package/dist/{semantic-interaction-Dy-dCUFF.d.ts → semantic-interaction-CXH2wFqi.d.ts} +1 -1
- package/dist/{semantic-interaction-D-Dszxrn.d.cts → semantic-interaction-DqcEonqD.d.cts} +1 -1
- package/dist/{semantic-paint-drawings-BA3z9jl8.d.ts → semantic-paint-drawings-B5Wk2so5.d.ts} +1 -1
- package/dist/{semantic-paint-drawings-D7qbB0E2.d.cts → semantic-paint-drawings-x8g44lD_.d.cts} +1 -1
- package/dist/{semantic-records-CJR3BvHs.d.cts → semantic-records-COVFW5aS.d.cts} +77 -4
- package/dist/{semantic-records-CWodBJsz.d.ts → semantic-records-zTC0_1zi.d.ts} +77 -4
- package/dist/{shaped-measurer-CNIT_svZ.d.cts → shaped-measurer-AFnFxoot.d.cts} +1 -1
- package/dist/{shaped-measurer-B-TAtcQU.d.ts → shaped-measurer-CZXL-a6v.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +223 -317
- package/dist/store.d.ts +223 -317
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-CwOeiaQ8.d.ts → tree-op-types-DWLCllG7.d.ts} +80 -25
- package/dist/{tree-op-types-DMiW6nIH.d.cts → tree-op-types-UOXlRUqQ.d.cts} +80 -25
- package/dist/{tree-session-CiUel5Kz.d.ts → tree-session-BtVFXsF6.d.ts} +45 -7
- package/dist/{tree-session-D47_imvR.d.cts → tree-session-DxIOHUOD.d.cts} +45 -7
- package/dist/{tree-store-CxifqwIv.d.cts → tree-store-B1lEkdXc.d.cts} +1 -1
- package/dist/{tree-store-hLtjeyWE.d.ts → tree-store-BscFPB7x.d.ts} +1 -1
- package/package.json +10 -5
- package/dist/chunk-5KSCB2OZ.js +0 -2
- package/dist/chunk-BSC44TIT.js +0 -5
- package/dist/chunk-DLPL5DAG.js +0 -12
- package/dist/chunk-DOEIARE2.js +0 -2
- package/dist/chunk-G7YCQBZE.cjs +0 -5
- package/dist/chunk-HR7K3W6A.js +0 -1
- package/dist/chunk-HVAV2JSN.js +0 -11
- package/dist/chunk-MYH2HCUJ.cjs +0 -2
- package/dist/chunk-NSM75TN6.cjs +0 -1
- package/dist/chunk-PHDVKUWZ.js +0 -1
- package/dist/chunk-QADYGK5L.cjs +0 -12
- package/dist/chunk-RNBHTPW7.js +0 -10
- package/dist/chunk-UD2ZXLFI.cjs +0 -2
- package/dist/chunk-VYAVK2AH.cjs +0 -1
- package/dist/chunk-YUK46A2N.cjs +0 -11
- package/dist/chunk-ZMIX42J7.cjs +0 -10
- package/dist/chunk-ZT55Q52J.cjs +0 -2
- package/dist/chunk-ZUALAR4M.js +0 -2
- package/dist/note-properties-CnmCoory.d.cts +0 -68
- package/dist/note-properties-m75hmP70.d.ts +0 -68
package/dist/layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{fa as AUTO_PARAGRAPH_SPACING_PT,Hb as AUTO_PREFERRED_WIDTH,Jb as CELL_PAD,$ as COMPOUND_BORDER_MIN_GAP_PT,_ as COMPOUND_BORDER_MIN_STROKE_PT,gd as DEFAULT_CANVAS_FONT_STACK,Lb as DEFAULT_CELL_MARGINS,Q as DEFAULT_PAGE_GEOMETRY,Za as DEFAULT_REVISION_DISPLAY_MODE,cb as DEFAULT_RUN_STYLE,yc as DEFAULT_SECTION_PROPERTIES,Ca as DEFAULT_TAB_INTERVAL_PT,Ba as DEFAULT_TAB_INTERVAL_TWIPS,$b as DEFAULT_VERTICAL_WEIGHT,Sb as EMPTY_NUMBERING_INDEX,Ea as EMPTY_TAB_STOPS,p as GRAPHEME_SEGMENTER_LOCALE,g as HARFBUZZ_SHAPING_LIBRARY,j as HarfBuzzShapingError,ea as MAX_BORDER_SPACE_PT,da as MAX_BORDER_WIDTH_PT,xc as MAX_DOCUMENT_SECTIONS,Xc as MAX_EACH_PAGE_MARK_CANDIDATES,Pb as MAX_LVL_OVERRIDES,Na as MAX_LVL_TEXT_LENGTH,Ma as MAX_MARKER_TEXT_LENGTH,Jc as MAX_NOTES_LAID_OUT,Kc as MAX_NOTE_FRAGMENTS,Wc as MAX_NOTE_OVERFLOW_PAGES,Vc as MAX_NOTE_REFLOW_ATTEMPTS,Ob as MAX_NUMBERING_DEFINITIONS,ca as MAX_PARAGRAPH_SPACING_PT,ob as MAX_STYLE_BASED_ON_DEPTH,pb as MAX_STYLE_DEFINITIONS,zb as MAX_TABLE_BORDER_STROKES,Ib as MAX_TABLE_NESTING,pc as MAX_TABLE_ROW_FRAGMENTS,Kb as MAX_TABLE_ROW_HEIGHT_PT,Aa as MAX_TAB_POSITION_TWIPS,za as MAX_TAB_STOPS,ha as PARAGRAPH_BORDER_SIDES,P as ResolvedCache,ga as SINGLE_LINE_SPACING,Da as TAB_LEADER_GLYPH,qc as TablePaginationError,n as UnsupportedScriptError,E as WORD_SEGMENTER_LOCALE,ta as appliedSpaceBefore,ka as applyLineSpacing,ad as attachNotesToLayout,hb as baselineShiftPtOf,Gb as borderExtentPt,Db as borderWeight,qa as bottomBorderExtentPt,H as boundedFallbackWordSegments,Qb as buildNumberingIndex,Zc as buildPageRefIndex,rb as buildStyleCascadeTable,N as captureOperationSnapshot,qd as caretAt,ic as caretBoxOnLine,od as caretStops,pd as caretStopsForBlocks,sb as cascadeParagraphFormatting,ub as cascadeRunProperties,tb as cascadedBottomBorder,na as cascadedParagraphBorders,Fa as cascadedTabStops,Cd as cellSelectionBetween,Fd as cellSelectionRects,Gd as cellSelectionText,Oa as clampListValue,sa as collapsedSpaceBefore,Ad as compositionAnchor,aa as computeDoubleBorderMetricsPt,$c as computeFootnoteReserves,fc as contentControlAtPoint,sd as contentControlAtSemantic,kd as contentControlBoundaries,td as contentControlsInLayout,X as contentControlsOfLayout,I as createBoundedFallbackWordBoundary,J as createDefaultWordBoundary,ed as createFixedMeasurer,m as createHarfBuzzTextShaper,G as createIntlWordBoundary,nd as createLayoutScheduler,dd as createLayoutSession,Tb as createListCounterState,kb as createParagraphLayoutCache,ld as createShapedMeasurer,e as createShapedRun,b as createShapingEnvironment,Qc as defaultNoteSeparatorRuleStyle,Ia as defaultTabIntervalFromSettings,Gc as deriveNoteDisplayMarks,Hc as deriveNoteDisplayMarksResolved,eb as displayText,wd as documentOrder,yb as effectiveBorderSide,Z as effectiveContentControlLock,vc as emptyTocPlaceholderParagraphIds,wc as emptyTocSuppressedResultParagraphIds,Dc as enumerateDocumentSections,Ec as enumerateDocumentSectionsBounded,Wa as expandLvlText,_c as filterRefsOnPage,jc as findDrawingOverlayFrameInLayout,Nc as findSeparatorNote,a as fixedPoint,Pa as formatDecimal,Qa as formatDecimalZero,Ua as formatLowerLetter,Sa as formatLowerRoman,Va as formatNumFmt,ib as formatPageNumber,ab as formatRevisionOf,Ta as formatUpperLetter,Ra as formatUpperRoman,Yc as fragmentOwnsAtomOffset,V as fragmentsOfParagraph,Fc as geometryOfSection,s as graphemeBoundaryEpoch,w as graphemeCount,y as graphemeOffsetToUtf16,O as guardOperationSnapshot,k as harfBuzzFontValidator,cc as hitTestPage,rd as hitTestSemantic,ec as hitTestSheet,h as initializeHarfBuzz,r as intlGraphemeBoundary,hd as isCanvasMeasurementAvailable,C as isCumulativeGeometryTrustedFromLineOrigin,bc as isFurniturePoint,B as isGeometryTrustedCaretOffset,i as isHarfBuzzInitialized,q as isIntlSegmenterAvailable,F as isIntlWordSegmenterAvailable,Rc as isMarkerOnlySeparatorNote,qb as isValidStyleId,A as isWholeGraphemeHorizontalBoundary,o as itemizeScriptFontSlots,vd as keyedRangeRects,cd as layoutHeaderFooterStory,Pc as layoutNoteById,Sc as layoutNoteSeparator,Oc as layoutNoteStory,fd as layoutSemanticDocument,W as lineAtPosition,gc as lineEndOffset,T as linesOf,_b as listMarkerBox,fb as measureDisplayText,Wb as mergeListIndent,zd as moveCaret,Ja as nextTabDestination,Mc as normalNotesOf,Ic as noteDisplayMarkMap,Lc as noteLineIdPrefix,Xa as noteMarkKey,Uc as noteSeparatorAreaBox,sc as noteStoryBlocks,ac as pageAtY,md as pagesToMaterialize,pa as paragraphBorderExtentPt,oa as paragraphBorderStrokeWidthPt,ma as paragraphBorders,ra as paragraphBordersFingerprint,ba as paragraphBreaksBefore,la as paragraphContextualSpacing,R as paragraphFragmentsOf,S as paragraphFragmentsOfBlocks,jb as paragraphLayoutKey,ja as paragraphLineSpacing,wb as paragraphMarkDeleted,$a as paragraphMarkRevisionOf,Bc as paragraphSectionNode,xa as paragraphShading,ya as paragraphShadingBox,ia as paragraphSpacing,Ga as paragraphTabStops,xd as paragraphTextFromLayout,Dd as paragraphsInCells,zc as parsePageNumbering,Ac as parseSectionProperties,Ya as projectedNoteMarkText,bd as provisionalNoteMarks,Ab as readBorderSide,Cb as readCellBorders,Ub as readNumPr,Cc as readSectionProperties,Bb as readTableBorders,Nb as readTableStructure,v as resetGraphemeBoundary,Eb as resolveBorderConflict,jd as resolveDefaultSurfaceMeasurer,K as resolveDefaultWordBoundary,Rb as resolveNumberingLevel,va as resolveOoxmlShadingFill,vb as resolveParagraphLayoutInputs,db as resolveRunStyle,Yb as resolveStoryListItems,ua as resolveStrictHexFill,Fb as resolveTableCellBorderGrid,xb as revisionRemovesParagraph,bb as revisionsAreDeletion,_a as revisionsVisible,l as roundFontUnitToFixedPoint,gb as runStylesEqual,t as segmentGraphemes,L as segmentWords,ud as selectionRects,D as semanticHorizontalBoundaries,u as setGraphemeBoundary,wa as shadingFillFromElement,z as shapedHorizontalBoundaries,f as shapedRunComparatorInputs,d as shapingEnvironmentFingerprint,c as shapingEnvironmentFingerprintInputs,hc as spanOffsetX,Ed as spansInCells,Bd as spansInSelection,rc as storyBlocks,Tc as syntheticSeparatorBox,Ka as tabAdvanceWidth,La as tabStopsFingerprint,Hd as tableContextAt,Mb as tableOriginX,uc as tocFieldChromeParagraphIds,id as tryCreateCanvasMeasurer,Y as unionLayoutBoxes,x as utf16OffsetToGrapheme,Xb as walkStoryParagraphs,Ha as withDefaultTabInterval,Vb as withNumberingStyleLinks,Zb as withResolvedListItems,yd as wordBoundary,M as wordSegmentsToGraphemeRecords}from'./chunk-STCITBJK.js';export{a as W15_NAMESPACE_URI,i as activeReviewItem,c as commentBodyText,d as commentInitials,f as firstReviewRange,k as reviewAnchorIndex,l as reviewItemGeometry,b as reviewItemKey,g as reviewItemPositionRank,e as reviewItemRanges,h as reviewItemsAt,j as reviewThreadRootOf}from'./chunk-4WWEDTTE.js';import'./chunk-2DTQDAN7.js';export{d as FontResolutionError,c as HARD_MAX_AGGREGATE_FONT_BYTES,a as HARD_MAX_FONT_BYTES,b as HARD_MAX_FONT_SOURCES,Ib as MAX_SDT_NESTING,ff as MAX_TABLE_COLUMNS,j as boundedStructuralFontValidator,Nb as collectFlowBlocks,Mb as contentControlContentChildren,k as createFontResourceSnapshot,e as fontRequestKey,Jb as isContentControl,Kb as isContentControlContent,fg as paragraphOrderOfPart,i as sha256FontBytes}from'./chunk-Y7TA7TPF.js';
|
package/dist/output.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk3JKQE4QJ_cjs=require('./chunk-3JKQE4QJ.cjs');require('./chunk-TSXT537P.cjs'),require('./chunk-BS554B6D.cjs'),require('./chunk-JQFDLZXQ.cjs'),require('./chunk-BZK64YU3.cjs');Object.defineProperty(exports,"paintSelectionOverlay",{enumerable:true,get:function(){return chunk3JKQE4QJ_cjs.e}});Object.defineProperty(exports,"paintSemanticLayout",{enumerable:true,get:function(){return chunk3JKQE4QJ_cjs.d}});
|
package/dist/output.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-
|
|
2
|
-
import { D as DrawingPaintStrings, P as PaintImageUrlPort } from './semantic-paint-drawings-
|
|
3
|
-
import './tree-op-types-
|
|
1
|
+
import { C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-COVFW5aS.cjs';
|
|
2
|
+
import { D as DrawingPaintStrings, P as PaintImageUrlPort } from './semantic-paint-drawings-x8g44lD_.cjs';
|
|
3
|
+
import './tree-op-types-UOXlRUqQ.cjs';
|
|
4
4
|
import './ooxml-tree-BU0e3DVi.cjs';
|
|
5
|
-
import './image-resources-
|
|
5
|
+
import './image-resources-DwpNnTg3.cjs';
|
|
6
6
|
import './ooxml-package-CR5us6ad.cjs';
|
|
7
7
|
import './revision-projection-72ZApe-g.cjs';
|
|
8
8
|
|
package/dist/output.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-
|
|
2
|
-
import { D as DrawingPaintStrings, P as PaintImageUrlPort } from './semantic-paint-drawings-
|
|
3
|
-
import './tree-op-types-
|
|
1
|
+
import { C as ContentControlBoundaryRecord, S as SemanticLayout } from './semantic-records-zTC0_1zi.js';
|
|
2
|
+
import { D as DrawingPaintStrings, P as PaintImageUrlPort } from './semantic-paint-drawings-B5Wk2so5.js';
|
|
3
|
+
import './tree-op-types-DWLCllG7.js';
|
|
4
4
|
import './ooxml-tree-BU0e3DVi.js';
|
|
5
|
-
import './image-resources-
|
|
5
|
+
import './image-resources-C_YnqPhn.js';
|
|
6
6
|
import './ooxml-package-D_CtywTW.js';
|
|
7
7
|
import './revision-projection-DHAkcD_L.js';
|
|
8
8
|
|
package/dist/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as paintSelectionOverlay,d as paintSemanticLayout}from'./chunk-
|
|
1
|
+
export{e as paintSelectionOverlay,d as paintSemanticLayout}from'./chunk-QRAUDDVY.js';import'./chunk-STCITBJK.js';import'./chunk-4WWEDTTE.js';import'./chunk-2DTQDAN7.js';import'./chunk-Y7TA7TPF.js';
|
|
@@ -879,13 +879,67 @@ type AutomationOperation =
|
|
|
879
879
|
readonly subtype: AutomationContentControlSubtype;
|
|
880
880
|
readonly tag?: string;
|
|
881
881
|
readonly title?: string;
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Insert a custom node: a tagged inline control, optionally bound to a payload.
|
|
885
|
+
*
|
|
886
|
+
* `w:tag` caps at 64 characters, so a node whose identity is a query string fits and a node
|
|
887
|
+
* carrying authors, a year and a locator does not. The payload answers that — it lives in a
|
|
888
|
+
* customXml data part and the control points at it — and the store, the node and the control
|
|
889
|
+
* are ONE transaction. A control bound to a store that was never written is a document Word
|
|
890
|
+
* offers to repair, and repairing it throws the control away.
|
|
891
|
+
*
|
|
892
|
+
* It lives HERE rather than on the editor session so both hosts answer it identically: a
|
|
893
|
+
* payload write needs package scope, and putting it on the session would make the browser the
|
|
894
|
+
* real implementation and leave the headless host to reimplement it or do without.
|
|
895
|
+
*
|
|
896
|
+
* `at` is a position; `span` wraps existing text instead. Exactly one, because a node with
|
|
897
|
+
* both would be an insertion the caller thinks is a wrap.
|
|
898
|
+
*/
|
|
899
|
+
| {
|
|
900
|
+
readonly op: 'insertCustomNode';
|
|
901
|
+
/** Where the node goes. Omitted with `span`, which supplies its own place. */
|
|
902
|
+
readonly at?: AutomationPoint;
|
|
903
|
+
/** Text to wrap, in place of `at`. The node's label replaces it. */
|
|
904
|
+
readonly span?: AutomationSpanRef;
|
|
905
|
+
/** The node's identity, as its definition encoded it. Word caps this at 64 characters. */
|
|
906
|
+
readonly tag: string;
|
|
907
|
+
/** The literal text the control holds — what Word and a reader without this library see. */
|
|
908
|
+
readonly text: string;
|
|
909
|
+
/** `w:alias` — the title Word shows on the control. */
|
|
910
|
+
readonly title?: string;
|
|
911
|
+
/** `w:lock`; omitted writes none. */
|
|
912
|
+
readonly lock?: AutomationContentControlLock;
|
|
913
|
+
/** The payload, and where it lives. Omitted authors a control with no store. */
|
|
914
|
+
readonly payload?: AutomationCustomNodePayload;
|
|
882
915
|
};
|
|
916
|
+
/**
|
|
917
|
+
* A custom node's payload, and the store it lives in.
|
|
918
|
+
*
|
|
919
|
+
* `data` is a STRING and stays one all the way down. A schema belongs to the definition that
|
|
920
|
+
* declared it, and an automation lane that parsed payloads would be a second opinion about what
|
|
921
|
+
* a host's node means — carried over a transport that cannot hold the schema in the first place.
|
|
922
|
+
*
|
|
923
|
+
* @public
|
|
924
|
+
*/
|
|
925
|
+
interface AutomationCustomNodePayload {
|
|
926
|
+
/** Namespace of the store's root element. One store per namespace, per document. */
|
|
927
|
+
readonly namespaceUri: string;
|
|
928
|
+
/** Local name of that root. An NCName; anything else refuses. */
|
|
929
|
+
readonly rootLocalName: string;
|
|
930
|
+
/** The node's id inside the store, which the binding's xpath quotes. */
|
|
931
|
+
readonly nodeId: string;
|
|
932
|
+
/** The text Word paints the control from. Empty is an empty chip. */
|
|
933
|
+
readonly label: string;
|
|
934
|
+
/** The payload, serialized. */
|
|
935
|
+
readonly data: string;
|
|
936
|
+
}
|
|
883
937
|
/** Just the `op` discriminants of {@link AutomationOperation}, for dispatch tables. */
|
|
884
938
|
type AutomationOperationKind = AutomationOperation['op'];
|
|
885
939
|
/** Operations that read. They never open a transaction. */
|
|
886
940
|
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getDocument", "getBody", "getParagraphs", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
887
941
|
/** Operations that write. Every one of these goes through the single transaction path. */
|
|
888
|
-
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertText", "replaceSpan", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "insertListParagraph", "setHyperlink", "setCommentResolved", "replyToComment", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl"];
|
|
942
|
+
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertText", "replaceSpan", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "insertListParagraph", "setHyperlink", "setCommentResolved", "replyToComment", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
|
|
889
943
|
/**
|
|
890
944
|
* Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
|
|
891
945
|
*
|
|
@@ -895,7 +949,7 @@ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertText", "replaceSpa
|
|
|
895
949
|
* beside a story command, would be two commits: two revisions, and a moment where half the
|
|
896
950
|
* caller's batch is published. Refused while planning instead.
|
|
897
951
|
*/
|
|
898
|
-
declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["deleteNote", "setCommentResolved", "replyToComment"];
|
|
952
|
+
declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["deleteNote", "setCommentResolved", "replyToComment", "insertCustomNode"];
|
|
899
953
|
/** Whether an operation must be the only one in its batch. */
|
|
900
954
|
declare function isSolitaryAutomationCommand(operation: AutomationOperation): boolean;
|
|
901
955
|
/** Whether an operation writes. Drives the query/command split inside one batch. */
|
|
@@ -879,13 +879,67 @@ type AutomationOperation =
|
|
|
879
879
|
readonly subtype: AutomationContentControlSubtype;
|
|
880
880
|
readonly tag?: string;
|
|
881
881
|
readonly title?: string;
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Insert a custom node: a tagged inline control, optionally bound to a payload.
|
|
885
|
+
*
|
|
886
|
+
* `w:tag` caps at 64 characters, so a node whose identity is a query string fits and a node
|
|
887
|
+
* carrying authors, a year and a locator does not. The payload answers that — it lives in a
|
|
888
|
+
* customXml data part and the control points at it — and the store, the node and the control
|
|
889
|
+
* are ONE transaction. A control bound to a store that was never written is a document Word
|
|
890
|
+
* offers to repair, and repairing it throws the control away.
|
|
891
|
+
*
|
|
892
|
+
* It lives HERE rather than on the editor session so both hosts answer it identically: a
|
|
893
|
+
* payload write needs package scope, and putting it on the session would make the browser the
|
|
894
|
+
* real implementation and leave the headless host to reimplement it or do without.
|
|
895
|
+
*
|
|
896
|
+
* `at` is a position; `span` wraps existing text instead. Exactly one, because a node with
|
|
897
|
+
* both would be an insertion the caller thinks is a wrap.
|
|
898
|
+
*/
|
|
899
|
+
| {
|
|
900
|
+
readonly op: 'insertCustomNode';
|
|
901
|
+
/** Where the node goes. Omitted with `span`, which supplies its own place. */
|
|
902
|
+
readonly at?: AutomationPoint;
|
|
903
|
+
/** Text to wrap, in place of `at`. The node's label replaces it. */
|
|
904
|
+
readonly span?: AutomationSpanRef;
|
|
905
|
+
/** The node's identity, as its definition encoded it. Word caps this at 64 characters. */
|
|
906
|
+
readonly tag: string;
|
|
907
|
+
/** The literal text the control holds — what Word and a reader without this library see. */
|
|
908
|
+
readonly text: string;
|
|
909
|
+
/** `w:alias` — the title Word shows on the control. */
|
|
910
|
+
readonly title?: string;
|
|
911
|
+
/** `w:lock`; omitted writes none. */
|
|
912
|
+
readonly lock?: AutomationContentControlLock;
|
|
913
|
+
/** The payload, and where it lives. Omitted authors a control with no store. */
|
|
914
|
+
readonly payload?: AutomationCustomNodePayload;
|
|
882
915
|
};
|
|
916
|
+
/**
|
|
917
|
+
* A custom node's payload, and the store it lives in.
|
|
918
|
+
*
|
|
919
|
+
* `data` is a STRING and stays one all the way down. A schema belongs to the definition that
|
|
920
|
+
* declared it, and an automation lane that parsed payloads would be a second opinion about what
|
|
921
|
+
* a host's node means — carried over a transport that cannot hold the schema in the first place.
|
|
922
|
+
*
|
|
923
|
+
* @public
|
|
924
|
+
*/
|
|
925
|
+
interface AutomationCustomNodePayload {
|
|
926
|
+
/** Namespace of the store's root element. One store per namespace, per document. */
|
|
927
|
+
readonly namespaceUri: string;
|
|
928
|
+
/** Local name of that root. An NCName; anything else refuses. */
|
|
929
|
+
readonly rootLocalName: string;
|
|
930
|
+
/** The node's id inside the store, which the binding's xpath quotes. */
|
|
931
|
+
readonly nodeId: string;
|
|
932
|
+
/** The text Word paints the control from. Empty is an empty chip. */
|
|
933
|
+
readonly label: string;
|
|
934
|
+
/** The payload, serialized. */
|
|
935
|
+
readonly data: string;
|
|
936
|
+
}
|
|
883
937
|
/** Just the `op` discriminants of {@link AutomationOperation}, for dispatch tables. */
|
|
884
938
|
type AutomationOperationKind = AutomationOperation['op'];
|
|
885
939
|
/** Operations that read. They never open a transaction. */
|
|
886
940
|
declare const AUTOMATION_QUERY_OPERATIONS: readonly ["getDocument", "getBody", "getParagraphs", "getSpanParagraphs", "getText", "getSpanText", "getParagraphId", "search", "getFont", "getParagraphFormat", "getStyle", "getSections", "getPageSetup", "getFurniture", "getNotes", "getNoteBody", "getNoteKind", "getLists", "getListId", "getListById", "getListParagraphs", "getParagraphList", "getListLevel", "getHyperlink", "getBookmarks", "getBookmarkName", "getBookmarkRange", "getComments", "getCommentReplies", "getCommentId", "getCommentAuthor", "getCommentDate", "getCommentText", "getCommentRange", "getCommentResolved", "getRevisions", "getRevisionType", "getRevisionAuthor", "getRevisionDate", "getRevisionRange", "getContentControls", "getContentControlById", "getContentControlsByTag", "getContentControlsByTitle", "getContentControlTag", "getContentControlTitle", "getContentControlFileId", "getContentControlSubtype", "getContentControlLock", "getContentControlPlaceholderShown", "getContentControlTemporary", "getContentControlText", "getContentControlParagraphs", "getContentControlRange"];
|
|
887
941
|
/** Operations that write. Every one of these goes through the single transaction path. */
|
|
888
|
-
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertText", "replaceSpan", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "insertListParagraph", "setHyperlink", "setCommentResolved", "replyToComment", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl"];
|
|
942
|
+
declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertText", "replaceSpan", "insertParagraph", "splitParagraph", "deleteParagraph", "selectSpan", "setFont", "setParagraphFormat", "setStyle", "setPageSetup", "deleteNote", "setListLevel", "insertListParagraph", "setHyperlink", "setCommentResolved", "replyToComment", "acceptRevision", "rejectRevision", "acceptAllRevisions", "rejectAllRevisions", "setContentControlValue", "setContentControlProperties", "deleteContentControl", "insertContentControlText", "insertContentControl", "insertCustomNode"];
|
|
889
943
|
/**
|
|
890
944
|
* Commands that commit as a PACKAGE transaction and therefore share a batch with nothing.
|
|
891
945
|
*
|
|
@@ -895,7 +949,7 @@ declare const AUTOMATION_COMMAND_OPERATIONS: readonly ["insertText", "replaceSpa
|
|
|
895
949
|
* beside a story command, would be two commits: two revisions, and a moment where half the
|
|
896
950
|
* caller's batch is published. Refused while planning instead.
|
|
897
951
|
*/
|
|
898
|
-
declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["deleteNote", "setCommentResolved", "replyToComment"];
|
|
952
|
+
declare const AUTOMATION_SOLITARY_OPERATIONS: readonly ["deleteNote", "setCommentResolved", "replyToComment", "insertCustomNode"];
|
|
899
953
|
/** Whether an operation must be the only one in its batch. */
|
|
900
954
|
declare function isSolitaryAutomationCommand(operation: AutomationOperation): boolean;
|
|
901
955
|
/** Whether an operation writes. Drives the query/command split inside one batch. */
|