@betteroffice/docx 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -6
- package/dist/chunk-47Q2FMFF.mjs +1 -0
- package/dist/chunk-6LQJAKOC.mjs +1 -0
- package/dist/chunk-ACGKK7IB.mjs +1 -0
- package/dist/{chunk-PI2I3TO5.mjs → chunk-AFMVSI4Z.mjs} +2 -2
- package/dist/chunk-GD4VNJ64.mjs +1 -0
- package/dist/{chunk-BUZ2X5CT.mjs → chunk-JHJLG4I6.mjs} +1 -1
- package/dist/chunk-PGMXWI5X.mjs +1 -0
- package/dist/{chunk-VRGUAKOC.mjs → chunk-WTFRNX5K.mjs} +1 -1
- package/dist/collaboration/index.d.mts +6 -6
- package/dist/{content-DrqzbIr7.d.mts → content-CvEtPl0c.d.mts} +59 -6
- package/dist/core.d.mts +7 -7
- package/dist/core.mjs +1 -1
- package/dist/{displayListQueries-DGDR-OWc.d.mts → displayListQueries-DF8F6fMl.d.mts} +2 -2
- package/dist/docx/index.d.mts +3 -3
- package/dist/docx/index.mjs +1 -1
- package/dist/editor/index.d.mts +20 -11
- package/dist/editor/index.mjs +1 -1
- package/dist/{fontLoader-DnixuYST.d.mts → fontLoader-b8eicJKV.d.mts} +1 -1
- package/dist/{formatting-BqrFPeev.d.mts → formatting-7zKCTu5a.d.mts} +3 -2
- package/dist/{frameDelta-DMgR8n13.d.mts → frameDelta-pA4jrQ1G.d.mts} +3 -2
- package/dist/generated/edit/docx_edit_bg.wasm +0 -0
- package/dist/generated/layout/docx_layout_bg.wasm +0 -0
- package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
- package/dist/generated/parse/docx_parse_bg.wasm +0 -0
- package/dist/{index-ImoMd0Ju.d.mts → index-CHl2zLJ7.d.mts} +117 -15
- package/dist/layout/index.d.mts +4 -4
- package/dist/layout/index.mjs +1 -1
- package/dist/layout/pagination/index.d.mts +4 -4
- package/dist/layout/pagination/index.mjs +1 -1
- package/dist/layout/render/index.d.mts +10 -10
- package/dist/layout/render/index.mjs +1 -1
- package/dist/plugin-api/RenderedDomContext.d.mts +7 -7
- package/dist/plugin-api/index.d.mts +3 -3
- package/dist/plugin-api/resolveItemPositions.d.mts +3 -3
- package/dist/{rustDisplayList-B9dQoLHI.d.mts → rustDisplayList-BJqaN9tt.d.mts} +2 -2
- package/dist/styles/index.d.mts +5 -9
- package/dist/styles/index.mjs +1 -1
- package/dist/{styles-CMybYYHS.d.mts → styles-7e-mq3c-.d.mts} +1 -1
- package/dist/types/content.d.mts +2 -2
- package/dist/types/document.d.mts +7 -6
- package/dist/{types-CXLxVF1t.d.mts → types-C4A8mWjU.d.mts} +19 -3
- package/dist/utils/comments.d.mts +2 -2
- package/dist/utils/index.d.mts +4 -4
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/stylePreview.d.mts +2 -2
- package/dist/wasm-7SOSHNGP.mjs +1 -0
- package/dist/{wasm-T2CRCO7S.mjs → wasm-ZQAVP7P2.mjs} +1 -1
- package/dist/wasm-edit.d.mts +35 -27
- package/dist/wasm-edit.mjs +1 -1
- package/dist/wasm-layout.mjs +1 -1
- package/dist/wasm-parse.d.mts +2 -1
- package/dist/wasm-parse.mjs +1 -1
- package/dist/yrs/index.d.mts +5 -5
- package/dist/yrs/index.mjs +1 -1
- package/dist/yrs/residentEngineWorker.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-24DL53QL.mjs +0 -1
- package/dist/chunk-GHEHBYQK.mjs +0 -1
- package/dist/chunk-HTDNSQ44.mjs +0 -1
- package/dist/chunk-TMHG7OAZ.mjs +0 -1
- package/dist/chunk-WBH3SXI6.mjs +0 -1
- package/dist/wasm-CJHQHBDE.mjs +0 -1
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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-
|
|
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-b8eicJKV.mjs';
|
|
3
3
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
|
|
4
|
-
import { F as FontTable } from '../styles-
|
|
4
|
+
import { F as FontTable } from '../styles-7e-mq3c-.mjs';
|
|
5
5
|
import { Document } from '../types/document.mjs';
|
|
6
6
|
import { FontOption } from './fontOptions.mjs';
|
|
7
7
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import '../formatting-
|
|
8
|
+
import { e as Comment } from '../content-CvEtPl0c.mjs';
|
|
9
|
+
import '../formatting-7zKCTu5a.mjs';
|
|
10
10
|
import '../docx/wrapTypes.mjs';
|
|
11
11
|
|
|
12
12
|
/**
|
package/dist/utils/index.mjs
CHANGED
|
@@ -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-BUZ2X5CT.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-BUZ2X5CT.mjs';import'../chunk-TMHG7OAZ.mjs';import'../chunk-HLDJMU3R.mjs';import'../chunk-GHEHBYQK.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-JHJLG4I6.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-JHJLG4I6.mjs';import'../chunk-6LQJAKOC.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,5 +1,5 @@
|
|
|
1
|
-
import { a as Style } from '../styles-
|
|
2
|
-
import '../formatting-
|
|
1
|
+
import { a as Style } from '../styles-7e-mq3c-.mjs';
|
|
2
|
+
import '../formatting-7zKCTu5a.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Paragraph-style preview + option resolution — shared between the React and
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'./chunk-EUUIJVM6.mjs';export{b as createEditSession,a as preloadEditWasm}from'./chunk-GD4VNJ64.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{p as buildDisplayListJson,s as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,t as measureParagraphJson,f as openDisplayList,u as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-
|
|
1
|
+
export{p as buildDisplayListJson,s as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,t as measureParagraphJson,f as openDisplayList,u as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-WTFRNX5K.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
|
package/dist/wasm-edit.d.mts
CHANGED
|
@@ -122,6 +122,10 @@ declare class EditSession {
|
|
|
122
122
|
* completes before the transaction opens.
|
|
123
123
|
*/
|
|
124
124
|
apply_raw_ops(story: string, ops_json: string): void;
|
|
125
|
+
/**
|
|
126
|
+
* Applies seed raw operations with deterministic item ordering.
|
|
127
|
+
*/
|
|
128
|
+
apply_seed_raw_ops(story: string, ops_json: string): void;
|
|
125
129
|
/**
|
|
126
130
|
* Applies a remote or incremental yrs v1 update. It commits without a
|
|
127
131
|
* local origin, so this replica's undo manager never claims it. Errors on
|
|
@@ -328,6 +332,10 @@ declare class EditSession {
|
|
|
328
332
|
* there is no receipt. Errors when a key carries a type not listed here.
|
|
329
333
|
*/
|
|
330
334
|
format_range(story: string, start_para: string, start_offset: number, end_para: string, end_offset: number, delta_json: string): void;
|
|
335
|
+
/**
|
|
336
|
+
* Stories changed by the latest undo or redo, sorted.
|
|
337
|
+
*/
|
|
338
|
+
history_stories(): string[];
|
|
331
339
|
/**
|
|
332
340
|
* Inserts a column left (`after = false`) or right (`after = true`) of
|
|
333
341
|
* the cell `at_json` ([`CellLoc`]) names. Always a plain local edit.
|
|
@@ -389,6 +397,13 @@ declare class EditSession {
|
|
|
389
397
|
* with no host-side layout mutation. Retains the pass for resident edits.
|
|
390
398
|
*/
|
|
391
399
|
layout_document_with_regions_json(input: string): string;
|
|
400
|
+
/**
|
|
401
|
+
* Same full region pass as [`Self::layout_document_with_regions_json`],
|
|
402
|
+
* but the reply carries only `{ layout, headersFooters?, notesConverged }`
|
|
403
|
+
* — the measured arena stays retained wasm-side and is fetched on demand
|
|
404
|
+
* via [`Self::retained_kernel_inputs_json`].
|
|
405
|
+
*/
|
|
406
|
+
layout_document_with_regions_retained_json(input: string): string;
|
|
392
407
|
/**
|
|
393
408
|
* Region-layout input JSON in, the font families and sizes that input
|
|
394
409
|
* needs as JSON out, so the host can register fonts before laying out.
|
|
@@ -507,10 +522,6 @@ declare class EditSession {
|
|
|
507
522
|
* anything was reapplied.
|
|
508
523
|
*/
|
|
509
524
|
redo(): boolean;
|
|
510
|
-
/**
|
|
511
|
-
* Current local redo stack size. Zero before a story starts tracking.
|
|
512
|
-
*/
|
|
513
|
-
redo_depth(): number;
|
|
514
525
|
/**
|
|
515
526
|
* Registers raw sfnt bytes in this session's resident measurement store
|
|
516
527
|
* and returns the font id that measurement and display inputs reference.
|
|
@@ -559,10 +570,20 @@ declare class EditSession {
|
|
|
559
570
|
* or the position no longer resolves in `story`.
|
|
560
571
|
*/
|
|
561
572
|
resolve_sticky_position(story: string, position: Uint8Array): string;
|
|
573
|
+
/**
|
|
574
|
+
* Retained `{ measured, options }` for the main-thread display-list
|
|
575
|
+
* fallback after a retained-only region layout.
|
|
576
|
+
*/
|
|
577
|
+
retained_kernel_inputs_json(): string;
|
|
562
578
|
/**
|
|
563
579
|
* [`EditSession::open_docx`] with seeding always on.
|
|
564
580
|
*/
|
|
565
581
|
seed_from_docx(bytes: Uint8Array): string;
|
|
582
|
+
/**
|
|
583
|
+
* Notes the story a direct operation is about to edit; a different story
|
|
584
|
+
* than the previous edit or caret closes the current undo step.
|
|
585
|
+
*/
|
|
586
|
+
select_story(story: string): void;
|
|
566
587
|
/**
|
|
567
588
|
* This peer's current selection as `{"anchor":{"story","paraId","offset"},
|
|
568
589
|
* "head":{…}}`, or `"null"` before [`EditSession::set_selection`] is
|
|
@@ -775,38 +796,25 @@ declare class EditSession {
|
|
|
775
796
|
*/
|
|
776
797
|
toggle_mark(story: string, start_para: string, start_offset: number, end_para: string, end_offset: number, mark_json: string): void;
|
|
777
798
|
/**
|
|
778
|
-
* Starts local undo tracking
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
* cell stories the edit created or destroyed. Tracked separately from
|
|
782
|
-
* [`EditSession::track_undo`] on the same story, so switching between
|
|
783
|
-
* them starts a fresh history. Errors on an unknown story.
|
|
799
|
+
* Starts local-origin undo tracking across every story. Call this after
|
|
800
|
+
* import or seeding but before the first edit, so the initial document is
|
|
801
|
+
* not an undo step; later calls keep the history.
|
|
784
802
|
*/
|
|
785
|
-
|
|
803
|
+
track_undo(): void;
|
|
786
804
|
/**
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
* Re-tracking the same story is a no-op that preserves the history.
|
|
791
|
-
* Errors on an unknown story.
|
|
792
|
-
*/
|
|
793
|
-
track_undo(story: string): void;
|
|
794
|
-
/**
|
|
795
|
-
* Reverts the latest local-origin transaction and reports whether
|
|
796
|
-
* anything was reverted. Remote and system transactions are excluded by
|
|
797
|
-
* the manager's tracked-origin policy; `false` before a story is tracked.
|
|
805
|
+
* Reverts the latest local-origin step and reports whether anything was
|
|
806
|
+
* reverted. Remote and system transactions are excluded by the manager's
|
|
807
|
+
* tracked-origin policy; `false` before tracking starts.
|
|
798
808
|
*/
|
|
799
809
|
undo(): boolean;
|
|
800
|
-
/**
|
|
801
|
-
* Current local undo stack size. Zero before a story starts tracking.
|
|
802
|
-
*/
|
|
803
|
-
undo_depth(): number;
|
|
804
810
|
/**
|
|
805
811
|
* Lowers one story to a `LayoutBlock[]` JSON array — the block, run and
|
|
806
812
|
* table vocabulary the layout engine consumes. `env_json` supplies the
|
|
807
813
|
* document-level values lowering cannot read off the story:
|
|
808
814
|
* `{"themeColors":{slot: hex},"defaultTabStopTwips":number|null,
|
|
809
|
-
* "pageContentHeight":number|null,"numericIds":{yrsId: number}
|
|
815
|
+
* "pageContentHeight":number|null,"numericIds":{yrsId: number},
|
|
816
|
+
* "tocStyleIds":[styleId],"showHiddenText":bool,
|
|
817
|
+
* "defaultParagraphStyleId":string}`, all
|
|
810
818
|
* optional. Errors when the story does not end in a pilcrow, holds a
|
|
811
819
|
* malformed table, references itself through a cell story, or contains an
|
|
812
820
|
* embed lowering does not support.
|
package/dist/wasm-edit.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as createEditSession,a as preloadEditWasm}from'./chunk-
|
|
1
|
+
export{b as createEditSession,a as preloadEditWasm}from'./chunk-GD4VNJ64.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
|
package/dist/wasm-layout.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{p as buildDisplayListJson,s as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,t as measureParagraphJson,f as openDisplayList,u as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-
|
|
1
|
+
export{p as buildDisplayListJson,s as clearMeasureFonts,g as closeDisplayList,d as hasDisplayListSession,i as hasDisplayListUpdate,e as hasRangeRectsRegion,j as hitTestRegionsByHandle,b as hitTestRegionsJson,q as layoutDocumentJson,t as measureParagraphJson,f as openDisplayList,u as outlineGlyphJson,a as preloadLayoutWasm,m as rangeRectsByHandle,c as rangeRectsJson,o as rangeRectsRegionByHandle,n as rangeRectsRegionJson,r as registerMeasureFont,h as updateDisplayList,l as verticalMoveByHandle,k as verticalMoveJson}from'./chunk-WTFRNX5K.mjs';import'./chunk-5F6DLQZP.mjs';import'./chunk-TTRUPDAB.mjs';
|
package/dist/wasm-parse.d.mts
CHANGED
|
@@ -14,5 +14,6 @@ declare function serializeDocxS10Wire(requestJson: string): string;
|
|
|
14
14
|
declare function serializeDocxS11Wire(requestJson: string): string;
|
|
15
15
|
declare function serializeDocxS12Wire(requestJson: string): string;
|
|
16
16
|
declare function writeDocxS13Wire(requestJson: string, originalDocx: Uint8Array): Uint8Array;
|
|
17
|
+
declare function decodeTiffImage(bytes: Uint8Array): Uint8Array;
|
|
17
18
|
|
|
18
|
-
export { parseDocxS9Wire, parseRelationshipsXmlWire, preloadParseWasm, serializeDocxS10Wire, serializeDocxS11Wire, serializeDocxS12Wire, writeDocxS13Wire };
|
|
19
|
+
export { decodeTiffImage, parseDocxS9Wire, parseRelationshipsXmlWire, preloadParseWasm, serializeDocxS10Wire, serializeDocxS11Wire, serializeDocxS12Wire, writeDocxS13Wire };
|
package/dist/wasm-parse.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as parseDocxS9Wire,c as parseRelationshipsXmlWire,a as preloadParseWasm,d as serializeDocxS10Wire,e as serializeDocxS11Wire,f as serializeDocxS12Wire,g as writeDocxS13Wire}from'./chunk-
|
|
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';
|
package/dist/yrs/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../types/document.mjs';
|
|
2
|
-
export { w as CreateYrsSessionOptions, R as ResidentCaretPaintStyle, x as ResidentEngineOffscreenPage, y as ResidentEngineWorkerApplyResult, z as ResidentEngineWorkerClient, A as ResidentEngineWorkerFrame, B as
|
|
3
|
-
import '../content-
|
|
4
|
-
import '../formatting-
|
|
2
|
+
export { w as CreateYrsSessionOptions, R as ResidentCaretPaintStyle, x as ResidentEngineOffscreenPage, y as ResidentEngineWorkerApplyResult, z as ResidentEngineWorkerClient, A as ResidentEngineWorkerFrame, B as ResidentWorkerFailureError, D as YrsAuthor, E as YrsCellBorder, F as YrsCellBorders, G as YrsCellLoc, H as YrsChangeTarget, I as YrsCommentReceipt, J as YrsContentControlValue, K as YrsDocxHost, L as YrsEngineApplyProfile, M as YrsHyperlinkAttrs, N as YrsImageGeometry, O as YrsInlineFormatDelta, P as YrsInputParagraphSeed, Q as YrsInputParagraphSpan, S as YrsInputPositionMap, u as YrsLoc, T as YrsNumberingProperties, U as YrsParaOffset, V as YrsParagraph, W as YrsParagraphAttrs, X as YrsParagraphLength, Z as YrsParagraphReceipt, _ as YrsParagraphSeed, $ as YrsParagraphSpan, a0 as YrsParagraphTabStop, a1 as YrsRawOp, a as YrsRenderEnv, a2 as YrsResidentCaretRect, a3 as YrsResidentCaretSnapshot, a4 as YrsResidentWorkerSnapshot, a5 as YrsResidentWorkerSyncOptions, a6 as YrsResolveReceipt, a7 as YrsResolvedCommentAnchor, v as YrsRevisionInfo, a8 as YrsRevisionReceipt, a9 as YrsRunMark, j as YrsSelection, aa as YrsSelectionContext, Y as YrsSession, ab as YrsSplitReceipt, ac as YrsStickyPosition, ad as YrsStoryRange, ae as YrsStorySeed, af as YrsStorySegment, ag as YrsTableLoc, ah as YrsTableRange, ai as YrsTableReceipt, aj as YrsTextColor, ak as YrsTriState, al as YrsWatermark, am as canUseResidentEngineWorker, an as compareYrsLocs, ao as createYrsInputPositionMap, ap as createYrsSession, aq as displayPositionToYrsLoc, ar as documentToYrs, as as residentCaretDeviceRect, at as residentCaretSnapshotForFrame, au as sameYrsSelection, av as yrsLocToDisplayPosition, aw as yrsToDocument } from '../index-CHl2zLJ7.mjs';
|
|
3
|
+
import '../content-CvEtPl0c.mjs';
|
|
4
|
+
import '../formatting-7zKCTu5a.mjs';
|
|
5
5
|
import '../docx/wrapTypes.mjs';
|
|
6
|
-
import '../styles-
|
|
7
|
-
import '../frameDelta-
|
|
6
|
+
import '../styles-7e-mq3c-.mjs';
|
|
7
|
+
import '../frameDelta-pA4jrQ1G.mjs';
|