@docx-editor.dev/core 0.0.1 → 2.0.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/LICENSE +201 -0
- package/README.md +92 -2
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/dist/automation.cjs +1 -0
- package/dist/automation.d.cts +74 -0
- package/dist/automation.d.ts +74 -0
- package/dist/automation.js +1 -0
- package/dist/binding.cjs +1 -0
- package/dist/binding.d.cts +82 -0
- package/dist/binding.d.ts +82 -0
- package/dist/binding.js +1 -0
- package/dist/chunk-5KSCB2OZ.js +2 -0
- package/dist/chunk-BSC44TIT.js +5 -0
- package/dist/chunk-DLPL5DAG.js +12 -0
- package/dist/chunk-DOEIARE2.js +2 -0
- package/dist/chunk-G7YCQBZE.cjs +5 -0
- package/dist/chunk-HBL3NNH5.cjs +1 -0
- package/dist/chunk-HR7K3W6A.js +1 -0
- package/dist/chunk-HVAV2JSN.js +11 -0
- package/dist/chunk-MYH2HCUJ.cjs +2 -0
- package/dist/chunk-NSM75TN6.cjs +1 -0
- package/dist/chunk-PHDVKUWZ.js +1 -0
- package/dist/chunk-QADYGK5L.cjs +12 -0
- package/dist/chunk-REZUWYB7.js +1 -0
- package/dist/chunk-RNBHTPW7.js +10 -0
- package/dist/chunk-UD2ZXLFI.cjs +2 -0
- package/dist/chunk-VYAVK2AH.cjs +1 -0
- package/dist/chunk-YUK46A2N.cjs +11 -0
- package/dist/chunk-ZMIX42J7.cjs +10 -0
- package/dist/chunk-ZT55Q52J.cjs +2 -0
- package/dist/chunk-ZUALAR4M.js +2 -0
- package/dist/content-control-walk-CbTqHq6O.d.cts +56 -0
- package/dist/content-control-walk-D06GijR0.d.ts +56 -0
- package/dist/contracts/document.cjs +1 -0
- package/dist/contracts/document.d.cts +246 -0
- package/dist/contracts/document.d.ts +246 -0
- package/dist/contracts/document.js +0 -0
- package/dist/contracts/editor.cjs +1 -0
- package/dist/contracts/editor.d.cts +11 -0
- package/dist/contracts/editor.d.ts +11 -0
- package/dist/contracts/editor.js +1 -0
- package/dist/contracts/interaction.cjs +1 -0
- package/dist/contracts/interaction.d.cts +11 -0
- package/dist/contracts/interaction.d.ts +11 -0
- package/dist/contracts/interaction.js +0 -0
- package/dist/contracts/modules.cjs +1 -0
- package/dist/contracts/modules.d.cts +90 -0
- package/dist/contracts/modules.d.ts +90 -0
- package/dist/contracts/modules.js +1 -0
- package/dist/contracts/types.cjs +1 -0
- package/dist/contracts/types.d.cts +452 -0
- package/dist/contracts/types.d.ts +452 -0
- package/dist/contracts/types.js +0 -0
- package/dist/editor-C1QRi1v4.d.ts +1671 -0
- package/dist/editor-D0UDock4.d.cts +1671 -0
- package/dist/editor.cjs +1 -0
- package/dist/editor.css +6017 -0
- package/dist/editor.d.cts +271 -0
- package/dist/editor.d.ts +271 -0
- package/dist/editor.js +1 -0
- package/dist/hf-references-BdjsQNE_.d.ts +71 -0
- package/dist/hf-references-CgEOSw3i.d.cts +71 -0
- package/dist/image-resources-BJnTpG66.d.ts +195 -0
- package/dist/image-resources-BpIydXtU.d.cts +195 -0
- package/dist/index-CrW-IxXt.d.cts +2515 -0
- package/dist/index-ZqBEOrTV.d.ts +2515 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +1 -0
- package/dist/layout.cjs +1 -0
- package/dist/layout.d.cts +2316 -0
- package/dist/layout.d.ts +2316 -0
- package/dist/layout.js +1 -0
- package/dist/note-nodes-BPSTVDMr.d.ts +108 -0
- package/dist/note-nodes-C6DLxlvj.d.cts +108 -0
- package/dist/note-properties-CnmCoory.d.cts +68 -0
- package/dist/note-properties-m75hmP70.d.ts +68 -0
- package/dist/ooxml-package-CR5us6ad.d.cts +354 -0
- package/dist/ooxml-package-D_CtywTW.d.ts +354 -0
- package/dist/ooxml-tree-BU0e3DVi.d.cts +871 -0
- package/dist/ooxml-tree-BU0e3DVi.d.ts +871 -0
- package/dist/output.cjs +1 -0
- package/dist/output.d.cts +158 -0
- package/dist/output.d.ts +158 -0
- package/dist/output.js +1 -0
- package/dist/protocol-CAkOBBGE.d.cts +1201 -0
- package/dist/protocol-oxHaWmt4.d.ts +1201 -0
- package/dist/review-support-DS8DYX2a.d.cts +326 -0
- package/dist/review-support-Fy3vdIea.d.ts +326 -0
- package/dist/revision-projection-72ZApe-g.d.cts +84 -0
- package/dist/revision-projection-DHAkcD_L.d.ts +84 -0
- package/dist/semantic-cell-selection-CZjBSmMv.d.cts +427 -0
- package/dist/semantic-cell-selection-DsmHmLJ5.d.ts +427 -0
- package/dist/semantic-interaction-D-Dszxrn.d.cts +187 -0
- package/dist/semantic-interaction-Dy-dCUFF.d.ts +187 -0
- package/dist/semantic-paint-drawings-BA3z9jl8.d.ts +21 -0
- package/dist/semantic-paint-drawings-D7qbB0E2.d.cts +21 -0
- package/dist/semantic-records-CJR3BvHs.d.cts +1432 -0
- package/dist/semantic-records-CWodBJsz.d.ts +1432 -0
- package/dist/shaped-measurer-B-TAtcQU.d.ts +613 -0
- package/dist/shaped-measurer-CNIT_svZ.d.cts +613 -0
- package/dist/store.cjs +1 -0
- package/dist/store.d.cts +2247 -0
- package/dist/store.d.ts +2247 -0
- package/dist/store.js +1 -0
- package/dist/tree-op-types-CwOeiaQ8.d.ts +1431 -0
- package/dist/tree-op-types-DMiW6nIH.d.cts +1431 -0
- package/dist/tree-package-store-D5S7VKs5.d.ts +708 -0
- package/dist/tree-package-store-DOKMtCnh.d.cts +708 -0
- package/dist/tree-session-CiUel5Kz.d.ts +542 -0
- package/dist/tree-session-D47_imvR.d.cts +542 -0
- package/dist/tree-store-CxifqwIv.d.cts +273 -0
- package/dist/tree-store-hLtjeyWE.d.ts +273 -0
- package/package.json +105 -8
- package/index.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var c="http://schemas.microsoft.com/office/word/2012/wordml";function R(e){return `${e.kind}-${e.id}`}function v(e){let o=[],t=n=>{if(n.kind==="textValue"){o.push(n.value);return}for(let r of n.children)t(r);};for(let n of e.blocks)t(n);return o.join("")}function w(e){if(e.initials&&e.initials.trim().length>0)return e.initials.trim();let o=e.author.trim().split(/\s+/).filter(Boolean);return o.length===0?"?":o.slice(0,2).map(t=>t[0].toUpperCase()).join("")}function I(e){let o=new Map,t=(n,r)=>{if(!(n.kind==="textValue"||r>64)){if(n.kind==="paragraph"){o.has(n.id)||o.set(n.id,o.size);return}for(let i of n.children)t(i,r+1);}};return t(e.root,0),o}function s(e){return e.kind==="revision"?e.ranges:e.range?[e.range]:[]}function l(e){return s(e)[0]??null}function x(e,o){let t=l(e);if(!t)return Number.MAX_SAFE_INTEGER;let n=o.get(t.start.paragraphId);return n===void 0?Number.MAX_SAFE_INTEGER:n*1e6+Math.min(t.start.offset,999999)}function u(e,o){let t=o.get(e.start.paragraphId),n=o.get(e.end.paragraphId);return t===void 0||n===void 0?Number.MAX_SAFE_INTEGER:(n-t)*1e6+(e.end.offset-e.start.offset)}function y(e,o,t){let n=t.get(o.paragraphId),r=t.get(e.start.paragraphId),i=t.get(e.end.paragraphId);return !(n===void 0||r===void 0||i===void 0||n<r||n>i||n===r&&o.offset<e.start.offset||n===i&&o.offset>e.end.offset)}function f(e,o,t){let n=null;for(let r of s(e)){if(!y(r,o,t))continue;let i=u(r,t);(n===null||i<n)&&(n=i);}return n}var d={comment:0,custom:1,revision:2};function g(e,o,t){let n=[];for(let r of e){let i=f(r,o,t);i!==null&&n.push({item:r,width:i});}return n.sort((r,i)=>r.width!==i.width?r.width-i.width:r.item.kind!==i.item.kind?d[r.item.kind]-d[i.item.kind]:0).map(r=>r.item)}function h(e,o,t){let r=g(e,o,t).filter(i=>!(i.kind==="comment"&&i.resolved))[0];return r?r.kind==="comment"?m(e,r):r:null}function b(e,o){return m(e,o)}function m(e,o){let t=new Map,n=new Map;for(let a of e)a.kind==="comment"?t.set(a.id,a):a.kind==="revision"&&n.set(a.id,a);let r=new Set([o.id]),i=o;for(;i.parentId!==void 0;){let a=t.get(i.parentId);if(!a||r.has(a.id))break;r.add(a.id),i=a;}if(i.parentRevisionId!==void 0){let a=n.get(i.parentRevisionId);if(a)return a}return i}function P(e,o){let t=new Map;for(let n of e.pages)for(let r of o(n))t.has(r.paragraphId)||t.set(r.paragraphId,{pageIndex:n.index,contentY:n.contentBox.y,fragmentY:r.box.y,...r.lines?{lines:r.lines}:{}});return t}function k(e,o){let t=l(e);if(!t)return null;let n=o.get(t.start.paragraphId);if(!n)return null;let r=n.lines?.find(i=>t.start.offset<i.range.end);return {pageIndex:n.pageIndex,y:n.contentY+(r?r.box.y:n.fragmentY)}}
|
|
2
|
+
exports.a=c;exports.b=R;exports.c=v;exports.d=w;exports.e=I;exports.f=s;exports.g=l;exports.h=x;exports.i=g;exports.j=h;exports.k=b;exports.l=P;exports.m=k;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var c="http://schemas.microsoft.com/office/word/2012/wordml";function R(e){return `${e.kind}-${e.id}`}function v(e){let o=[],t=n=>{if(n.kind==="textValue"){o.push(n.value);return}for(let r of n.children)t(r);};for(let n of e.blocks)t(n);return o.join("")}function w(e){if(e.initials&&e.initials.trim().length>0)return e.initials.trim();let o=e.author.trim().split(/\s+/).filter(Boolean);return o.length===0?"?":o.slice(0,2).map(t=>t[0].toUpperCase()).join("")}function I(e){let o=new Map,t=(n,r)=>{if(!(n.kind==="textValue"||r>64)){if(n.kind==="paragraph"){o.has(n.id)||o.set(n.id,o.size);return}for(let i of n.children)t(i,r+1);}};return t(e.root,0),o}function s(e){return e.kind==="revision"?e.ranges:e.range?[e.range]:[]}function l(e){return s(e)[0]??null}function x(e,o){let t=l(e);if(!t)return Number.MAX_SAFE_INTEGER;let n=o.get(t.start.paragraphId);return n===void 0?Number.MAX_SAFE_INTEGER:n*1e6+Math.min(t.start.offset,999999)}function u(e,o){let t=o.get(e.start.paragraphId),n=o.get(e.end.paragraphId);return t===void 0||n===void 0?Number.MAX_SAFE_INTEGER:(n-t)*1e6+(e.end.offset-e.start.offset)}function y(e,o,t){let n=t.get(o.paragraphId),r=t.get(e.start.paragraphId),i=t.get(e.end.paragraphId);return !(n===void 0||r===void 0||i===void 0||n<r||n>i||n===r&&o.offset<e.start.offset||n===i&&o.offset>e.end.offset)}function f(e,o,t){let n=null;for(let r of s(e)){if(!y(r,o,t))continue;let i=u(r,t);(n===null||i<n)&&(n=i);}return n}var d={comment:0,custom:1,revision:2};function g(e,o,t){let n=[];for(let r of e){let i=f(r,o,t);i!==null&&n.push({item:r,width:i});}return n.sort((r,i)=>r.width!==i.width?r.width-i.width:r.item.kind!==i.item.kind?d[r.item.kind]-d[i.item.kind]:0).map(r=>r.item)}function h(e,o,t){let r=g(e,o,t).filter(i=>!(i.kind==="comment"&&i.resolved))[0];return r?r.kind==="comment"?m(e,r):r:null}function b(e,o){return m(e,o)}function m(e,o){let t=new Map,n=new Map;for(let a of e)a.kind==="comment"?t.set(a.id,a):a.kind==="revision"&&n.set(a.id,a);let r=new Set([o.id]),i=o;for(;i.parentId!==void 0;){let a=t.get(i.parentId);if(!a||r.has(a.id))break;r.add(a.id),i=a;}if(i.parentRevisionId!==void 0){let a=n.get(i.parentRevisionId);if(a)return a}return i}function P(e,o){let t=new Map;for(let n of e.pages)for(let r of o(n))t.has(r.paragraphId)||t.set(r.paragraphId,{pageIndex:n.index,contentY:n.contentBox.y,fragmentY:r.box.y,...r.lines?{lines:r.lines}:{}});return t}function k(e,o){let t=l(e);if(!t)return null;let n=o.get(t.start.paragraphId);if(!n)return null;let r=n.lines?.find(i=>t.start.offset<i.range.end);return {pageIndex:n.pageIndex,y:n.contentY+(r?r.box.y:n.fragmentY)}}
|
|
2
|
+
export{c as a,R as b,v as c,w as d,I as e,s as f,l as g,x as h,g as i,h as j,b as k,P as l,k as m};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { O as OoxmlNode, a as OoxmlElement, b as OoxmlContentControlNode, c as OoxmlGenericElementNode, d as OoxmlContentControlContentNode } from './ooxml-tree-BU0e3DVi.cjs';
|
|
2
|
+
|
|
3
|
+
/** Nested content-control wrappers deeper than this stop flattening; content stays preserved. */
|
|
4
|
+
declare const MAX_CONTENT_CONTROL_NESTING = 32;
|
|
5
|
+
type ContentControlLike = OoxmlContentControlNode | OoxmlGenericElementNode;
|
|
6
|
+
type ContentControlContentLike = OoxmlContentControlContentNode | OoxmlGenericElementNode;
|
|
7
|
+
/**
|
|
8
|
+
* Block or inline structured-document-tag wrapper — typed or generic during migration.
|
|
9
|
+
*
|
|
10
|
+
* Generic fallback requires the WordprocessingML namespace so foreign-namespace
|
|
11
|
+
* `<x:sdt>` elements stay opaque wrappers and are never treated as Word controls.
|
|
12
|
+
*/
|
|
13
|
+
declare function isContentControl(node: OoxmlNode): node is ContentControlLike;
|
|
14
|
+
/**
|
|
15
|
+
* True when `node` is the control's content container (`w:sdtContent`).
|
|
16
|
+
*
|
|
17
|
+
* Generic `sdtContent` requires the WML namespace — same foreign-namespace rule as
|
|
18
|
+
* {@link isContentControl}.
|
|
19
|
+
*/
|
|
20
|
+
declare function isContentControlContent(node: OoxmlNode): node is ContentControlContentLike;
|
|
21
|
+
/** Children of the first `w:sdtContent` under a control, or null when absent or not a control. */
|
|
22
|
+
declare function contentControlContentOf(node: OoxmlNode): readonly OoxmlNode[] | null;
|
|
23
|
+
/**
|
|
24
|
+
* Children of every `w:sdtContent` under a control, in document order.
|
|
25
|
+
*
|
|
26
|
+
* Does not recurse into nested controls — callers that flatten blocks or inline runs do that
|
|
27
|
+
* with their own depth counter against {@link MAX_CONTENT_CONTROL_NESTING}.
|
|
28
|
+
*/
|
|
29
|
+
declare function contentControlContentChildren(control: OoxmlNode): readonly OoxmlNode[];
|
|
30
|
+
/**
|
|
31
|
+
* Collect paragraph and table blocks from a sibling list, flattening through content-control
|
|
32
|
+
* wrappers up to {@link MAX_CONTENT_CONTROL_NESTING}.
|
|
33
|
+
*
|
|
34
|
+
* `accept` filters which typed blocks are kept (e.g. skip revision-removed paragraphs). When
|
|
35
|
+
* nesting exceeds the bound the wrapper is skipped entirely — same fail-closed rule as the
|
|
36
|
+
* historical `storyBlocks` walk.
|
|
37
|
+
*/
|
|
38
|
+
declare function collectFlowBlocks(children: readonly OoxmlNode[], depth?: number, accept?: (block: OoxmlElement) => boolean): OoxmlElement[];
|
|
39
|
+
/**
|
|
40
|
+
* Story blocks in document order, flattening block-level content controls — same shape as
|
|
41
|
+
* layout's `storyBlocks` and store `bodyBlocks`.
|
|
42
|
+
*/
|
|
43
|
+
declare function walkStoryBlocks(children: readonly OoxmlNode[], depth: number, visit: (block: OoxmlElement) => void): void;
|
|
44
|
+
/**
|
|
45
|
+
* Every story paragraph in reading order — body, table cells, and flattened block controls.
|
|
46
|
+
*/
|
|
47
|
+
declare function walkAllStoryParagraphs(children: readonly OoxmlNode[], sdtDepth: number, visit: (paragraph: OoxmlElement) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* Paragraph-level inline sequence — runs, hyperlinks, and inline content controls in order.
|
|
50
|
+
*
|
|
51
|
+
* `visit` receives each direct `w:r` and any other inline node the caller treats as opaque
|
|
52
|
+
* (bookmarks, drawings, …). Hyperlinks and content controls are descended transparently.
|
|
53
|
+
*/
|
|
54
|
+
declare function walkParagraphInline(children: readonly OoxmlNode[], depth: number, visit: (child: OoxmlNode) => void): void;
|
|
55
|
+
|
|
56
|
+
export { MAX_CONTENT_CONTROL_NESTING as M, contentControlContentChildren as a, isContentControlContent as b, collectFlowBlocks as c, contentControlContentOf as d, walkParagraphInline as e, walkStoryBlocks as f, isContentControl as i, walkAllStoryParagraphs as w };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { O as OoxmlNode, a as OoxmlElement, b as OoxmlContentControlNode, c as OoxmlGenericElementNode, d as OoxmlContentControlContentNode } from './ooxml-tree-BU0e3DVi.js';
|
|
2
|
+
|
|
3
|
+
/** Nested content-control wrappers deeper than this stop flattening; content stays preserved. */
|
|
4
|
+
declare const MAX_CONTENT_CONTROL_NESTING = 32;
|
|
5
|
+
type ContentControlLike = OoxmlContentControlNode | OoxmlGenericElementNode;
|
|
6
|
+
type ContentControlContentLike = OoxmlContentControlContentNode | OoxmlGenericElementNode;
|
|
7
|
+
/**
|
|
8
|
+
* Block or inline structured-document-tag wrapper — typed or generic during migration.
|
|
9
|
+
*
|
|
10
|
+
* Generic fallback requires the WordprocessingML namespace so foreign-namespace
|
|
11
|
+
* `<x:sdt>` elements stay opaque wrappers and are never treated as Word controls.
|
|
12
|
+
*/
|
|
13
|
+
declare function isContentControl(node: OoxmlNode): node is ContentControlLike;
|
|
14
|
+
/**
|
|
15
|
+
* True when `node` is the control's content container (`w:sdtContent`).
|
|
16
|
+
*
|
|
17
|
+
* Generic `sdtContent` requires the WML namespace — same foreign-namespace rule as
|
|
18
|
+
* {@link isContentControl}.
|
|
19
|
+
*/
|
|
20
|
+
declare function isContentControlContent(node: OoxmlNode): node is ContentControlContentLike;
|
|
21
|
+
/** Children of the first `w:sdtContent` under a control, or null when absent or not a control. */
|
|
22
|
+
declare function contentControlContentOf(node: OoxmlNode): readonly OoxmlNode[] | null;
|
|
23
|
+
/**
|
|
24
|
+
* Children of every `w:sdtContent` under a control, in document order.
|
|
25
|
+
*
|
|
26
|
+
* Does not recurse into nested controls — callers that flatten blocks or inline runs do that
|
|
27
|
+
* with their own depth counter against {@link MAX_CONTENT_CONTROL_NESTING}.
|
|
28
|
+
*/
|
|
29
|
+
declare function contentControlContentChildren(control: OoxmlNode): readonly OoxmlNode[];
|
|
30
|
+
/**
|
|
31
|
+
* Collect paragraph and table blocks from a sibling list, flattening through content-control
|
|
32
|
+
* wrappers up to {@link MAX_CONTENT_CONTROL_NESTING}.
|
|
33
|
+
*
|
|
34
|
+
* `accept` filters which typed blocks are kept (e.g. skip revision-removed paragraphs). When
|
|
35
|
+
* nesting exceeds the bound the wrapper is skipped entirely — same fail-closed rule as the
|
|
36
|
+
* historical `storyBlocks` walk.
|
|
37
|
+
*/
|
|
38
|
+
declare function collectFlowBlocks(children: readonly OoxmlNode[], depth?: number, accept?: (block: OoxmlElement) => boolean): OoxmlElement[];
|
|
39
|
+
/**
|
|
40
|
+
* Story blocks in document order, flattening block-level content controls — same shape as
|
|
41
|
+
* layout's `storyBlocks` and store `bodyBlocks`.
|
|
42
|
+
*/
|
|
43
|
+
declare function walkStoryBlocks(children: readonly OoxmlNode[], depth: number, visit: (block: OoxmlElement) => void): void;
|
|
44
|
+
/**
|
|
45
|
+
* Every story paragraph in reading order — body, table cells, and flattened block controls.
|
|
46
|
+
*/
|
|
47
|
+
declare function walkAllStoryParagraphs(children: readonly OoxmlNode[], sdtDepth: number, visit: (paragraph: OoxmlElement) => void): void;
|
|
48
|
+
/**
|
|
49
|
+
* Paragraph-level inline sequence — runs, hyperlinks, and inline content controls in order.
|
|
50
|
+
*
|
|
51
|
+
* `visit` receives each direct `w:r` and any other inline node the caller treats as opaque
|
|
52
|
+
* (bookmarks, drawings, …). Hyperlinks and content controls are descended transparently.
|
|
53
|
+
*/
|
|
54
|
+
declare function walkParagraphInline(children: readonly OoxmlNode[], depth: number, visit: (child: OoxmlNode) => void): void;
|
|
55
|
+
|
|
56
|
+
export { MAX_CONTENT_CONTROL_NESTING as M, contentControlContentChildren as a, isContentControlContent as b, collectFlowBlocks as c, contentControlContentOf as d, walkParagraphInline as e, walkStoryBlocks as f, isContentControl as i, walkAllStoryParagraphs as w };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { DocxDocument, ExecResult, ContentControlType, DocTarget, RunFormatting, Extent, ContainerRef, ContentControlFilter, DocRange, Revision, DocComment, StyleDefinitions } from './types.cjs';
|
|
2
|
+
export { Block, ColorValue, ContentControl, DocAnchor, DocAnchorRange, DocLocation, DocumentBody, ExecErrorCode, HeaderFooterSet, IndentFormatting, Paragraph, RevisionType, Section, SectionProperties, StyleDefinition, Table, Theme, ThemeColorScheme } from './types.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `@docx-editor.dev/core/contracts/document` — the document-level edit and query vocabulary.
|
|
6
|
+
*
|
|
7
|
+
* The subset that means something without a live editor: what an automation host or an LLM tool
|
|
8
|
+
* can ask for and change.
|
|
9
|
+
*
|
|
10
|
+
* A CONTRACT module, not a barrel. `contracts/editor` builds the `Editor` command and query
|
|
11
|
+
* surfaces on top of these, so they cannot live in the package root: the root re-exports
|
|
12
|
+
* runtime from `../editor`, and a contract importing the root would invert the dependency —
|
|
13
|
+
* safe today only because that import is type-only, and one accidental value import away from
|
|
14
|
+
* pulling the painted engine into a server bundle.
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The document-executable edit vocabulary.
|
|
22
|
+
*
|
|
23
|
+
* An interface rather than a closed union so extensions can widen it by
|
|
24
|
+
* declaration merging. A sealed union cannot be extended by a plugin, and the
|
|
25
|
+
* runtime dispatch is already registry-backed.
|
|
26
|
+
*/
|
|
27
|
+
interface DocEdits {
|
|
28
|
+
insertText: {
|
|
29
|
+
target: DocTarget;
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
replaceText: {
|
|
33
|
+
target: DocTarget;
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
deleteText: {
|
|
37
|
+
target: DocTarget;
|
|
38
|
+
};
|
|
39
|
+
applyFormatting: {
|
|
40
|
+
target: DocTarget;
|
|
41
|
+
marks: RunFormatting;
|
|
42
|
+
};
|
|
43
|
+
setParagraphStyle: {
|
|
44
|
+
target: DocTarget;
|
|
45
|
+
styleId: string;
|
|
46
|
+
};
|
|
47
|
+
insertTable: {
|
|
48
|
+
target: DocTarget;
|
|
49
|
+
rows: number;
|
|
50
|
+
cols: number;
|
|
51
|
+
};
|
|
52
|
+
insertImage: {
|
|
53
|
+
target: DocTarget;
|
|
54
|
+
data: Uint8Array;
|
|
55
|
+
extent?: Extent;
|
|
56
|
+
};
|
|
57
|
+
insertHyperlink: {
|
|
58
|
+
target: DocTarget;
|
|
59
|
+
href: string;
|
|
60
|
+
text?: string;
|
|
61
|
+
};
|
|
62
|
+
removeHyperlink: {
|
|
63
|
+
target: DocTarget;
|
|
64
|
+
};
|
|
65
|
+
insertBreak: {
|
|
66
|
+
target: DocTarget;
|
|
67
|
+
kind: 'page' | 'column' | 'line' | 'section';
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Word's Increase/Decrease Indent.
|
|
71
|
+
*
|
|
72
|
+
* A numbered or bulleted paragraph changes LEVEL, so its marker re-resolves from the
|
|
73
|
+
* numbering definition — a bullet becomes a hollow circle, a `1.` becomes an `a.`.
|
|
74
|
+
* Every other paragraph moves its left indent by one default tab stop.
|
|
75
|
+
*/
|
|
76
|
+
adjustIndent: {
|
|
77
|
+
target: DocTarget;
|
|
78
|
+
direction: 'increase' | 'decrease';
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Word's Bullets and Numbering.
|
|
82
|
+
*
|
|
83
|
+
* Turns the selection into a list, or takes it out of one when it already is. The
|
|
84
|
+
* definition is created on first use, `numbering.xml` included.
|
|
85
|
+
*/
|
|
86
|
+
toggleList: {
|
|
87
|
+
target: DocTarget;
|
|
88
|
+
kind: 'bullet' | 'ordered';
|
|
89
|
+
};
|
|
90
|
+
splitParagraph: {
|
|
91
|
+
target: DocTarget;
|
|
92
|
+
};
|
|
93
|
+
mergeParagraphs: {
|
|
94
|
+
target: DocTarget;
|
|
95
|
+
};
|
|
96
|
+
setVariable: {
|
|
97
|
+
name: string;
|
|
98
|
+
value: string;
|
|
99
|
+
};
|
|
100
|
+
applyVariables: {
|
|
101
|
+
values: Record<string, string>;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Authored family. `author` is required: tracked-ness is verb identity, not a
|
|
105
|
+
* boolean flag, so there is no global trackChanges toggle to forget.
|
|
106
|
+
*/
|
|
107
|
+
proposeReplacement: {
|
|
108
|
+
target: DocTarget;
|
|
109
|
+
replaceWith: string;
|
|
110
|
+
author: string;
|
|
111
|
+
};
|
|
112
|
+
proposeInsertion: {
|
|
113
|
+
target: DocTarget;
|
|
114
|
+
text: string;
|
|
115
|
+
author: string;
|
|
116
|
+
};
|
|
117
|
+
proposeDeletion: {
|
|
118
|
+
target: DocTarget;
|
|
119
|
+
author: string;
|
|
120
|
+
};
|
|
121
|
+
addComment: {
|
|
122
|
+
target: DocTarget;
|
|
123
|
+
text: string;
|
|
124
|
+
author: string;
|
|
125
|
+
};
|
|
126
|
+
replyComment: {
|
|
127
|
+
commentId: string;
|
|
128
|
+
text: string;
|
|
129
|
+
author: string;
|
|
130
|
+
};
|
|
131
|
+
resolveComment: {
|
|
132
|
+
commentId: string;
|
|
133
|
+
};
|
|
134
|
+
acceptRevision: {
|
|
135
|
+
id: number;
|
|
136
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
137
|
+
noteId?: number;
|
|
138
|
+
};
|
|
139
|
+
rejectRevision: {
|
|
140
|
+
id: number;
|
|
141
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
142
|
+
noteId?: number;
|
|
143
|
+
};
|
|
144
|
+
acceptAllRevisions: Record<never, never>;
|
|
145
|
+
rejectAllRevisions: Record<never, never>;
|
|
146
|
+
setContentControlValue: {
|
|
147
|
+
target: DocTarget;
|
|
148
|
+
value: string;
|
|
149
|
+
};
|
|
150
|
+
removeContentControl: {
|
|
151
|
+
target: DocTarget;
|
|
152
|
+
};
|
|
153
|
+
addRepeatingSectionItem: {
|
|
154
|
+
target: DocTarget;
|
|
155
|
+
index?: number;
|
|
156
|
+
};
|
|
157
|
+
removeRepeatingSectionItem: {
|
|
158
|
+
target: DocTarget;
|
|
159
|
+
index: number;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* One edit, as a discriminated union derived from {@link DocEdits}.
|
|
164
|
+
*
|
|
165
|
+
* Adding a key to `DocEdits` — including by declaration merging from a plugin — widens this
|
|
166
|
+
* automatically, so the union never drifts from the vocabulary it is built out of.
|
|
167
|
+
*/
|
|
168
|
+
type DocEdit = {
|
|
169
|
+
[K in keyof DocEdits]: {
|
|
170
|
+
type: K;
|
|
171
|
+
} & DocEdits[K];
|
|
172
|
+
}[keyof DocEdits];
|
|
173
|
+
/**
|
|
174
|
+
* What applying a batch of edits produced: the new document, and a per-edit verdict.
|
|
175
|
+
*
|
|
176
|
+
* `results` is positionally aligned with the input, so an edit that failed is identified by its
|
|
177
|
+
* index rather than by anything the caller has to correlate.
|
|
178
|
+
*/
|
|
179
|
+
interface ApplyResult {
|
|
180
|
+
doc: DocxDocument;
|
|
181
|
+
/** One per edit, positionally aligned with the input. */
|
|
182
|
+
results: ExecResult[];
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The document-readable query vocabulary, keyed identically to {@link DocQueryResults}.
|
|
186
|
+
*
|
|
187
|
+
* An interface rather than a closed union for the same reason {@link DocEdits} is: an extension
|
|
188
|
+
* widens it by declaration merging, and the runtime dispatch is registry-backed.
|
|
189
|
+
*/
|
|
190
|
+
interface DocQueries {
|
|
191
|
+
paragraphs: {
|
|
192
|
+
container?: ContainerRef;
|
|
193
|
+
};
|
|
194
|
+
findText: {
|
|
195
|
+
text: string;
|
|
196
|
+
container?: ContainerRef;
|
|
197
|
+
};
|
|
198
|
+
contentControls: {
|
|
199
|
+
filter?: ContentControlFilter;
|
|
200
|
+
};
|
|
201
|
+
revisions: {
|
|
202
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
203
|
+
};
|
|
204
|
+
comments: {
|
|
205
|
+
resolved?: boolean;
|
|
206
|
+
};
|
|
207
|
+
styles: Record<never, never>;
|
|
208
|
+
variables: Record<never, never>;
|
|
209
|
+
}
|
|
210
|
+
/** One query, as a discriminated union derived from {@link DocQueries}. */
|
|
211
|
+
type DocQuery = {
|
|
212
|
+
[K in keyof DocQueries]: {
|
|
213
|
+
type: K;
|
|
214
|
+
} & DocQueries[K];
|
|
215
|
+
}[keyof DocQueries];
|
|
216
|
+
/** What each query returns. Keyed identically to `DocQueries`. */
|
|
217
|
+
interface DocQueryResults {
|
|
218
|
+
paragraphs: readonly ParagraphSummary[];
|
|
219
|
+
findText: readonly DocRange[];
|
|
220
|
+
contentControls: readonly ContentControlSummary[];
|
|
221
|
+
revisions: readonly Revision[];
|
|
222
|
+
comments: readonly DocComment[];
|
|
223
|
+
styles: StyleDefinitions;
|
|
224
|
+
variables: Readonly<Record<string, string>>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A paragraph reduced to what a listing needs: its stable handle, its text, and its style.
|
|
228
|
+
*
|
|
229
|
+
* `paraId` is what a follow-up edit addresses, so a summary without one names a paragraph the
|
|
230
|
+
* file gave no `w14:paraId` and that a `DocAnchor` cannot reach.
|
|
231
|
+
*/
|
|
232
|
+
interface ParagraphSummary {
|
|
233
|
+
readonly paraId?: string;
|
|
234
|
+
readonly text: string;
|
|
235
|
+
readonly styleId?: string;
|
|
236
|
+
}
|
|
237
|
+
/** A content control reduced to what a listing needs: its identity, kind, and lock state. */
|
|
238
|
+
interface ContentControlSummary {
|
|
239
|
+
readonly id: string;
|
|
240
|
+
readonly tag?: string;
|
|
241
|
+
readonly alias?: string;
|
|
242
|
+
readonly controlType: ContentControlType;
|
|
243
|
+
readonly locked?: boolean;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { type ApplyResult, ContainerRef, ContentControlFilter, type ContentControlSummary, ContentControlType, DocComment, type DocEdit, type DocEdits, type DocQueries, type DocQuery, type DocQueryResults, DocRange, DocTarget, DocxDocument, ExecResult, Extent, type ParagraphSummary, Revision, RunFormatting, StyleDefinitions };
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { DocxDocument, ExecResult, ContentControlType, DocTarget, RunFormatting, Extent, ContainerRef, ContentControlFilter, DocRange, Revision, DocComment, StyleDefinitions } from './types.js';
|
|
2
|
+
export { Block, ColorValue, ContentControl, DocAnchor, DocAnchorRange, DocLocation, DocumentBody, ExecErrorCode, HeaderFooterSet, IndentFormatting, Paragraph, RevisionType, Section, SectionProperties, StyleDefinition, Table, Theme, ThemeColorScheme } from './types.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `@docx-editor.dev/core/contracts/document` — the document-level edit and query vocabulary.
|
|
6
|
+
*
|
|
7
|
+
* The subset that means something without a live editor: what an automation host or an LLM tool
|
|
8
|
+
* can ask for and change.
|
|
9
|
+
*
|
|
10
|
+
* A CONTRACT module, not a barrel. `contracts/editor` builds the `Editor` command and query
|
|
11
|
+
* surfaces on top of these, so they cannot live in the package root: the root re-exports
|
|
12
|
+
* runtime from `../editor`, and a contract importing the root would invert the dependency —
|
|
13
|
+
* safe today only because that import is type-only, and one accidental value import away from
|
|
14
|
+
* pulling the painted engine into a server bundle.
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The document-executable edit vocabulary.
|
|
22
|
+
*
|
|
23
|
+
* An interface rather than a closed union so extensions can widen it by
|
|
24
|
+
* declaration merging. A sealed union cannot be extended by a plugin, and the
|
|
25
|
+
* runtime dispatch is already registry-backed.
|
|
26
|
+
*/
|
|
27
|
+
interface DocEdits {
|
|
28
|
+
insertText: {
|
|
29
|
+
target: DocTarget;
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
replaceText: {
|
|
33
|
+
target: DocTarget;
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
deleteText: {
|
|
37
|
+
target: DocTarget;
|
|
38
|
+
};
|
|
39
|
+
applyFormatting: {
|
|
40
|
+
target: DocTarget;
|
|
41
|
+
marks: RunFormatting;
|
|
42
|
+
};
|
|
43
|
+
setParagraphStyle: {
|
|
44
|
+
target: DocTarget;
|
|
45
|
+
styleId: string;
|
|
46
|
+
};
|
|
47
|
+
insertTable: {
|
|
48
|
+
target: DocTarget;
|
|
49
|
+
rows: number;
|
|
50
|
+
cols: number;
|
|
51
|
+
};
|
|
52
|
+
insertImage: {
|
|
53
|
+
target: DocTarget;
|
|
54
|
+
data: Uint8Array;
|
|
55
|
+
extent?: Extent;
|
|
56
|
+
};
|
|
57
|
+
insertHyperlink: {
|
|
58
|
+
target: DocTarget;
|
|
59
|
+
href: string;
|
|
60
|
+
text?: string;
|
|
61
|
+
};
|
|
62
|
+
removeHyperlink: {
|
|
63
|
+
target: DocTarget;
|
|
64
|
+
};
|
|
65
|
+
insertBreak: {
|
|
66
|
+
target: DocTarget;
|
|
67
|
+
kind: 'page' | 'column' | 'line' | 'section';
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Word's Increase/Decrease Indent.
|
|
71
|
+
*
|
|
72
|
+
* A numbered or bulleted paragraph changes LEVEL, so its marker re-resolves from the
|
|
73
|
+
* numbering definition — a bullet becomes a hollow circle, a `1.` becomes an `a.`.
|
|
74
|
+
* Every other paragraph moves its left indent by one default tab stop.
|
|
75
|
+
*/
|
|
76
|
+
adjustIndent: {
|
|
77
|
+
target: DocTarget;
|
|
78
|
+
direction: 'increase' | 'decrease';
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Word's Bullets and Numbering.
|
|
82
|
+
*
|
|
83
|
+
* Turns the selection into a list, or takes it out of one when it already is. The
|
|
84
|
+
* definition is created on first use, `numbering.xml` included.
|
|
85
|
+
*/
|
|
86
|
+
toggleList: {
|
|
87
|
+
target: DocTarget;
|
|
88
|
+
kind: 'bullet' | 'ordered';
|
|
89
|
+
};
|
|
90
|
+
splitParagraph: {
|
|
91
|
+
target: DocTarget;
|
|
92
|
+
};
|
|
93
|
+
mergeParagraphs: {
|
|
94
|
+
target: DocTarget;
|
|
95
|
+
};
|
|
96
|
+
setVariable: {
|
|
97
|
+
name: string;
|
|
98
|
+
value: string;
|
|
99
|
+
};
|
|
100
|
+
applyVariables: {
|
|
101
|
+
values: Record<string, string>;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Authored family. `author` is required: tracked-ness is verb identity, not a
|
|
105
|
+
* boolean flag, so there is no global trackChanges toggle to forget.
|
|
106
|
+
*/
|
|
107
|
+
proposeReplacement: {
|
|
108
|
+
target: DocTarget;
|
|
109
|
+
replaceWith: string;
|
|
110
|
+
author: string;
|
|
111
|
+
};
|
|
112
|
+
proposeInsertion: {
|
|
113
|
+
target: DocTarget;
|
|
114
|
+
text: string;
|
|
115
|
+
author: string;
|
|
116
|
+
};
|
|
117
|
+
proposeDeletion: {
|
|
118
|
+
target: DocTarget;
|
|
119
|
+
author: string;
|
|
120
|
+
};
|
|
121
|
+
addComment: {
|
|
122
|
+
target: DocTarget;
|
|
123
|
+
text: string;
|
|
124
|
+
author: string;
|
|
125
|
+
};
|
|
126
|
+
replyComment: {
|
|
127
|
+
commentId: string;
|
|
128
|
+
text: string;
|
|
129
|
+
author: string;
|
|
130
|
+
};
|
|
131
|
+
resolveComment: {
|
|
132
|
+
commentId: string;
|
|
133
|
+
};
|
|
134
|
+
acceptRevision: {
|
|
135
|
+
id: number;
|
|
136
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
137
|
+
noteId?: number;
|
|
138
|
+
};
|
|
139
|
+
rejectRevision: {
|
|
140
|
+
id: number;
|
|
141
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
142
|
+
noteId?: number;
|
|
143
|
+
};
|
|
144
|
+
acceptAllRevisions: Record<never, never>;
|
|
145
|
+
rejectAllRevisions: Record<never, never>;
|
|
146
|
+
setContentControlValue: {
|
|
147
|
+
target: DocTarget;
|
|
148
|
+
value: string;
|
|
149
|
+
};
|
|
150
|
+
removeContentControl: {
|
|
151
|
+
target: DocTarget;
|
|
152
|
+
};
|
|
153
|
+
addRepeatingSectionItem: {
|
|
154
|
+
target: DocTarget;
|
|
155
|
+
index?: number;
|
|
156
|
+
};
|
|
157
|
+
removeRepeatingSectionItem: {
|
|
158
|
+
target: DocTarget;
|
|
159
|
+
index: number;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* One edit, as a discriminated union derived from {@link DocEdits}.
|
|
164
|
+
*
|
|
165
|
+
* Adding a key to `DocEdits` — including by declaration merging from a plugin — widens this
|
|
166
|
+
* automatically, so the union never drifts from the vocabulary it is built out of.
|
|
167
|
+
*/
|
|
168
|
+
type DocEdit = {
|
|
169
|
+
[K in keyof DocEdits]: {
|
|
170
|
+
type: K;
|
|
171
|
+
} & DocEdits[K];
|
|
172
|
+
}[keyof DocEdits];
|
|
173
|
+
/**
|
|
174
|
+
* What applying a batch of edits produced: the new document, and a per-edit verdict.
|
|
175
|
+
*
|
|
176
|
+
* `results` is positionally aligned with the input, so an edit that failed is identified by its
|
|
177
|
+
* index rather than by anything the caller has to correlate.
|
|
178
|
+
*/
|
|
179
|
+
interface ApplyResult {
|
|
180
|
+
doc: DocxDocument;
|
|
181
|
+
/** One per edit, positionally aligned with the input. */
|
|
182
|
+
results: ExecResult[];
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The document-readable query vocabulary, keyed identically to {@link DocQueryResults}.
|
|
186
|
+
*
|
|
187
|
+
* An interface rather than a closed union for the same reason {@link DocEdits} is: an extension
|
|
188
|
+
* widens it by declaration merging, and the runtime dispatch is registry-backed.
|
|
189
|
+
*/
|
|
190
|
+
interface DocQueries {
|
|
191
|
+
paragraphs: {
|
|
192
|
+
container?: ContainerRef;
|
|
193
|
+
};
|
|
194
|
+
findText: {
|
|
195
|
+
text: string;
|
|
196
|
+
container?: ContainerRef;
|
|
197
|
+
};
|
|
198
|
+
contentControls: {
|
|
199
|
+
filter?: ContentControlFilter;
|
|
200
|
+
};
|
|
201
|
+
revisions: {
|
|
202
|
+
part?: 'body' | 'footnote' | 'endnote';
|
|
203
|
+
};
|
|
204
|
+
comments: {
|
|
205
|
+
resolved?: boolean;
|
|
206
|
+
};
|
|
207
|
+
styles: Record<never, never>;
|
|
208
|
+
variables: Record<never, never>;
|
|
209
|
+
}
|
|
210
|
+
/** One query, as a discriminated union derived from {@link DocQueries}. */
|
|
211
|
+
type DocQuery = {
|
|
212
|
+
[K in keyof DocQueries]: {
|
|
213
|
+
type: K;
|
|
214
|
+
} & DocQueries[K];
|
|
215
|
+
}[keyof DocQueries];
|
|
216
|
+
/** What each query returns. Keyed identically to `DocQueries`. */
|
|
217
|
+
interface DocQueryResults {
|
|
218
|
+
paragraphs: readonly ParagraphSummary[];
|
|
219
|
+
findText: readonly DocRange[];
|
|
220
|
+
contentControls: readonly ContentControlSummary[];
|
|
221
|
+
revisions: readonly Revision[];
|
|
222
|
+
comments: readonly DocComment[];
|
|
223
|
+
styles: StyleDefinitions;
|
|
224
|
+
variables: Readonly<Record<string, string>>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A paragraph reduced to what a listing needs: its stable handle, its text, and its style.
|
|
228
|
+
*
|
|
229
|
+
* `paraId` is what a follow-up edit addresses, so a summary without one names a paragraph the
|
|
230
|
+
* file gave no `w14:paraId` and that a `DocAnchor` cannot reach.
|
|
231
|
+
*/
|
|
232
|
+
interface ParagraphSummary {
|
|
233
|
+
readonly paraId?: string;
|
|
234
|
+
readonly text: string;
|
|
235
|
+
readonly styleId?: string;
|
|
236
|
+
}
|
|
237
|
+
/** A content control reduced to what a listing needs: its identity, kind, and lock state. */
|
|
238
|
+
interface ContentControlSummary {
|
|
239
|
+
readonly id: string;
|
|
240
|
+
readonly tag?: string;
|
|
241
|
+
readonly alias?: string;
|
|
242
|
+
readonly controlType: ContentControlType;
|
|
243
|
+
readonly locked?: boolean;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { type ApplyResult, ContainerRef, ContentControlFilter, type ContentControlSummary, ContentControlType, DocComment, type DocEdit, type DocEdits, type DocQueries, type DocQuery, type DocQueryResults, DocRange, DocTarget, DocxDocument, ExecResult, Extent, type ParagraphSummary, Revision, RunFormatting, StyleDefinitions };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHBL3NNH5_cjs=require('../chunk-HBL3NNH5.cjs');Object.defineProperty(exports,"EditorFontError",{enumerable:true,get:function(){return chunkHBL3NNH5_cjs.a}});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.cjs';
|
|
2
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-DS8DYX2a.cjs';
|
|
3
|
+
export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, Z as NotePropertiesSide, _ as NotePropertiesState, $ as PageSetup, a0 as ResolvedNoteNumbering, a1 as ReviewCommentPlacement, a2 as ReviewCustomPlacement, a3 as ReviewItemPlacement, a4 as ReviewItemPlacementBase, a5 as ReviewItemQuery, a6 as ReviewRevisionPlacement, S as SelectedImageState, a7 as SemanticIdentity, a8 as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, a9 as TableBorderTarget, aa as TableCellVerticalAlignment, ab as TableColumnDividerResizeTarget, ac as TableColumnOccurrenceTarget, o as TableContext, ad as TableRightEdgeResizeTarget, ae as TableRowOccurrenceTarget, af as TextMatch, V as ViewScope } from '../editor-D0UDock4.cjs';
|
|
4
|
+
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-D-Dszxrn.cjs';
|
|
5
|
+
export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.cjs';
|
|
6
|
+
export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-DMiW6nIH.cjs';
|
|
7
|
+
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-BpIydXtU.cjs';
|
|
8
|
+
import '../ooxml-tree-BU0e3DVi.cjs';
|
|
9
|
+
import '../semantic-records-CJR3BvHs.cjs';
|
|
10
|
+
import '../revision-projection-72ZApe-g.cjs';
|
|
11
|
+
import '../ooxml-package-CR5us6ad.cjs';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.js';
|
|
2
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-Fy3vdIea.js';
|
|
3
|
+
export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, Z as NotePropertiesSide, _ as NotePropertiesState, $ as PageSetup, a0 as ResolvedNoteNumbering, a1 as ReviewCommentPlacement, a2 as ReviewCustomPlacement, a3 as ReviewItemPlacement, a4 as ReviewItemPlacementBase, a5 as ReviewItemQuery, a6 as ReviewRevisionPlacement, S as SelectedImageState, a7 as SemanticIdentity, a8 as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, a9 as TableBorderTarget, aa as TableCellVerticalAlignment, ab as TableColumnDividerResizeTarget, ac as TableColumnOccurrenceTarget, o as TableContext, ad as TableRightEdgeResizeTarget, ae as TableRowOccurrenceTarget, af as TextMatch, V as ViewScope } from '../editor-C1QRi1v4.js';
|
|
4
|
+
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-Dy-dCUFF.js';
|
|
5
|
+
export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.js';
|
|
6
|
+
export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-CwOeiaQ8.js';
|
|
7
|
+
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-BJnTpG66.js';
|
|
8
|
+
import '../ooxml-tree-BU0e3DVi.js';
|
|
9
|
+
import '../semantic-records-CWodBJsz.js';
|
|
10
|
+
import '../revision-projection-DHAkcD_L.js';
|
|
11
|
+
import '../ooxml-package-D_CtywTW.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as EditorFontError}from'../chunk-REZUWYB7.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|