@docx-editor.dev/core 2.16.0 → 2.16.2
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/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +6 -6
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +10 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-4RDCLCLB.js +2 -0
- package/dist/chunk-7QG5FJ4X.js +1 -0
- package/dist/chunk-BML3CNUT.js +2 -0
- package/dist/chunk-FRRMJK2G.js +5 -0
- package/dist/{chunk-FAD7DH6Q.cjs → chunk-G5GLQ4SX.cjs} +1 -1
- package/dist/chunk-JP253KIZ.cjs +2 -0
- package/dist/chunk-JROG4U3Z.cjs +21 -0
- package/dist/{chunk-DYPT6YDY.js → chunk-MBXGQN6J.js} +1 -1
- package/dist/{chunk-QVJO5FUR.js → chunk-MDMM3XVQ.js} +6 -6
- package/dist/{chunk-4MIFIUEV.cjs → chunk-NO7U62I2.cjs} +1 -1
- package/dist/{chunk-WGHVIB6B.cjs → chunk-NPZX5O23.cjs} +1 -1
- package/dist/chunk-OISZDVXT.cjs +5 -0
- package/dist/{chunk-YRTRPSSA.cjs → chunk-PRNYSOQL.cjs} +1 -1
- package/dist/chunk-QQP2SGAT.js +20 -0
- package/dist/chunk-RXPOTTQQ.js +21 -0
- package/dist/chunk-T7JERNXT.cjs +2 -0
- package/dist/{chunk-TDHR2QLH.cjs → chunk-TDMGSCCL.cjs} +1 -1
- package/dist/{chunk-BPSGGVP5.cjs → chunk-UIB2MDE3.cjs} +1 -1
- package/dist/{chunk-I4ENGOOZ.js → chunk-UXAWPVH6.js} +1 -1
- package/dist/{chunk-AEIAYDCG.js → chunk-VYQTZIYH.js} +1 -1
- package/dist/chunk-W7GY2IJC.js +2 -0
- package/dist/chunk-XC7YDJBL.cjs +20 -0
- package/dist/{chunk-YKDRBDI2.js → chunk-XXLS6O6B.js} +1 -1
- package/dist/{chunk-GHNTGVKG.cjs → chunk-ZFBNCHRP.cjs} +6 -6
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -4
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -4
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/modules.d.ts +8 -8
- package/dist/{custom-node-writes-4WOL8JB_.d.ts → custom-node-writes-ClTkWM7s.d.ts} +2 -2
- package/dist/{editor-PDx0fqSo.d.ts → editor-BlerWPyk.d.ts} +21 -3
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +26 -26
- package/dist/editor.js +1 -1
- package/dist/export.cjs +1 -1
- package/dist/export.d.ts +11 -11
- package/dist/export.js +1 -1
- package/dist/{font-resolver-CdqOugwZ.d.ts → font-resolver-DtADJcLL.d.ts} +1 -1
- package/dist/{headless-document-view-C9ONlGtf.d.ts → headless-document-view-BDSeMGoK.d.ts} +2 -2
- package/dist/{hf-references-BZVHctVD.d.ts → hf-references-kSSFMq9X.d.ts} +1 -1
- package/dist/{index-BVb4a6O3.d.ts → index-D51bUVBE.d.ts} +96 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-D_U5z-Qh.d.ts → layout-shaping-rTElghj2.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +21 -19
- package/dist/layout.js +1 -1
- package/dist/{note-properties-BosjbkGC.d.ts → note-properties-D5_fXW9K.d.ts} +1 -1
- package/dist/{omml-equation-oLlbPpVy.d.ts → omml-equation-C9AJfWy5.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-CUsqt13U.d.ts → protocol-K-Djpjjw.d.ts} +2 -2
- package/dist/{review-items-kC-YI70C.d.ts → review-items-CiliAz8H.d.ts} +11 -1
- package/dist/review-paragraph-order-BlSnyg9a.d.ts +79 -0
- package/dist/{revision-projection-CN_DiOl_.d.ts → revision-projection-JiDclAFU.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BMrXDniV.d.ts → semantic-cell-selection-C-VsxNee.d.ts} +4 -4
- package/dist/{semantic-interaction-NGeYzYCN.d.ts → semantic-interaction-2vPh96Ey.d.ts} +1 -1
- package/dist/{semantic-paint-CM8F-8pH.d.ts → semantic-paint-BEjYcsPK.d.ts} +4 -2
- package/dist/{semantic-records-BreR44Ki.d.ts → semantic-records-Bc-MGXbM.d.ts} +9 -3
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +99 -15
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-C5rZzoAz.d.ts → tree-op-types-C71G7rIv.d.ts} +6 -2
- package/dist/{tree-package-fragment-DDQHk8sv.d.ts → tree-package-fragment-DRJkmfTW.d.ts} +3 -3
- package/dist/{tree-session-contract-dKgbKH9A.d.ts → tree-session-contract-Cp5W25RC.d.ts} +7 -7
- package/dist/{tree-store-DU192chS.d.ts → tree-store-BRfhZceK.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-66DTF4TD.cjs +0 -2
- package/dist/chunk-67U2OZS7.cjs +0 -2
- package/dist/chunk-6EGMDUL7.js +0 -21
- package/dist/chunk-ABXCIZVW.js +0 -2
- package/dist/chunk-CMV2MTDE.js +0 -5
- package/dist/chunk-EWV5JMJY.cjs +0 -21
- package/dist/chunk-GQVKCK33.js +0 -2
- package/dist/chunk-IZHDCQUC.js +0 -20
- package/dist/chunk-KEXMDQ2Z.js +0 -1
- package/dist/chunk-KQEUFAAG.cjs +0 -20
- package/dist/chunk-SIUUTE5M.js +0 -2
- package/dist/chunk-XKQTITOJ.cjs +0 -5
- package/dist/review-reads-DdvADsmp.d.ts +0 -161
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {hg,Ga,La,ec,dc,za,ya,Qh,da,Aa,Kb,Eb,Db,ea}from'./chunk-MDMM3XVQ.js';var W=new Set(["document","hdr","ftr","footnotes","endnotes"]),$=24,U=512,E=hg($);function z(o){let a=o.root;return a.namespaceUri===da&&W.has(a.localName)}function Y(o){let a=[],r=e=>{if(e.kind!=="textValue"){e.namespaceUri===da&&e.localName==="p"&&a.push(e);for(let i of e.children)r(i);}};return r(o.root),a}function V(o){let a=Kb(o);let r=[],e=new Set;for(let i of Y(a)){let n=Eb(i);if(!n||!Db(n))continue;let t=n.toUpperCase();if(e.has(t))continue;e.add(t);let s=Qh(a,i.id);s!==null&&r.push(Object.freeze({paragraphId:t,nodeId:i.id,text:s}));}return Object.freeze(r)}function G(o){let a=E.get(o.root);if(a)return a;let r=Kb(o);let e=new Map,i=new Set,n=t=>{if(t.kind!=="textValue"){if(t.namespaceUri===da&&t.localName==="p"){let s=Eb(t);if(s&&Db(s)){let p=s.toUpperCase();i.has(p)||(i.add(p),t.kind==="paragraph"&&e.set(p,t.id));}}for(let s of t.children)n(s);}};return n(r.root),E.set(o.root,e),e}function w(o,a){if(o.length!==a.length)return false;for(let r=0;r<o.length;r+=1)if(o[r].root!==a[r])return false;return true}function B(o){let a=new Map,r=null,e=(n,t,s)=>{for(a.delete(n),a.set(n,{partName:t.name,root:t.root,nodeId:s});a.size>U;){let p=a.keys().next();if(p.done)break;a.delete(p.value);}},i=(n,t)=>{let s=a.get(n);if(!s)return null;let p=t.find(c=>c.name===s.partName);if(!p)return null;if(p.root===s.root)return {part:p,nodeId:s.nodeId};let l=Ga(p,s.nodeId);if(!l||l.kind!=="paragraph")return null;let d=Eb(l);return !d||d.toUpperCase()!==n?null:(e(n,p,s.nodeId),{part:p,nodeId:s.nodeId})};return n=>{let t=o(),s=i(n,t);if(s)return s;if(r&&r.ids.has(n)&&w(t,r.roots))return null;for(let p of t){let l=G(p).get(n);if(l!==void 0)return e(n,p,l),{part:p,nodeId:l}}return (!r||!w(t,r.roots))&&(r={roots:t.map(p=>p.root),ids:new Set}),r.ids.size<U&&r.ids.add(n),null}}function H(o,a){return Aa(o,a)}var Z=Object.freeze({kind:"body"}),q=1e6;function b(o,a){if(a<=0||a>=o.length)return false;let r=o.charCodeAt(a-1),e=o.charCodeAt(a);return r>=55296&&r<=56319&&e>=56320&&e<=57343}function F(o,a,r){if(a===r)return [];let e=0,i=Math.min(a.length,r.length);for(;e<i&&a.charCodeAt(e)===r.charCodeAt(e);)e+=1;for(;e>0&&(b(a,e)||b(r,e));)e-=1;let n=0;for(;n<a.length-e&&n<r.length-e&&a.charCodeAt(a.length-n-1)===r.charCodeAt(r.length-n-1);)n+=1;for(;n>0&&(b(a,a.length-n)||b(r,r.length-n));)n-=1;let t=a.length-e-n,s=r.slice(e,r.length-n),p=[];return t>0&&p.push({op:"deleteText",paragraphId:o,start:e,end:e+t}),s.length>0&&p.push({op:"insertText",paragraphId:o,offset:e,text:s}),Object.freeze(p)}function Q(o){let a=e=>!!e&&e.kind!=="textValue"&&e.namespaceUri===da&&e.localName==="t"&&e.attributes.every(i=>i.namespaceUri===ea&&i.localName==="space")&&e.children.every(i=>i.kind==="textValue"),r=[];for(let e of o){let i=r.at(-1);if(!a(i)||!a(e)){r.push(e);continue}let n=i.children.map(t=>t.kind==="textValue"?t.value:"").join("")+e.children.map(t=>t.kind==="textValue"?t.value:"").join("");r[r.length-1]={...i,attributes:/^\s|\s$/.test(n)?[{kind:"xmlSpace",namespaceUri:ea,localName:"space",prefix:"xml",value:"preserve"}]:[],children:[{id:i.children[0]?.id??`${i.id}/text`,kind:"textValue",value:n}]};}return r}function L(o){if(o.kind==="textValue")return o;let a=false,r=o.children.map(e=>{let i=L(e);return i!==e&&(a=true),i});if(o.namespaceUri===da&&o.localName==="r"){let e=Q(r);(e.length!==r.length||e.some((i,n)=>i!==r[n]))&&(r=[...e],a=true);}return a?{...o,children:r}:o}function K(o,a,r){let e=o.parts.get(a);if(!e)return o;let i=false,n=new Set;for(let t of r)(t.op==="insertText"||t.op==="deleteText")&&!t.revision&&n.add(t.paragraphId);for(let t of n){let s=Ga(e,t);if(!s||s.kind==="textValue")continue;let p=L(s);if(p===s)continue;let l=La(e,t,p,{deferValidation:true});l.ok&&(e=l.part,i=true);}return i?ec(o,e):o}function ee(o,a){let r=a.documentId.trim();if(r.length===0||r.length>256)throw new TypeError("documentId must contain 1 to 256 characters");let e=()=>V(o.bodyStore().part),i,t=B(()=>{let l=o.bodyStore().part,d=o.currentPackage();if(i?.pkg===d&&i.body===l)return i.parts;let c=[l];for(let g of d.parts.values())g===l||!z(g)||c.push(g);return i={pkg:d,body:l,parts:Object.freeze(c)},i.parts}),s=(l,d)=>{if(l.length===0)return {ok:true,changed:false};let c=e(),g=new Set,h=[];for(let u of l){if(typeof u.text!="string"||u.text.length>q)return {ok:false,reason:"collaboration-text-limit"};if(typeof u.paragraphId!="string"||u.paragraphId.length===0||u.paragraphId.length>256)return {ok:false,reason:"unknown-paragraph-id"};let m=u.paragraphId.toUpperCase();if(g.has(m))return {ok:false,reason:"duplicate-paragraph-id"};g.add(m);let N=c.filter(X=>X.paragraphId===m);if(N.length!==1)return {ok:false,reason:"unknown-paragraph-id"};let T=N[0];h.push(...F(T.nodeId,T.text,u.text));}if(h.length===0)return {ok:true,changed:false};let y=o.transact(Z,u=>{for(let m of h)u.apply(m);u.applyPackage(m=>K(m,m.mainDocumentPart,h));},{origin:d.origin,actorId:d.actorId,operationId:d.operationId,recordsHistory:false});return y.ok?{ok:true,changed:y.change!==null}:{ok:false,reason:y.detail??y.reason}};return Object.freeze({documentId:r,paragraphs:e,paragraphByNodeId(l){return e().find(d=>d.nodeId===l)??null},paragraphByStableId(l){let d=l.toUpperCase(),c=t(d);if(!c)return null;let g=Qh(c.part,c.nodeId);return g===null?null:Object.freeze({paragraphId:d,nodeId:c.nodeId,text:g})},applyParagraphText(l,d,c){return s([{paragraphId:l,text:d}],c)},applyParagraphTexts:s,applyRemotePackage(l,d){let c=o.publishRemotePackage(l,d);return c.ok?{ok:true,changed:c.change!==null}:{ok:false,reason:c.detail??c.reason}},revision:()=>o.packageRevision,subscribe:l=>o.subscribe(l),observePrimitiveJournal:l=>H(o,l),hasPendingJournals:()=>ya(o),flushPendingJournals:()=>{za(o);},save:()=>dc(o.currentPackage()),binaryPart(l){let d=o.currentPackage();return d.partBytes.get(l)??d.partBytes.get(l.startsWith("/")?l.slice(1):`/${l}`)??null}})}export{K as a,ee as b};
|