@docx-editor.dev/core 2.19.1 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -32
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +11 -9
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +9 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-44LQJIKH.cjs +20 -0
- package/dist/chunk-4EHMMSFR.cjs +1 -0
- package/dist/chunk-AFG7Q622.cjs +2 -0
- package/dist/chunk-AJCCS53D.js +1 -0
- package/dist/chunk-AYMSP25Q.js +4 -0
- package/dist/{chunk-GWW5FOLJ.cjs → chunk-B4KZSKF7.cjs} +5 -5
- package/dist/chunk-BDAY2ETZ.js +1 -0
- package/dist/chunk-BNZF6DYC.cjs +18 -0
- package/dist/chunk-BQXF2PFF.js +2 -0
- package/dist/chunk-GIHKVXEO.js +2 -0
- package/dist/chunk-ITNK6C5M.cjs +3 -0
- package/dist/chunk-MP3K4LC5.js +1 -0
- package/dist/chunk-MXOO7KRI.cjs +11 -0
- package/dist/chunk-NG6IQ4SI.js +11 -0
- package/dist/{chunk-NIVIC7PA.cjs → chunk-PYXMAUNR.cjs} +1 -1
- package/dist/chunk-Q2B6HX3R.js +1 -0
- package/dist/chunk-Q5JPPUNR.js +5 -0
- package/dist/chunk-S35UK656.cjs +2 -0
- package/dist/chunk-S6J4O5XP.js +1 -0
- package/dist/chunk-TE43S3LX.cjs +1 -0
- package/dist/chunk-TKQH7BNE.cjs +1 -0
- package/dist/chunk-UKVVUHZL.cjs +1 -0
- package/dist/chunk-VH2DLEZK.js +20 -0
- package/dist/{chunk-BUNY5MRX.js → chunk-VUNFWXHF.js} +1 -1
- package/dist/{chunk-JWHXOJEU.cjs → chunk-WQFNWLNY.cjs} +3 -3
- package/dist/chunk-WZX4UGRQ.js +3 -0
- package/dist/{chunk-2QU7QTM7.js → chunk-X5QNSISI.js} +1 -1
- package/dist/chunk-XS4FOHH6.js +18 -0
- package/dist/{chunk-7VO6BLKV.cjs → chunk-XZY4Q6PJ.cjs} +1 -1
- package/dist/{chunk-76F73CY6.cjs → chunk-Z2ETEZRU.cjs} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +13 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -3
- package/dist/contracts/document.d.ts +3 -2
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.ts +9 -10
- package/dist/contracts/editor.js +1 -1
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.ts +9 -9
- package/dist/contracts/modules.js +1 -1
- package/dist/contracts/types.d.ts +2 -562
- package/dist/{custom-node-writes-BqIv94ei.d.ts → custom-node-writes-05qS32px.d.ts} +2 -2
- package/dist/{document-protection-BL5zp8cU.d.ts → document-protection-Cr59VKLO.d.ts} +1 -1
- package/dist/{editor-WXbTSXx1.d.ts → editor-BsLSz_7y.d.ts} +43 -39
- package/dist/editor-scope-OHPwVQ5l.d.ts +84 -0
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +130 -29
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +13 -14
- package/dist/export.js +1 -1
- package/dist/{font-resolver-BSrKnTeR.d.ts → font-resolver-CzwdBJDE.d.ts} +1 -1
- package/dist/{headless-document-view-C4ttQJ5H.d.ts → headless-document-view-B7nAiR7P.d.ts} +2 -2
- package/dist/image-resources-C4ilLzog.d.ts +210 -0
- package/dist/{index-C3As-Xxp.d.ts → index-zkvqBQ9o.d.ts} +117 -27
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -19
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-Dqu3JW3p.d.ts → layout-shaping-BJKVTI6i.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +72 -20
- package/dist/layout.js +1 -1
- package/dist/{note-properties-RjYgbmXe.d.ts → note-properties-MNztEj5s.d.ts} +2 -2
- package/dist/{omml-equation-hcP9AUFX.d.ts → omml-equation-CbnW9yXd.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +8 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-OdRd17KZ.d.ts → protocol-Co_r0SZQ.d.ts} +14 -4
- package/dist/{review-paragraph-order--jLHXIcd.d.ts → review-paragraph-order-EFaU7TqH.d.ts} +2 -3
- package/dist/{revision-projection-BIHO_qvw.d.ts → revision-projection-DEIvpxiq.d.ts} +16 -2
- package/dist/{semantic-cell-selection-lCYAVCCF.d.ts → semantic-cell-selection-DXmfnDCw.d.ts} +9 -4
- package/dist/{semantic-interaction-0vQXcMZk.d.ts → semantic-interaction-BLu3M6Nn.d.ts} +1 -1
- package/dist/{semantic-paint-BSan4pBk.d.ts → semantic-paint-CPsihA6k.d.ts} +18 -2
- package/dist/{semantic-records-ZcYuB4-H.d.ts → semantic-records-CqD0b5Ex.d.ts} +147 -6
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +462 -428
- package/dist/store.js +1 -1
- package/dist/{tree-package-fragment-1pdDnhZ_.d.ts → tree-package-fragment-CwJDixNs.d.ts} +44 -3
- package/dist/{tree-session-contract-Cgn6fQ-M.d.ts → tree-session-contract-D9RRWE0C.d.ts} +8 -8
- package/dist/{tree-op-types-DbdM7fJV.d.ts → types-barrel-DLB11iSY.d.ts} +1455 -660
- package/package.json +2 -2
- package/dist/chunk-3JKOZBQ3.cjs +0 -1
- package/dist/chunk-3SU7UWCR.js +0 -1
- package/dist/chunk-5BI4SIHO.cjs +0 -1
- package/dist/chunk-6ESSCMXL.js +0 -2
- package/dist/chunk-6W4DIR4X.cjs +0 -2
- package/dist/chunk-AKQRKR2H.js +0 -1
- package/dist/chunk-BJQDNKEX.js +0 -5
- package/dist/chunk-D5EHDHYV.js +0 -1
- package/dist/chunk-FBWBSHC4.cjs +0 -11
- package/dist/chunk-GOEBQ26R.js +0 -1
- package/dist/chunk-IA7WTZHI.js +0 -11
- package/dist/chunk-IXGUCLER.js +0 -20
- package/dist/chunk-NDPLQG4Y.cjs +0 -18
- package/dist/chunk-NLGUL6QL.js +0 -3
- package/dist/chunk-OHJQ7GPZ.cjs +0 -1
- package/dist/chunk-OWUSDS3L.cjs +0 -20
- package/dist/chunk-RDKPMNN6.cjs +0 -2
- package/dist/chunk-TSDGKNV7.js +0 -2
- package/dist/chunk-TUCDPXBD.js +0 -18
- package/dist/chunk-UOE4WKL7.js +0 -1
- package/dist/chunk-VSCPFHTD.cjs +0 -3
- package/dist/chunk-ZKWRCLT2.cjs +0 -1
- package/dist/chunk-ZUGTEKLM.js +0 -4
- package/dist/editor-scope-DZJT4ukT.d.ts +0 -53
- package/dist/review-items-CJz-kAW8.d.ts +0 -370
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkJWHXOJEU_cjs=require('./chunk-JWHXOJEU.cjs'),chunkNDPLQG4Y_cjs=require('./chunk-NDPLQG4Y.cjs'),chunk76F73CY6_cjs=require('./chunk-76F73CY6.cjs'),chunkFBWBSHC4_cjs=require('./chunk-FBWBSHC4.cjs');var Te=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function D(e){let n=new Map;for(let t of e)if(Array.isArray(t)){for(let r of t.slice(0,2048)){if(typeof r!="string"||!Te.test(r))continue;let o=r.toLowerCase();if(n.has(o)||n.set(o,r),n.size===2048)break}if(n.size===2048)break}return Object.freeze([...n.values()])}function Ge(e){let n=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(n===void 0||Array.isArray(n)&&n.length===0)?void 0:e}var We=64,we=Object.freeze({family:"Calibri",sizeHalfPoints:22});function Se(e,...n){let t=[e,...n],r=[],o=new Set;for(let a of t)for(let d of a.sources??[]){let c=chunkJWHXOJEU_cjs.g(d.request);o.has(c)||(o.add(c),r.push(d));}let s=[],i=new Set;for(let a of t)for(let d of a.substitutions??[]){let c=chunkJWHXOJEU_cjs.g(d.from);o.has(c)||i.has(c)||(i.add(c),s.push(d));}let u=D(t.map(a=>a.supportedFamilies));return Object.freeze({...u.length?{supportedFamilies:u}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??chunkJWHXOJEU_cjs.a,sources:Object.freeze(r),...s.length>0?{substitutions:Object.freeze(s)}:{},defaultFont:e.defaultFont??we,...e.language!==void 0?{language:e.language}:{}})}var Ne=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function Ee(e){let n=e?.defaultFont?.family;return n!==void 0&&Ne.test(n)?n:we.family}var Ie="docx-editor.dev/font-resolver",Ce=Symbol.for("docx-editor.dev/font-resolver");function tn(e){let n={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ce,n),Object.defineProperty(e,Ie,n);}catch(t){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:t})}return e}function on(e){return typeof e=="function"&&e[Ce]===true}var X=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function Me(e,n,t){let r=new Map(e.map(o=>[X(o),o]));for(let[o,s]of n)r.set(o,s);for(let o of t)r.has(X(o.to))&&r.set(X(o.from),o.from);return [...r.values()]}async function rn(e,n,t={}){return ve(e,n,t)}async function sn(e,n,t={}){return ve(e,n,t)}async function ve(e,n,t){let r=e.map(_e),o,s=[],i=[],u=new Map,a=new Set,d=0,c=[],f=new Set,m=[],S=n.resolvedFaces??[],E=n.defaultFamily;for(let b=0;b<e.length;b+=1){ke(n.signal);let k=e[b],I=Me(S,u,c),P;try{let x=r[b],O;if(x){let l=await Re(x,n.signal);if(!l.ok)throw l.cause;O=l.value;}else if(typeof k=="function"){let l=await Re(Promise.resolve(k(Le(n,E,I,d))).then(p=>({ok:!0,value:p}),p=>({ok:!1,cause:p})),n.signal);if(!l.ok)throw l.cause;O=l.value;}else O=k;if(O==null)continue;if(typeof O=="function"){Z(t,k,b,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let R="failures"in O?O.failures:void 0,M=[];if(Array.isArray(R)){let l=Math.min(R.length,chunkJWHXOJEU_cjs.b);for(let p=0;p<l;p++)M.push(R[p]);R.length>l&&M.push(new Error("Additional font-origin failures were omitted"));}else R!==void 0&&M.push(R);let C=Be(O,a,d,f,o?"maxFontBytes"in o&&o.maxFontBytes!==void 0?o.maxFontBytes:chunkJWHXOJEU_cjs.a:void 0,t.reserveOwnedBytes,t.instrumentation);P=C;for(let l of new Set([...C.dropped,...M]))Z(t,k,b,l);let w=C.fragment;w.supportedFamilies&&s.push(w.supportedFamilies),m.push(...M);let $=(w.sources??[]).map(l=>(chunkJWHXOJEU_cjs.g(l.request),[X(l.request),l.request])),y=[...w.substitutions??[]];!o&&"defaultFont"in w&&(E=Ee(w)),o||(o=w);let g=new Set(C.sourceKeys);if(g.size>0){c=c.filter(l=>!g.has(chunkJWHXOJEU_cjs.g(l.from)));for(let l of g)f.delete(l);}i.push(...w.sources??[]);for(let l of C.sourceKeys)a.add(l);d+=C.ownedBytes;for(let[l,p]of $)u.set(l,p);for(let l of y)c.push(l),f.add(chunkJWHXOJEU_cjs.g(l.from));}catch(x){if(P?.releaseOwnedBytes?.(),n.signal?.aborted)throw n.signal.reason??x;if(x instanceof V)throw x.cause;Z(t,k,b,x);continue}}if(!o)return;let{epoch:N,...j}=Se({...o,supportedFamilies:D(s),sources:i,substitutions:c});return m.length===0?j:{...j,failures:Object.freeze(m)}}var V=class extends Error{constructor(t){super("Unable to reserve owned font bytes");this.cause=t;this.name="FontOwnershipReservationError";}cause},Y=class extends RangeError{};async function Re(e,n){if(!n)return e;ke(n);let t,r=new Promise((s,i)=>{t=i;}),o=()=>t?.(n.reason);n.addEventListener("abort",o,{once:true});try{return await Promise.race([e,r])}finally{n.removeEventListener("abort",o);}}function _e(e){if(e===null||typeof e!="object")return;let n;try{n=e.then;}catch(t){return Promise.resolve({ok:false,cause:t})}if(typeof n=="function")return Promise.resolve(e).then(t=>({ok:true,value:t}),t=>({ok:false,cause:t}))}function Be(e,n,t,r,o,s,i){let u=e.sources??[],a=e.substitutions??[],d="maxFontBytes"in e?e.maxFontBytes:void 0,c="defaultFont"in e?e.defaultFont:void 0,f="epoch"in e?e.epoch:void 0,m="language"in e?e.language:void 0;if(!Array.isArray(u)||!Array.isArray(a))throw new TypeError("Font origin sources and substitutions must be arrays");let S=u.length,E=a.length;if(S>chunkJWHXOJEU_cjs.b)throw new RangeError(`Font source count must not exceed ${chunkJWHXOJEU_cjs.b}`);if(E>chunkJWHXOJEU_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkJWHXOJEU_cjs.b}`);let N=d??chunkJWHXOJEU_cjs.a;if(!Number.isSafeInteger(N)||N<=0||N>chunkJWHXOJEU_cjs.a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${chunkJWHXOJEU_cjs.a}`);let j=o??N,b=0,k=[],I=new Set,P=[],x=[];for(let y=0;y<S;y+=1){let g=u[y];try{let l=Q(g.request),p=g.availability,B=g.faceIndex,h=g.hash,A=g.id,L=chunkJWHXOJEU_cjs.g(l);if(p!==void 0&&p!=="available"&&p!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(B)||B<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof h!="string"||h.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(p!=="forbidden"){if(typeof A!="string"||A.length===0)throw new TypeError("Font source id must be a non-empty string");K=g.bytes;let J=chunkJWHXOJEU_cjs.e(K);if(J>j)throw new RangeError("Font source exceeds the effective base byte ceiling");if(n.has(L)||I.has(L))continue;if(t+b+J>chunkJWHXOJEU_cjs.c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${chunkJWHXOJEU_cjs.c}`);b+=J;}else K=new Uint8Array(0);if(n.has(L)||I.has(L))continue;if(n.size+I.size>=chunkJWHXOJEU_cjs.b)throw new Y(`Font source count must not exceed ${chunkJWHXOJEU_cjs.b}`);I.add(L),k.push(L),P.push(Object.freeze({request:l,id:A,bytes:K,hash:h,faceIndex:B,...p?{availability:p}:{}}));}catch(l){if(l instanceof Y)throw l;x.push(l);}}let O=new Set,R=[];for(let y=0;y<E;y+=1){let g=a[y];try{let l=Q(g.from),p=Q(g.to);chunkJWHXOJEU_cjs.g(l),chunkJWHXOJEU_cjs.g(p);let B=g.lineMetrics,h=B?Object.freeze({heightEm:B.heightEm,baselineEm:B.baselineEm}):void 0;if(h&&(!Number.isFinite(h.heightEm)||!Number.isFinite(h.baselineEm)||h.heightEm<=0||h.heightEm>4||h.baselineEm<0||h.baselineEm>h.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let A=chunkJWHXOJEU_cjs.g(l);if(n.has(A)||I.has(A)||r.has(A)||O.has(A))continue;O.add(A),R.push(Object.freeze({from:l,to:p,...h?{lineMetrics:h}:{}}));}catch(l){x.push(l);}}if((S>0||E>0)&&P.length===0&&R.length===0&&x.length>0)throw x[0];let M=r.size;for(let y of I)r.has(y)&&(M-=1);if(M+O.size>chunkJWHXOJEU_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkJWHXOJEU_cjs.b}`);let C;if(c!==void 0){let y=c.family,g=c.sizeHalfPoints;if(chunkJWHXOJEU_cjs.g({family:y,weight:400,style:"normal"}),!Number.isSafeInteger(g)||g<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");C=Object.freeze({family:y,sizeHalfPoints:g});}if(f!==void 0&&(!Number.isSafeInteger(f)||f<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(m!==void 0&&typeof m!="string")throw new TypeError("Font shaping language must be a string");let w;if(b>0&&s)try{w=s(b);}catch(y){throw new V(y)}let $;try{$=P.map(y=>chunkJWHXOJEU_cjs.f(y,i));}catch(y){throw w?.(),y}return {fragment:Object.freeze({supportedFamilies:D([e.supportedFamilies]),sources:Object.freeze($),substitutions:Object.freeze(R),...f!==void 0?{epoch:f}:{},...d!==void 0?{maxFontBytes:d}:{},...C?{defaultFont:C}:{},...m!==void 0?{language:m}:{}}),sourceKeys:Object.freeze(k),ownedBytes:b,dropped:Object.freeze(x),releaseOwnedBytes:w}}function Pe(e){return !Number.isSafeInteger(e)||e<=0?0:e>chunkJWHXOJEU_cjs.c?chunkJWHXOJEU_cjs.c:e}function Le(e,n,t,r){let{committedSourceBytes:o,...s}=e,i=Pe(r);return {...s,defaultFamily:n,...t.length>0?{resolvedFaces:t}:{},...i>0?{committedSourceBytes:i}:{}}}function Q(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function ke(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function Z(e,n,t,r){let o;try{typeof n=="function"&&n.name.length>0&&(o=n.name);}catch{}let s=Object.freeze({originIndex:t,...o!==void 0?{originName:o}:{},cause:r});if(e.onOriginFailure)try{let u=e.onOriginFailure(s);Promise.resolve(u).catch(a=>{console.warn("[fonts] font-origin diagnostic callback failed",a);});return}catch(u){console.warn("[fonts] font-origin diagnostic callback failed",u);}let i="";try{r instanceof Error&&r.message.length>0&&(i=`: ${r.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${i}`,r);}function G(e){let n=new WeakMap;return (t,r)=>{let o=new Set;for(let s of t){let i=[{node:s,context:r,next:0}],u=a=>{i.pop();let d=i.at(-1)?.found??o;for(let c of a)d.add(c);};for(;i.length;){let a=i[i.length-1],d=n.get(a.node);if(d?.key===a.context.key){u(d.families);continue}if(!a.children){let m=e(a.node,a.context);a.children=m.children,a.found=new Set(m.families);}let c=a.children[a.next++];if(c){i.push({...c,next:0});continue}let f=[...a.found];f.length<=256?n.set(a.node,{key:a.context.key,families:f}):n.delete(a.node),u(f);}}return [...o]}}function W(e,n){return e.children.flatMap(t=>t.kind==="textValue"?[]:[{node:t,context:n}])}function qe(e,n){let{styles:t,theme:r,supplementalFamilies:o,depth:s}=n;if(e.kind==="table"){let a=chunkNDPLQG4Y_cjs.Mc(e,468,s,t),d=[];for(let c of a?.rows??[])for(let f of c.cells){let m={...n,depth:s+1,cellStyle:f.styleFormatting,key:`${n.baseKey}|${s+1}|${JSON.stringify(f.styleFormatting)}`};for(let S of f.blocks)d.push({node:S,context:m});}return {children:d.reverse()}}let i=new Set;if(e.kind==="paragraph"){let a=e.children.find(c=>c.kind==="paragraphProperties"),d=chunkNDPLQG4Y_cjs.Hb(t,a,n.cellStyle).runProperties;for(let c of chunkNDPLQG4Y_cjs.oc(e,d,void 0,(f,m)=>chunkNDPLQG4Y_cjs.Jb(f,m,t),void 0,void 0,"all-markup",void 0,void 0,r)){if(!c.text||c.fontSlot!=="eastAsia"&&!o.has(c.style.fontFamily??""))continue;let f=chunk76F73CY6_cjs.a((c.fontSlot==="eastAsia"?c.style.fontFamilyEastAsia:c.style.fontFamily)??void 0);f&&i.add(f);}}let u=e.localName==="txbxContent"?{...n,cellStyle:void 0,key:`${n.baseKey}|${s}|undefined`}:n;return {families:[...i],children:W(e,u).reverse()}}function ze(){let e=G(qe),n,t;return (r,o,s)=>{if(!n||t!==o||n.theme!==s){let i=chunkNDPLQG4Y_cjs.Gb(o,s);t=o,n={key:`${i.cacheToken}|0|undefined`,baseKey:i.cacheToken,styles:i,theme:s,depth:0,supplementalFamilies:new Set([...Object.values(s.majorSupplemental??{}),...Object.values(s.minorSupplemental??{})])};}return e([...r].reverse(),n)}}function yn(e,n,t){return ze()(e,n,t)}function ee(e,n){return e.attributes.find(t=>t.localName===n)?.value}var De=G((e,n)=>{let t=[];if(e.namespaceUri===chunkFBWBSHC4_cjs.da){if(e.localName==="fldSimple"){let r=chunkNDPLQG4Y_cjs.jc(ee(e,"instr")??"")?.font;r&&t.push(r);}if(e.localName==="p")for(let r of je(e))t.push(r);}return {families:t,children:W(e,n)}});function Cn(e){let n=new Map;for(let t of De(e,{key:""})){let r=chunk76F73CY6_cjs.a(t);r!==null&&!n.has(r.toLowerCase())&&n.set(r.toLowerCase(),r);}return [...n.values()]}function je(e){let n=[],t=chunkNDPLQG4Y_cjs.X(),r=[];for(let o=e.children.length-1;o>=0;o-=1){let s=e.children[o];s.kind!=="textValue"&&r.push({node:s,containerDepth:0});}for(;r.length>0;){let{node:o,containerDepth:s}=r.pop();if(s>=chunkFBWBSHC4_cjs.la||o.namespaceUri===chunkFBWBSHC4_cjs.da&&o.localName==="p")continue;if(o.namespaceUri===chunkFBWBSHC4_cjs.da&&o.localName==="fldChar"){let u=ee(o,"fldCharType");u==="begin"?chunkNDPLQG4Y_cjs._(t):u==="separate"?(t.nesting===1&&Ae(t,n),chunkNDPLQG4Y_cjs.aa(t)):u==="end"&&(t.nesting===1&&Ae(t,n),chunkNDPLQG4Y_cjs.ba(t));continue}if(o.namespaceUri===chunkFBWBSHC4_cjs.da&&(o.localName==="instrText"||o.localName==="delInstrText")){chunkNDPLQG4Y_cjs.$(t,$e(o),o.localName==="delInstrText");continue}if(o.namespaceUri===chunkFBWBSHC4_cjs.da&&o.localName==="fldSimple"){let u=chunkNDPLQG4Y_cjs.jc(ee(o,"instr")??"");u?.font&&n.push(u.font);}let i=chunkFBWBSHC4_cjs.ma(o,s);for(let u=o.children.length-1;u>=0;u-=1){let a=o.children[u];a.kind!=="textValue"&&r.push({node:a,containerDepth:i});}}return chunkNDPLQG4Y_cjs.Y(t),n}function Ae(e,n){let t=chunkNDPLQG4Y_cjs.Z(e);if(t.overflow)return;let r=chunkNDPLQG4Y_cjs.jc(t.instruction);r?.font&&n.push(r.font);}function $e(e){let n="",t=[...e.children].reverse();for(;t.length>0&&n.length<=256;){let r=t.pop();if(r.kind==="textValue")n+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)t.push(r.children[o]);}return n}function vn(e,n,t,r){if(!n)return [];let o=chunkNDPLQG4Y_cjs.rc(n),s=chunkNDPLQG4Y_cjs.Gb(t,r),i=new Map;for(let u of e)for(let a of Ke(u)){let d=chunkFBWBSHC4_cjs.Hd(a.children),c=f=>{if(f)for(let m of f.values())for(let S of [m.markerStyle.fontFamily,m.markerStyle.fontFamilyEastAsia]){let E=chunk76F73CY6_cjs.a(S??void 0);if(E===null)continue;let N=E.toLowerCase();i.has(N)||i.set(N,E);}};c(chunkNDPLQG4Y_cjs.Qb(d,o,s));for(let f of d){let m=chunkNDPLQG4Y_cjs.hd(f);for(let S of m.contents)c(chunkNDPLQG4Y_cjs.gd(S,o,s));}}return [...i.values()].sort((u,a)=>u.localeCompare(a))}function Ke(e){if(e.localName==="document"){for(let n of e.children)if(n.kind!=="textValue"&&n.localName==="body")return [n];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let n=[];for(let t of e.children)t.kind!=="textValue"&&(t.localName==="footnote"||t.localName==="endnote")&&n.push(t);return n}return [e]}var Ue={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Tn(e,n){let t=[],r=[],o=0;for(let s of e){let i=s.bytes.byteLength;if(!Number.isSafeInteger(i)||i>n||i>chunkJWHXOJEU_cjs.a||i>chunkJWHXOJEU_cjs.c-o){r.push(s);continue}o+=i,t.push(s);}return {sources:t,dropped:r}}function Nn(e,n,t){let r=n.reduce((s,i)=>s+i.bytes.byteLength,0),o=new Set(n.filter(s=>s.request.family.trim().length>0).map(s=>chunkJWHXOJEU_cjs.g(s.request)));return He(e,{maxFontBytes:t,aggregateBudget:Math.max(0,chunkJWHXOJEU_cjs.c-r),shadowedRequests:o})}function He(e,n){let t=[],r=[],o=n.aggregateBudget,s=new Set;for(let i of e){let u=Ue[i.style],a=Object.freeze({family:i.family,weight:u.weight,style:u.style});if(i.family.trim().length===0){r.push({request:a,partName:i.partName,reason:"malformed"});continue}let d=chunkJWHXOJEU_cjs.g(a);if(!(n.shadowedRequests?.has(d)||s.has(d))){if(s.add(d),i.bytes.byteLength>n.maxFontBytes||i.bytes.byteLength>o){r.push({request:a,partName:i.partName,reason:"overLimit"});continue}o-=i.bytes.byteLength,t.push({request:a,id:`embedded:${i.partName}#${i.style}`,bytes:i.bytes,hash:chunkFBWBSHC4_cjs.a(i.bytes),faceIndex:0});}}return {sources:t,dropped:r}}exports.a=D;exports.b=Ge;exports.c=We;exports.d=we;exports.e=Se;exports.f=Ee;exports.g=Ie;exports.h=Ce;exports.i=tn;exports.j=on;exports.k=rn;exports.l=sn;exports.m=Tn;exports.n=Nn;exports.o=He;exports.p=G;exports.q=W;exports.r=ze;exports.s=yn;exports.t=Cn;exports.u=je;exports.v=vn;
|
|
1
|
+
'use strict';var chunkWQFNWLNY_cjs=require('./chunk-WQFNWLNY.cjs'),chunkBNZF6DYC_cjs=require('./chunk-BNZF6DYC.cjs'),chunkZ2ETEZRU_cjs=require('./chunk-Z2ETEZRU.cjs'),chunkMXOO7KRI_cjs=require('./chunk-MXOO7KRI.cjs');var Te=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function D(e){let n=new Map;for(let t of e)if(Array.isArray(t)){for(let r of t.slice(0,2048)){if(typeof r!="string"||!Te.test(r))continue;let o=r.toLowerCase();if(n.has(o)||n.set(o,r),n.size===2048)break}if(n.size===2048)break}return Object.freeze([...n.values()])}function Ge(e){let n=e&&"failures"in e?e.failures:void 0;return e==null||(e.sources?.length??0)===0&&(e.substitutions?.length??0)===0&&(n===void 0||Array.isArray(n)&&n.length===0)?void 0:e}var We=64,we=Object.freeze({family:"Calibri",sizeHalfPoints:22});function Se(e,...n){let t=[e,...n],r=[],o=new Set;for(let a of t)for(let d of a.sources??[]){let c=chunkWQFNWLNY_cjs.g(d.request);o.has(c)||(o.add(c),r.push(d));}let s=[],i=new Set;for(let a of t)for(let d of a.substitutions??[]){let c=chunkWQFNWLNY_cjs.g(d.from);o.has(c)||i.has(c)||(i.add(c),s.push(d));}let u=D(t.map(a=>a.supportedFamilies));return Object.freeze({...u.length?{supportedFamilies:u}:{},epoch:e.epoch??0,maxFontBytes:e.maxFontBytes??chunkWQFNWLNY_cjs.a,sources:Object.freeze(r),...s.length>0?{substitutions:Object.freeze(s)}:{},defaultFont:e.defaultFont??we,...e.language!==void 0?{language:e.language}:{}})}var Ne=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u;function Ee(e){let n=e?.defaultFont?.family;return n!==void 0&&Ne.test(n)?n:we.family}var Ie="docx-editor.dev/font-resolver",Ce=Symbol.for("docx-editor.dev/font-resolver");function tn(e){let n={value:true,enumerable:false,configurable:true};try{Object.defineProperty(e,Ce,n),Object.defineProperty(e,Ie,n);}catch(t){throw new TypeError("defineFontResolver cannot mark a frozen or sealed function; mark it before freezing, or wrap it in a fresh function and mark that.",{cause:t})}return e}function on(e){return typeof e=="function"&&e[Ce]===true}var X=e=>`${e.family.trim().toLowerCase()} ${e.weight} ${e.style}`;function Me(e,n,t){let r=new Map(e.map(o=>[X(o),o]));for(let[o,s]of n)r.set(o,s);for(let o of t)r.has(X(o.to))&&r.set(X(o.from),o.from);return [...r.values()]}async function rn(e,n,t={}){return ve(e,n,t)}async function sn(e,n,t={}){return ve(e,n,t)}async function ve(e,n,t){let r=e.map(_e),o,s=[],i=[],u=new Map,a=new Set,d=0,c=[],f=new Set,m=[],S=n.resolvedFaces??[],E=n.defaultFamily;for(let b=0;b<e.length;b+=1){ke(n.signal);let k=e[b],I=Me(S,u,c),P;try{let x=r[b],O;if(x){let l=await Re(x,n.signal);if(!l.ok)throw l.cause;O=l.value;}else if(typeof k=="function"){let l=await Re(Promise.resolve(k(Le(n,E,I,d))).then(p=>({ok:!0,value:p}),p=>({ok:!1,cause:p})),n.signal);if(!l.ok)throw l.cause;O=l.value;}else O=k;if(O==null)continue;if(typeof O=="function"){Z(t,k,b,new TypeError("A font origin answered with a function; pass the resolver itself rather than a function returning one"));continue}let R="failures"in O?O.failures:void 0,M=[];if(Array.isArray(R)){let l=Math.min(R.length,chunkWQFNWLNY_cjs.b);for(let p=0;p<l;p++)M.push(R[p]);R.length>l&&M.push(new Error("Additional font-origin failures were omitted"));}else R!==void 0&&M.push(R);let C=Be(O,a,d,f,o?"maxFontBytes"in o&&o.maxFontBytes!==void 0?o.maxFontBytes:chunkWQFNWLNY_cjs.a:void 0,t.reserveOwnedBytes,t.instrumentation);P=C;for(let l of new Set([...C.dropped,...M]))Z(t,k,b,l);let w=C.fragment;w.supportedFamilies&&s.push(w.supportedFamilies),m.push(...M);let $=(w.sources??[]).map(l=>(chunkWQFNWLNY_cjs.g(l.request),[X(l.request),l.request])),y=[...w.substitutions??[]];!o&&"defaultFont"in w&&(E=Ee(w)),o||(o=w);let g=new Set(C.sourceKeys);if(g.size>0){c=c.filter(l=>!g.has(chunkWQFNWLNY_cjs.g(l.from)));for(let l of g)f.delete(l);}i.push(...w.sources??[]);for(let l of C.sourceKeys)a.add(l);d+=C.ownedBytes;for(let[l,p]of $)u.set(l,p);for(let l of y)c.push(l),f.add(chunkWQFNWLNY_cjs.g(l.from));}catch(x){if(P?.releaseOwnedBytes?.(),n.signal?.aborted)throw n.signal.reason??x;if(x instanceof V)throw x.cause;Z(t,k,b,x);continue}}if(!o)return;let{epoch:N,...j}=Se({...o,supportedFamilies:D(s),sources:i,substitutions:c});return m.length===0?j:{...j,failures:Object.freeze(m)}}var V=class extends Error{constructor(t){super("Unable to reserve owned font bytes");this.cause=t;this.name="FontOwnershipReservationError";}cause},Y=class extends RangeError{};async function Re(e,n){if(!n)return e;ke(n);let t,r=new Promise((s,i)=>{t=i;}),o=()=>t?.(n.reason);n.addEventListener("abort",o,{once:true});try{return await Promise.race([e,r])}finally{n.removeEventListener("abort",o);}}function _e(e){if(e===null||typeof e!="object")return;let n;try{n=e.then;}catch(t){return Promise.resolve({ok:false,cause:t})}if(typeof n=="function")return Promise.resolve(e).then(t=>({ok:true,value:t}),t=>({ok:false,cause:t}))}function Be(e,n,t,r,o,s,i){let u=e.sources??[],a=e.substitutions??[],d="maxFontBytes"in e?e.maxFontBytes:void 0,c="defaultFont"in e?e.defaultFont:void 0,f="epoch"in e?e.epoch:void 0,m="language"in e?e.language:void 0;if(!Array.isArray(u)||!Array.isArray(a))throw new TypeError("Font origin sources and substitutions must be arrays");let S=u.length,E=a.length;if(S>chunkWQFNWLNY_cjs.b)throw new RangeError(`Font source count must not exceed ${chunkWQFNWLNY_cjs.b}`);if(E>chunkWQFNWLNY_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkWQFNWLNY_cjs.b}`);let N=d??chunkWQFNWLNY_cjs.a;if(!Number.isSafeInteger(N)||N<=0||N>chunkWQFNWLNY_cjs.a)throw new RangeError(`Font byte ceiling must be a positive safe integer no greater than ${chunkWQFNWLNY_cjs.a}`);let j=o??N,b=0,k=[],I=new Set,P=[],x=[];for(let y=0;y<S;y+=1){let g=u[y];try{let l=Q(g.request),p=g.availability,B=g.faceIndex,h=g.hash,A=g.id,L=chunkWQFNWLNY_cjs.g(l);if(p!==void 0&&p!=="available"&&p!=="forbidden")throw new TypeError("Font source availability must be available or forbidden");if(!Number.isSafeInteger(B)||B<0)throw new RangeError("Font face index must be a non-negative safe integer");if(typeof h!="string"||h.length===0)throw new TypeError("Font source hash must be a non-empty string");let K;if(p!=="forbidden"){if(typeof A!="string"||A.length===0)throw new TypeError("Font source id must be a non-empty string");K=g.bytes;let J=chunkWQFNWLNY_cjs.e(K);if(J>j)throw new RangeError("Font source exceeds the effective base byte ceiling");if(n.has(L)||I.has(L))continue;if(t+b+J>chunkWQFNWLNY_cjs.c)throw new RangeError(`Font sources exceed the aggregate byte ceiling of ${chunkWQFNWLNY_cjs.c}`);b+=J;}else K=new Uint8Array(0);if(n.has(L)||I.has(L))continue;if(n.size+I.size>=chunkWQFNWLNY_cjs.b)throw new Y(`Font source count must not exceed ${chunkWQFNWLNY_cjs.b}`);I.add(L),k.push(L),P.push(Object.freeze({request:l,id:A,bytes:K,hash:h,faceIndex:B,...p?{availability:p}:{}}));}catch(l){if(l instanceof Y)throw l;x.push(l);}}let O=new Set,R=[];for(let y=0;y<E;y+=1){let g=a[y];try{let l=Q(g.from),p=Q(g.to);chunkWQFNWLNY_cjs.g(l),chunkWQFNWLNY_cjs.g(p);let B=g.lineMetrics,h=B?Object.freeze({heightEm:B.heightEm,baselineEm:B.baselineEm}):void 0;if(h&&(!Number.isFinite(h.heightEm)||!Number.isFinite(h.baselineEm)||h.heightEm<=0||h.heightEm>4||h.baselineEm<0||h.baselineEm>h.heightEm))throw new RangeError("Font substitution line metrics must fit within a bounded em box");let A=chunkWQFNWLNY_cjs.g(l);if(n.has(A)||I.has(A)||r.has(A)||O.has(A))continue;O.add(A),R.push(Object.freeze({from:l,to:p,...h?{lineMetrics:h}:{}}));}catch(l){x.push(l);}}if((S>0||E>0)&&P.length===0&&R.length===0&&x.length>0)throw x[0];let M=r.size;for(let y of I)r.has(y)&&(M-=1);if(M+O.size>chunkWQFNWLNY_cjs.b)throw new RangeError(`Font substitution count must not exceed ${chunkWQFNWLNY_cjs.b}`);let C;if(c!==void 0){let y=c.family,g=c.sizeHalfPoints;if(chunkWQFNWLNY_cjs.g({family:y,weight:400,style:"normal"}),!Number.isSafeInteger(g)||g<=0)throw new RangeError("Default font size must be a positive safe integer in half-points");C=Object.freeze({family:y,sizeHalfPoints:g});}if(f!==void 0&&(!Number.isSafeInteger(f)||f<0))throw new RangeError("Font configuration epoch must be a non-negative safe integer");if(m!==void 0&&typeof m!="string")throw new TypeError("Font shaping language must be a string");let w;if(b>0&&s)try{w=s(b);}catch(y){throw new V(y)}let $;try{$=P.map(y=>chunkWQFNWLNY_cjs.f(y,i));}catch(y){throw w?.(),y}return {fragment:Object.freeze({supportedFamilies:D([e.supportedFamilies]),sources:Object.freeze($),substitutions:Object.freeze(R),...f!==void 0?{epoch:f}:{},...d!==void 0?{maxFontBytes:d}:{},...C?{defaultFont:C}:{},...m!==void 0?{language:m}:{}}),sourceKeys:Object.freeze(k),ownedBytes:b,dropped:Object.freeze(x),releaseOwnedBytes:w}}function Pe(e){return !Number.isSafeInteger(e)||e<=0?0:e>chunkWQFNWLNY_cjs.c?chunkWQFNWLNY_cjs.c:e}function Le(e,n,t,r){let{committedSourceBytes:o,...s}=e,i=Pe(r);return {...s,defaultFamily:n,...t.length>0?{resolvedFaces:t}:{},...i>0?{committedSourceBytes:i}:{}}}function Q(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}function ke(e){if(e?.aborted)throw e.reason??new DOMException("Font resolution was aborted","AbortError")}function Z(e,n,t,r){let o;try{typeof n=="function"&&n.name.length>0&&(o=n.name);}catch{}let s=Object.freeze({originIndex:t,...o!==void 0?{originName:o}:{},cause:r});if(e.onOriginFailure)try{let u=e.onOriginFailure(s);Promise.resolve(u).catch(a=>{console.warn("[fonts] font-origin diagnostic callback failed",a);});return}catch(u){console.warn("[fonts] font-origin diagnostic callback failed",u);}let i="";try{r instanceof Error&&r.message.length>0&&(i=`: ${r.message}`);}catch{}console.warn(`[fonts] a font origin failed and was skipped${i}`,r);}function G(e){let n=new WeakMap;return (t,r)=>{let o=new Set;for(let s of t){let i=[{node:s,context:r,next:0}],u=a=>{i.pop();let d=i.at(-1)?.found??o;for(let c of a)d.add(c);};for(;i.length;){let a=i[i.length-1],d=n.get(a.node);if(d?.key===a.context.key){u(d.families);continue}if(!a.children){let m=e(a.node,a.context);a.children=m.children,a.found=new Set(m.families);}let c=a.children[a.next++];if(c){i.push({...c,next:0});continue}let f=[...a.found];f.length<=256?n.set(a.node,{key:a.context.key,families:f}):n.delete(a.node),u(f);}}return [...o]}}function W(e,n){return e.children.flatMap(t=>t.kind==="textValue"?[]:[{node:t,context:n}])}function qe(e,n){let{styles:t,theme:r,supplementalFamilies:o,depth:s}=n;if(e.kind==="table"){let a=chunkBNZF6DYC_cjs.Rc(e,468,s,t),d=[];for(let c of a?.rows??[])for(let f of c.cells){let m={...n,depth:s+1,cellStyle:f.styleFormatting,key:`${n.baseKey}|${s+1}|${JSON.stringify(f.styleFormatting)}`};for(let S of f.blocks)d.push({node:S,context:m});}return {children:d.reverse()}}let i=new Set;if(e.kind==="paragraph"){let a=e.children.find(c=>c.kind==="paragraphProperties"),d=chunkBNZF6DYC_cjs.Fb(t,a,n.cellStyle).runProperties;for(let c of chunkBNZF6DYC_cjs.tc(e,d,void 0,(f,m)=>chunkBNZF6DYC_cjs.Hb(f,m,t),void 0,void 0,"all-markup",void 0,void 0,r)){if(!c.text||c.fontSlot!=="eastAsia"&&!o.has(c.style.fontFamily??""))continue;let f=chunkZ2ETEZRU_cjs.a((c.fontSlot==="eastAsia"?c.style.fontFamilyEastAsia:c.style.fontFamily)??void 0);f&&i.add(f);}}let u=e.localName==="txbxContent"?{...n,cellStyle:void 0,key:`${n.baseKey}|${s}|undefined`}:n;return {families:[...i],children:W(e,u).reverse()}}function ze(){let e=G(qe),n,t;return (r,o,s)=>{if(!n||t!==o||n.theme!==s){let i=chunkBNZF6DYC_cjs.Eb(o,s);t=o,n={key:`${i.cacheToken}|0|undefined`,baseKey:i.cacheToken,styles:i,theme:s,depth:0,supplementalFamilies:new Set([...Object.values(s.majorSupplemental??{}),...Object.values(s.minorSupplemental??{})])};}return e([...r].reverse(),n)}}function yn(e,n,t){return ze()(e,n,t)}function ee(e,n){return e.attributes.find(t=>t.localName===n)?.value}var De=G((e,n)=>{let t=[];if(e.namespaceUri===chunkMXOO7KRI_cjs.da){if(e.localName==="fldSimple"){let r=chunkBNZF6DYC_cjs.kc(ee(e,"instr")??"")?.font;r&&t.push(r);}if(e.localName==="p")for(let r of je(e))t.push(r);}return {families:t,children:W(e,n)}});function Cn(e){let n=new Map;for(let t of De(e,{key:""})){let r=chunkZ2ETEZRU_cjs.a(t);r!==null&&!n.has(r.toLowerCase())&&n.set(r.toLowerCase(),r);}return [...n.values()]}function je(e){let n=[],t=chunkBNZF6DYC_cjs.ia(),r=[];for(let o=e.children.length-1;o>=0;o-=1){let s=e.children[o];s.kind!=="textValue"&&r.push({node:s,containerDepth:0});}for(;r.length>0;){let{node:o,containerDepth:s}=r.pop();if(s>=chunkMXOO7KRI_cjs.la||o.namespaceUri===chunkMXOO7KRI_cjs.da&&o.localName==="p")continue;if(o.namespaceUri===chunkMXOO7KRI_cjs.da&&o.localName==="fldChar"){let u=ee(o,"fldCharType");u==="begin"?chunkBNZF6DYC_cjs.la(t):u==="separate"?(t.nesting===1&&Ae(t,n),chunkBNZF6DYC_cjs.na(t)):u==="end"&&(t.nesting===1&&Ae(t,n),chunkBNZF6DYC_cjs.oa(t));continue}if(o.namespaceUri===chunkMXOO7KRI_cjs.da&&(o.localName==="instrText"||o.localName==="delInstrText")){chunkBNZF6DYC_cjs.ma(t,$e(o),o.localName==="delInstrText");continue}if(o.namespaceUri===chunkMXOO7KRI_cjs.da&&o.localName==="fldSimple"){let u=chunkBNZF6DYC_cjs.kc(ee(o,"instr")??"");u?.font&&n.push(u.font);}let i=chunkMXOO7KRI_cjs.ma(o,s);for(let u=o.children.length-1;u>=0;u-=1){let a=o.children[u];a.kind!=="textValue"&&r.push({node:a,containerDepth:i});}}return chunkBNZF6DYC_cjs.ja(t),n}function Ae(e,n){let t=chunkBNZF6DYC_cjs.ka(e);if(t.overflow)return;let r=chunkBNZF6DYC_cjs.kc(t.instruction);r?.font&&n.push(r.font);}function $e(e){let n="",t=[...e.children].reverse();for(;t.length>0&&n.length<=256;){let r=t.pop();if(r.kind==="textValue")n+=r.value;else for(let o=r.children.length-1;o>=0;o-=1)t.push(r.children[o]);}return n}function vn(e,n,t,r){if(!n)return [];let o=chunkBNZF6DYC_cjs.wc(n),s=chunkBNZF6DYC_cjs.Eb(t,r),i=new Map;for(let u of e)for(let a of Ke(u)){let d=chunkMXOO7KRI_cjs.Id(a.children),c=f=>{if(f)for(let m of f.values())for(let S of [m.markerStyle.fontFamily,m.markerStyle.fontFamilyEastAsia]){let E=chunkZ2ETEZRU_cjs.a(S??void 0);if(E===null)continue;let N=E.toLowerCase();i.has(N)||i.set(N,E);}};c(chunkBNZF6DYC_cjs.Ob(d,o,s));for(let f of d){let m=chunkBNZF6DYC_cjs.nd(f);for(let S of m.contents)c(chunkBNZF6DYC_cjs.md(S,o,s));}}return [...i.values()].sort((u,a)=>u.localeCompare(a))}function Ke(e){if(e.localName==="document"){for(let n of e.children)if(n.kind!=="textValue"&&n.localName==="body")return [n];return []}if(e.localName==="footnotes"||e.localName==="endnotes"){let n=[];for(let t of e.children)t.kind!=="textValue"&&(t.localName==="footnote"||t.localName==="endnote")&&n.push(t);return n}return [e]}var Ue={regular:{weight:400,style:"normal"},bold:{weight:700,style:"normal"},italic:{weight:400,style:"italic"},boldItalic:{weight:700,style:"italic"}};function Tn(e,n){let t=[],r=[],o=0;for(let s of e){let i=s.bytes.byteLength;if(!Number.isSafeInteger(i)||i>n||i>chunkWQFNWLNY_cjs.a||i>chunkWQFNWLNY_cjs.c-o){r.push(s);continue}o+=i,t.push(s);}return {sources:t,dropped:r}}function Nn(e,n,t){let r=n.reduce((s,i)=>s+i.bytes.byteLength,0),o=new Set(n.filter(s=>s.request.family.trim().length>0).map(s=>chunkWQFNWLNY_cjs.g(s.request)));return He(e,{maxFontBytes:t,aggregateBudget:Math.max(0,chunkWQFNWLNY_cjs.c-r),shadowedRequests:o})}function He(e,n){let t=[],r=[],o=n.aggregateBudget,s=new Set;for(let i of e){let u=Ue[i.style],a=Object.freeze({family:i.family,weight:u.weight,style:u.style});if(i.family.trim().length===0){r.push({request:a,partName:i.partName,reason:"malformed"});continue}let d=chunkWQFNWLNY_cjs.g(a);if(!(n.shadowedRequests?.has(d)||s.has(d))){if(s.add(d),i.bytes.byteLength>n.maxFontBytes||i.bytes.byteLength>o){r.push({request:a,partName:i.partName,reason:"overLimit"});continue}o-=i.bytes.byteLength,t.push({request:a,id:`embedded:${i.partName}#${i.style}`,bytes:i.bytes,hash:chunkMXOO7KRI_cjs.a(i.bytes),faceIndex:0});}}return {sources:t,dropped:r}}exports.a=D;exports.b=Ge;exports.c=We;exports.d=we;exports.e=Se;exports.f=Ee;exports.g=Ie;exports.h=Ce;exports.i=tn;exports.j=on;exports.k=rn;exports.l=sn;exports.m=Tn;exports.n=Nn;exports.o=He;exports.p=G;exports.q=W;exports.r=ze;exports.s=yn;exports.t=Cn;exports.u=je;exports.v=vn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkITNK6C5M_cjs=require('./chunk-ITNK6C5M.cjs'),chunkMXOO7KRI_cjs=require('./chunk-MXOO7KRI.cjs');var z=/^[\p{L}\p{N}\p{M} \-.+_]{1,64}$/u,J=128,Q=/[\u0000-\u001F\u007F-\u009F]/,G=16,nn=2,en=3276;function V(e){return e.kind!=="textValue"}function P(e,n){for(let t of e.children)if(V(t)&&t.localName===n)return t}function O(e,n){return e.attributes.find(t=>t.localName===n)?.value}function D(e){return e===void 0||e.length===0||e.length>J||Q.test(e)?null:e}function v(e,n){let t=chunkITNK6C5M_cjs.b(O(e,"asciiTheme"),n)??chunkITNK6C5M_cjs.b(O(e,"hAnsiTheme"),n);if(t!==null)return t;let l=O(e,"ascii")??O(e,"hAnsi");return l===void 0?null:z.test(l)?l:null}function C(e,n){let t=chunkITNK6C5M_cjs.b(O(e,"eastAsiaTheme"),n);if(t!==null)return t;let l=O(e,"eastAsia");return l===void 0?null:z.test(l)?l:null}function tn(e){return e!==void 0&&z.test(e)?e:null}function On(e){return tn(e)}function ln(e){return e!==void 0&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(n=>!!O(e,n))}function Y(e,n){if(!e)return {fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};let t=P(e,"rFonts"),l=P(e,"sz"),i=l?O(l,"val"):void 0,r=i!==void 0&&/^\d{1,4}$/.test(i)?Number(i):null;return {fontFamily:t?v(t,n):null,hasLatinFontReference:ln(t),fontSizeHalfPoints:r!==null&&r>=nn&&r<=en?r:null}}function Sn(e,n){let t=new Map,l={fontFamily:null,fontSizeHalfPoints:null,hasLatinFontReference:false};if(e){let a=P(e,"docDefaults"),s=a?P(a,"rPrDefault"):void 0;l=Y(s?P(s,"rPr"):void 0,n);for(let u of e.children){if(!V(u)||u.localName!=="style")continue;let o=D(O(u,"styleId"));if(o===null||t.has(o))continue;let f=P(u,"basedOn");t.set(o,{basedOn:D(f?O(f,"val"):void 0),own:Y(P(u,"rPr"),n)});}}let i=new Map,r=a=>{let s=a??"",u=i.get(s);if(u)return u;let o=null,f=null,m=l.hasLatinFontReference,b=new Set,y=a;for(let I=0;y!==null&&I<G&&!b.has(y);I+=1){b.add(y);let E=t.get(y);if(!E)break;o??=E.own.fontFamily,m||=E.own.hasLatinFontReference,f??=E.own.fontSizeHalfPoints,y=E.basedOn;}let g={hasLatinFontReference:m,fontFamily:o??l.fontFamily,fontSizeHalfPoints:f??l.fontSizeHalfPoints};return i.set(s,g),g};return (a,s)=>{let u=r(a),o=s?.find(b=>b.localName==="rFonts"),f=o?chunkITNK6C5M_cjs.b(o.attributes?.asciiTheme,n)??chunkITNK6C5M_cjs.b(o.attributes?.hAnsiTheme,n):null,m=["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(b=>!!o?.attributes?.[b]);return {fontFamily:f??u.fontFamily??(!u.hasLatinFontReference&&!m?n.minor:null),fontSizeHalfPoints:u.fontSizeHalfPoints}}}var an=16,on=16,rn=32,sn=4096;function x(e){return e.kind!=="textValue"}function c(e,n){for(let t of e.children)if(x(t)&&t.localName===n)return t}function M(e,n){return e.attributes.find(t=>t.localName===n)?.value}function un(e){return e==="1"||e==="true"||e==="on"}function H(){return {families:new Map,styleIds:new Set,anyText:false,bareParagraph:false,bareRun:false,bareTable:false}}function _(e,n){for(let[t,l]of n.families)e.families.has(t)||e.families.set(t,l);for(let t of n.styleIds)e.styleIds.add(t);e.anyText||=n.anyText,e.bareParagraph||=n.bareParagraph,e.bareRun||=n.bareRun,e.bareTable||=n.bareTable;}function T(e,n){if(n===null)return;let t=n.toLowerCase();e.has(t)||e.set(t,n);}var fn=new Set(["tab","noBreakHyphen","softHyphen","footnoteRef","endnoteRef","footnoteReference","endnoteReference"]),dn=128;function cn(e){for(let n of e.attributes)if(n.localName==="font"&&!(n.namespaceUri!==chunkMXOO7KRI_cjs.da&&n.namespaceUri!==""))return n.value.length>0&&n.value.length<=dn;return false}function $(e,n){if(n?.has(e.id))return true;for(let t of e.children)if(!(!x(t)||t.namespaceUri!==chunkMXOO7KRI_cjs.da)){if(fn.has(t.localName))return true;if(t.localName==="sym"){if(!cn(t))return true;continue}if(!(t.localName!=="t"&&t.localName!=="delText")){for(let l of t.children)if(!x(l)&&l.value.length>0)return true}}return false}function mn(e){for(let n of e.children)if(!(!x(n)||n.namespaceUri!==chunkMXOO7KRI_cjs.da)&&!(n.localName!=="t"&&n.localName!=="delText")){for(let t of n.children)if(!x(t))for(let l of t.value){let i=l.codePointAt(0);if(i>=4352&&i<=4607||i>=11904&&i<=40959||i>=43360&&i<=43391||i>=44032&&i<=55295||i>=63744&&i<=64255||i>=65072&&i<=65103||i>=65280&&i<=65519||i>=131072&&i<=262143)return true}}return false}function K(e,n){let t=[e];for(;t.length>0;){let l=t.pop();if(x(l)){if(n?.has(l.id))return true;if(l.localName==="r"&&l.namespaceUri===chunkMXOO7KRI_cjs.da){if($(l,n))return true;continue}for(let i of l.children)t.push(i);}}return false}function yn(e,n,t,l){if(!$(e,l))return;n.anyText=true;let i=c(e,"rPr"),r=i?c(i,"rFonts"):void 0;r&&(T(n.families,v(r,t)),mn(e)&&T(n.families,C(r,t)));let a=i?c(i,"rStyle"):void 0,s=D(a?M(a,"val"):void 0);s!==null?n.styleIds.add(s):n.bareRun=true;}function gn(e,n,t){if(!t)return;n.anyText=true;let l=e.localName==="tbl",i=c(e,l?"tblPr":"pPr"),r=i?c(i,l?"tblStyle":"pStyle"):void 0,a=D(r?M(r,"val"):void 0);a!==null?n.styleIds.add(a):l?n.bareTable=true:n.bareParagraph=true;}function X(e){return (e.localName==="p"||e.localName==="tbl")&&e.namespaceUri===chunkMXOO7KRI_cjs.da}function U(e,n,t,l,i){e.namespaceUri===chunkMXOO7KRI_cjs.da&&(i?.has(e.id)&&e.localName==="fldSimple"&&(n.anyText=true,n.bareRun=true),e.localName==="r"?yn(e,n,t,i):X(e)&&gn(e,n,l));}var W=new WeakMap;function q(e,n,t){let l=W.get(e);if(l&&l.major===n.major&&l.minor===n.minor&&l.majorEastAsia===n.majorEastAsia&&l.minorEastAsia===n.minorEastAsia&&l.majorBidi===n.majorBidi&&l.minorBidi===n.minorBidi)return l.summary;let i=H();if(e.children.length>=on&&t<rn){for(let r of e.children)x(r)&&_(i,q(r,n,t+1));U(e,i,n,i.anyText);}else {let r=[e];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let s=X(a)&&K(a);U(a,i,n,s);for(let u=a.children.length-1;u>=0;u-=1)r.push(a.children[u]);}}return W.set(e,{major:n.major,minor:n.minor,majorEastAsia:n.majorEastAsia,minorEastAsia:n.minorEastAsia,majorBidi:n.majorBidi,minorBidi:n.minorBidi,summary:i}),i}var xn={docDefaultFamilies:[],defaultParagraph:null,defaultCharacter:null,defaultTable:null,chainFamilies:()=>[]},Z=new WeakMap;function w(e,n){let t=c(e,"rPr"),l=t?c(t,"rFonts"):void 0;return l?v(l,n):null}function k(e,n){let t=c(e,"rPr"),l=t?c(t,"rFonts"):void 0;return l?C(l,n):null}function hn(e,n){let t=new Map,l=null,i=null,r=null,a=null,s=null,u=c(e,"docDefaults"),o=u?c(u,"rPrDefault"):void 0;o&&(l=w(o,n),i=k(o,n));let f=o?c(o,"rPr"):void 0,m=f?c(f,"rFonts"):void 0;m&&["ascii","hAnsi","asciiTheme","hAnsiTheme"].some(d=>!!M(m,d))||(l??=n.minor);let y=0;for(let d of e.children){if(!x(d)||d.localName!=="style")continue;if(y>=sn)break;y+=1;let h=D(M(d,"styleId"));if(h===null)continue;let S=c(d,"basedOn"),F=[];for(let p of d.children){if(!x(p)||p.localName!=="tblStylePr")continue;let L=w(p,n);L!==null&&F.push(L);let R=k(p,n);R!==null&&F.push(R);}t.set(h,{basedOn:D(S?M(S,"val"):void 0),family:w(d,n),eastAsiaFamily:k(d,n),conditionalFamilies:F});let A=un(M(d,"default")),j=M(d,"type");j==="paragraph"?A?r=h:r===h&&(r=null):j==="character"?A?a=h:a===h&&(a=null):j==="table"&&(A?s=h:s===h&&(s=null));}let g=new Map,I=d=>{if(d===null)return [];let h=g.get(d);if(h)return h;let S=[],F=null,A=null,j=new Set,p=d;for(let L=0;p!==null&&L<an&&!j.has(p);L+=1){j.add(p);let R=t.get(p);if(!R)break;F??=R.family,A??=R.eastAsiaFamily,S.push(...R.conditionalFamilies),p=R.basedOn;}return F!==null&&S.unshift(F),A!==null&&S.unshift(A),g.set(d,S),S};return {docDefaultFamilies:[l,i].filter(d=>d!==null),defaultParagraph:r,defaultCharacter:a,defaultTable:s,chainFamilies:I}}function bn(e,n){if(!e)return {...xn,docDefaultFamilies:n.minor?[n.minor]:[]};let t=Z.get(e);if(t&&t.major===n.major&&t.minor===n.minor&&t.majorEastAsia===n.majorEastAsia&&t.minorEastAsia===n.minorEastAsia&&t.majorBidi===n.majorBidi&&t.minorBidi===n.minorBidi)return t.index;let l=hn(e,n);return Z.set(e,{major:n.major,minor:n.minor,majorEastAsia:n.majorEastAsia,minorEastAsia:n.minorEastAsia,majorBidi:n.majorBidi,minorBidi:n.minorBidi,index:l}),l}function En(e,n,t,l){let i=H(),r=new Map;for(let o of e){let f=H();for(let m of o.children){if(!x(m))continue;if(!l||l.size===0){_(f,q(m,t,0));continue}let b=H(),y=[m];for(;y.length>0;){let g=y.pop();if(!x(g))continue;let I=X(g)&&K(g,l);U(g,b,t,I,l);for(let E=g.children.length-1;E>=0;E-=1)y.push(g.children[E]);}_(f,b);}_(i,f);for(let m of f.families.values())T(r,m);}let a=bn(n,t),s=new Map;for(let o of i.styleIds)for(let f of a.chainFamilies(o))T(s,f);if(i.bareParagraph)for(let o of a.chainFamilies(a.defaultParagraph))T(s,o);if(i.bareRun)for(let o of a.chainFamilies(a.defaultCharacter))T(s,o);if(i.bareTable)for(let o of a.chainFamilies(a.defaultTable))T(s,o);if(i.anyText)for(let o of a.docDefaultFamilies)T(s,o);for(let o of r.keys())s.delete(o);let u=[...s.values()].sort((o,f)=>o<f?-1:o>f?1:0);return Object.freeze({direct:Object.freeze([...r.values()]),inherited:Object.freeze(u)})}function An(e,n,t){let l=En(e,n,t),i=[...l.direct,...l.inherited];return i.sort((r,a)=>r<a?-1:r>a?1:0),i}exports.a=tn;exports.b=On;exports.c=Sn;exports.d=En;exports.e=An;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk4EHMMSFR_cjs=require('../chunk-4EHMMSFR.cjs'),chunkMXOO7KRI_cjs=require('../chunk-MXOO7KRI.cjs');Object.defineProperty(exports,"createCollaborationDocumentPort",{enumerable:true,get:function(){return chunk4EHMMSFR_cjs.b}});Object.defineProperty(exports,"historyGroupOfJournal",{enumerable:true,get:function(){return chunkMXOO7KRI_cjs.ya}});Object.defineProperty(exports,"reportHistoryGroup",{enumerable:true,get:function(){return chunkMXOO7KRI_cjs.Mi}});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { T as TreePackageStore,
|
|
2
|
-
|
|
3
|
-
import '../
|
|
1
|
+
import { b as HistoryGroup, T as TreePackageStore, c as TreeModelChange } from '../tree-package-fragment-CwJDixNs.js';
|
|
2
|
+
export { r as reportHistoryGroup } from '../tree-package-fragment-CwJDixNs.js';
|
|
3
|
+
import { a1 as OoxmlElement, j as OoxmlPackage } from '../types-barrel-DLB11iSY.js';
|
|
4
|
+
import '../image-resources-C4ilLzog.js';
|
|
5
|
+
import '../editor-scope-OHPwVQ5l.js';
|
|
4
6
|
|
|
5
7
|
/** Attribute name as the journal addresses it. Prefix is authored fidelity, not identity. @public */
|
|
6
8
|
interface CanonicalAttributeName {
|
|
@@ -107,6 +109,8 @@ type CanonicalPrimitiveEffect = {
|
|
|
107
109
|
interface CanonicalPrimitiveJournal {
|
|
108
110
|
readonly effects: readonly CanonicalPrimitiveEffect[];
|
|
109
111
|
}
|
|
112
|
+
/** The history group the transaction behind `journal` named, if any. @public */
|
|
113
|
+
declare function historyGroupOfJournal(journal: CanonicalPrimitiveJournal): HistoryGroup | undefined;
|
|
110
114
|
|
|
111
115
|
/** Options for a canonical collaboration document port. @public */
|
|
112
116
|
interface CreateCollaborationDocumentPortOptions {
|
|
@@ -196,6 +200,11 @@ interface CollaborationDocumentPort {
|
|
|
196
200
|
*
|
|
197
201
|
* Disabled observation allocates no journal. This is the collaboration write seam;
|
|
198
202
|
* adapters never write a CRDT through this port.
|
|
203
|
+
* Preserve the journal object's identity and deliver it synchronously to local capture.
|
|
204
|
+
* `historyGroupOfJournal` reads local identity metadata, outside replicated state.
|
|
205
|
+
* Cloning, spreading, serialization or postMessage loses that metadata. Custom worker
|
|
206
|
+
* ports must map local gesture identities explicitly; a serialized journal alone cannot
|
|
207
|
+
* preserve gesture grouping or synchronous `ExecResult.history` reporting.
|
|
199
208
|
*/
|
|
200
209
|
observePrimitiveJournal(listener: (journal: CanonicalPrimitiveJournal) => void): () => void;
|
|
201
210
|
/** True when a committed journal has not yet been frozen or delivered to observers. */
|
|
@@ -212,4 +221,4 @@ interface CollaborationDocumentPort {
|
|
|
212
221
|
binaryPart(storageKey: string): Uint8Array | null;
|
|
213
222
|
}
|
|
214
223
|
|
|
215
|
-
export { type CanonicalAttributeName, type CanonicalBinaryDescriptor, type CanonicalElementNodeDescriptor, type CanonicalNodeDescriptor, type CanonicalPrimitiveEffect, type CanonicalPrimitiveJournal, type CanonicalRelationshipRecord, type CanonicalTextNodeDescriptor, type CollaborationApplyResult, type CollaborationDocumentPort, type CollaborationMutation, type CollaborationParagraph, type CollaborationParagraphTextUpdate, type CreateCollaborationDocumentPortOptions, createCollaborationDocumentPort };
|
|
224
|
+
export { type CanonicalAttributeName, type CanonicalBinaryDescriptor, type CanonicalElementNodeDescriptor, type CanonicalNodeDescriptor, type CanonicalPrimitiveEffect, type CanonicalPrimitiveJournal, type CanonicalRelationshipRecord, type CanonicalTextNodeDescriptor, type CollaborationApplyResult, type CollaborationDocumentPort, type CollaborationMutation, type CollaborationParagraph, type CollaborationParagraphTextUpdate, type CreateCollaborationDocumentPortOptions, HistoryGroup, createCollaborationDocumentPort, historyGroupOfJournal };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as createCollaborationDocumentPort}from'../chunk-
|
|
1
|
+
export{b as createCollaborationDocumentPort}from'../chunk-Q2B6HX3R.js';export{ya as historyGroupOfJournal,Mi as reportHistoryGroup}from'../chunk-NG6IQ4SI.js';
|
package/dist/collaboration.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { S as StoryScope } from './tree-package-fragment-
|
|
2
|
-
import {
|
|
1
|
+
import { S as StoryScope } from './tree-package-fragment-CwJDixNs.js';
|
|
2
|
+
import { W as TreeDocOp } from './types-barrel-DLB11iSY.js';
|
|
3
3
|
import { CollaborationDocumentPort } from './collaboration/replication.js';
|
|
4
4
|
import { C as CollaborationStatus, a as CollaborationStatusSnapshot, b as CollaborationFailureCode } from './failure-DNNmwsgD.js';
|
|
5
5
|
export { c as CollaborationFailure, d as createCollaborationStatusTracker, i as isCollaborationFailureCode } from './failure-DNNmwsgD.js';
|
|
6
|
-
import './
|
|
6
|
+
import './image-resources-C4ilLzog.js';
|
|
7
|
+
import './editor-scope-OHPwVQ5l.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A peer's presence color is attacker-controlled: it arrives over awareness from whoever is in
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { DocxDocument, ExecResult, ContentControlType, DocTarget, RunFormatting, Extent, InsertableContentControlType, ContainerRef, ContentControlFilter, DocRange, Revision, DocComment, StyleDefinitions } from '
|
|
2
|
-
export { Block, ColorValue, ContentControl, DocAnchor, DocAnchorRange, DocLocation, DocumentBody, ExecErrorCode, HeaderFooterSet, IndentFormatting, Paragraph, ParagraphFlags, ParagraphTabStop, RevisionType, Section, SectionProperties, StyleDefinition, Table, Theme, ThemeColorScheme } from '
|
|
1
|
+
import { D as DocxDocument, E as ExecResult, k as ContentControlType, l as DocTarget, m as RunFormatting, n as Extent, I as InsertableContentControlType, o as ContainerRef, p as ContentControlFilter, q as DocRange, r as Revision, s as DocComment, S as StyleDefinitions } from '../types-barrel-DLB11iSY.js';
|
|
2
|
+
export { B as Block, t as ColorValue, u as ContentControl, v as DocAnchor, w as DocAnchorRange, x as DocLocation, y as DocumentBody, z as ExecErrorCode, H as HeaderFooterSet, A as IndentFormatting, P as Paragraph, F as ParagraphFlags, G as ParagraphTabStop, J as RevisionType, K as Section, L as SectionProperties, M as StyleDefinition, T as Table, N as Theme, Q as ThemeColorScheme } from '../types-barrel-DLB11iSY.js';
|
|
3
|
+
import '../editor-scope-OHPwVQ5l.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* `@docx-editor.dev/core/contracts/document` — the document-level edit and query vocabulary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkUKVVUHZL_cjs=require('../chunk-UKVVUHZL.cjs');Object.defineProperty(exports,"EditorFontError",{enumerable:true,get:function(){return chunkUKVVUHZL_cjs.a}});
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
export { A as AuthoredNoteNumbering, C as CanResult, u as DocumentChange, w as DocumentEditingMode, x as DocumentHandle, D as DocumentSource, n as Editor, e as EditorCommand, y as EditorCommandShape, z as EditorCommands, B as EditorError, G as EditorEvents, E as EditorFontError, H as EditorFontErrorCode, J as EditorFormatPainterCommands, K as EditorHeaderFooterCommands, L as EditorNoteCommands, M as EditorPosition, N as EditorQueries, O as EditorQuery, P as EditorQueryResults, Q as EditorSelection, d as EditorSnapshot, a as FontConfiguration, F as FontFaceRequest, b as FontSource, c as FontSourceSubstitution, R as FormatPainterLevel, U as FormatPainterMode, o as FormatPainterSurfaceState, V as FurnitureVariant, W as HeaderFooterSlotArgs, X as HeaderFooterState, Y as HyperlinkInfo, I as ImageContext, f as ImageCropPercent, _ as NoteKind, $ as NotePropertiesSide, a0 as NotePropertiesState, a1 as PageSetup, a2 as ResolveReviewChangesOptions, a3 as ResolvedNoteNumbering, a4 as ReviewActivationOptions, a5 as ReviewCommentPlacement, a6 as ReviewCustomPlacement, a7 as ReviewItemPlacement, a8 as ReviewItemPlacementBase, a9 as ReviewItemQuery, aa as ReviewRevisionPlacement, S as SelectedImageState, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, ab as TableBorderTarget, ac as TableCellVerticalAlignment, ad as TableColumnDividerResizeTarget, ae as TableColumnOccurrenceTarget, t as TableContext, af as TableRightEdgeResizeTarget, ag as TableRowOccurrenceTarget, ah as TextMatch, T as TrackedChangeFilterMode, h as TrackedChangePredicate, ai as ZoomFitTarget, Z as ZoomMode } from '../editor-BsLSz_7y.js';
|
|
2
|
+
import '../revision-projection-DEIvpxiq.js';
|
|
3
|
+
export { B as Block, t as ColorValue, C as CommentRecord, o as ContainerRef, u as ContentControl, p as ContentControlFilter, k as ContentControlType, v as DocAnchor, w as DocAnchorRange, s as DocComment, x as DocLocation, q as DocRange, l as DocTarget, y as DocumentBody, D as DocxDocument, ah as DocxDocumentJSON, ai as DrawingHorizontalReferenceFrame, a8 as DrawingKind, ab as DrawingLocks, aa as DrawingPositionInput, aj as DrawingVerticalReferenceFrame, z as ExecErrorCode, E as ExecResult, n as Extent, ak as FontDefinition, H as HeaderFooterSet, a9 as ImageWrapTarget, A as IndentFormatting, I as InsertableContentControlType, al as NumberingRef, am as PageMargins, P as Paragraph, an as ParagraphDisagreements, F as ParagraphFlags, ac as ParagraphFormatCommand, G as ParagraphTabStop, ao as Point, ae as Rect, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, r as Revision, h as RevisionAddress, _ as RevisionBatchResult, J as RevisionType, ap as Run, m as RunFormatting, K as Section, L as SectionProperties, af as SelectionPin, M as StyleDefinition, S as StyleDefinitions, T as Table, aq as TableCell, ar as TableRow, N as Theme, Q as ThemeColorScheme, ag as Unsubscribe, ad as Watermark } from '../types-barrel-DLB11iSY.js';
|
|
1
4
|
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.js';
|
|
2
|
-
export { E as EditorScope, V as ViewScope } from '../editor-scope-
|
|
3
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-items-CJz-kAW8.js';
|
|
5
|
+
export { b as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, a as HistoryGroup, c as HistoryGroupOutcome, V as ViewScope } from '../editor-scope-OHPwVQ5l.js';
|
|
4
6
|
export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './interaction.js';
|
|
5
|
-
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
import '../document-protection-BL5zp8cU.js';
|
|
7
|
+
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-BLu3M6Nn.js';
|
|
8
|
+
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-C4ilLzog.js';
|
|
9
|
+
import '../document-protection-Cr59VKLO.js';
|
|
9
10
|
import '../failure-DNNmwsgD.js';
|
|
10
|
-
|
|
11
|
-
import '../
|
|
12
|
-
import '../revision-projection-BIHO_qvw.js';
|
|
13
|
-
import '../omml-equation-hcP9AUFX.js';
|
|
11
|
+
import '../semantic-records-CqD0b5Ex.js';
|
|
12
|
+
import '../omml-equation-CbnW9yXd.js';
|
package/dist/contracts/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as EditorFontError}from'../chunk-
|
|
1
|
+
export{a as EditorFontError}from'../chunk-S6J4O5XP.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as ViewScope } from '../editor-scope-
|
|
2
|
-
export { E as EditorScope } from '../editor-scope-
|
|
1
|
+
import { V as ViewScope } from '../editor-scope-OHPwVQ5l.js';
|
|
2
|
+
export { E as EditorScope } from '../editor-scope-OHPwVQ5l.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `@docx-editor.dev/core/contracts/interaction` — semantic addressing and interaction outcomes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkTKQH7BNE_cjs=require('../chunk-TKQH7BNE.cjs');Object.defineProperty(exports,"resolveEditorModules",{enumerable:true,get:function(){return chunkTKQH7BNE_cjs.a}});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { O as OoxmlPart } from '../
|
|
2
|
-
export {
|
|
3
|
-
import { R as
|
|
4
|
-
export {
|
|
1
|
+
import { R as ReviewModelInput, a as ReviewItem, O as OoxmlPart, b as ReviewRevisionItem } from '../types-barrel-DLB11iSY.js';
|
|
2
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind, h as RevisionAddress } from '../types-barrel-DLB11iSY.js';
|
|
3
|
+
import { R as ReviewDisplayMode } from '../revision-projection-DEIvpxiq.js';
|
|
4
|
+
export { a as RevisionDisplayMode } from '../revision-projection-DEIvpxiq.js';
|
|
5
5
|
import { CollaborationModuleContribution } from '../collaboration.js';
|
|
6
|
-
import
|
|
7
|
-
import '
|
|
8
|
-
import '../
|
|
6
|
+
import '../editor-scope-OHPwVQ5l.js';
|
|
7
|
+
import '../tree-package-fragment-CwJDixNs.js';
|
|
8
|
+
import '../image-resources-C4ilLzog.js';
|
|
9
9
|
import '../collaboration/replication.js';
|
|
10
10
|
import '../failure-DNNmwsgD.js';
|
|
11
11
|
|
|
@@ -54,7 +54,7 @@ interface ReviewModuleContribution {
|
|
|
54
54
|
* carried so the future `setRevisionDisplayMode` command can validate against
|
|
55
55
|
* it without a breaking module-shape change.
|
|
56
56
|
*/
|
|
57
|
-
readonly displayModes: readonly
|
|
57
|
+
readonly displayModes: readonly ReviewDisplayMode[];
|
|
58
58
|
/** The review queue derivation. */
|
|
59
59
|
readonly collectReviewItems: CollectReviewItems;
|
|
60
60
|
/**
|
|
@@ -126,4 +126,4 @@ interface EditorModuleRegistry {
|
|
|
126
126
|
/** Resolve construction-time modules into the registry the instance dispatches over. */
|
|
127
127
|
declare function resolveEditorModules(modules: readonly EditorModule[] | undefined): EditorModuleRegistry;
|
|
128
128
|
|
|
129
|
-
export { CollaborationModuleContribution, type CollectReviewItems, type EditorModule, type EditorModuleRegistry, OoxmlPart, ReviewItem, ReviewModelInput, type ReviewModuleContribution, ReviewRevisionItem,
|
|
129
|
+
export { CollaborationModuleContribution, type CollectReviewItems, type EditorModule, type EditorModuleRegistry, OoxmlPart, ReviewDisplayMode, ReviewItem, ReviewModelInput, type ReviewModuleContribution, ReviewRevisionItem, resolveEditorModules };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as resolveEditorModules}from'../chunk-
|
|
1
|
+
export{a as resolveEditorModules}from'../chunk-AJCCS53D.js';
|