@eigenpal/docx-editor-agents 1.0.2 → 1.0.3
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 +1 -1
- package/dist/bridge.d.mts +1 -1
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/chunk-7C5RGTQY.js +71 -0
- package/dist/{chunk-W6AWGFM4.js → chunk-DDW6L3LZ.js} +2 -2
- package/dist/{chunk-J2BSSNNF.mjs → chunk-JQBSMHZA.mjs} +1 -1
- package/dist/{chunk-6Z6UJ4RC.js → chunk-MOAJJKKG.js} +3 -3
- package/dist/{chunk-MQIZY6IO.mjs → chunk-NGMVN6QV.mjs} +1 -1
- package/dist/chunk-OHVUJUDE.mjs +71 -0
- package/dist/{chunk-EKCQF23W.mjs → chunk-PSSPSJR4.mjs} +1 -1
- package/dist/{chunk-RP4LYHUB.js → chunk-SCYZRJWI.js} +1 -1
- package/dist/{headless-JZRG6TNP.js → headless-3IX5WQEZ.js} +1 -1
- package/dist/{headless-2IWI27NG.mjs → headless-V7JUUMG6.mjs} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/{server-B7RHNVSu.d.mts → server-CGxgyhy-.d.mts} +25 -0
- package/dist/{server-B7RHNVSu.d.ts → server-CGxgyhy-.d.ts} +25 -0
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-4UY5MI2V.mjs +0 -71
- package/dist/chunk-ONK67NAB.js +0 -71
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {U,V as V$1,H as H$1,I}from'./chunk-
|
|
1
|
+
import {U,V as V$1,H as H$1,I}from'./chunk-OHVUJUDE.mjs';function h(s){return s.type==="insertion"||s.type==="deletion"||s.type==="moveFrom"||s.type==="moveTo"}function x(s){let n=[];for(let o of s)o.type==="run"?n.push(H$1(o)):o.type==="hyperlink"&&n.push(I(o));return n.join("")}function K(s,n){let o=0;for(let t of s.content)if(t.type==="paragraph"){if(o===n)return t;o++;}else if(t.type==="table"){for(let r of t.rows)for(let e of r.cells)for(let a of e.content)if(a.type==="paragraph"){if(o===n)return a;o++;}}else o++;throw new Error(`Paragraph index ${n} out of bounds (max: ${o-1})`)}function R(s,n){let o=0;for(let t of s.content)if(t.type==="paragraph"){if(n(t,o)===false)return;o++;}else if(t.type==="table"){for(let r of t.rows)for(let e of r.cells)for(let a of e.content)if(a.type==="paragraph"){if(n(a,o)===false)return;o++;}}else o++;}function V(s,n={}){let{fromIndex:o,toIndex:t,includeTrackedChanges:r=true,includeCommentAnchors:e=true}=n,a=[],i=0;for(let c of s.content)if(c.type==="paragraph")w(i,o,t)&&a.push(L(c,i,r,e)),i++;else if(c.type==="table"){w(i,o,t)&&a.push(H(c,i,r,e));for(let l of c.rows)for(let u of l.cells)for(let p of u.content)p.type==="paragraph"&&i++;}else i++;return a}function w(s,n,o){return (n===void 0||s>=n)&&(o===void 0||s<=o)}function L(s,n,o,t){let r=B(s,o,t),e=s.formatting?.styleId,a=s.paraId;return U(e)?{type:"heading",index:n,paraId:a,level:V$1(e)??1,text:r}:s.listRendering?{type:"list-item",index:n,paraId:a,text:r,listLevel:s.listRendering.level??0,listType:s.listRendering.isBullet?"bullet":"number"}:{type:"paragraph",index:n,paraId:a,text:r}}function H(s,n,o,t){let r=[],e=[];for(let a of s.rows){let i=[],c=[];for(let l of a.cells){let u=[],p;for(let g of l.content)g.type==="paragraph"&&(p===void 0&&(p=g.paraId),u.push(B(g,o,t)));i.push(u.join(`
|
|
2
2
|
`)),c.push(p);}r.push(i),e.push(c);}return {type:"table",index:n,rows:r,cellParaIds:e}}function Y(s){let n=[],o=t=>t.paraId?t.paraId:String(t.index);for(let t of s)switch(t.type){case "heading":n.push(`[${o(t)}] (h${t.level}) ${t.text}`);break;case "paragraph":n.push(`[${o(t)}] ${t.text}`);break;case "list-item":{let r=" ".repeat(t.listLevel),e=t.listType==="bullet"?"\u2022":"-";n.push(`[${o(t)}] ${r}${e} ${t.text}`);break}case "table":{let r=t.index;for(let e=0;e<t.rows.length;e++)for(let a=0;a<t.rows[e].length;a++){let c=t.rows[e][a].split(`
|
|
3
3
|
`),l=t.cellParaIds?.[e]?.[a];for(let u=0;u<c.length;u++){let p=u===0&&l?l:String(r);n.push(`[${p}] (table, row ${e+1}, col ${a+1}) ${c[u]}`),r++;}}break}}return n.join(`
|
|
4
4
|
`)}function B(s,n,o){let t=[],r=new Set;for(let e of s.content){if(e.type==="commentRangeStart"&&o){r.add(e.id),t.push(`[comment:${e.id}]`);continue}if(e.type==="commentRangeEnd"&&o){r.has(e.id)&&(r.delete(e.id),t.push("[/comment]"));continue}if(e.type==="run")t.push(H$1(e));else if(e.type==="hyperlink")t.push(I(e));else if(h(e)){let a=x(e.content);e.type==="insertion"||e.type==="moveTo"?n&&t.push(`[+${a}+]{by:${e.info.author}}`):n?t.push(`[-${a}-]{by:${e.info.author}}`):t.push(a);}}return t.join("")}var y=class extends Error{constructor(n,o){let t=o!==void 0?` in paragraph ${o}`:" in document";super(`Text not found${t}: "${n}"`),this.name="TextNotFoundError";}},M=class extends Error{constructor(n){super(`Tracked change not found: id=${n}`),this.name="ChangeNotFoundError";}},F=class extends Error{constructor(n){super(`Comment not found: id=${n}`),this.name="CommentNotFoundError";}};function E(s){let n=[],o=0;for(let t=0;t<s.content.length;t++){let r=s.content[t];if(r.type==="run"){let e=H$1(r);n.push({contentIndex:t,run:r,text:e,startPos:o}),o+=e.length;}else if(r.type==="hyperlink")for(let e=0;e<r.children.length;e++){let a=r.children[e];if(a.type==="run"){let i=H$1(a);n.push({contentIndex:t,run:a,text:i,startPos:o}),o+=i.length;}}else if(h(r)){if(r.type==="insertion"||r.type==="moveTo")continue;for(let e=0;e<r.content.length;e++){let a=r.content[e];if(a.type==="run"){let i=H$1(a);n.push({contentIndex:t,run:a,text:i,startPos:o}),o+=i.length;}else if(a.type==="hyperlink"){for(let i of a.children)if(i.type==="run"){let c=H$1(i);n.push({contentIndex:t,run:i,text:c,startPos:o}),o+=c.length;}}}}}return n}function k(s){return E(s).map(n=>n.text).join("")}function G(s,n,o){let t=E(s),r=t.map(u=>u.text).join(""),e=W(r,n);if(!e)throw new y(n,o);let a=-1,i=0;for(let u=0;u<t.length;u++)if(e.start<t[u].startPos+t[u].text.length){a=u,i=e.start-t[u].startPos;break}let c=-1,l=0;for(let u=t.length-1;u>=0;u--)if(e.end>t[u].startPos){c=u,l=e.end-t[u].startPos;break}if(a===-1||c===-1)throw new y(n,o);return {startRunIndex:t[a].contentIndex,startOffset:i,endRunIndex:t[c].contentIndex,endOffset:l}}function te(s,n,o){let t=G(s,n,o),{startRunIndex:r,endRunIndex:e}=t,{startOffset:a,endOffset:i}=t,c=s.content[e];if(c.type==="run"){let u=H$1(c);if(i<u.length){let p=D(u.slice(i),c);$(c,u.slice(0,i)),s.content.splice(e+1,0,p);}}let l=s.content[r];if(l.type==="run"&&a>0){let u=H$1(l),p=D(u.slice(0,a),l);$(l,u.slice(a)),s.content.splice(r,0,p),r++,e++;}return {startIndex:r,endIndex:e}}function D(s,n){return {type:"run",content:[{type:"text",text:s}],formatting:n.formatting?{...n.formatting}:void 0}}function $(s,n){let o=s.content.find(t=>t.type==="text");o&&(o.text=n);}function O(s){let n=[],o=[],t=true;for(let r=0;r<s.length;r++){let e=s[r];if(!"\u200B\u200C\u200D\uFEFF\xAD".includes(e)){if("\u201C\u201D\u201E\u201F".includes(e)&&(e='"'),"\u2018\u2019\u201A\u201B".includes(e)&&(e="'"),"\u2013\u2014\u2012\u2015".includes(e)&&(e="-"),e==="\u2026"){n.push(".",".","."),o.push(r,r,r),t=false;continue}if(/\s/.test(e)||e==="\xA0"){t||(n.push(" "),o.push(r),t=true);continue}n.push(e.toLowerCase()),o.push(r),t=false;}}return n.length>0&&n[n.length-1]===" "&&(n.pop(),o.pop()),{text:n.join(""),posMap:o}}function S(s,n,o,t){let r=s.posMap[n],e=s.posMap[n+o-1]+1;for(;e<t.length&&"\u200B\u200C\u200D\uFEFF\xAD".includes(t[e]);)e++;return {start:r,end:e}}function W(s,n){if(!n||!s)return null;let o=s.indexOf(n);if(o!==-1)return {start:o,end:o+n.length};let t=O(s),r=O(n);if(!r.text)return null;let e=t.text.indexOf(r.text);if(e!==-1)return S(t,e,r.text.length,s);let a=r.text.split(" ");if(a.length>=3)for(let i=1;i<=Math.min(2,a.length-2);i++){let c=a.slice(0,-i).join(" "),l=t.text.indexOf(c);if(l!==-1)return S(t,l,c.length,s)}return null}function se(s,n){let o=new Map;return R(s,(r,e)=>{let a=null;for(let i of r.content)if(h(i)){a===null&&(a=k(r));let c=x(i.content),l=i.info.id,u=o.get(l);u&&u.paragraphIndex===e?u.text+=c:o.set(l,{id:l,type:i.type,author:i.info.author,date:i.info.date??null,text:c,context:a,paragraphIndex:e});}}),Array.from(o.values()).filter(r=>!(n?.author&&r.author!==n.author||n?.type&&r.type!==n.type))}function ae(s,n){let o=s.comments??[];if(o.length===0)return [];let t=z(s),r=[],e=new Map;for(let i of o)if(i.parentId!==void 0){let c=e.get(i.parentId)??[];c.push(i),e.set(i.parentId,c);}else r.push(i);return r.map(i=>{let c=t.get(i.id),l=(e.get(i.id)??[]).map(u=>({id:u.id,author:u.author,date:u.date??null,text:A(u)}));return {id:i.id,author:i.author,date:i.date??null,text:A(i),anchoredText:c?.text??"",paragraphIndex:c?.paragraphIndex??-1,replies:l,done:i.done??false}}).filter(i=>!(n?.author&&i.author!==n.author||n?.done!==void 0&&i.done!==n.done))}function A(s){return s.content.map(n=>k(n)).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkMOAJJKKG_js=require('./chunk-MOAJJKKG.js'),chunk7C5RGTQY_js=require('./chunk-7C5RGTQY.js');function g(o,e){let{paragraphIndex:t,author:n="AI",text:s,search:a}=e,r=chunkMOAJJKKG_js.b(o,t),i=(o.comments??[]).map(m=>m.id),p=i.length>0?Math.max(...i)+1:1,c={id:p,author:n,date:new Date().toISOString(),content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:s}]}],formatting:{}}]};if(o.comments||(o.comments=[]),o.comments.push(c),a){let m=chunkMOAJJKKG_js.i(r,a,t);r.content.splice(m.endRunIndex+1,0,{type:"commentRangeEnd",id:p}),r.content.splice(m.startRunIndex,0,{type:"commentRangeStart",id:p});}else r.content.unshift({type:"commentRangeStart",id:p}),r.content.push({type:"commentRangeEnd",id:p});return p}function y(o,e,t){let n=o.comments??[];if(!n.find(p=>p.id===e))throw new chunkMOAJJKKG_js.h(e);let a=n.map(p=>p.id),r=Math.max(...a)+1,i={id:r,author:t.author??"AI",date:new Date().toISOString(),parentId:e,content:[{type:"paragraph",content:[{type:"run",content:[{type:"text",text:t.text}]}],formatting:{}}]};return n.push(i),r}function E(o,e){let t=o.comments??[],n=t.find(r=>r.id===e);if(!n)throw new chunkMOAJJKKG_js.h(e);let s=n.parentId!==void 0,a=new Set([e]);if(!s)for(let r of t)r.parentId===e&&a.add(r.id);o.comments=t.filter(r=>!a.has(r.id)),!s&&chunkMOAJJKKG_js.c(o,r=>{for(let i=r.content.length-1;i>=0;i--){let p=r.content[i];(p.type==="commentRangeStart"||p.type==="commentRangeEnd")&&p.id===e&&r.content.splice(i,1);}});}function C(o,e){if(!W(o,e,"accept"))throw new chunkMOAJJKKG_js.g(e)}function I(o,e){if(!W(o,e,"reject"))throw new chunkMOAJJKKG_js.g(e)}function k(o){return M(o,"accept")}function F(o){return M(o,"reject")}function M(o,e){let t=0;return chunkMOAJJKKG_js.c(o,n=>{for(let s=n.content.length-1;s>=0;s--){let a=n.content[s];chunkMOAJJKKG_js.a(a)&&(G(n,s,a,e),t++);}}),t}function W(o,e,t){let n=false;return chunkMOAJJKKG_js.c(o,s=>{for(let a=s.content.length-1;a>=0;a--){let r=s.content[a];chunkMOAJJKKG_js.a(r)&&r.info.id===e&&(G(s,a,r,t),n=true);}if(n)return false}),n}function G(o,e,t,n){if(t.type==="insertion"&&n==="accept"||t.type==="deletion"&&n==="reject"||t.type==="moveTo"&&n==="accept"||t.type==="moveFrom"&&n==="reject"){let a=t.content;o.content.splice(e,1,...a);}else o.content.splice(e,1);}function x(o,e){let{paragraphIndex:t,search:n,author:s="AI",replaceWith:a}=e,r=chunkMOAJJKKG_js.b(o,t),{startIndex:i,endIndex:p}=chunkMOAJJKKG_js.j(r,n,t),c=new Date().toISOString(),m=w(o),h=r.content.slice(i,p+1),R={type:"deletion",info:{id:m,author:s,date:c},content:h},v={type:"insertion",info:{id:m+1,author:s,date:c},content:[{type:"run",content:[{type:"text",text:a}]}]};r.content.splice(i,p-i+1,R,v);}function H(o,e){let{paragraphIndex:t,author:n="AI",insertText:s,position:a="after",search:r}=e,i=chunkMOAJJKKG_js.b(o,t),p=new Date().toISOString(),m={type:"insertion",info:{id:w(o),author:n,date:p},content:[{type:"run",content:[{type:"text",text:s}]}]};if(r){let{startIndex:h,endIndex:R}=chunkMOAJJKKG_js.j(i,r,t),v=a==="after"?R+1:h;i.content.splice(v,0,m);}else a==="before"?i.content.unshift(m):i.content.push(m);}function L(o,e){let{paragraphIndex:t,search:n,author:s="AI"}=e,a=chunkMOAJJKKG_js.b(o,t),{startIndex:r,endIndex:i}=chunkMOAJJKKG_js.j(a,n,t),p=new Date().toISOString(),c=w(o),m=a.content.slice(r,i+1),h={type:"deletion",info:{id:c,author:s,date:p},content:m};a.content.splice(r,i-r+1,h);}var S=new WeakMap;function w(o){let e=S.get(o);e===void 0&&(e=0,chunkMOAJJKKG_js.c(o,n=>{for(let s of n.content)chunkMOAJJKKG_js.a(s)&&(e=Math.max(e,s.info.id));}));let t=e+1;return S.set(o,t+1),t}function N(o,e,t="AI"){let n=[],s=0,a=0,r=0,i=0,p=0;for(let c of e.accept??[])try{C(o,c),s++;}catch(m){n.push({operation:"accept",id:c,error:m.message});}for(let c of e.reject??[])try{I(o,c),a++;}catch(m){n.push({operation:"reject",id:c,error:m.message});}for(let c of e.comments??[])try{g(o,{...c,author:c.author??t}),r++;}catch(m){n.push({operation:"comment",search:c.search,error:m.message});}for(let c of e.replies??[])try{y(o,c.commentId,{author:c.author??t,text:c.text}),i++;}catch(m){n.push({operation:"reply",id:c.commentId,error:m.message});}for(let c of e.proposals??[])try{x(o,{...c,author:c.author??t}),p++;}catch(m){n.push({operation:"proposal",search:c.search,error:m.message});}return {accepted:s,rejected:a,commentsAdded:r,repliesAdded:i,proposalsAdded:p,errors:n}}var U=class o{constructor(e,t="AI",n){let s=n??e.originalBuffer,{originalBuffer:a,...r}=e;this.doc=structuredClone(r),s&&(this.doc.originalBuffer=s),this.author=t;}static async fromBuffer(e,t="AI"){let n=await chunk7C5RGTQY_js.w(e,{preloadFonts:false});return new o(n,t,e)}get body(){return this.doc.package.document}resolveAuthor(e){return e??this.author}getContent(e){return chunkMOAJJKKG_js.d(this.body,e)}getContentAsText(e){return chunkMOAJJKKG_js.e(chunkMOAJJKKG_js.d(this.body,e))}getChanges(e){return chunkMOAJJKKG_js.k(this.body,e)}getComments(e){return chunkMOAJJKKG_js.l(this.body,e)}addComment(e,t){let n=typeof e=="number"?{paragraphIndex:e,text:t,author:this.author}:{...e,author:this.resolveAuthor(e.author)};return g(this.body,n)}replyTo(e,t){let n=typeof t=="string"?{text:t,author:this.author}:{...t,author:this.resolveAuthor(t.author)};return y(this.body,e,n)}removeComment(e){E(this.body,e);}replace(e,t,n){let s=typeof e=="number"?{paragraphIndex:e,search:t,replaceWith:n,author:this.author}:{...e,author:this.resolveAuthor(e.author)};x(this.body,s);}proposeReplacement(e){this.replace(e);}proposeInsertion(e){H(this.body,{...e,author:this.resolveAuthor(e.author)});}proposeDeletion(e){L(this.body,{...e,author:this.resolveAuthor(e.author)});}acceptChange(e){C(this.body,e);}rejectChange(e){I(this.body,e);}acceptAll(){return k(this.body)}rejectAll(){return F(this.body)}applyReview(e){return N(this.body,e,this.author)}toDocument(){return this.doc}async toBuffer(){if(!this.doc.originalBuffer)throw new Error("Cannot create buffer: no original DOCX buffer was provided. Use DocxReviewer.fromBuffer() or pass originalBuffer to the constructor.");let{repackDocx:e}=await import('./headless-3IX5WQEZ.js');return e(this.doc)}};exports.a=U;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkONK67NAB_js=require('./chunk-ONK67NAB.js'),chunk4QRVKNI4_js=require('./chunk-4QRVKNI4.js'),chunkNISW2GF6_js=require('./chunk-NISW2GF6.js');Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkONK67NAB_js.wa}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkONK67NAB_js.x}});Object.defineProperty(exports,"VERSION",{enumerable:true,get:function(){return chunkONK67NAB_js.ya}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkONK67NAB_js.i}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkONK67NAB_js.na}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkONK67NAB_js.E}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkONK67NAB_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkONK67NAB_js.D}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkONK67NAB_js.B}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkONK67NAB_js.oa}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkONK67NAB_js.ta}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkONK67NAB_js.M}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkONK67NAB_js.L}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkONK67NAB_js.y}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkONK67NAB_js.z}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkONK67NAB_js.qa}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkONK67NAB_js.xa}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkONK67NAB_js.ba}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.f}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkONK67NAB_js.aa}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkONK67NAB_js.ra}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ka}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ja}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkONK67NAB_js.la}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.j}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkONK67NAB_js.k}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkONK67NAB_js.l}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkONK67NAB_js.m}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.v}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkONK67NAB_js.n}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkONK67NAB_js.r}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkONK67NAB_js.va}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkONK67NAB_js.ua}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkONK67NAB_js.A}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkONK67NAB_js.$}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkONK67NAB_js.O}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkONK67NAB_js.K}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkONK67NAB_js.N}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ha}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkONK67NAB_js.C}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkONK67NAB_js.R}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkONK67NAB_js.T}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkONK67NAB_js.I}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkONK67NAB_js._}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkONK67NAB_js.G}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkONK67NAB_js.Z}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkONK67NAB_js.H}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkONK67NAB_js.F}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkONK67NAB_js.J}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkONK67NAB_js.Q}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkONK67NAB_js.P}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkONK67NAB_js.X}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkONK67NAB_js.W}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkONK67NAB_js.Y}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.o}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkONK67NAB_js.fa}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkONK67NAB_js.U}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkONK67NAB_js.S}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkONK67NAB_js.sa}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkONK67NAB_js.p}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkONK67NAB_js.ga}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunkONK67NAB_js.pa}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ma}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkONK67NAB_js.ia}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.w}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkONK67NAB_js.V}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkONK67NAB_js.s}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.u}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.d}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkONK67NAB_js.t}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ca}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkONK67NAB_js.da}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkONK67NAB_js.ea}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkONK67NAB_js.q}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkONK67NAB_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkONK67NAB_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkONK67NAB_js.a}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkONK67NAB_js.e}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkONK67NAB_js.g}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunk4QRVKNI4_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunk4QRVKNI4_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunk4QRVKNI4_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunk4QRVKNI4_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunk4QRVKNI4_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunk4QRVKNI4_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.f}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunkNISW2GF6_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.g}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.i}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkNISW2GF6_js.n}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkNISW2GF6_js.o}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkNISW2GF6_js.m}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.l}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.h}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.f}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.k}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkNISW2GF6_js.c}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.j}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.e}});
|
|
1
|
+
'use strict';var chunk7C5RGTQY_js=require('./chunk-7C5RGTQY.js'),chunk4QRVKNI4_js=require('./chunk-4QRVKNI4.js'),chunkNISW2GF6_js=require('./chunk-NISW2GF6.js');Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunk7C5RGTQY_js.wa}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunk7C5RGTQY_js.x}});Object.defineProperty(exports,"VERSION",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ya}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunk7C5RGTQY_js.i}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunk7C5RGTQY_js.na}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunk7C5RGTQY_js.E}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunk7C5RGTQY_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunk7C5RGTQY_js.D}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunk7C5RGTQY_js.B}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunk7C5RGTQY_js.oa}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ta}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunk7C5RGTQY_js.M}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunk7C5RGTQY_js.L}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunk7C5RGTQY_js.y}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunk7C5RGTQY_js.z}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunk7C5RGTQY_js.qa}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunk7C5RGTQY_js.xa}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ba}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunk7C5RGTQY_js.f}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunk7C5RGTQY_js.aa}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ra}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ka}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ja}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.la}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunk7C5RGTQY_js.j}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunk7C5RGTQY_js.k}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunk7C5RGTQY_js.l}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunk7C5RGTQY_js.m}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunk7C5RGTQY_js.v}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.n}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunk7C5RGTQY_js.r}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunk7C5RGTQY_js.va}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ua}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunk7C5RGTQY_js.A}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunk7C5RGTQY_js.$}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunk7C5RGTQY_js.O}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.K}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunk7C5RGTQY_js.N}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ha}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunk7C5RGTQY_js.C}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunk7C5RGTQY_js.R}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunk7C5RGTQY_js.T}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.I}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunk7C5RGTQY_js._}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.G}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunk7C5RGTQY_js.Z}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.H}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunk7C5RGTQY_js.F}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunk7C5RGTQY_js.J}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunk7C5RGTQY_js.Q}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunk7C5RGTQY_js.P}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunk7C5RGTQY_js.X}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunk7C5RGTQY_js.W}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunk7C5RGTQY_js.Y}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunk7C5RGTQY_js.o}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunk7C5RGTQY_js.fa}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunk7C5RGTQY_js.U}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunk7C5RGTQY_js.S}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunk7C5RGTQY_js.sa}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunk7C5RGTQY_js.p}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ga}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunk7C5RGTQY_js.pa}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ma}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ia}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunk7C5RGTQY_js.w}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunk7C5RGTQY_js.V}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunk7C5RGTQY_js.s}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunk7C5RGTQY_js.u}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunk7C5RGTQY_js.d}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunk7C5RGTQY_js.t}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ca}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.da}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunk7C5RGTQY_js.ea}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunk7C5RGTQY_js.q}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunk7C5RGTQY_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunk7C5RGTQY_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunk7C5RGTQY_js.a}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunk7C5RGTQY_js.e}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunk7C5RGTQY_js.g}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunk4QRVKNI4_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunk4QRVKNI4_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunk4QRVKNI4_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunk4QRVKNI4_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunk4QRVKNI4_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunk4QRVKNI4_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunk4QRVKNI4_js.f}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunkNISW2GF6_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.g}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.i}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkNISW2GF6_js.n}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkNISW2GF6_js.o}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkNISW2GF6_js.m}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.l}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.h}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkNISW2GF6_js.f}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkNISW2GF6_js.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.k}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkNISW2GF6_js.c}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkNISW2GF6_js.j}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkNISW2GF6_js.e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{wa as DEFAULT_AI_ACTIONS,x as DocumentAgent,ya as VERSION,i as attemptSelectiveSave,na as blendColors,E as buildExtendedSelectionContext,h as buildPatchedDocumentXml,D as buildSelectionContext,B as buildSelectionContextFromContext,oa as colorsEqual,ta as comparePositions,M as countCharacters,L as countWords,y as createAgent,z as createAgentFromDocument,qa as createCollapsedRange,xa as createCommand,ba as createDocumentWithText,f as createDocx,aa as createEmptyDocument,ra as createRange,ka as createRgbColor,ja as createThemeColor,la as darkenColor,j as detectVariables,k as detectVariablesDetailed,l as detectVariablesInBody,m as detectVariablesInParagraph,v as documentHasVariables,n as extractVariablesFromText,r as formatVariable,va as getActionDescription,ua as getActionLabel,A as getAgentContext,$ as getBlockIndexForParagraph,O as getBodyCharacterCount,K as getBodyText,N as getBodyWordCount,ha as getContrastingColor,C as getDocumentSummary,R as getFormattingAtPosition,T as getHyperlinkAtPosition,I as getHyperlinkText,_ as getParagraphAtIndex,G as getParagraphText,Z as getParagraphs,H as getRunText,F as getSelectionFormattingSummary,J as getTableText,Q as getTextAfter,P as getTextBefore,X as hasHyperlinks,W as hasImages,Y as hasTables,o as hasTemplateVariables,fa as isBlack,U as isHeadingStyle,S as isPositionInHyperlink,sa as isPositionInRange,p as isValidVariableName,ga as isWhite,pa as isZodSchema,ma as lightenColor,ia as parseColorString,w as parseDocx,V as parseHeadingLevel,s as parseVariable,u as removeVariables,d as repackDocx,t as replaceVariables,ca as resolveColor,da as resolveHighlightColor,ea as resolveShadingColor,q as sanitizeVariableName,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties,e as updateMultipleFiles,g as validatePatchSafety}from'./chunk-
|
|
1
|
+
export{wa as DEFAULT_AI_ACTIONS,x as DocumentAgent,ya as VERSION,i as attemptSelectiveSave,na as blendColors,E as buildExtendedSelectionContext,h as buildPatchedDocumentXml,D as buildSelectionContext,B as buildSelectionContextFromContext,oa as colorsEqual,ta as comparePositions,M as countCharacters,L as countWords,y as createAgent,z as createAgentFromDocument,qa as createCollapsedRange,xa as createCommand,ba as createDocumentWithText,f as createDocx,aa as createEmptyDocument,ra as createRange,ka as createRgbColor,ja as createThemeColor,la as darkenColor,j as detectVariables,k as detectVariablesDetailed,l as detectVariablesInBody,m as detectVariablesInParagraph,v as documentHasVariables,n as extractVariablesFromText,r as formatVariable,va as getActionDescription,ua as getActionLabel,A as getAgentContext,$ as getBlockIndexForParagraph,O as getBodyCharacterCount,K as getBodyText,N as getBodyWordCount,ha as getContrastingColor,C as getDocumentSummary,R as getFormattingAtPosition,T as getHyperlinkAtPosition,I as getHyperlinkText,_ as getParagraphAtIndex,G as getParagraphText,Z as getParagraphs,H as getRunText,F as getSelectionFormattingSummary,J as getTableText,Q as getTextAfter,P as getTextBefore,X as hasHyperlinks,W as hasImages,Y as hasTables,o as hasTemplateVariables,fa as isBlack,U as isHeadingStyle,S as isPositionInHyperlink,sa as isPositionInRange,p as isValidVariableName,ga as isWhite,pa as isZodSchema,ma as lightenColor,ia as parseColorString,w as parseDocx,V as parseHeadingLevel,s as parseVariable,u as removeVariables,d as repackDocx,t as replaceVariables,ca as resolveColor,da as resolveHighlightColor,ea as resolveShadingColor,q as sanitizeVariableName,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties,e as updateMultipleFiles,g as validatePatchSafety}from'./chunk-OHVUJUDE.mjs';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-UILTIEBD.mjs';export{a as PluginRegistry,d as createPluginRegistrar,g as emuToPixels,i as emuToTwips,n as executeCommand,o as executeCommands,m as formatPx,l as halfPointsToPixels,h as pixelsToEmu,f as pixelsToTwips,b as pluginRegistry,k as pointsToPixels,c as registerPlugins,j as twipsToEmu,e as twipsToPixels}from'./chunk-X4YGLGUM.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
* @packageDocumentation
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
import { G as GetContentOptions, C as ContentBlock, a as CommentFilter, R as ReviewComment, b as ChangeFilter, c as ReviewChange, F as FoundMatch, S as SelectionInfo, A as AddCommentByParaIdOptions, d as ReplyOptions, P as ProposeChangeOptions, e as ApplyFormattingOptions, f as SetParagraphStyleOptions, g as PageContent, h as ContentChangeEvent, i as SelectionChangeEvent } from './server-
|
|
32
|
-
export { j as AgentToolDefinition, k as AgentToolResult, B as BatchError, l as BatchResult, m as BatchReviewOptions, D as DocxReviewer, n as agentTools, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-
|
|
31
|
+
import { G as GetContentOptions, C as ContentBlock, a as CommentFilter, R as ReviewComment, b as ChangeFilter, c as ReviewChange, F as FoundMatch, S as SelectionInfo, A as AddCommentByParaIdOptions, d as ReplyOptions, P as ProposeChangeOptions, e as ApplyFormattingOptions, f as SetParagraphStyleOptions, g as PageContent, h as ContentChangeEvent, i as SelectionChangeEvent } from './server-CGxgyhy-.mjs';
|
|
32
|
+
export { j as AgentToolDefinition, k as AgentToolResult, B as BatchError, l as BatchResult, m as BatchReviewOptions, D as DocxReviewer, n as agentTools, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-CGxgyhy-.mjs';
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Error classes for @eigenpal/docx-editor-agents
|
package/dist/index.d.ts
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
* @packageDocumentation
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
import { G as GetContentOptions, C as ContentBlock, a as CommentFilter, R as ReviewComment, b as ChangeFilter, c as ReviewChange, F as FoundMatch, S as SelectionInfo, A as AddCommentByParaIdOptions, d as ReplyOptions, P as ProposeChangeOptions, e as ApplyFormattingOptions, f as SetParagraphStyleOptions, g as PageContent, h as ContentChangeEvent, i as SelectionChangeEvent } from './server-
|
|
32
|
-
export { j as AgentToolDefinition, k as AgentToolResult, B as BatchError, l as BatchResult, m as BatchReviewOptions, D as DocxReviewer, n as agentTools, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-
|
|
31
|
+
import { G as GetContentOptions, C as ContentBlock, a as CommentFilter, R as ReviewComment, b as ChangeFilter, c as ReviewChange, F as FoundMatch, S as SelectionInfo, A as AddCommentByParaIdOptions, d as ReplyOptions, P as ProposeChangeOptions, e as ApplyFormattingOptions, f as SetParagraphStyleOptions, g as PageContent, h as ContentChangeEvent, i as SelectionChangeEvent } from './server-CGxgyhy-.js';
|
|
32
|
+
export { j as AgentToolDefinition, k as AgentToolResult, B as BatchError, l as BatchResult, m as BatchReviewOptions, D as DocxReviewer, n as agentTools, o as createReviewerBridge, p as executeToolCall, q as getToolSchemas } from './server-CGxgyhy-.js';
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Error classes for @eigenpal/docx-editor-agents
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkSCYZRJWI_js=require('./chunk-SCYZRJWI.js'),chunkMOAJJKKG_js=require('./chunk-MOAJJKKG.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"DocxReviewer",{enumerable:true,get:function(){return chunkSCYZRJWI_js.a}});Object.defineProperty(exports,"ChangeNotFoundError",{enumerable:true,get:function(){return chunkMOAJJKKG_js.g}});Object.defineProperty(exports,"CommentNotFoundError",{enumerable:true,get:function(){return chunkMOAJJKKG_js.h}});Object.defineProperty(exports,"TextNotFoundError",{enumerable:true,get:function(){return chunkMOAJJKKG_js.f}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunkMOAJJKKG_js.m}});Object.defineProperty(exports,"agentTools",{enumerable:true,get:function(){return chunkRI5S75JY_js.a}});Object.defineProperty(exports,"executeToolCall",{enumerable:true,get:function(){return chunkRI5S75JY_js.b}});Object.defineProperty(exports,"getToolSchemas",{enumerable:true,get:function(){return chunkRI5S75JY_js.d}});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DocxReviewer}from'./chunk-
|
|
1
|
+
export{a as DocxReviewer}from'./chunk-NGMVN6QV.mjs';export{g as ChangeNotFoundError,h as CommentNotFoundError,f as TextNotFoundError,m as createReviewerBridge}from'./chunk-PSSPSJR4.mjs';export{a as agentTools,b as executeToolCall,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
|
package/dist/mcp.d.mts
CHANGED
package/dist/mcp.d.ts
CHANGED
package/dist/react.d.mts
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* @packageDocumentation
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
import { r as EditorRefLike, k as AgentToolResult, q as getToolSchemas, j as AgentToolDefinition, s as AgentContextSnapshot } from './server-
|
|
22
|
-
export { t as getToolDisplayName } from './server-
|
|
21
|
+
import { r as EditorRefLike, k as AgentToolResult, q as getToolSchemas, j as AgentToolDefinition, s as AgentContextSnapshot } from './server-CGxgyhy-.mjs';
|
|
22
|
+
export { t as getToolDisplayName } from './server-CGxgyhy-.mjs';
|
|
23
23
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
24
24
|
import { ReactNode, CSSProperties } from 'react';
|
|
25
25
|
import { A as AgentMessage, a as AgentToolCall } from './agent-types-C8RvQB7n.mjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* @packageDocumentation
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
import { r as EditorRefLike, k as AgentToolResult, q as getToolSchemas, j as AgentToolDefinition, s as AgentContextSnapshot } from './server-
|
|
22
|
-
export { t as getToolDisplayName } from './server-
|
|
21
|
+
import { r as EditorRefLike, k as AgentToolResult, q as getToolSchemas, j as AgentToolDefinition, s as AgentContextSnapshot } from './server-CGxgyhy-.js';
|
|
22
|
+
export { t as getToolDisplayName } from './server-CGxgyhy-.js';
|
|
23
23
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
24
24
|
import { ReactNode, CSSProperties } from 'react';
|
|
25
25
|
import { A as AgentMessage, a as AgentToolCall } from './agent-types-C8RvQB7n.js';
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkDDW6L3LZ_js=require('./chunk-DDW6L3LZ.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var te=chunkRI5S75JY_js.d();function ne(e){let{editorRef:t,author:l="AI"}=e,c=react.useMemo(()=>({get:()=>t.current?chunkDDW6L3LZ_js.a(t.current,l):null}),[t,l]);return {executeToolCall:react.useCallback((d,p)=>{let r=c.get();return r?chunkRI5S75JY_js.b(d,p,r):{success:false,error:"Editor not ready"}},[c]),toolSchemas:te}}function re(e){let{editorRef:t,author:l="AI",tools:c,include:u,exclude:d}=e,p=!!c&&Object.keys(c).length>0,r=react.useCallback(i=>!(u&&!u.includes(i)||d&&d.includes(i)),[u,d]),f=react.useMemo(()=>{let i=u||d?chunkRI5S75JY_js.a.filter(n=>r(n.name)):chunkRI5S75JY_js.a;if(!p)return i.map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}));let o=new Map(i.map(n=>[n.name,n]));for(let[n,C]of Object.entries(c))o.set(n,C);return Array.from(o.values()).map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}))},[c,p,u,d,r]),g=react.useCallback((i,o)=>{let n=t.current;if(!n)return {success:false,error:"Editor not ready."};let C=chunkDDW6L3LZ_js.a(n,l),k=c?.[i];if(k)try{return k.handler(o,C)}catch(T){return {success:false,error:T instanceof Error?T.message:String(T)}}return r(i)?chunkRI5S75JY_js.b(i,o,C):{success:false,error:`Tool '${i}' is not enabled.`}},[t,l,c,r]),x=react.useCallback(()=>{let i=t.current;if(!i)return {selection:null,currentPage:0,totalPages:0};let o=chunkDDW6L3LZ_js.a(i,l);return {selection:o.getSelection(),currentPage:o.getCurrentPage(),totalPages:o.getTotalPages()}},[t,l]);return {tools:f,executeToolCall:g,getContext:x}}var y={agentPanel:{defaultTitle:"Assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var _="eigenpal:docx-editor:agentPanelWidth";function ae({size:e=22}){return jsxRuntime.jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}function le({size:e=18}){return jsxRuntime.jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}var ce=360,ue=280,de=600;function pe({title:e=y.agentPanel.defaultTitle,icon:t,closeLabel:l=y.agentPanel.close,resizeHandleLabel:c=y.agentPanel.resizeHandle,width:u,defaultWidth:d=ce,minWidth:p=ue,maxWidth:r=de,onWidthChange:f,onClose:g,children:x,className:i,closed:o=false}){let n=u!==void 0,[C,k]=react.useState(false),T=react.useRef(o);react.useEffect(()=>{if(T.current!==o){T.current=o,k(true);let m=window.setTimeout(()=>k(false),260);return ()=>window.clearTimeout(m)}},[o]);let[L,h]=react.useState(()=>{if(n)return u;if(typeof window>"u")return d;try{let m=window.localStorage.getItem(_);if(m){let S=Number(m);if(Number.isFinite(S)&&S>=p&&S<=r)return S}}catch{}return d}),E=n?u:L,v=react.useRef(null),B=react.useRef({minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f});B.current={minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f};let w=react.useRef(null);if(!w.current){let m=P=>{let D=v.current;if(!D)return;let I=B.current,q=D.startX-P.clientX,N=Math.min(I.maxWidth,Math.max(I.minWidth,D.startWidth+q));D.lastWidth=N,I.isControlled||h(N),I.onWidthChange?.(N);},S=()=>{let P=v.current;if(P&&(v.current=null,document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",S),!B.current.isControlled))try{window.localStorage.setItem(_,String(P.lastWidth));}catch{}};w.current={move:m,up:S};}let Y=react.useCallback(m=>{m.preventDefault();let S=n?u:L;v.current={startX:m.clientX,startWidth:S,lastWidth:S},document.addEventListener("pointermove",w.current.move),document.addEventListener("pointerup",w.current.up);},[]);return react.useEffect(()=>()=>{let m=w.current;m&&(document.removeEventListener("pointermove",m.move),document.removeEventListener("pointerup",m.up));},[]),jsxRuntime.jsxs("div",{className:`ep-agent-panel${i?` ${i}`:""}`,style:{width:o?0:E,flex:o?"0 0 0px":`0 0 ${E}px`,height:"calc(100% - 16px)",margin:o?"8px 0 8px 0":"8px 8px 8px 12px",display:"flex",flexDirection:"column",background:"#ffffff",border:o?"1px solid transparent":"1px solid #e3e3e3",borderRadius:16,boxShadow:o?"none":"0 1px 2px rgba(60,64,67,0.05), 0 4px 12px rgba(60,64,67,0.08)",opacity:o?0:1,pointerEvents:o?"none":"auto",position:"relative",boxSizing:"border-box",minWidth:o?0:p,overflow:"hidden",fontFamily:"'Google Sans', 'Google Sans Text', system-ui, -apple-system, sans-serif",transition:C?"flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), margin 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease":"opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease"},"aria-hidden":o,"data-testid":"agent-panel","data-state":o?"closed":"open",role:"complementary","aria-label":e,children:[jsxRuntime.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":c,onPointerDown:Y,style:{position:"absolute",left:-3,top:0,bottom:0,width:6,cursor:"col-resize",touchAction:"none",zIndex:1},"data-testid":"agent-panel-resize-handle"}),jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 16px 10px",flex:"0 0 auto",background:"#ffffff"},children:[jsxRuntime.jsx("span",{style:{display:"inline-flex",alignItems:"center",color:"#0b57d0"},children:t??jsxRuntime.jsx(ae,{size:22})}),jsxRuntime.jsx("span",{style:{flex:1,fontSize:15,fontWeight:500,color:"#1f1f1f",letterSpacing:.1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),g&&jsxRuntime.jsx("button",{type:"button",onClick:g,"aria-label":l,title:l,"data-testid":"agent-panel-close",style:{border:"none",background:"transparent",padding:6,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#444746",borderRadius:999,transition:"background 0.15s"},onMouseEnter:m=>{m.currentTarget.style.background="#f1f3f4";},onMouseLeave:m=>{m.currentTarget.style.background="transparent";},children:jsxRuntime.jsx(le,{size:18})})]}),jsxRuntime.jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:x})]})}function ge(e){let t={},l=/(=\d+|\w+)\s*\{([^}]*)\}/g,c;for(;(c=l.exec(e))!==null;)t[c[1]]=c[2];return t}function F(e,t,l="en"){return t?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(u,d,p)=>{let r=Number(t[d]);if(isNaN(r))return u;let f=ge(p),g=f[`=${r}`];if(g!==void 0)return g.replace(/#/g,String(r));let x;try{x=new Intl.PluralRules(l).select(r);}catch{x=r===1?"one":"other";}return (f[x]??f.other??"").replace(/#/g,String(r))}).replace(/\{(\w+)\}/g,(u,d)=>{let p=t[d];return p!==void 0?String(p):`{${d}}`}):e}function V(e){let t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}var xe=y.agentPanel.thinking,he=y.agentPanel.composerPlaceholder,be=y.agentPanel.send,ye=e=>F(y.agentPanel.timeline.working,{count:e}),Ae=e=>F(y.agentPanel.timeline.summary,{count:e}),Se=e=>F(y.agentPanel.timeline.earlier,{count:e}),j="ep-agent-chat-keyframes",Ce=`
|
|
2
2
|
@keyframes epAgentDot {
|
|
3
3
|
0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
|
|
4
4
|
40% { transform: scale(1); opacity: 1; }
|
package/dist/react.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-JQBSMHZA.mjs';import {d,b,a as a$1}from'./chunk-24MVJKCP.mjs';export{c as getToolDisplayName}from'./chunk-24MVJKCP.mjs';import {useMemo,useCallback,useState,useRef,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';var te=d();function ne(e){let{editorRef:t,author:l="AI"}=e,c=useMemo(()=>({get:()=>t.current?a(t.current,l):null}),[t,l]);return {executeToolCall:useCallback((d,p)=>{let r=c.get();return r?b(d,p,r):{success:false,error:"Editor not ready"}},[c]),toolSchemas:te}}function re(e){let{editorRef:t,author:l="AI",tools:c,include:u,exclude:d}=e,p=!!c&&Object.keys(c).length>0,r=useCallback(i=>!(u&&!u.includes(i)||d&&d.includes(i)),[u,d]),f=useMemo(()=>{let i=u||d?a$1.filter(n=>r(n.name)):a$1;if(!p)return i.map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}));let o=new Map(i.map(n=>[n.name,n]));for(let[n,C]of Object.entries(c))o.set(n,C);return Array.from(o.values()).map(n=>({type:"function",function:{name:n.name,description:n.description,parameters:n.inputSchema}}))},[c,p,u,d,r]),g=useCallback((i,o)=>{let n=t.current;if(!n)return {success:false,error:"Editor not ready."};let C=a(n,l),k=c?.[i];if(k)try{return k.handler(o,C)}catch(T){return {success:false,error:T instanceof Error?T.message:String(T)}}return r(i)?b(i,o,C):{success:false,error:`Tool '${i}' is not enabled.`}},[t,l,c,r]),x=useCallback(()=>{let i=t.current;if(!i)return {selection:null,currentPage:0,totalPages:0};let o=a(i,l);return {selection:o.getSelection(),currentPage:o.getCurrentPage(),totalPages:o.getTotalPages()}},[t,l]);return {tools:f,executeToolCall:g,getContext:x}}var y={agentPanel:{defaultTitle:"Assistant",close:"Close panel",resizeHandle:"Resize agent panel",thinking:"Assistant is thinking",composerPlaceholder:"Ask the assistant\u2026",send:"Send",timeline:{working:"Working\u2026 {count, plural, one {# step} other {# steps}}",summary:"{count, plural, one {# step} other {# steps}}",earlier:"+ {count, plural, one {# earlier step} other {# earlier steps}}"}}};var _="eigenpal:docx-editor:agentPanelWidth";function ae({size:e=22}){return jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsx("path",{d:"m760-600-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110Zm0 560-50-110-110-50 110-50 50-110 50 110 110 50-110 50-50 110ZM360-160 260-380 40-480l220-100 100-220 100 220 220 100-220 100-100 220Zm0-194 40-86 86-40-86-40-40-86-40 86-86 40 86 40 40 86Zm0-126Z"})})}function le({size:e=18}){return jsx("svg",{viewBox:"0 -960 960 960",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}var ce=360,ue=280,de=600;function pe({title:e=y.agentPanel.defaultTitle,icon:t,closeLabel:l=y.agentPanel.close,resizeHandleLabel:c=y.agentPanel.resizeHandle,width:u,defaultWidth:d=ce,minWidth:p=ue,maxWidth:r=de,onWidthChange:f,onClose:g,children:x,className:i,closed:o=false}){let n=u!==void 0,[C,k]=useState(false),T=useRef(o);useEffect(()=>{if(T.current!==o){T.current=o,k(true);let m=window.setTimeout(()=>k(false),260);return ()=>window.clearTimeout(m)}},[o]);let[L,h]=useState(()=>{if(n)return u;if(typeof window>"u")return d;try{let m=window.localStorage.getItem(_);if(m){let S=Number(m);if(Number.isFinite(S)&&S>=p&&S<=r)return S}}catch{}return d}),E=n?u:L,v=useRef(null),B=useRef({minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f});B.current={minWidth:p,maxWidth:r,isControlled:n,onWidthChange:f};let w=useRef(null);if(!w.current){let m=P=>{let D=v.current;if(!D)return;let I=B.current,q=D.startX-P.clientX,N=Math.min(I.maxWidth,Math.max(I.minWidth,D.startWidth+q));D.lastWidth=N,I.isControlled||h(N),I.onWidthChange?.(N);},S=()=>{let P=v.current;if(P&&(v.current=null,document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",S),!B.current.isControlled))try{window.localStorage.setItem(_,String(P.lastWidth));}catch{}};w.current={move:m,up:S};}let Y=useCallback(m=>{m.preventDefault();let S=n?u:L;v.current={startX:m.clientX,startWidth:S,lastWidth:S},document.addEventListener("pointermove",w.current.move),document.addEventListener("pointerup",w.current.up);},[]);return useEffect(()=>()=>{let m=w.current;m&&(document.removeEventListener("pointermove",m.move),document.removeEventListener("pointerup",m.up));},[]),jsxs("div",{className:`ep-agent-panel${i?` ${i}`:""}`,style:{width:o?0:E,flex:o?"0 0 0px":`0 0 ${E}px`,height:"calc(100% - 16px)",margin:o?"8px 0 8px 0":"8px 8px 8px 12px",display:"flex",flexDirection:"column",background:"#ffffff",border:o?"1px solid transparent":"1px solid #e3e3e3",borderRadius:16,boxShadow:o?"none":"0 1px 2px rgba(60,64,67,0.05), 0 4px 12px rgba(60,64,67,0.08)",opacity:o?0:1,pointerEvents:o?"none":"auto",position:"relative",boxSizing:"border-box",minWidth:o?0:p,overflow:"hidden",fontFamily:"'Google Sans', 'Google Sans Text', system-ui, -apple-system, sans-serif",transition:C?"flex-basis 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), margin 220ms cubic-bezier(0.4, 0, 0.2, 1), opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease":"opacity 180ms ease, box-shadow 220ms ease, border-color 220ms ease"},"aria-hidden":o,"data-testid":"agent-panel","data-state":o?"closed":"open",role:"complementary","aria-label":e,children:[jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":c,onPointerDown:Y,style:{position:"absolute",left:-3,top:0,bottom:0,width:6,cursor:"col-resize",touchAction:"none",zIndex:1},"data-testid":"agent-panel-resize-handle"}),jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 16px 10px",flex:"0 0 auto",background:"#ffffff"},children:[jsx("span",{style:{display:"inline-flex",alignItems:"center",color:"#0b57d0"},children:t??jsx(ae,{size:22})}),jsx("span",{style:{flex:1,fontSize:15,fontWeight:500,color:"#1f1f1f",letterSpacing:.1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),g&&jsx("button",{type:"button",onClick:g,"aria-label":l,title:l,"data-testid":"agent-panel-close",style:{border:"none",background:"transparent",padding:6,cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",color:"#444746",borderRadius:999,transition:"background 0.15s"},onMouseEnter:m=>{m.currentTarget.style.background="#f1f3f4";},onMouseLeave:m=>{m.currentTarget.style.background="transparent";},children:jsx(le,{size:18})})]}),jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:x})]})}function ge(e){let t={},l=/(=\d+|\w+)\s*\{([^}]*)\}/g,c;for(;(c=l.exec(e))!==null;)t[c[1]]=c[2];return t}function F(e,t,l="en"){return t?e.replace(/\{(\w+),\s*plural,\s*((?:[^{}]|\{[^{}]*\})*)\}/g,(u,d,p)=>{let r=Number(t[d]);if(isNaN(r))return u;let f=ge(p),g=f[`=${r}`];if(g!==void 0)return g.replace(/#/g,String(r));let x;try{x=new Intl.PluralRules(l).select(r);}catch{x=r===1?"one":"other";}return (f[x]??f.other??"").replace(/#/g,String(r))}).replace(/\{(\w+)\}/g,(u,d)=>{let p=t[d];return p!==void 0?String(p):`{${d}}`}):e}function V(e){let t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}var xe=y.agentPanel.thinking,he=y.agentPanel.composerPlaceholder,be=y.agentPanel.send,ye=e=>F(y.agentPanel.timeline.working,{count:e}),Ae=e=>F(y.agentPanel.timeline.summary,{count:e}),Se=e=>F(y.agentPanel.timeline.earlier,{count:e}),j="ep-agent-chat-keyframes",Ce=`
|
|
2
2
|
@keyframes epAgentDot {
|
|
3
3
|
0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
|
|
4
4
|
40% { transform: scale(1); opacity: 1; }
|
|
@@ -585,6 +585,12 @@ interface ListRendering {
|
|
|
585
585
|
markerFontFamily?: string;
|
|
586
586
|
/** Marker font size from numbering level rPr, in points */
|
|
587
587
|
markerFontSize?: number;
|
|
588
|
+
/**
|
|
589
|
+
* Suffix character placed after the marker before body text (§17.9.25).
|
|
590
|
+
* Default is `tab`; `space` inserts a single space; `nothing` no gap.
|
|
591
|
+
* Drives marker-slot sizing in `getListMarkerInlineWidth`.
|
|
592
|
+
*/
|
|
593
|
+
markerSuffix?: LevelSuffix;
|
|
588
594
|
/**
|
|
589
595
|
* NumberFormat for each level from 0..ilvl (inclusive).
|
|
590
596
|
* Used to resolve multi-level templates like "%1.%2." where each %N
|
|
@@ -1984,6 +1990,23 @@ interface MediaFile {
|
|
|
1984
1990
|
dataUrl?: string;
|
|
1985
1991
|
}
|
|
1986
1992
|
|
|
1993
|
+
/**
|
|
1994
|
+
* settings.xml parser
|
|
1995
|
+
*
|
|
1996
|
+
* Extracts document-wide settings the layout pipeline needs at render time.
|
|
1997
|
+
* We only read what's currently consumed; most of settings.xml (compatibility
|
|
1998
|
+
* flags, view state, autoformat) is irrelevant to layout.
|
|
1999
|
+
*/
|
|
2000
|
+
/** Document-wide settings parsed from `word/settings.xml`. */
|
|
2001
|
+
interface DocumentSettings {
|
|
2002
|
+
/**
|
|
2003
|
+
* `w:defaultTabStop` (§17.6.13) — interval in twips between default tab
|
|
2004
|
+
* stops applied when a paragraph has no custom `w:tabs`. Word's default
|
|
2005
|
+
* if unspecified is 720 twips (0.5 inch).
|
|
2006
|
+
*/
|
|
2007
|
+
defaultTabStop: number;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
1987
2010
|
/**
|
|
1988
2011
|
* Comprehensive TypeScript types for full DOCX document representation
|
|
1989
2012
|
*
|
|
@@ -2012,6 +2035,8 @@ interface DocxPackage {
|
|
|
2012
2035
|
theme?: Theme;
|
|
2013
2036
|
/** Numbering definitions */
|
|
2014
2037
|
numbering?: NumberingDefinitions;
|
|
2038
|
+
/** Document-wide settings from `word/settings.xml` */
|
|
2039
|
+
settings?: DocumentSettings;
|
|
2015
2040
|
/** Font table */
|
|
2016
2041
|
fontTable?: FontTable;
|
|
2017
2042
|
/** Footnotes */
|
|
@@ -585,6 +585,12 @@ interface ListRendering {
|
|
|
585
585
|
markerFontFamily?: string;
|
|
586
586
|
/** Marker font size from numbering level rPr, in points */
|
|
587
587
|
markerFontSize?: number;
|
|
588
|
+
/**
|
|
589
|
+
* Suffix character placed after the marker before body text (§17.9.25).
|
|
590
|
+
* Default is `tab`; `space` inserts a single space; `nothing` no gap.
|
|
591
|
+
* Drives marker-slot sizing in `getListMarkerInlineWidth`.
|
|
592
|
+
*/
|
|
593
|
+
markerSuffix?: LevelSuffix;
|
|
588
594
|
/**
|
|
589
595
|
* NumberFormat for each level from 0..ilvl (inclusive).
|
|
590
596
|
* Used to resolve multi-level templates like "%1.%2." where each %N
|
|
@@ -1984,6 +1990,23 @@ interface MediaFile {
|
|
|
1984
1990
|
dataUrl?: string;
|
|
1985
1991
|
}
|
|
1986
1992
|
|
|
1993
|
+
/**
|
|
1994
|
+
* settings.xml parser
|
|
1995
|
+
*
|
|
1996
|
+
* Extracts document-wide settings the layout pipeline needs at render time.
|
|
1997
|
+
* We only read what's currently consumed; most of settings.xml (compatibility
|
|
1998
|
+
* flags, view state, autoformat) is irrelevant to layout.
|
|
1999
|
+
*/
|
|
2000
|
+
/** Document-wide settings parsed from `word/settings.xml`. */
|
|
2001
|
+
interface DocumentSettings {
|
|
2002
|
+
/**
|
|
2003
|
+
* `w:defaultTabStop` (§17.6.13) — interval in twips between default tab
|
|
2004
|
+
* stops applied when a paragraph has no custom `w:tabs`. Word's default
|
|
2005
|
+
* if unspecified is 720 twips (0.5 inch).
|
|
2006
|
+
*/
|
|
2007
|
+
defaultTabStop: number;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
1987
2010
|
/**
|
|
1988
2011
|
* Comprehensive TypeScript types for full DOCX document representation
|
|
1989
2012
|
*
|
|
@@ -2012,6 +2035,8 @@ interface DocxPackage {
|
|
|
2012
2035
|
theme?: Theme;
|
|
2013
2036
|
/** Numbering definitions */
|
|
2014
2037
|
numbering?: NumberingDefinitions;
|
|
2038
|
+
/** Document-wide settings from `word/settings.xml` */
|
|
2039
|
+
settings?: DocumentSettings;
|
|
2015
2040
|
/** Font table */
|
|
2016
2041
|
fontTable?: FontTable;
|
|
2017
2042
|
/** Footnotes */
|
package/dist/server.d.mts
CHANGED
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
* @packageDocumentation
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export { s as AgentContextSnapshot, j as AgentToolDefinition, k as AgentToolResult, D as DocxReviewer, E as EditorBridge, S as SelectionInfo, o as createReviewerBridge, n as docxAgentTools, p as executeToolCall, t as getToolDisplayName, q as getToolSchemas } from './server-
|
|
34
|
+
export { s as AgentContextSnapshot, j as AgentToolDefinition, k as AgentToolResult, D as DocxReviewer, E as EditorBridge, S as SelectionInfo, o as createReviewerBridge, n as docxAgentTools, p as executeToolCall, t as getToolDisplayName, q as getToolSchemas } from './server-CGxgyhy-.mjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
* @packageDocumentation
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export { s as AgentContextSnapshot, j as AgentToolDefinition, k as AgentToolResult, D as DocxReviewer, E as EditorBridge, S as SelectionInfo, o as createReviewerBridge, n as docxAgentTools, p as executeToolCall, t as getToolDisplayName, q as getToolSchemas } from './server-
|
|
34
|
+
export { s as AgentContextSnapshot, j as AgentToolDefinition, k as AgentToolResult, D as DocxReviewer, E as EditorBridge, S as SelectionInfo, o as createReviewerBridge, n as docxAgentTools, p as executeToolCall, t as getToolDisplayName, q as getToolSchemas } from './server-CGxgyhy-.js';
|
package/dist/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkSCYZRJWI_js=require('./chunk-SCYZRJWI.js'),chunkMOAJJKKG_js=require('./chunk-MOAJJKKG.js'),chunkRI5S75JY_js=require('./chunk-RI5S75JY.js');Object.defineProperty(exports,"DocxReviewer",{enumerable:true,get:function(){return chunkSCYZRJWI_js.a}});Object.defineProperty(exports,"createReviewerBridge",{enumerable:true,get:function(){return chunkMOAJJKKG_js.m}});Object.defineProperty(exports,"docxAgentTools",{enumerable:true,get:function(){return chunkRI5S75JY_js.a}});Object.defineProperty(exports,"executeToolCall",{enumerable:true,get:function(){return chunkRI5S75JY_js.b}});Object.defineProperty(exports,"getToolDisplayName",{enumerable:true,get:function(){return chunkRI5S75JY_js.c}});Object.defineProperty(exports,"getToolSchemas",{enumerable:true,get:function(){return chunkRI5S75JY_js.d}});
|
package/dist/server.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DocxReviewer}from'./chunk-
|
|
1
|
+
export{a as DocxReviewer}from'./chunk-NGMVN6QV.mjs';export{m as createReviewerBridge}from'./chunk-PSSPSJR4.mjs';export{a as docxAgentTools,b as executeToolCall,c as getToolDisplayName,d as getToolSchemas}from'./chunk-24MVJKCP.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eigenpal/docx-editor-agents",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Agent SDK and chat UI for the DOCX editor — framework-agnostic bridge, MCP server, AI SDK adapters, plus React UI (and Vue UI in 1.x)",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|