@betteroffice/docx 0.3.0 → 0.4.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.
Files changed (82) hide show
  1. package/README.md +66 -1
  2. package/dist/chunk-2HLVVQIL.mjs +1 -0
  3. package/dist/chunk-2QHGQA3V.mjs +1 -0
  4. package/dist/{chunk-ACGKK7IB.mjs → chunk-3CYO46ML.mjs} +1 -1
  5. package/dist/chunk-3OWET2KZ.mjs +1 -0
  6. package/dist/chunk-4GEXNR7A.mjs +1 -0
  7. package/dist/chunk-4QHAMEAS.mjs +1 -0
  8. package/dist/chunk-6CHGYCFU.mjs +1 -0
  9. package/dist/chunk-7DDF4RHB.mjs +16 -0
  10. package/dist/chunk-AOWJ4WDE.mjs +1 -0
  11. package/dist/chunk-C5BX34CG.mjs +2 -0
  12. package/dist/chunk-DKWD4P4J.mjs +1 -0
  13. package/dist/chunk-DLXIZBB6.mjs +1 -0
  14. package/dist/chunk-EIPVFGIC.mjs +1 -0
  15. package/dist/{chunk-NT2OYIJ4.mjs → chunk-FMOSOX5V.mjs} +1 -1
  16. package/dist/chunk-HPZFJGGM.mjs +0 -0
  17. package/dist/chunk-LT2GCWZ3.mjs +0 -0
  18. package/dist/chunk-NVN26RHH.mjs +1 -0
  19. package/dist/{chunk-QE4ZDRKV.mjs → chunk-YLFKV2NT.mjs} +1 -1
  20. package/dist/collaboration/index.d.mts +6 -4
  21. package/dist/compareDocx-QX2YF3EF.mjs +1 -0
  22. package/dist/computeLayout-4MNWHE2T.mjs +1 -0
  23. package/dist/core.d.mts +4 -4
  24. package/dist/core.mjs +1 -1
  25. package/dist/{displayListQueries-BYFrBkw5.d.mts → displayListQueries-DnHmHUPY.d.mts} +23 -5
  26. package/dist/docx/index.d.mts +2 -2
  27. package/dist/docx/index.mjs +1 -1
  28. package/dist/editor/index.d.mts +16 -7
  29. package/dist/editor/index.mjs +1 -1
  30. package/dist/{fontLoader-CkXcPB1C.d.mts → fontLoader-BNSs0E8K.d.mts} +54 -1
  31. package/dist/{frameDelta-CVt5FAXT.d.mts → frameDelta-ByU7HBuB.d.mts} +21 -1
  32. package/dist/generated/edit/docx_edit_bg.wasm +0 -0
  33. package/dist/generated/layout/docx_layout_bg.wasm +0 -0
  34. package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
  35. package/dist/generated/parse/docx_parse_bg.wasm +0 -0
  36. package/dist/{index-BbZwdkPz.d.mts → index-yOtBET85.d.mts} +769 -16
  37. package/dist/layout/index.d.mts +2 -2
  38. package/dist/layout/index.mjs +1 -1
  39. package/dist/layout/pagination/index.d.mts +2 -2
  40. package/dist/layout/render/index.d.mts +140 -32
  41. package/dist/layout/render/index.mjs +1 -1
  42. package/dist/loadWasmAsset-Cr95TImt.d.mts +25 -0
  43. package/dist/{pagedExport-D3E4jZ-B.d.mts → pagedExport-BmSlEhoP.d.mts} +1 -1
  44. package/dist/parseWasm-NLAG22EU.mjs +1 -0
  45. package/dist/plugin-api/RenderedDomContext.d.mts +6 -4
  46. package/dist/plugin-api/RenderedDomContext.mjs +1 -1
  47. package/dist/{rustDisplayList-CwOoUn3t.d.mts → rustDisplayList-DcaA5iok.d.mts} +12 -4
  48. package/dist/{rustMeasureSource-CyBMcy1x.d.mts → rustMeasureSource-BkCx1FDx.d.mts} +2 -0
  49. package/dist/types/document.d.mts +3 -0
  50. package/dist/{types-B4jD0rrc.d.mts → types-Buyw6dFd.d.mts} +32 -3
  51. package/dist/utils/index.d.mts +14 -2
  52. package/dist/utils/index.mjs +1 -1
  53. package/dist/wasm-6WSIEYWC.mjs +1 -0
  54. package/dist/wasm-GSI2XMOH.mjs +1 -0
  55. package/dist/{wasm-G62X4WRW.mjs → wasm-IBCLSJQU.mjs} +1 -1
  56. package/dist/wasm-edit.d.mts +191 -18
  57. package/dist/wasm-edit.mjs +1 -1
  58. package/dist/wasm-layout.d.mts +1 -1
  59. package/dist/wasm-layout.mjs +1 -1
  60. package/dist/wasm-opc.d.mts +1 -1
  61. package/dist/wasm-opc.mjs +1 -1
  62. package/dist/wasm-parse.d.mts +1 -1
  63. package/dist/wasm-parse.mjs +1 -1
  64. package/dist/yrs/index.d.mts +5 -3
  65. package/dist/yrs/index.mjs +1 -1
  66. package/dist/yrs/residentEngineWorker.mjs +1 -1
  67. package/package.json +2 -2
  68. package/dist/chunk-5B4VMUXM.mjs +0 -16
  69. package/dist/chunk-5F6DLQZP.mjs +0 -1
  70. package/dist/chunk-5JEQC76K.mjs +0 -1
  71. package/dist/chunk-7GJG6LLU.mjs +0 -1
  72. package/dist/chunk-FE6FWGBJ.mjs +0 -1
  73. package/dist/chunk-H5YYCN42.mjs +0 -1
  74. package/dist/chunk-HLDJMU3R.mjs +0 -1
  75. package/dist/chunk-J7LNO6SM.mjs +0 -1
  76. package/dist/chunk-PGMXWI5X.mjs +0 -1
  77. package/dist/chunk-VQXNED2P.mjs +0 -2
  78. package/dist/chunk-Z4HZIPBS.mjs +0 -1
  79. package/dist/compareDocx-XXTZV4CG.mjs +0 -1
  80. package/dist/computeLayout-LWLAJWYA.mjs +0 -1
  81. package/dist/loadWasmAsset-CMvnVkfA.d.mts +0 -3
  82. package/dist/wasm-US6R7SWN.mjs +0 -1
@@ -1,5 +1,6 @@
1
1
  export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.mjs';
2
- export { F as FONT_MAPPING, C as FontDefinition, T as ThemeMatrixCell, b as blendColors, c as canRenderFont, a as colorsEqual, d as createRgbColor, e as createThemeColor, f as darkenColor, g as ensureHexPrefix, D as extractFontsFromDocument, h as generateThemeTintShadeMatrix, i as getContrastingColor, E as getGoogleFontEquivalent, j as getLoadedFonts, k as getThemeTintShadeHex, l as isBlack, m as isFontLoaded, o as isGoogleFontsEnabled, n as isLoading, p as isWhite, q as lightenColor, G as loadDocumentFonts, r as loadFont, H as loadFontDefinitions, s as loadFontFromBuffer, I as loadFontFromUrl, J as loadFontWithMapping, t as loadFonts, K as loadFontsWithMapping, L as onFontError, u as onFontsLoaded, v as parseColorString, w as preloadCommonFonts, x as resolveColor, M as resolveColorToHex, y as resolveHighlightColor, z as resolveHighlightToCss, A as resolveShadingColor, B as setGoogleFontsEnabled } from '../fontLoader-CkXcPB1C.mjs';
2
+ import { F as FontLoadScope } from '../fontLoader-BNSs0E8K.mjs';
3
+ export { C as BufferFaceInput, D as FONT_MAPPING, E as FontDefinition, T as ThemeMatrixCell, b as blendColors, c as canRenderFont, a as colorsEqual, G as createFontLoadScope, d as createRgbColor, e as createThemeColor, f as darkenColor, g as ensureHexPrefix, H as extractFontsFromDocument, h as generateThemeTintShadeMatrix, i as getContrastingColor, I as getGoogleFontEquivalent, j as getLoadedFonts, k as getThemeTintShadeHex, l as isBlack, m as isFontLoaded, o as isGoogleFontsEnabled, n as isLoading, p as isWhite, q as lightenColor, J as loadDocumentFonts, r as loadFont, K as loadFontDefinitions, s as loadFontFromBuffer, L as loadFontFromUrl, M as loadFontWithMapping, t as loadFonts, N as loadFontsWithMapping, O as onFontError, u as onFontsLoaded, v as parseColorString, w as preloadCommonFonts, P as registerDocumentFaces, x as resolveColor, Q as resolveColorToHex, y as resolveHighlightColor, z as resolveHighlightToCss, A as resolveShadingColor, B as setGoogleFontsEnabled } from '../fontLoader-BNSs0E8K.mjs';
3
4
  export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
4
5
  import { F as FontTable } from '../styles-AryxLAhx.mjs';
5
6
  import { Document } from '../types/document.mjs';
@@ -109,6 +110,17 @@ declare function extractEmbeddedFontFaces(document: Document): Promise<EmbeddedF
109
110
  * @public
110
111
  */
111
112
  declare function loadEmbeddedFonts(fontTable: FontTable | undefined, rawFonts: ReadonlyMap<string, ArrayBuffer>, fontTableRelsXml: string | null | undefined): Promise<Set<string>>;
113
+ /**
114
+ * {@link loadEmbeddedFonts}, resolving to the CSS family each embedded family
115
+ * was registered under: its own name, or an alias when another live document
116
+ * registered different faces under that name (see {@link registerDocumentFaces}).
117
+ * With a scope, the faces are held until its next document or its disposal,
118
+ * and a call that a later document load into the scope overtook resolves to
119
+ * an empty map.
120
+ *
121
+ * @public
122
+ */
123
+ declare function loadEmbeddedFontFamilies(fontTable: FontTable | undefined, rawFonts: ReadonlyMap<string, ArrayBuffer>, fontTableRelsXml: string | null | undefined, scope?: FontLoadScope): Promise<Map<string, string>>;
112
124
 
113
125
  /**
114
126
  * Discover the fonts a document actually references and that the browser can
@@ -488,4 +500,4 @@ declare function createComment(allocator: CommentIdAllocator, text: string, auth
488
500
  */
489
501
  declare function sanitizeHref(href: string | null | undefined): string | undefined;
490
502
 
491
- export { type CellAnchor, type ColorMode, type CommentIdAllocator, DEFAULT_PARAGRAPH_FLASH_COLOR, DEFAULT_PARAGRAPH_FLASH_DURATION_MS, type EmbeddedFontFace, type HeadingInfo, PARAGRAPH_FLASH_CLASS_NAME, PENDING_COMMENT_ID, type ParagraphHighlightOptions, type ReadDocxFileResult, type RenderableFontOptions, type ScrollToParaIdOptions, type SplitLayoutResult, type SplitTarget, type WordSelectionResult, buildAnchorMaps, collectHeadings, computeSplitDialogDefaults, computeSplitLayout, createComment, createCommentIdAllocator, createDoubleClickWordSelector, createTripleClickParagraphSelector, deobfuscateFont, excludeFontsByName, expandSelectionToWordBoundaries, extractEmbeddedFontFaces, findParagraphFragmentsByParaId, findWordAt, findWordBoundaries, flashParagraphElements, flashParagraphFragmentsByParaId, getEmbeddedFontFaces, getEmbeddedFontFamilies, getRenderableDocumentFonts, getWordAt, handleClickForMultiClick, isValidFontKey, loadEmbeddedFonts, prefersColorSchemeDark, readDocxFileFromInput, redistributeColumnWidths, resolveIsDark, sanitizeHref, selectParagraphAtCursor, selectRenderableFonts, selectWordAtCursor, selectWordInTextNode, subscribeSystemDark, sumColumnWidths };
503
+ export { type CellAnchor, type ColorMode, type CommentIdAllocator, DEFAULT_PARAGRAPH_FLASH_COLOR, DEFAULT_PARAGRAPH_FLASH_DURATION_MS, type EmbeddedFontFace, FontLoadScope, type HeadingInfo, PARAGRAPH_FLASH_CLASS_NAME, PENDING_COMMENT_ID, type ParagraphHighlightOptions, type ReadDocxFileResult, type RenderableFontOptions, type ScrollToParaIdOptions, type SplitLayoutResult, type SplitTarget, type WordSelectionResult, buildAnchorMaps, collectHeadings, computeSplitDialogDefaults, computeSplitLayout, createComment, createCommentIdAllocator, createDoubleClickWordSelector, createTripleClickParagraphSelector, deobfuscateFont, excludeFontsByName, expandSelectionToWordBoundaries, extractEmbeddedFontFaces, findParagraphFragmentsByParaId, findWordAt, findWordBoundaries, flashParagraphElements, flashParagraphFragmentsByParaId, getEmbeddedFontFaces, getEmbeddedFontFamilies, getRenderableDocumentFonts, getWordAt, handleClickForMultiClick, isValidFontKey, loadEmbeddedFontFamilies, loadEmbeddedFonts, prefersColorSchemeDark, readDocxFileFromInput, redistributeColumnWidths, resolveIsDark, sanitizeHref, selectParagraphAtCursor, selectRenderableFonts, selectWordAtCursor, selectWordInTextNode, subscribeSystemDark, sumColumnWidths };
@@ -1 +1 @@
1
- export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as SIDEBAR_WIDTH}from'../chunk-YUOKI2HB.mjs';export{f as blendColors,r as colorsEqual,o as createRgbColor,n as createThemeColor,d as darkenColor,p as ensureHexPrefix,h as generateThemeTintShadeMatrix,c as getContrastingColor,g as getThemeTintShadeHex,k as isBlack,l as isWhite,e as lightenColor,m as parseColorString,a as resolveColor,b as resolveColorToHex,i as resolveHighlightColor,q as resolveHighlightToCss,j as resolveShadingColor}from'../chunk-LTVVQMHB.mjs';export{a as PIXELS_PER_INCH,e as TWIPS_PER_INCH,p as clamp,n as eighthsToPixels,b as emuToPixels,i as emuToTwips,q as formatPx,k as halfPointsToPixels,l as halfPointsToPoints,c as pixelsToEmu,h as pixelsToTwips,m as pointsToHalfPoints,d as pointsToPixels,o as roundPixels,j as twipsToEmu,g as twipsToPixels}from'../chunk-CTBUQRYQ.mjs';import {n,d}from'../chunk-5B4VMUXM.mjs';export{r as FONT_MAPPING,n as canRenderFont,c as deobfuscateFont,A as extractEmbeddedFontFaces,w as extractFontsFromDocument,z as getEmbeddedFontFaces,y as getEmbeddedFontFamilies,s as getGoogleFontEquivalent,k as getLoadedFonts,g as isFontLoaded,i as isGoogleFontsEnabled,j as isLoading,b as isValidFontKey,x as loadDocumentFonts,B as loadEmbeddedFonts,e as loadFont,q as loadFontDefinitions,o as loadFontFromBuffer,p as loadFontFromUrl,t as loadFontWithMapping,f as loadFonts,u as loadFontsWithMapping,m as onFontError,l as onFontsLoaded,v as preloadCommonFonts,h as setGoogleFontsEnabled,a as toArrayBuffer}from'../chunk-5B4VMUXM.mjs';import'../chunk-QE4ZDRKV.mjs';import'../chunk-HLDJMU3R.mjs';import'../chunk-ACGKK7IB.mjs';import'../chunk-5F6DLQZP.mjs';import'../chunk-TTRUPDAB.mjs';function H(e){let t=new Set,o=e.package;if(o.theme&&nt(o.theme,t),o.styles&&rt(o.styles,t),o.document)for(let n of o.document.content)T(n,t);if(o.headers)for(let n of o.headers.values())O(n,t);if(o.footers)for(let n of o.footers.values())O(n,t);if(o.footnotes)for(let n of o.footnotes)ut(n,t);if(o.endnotes)for(let n of o.endnotes)mt(n,t);return Array.from(t).sort()}function nt(e,t){let o=e.fontScheme;o&&(o.majorFont&&_(o.majorFont,t),o.minorFont&&_(o.minorFont,t));}function _(e,t){if(e.latin&&t.add(e.latin),e.ea&&t.add(e.ea),e.cs&&t.add(e.cs),e.fonts)for(let o of Object.values(e.fonts))o&&t.add(o);}function rt(e,t){e.docDefaults&&(e.docDefaults.rPr&&h(e.docDefaults.rPr,t),e.docDefaults.pPr?.runProperties&&h(e.docDefaults.pPr.runProperties,t));for(let o of e.styles)o.rPr&&h(o.rPr,t),o.pPr?.runProperties&&h(o.pPr.runProperties,t);}function h(e,t){let o=e.fontFamily;o&&(o.ascii&&t.add(o.ascii),o.hAnsi&&t.add(o.hAnsi),o.eastAsia&&t.add(o.eastAsia),o.cs&&t.add(o.cs));}function at(e,t){e.runProperties&&h(e.runProperties,t);}function T(e,t){e.type==="paragraph"?st(e,t):e.type==="table"&&ct(e,t);}function st(e,t){e.formatting&&at(e.formatting,t);for(let o of e.content)it(o,t);}function it(e,t){if(e.type==="run")b(e,t);else if(e.type==="hyperlink")lt(e,t);else if(e.type==="simpleField"||e.type==="complexField"){if("content"in e)for(let o of e.content)o.type==="run"&&b(o,t);if("fieldResult"in e)for(let o of e.fieldResult)b(o,t);}}function b(e,t){e.formatting&&h(e.formatting,t);}function lt(e,t){for(let o of e.children)o.type==="run"&&b(o,t);}function ct(e,t){for(let o of e.rows)ft(o,t);}function ft(e,t){for(let o of e.cells)dt(o,t);}function dt(e,t){for(let o of e.content)T(o,t);}function O(e,t){for(let o of e.content)T(o,t);}function ut(e,t){for(let o of e.content)T(o,t);}function mt(e,t){for(let o of e.content)T(o,t);}var pt=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui"]);function N(e,t={}){let o=t.canRender??n,n$1=new Set;for(let i of t.exclude??[])n$1.add(i.trim().toLowerCase());let r=new Set;for(let i of t.embeddedFamilies??[])r.add(i.trim().toLowerCase());let s=[],a=new Set;for(let i of e){let c=i.trim(),f=c.toLowerCase();!c||pt.has(f)||n$1.has(f)||a.has(f)||!r.has(f)&&!o(c)||(a.add(f),s.push({name:c,fontFamily:d(c).cssFallback,category:"other"}));}return s}function gt(e,t={}){return N(H(e),t)}function ht(e,t){if(!e||e.length===0)return [];let o=new Set;for(let s of t)o.add(s.trim().toLowerCase());let n=new Set,r=[];for(let s of e){let a=s.name.trim().toLowerCase();o.has(a)||n.has(a)||(n.add(a),r.push(s));}return r}function xt(e){let t=[];return e.descendants((o,n)=>{if(o.type.name==="paragraph"){let r=o.attrs.outlineLevel,s=o.attrs.styleId,a=r;if(a==null&&s){let i=s.match(/^[Hh]eading(\d)$/);i&&(a=parseInt(i[1],10)-1);}if(a!=null&&a>=0&&a<=8){let i="";o.forEach(c=>{c.isText&&(i+=c.text||"");}),i.trim()&&t.push({text:i.trim(),level:a,pmPos:n});}}}),t}var L="rgba(255, 235, 59, 0.55)",Ft=1200,y="docx-paragraph-flash",S=new WeakMap;function Tt(e){let t=globalThis;return typeof t.CSS?.escape=="function"?t.CSS.escape(e):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function bt(e){return e?.color?.trim()||L}function yt(e){let t=e?.durationMs;return t==null||!Number.isFinite(t)||t<0?1200:t}function k(e,t){if(!t||!t.trim())return [];let o=Tt(t);return Array.from(e.querySelectorAll(`.layout-paragraph[data-para-id="${o}"]`))}function W(e,t){let o=0,n=bt(t),r=yt(t);for(let s of e){o++;let a=S.get(s);a!==void 0&&clearTimeout(a),s.classList.remove(y),s.offsetWidth,s.style.setProperty("--docx-paragraph-flash-color",n),s.style.setProperty("--docx-paragraph-flash-duration",`${r}ms`),s.classList.add(y);let i=setTimeout(()=>{s.classList.remove(y),s.style.removeProperty("--docx-paragraph-flash-color"),s.style.removeProperty("--docx-paragraph-flash-duration"),S.delete(s);},r);S.set(s,i);}return o}function Ct(e,t,o){let n=k(e,t);return W(n,o)>0}function B(e,t,o){let n=0;for(let r=t;r<t+o&&r<e.length;r++)n+=e[r];return n}function At(e,t,o,n){let r=B(e,t,o),s=Math.floor(r/Math.max(n,1)),a=r-s*n,i=Array.from({length:n},(c,f)=>s+(f<a?1:0));return [...e.slice(0,t),...i,...e.slice(t+o)]}function St(e,t,o,n,r,s){let a=o-t.rowspan,i=n-t.colspan,c=r+a,f=t.row+t.rowspan,F=t.col+t.colspan,p=[];for(let l of e){if(l===t)continue;let g=l.row+l.rowspan,C=l.col+l.colspan,I=l.row<f&&g>t.row,v=l.col<F&&C>t.col;p.push({data:l.data,row:l.row>=f?l.row+a:l.row,col:l.col>=F?l.col+i:l.col,rowspan:l.rowspan+(a>0&&I&&!v?a:0),colspan:l.colspan+(i>0&&v&&!I?i:0)});}for(let l=0;l<o;l++)for(let g=0;g<n;g++){let C=l===0&&g===0;p.push({data:s(C,l,g),row:t.row+l,col:t.col+g,rowspan:1,colspan:1});}return {anchors:p,deltaRows:a,deltaCols:i,newRowCount:c}}function wt(e){let t=new Map,o=new Map;for(let n of e){t.set(`${n.row}-${n.col}`,n);for(let r=n.row;r<n.row+n.rowspan;r++)for(let s=n.col;s<n.col+n.colspan;s++)o.set(`${r}-${s}`,n);}return {byStart:t,byCoveredSlot:o}}function Et(e,t){let o=e>1||t>1;return {minRows:e,minCols:t,initialRows:e,initialCols:o?t:t+1}}var Pt=/[\p{L}\p{N}\p{M}_''\-]/u,Rt=/\s/;function w(e){return !e||e.length===0?false:Pt.test(e)}function E(e){return !e||e.length===0?false:Rt.test(e)}function m(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let o=e[t];if(E(o)){let n=t,r=t;for(;n>0&&E(e[n-1]);)n--;for(;r<e.length&&E(e[r]);)r++;return [n,r]}if(w(o)){let n=t,r=t;for(;n>0&&w(e[n-1]);)n--;for(;r<e.length&&w(e[r]);)r++;return [n,r]}return [t,t+1]}function Dt(e,t){let[o,n]=m(e,t);return e.slice(o,n)}function It(e,t){let[o,n]=m(e,t);return {word:e.slice(o,n),startIndex:o,endIndex:n}}function D(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),o=t.startContainer;if(o.nodeType===Node.TEXT_NODE){let n=o.textContent||"",r=t.startOffset,[s,a]=m(n,r);if(a>s)return t.setStart(o,s),t.setEnd(o,a),e.removeAllRanges(),e.addRange(t),true}if(o.nodeType===Node.ELEMENT_NODE){let n=o,r=G(n);if(r.length>0){let s=t.startOffset,a=null,i=s;if(s<n.childNodes.length){let c=n.childNodes[s];if(c.nodeType===Node.TEXT_NODE)a=c,i=0;else if(c instanceof Element){let f=G(c);f.length>0&&(a=f[0],i=0);}}if(!a&&r.length>0&&(a=r[0],i=0),a){let c=a.textContent||"",[f,F]=m(c,i);if(F>f){let p=document.createRange();return p.setStart(a,f),p.setEnd(a,F),e.removeAllRanges(),e.addRange(p),true}}}}return false}function vt(e,t){let o=window.getSelection();if(!o)return false;let n=e.textContent||"",[r,s]=m(n,t);if(s>r){let a=document.createRange();return a.setStart(e,r),a.setEnd(e,s),o.removeAllRanges(),o.addRange(a),true}return false}function Mt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return D();let o=t.startContainer,n=t.endContainer,r=t.startOffset,s=t.endOffset;if(o.nodeType===Node.TEXT_NODE){let a=o.textContent||"",[i]=m(a,t.startOffset);r=i;}if(n.nodeType===Node.TEXT_NODE){let a=n.textContent||"",i=Math.max(0,t.endOffset-1),[,c]=m(a,i);s=c;}try{return t.setStart(o,r),t.setEnd(n,s),e.removeAllRanges(),e.addRange(t),!0}catch(a){return console.warn("Could not expand selection to word boundaries:",a),false}}function X(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let o=e.getRangeAt(0).commonAncestorContainer,n=_t(o);if(n){let r=document.createRange();return r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),true}return false}function _t(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function G(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=o.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var P=0,x=null,R=null,Ot=500;function U(){P=0,R=null,x&&(clearTimeout(x),x=null);}function K(e){return e.target!==R&&U(),P++,R=e.target,x&&clearTimeout(x),x=setTimeout(U,Ot),Math.min(P,3)}function Ht(){return e=>{e.ctrlKey||e.metaKey||e.altKey||D();}}function Nt(){return e=>{if(K(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;X();}}}async function Lt(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}var $="(prefers-color-scheme: dark)";function z(){return typeof window<"u"&&typeof window.matchMedia=="function"}function kt(){return z()?window.matchMedia($).matches:false}function Wt(e,t){return e==="dark"||e==="system"&&t}function Bt(e){if(!z())return ()=>{};let t=window.matchMedia($);e(t.matches);let o=n=>e(n.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)}var Gt=-1;function Ut(){let e=1;return {next:()=>e++,seedAbove(t){t>=e&&(e=t+1);}}}function Xt(e,t,o,n){return {id:e.next(),author:o,date:new Date().toISOString(),content:[{type:"paragraph",formatting:{},content:[{type:"run",formatting:{},content:[{type:"text",text:t}]}]}],...n!==void 0&&{parentId:n}}}var Kt=/^[a-z][a-z0-9+.-]*:/i,$t=/^(https?|mailto|tel|ftp):/i;function zt(e){if(!e)return;let t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(t)return Kt.test(t)?$t.test(t)?e:void 0:e}export{L as DEFAULT_PARAGRAPH_FLASH_COLOR,Ft as DEFAULT_PARAGRAPH_FLASH_DURATION_MS,y as PARAGRAPH_FLASH_CLASS_NAME,Gt as PENDING_COMMENT_ID,wt as buildAnchorMaps,xt as collectHeadings,Et as computeSplitDialogDefaults,St as computeSplitLayout,Xt as createComment,Ut as createCommentIdAllocator,Ht as createDoubleClickWordSelector,Nt as createTripleClickParagraphSelector,ht as excludeFontsByName,Mt as expandSelectionToWordBoundaries,k as findParagraphFragmentsByParaId,It as findWordAt,m as findWordBoundaries,W as flashParagraphElements,Ct as flashParagraphFragmentsByParaId,gt as getRenderableDocumentFonts,Dt as getWordAt,K as handleClickForMultiClick,kt as prefersColorSchemeDark,Lt as readDocxFileFromInput,At as redistributeColumnWidths,Wt as resolveIsDark,zt as sanitizeHref,X as selectParagraphAtCursor,N as selectRenderableFonts,D as selectWordAtCursor,vt as selectWordInTextNode,Bt as subscribeSystemDark,B as sumColumnWidths};
1
+ export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as SIDEBAR_WIDTH}from'../chunk-YUOKI2HB.mjs';export{f as blendColors,r as colorsEqual,o as createRgbColor,n as createThemeColor,d as darkenColor,p as ensureHexPrefix,h as generateThemeTintShadeMatrix,c as getContrastingColor,g as getThemeTintShadeHex,k as isBlack,l as isWhite,e as lightenColor,m as parseColorString,a as resolveColor,b as resolveColorToHex,i as resolveHighlightColor,q as resolveHighlightToCss,j as resolveShadingColor}from'../chunk-LTVVQMHB.mjs';export{a as PIXELS_PER_INCH,e as TWIPS_PER_INCH,p as clamp,n as eighthsToPixels,b as emuToPixels,i as emuToTwips,q as formatPx,k as halfPointsToPixels,l as halfPointsToPoints,c as pixelsToEmu,h as pixelsToTwips,m as pointsToHalfPoints,d as pointsToPixels,o as roundPixels,j as twipsToEmu,g as twipsToPixels}from'../chunk-CTBUQRYQ.mjs';import {n,d}from'../chunk-7DDF4RHB.mjs';export{s as FONT_MAPPING,n as canRenderFont,z as createFontLoadScope,c as deobfuscateFont,C as extractEmbeddedFontFaces,x as extractFontsFromDocument,B as getEmbeddedFontFaces,A as getEmbeddedFontFamilies,t as getGoogleFontEquivalent,k as getLoadedFonts,g as isFontLoaded,i as isGoogleFontsEnabled,j as isLoading,b as isValidFontKey,y as loadDocumentFonts,E as loadEmbeddedFontFamilies,D as loadEmbeddedFonts,e as loadFont,r as loadFontDefinitions,o as loadFontFromBuffer,q as loadFontFromUrl,u as loadFontWithMapping,f as loadFonts,v as loadFontsWithMapping,m as onFontError,l as onFontsLoaded,w as preloadCommonFonts,p as registerDocumentFaces,h as setGoogleFontsEnabled,a as toArrayBuffer}from'../chunk-7DDF4RHB.mjs';import'../chunk-YLFKV2NT.mjs';import'../chunk-LT2GCWZ3.mjs';import'../chunk-HPZFJGGM.mjs';import'../chunk-2QHGQA3V.mjs';import'../chunk-3CYO46ML.mjs';import'../chunk-6CHGYCFU.mjs';import'../chunk-DLXIZBB6.mjs';import'../chunk-TTRUPDAB.mjs';function H(e){let t=new Set,o=e.package;if(o.theme&&st(o.theme,t),o.styles&&it(o.styles,t),o.document)for(let n of o.document.content)T(n,t);if(o.headers)for(let n of o.headers.values())O(n,t);if(o.footers)for(let n of o.footers.values())O(n,t);if(o.footnotes)for(let n of o.footnotes)gt(n,t);if(o.endnotes)for(let n of o.endnotes)ht(n,t);return Array.from(t).sort()}function st(e,t){let o=e.fontScheme;o&&(o.majorFont&&_(o.majorFont,t),o.minorFont&&_(o.minorFont,t));}function _(e,t){if(e.latin&&t.add(e.latin),e.ea&&t.add(e.ea),e.cs&&t.add(e.cs),e.fonts)for(let o of Object.values(e.fonts))o&&t.add(o);}function it(e,t){e.docDefaults&&(e.docDefaults.rPr&&h(e.docDefaults.rPr,t),e.docDefaults.pPr?.runProperties&&h(e.docDefaults.pPr.runProperties,t));for(let o of e.styles)o.rPr&&h(o.rPr,t),o.pPr?.runProperties&&h(o.pPr.runProperties,t);}function h(e,t){let o=e.fontFamily;o&&(o.ascii&&t.add(o.ascii),o.hAnsi&&t.add(o.hAnsi),o.eastAsia&&t.add(o.eastAsia),o.cs&&t.add(o.cs));}function lt(e,t){e.runProperties&&h(e.runProperties,t);}function T(e,t){e.type==="paragraph"?ct(e,t):e.type==="table"&&ut(e,t);}function ct(e,t){e.formatting&&lt(e.formatting,t);for(let o of e.content)ft(o,t);}function ft(e,t){if(e.type==="run")b(e,t);else if(e.type==="hyperlink")dt(e,t);else if(e.type==="simpleField"||e.type==="complexField"){if("content"in e)for(let o of e.content)o.type==="run"&&b(o,t);if("fieldResult"in e)for(let o of e.fieldResult)b(o,t);}}function b(e,t){e.formatting&&h(e.formatting,t);}function dt(e,t){for(let o of e.children)o.type==="run"&&b(o,t);}function ut(e,t){for(let o of e.rows)mt(o,t);}function mt(e,t){for(let o of e.cells)pt(o,t);}function pt(e,t){for(let o of e.content)T(o,t);}function O(e,t){for(let o of e.content)T(o,t);}function gt(e,t){for(let o of e.content)T(o,t);}function ht(e,t){for(let o of e.content)T(o,t);}var xt=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui"]);function L(e,t={}){let o=t.canRender??n,n$1=new Set;for(let i of t.exclude??[])n$1.add(i.trim().toLowerCase());let r=new Set;for(let i of t.embeddedFamilies??[])r.add(i.trim().toLowerCase());let s=[],a=new Set;for(let i of e){let c=i.trim(),f=c.toLowerCase();!c||xt.has(f)||n$1.has(f)||a.has(f)||!r.has(f)&&!o(c)||(a.add(f),s.push({name:c,fontFamily:d(c).cssFallback,category:"other"}));}return s}function Ft(e,t={}){return L(H(e),t)}function Tt(e,t){if(!e||e.length===0)return [];let o=new Set;for(let s of t)o.add(s.trim().toLowerCase());let n=new Set,r=[];for(let s of e){let a=s.name.trim().toLowerCase();o.has(a)||n.has(a)||(n.add(a),r.push(s));}return r}function bt(e){let t=[];return e.descendants((o,n)=>{if(o.type.name==="paragraph"){let r=o.attrs.outlineLevel,s=o.attrs.styleId,a=r;if(a==null&&s){let i=s.match(/^[Hh]eading(\d)$/);i&&(a=parseInt(i[1],10)-1);}if(a!=null&&a>=0&&a<=8){let i="";o.forEach(c=>{c.isText&&(i+=c.text||"");}),i.trim()&&t.push({text:i.trim(),level:a,pmPos:n});}}}),t}var N="rgba(255, 235, 59, 0.55)",yt=1200,y="docx-paragraph-flash",S=new WeakMap;function Ct(e){let t=globalThis;return typeof t.CSS?.escape=="function"?t.CSS.escape(e):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function At(e){return e?.color?.trim()||N}function St(e){let t=e?.durationMs;return t==null||!Number.isFinite(t)||t<0?1200:t}function k(e,t){if(!t||!t.trim())return [];let o=Ct(t);return Array.from(e.querySelectorAll(`.layout-paragraph[data-para-id="${o}"]`))}function W(e,t){let o=0,n=At(t),r=St(t);for(let s of e){o++;let a=S.get(s);a!==void 0&&clearTimeout(a),s.classList.remove(y),s.offsetWidth,s.style.setProperty("--docx-paragraph-flash-color",n),s.style.setProperty("--docx-paragraph-flash-duration",`${r}ms`),s.classList.add(y);let i=setTimeout(()=>{s.classList.remove(y),s.style.removeProperty("--docx-paragraph-flash-color"),s.style.removeProperty("--docx-paragraph-flash-duration"),S.delete(s);},r);S.set(s,i);}return o}function Et(e,t,o){let n=k(e,t);return W(n,o)>0}function B(e,t,o){let n=0;for(let r=t;r<t+o&&r<e.length;r++)n+=e[r];return n}function wt(e,t,o,n){let r=B(e,t,o),s=Math.floor(r/Math.max(n,1)),a=r-s*n,i=Array.from({length:n},(c,f)=>s+(f<a?1:0));return [...e.slice(0,t),...i,...e.slice(t+o)]}function Pt(e,t,o,n,r,s){let a=o-t.rowspan,i=n-t.colspan,c=r+a,f=t.row+t.rowspan,F=t.col+t.colspan,p=[];for(let l of e){if(l===t)continue;let g=l.row+l.rowspan,C=l.col+l.colspan,I=l.row<f&&g>t.row,v=l.col<F&&C>t.col;p.push({data:l.data,row:l.row>=f?l.row+a:l.row,col:l.col>=F?l.col+i:l.col,rowspan:l.rowspan+(a>0&&I&&!v?a:0),colspan:l.colspan+(i>0&&v&&!I?i:0)});}for(let l=0;l<o;l++)for(let g=0;g<n;g++){let C=l===0&&g===0;p.push({data:s(C,l,g),row:t.row+l,col:t.col+g,rowspan:1,colspan:1});}return {anchors:p,deltaRows:a,deltaCols:i,newRowCount:c}}function Rt(e){let t=new Map,o=new Map;for(let n of e){t.set(`${n.row}-${n.col}`,n);for(let r=n.row;r<n.row+n.rowspan;r++)for(let s=n.col;s<n.col+n.colspan;s++)o.set(`${r}-${s}`,n);}return {byStart:t,byCoveredSlot:o}}function Dt(e,t){let o=e>1||t>1;return {minRows:e,minCols:t,initialRows:e,initialCols:o?t:t+1}}var It=/[\p{L}\p{N}\p{M}_''\-]/u,vt=/\s/;function E(e){return !e||e.length===0?false:It.test(e)}function w(e){return !e||e.length===0?false:vt.test(e)}function m(e,t){if(!e||e.length===0)return [0,0];t=Math.max(0,Math.min(t,e.length-1));let o=e[t];if(w(o)){let n=t,r=t;for(;n>0&&w(e[n-1]);)n--;for(;r<e.length&&w(e[r]);)r++;return [n,r]}if(E(o)){let n=t,r=t;for(;n>0&&E(e[n-1]);)n--;for(;r<e.length&&E(e[r]);)r++;return [n,r]}return [t,t+1]}function Mt(e,t){let[o,n]=m(e,t);return e.slice(o,n)}function _t(e,t){let[o,n]=m(e,t);return {word:e.slice(o,n),startIndex:o,endIndex:n}}function D(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0),o=t.startContainer;if(o.nodeType===Node.TEXT_NODE){let n=o.textContent||"",r=t.startOffset,[s,a]=m(n,r);if(a>s)return t.setStart(o,s),t.setEnd(o,a),e.removeAllRanges(),e.addRange(t),true}if(o.nodeType===Node.ELEMENT_NODE){let n=o,r=G(n);if(r.length>0){let s=t.startOffset,a=null,i=s;if(s<n.childNodes.length){let c=n.childNodes[s];if(c.nodeType===Node.TEXT_NODE)a=c,i=0;else if(c instanceof Element){let f=G(c);f.length>0&&(a=f[0],i=0);}}if(!a&&r.length>0&&(a=r[0],i=0),a){let c=a.textContent||"",[f,F]=m(c,i);if(F>f){let p=document.createRange();return p.setStart(a,f),p.setEnd(a,F),e.removeAllRanges(),e.addRange(p),true}}}}return false}function Ot(e,t){let o=window.getSelection();if(!o)return false;let n=e.textContent||"",[r,s]=m(n,t);if(s>r){let a=document.createRange();return a.setStart(e,r),a.setEnd(e,s),o.removeAllRanges(),o.addRange(a),true}return false}function Ht(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.getRangeAt(0);if(t.collapsed)return D();let o=t.startContainer,n=t.endContainer,r=t.startOffset,s=t.endOffset;if(o.nodeType===Node.TEXT_NODE){let a=o.textContent||"",[i]=m(a,t.startOffset);r=i;}if(n.nodeType===Node.TEXT_NODE){let a=n.textContent||"",i=Math.max(0,t.endOffset-1),[,c]=m(a,i);s=c;}try{return t.setStart(o,r),t.setEnd(n,s),e.removeAllRanges(),e.addRange(t),!0}catch(a){return console.warn("Could not expand selection to word boundaries:",a),false}}function X(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let o=e.getRangeAt(0).commonAncestorContainer,n=Lt(o);if(n){let r=document.createRange();return r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),true}return false}function Lt(e){if(!e)return null;let t=e;for(;t;){if(t instanceof Element&&t.hasAttribute("data-paragraph-index"))return t;t=t.parentNode;}return null}function G(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n;for(;n=o.nextNode();)n.nodeType===Node.TEXT_NODE&&t.push(n);return t}var P=0,x=null,R=null,Nt=500;function U(){P=0,R=null,x&&(clearTimeout(x),x=null);}function K(e){return e.target!==R&&U(),P++,R=e.target,x&&clearTimeout(x),x=setTimeout(U,Nt),Math.min(P,3)}function kt(){return e=>{e.ctrlKey||e.metaKey||e.altKey||D();}}function Wt(){return e=>{if(K(e)===3){if(e.ctrlKey||e.metaKey||e.altKey)return;X();}}}async function Bt(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}var $="(prefers-color-scheme: dark)";function z(){return typeof window<"u"&&typeof window.matchMedia=="function"}function Gt(){return z()?window.matchMedia($).matches:false}function Ut(e,t){return e==="dark"||e==="system"&&t}function Xt(e){if(!z())return ()=>{};let t=window.matchMedia($);e(t.matches);let o=n=>e(n.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)}var Kt=-1;function $t(){let e=1;return {next:()=>e++,seedAbove(t){t>=e&&(e=t+1);}}}function zt(e,t,o,n){return {id:e.next(),author:o,date:new Date().toISOString(),content:[{type:"paragraph",formatting:{},content:[{type:"run",formatting:{},content:[{type:"text",text:t}]}]}],...n!==void 0&&{parentId:n}}}var jt=/^[a-z][a-z0-9+.-]*:/i,qt=/^(https?|mailto|tel|ftp):/i;function Qt(e){if(!e)return;let t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(t)return jt.test(t)?qt.test(t)?e:void 0:e}export{N as DEFAULT_PARAGRAPH_FLASH_COLOR,yt as DEFAULT_PARAGRAPH_FLASH_DURATION_MS,y as PARAGRAPH_FLASH_CLASS_NAME,Kt as PENDING_COMMENT_ID,Rt as buildAnchorMaps,bt as collectHeadings,Dt as computeSplitDialogDefaults,Pt as computeSplitLayout,zt as createComment,$t as createCommentIdAllocator,kt as createDoubleClickWordSelector,Wt as createTripleClickParagraphSelector,Tt as excludeFontsByName,Ht as expandSelectionToWordBoundaries,k as findParagraphFragmentsByParaId,_t as findWordAt,m as findWordBoundaries,W as flashParagraphElements,Et as flashParagraphFragmentsByParaId,Ft as getRenderableDocumentFonts,Mt as getWordAt,K as handleClickForMultiClick,Gt as prefersColorSchemeDark,Bt as readDocxFileFromInput,wt as redistributeColumnWidths,Ut as resolveIsDark,Qt as sanitizeHref,X as selectParagraphAtCursor,L as selectRenderableFonts,D as selectWordAtCursor,Ot as selectWordInTextNode,Xt as subscribeSystemDark,B as sumColumnWidths};
@@ -0,0 +1 @@
1
+ import'./chunk-EUUIJVM6.mjs';export{c as createEditSession,e as exportDocxMarkdownJson,d as exportDocxStructuredJson,h as findDocxContentControlsJson,g as listDocxContentControlsJson,a as preloadEditWasm,f as renderDocxMarkdownJson,i as renderDocxMarkdownWithPagesJson,b as setEditWasmHeapLimit}from'./chunk-EIPVFGIC.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -0,0 +1 @@
1
+ import'./chunk-HPZFJGGM.mjs';export{a as preloadOpcWasm,c as rezipContainer,b as unzipContainer}from'./chunk-2QHGQA3V.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1 +1 @@
1
- export{p as buildDisplayListJson,t as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,u as measureParagraphJson,f as openDisplayList,v as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,s as registerSubstituteMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-H5YYCN42.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{p as buildDisplayListJson,t as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,u as measureParagraphJson,f as openDisplayList,v as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,s as registerSubstituteMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-2HLVVQIL.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1,4 +1,4 @@
1
- import { W as WasmAsyncInput } from './loadWasmAsset-CMvnVkfA.mjs';
1
+ import { W as WasmAsyncInput } from './loadWasmAsset-Cr95TImt.mjs';
2
2
 
3
3
  /* tslint:disable */
4
4
  /* eslint-disable */
@@ -44,23 +44,27 @@ declare class EditSession {
44
44
  */
45
45
  add_undo_boundary(): void;
46
46
  /**
47
- * Deletes one character at this session's collapsed selection and returns
48
- * the resulting binary `FrameDelta`. `direction` is `"backward"` or
49
- * `"forward"`; a surrogate pair is removed whole. At a paragraph boundary
50
- * this merges with the neighbouring paragraph instead.
47
+ * Deletes up to `count` characters at this session's collapsed selection,
48
+ * lays out once, and returns the resulting binary `FrameDelta`.
49
+ * `direction` is `"backward"` or `"forward"`; a surrogate pair is removed
50
+ * whole. At a paragraph boundary a deletion merges with the neighbouring
51
+ * paragraph instead. Deleting stops early at the document start or end,
52
+ * before a second paragraph merge, or at a paragraph the resident state
53
+ * cannot absorb; [`EditSession::resident_deleted_units`] reports how many
54
+ * were removed.
51
55
  *
52
- * Errors on an unknown `direction`, when `expected_frame_epoch` is not a
53
- * non-negative safe integer, under the same selection and readiness
54
- * conditions as [`EditSession::apply_input`], and when there is no
55
- * character to delete in that direction (document start or end).
56
+ * Errors on an unknown `direction`, a zero `count`, when
57
+ * `expected_frame_epoch` is not a non-negative safe integer, under the
58
+ * same selection and readiness conditions as [`EditSession::apply_input`],
59
+ * and when there is no character to delete in that direction.
56
60
  */
57
- apply_delete(direction: string, expected_frame_epoch: number): Uint8Array;
61
+ apply_delete(direction: string, expected_frame_epoch: number, count: number): Uint8Array;
58
62
  /**
59
63
  * Instrumented twin of [`EditSession::apply_delete`]: identical arguments,
60
64
  * result and error contract, but it also records stage timings for
61
65
  * [`EditSession::apply_input_profile_json`].
62
66
  */
63
- apply_delete_profiled(direction: string, expected_frame_epoch: number): Uint8Array;
67
+ apply_delete_profiled(direction: string, expected_frame_epoch: number, count: number): Uint8Array;
64
68
  /**
65
69
  * Applies an edit batch all-or-nothing:
66
70
  * `{"ok":true,"baseVersion","version","applied","source","changedStories",
@@ -68,6 +72,11 @@ declare class EditSession {
68
72
  * `"separate"` makes it exactly one undo step.
69
73
  */
70
74
  apply_edits_json(request: string): string;
75
+ /**
76
+ * Applies an update another replica of this document committed for a host batch.
77
+ * It commits outside undo history and notifies as a local change.
78
+ */
79
+ apply_host_update(update: Uint8Array): void;
71
80
  /**
72
81
  * Applies one ordinary insertion at this session's collapsed selection
73
82
  * and returns the resulting binary `FrameDelta`. The inserted text
@@ -156,11 +165,22 @@ declare class EditSession {
156
165
  * Starts a new opening of the document; see [`EditingDoc::begin_opening`].
157
166
  */
158
167
  begin_opening(generation?: string | null): void;
168
+ /**
169
+ * Begins `layout_document_with_regions_retained_json` as a pass measured a
170
+ * step at a time; see `EngineSession::begin_region_layout`. Returns the
171
+ * progress JSON, with `layoutJson` once the pass is complete.
172
+ */
173
+ begin_region_layout(input: string): string;
174
+ /**
175
+ * Until the matching `end_shared_reads`, committed reads share story projections of each document state.
176
+ */
177
+ begin_shared_reads(): void;
159
178
  /**
160
179
  * Display-only input JSON in, one binary `FrameDelta` v1 out (exposed as
161
180
  * a transferable `Uint8Array`). `expected_frame_epoch` is the epoch of the
162
181
  * frame the caller currently holds; pass `0` for the first frame. A
163
- * mismatch makes the engine emit a full frame instead of a delta. Errors
182
+ * mismatch makes the engine emit a full frame instead of a delta, and the
183
+ * returned frame's epoch is always greater than `expected_frame_epoch`. Errors
164
184
  * unless the epoch is a non-negative safe integer, and on build failure.
165
185
  */
166
186
  build_display_list_frame(input: string, expected_frame_epoch: number): Uint8Array;
@@ -169,6 +189,12 @@ declare class EditSession {
169
189
  * against the same resident font store this session measures with.
170
190
  */
171
191
  build_display_list_json(input: string): string;
192
+ /**
193
+ * Build the listed pages that are still unbuilt and return a FrameDelta
194
+ * v1 carrying them; `expected_frame_epoch` works as for
195
+ * [`Self::build_display_list_frame`].
196
+ */
197
+ build_display_pages_frame(pages: Uint32Array, expected_frame_epoch: number): Uint8Array;
172
198
  /**
173
199
  * Whether [`EditSession::redo`] would reapply something.
174
200
  */
@@ -343,6 +369,10 @@ declare class EditSession {
343
369
  * with [`EditSession::resolve_encoded_selection`].
344
370
  */
345
371
  encoded_selection(): string;
372
+ /**
373
+ * Ends a shared-read scope, dropping shared story projections when the last scope ends.
374
+ */
375
+ end_shared_reads(): void;
346
376
  /**
347
377
  * [`EditSession::export_structured_json`] rendered as Markdown from the same read:
348
378
  * `{"ok":true,"version","content":{"markdown","anchors","diagnostics","truncated"}}`.
@@ -353,7 +383,7 @@ declare class EditSession {
353
383
  * snapshot. `fonts` holds the font files back to back, `font_lengths` their byte lengths;
354
384
  * `request` is a region layout request whose font chains name fonts by their index. The
355
385
  * reply is `{"ok":true,"content"}` or `{"ok":false,"failure"}`; a rejected font or an
356
- * unusable request throws. The module's shared measurement fonts are left untouched.
386
+ * unusable request throws. The session's measurement fonts are left untouched.
357
387
  */
358
388
  export_snapshot_with_private_fonts_json(fonts: Uint8Array, font_lengths: Uint32Array, request: string, options: string): string;
359
389
  /**
@@ -425,6 +455,10 @@ declare class EditSession {
425
455
  * Returns `{"ok":true,"version"}` or a refusal.
426
456
  */
427
457
  format_text_target_json(target_json: string, delta_json: string): string;
458
+ /**
459
+ * Whether the document has a story with this id.
460
+ */
461
+ has_story(story: string): boolean;
428
462
  /**
429
463
  * The headings of `story` in document order, classified as the structured export
430
464
  * classifies them: `[{"paraId","heading":{"outlineLevel","source"}}]`.
@@ -495,6 +529,16 @@ declare class EditSession {
495
529
  * with no host-side layout mutation. Retains the pass for resident edits.
496
530
  */
497
531
  layout_document_with_regions_json(input: string): string;
532
+ /**
533
+ * The retained region layout of the first `pages` pages only; see
534
+ * `EngineSession::layout_document_with_regions_prefix_retained_json`.
535
+ */
536
+ layout_document_with_regions_prefix_retained_json(input: string, pages: number): string;
537
+ /**
538
+ * [`Self::layout_document_with_regions_retained_json`] without the reply,
539
+ * for a caller that reads only the retained state.
540
+ */
541
+ layout_document_with_regions_retained(input: string): void;
498
542
  /**
499
543
  * Same full region pass as [`Self::layout_document_with_regions_json`],
500
544
  * but the reply carries only `{ layout, headersFooters?, notesConverged }`
@@ -550,6 +594,11 @@ declare class EditSession {
550
594
  * [`EditingDoc::begin_opening`].
551
595
  */
552
596
  load_json(stories_json: string): string;
597
+ /**
598
+ * Lays this replica's `data:` image sources out as the `media:{n}` tokens
599
+ * another replica seeded them from.
600
+ */
601
+ load_media_sources(json: string): void;
553
602
  /**
554
603
  * `{"start","end"}` — the paragraph's span in story-global UTF-16 units.
555
604
  * `end` is the index of its own pilcrow, so `end - start` is the
@@ -571,6 +620,26 @@ declare class EditSession {
571
620
  * the engine's message for input it cannot measure.
572
621
  */
573
622
  measure_paragraph_json(input: string): string;
623
+ /**
624
+ * The bytes a `media:{n}` image source displays, as the part's
625
+ * [`EditSession::media_type`]; `undefined` for any other source or a
626
+ * part that cannot be read.
627
+ */
628
+ media_bytes(token: string): Uint8Array | undefined;
629
+ /**
630
+ * The `data:` URL a `media:{n}` image source stands for.
631
+ */
632
+ media_data_url(token: string): string | undefined;
633
+ /**
634
+ * The digests mapping the `data:` URLs this replica seeded to
635
+ * `media:{n}` tokens, for [`EditSession::load_media_sources`]; empty
636
+ * when it seeded none.
637
+ */
638
+ media_sources_json(): string;
639
+ /**
640
+ * The media type of [`EditSession::media_bytes`].
641
+ */
642
+ media_type(token: string): string | undefined;
574
643
  /**
575
644
  * Merges the rectangle the [`TableRange`] `range_json` covers into its
576
645
  * top-left cell, whose story survives; the other cells' stories are
@@ -600,15 +669,29 @@ declare class EditSession {
600
669
  * Seeding starts a new opening, with `generation` or a fresh one, so its
601
670
  * session anchors are its own; see [`EditingDoc::begin_opening`].
602
671
  *
603
- * Returns `{"envelope","referencedFonts":[string, …]}`. The envelope is
672
+ * Returns `{"envelope","referencedFonts":[string, …],"unusedScriptFonts":[string, …]}`:
673
+ * `unusedScriptFonts` are the referenced fonts a seeded package names only
674
+ * for East Asian or complex-script text it does not contain. The envelope is
604
675
  * the parsed package with the parts the host does not need stripped —
605
676
  * body content, header/footer and note content, numbering, media and
606
677
  * charts are emptied, section entries keep only their properties — so
607
678
  * styles, theme, settings, fonts and relationships still cross while the
608
679
  * bulk of the document stays in Rust. Errors on bytes that are not a
609
680
  * readable DOCX.
681
+ * `digest`, when given, must be the SHA-256 of `bytes` in lowercase hex,
682
+ * as a host that hashed them off this thread already knows it.
683
+ */
684
+ open_docx(bytes: Uint8Array, seed_stories: boolean, generation?: string | null, digest?: string | null): string;
685
+ /**
686
+ * Opens `bytes` for display only, seeded from the body's first `blocks`
687
+ * blocks (see `seed::seed_docx_preview`): the reply is the host metadata
688
+ * of that parse, as [`EditSession::open_docx`] replies, with the
689
+ * `unusedScriptFonts` of its cut. The session keeps no source package, so
690
+ * it cannot save.
691
+ * Opens nothing and replies with nothing for a document the preview
692
+ * refuses, which opens with [`EditSession::open_docx`] instead.
610
693
  */
611
- open_docx(bytes: Uint8Array, seed_stories: boolean, generation?: string | null): string;
694
+ open_docx_preview(bytes: Uint8Array, blocks: number): string | undefined;
612
695
  /**
613
696
  * One glyph outline from this session's resident font store:
614
697
  * `{"upem":n,"cmds":[{"t":"M"|"L"|"Q"|"C"|"Z", …}]}` — commands in font
@@ -617,6 +700,11 @@ declare class EditSession {
617
700
  * Errors when the glyph cannot be extracted.
618
701
  */
619
702
  outline_glyph_json(font_id: number, glyph_id: number): string;
703
+ /**
704
+ * How many paragraphs of `story` carry `para_id`: 0, 1, or 2 for two or
705
+ * more. Errors on an unknown story.
706
+ */
707
+ paragraph_id_count(story: string, para_id: string): number;
620
708
  /**
621
709
  * Every paragraph's identities: `{"sessionId","packageSha256",
622
710
  * "paragraphs":[{"session","origin","ooxmlParaId","idOrigin",
@@ -701,9 +789,14 @@ declare class EditSession {
701
789
  * Replaces `[start, end)` with `text` in one transaction. The inserted
702
790
  * text adopts the first replaced unit's formatting; in suggesting mode
703
791
  * the deletion and the insertion share one revision id. Receipt:
704
- * `{"revisionId": string|null}`.
792
+ * `{"revisionId": string|null, "range": {"story", "start": {"paraId", "offset"}, "end": {"paraId", "offset"}}}`.
705
793
  */
706
794
  replace_range(story: string, start_para: string, start_offset: number, end_para: string, end_offset: number, text: string, author_name?: string | null, author_date?: string | null): string;
795
+ /**
796
+ * Makes the next display frame a full one whatever epoch its caller
797
+ * passes, for a host that switches to this engine from another.
798
+ */
799
+ reset_frame_base(): void;
707
800
  /**
708
801
  * `{"frameEpoch", "caretRect": {…}|null}` for the session's own collapsed
709
802
  * body selection. `caretRect` is null whenever there is no selection, the
@@ -711,6 +804,10 @@ declare class EditSession {
711
804
  * geometry for it. `frameEpoch` identifies the frame the rect belongs to.
712
805
  */
713
806
  resident_caret_snapshot_json(): string;
807
+ /**
808
+ * Characters the last [`EditSession::apply_delete`] removed.
809
+ */
810
+ resident_deleted_units(): number;
714
811
  /**
715
812
  * Where a comment's sticky anchors currently sit:
716
813
  * `[{"story","start","end"}, …]`, one entry per anchored range, in
@@ -740,16 +837,33 @@ declare class EditSession {
740
837
  * or the position no longer resolves in `story`.
741
838
  */
742
839
  resolve_sticky_position(story: string, position: Uint8Array): string;
840
+ /**
841
+ * Measures up to `blocks` more body blocks of the begun pass; see
842
+ * `EngineSession::resume_region_layout`.
843
+ */
844
+ resume_region_layout(blocks: number): string;
845
+ /**
846
+ * The retained region layout's `headersFooters` JSON, when it has any.
847
+ */
848
+ retained_headers_footers_json(): string | undefined;
743
849
  /**
744
850
  * Retained `{ measured, options }` for the main-thread display-list
745
851
  * fallback after a retained-only region layout.
746
852
  */
747
853
  retained_kernel_inputs_json(): string;
854
+ /**
855
+ * Author and date stamps for the requested revision ids.
856
+ */
857
+ revision_stamps_json(ids_json: string): string;
748
858
  search_text(query: string, case_sensitive: boolean, limit?: number | null): string;
749
859
  /**
750
860
  * [`EditSession::open_docx`] with seeding always on.
751
861
  */
752
862
  seed_from_docx(bytes: Uint8Array, generation?: string | null): string;
863
+ /**
864
+ * Unions seeded opaque sequence names into document state.
865
+ */
866
+ seed_opaque_sequences(names_json: string): void;
753
867
  /**
754
868
  * Selects a story, closing capture unless manual grouping is selected.
755
869
  */
@@ -847,6 +961,16 @@ declare class EditSession {
847
961
  * position holds no embed.
848
962
  */
849
963
  set_content_control_value_at(story: string, para_id: string, offset: number, value_json: string): void;
964
+ /**
965
+ * Keep every previously built page while windowed builds are on.
966
+ */
967
+ set_display_retain_built_pages(retain: boolean): void;
968
+ /**
969
+ * Limit full display builds to pages `start..end` plus the pages already
970
+ * built; the others stay unbuilt placeholders carrying their geometry
971
+ * until [`Self::build_display_pages_frame`] builds them.
972
+ */
973
+ set_display_window(start: number, end: number): void;
850
974
  /**
851
975
  * Sets or clears the hyperlink attribute over `[start, end)`.
852
976
  * `hyperlink_json` is `{"href", "tooltip"?, "rId"?}` or `null` to unlink.
@@ -871,6 +995,12 @@ declare class EditSession {
871
995
  * Errors when that position holds no image.
872
996
  */
873
997
  set_image_geometry_at(story: string, para_id: string, offset: number, geometry_json: string): void;
998
+ /**
999
+ * Whether [`EditSession::open_docx`] seeds images as `media:{n}` tokens,
1000
+ * which only a replica opened from the same package resolves, instead of
1001
+ * `data:` URLs. Off by default.
1002
+ */
1003
+ set_media_tokens(enabled: boolean): void;
874
1004
  /**
875
1005
  * Sets one paragraph property to any JSON value on `para_id`'s pilcrow,
876
1006
  * searching every story. Unlike
@@ -896,6 +1026,11 @@ declare class EditSession {
896
1026
  * identity such as `paraId`.
897
1027
  */
898
1028
  set_paragraph_attrs(story: string, start_para: string, start_offset: number, end_para: string, end_offset: number, attrs_json: string, author_name?: string | null, author_date?: string | null): void;
1029
+ /**
1030
+ * Marks whether the session's document is part of a package, as a
1031
+ * replica of a preview is: its layouts render NUMPAGES empty.
1032
+ */
1033
+ set_partial_document(partial: boolean): void;
899
1034
  /**
900
1035
  * Stores this peer's anchor and head as sticky positions, replacing any
901
1036
  * previous selection. Both endpoints must lie in `story`. The positions
@@ -923,6 +1058,16 @@ declare class EditSession {
923
1058
  * a second call replaces the first, and a throwing callback is ignored.
924
1059
  */
925
1060
  set_update_observer(callback: Function): void;
1061
+ /**
1062
+ * Limit incremental rebuilds to the display window and caret pages. Off by default.
1063
+ */
1064
+ set_windowed_incremental_builds(enabled: boolean): void;
1065
+ /**
1066
+ * Resolves tracked changes by revision id outside undo history:
1067
+ * `{"accept":[string, …],"reject":[string, …]}` -> `{"revisionIds":[string, …]}`, the ids
1068
+ * resolved. An id that matches nothing is skipped. See [`EditingDoc::settle_revisions`].
1069
+ */
1070
+ settle_revisions_json(request: string): string;
926
1071
  /**
927
1072
  * Splits the cell `at_json` ([`CellLoc`]) covers into a `rows` x
928
1073
  * `columns` grid; the original story stays in the top-left slot and every
@@ -948,6 +1093,11 @@ declare class EditSession {
948
1093
  * callback. Idempotent while observation is running.
949
1094
  */
950
1095
  start_update_event_observation(): void;
1096
+ /**
1097
+ * `{"revision","stories":[…]}`: the current story revision and the sorted
1098
+ * ids of the stories created, edited, or deleted after revision `since`.
1099
+ */
1100
+ stories_changed_since(since: number): string;
951
1101
  /**
952
1102
  * The story's `canonical-stream-v1` FNV-1a checksum (see
953
1103
  * [`crate::canonical`]) as a DECIMAL STRING, because a u64 exceeds the
@@ -971,6 +1121,17 @@ declare class EditSession {
971
1121
  * array of strings or `null` in document order. Errors on an unknown story.
972
1122
  */
973
1123
  story_paragraph_ids(story: string): string;
1124
+ /**
1125
+ * `story_segments` split after each pilcrow into units, as one hex digest
1126
+ * per unit: `["digest", …]`. Equal digests mean equal segments.
1127
+ */
1128
+ story_segment_unit_digests(story: string): string;
1129
+ /**
1130
+ * The segments of the listed units (indices into
1131
+ * `story_segment_unit_digests`), each as `story_segments` gives them:
1132
+ * `[[segment, …], …]`. Errors on an index past the last unit.
1133
+ */
1134
+ story_segment_units(story: string, units: Uint32Array): string;
974
1135
  /**
975
1136
  * The story as an ordered run of formatted segments — the same view
976
1137
  * lowering reads:
@@ -985,6 +1146,12 @@ declare class EditSession {
985
1146
  * tracked-change stamps. Errors on an unknown story.
986
1147
  */
987
1148
  story_segments(story: string): string;
1149
+ /**
1150
+ * The `payload` of the story's `table_index`-th table embed, as
1151
+ * `story_segments` gives it, or `None` when the story has no such
1152
+ * table. Errors on an unknown story.
1153
+ */
1154
+ table_payload(story: string, table_index: number): string | undefined;
988
1155
  /**
989
1156
  * Applies one run mark over `[start, end)`. `mark_json`:
990
1157
  * `{"type":"bold"|"italic"|"underline"|"strike"|"superscript"|"subscript"} |
@@ -1035,7 +1202,8 @@ declare class EditSession {
1035
1202
  * `{"themeColors":{slot: hex},"defaultTabStopTwips":number|null,
1036
1203
  * "pageContentHeight":number|null,"numericIds":{yrsId: number},
1037
1204
  * "tocStyleIds":[styleId],"showHiddenText":bool,
1038
- * "defaultParagraphStyleId":string}`, all
1205
+ * "defaultParagraphStyleId":string,
1206
+ * "revisionPreview":{revisionId: "accepted"|"rejected"}}`, all
1039
1207
  * optional. Errors when the story does not end in a pilcrow, holds a
1040
1208
  * malformed table, references itself through a cell story, or contains an
1041
1209
  * embed lowering does not support.
@@ -1057,6 +1225,11 @@ declare class EditSession {
1057
1225
 
1058
1226
  /** Load + instantiate the editing-core wasm (browser path). Idempotent. */
1059
1227
  declare function preloadEditWasm(input?: WasmAsyncInput): Promise<void>;
1228
+ /**
1229
+ * Caps the bytes the editing core in this thread may allocate at once; an
1230
+ * allocation past the cap fails as if the memory were full. Undefined removes it.
1231
+ */
1232
+ declare function setEditWasmHeapLimit(bytes: number | undefined): void;
1060
1233
  /**
1061
1234
  * Constructs a raw wasm `EditSession` replica after ensuring the module is
1062
1235
  * initialized. The `src/yrs/` facade wraps this in the typed `YrsSession`
@@ -1076,4 +1249,4 @@ declare function findDocxContentControlsJson(bytes: Uint8Array, query: string, o
1076
1249
  /** Markdown rendering of a paged export's JSON, with optional page markers. */
1077
1250
  declare function renderDocxMarkdownWithPagesJson(content: string, options: string): string;
1078
1251
 
1079
- export { EditSession, createEditSession, exportDocxMarkdownJson, exportDocxStructuredJson, findDocxContentControlsJson, listDocxContentControlsJson, preloadEditWasm, renderDocxMarkdownJson, renderDocxMarkdownWithPagesJson };
1252
+ export { EditSession, createEditSession, exportDocxMarkdownJson, exportDocxStructuredJson, findDocxContentControlsJson, listDocxContentControlsJson, preloadEditWasm, renderDocxMarkdownJson, renderDocxMarkdownWithPagesJson, setEditWasmHeapLimit };
@@ -1 +1 @@
1
- export{b as createEditSession,d as exportDocxMarkdownJson,c as exportDocxStructuredJson,g as findDocxContentControlsJson,f as listDocxContentControlsJson,a as preloadEditWasm,e as renderDocxMarkdownJson,h as renderDocxMarkdownWithPagesJson}from'./chunk-Z4HZIPBS.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{c as createEditSession,e as exportDocxMarkdownJson,d as exportDocxStructuredJson,h as findDocxContentControlsJson,g as listDocxContentControlsJson,a as preloadEditWasm,f as renderDocxMarkdownJson,i as renderDocxMarkdownWithPagesJson,b as setEditWasmHeapLimit}from'./chunk-EIPVFGIC.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1,4 +1,4 @@
1
- import { W as WasmAsyncInput } from './loadWasmAsset-CMvnVkfA.mjs';
1
+ import { W as WasmAsyncInput } from './loadWasmAsset-Cr95TImt.mjs';
2
2
 
3
3
  /**
4
4
  * Loader for the docx-layout wasm (the Rust display-list builder and the
@@ -1 +1 @@
1
- export{p as buildDisplayListJson,t as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,u as measureParagraphJson,f as openDisplayList,v as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,s as registerSubstituteMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-H5YYCN42.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{p as buildDisplayListJson,t as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,u as measureParagraphJson,f as openDisplayList,v as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,s as registerSubstituteMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-2HLVVQIL.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1,4 +1,4 @@
1
- import { W as WasmAsyncInput } from './loadWasmAsset-CMvnVkfA.mjs';
1
+ import { W as WasmAsyncInput } from './loadWasmAsset-Cr95TImt.mjs';
2
2
 
3
3
  /**
4
4
  * Loader for the ooxml-opc wasm (the OPC zip container: unzip/rezip with
package/dist/wasm-opc.mjs CHANGED
@@ -1 +1 @@
1
- export{a as preloadOpcWasm,c as rezipContainer,b as unzipContainer}from'./chunk-HLDJMU3R.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{a as preloadOpcWasm,c as rezipContainer,b as unzipContainer}from'./chunk-2QHGQA3V.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1,4 +1,4 @@
1
- import { W as WasmAsyncInput } from './loadWasmAsset-CMvnVkfA.mjs';
1
+ import { W as WasmAsyncInput } from './loadWasmAsset-Cr95TImt.mjs';
2
2
 
3
3
  /**
4
4
  * Loader for the docx-parse wasm (the Rust DOCX parser/serializer wire).
@@ -1 +1 @@
1
- export{h as decodeTiffImage,b as parseDocxS9Wire,c as parseRelationshipsXmlWire,a as preloadParseWasm,d as serializeDocxS10Wire,e as serializeDocxS11Wire,f as serializeDocxS12Wire,g as writeDocxS13Wire}from'./chunk-ACGKK7IB.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
1
+ export{h as decodeTiffImage,b as parseDocxS9Wire,c as parseRelationshipsXmlWire,a as preloadParseWasm,d as serializeDocxS10Wire,e as serializeDocxS11Wire,f as serializeDocxS12Wire,g as writeDocxS13Wire}from'./chunk-3CYO46ML.mjs';import'./chunk-6CHGYCFU.mjs';import'./chunk-TTRUPDAB.mjs';
@@ -1,9 +1,11 @@
1
1
  import '../formatting-gqLFeJ9X.mjs';
2
2
  import '../types/document.mjs';
3
- export { w as CreateYrsSessionOptions, D as DocxParagraphAnchor, x as DocxParagraphAnchorResult, y as DocxParagraphIdAssignment, z as DocxParagraphIdDiagnostic, A as DocxParagraphIdOrigin, B as DocxParagraphIdRefusal, E as DocxParagraphIdentity, F as DocxParagraphIdentityReceipt, G as DocxParagraphIdentitySnapshot, H as DocxParagraphOrigin, I as DocxParagraphRef, J as DocxParagraphSavePlan, K as DocxPersistedParagraphAnchor, L as DocxSavedDocument, M as DocxSavedParagraph, N as DocxSessionParagraphAnchor, O as DocxSessionSave, P as DocxSourceParagraphAnchor, Q as DocxSourceStory, R as ResidentCaretPaintStyle, S as ResidentEngineOffscreenPage, T as ResidentEngineWorkerApplyResult, U as ResidentEngineWorkerClient, V as ResidentEngineWorkerFrame, W as ResidentWorkerFailureError, X as YrsAuthor, Z as YrsCellBorder, _ as YrsCellBorders, $ as YrsCellLoc, a0 as YrsChangeTarget, a1 as YrsCommentInfo, a2 as YrsCommentReceipt, a3 as YrsContentControlValue, a4 as YrsDocxHost, a5 as YrsEngineApplyProfile, a6 as YrsHyperlinkAttrs, a7 as YrsImageGeometry, a8 as YrsInlineFormatDelta, a9 as YrsInputParagraphSeed, aa as YrsInputParagraphSpan, ab as YrsInputPositionMap, u as YrsLoc, ac as YrsNumberingProperties, ad as YrsOpeningOptions, ae as YrsParaOffset, af as YrsParagraph, ag as YrsParagraphAttrs, ah as YrsParagraphLength, ai as YrsParagraphReceipt, aj as YrsParagraphSeed, ak as YrsParagraphSpan, al as YrsParagraphTabStop, am as YrsRawOp, a as YrsRenderEnv, an as YrsResidentCaretRect, ao as YrsResidentCaretSnapshot, ap as YrsResidentFontRegistration, aq as YrsResidentWorkerSnapshot, ar as YrsResidentWorkerSyncOptions, as as YrsResolveReceipt, at as YrsResolvedCommentAnchor, v as YrsRevisionInfo, au as YrsRevisionReceipt, av as YrsRunMark, j as YrsSelection, aw as YrsSelectionContext, ax as YrsSelectionText, Y as YrsSession, ay as YrsSplitReceipt, az as YrsStickyPosition, aA as YrsStoryRange, aB as YrsStorySeed, aC as YrsStorySegment, aD as YrsTableLoc, aE as YrsTableRange, aF as YrsTableReceipt, aG as YrsTargetEditResult, aH as YrsTextColor, aI as YrsTextMatch, aJ as YrsTextSearchOptions, aK as YrsTriState, aL as YrsUndoCaptureMode, aM as YrsWatermark, aN as canUseResidentEngineWorker, aO as captureSessionSave, aP as compareYrsLocs, aQ as createYrsInputPositionMap, aR as createYrsSession, aS as displayPositionToYrsLoc, aT as documentToYrs, aU as residentCaretDeviceRect, aV as residentCaretSnapshotForFrame, aW as sameYrsSelection, aX as saveYrsDocx, aY as writeSessionSave, aZ as yrsLocToDisplayPosition, a_ as yrsToDocument } from '../index-BbZwdkPz.mjs';
4
- export { o as DocxAnchor, p as DocxAnchorScope, a9 as DocxAtomKind, q as DocxCachedResult, r as DocxCommentMetadata, s as DocxContentControl, t as DocxContentControlDiagnostic, l as DocxContentControlQuery, k as DocxContentControlReadFailure, u as DocxContentControlSelector, v as DocxContentControlValue, m as DocxContentControlsOptions, w as DocxContentControlsResult, n as DocxContentControlsSnapshot, x as DocxControlMetadata, aa as DocxEditFailure, ab as DocxEditFailureCode, ac as DocxEditFailureReason, ad as DocxEditGuard, ae as DocxEditHistory, af as DocxEditOperation, ag as DocxEditPreview, ah as DocxEditReceipt, a8 as DocxEditRefusal, a4 as DocxEditRequest, a6 as DocxEditResult, ai as DocxEditSource, aj as DocxEditStep, ak as DocxEditSuggestion, al as DocxEditTarget, y as DocxExportBlock, z as DocxExportCell, A as DocxExportDiagnostic, B as DocxExportDiagnosticCode, D as DocxExportFailure, C as DocxExportFailureCode, E as DocxExportInline, a as DocxExportOptions, F as DocxExportPage, G as DocxExportRefusal, H as DocxExportResult, I as DocxExportStory, J as DocxExportTable, a2 as DocxFindTextRequest, a3 as DocxFindTextResult, K as DocxFormattingMark, L as DocxFragmentGeometry, M as DocxHeadingInfo, N as DocxHeadlessFont, e as DocxHeadlessLayoutOptions, O as DocxInlineRevision, i as DocxLayoutMap, P as DocxLayoutProvenance, Q as DocxListInfo, b as DocxMarkdownContent, h as DocxMarkdownOptions, R as DocxPageDiagnostic, d as DocxPageExportOptions, S as DocxPageFragment, T as DocxPageMapContent, j as DocxPageMarkdownOptions, f as DocxPagedStructuredContent, U as DocxParagraphData, V as DocxParagraphHeading, am as DocxParagraphInput, an as DocxParagraphTarget, ao as DocxParagraphText, a0 as DocxReadParagraphsRequest, a1 as DocxReadParagraphsResult, ap as DocxResolvedControl, W as DocxRevisionView, aq as DocxSearchScope, ar as DocxSetContentControlTextStep, g as DocxSnapshotLayoutMap, X as DocxSnapshotLayoutProvenance, Y as DocxStoryKind, Z as DocxStoryOccurrence, _ as DocxStorySelection, c as DocxStructuredContent, as as DocxTextAtom, at as DocxTextMatch, au as DocxTextPosition, av as DocxTextRange, a7 as DocxTextTarget, aw as DocxTextView, $ as DocxUnlocatedReason, a5 as DocxValidationResult, ax as EditSuccess, ay as OperationFailure, az as OperationRefusal, aA as ValidationSuccess } from '../pagedExport-D3E4jZ-B.mjs';
3
+ export { A as AnchorGeometryTarget, x as AnchorReader, y as AnchorResolutionFailure, z as CreateYrsSessionOptions, D as DocxOccurrence, B as DocxParagraphAnchor, E as DocxParagraphAnchorResult, F as DocxParagraphIdAssignment, G as DocxParagraphIdDiagnostic, H as DocxParagraphIdOrigin, I as DocxParagraphIdRefusal, J as DocxParagraphIdentity, K as DocxParagraphIdentityReceipt, L as DocxParagraphIdentitySnapshot, M as DocxParagraphOrigin, N as DocxParagraphRef, O as DocxParagraphSavePlan, P as DocxPersistedParagraphAnchor, Q as DocxProposalFailure, R as DocxProposalInput, S as DocxProposalRecord, T as DocxProposalRegistryState, U as DocxProposalRequest, V as DocxProposalResult, W as DocxProposalSnapshot, X as DocxProposalState, Z as DocxProposalStateRequest, _ as DocxProposalWithdrawRequest, $ as DocxSavedDocument, a0 as DocxSavedParagraph, a1 as DocxSessionParagraphAnchor, a2 as DocxSessionSave, a3 as DocxSourceParagraphAnchor, a4 as DocxSourceStory, a5 as ProposalDisplayTarget, a6 as ProposalGeometryMirror, a7 as ProposalGeometryReader, a8 as ProposalGeometryTarget, a9 as RawAnchorRange, aa as ResidentCaretPaintStyle, ab as ResidentEngineOffscreenPage, ac as ResidentEngineWorkerApplyResult, ad as ResidentEngineWorkerClient, ae as ResidentEngineWorkerFrame, af as ResidentEngineWorkerOpened, ag as ResidentProposalReply, ah as ResidentWorkerFailureError, ai as ResidentWorkerOutOfMemoryError, aj as YrsAuthor, ak as YrsCellBorder, al as YrsCellBorders, am as YrsCellLoc, an as YrsChangeTarget, ao as YrsCommentInfo, ap as YrsCommentReceipt, aq as YrsContentControlValue, ar as YrsDocxHost, as as YrsEngineApplyProfile, at as YrsHyperlinkAttrs, au as YrsImageGeometry, av as YrsInlineFormatDelta, aw as YrsInputParagraphSeed, ax as YrsInputParagraphSpan, ay as YrsInputPositionMap, u as YrsLoc, az as YrsMediaSource, aA as YrsNumberingProperties, aB as YrsOpeningOptions, aC as YrsParaOffset, aD as YrsParagraph, aE as YrsParagraphAttrs, aF as YrsParagraphLength, aG as YrsParagraphReceipt, aH as YrsParagraphSeed, aI as YrsParagraphSpan, aJ as YrsParagraphTabStop, aK as YrsPointerProjectionTarget, aL as YrsPositionProjection, aM as YrsProjectedCell, aN as YrsProjectedNode, aO as YrsProjectedTable, aP as YrsRawOp, aQ as YrsRegionLayoutProgress, a as YrsRenderEnv, aR as YrsReplaceReceipt, aS as YrsResidentCaretRect, aT as YrsResidentCaretSnapshot, aU as YrsResidentFontRegistration, aV as YrsResidentWorkerSnapshot, aW as YrsResidentWorkerSyncOptions, aX as YrsResolveReceipt, aY as YrsResolvedCommentAnchor, w as YrsRevisionInfo, aZ as YrsRevisionReceipt, a_ as YrsRunMark, j as YrsSelection, a$ as YrsSelectionContext, b0 as YrsSelectionText, Y as YrsSession, b1 as YrsSplitReceipt, b2 as YrsStickyPosition, b3 as YrsStoryRange, b4 as YrsStorySeed, v as YrsStorySegment, b5 as YrsStorySegmentSource, b6 as YrsTableLoc, b7 as YrsTableRange, b8 as YrsTableReceipt, b9 as YrsTargetEditResult, ba as YrsTextColor, bb as YrsTextMatch, bc as YrsTextSearchOptions, bd as YrsTriState, be as YrsUndoCaptureMode, bf as YrsWatermark, bg as YrsWorkerDocumentMirror, bh as anchorFailure, bi as canUseResidentEngineWorker, bj as captureSessionSave, bk as compareYrsLocs, bl as computeProposalGeometryMirror, bm as createYrsInputPositionMap, bn as createYrsPositionProjection, bo as createYrsSession, bp as decodeDocxHostJson, bq as displayPositionToYrsLoc, br as documentToYrs, bs as editorSaveKeys, bt as hiddenRanges, bu as isBodyStory, bv as preloadDocxEngine, bw as preloadResidentEngineWorker, bx as prepareDocxBytes, by as preparedDocxDigest, bz as projectYrsDisplayPosition, bA as proposalRevisionPreview, bB as proposalSetIdentity, bC as residentCaretDeviceRect, bD as residentCaretSnapshotForFrame, bE as resolveAnchorTarget, bF as resolveNavigationTarget, bG as retainPreloadedResidentEngineWorker, bH as sameYrsSelection, bI as saveYrsDocx, bJ as sessionSourcePackage, bK as takePreloadedResidentEngineWorker, bL as textRangeToRaw, bM as writeSessionSave, bN as yrsLocToDisplayPosition, bO as yrsLocToProjectedDisplayPosition, bP as yrsToDocument } from '../index-yOtBET85.mjs';
4
+ export { o as DocxAnchor, p as DocxAnchorScope, ad as DocxAtomKind, q as DocxCachedResult, r as DocxCommentMetadata, s as DocxContentControl, t as DocxContentControlDiagnostic, l as DocxContentControlQuery, k as DocxContentControlReadFailure, u as DocxContentControlSelector, v as DocxContentControlValue, m as DocxContentControlsOptions, w as DocxContentControlsResult, n as DocxContentControlsSnapshot, x as DocxControlMetadata, a1 as DocxEditFailure, a2 as DocxEditFailureCode, ae as DocxEditFailureReason, af as DocxEditGuard, ag as DocxEditHistory, ah as DocxEditOperation, ai as DocxEditPreview, aj as DocxEditReceipt, ac as DocxEditRefusal, a8 as DocxEditRequest, aa as DocxEditResult, ak as DocxEditSource, al as DocxEditStep, a0 as DocxEditSuggestion, am as DocxEditTarget, y as DocxExportBlock, z as DocxExportCell, A as DocxExportDiagnostic, B as DocxExportDiagnosticCode, D as DocxExportFailure, C as DocxExportFailureCode, E as DocxExportInline, a as DocxExportOptions, F as DocxExportPage, G as DocxExportRefusal, H as DocxExportResult, I as DocxExportStory, J as DocxExportTable, a6 as DocxFindTextRequest, a7 as DocxFindTextResult, K as DocxFormattingMark, L as DocxFragmentGeometry, M as DocxHeadingInfo, N as DocxHeadlessFont, e as DocxHeadlessLayoutOptions, O as DocxInlineRevision, i as DocxLayoutMap, P as DocxLayoutProvenance, Q as DocxListInfo, b as DocxMarkdownContent, h as DocxMarkdownOptions, R as DocxPageDiagnostic, d as DocxPageExportOptions, S as DocxPageFragment, T as DocxPageMapContent, j as DocxPageMarkdownOptions, f as DocxPagedStructuredContent, U as DocxParagraphData, V as DocxParagraphHeading, an as DocxParagraphInput, ao as DocxParagraphTarget, ap as DocxParagraphText, a4 as DocxReadParagraphsRequest, a5 as DocxReadParagraphsResult, aq as DocxResolvedControl, W as DocxRevisionView, ar as DocxSearchScope, as as DocxSetContentControlTextStep, g as DocxSnapshotLayoutMap, X as DocxSnapshotLayoutProvenance, Y as DocxStoryKind, Z as DocxStoryOccurrence, _ as DocxStorySelection, c as DocxStructuredContent, at as DocxTextAtom, au as DocxTextMatch, av as DocxTextPosition, a3 as DocxTextRange, ab as DocxTextTarget, aw as DocxTextView, $ as DocxUnlocatedReason, a9 as DocxValidationResult, ax as EditSuccess, ay as OperationFailure, az as OperationRefusal, aA as ValidationSuccess } from '../pagedExport-BmSlEhoP.mjs';
5
+ export { b as WASM32_MEMORY_LIMIT_BYTES, c as WasmHeapStats, a as WasmModuleMemory, w as wasmModuleMemories } from '../loadWasmAsset-Cr95TImt.mjs';
5
6
  import '../content-BzoC6bSz.mjs';
6
7
  import '../docx/wrapTypes.mjs';
7
8
  import '../styles-AryxLAhx.mjs';
8
- import '../frameDelta-CVt5FAXT.mjs';
9
+ import '../frameDelta-ByU7HBuB.mjs';
9
10
  import '../rezip-Bxiq4Z_R.mjs';
11
+ import '../plugin-api/index.mjs';