@eigenpal/docx-js-editor 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +52 -14
  2. package/dist/{chunk-FOU7PS3K.cjs → chunk-A7VY2V4X.cjs} +1 -1
  3. package/dist/chunk-GQ4JYQWC.js +58 -0
  4. package/dist/{chunk-ZRXLWSRP.cjs → chunk-H3JNHCD7.cjs} +4 -4
  5. package/dist/{chunk-VFBM3YKJ.js → chunk-L2UUZRZI.js} +4 -4
  6. package/dist/{chunk-AQ35GWDV.js → chunk-MMJD2DLL.js} +1 -1
  7. package/dist/chunk-PM4Y7OFN.js +12 -0
  8. package/dist/{chunk-PYAIJMEG.cjs → chunk-QOIY4Y6N.cjs} +2 -2
  9. package/dist/chunk-QYKJKSKZ.cjs +58 -0
  10. package/dist/{chunk-NZ7XUW4I.cjs → chunk-S6FZ7HL6.js} +1 -1
  11. package/dist/{chunk-AEANV5BR.js → chunk-TPUJJJWA.js} +1 -1
  12. package/dist/chunk-TRAQI6RX.cjs +12 -0
  13. package/dist/chunk-Y37VT37I.cjs +1 -0
  14. package/dist/{colorResolver-CQcFBxHC.d.ts → colorResolver-BNj-uZ58.d.ts} +1 -1
  15. package/dist/{colorResolver-Di-JRsr9.d.cts → colorResolver-DiMquGWR.d.cts} +1 -1
  16. package/dist/core-plugins.cjs +1 -1
  17. package/dist/core-plugins.d.cts +3 -3
  18. package/dist/core-plugins.d.ts +3 -3
  19. package/dist/core-plugins.js +1 -1
  20. package/dist/executor-44OB3DFD.js +1 -0
  21. package/dist/executor-U3BZPPGN.cjs +1 -0
  22. package/dist/headless.cjs +2 -2
  23. package/dist/headless.d.cts +4 -4
  24. package/dist/headless.d.ts +4 -4
  25. package/dist/headless.js +2 -2
  26. package/dist/index.cjs +26 -27
  27. package/dist/index.css +1 -1
  28. package/dist/index.d.cts +90 -152
  29. package/dist/index.d.ts +90 -152
  30. package/dist/index.js +26 -27
  31. package/dist/mcp-cli.js +21 -20
  32. package/dist/mcp.cjs +12 -12
  33. package/dist/mcp.d.cts +2 -2
  34. package/dist/mcp.d.ts +2 -2
  35. package/dist/mcp.js +12 -12
  36. package/dist/{registry-CrAzNdUO.d.cts → registry-BUTMLqSj.d.cts} +1 -1
  37. package/dist/{registry-aux2uuQs.d.ts → registry-CzqAPdui.d.ts} +1 -1
  38. package/dist/selectionRects-I5JVL73G.cjs +1 -0
  39. package/dist/selectionRects-LO3FJT47.js +1 -0
  40. package/dist/styles.css +1 -1
  41. package/dist/{types-BnShY2aQ.d.ts → types-BALm1KBi.d.cts} +3 -1
  42. package/dist/{types-BnShY2aQ.d.cts → types-BALm1KBi.d.ts} +3 -1
  43. package/package.json +10 -5
  44. package/dist/chunk-2CFVFSUH.js +0 -57
  45. package/dist/chunk-CDSUWDYP.cjs +0 -11
  46. package/dist/chunk-TL3YTVN2.cjs +0 -57
  47. package/dist/chunk-W2TDS3UO.js +0 -1
  48. package/dist/chunk-ZZNWTYMW.js +0 -11
  49. package/dist/executor-7DZMHPUF.js +0 -1
  50. package/dist/executor-FSMRGT73.cjs +0 -1
  51. package/dist/selectionRects-5TGQE33Q.cjs +0 -1
  52. package/dist/selectionRects-JSPKYXPU.js +0 -1
package/dist/mcp.cjs CHANGED
@@ -1,16 +1,16 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkTL3YTVN2_cjs=require('./chunk-TL3YTVN2.cjs'),chunkCDSUWDYP_cjs=require('./chunk-CDSUWDYP.cjs'),chunkFOU7PS3K_cjs=require('./chunk-FOU7PS3K.cjs'),chunkXVFMG77A_cjs=require('./chunk-XVFMG77A.cjs');require('./chunk-RTESADL3.cjs');var u={type:"string",description:"Document ID returned from docx_load"},h={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},offset:{type:"number",description:"Character offset within the paragraph",minimum:0}},required:["paragraphIndex","offset"]},T={type:"object",properties:{start:h,end:h},required:["start","end"]},C={name:"docx_load",description:`Load a DOCX document from base64-encoded content.
1
+ 'use strict';var chunkQYKJKSKZ_cjs=require('./chunk-QYKJKSKZ.cjs'),chunkTRAQI6RX_cjs=require('./chunk-TRAQI6RX.cjs'),chunkA7VY2V4X_cjs=require('./chunk-A7VY2V4X.cjs'),chunkXVFMG77A_cjs=require('./chunk-XVFMG77A.cjs');require('./chunk-RTESADL3.cjs');var u={type:"string",description:"Document ID returned from docx_load"},h={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},offset:{type:"number",description:"Character offset within the paragraph",minimum:0}},required:["paragraphIndex","offset"]},T={type:"object",properties:{start:h,end:h},required:["start","end"]},D={name:"docx_load",description:`Load a DOCX document from base64-encoded content.
2
2
  Returns a document ID that can be used with other tools.
3
- The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o=n.buffer,a=await chunkCDSUWDYP_cjs.m(o),d=`doc_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;s.session.documents.set(d,{id:d,document:a,buffer:o,source:c,lastModified:Date.now()});let p=a.package.document.content.filter(l=>l.type==="paragraph").length;return {content:[{type:"text",text:JSON.stringify({documentId:d,source:c,paragraphCount:p,message:"Document loaded successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to load document: ${t.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},R={name:"docx_save",description:`Export the document to base64-encoded DOCX format.
4
- Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let t;c.buffer?t=await chunkTL3YTVN2_cjs.d(c.document):t=await chunkTL3YTVN2_cjs.e(c.document);let n=new Uint8Array(t),o="";for(let d=0;d<n.length;d++)o+=String.fromCharCode(n[d]);let a=btoa(o);return {content:[{type:"text",text:JSON.stringify({documentId:e,base64:a,size:t.byteLength,message:"Document exported successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to save document: ${t.message}`}]}}},annotations:{category:"core",readOnly:true,complexity:"low"}},k={name:"docx_close",description:`Close a document and free its memory.
5
- Use this when done working with a document.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r;return s.session.documents.has(e)?(s.session.documents.delete(e),{content:[{type:"text",text:JSON.stringify({documentId:e,message:"Document closed"})}]}):{isError:true,content:[{type:"text",text:`Document not found: ${e}`}]}},annotations:{category:"core",readOnly:false,complexity:"low"}},$={name:"docx_get_info",description:`Get metadata and statistics about a document.
6
- Returns paragraph count, word count, table count, and other useful info.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let t=c.document,n=t.package.document,o=n.content.filter(p=>p.type==="paragraph"),a=n.content.filter(p=>p.type==="table"),d=0;for(let p of o)if(p.type==="paragraph"){let l=_(p);d+=l.split(/\s+/).filter(x=>x.length>0).length;}return {content:[{type:"text",text:JSON.stringify({documentId:e,paragraphCount:o.length,tableCount:a.length,wordCount:d,hasStyles:!!t.package.styles,hasTheme:!!t.package.theme,source:c.source,lastModified:c.lastModified})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},v={name:"docx_get_text",description:`Get the plain text content of the document.
3
+ The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o=n.buffer,a=await chunkTRAQI6RX_cjs.o(o),d=`doc_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;s.session.documents.set(d,{id:d,document:a,buffer:o,source:c,lastModified:Date.now()});let p=a.package.document.content.filter(l=>l.type==="paragraph").length;return {content:[{type:"text",text:JSON.stringify({documentId:d,source:c,paragraphCount:p,message:"Document loaded successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to load document: ${t.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},C={name:"docx_save",description:`Export the document to base64-encoded DOCX format.
4
+ Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let t;c.buffer?t=await chunkQYKJKSKZ_cjs.d(c.document):t=await chunkQYKJKSKZ_cjs.e(c.document);let n=new Uint8Array(t),o="";for(let d=0;d<n.length;d++)o+=String.fromCharCode(n[d]);let a=btoa(o);return {content:[{type:"text",text:JSON.stringify({documentId:e,base64:a,size:t.byteLength,message:"Document exported successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to save document: ${t.message}`}]}}},annotations:{category:"core",readOnly:true,complexity:"low"}},R={name:"docx_close",description:`Close a document and free its memory.
5
+ Use this when done working with a document.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r;return s.session.documents.has(e)?(s.session.documents.delete(e),{content:[{type:"text",text:JSON.stringify({documentId:e,message:"Document closed"})}]}):{isError:true,content:[{type:"text",text:`Document not found: ${e}`}]}},annotations:{category:"core",readOnly:false,complexity:"low"}},k={name:"docx_get_info",description:`Get metadata and statistics about a document.
6
+ Returns paragraph count, word count, table count, and other useful info.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let t=c.document,n=t.package.document,o=n.content.filter(p=>p.type==="paragraph"),a=n.content.filter(p=>p.type==="table"),d=0;for(let p of o)if(p.type==="paragraph"){let l=P(p);d+=l.split(/\s+/).filter(x=>x.length>0).length;}return {content:[{type:"text",text:JSON.stringify({documentId:e,paragraphCount:o.length,tableCount:a.length,wordCount:d,hasStyles:!!t.package.styles,hasTheme:!!t.package.theme,source:c.source,lastModified:c.lastModified})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},$={name:"docx_get_text",description:`Get the plain text content of the document.
7
7
  Returns all text concatenated with paragraph breaks.
8
- Useful for understanding document content before making edits.`,inputSchema:{type:"object",properties:{documentId:u,maxLength:{type:"number",description:"Maximum characters to return (default: 10000)",default:1e4}},required:["documentId"]},handler:async(r,s)=>{let{documentId:e,maxLength:c=1e4}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let n=t.document.package.document,o=[];for(let p of n.content)p.type==="paragraph"?o.push(_(p)):p.type==="table"&&o.push("[TABLE]");let a=o.join(`
8
+ Useful for understanding document content before making edits.`,inputSchema:{type:"object",properties:{documentId:u,maxLength:{type:"number",description:"Maximum characters to return (default: 10000)",default:1e4}},required:["documentId"]},handler:async(r,s)=>{let{documentId:e,maxLength:c=1e4}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let n=t.document.package.document,o=[];for(let p of n.content)p.type==="paragraph"?o.push(P(p)):p.type==="table"&&o.push("[TABLE]");let a=o.join(`
9
9
  `),d=a.length>c;return d&&(a=a.slice(0,c)+"..."),{content:[{type:"text",text:JSON.stringify({documentId:e,text:a,truncated:d,totalLength:d?o.join(`
10
10
  `).length:a.length})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},J={name:"docx_insert_text",description:`Insert text at a specific position in the document.
11
- Position is specified by paragraph index (0-indexed) and character offset.`,inputSchema:{type:"object",properties:{documentId:u,position:h,text:{type:"string",description:"Text to insert"}},required:["documentId","position","text"]},handler:async(r,s)=>{let{documentId:e,position:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkFOU7PS3K_cjs.a(n.document,{type:"insertText",position:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,insertedLength:t.length,position:c})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to insert text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},j={name:"docx_replace_text",description:`Replace text in a range with new text.
12
- Specify start and end positions to define the range to replace.`,inputSchema:{type:"object",properties:{documentId:u,range:T,text:{type:"string",description:"Replacement text"}},required:["documentId","range","text"]},handler:async(r,s)=>{let{documentId:e,range:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkFOU7PS3K_cjs.a(n.document,{type:"replaceText",range:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,replacedRange:c,newTextLength:t.length})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to replace text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},E={name:"docx_delete_text",description:`Delete text in a range.
13
- Specify start and end positions to define the range to delete.`,inputSchema:{type:"object",properties:{documentId:u,range:T},required:["documentId","range"]},handler:async(r,s)=>{let{documentId:e,range:c}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let n=chunkFOU7PS3K_cjs.a(t.document,{type:"deleteText",range:c});return t.document=n,t.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,deletedRange:c})}]}}catch(n){return {isError:true,content:[{type:"text",text:`Failed to delete text: ${n.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},O={name:"docx_format_text",description:`Apply formatting to text in a range.
14
- Supports bold, italic, underline, font size, font family, color, and highlight.`,inputSchema:{type:"object",properties:{documentId:u,range:T,formatting:{type:"object",description:"Formatting options to apply",properties:{bold:{type:"boolean"},italic:{type:"boolean"},underline:{type:"boolean"},strikethrough:{type:"boolean"},fontSize:{type:"number",description:"Font size in points"},fontFamily:{type:"string"},color:{type:"string",description:'Hex color (e.g., "#FF0000")'},highlight:{type:"string",description:"Highlight color name"}}}},required:["documentId","range","formatting"]},handler:async(r,s)=>{let{documentId:e,range:c,formatting:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkFOU7PS3K_cjs.a(n.document,{type:"formatText",range:c,formatting:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,range:c,appliedFormatting:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to format text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"medium"}},P={name:"docx_apply_style",description:`Apply a named style to a paragraph.
15
- Use document styles like "Heading1", "Heading2", "Normal", etc.`,inputSchema:{type:"object",properties:{documentId:u,paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},styleId:{type:"string",description:'Style ID (e.g., "Heading1", "Normal")'}},required:["documentId","paragraphIndex","styleId"]},handler:async(r,s)=>{let{documentId:e,paragraphIndex:c,styleId:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkFOU7PS3K_cjs.a(n.document,{type:"applyStyle",paragraphIndex:c,styleId:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,paragraphIndex:c,styleId:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to apply style: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}};function _(r){let s=[];for(let e of r.content)e.type==="run"?s.push(q(e)):e.type==="hyperlink"&&s.push(A(e));return s.join("")}function q(r){return r.content.filter(s=>s.type==="text").map(s=>s.text).join("")}function A(r){let s=[];for(let e of r.children)e.type==="run"&&s.push(q(e));return s.join("")}var y=[C,R,k,$,v,J,j,E,O,P];function M(r={}){let{name:s="docx-editor",version:e="0.1.0",includeCoreTools:c=true,debug:t=false,additionalTools:n=[]}=r,o=new Map,a={id:`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,documents:new Map,data:new Map};if(c)for(let i of y)o.set(i.name,i),t&&console.log(`[MCP] Registered core tool: ${i.name}`);let d=chunkXVFMG77A_cjs.b.getMcpTools();for(let i of d)o.has(i.name)&&console.warn(`[MCP] Tool '${i.name}' from plugin overrides existing tool`),o.set(i.name,i),t&&console.log(`[MCP] Registered plugin tool: ${i.name}`);for(let i of n)o.set(i.name,i),t&&console.log(`[MCP] Registered additional tool: ${i.name}`);let p=t?(i,f)=>{console.log(`[MCP] ${i}`,f??"");}:()=>{};async function l(i,f){let b=o.get(i);if(!b)throw new Error(`Unknown tool: ${i}`);p(`Calling tool: ${i}`,f);let N={session:a,log:p};try{let g=await b.handler(f,N);return p(`Tool ${i} completed`,g),g}catch(g){throw p(`Tool ${i} failed`,g),g}}function x(){return Array.from(o.values()).map(i=>({name:i.name,description:i.description,inputSchema:z(i.inputSchema),category:i.annotations?.category}))}function L(){return {name:s,version:e,toolCount:o.size}}return {tools:o,session:a,handleToolCall:l,listTools:x,getInfo:L}}async function F(r,s){let{id:e,method:c,params:t}=s;try{switch(c){case "initialize":return {jsonrpc:"2.0",id:e,result:{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:r.getInfo()}};case "tools/list":{let n=r.listTools();return {jsonrpc:"2.0",id:e,result:{tools:n.map(o=>({name:o.name,description:o.description,inputSchema:o.inputSchema}))}}}case "tools/call":{let{name:n,arguments:o}=t,a=await r.handleToolCall(n,o);return {jsonrpc:"2.0",id:e,result:a}}default:return {jsonrpc:"2.0",id:e,error:{code:-32601,message:`Method not found: ${c}`}}}}catch(n){return {jsonrpc:"2.0",id:e,error:{code:-32e3,message:n.message}}}}async function H(r={}){let s=M(r);r.debug&&(console.error(`[MCP] Server started: ${s.getInfo().name} v${s.getInfo().version}`),console.error(`[MCP] Tools registered: ${s.tools.size}`));let c=(await import('readline')).createInterface({input:process.stdin,output:process.stdout,terminal:false}),t="";c.on("line",async n=>{t+=n;try{let o=JSON.parse(t);t="";let a=await F(s,o);process.stdout.write(JSON.stringify(a)+`
16
- `);}catch{}}),c.on("close",()=>{r.debug&&console.error("[MCP] Server closed"),process.exit(0);});}function z(r){return typeof r=="object"&&r!==null&&("type"in r||"properties"in r)?r:{type:"object",properties:{}}}exports.applyStyleTool=P;exports.closeDocumentTool=k;exports.coreMcpTools=y;exports.createMcpServer=M;exports.default=M;exports.deleteTextTool=E;exports.formatTextTool=O;exports.getDocumentInfoTool=$;exports.getDocumentTextTool=v;exports.handleJsonRpcRequest=F;exports.insertTextTool=J;exports.loadDocumentTool=C;exports.replaceTextTool=j;exports.saveDocumentTool=R;exports.startStdioServer=H;
11
+ Position is specified by paragraph index (0-indexed) and character offset.`,inputSchema:{type:"object",properties:{documentId:u,position:h,text:{type:"string",description:"Text to insert"}},required:["documentId","position","text"]},handler:async(r,s)=>{let{documentId:e,position:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkA7VY2V4X_cjs.a(n.document,{type:"insertText",position:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,insertedLength:t.length,position:c})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to insert text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},v={name:"docx_replace_text",description:`Replace text in a range with new text.
12
+ Specify start and end positions to define the range to replace.`,inputSchema:{type:"object",properties:{documentId:u,range:T,text:{type:"string",description:"Replacement text"}},required:["documentId","range","text"]},handler:async(r,s)=>{let{documentId:e,range:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkA7VY2V4X_cjs.a(n.document,{type:"replaceText",range:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,replacedRange:c,newTextLength:t.length})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to replace text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},j={name:"docx_delete_text",description:`Delete text in a range.
13
+ Specify start and end positions to define the range to delete.`,inputSchema:{type:"object",properties:{documentId:u,range:T},required:["documentId","range"]},handler:async(r,s)=>{let{documentId:e,range:c}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let n=chunkA7VY2V4X_cjs.a(t.document,{type:"deleteText",range:c});return t.document=n,t.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,deletedRange:c})}]}}catch(n){return {isError:true,content:[{type:"text",text:`Failed to delete text: ${n.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},E={name:"docx_format_text",description:`Apply formatting to text in a range.
14
+ Supports bold, italic, underline, font size, font family, color, and highlight.`,inputSchema:{type:"object",properties:{documentId:u,range:T,formatting:{type:"object",description:"Formatting options to apply",properties:{bold:{type:"boolean"},italic:{type:"boolean"},underline:{type:"boolean"},strikethrough:{type:"boolean"},fontSize:{type:"number",description:"Font size in points"},fontFamily:{type:"string"},color:{type:"string",description:'Hex color (e.g., "#FF0000")'},highlight:{type:"string",description:"Highlight color name"}}}},required:["documentId","range","formatting"]},handler:async(r,s)=>{let{documentId:e,range:c,formatting:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkA7VY2V4X_cjs.a(n.document,{type:"formatText",range:c,formatting:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,range:c,appliedFormatting:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to format text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"medium"}},O={name:"docx_apply_style",description:`Apply a named style to a paragraph.
15
+ Use document styles like "Heading1", "Heading2", "Normal", etc.`,inputSchema:{type:"object",properties:{documentId:u,paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},styleId:{type:"string",description:'Style ID (e.g., "Heading1", "Normal")'}},required:["documentId","paragraphIndex","styleId"]},handler:async(r,s)=>{let{documentId:e,paragraphIndex:c,styleId:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=chunkA7VY2V4X_cjs.a(n.document,{type:"applyStyle",paragraphIndex:c,styleId:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,paragraphIndex:c,styleId:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to apply style: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}};function P(r){let s=[];for(let e of r.content)e.type==="run"?s.push(_(e)):e.type==="hyperlink"&&s.push(A(e));return s.join("")}function _(r){return r.content.filter(s=>s.type==="text").map(s=>s.text).join("")}function A(r){let s=[];for(let e of r.children)e.type==="run"&&s.push(_(e));return s.join("")}var y=[D,C,R,k,$,J,v,j,E,O];function q(r={}){let{name:s="docx-editor",version:e="0.1.0",includeCoreTools:c=true,debug:t=false,additionalTools:n=[]}=r,o=new Map,a={id:`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,documents:new Map,data:new Map};if(c)for(let i of y)o.set(i.name,i),t&&console.log(`[MCP] Registered core tool: ${i.name}`);let d=chunkXVFMG77A_cjs.b.getMcpTools();for(let i of d)o.has(i.name)&&console.warn(`[MCP] Tool '${i.name}' from plugin overrides existing tool`),o.set(i.name,i),t&&console.log(`[MCP] Registered plugin tool: ${i.name}`);for(let i of n)o.set(i.name,i),t&&console.log(`[MCP] Registered additional tool: ${i.name}`);let p=t?(i,f)=>{console.log(`[MCP] ${i}`,f??"");}:()=>{};async function l(i,f){let M=o.get(i);if(!M)throw new Error(`Unknown tool: ${i}`);p(`Calling tool: ${i}`,f);let N={session:a,log:p};try{let g=await M.handler(f,N);return p(`Tool ${i} completed`,g),g}catch(g){throw p(`Tool ${i} failed`,g),g}}function x(){return Array.from(o.values()).map(i=>({name:i.name,description:i.description,inputSchema:z(i.inputSchema),category:i.annotations?.category}))}function L(){return {name:s,version:e,toolCount:o.size}}return {tools:o,session:a,handleToolCall:l,listTools:x,getInfo:L}}async function F(r,s){let{id:e,method:c,params:t}=s;try{switch(c){case "initialize":return {jsonrpc:"2.0",id:e,result:{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:r.getInfo()}};case "tools/list":{let n=r.listTools();return {jsonrpc:"2.0",id:e,result:{tools:n.map(o=>({name:o.name,description:o.description,inputSchema:o.inputSchema}))}}}case "tools/call":{let{name:n,arguments:o}=t,a=await r.handleToolCall(n,o);return {jsonrpc:"2.0",id:e,result:a}}default:return {jsonrpc:"2.0",id:e,error:{code:-32601,message:`Method not found: ${c}`}}}}catch(n){return {jsonrpc:"2.0",id:e,error:{code:-32e3,message:n.message}}}}async function H(r={}){let s=q(r);r.debug&&(console.error(`[MCP] Server started: ${s.getInfo().name} v${s.getInfo().version}`),console.error(`[MCP] Tools registered: ${s.tools.size}`));let c=(await import('readline')).createInterface({input:process.stdin,output:process.stdout,terminal:false}),t="";c.on("line",async n=>{t+=n;try{let o=JSON.parse(t);t="";let a=await F(s,o);process.stdout.write(JSON.stringify(a)+`
16
+ `);}catch{}}),c.on("close",()=>{r.debug&&console.error("[MCP] Server closed"),process.exit(0);});}function z(r){return typeof r=="object"&&r!==null&&("type"in r||"properties"in r)?r:{type:"object",properties:{}}}exports.applyStyleTool=O;exports.closeDocumentTool=R;exports.coreMcpTools=y;exports.createMcpServer=q;exports.deleteTextTool=j;exports.formatTextTool=E;exports.getDocumentInfoTool=k;exports.getDocumentTextTool=$;exports.handleJsonRpcRequest=F;exports.insertTextTool=J;exports.loadDocumentTool=D;exports.replaceTextTool=v;exports.saveDocumentTool=C;exports.startStdioServer=H;
package/dist/mcp.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as McpToolDefinition, d as McpSession, J as JsonSchema } from './types-BnShY2aQ.cjs';
1
+ import { M as McpToolDefinition, d as McpSession, J as JsonSchema } from './types-BALm1KBi.cjs';
2
2
 
3
3
  /**
4
4
  * Core MCP Tools
@@ -152,4 +152,4 @@ declare function handleJsonRpcRequest(server: McpServer, request: JsonRpcRequest
152
152
  */
153
153
  declare function startStdioServer(config?: McpServerConfig): Promise<void>;
154
154
 
155
- export { type McpServer, type McpServerConfig, type McpToolInfo, applyStyleTool, closeDocumentTool, coreMcpTools, createMcpServer, createMcpServer as default, deleteTextTool, formatTextTool, getDocumentInfoTool, getDocumentTextTool, handleJsonRpcRequest, insertTextTool, loadDocumentTool, replaceTextTool, saveDocumentTool, startStdioServer };
155
+ export { type McpServer, type McpServerConfig, type McpToolInfo, applyStyleTool, closeDocumentTool, coreMcpTools, createMcpServer, deleteTextTool, formatTextTool, getDocumentInfoTool, getDocumentTextTool, handleJsonRpcRequest, insertTextTool, loadDocumentTool, replaceTextTool, saveDocumentTool, startStdioServer };
package/dist/mcp.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as McpToolDefinition, d as McpSession, J as JsonSchema } from './types-BnShY2aQ.js';
1
+ import { M as McpToolDefinition, d as McpSession, J as JsonSchema } from './types-BALm1KBi.js';
2
2
 
3
3
  /**
4
4
  * Core MCP Tools
@@ -152,4 +152,4 @@ declare function handleJsonRpcRequest(server: McpServer, request: JsonRpcRequest
152
152
  */
153
153
  declare function startStdioServer(config?: McpServerConfig): Promise<void>;
154
154
 
155
- export { type McpServer, type McpServerConfig, type McpToolInfo, applyStyleTool, closeDocumentTool, coreMcpTools, createMcpServer, createMcpServer as default, deleteTextTool, formatTextTool, getDocumentInfoTool, getDocumentTextTool, handleJsonRpcRequest, insertTextTool, loadDocumentTool, replaceTextTool, saveDocumentTool, startStdioServer };
155
+ export { type McpServer, type McpServerConfig, type McpToolInfo, applyStyleTool, closeDocumentTool, coreMcpTools, createMcpServer, deleteTextTool, formatTextTool, getDocumentInfoTool, getDocumentTextTool, handleJsonRpcRequest, insertTextTool, loadDocumentTool, replaceTextTool, saveDocumentTool, startStdioServer };
package/dist/mcp.js CHANGED
@@ -1,16 +1,16 @@
1
- import {d,e}from'./chunk-2CFVFSUH.js';import {m}from'./chunk-ZZNWTYMW.js';import {a}from'./chunk-AQ35GWDV.js';import {b}from'./chunk-QHWHCIUW.js';import'./chunk-3IYNTJO5.js';var u={type:"string",description:"Document ID returned from docx_load"},h={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},offset:{type:"number",description:"Character offset within the paragraph",minimum:0}},required:["paragraphIndex","offset"]},T={type:"object",properties:{start:h,end:h},required:["start","end"]},C={name:"docx_load",description:`Load a DOCX document from base64-encoded content.
1
+ import {d,e}from'./chunk-GQ4JYQWC.js';import {o}from'./chunk-PM4Y7OFN.js';import {a}from'./chunk-MMJD2DLL.js';import {b}from'./chunk-QHWHCIUW.js';import'./chunk-3IYNTJO5.js';var u={type:"string",description:"Document ID returned from docx_load"},h={type:"object",properties:{paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},offset:{type:"number",description:"Character offset within the paragraph",minimum:0}},required:["paragraphIndex","offset"]},T={type:"object",properties:{start:h,end:h},required:["start","end"]},D={name:"docx_load",description:`Load a DOCX document from base64-encoded content.
2
2
  Returns a document ID that can be used with other tools.
3
- The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o=n.buffer,a=await m(o),d=`doc_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;s.session.documents.set(d,{id:d,document:a,buffer:o,source:c,lastModified:Date.now()});let p=a.package.document.content.filter(l=>l.type==="paragraph").length;return {content:[{type:"text",text:JSON.stringify({documentId:d,source:c,paragraphCount:p,message:"Document loaded successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to load document: ${t.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},R={name:"docx_save",description:`Export the document to base64-encoded DOCX format.
4
- Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e$1}=r,c=s.session.documents.get(e$1);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e$1}`}]};try{let t;c.buffer?t=await d(c.document):t=await e(c.document);let n=new Uint8Array(t),o="";for(let d=0;d<n.length;d++)o+=String.fromCharCode(n[d]);let a=btoa(o);return {content:[{type:"text",text:JSON.stringify({documentId:e$1,base64:a,size:t.byteLength,message:"Document exported successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to save document: ${t.message}`}]}}},annotations:{category:"core",readOnly:true,complexity:"low"}},k={name:"docx_close",description:`Close a document and free its memory.
5
- Use this when done working with a document.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r;return s.session.documents.has(e)?(s.session.documents.delete(e),{content:[{type:"text",text:JSON.stringify({documentId:e,message:"Document closed"})}]}):{isError:true,content:[{type:"text",text:`Document not found: ${e}`}]}},annotations:{category:"core",readOnly:false,complexity:"low"}},$={name:"docx_get_info",description:`Get metadata and statistics about a document.
6
- Returns paragraph count, word count, table count, and other useful info.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let t=c.document,n=t.package.document,o=n.content.filter(p=>p.type==="paragraph"),a=n.content.filter(p=>p.type==="table"),d=0;for(let p of o)if(p.type==="paragraph"){let l=_(p);d+=l.split(/\s+/).filter(x=>x.length>0).length;}return {content:[{type:"text",text:JSON.stringify({documentId:e,paragraphCount:o.length,tableCount:a.length,wordCount:d,hasStyles:!!t.package.styles,hasTheme:!!t.package.theme,source:c.source,lastModified:c.lastModified})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},v={name:"docx_get_text",description:`Get the plain text content of the document.
3
+ The document remains in session memory until closed.`,inputSchema:{type:"object",properties:{content:{type:"string",description:"Base64-encoded DOCX file content"},source:{type:"string",description:"Optional source filename or identifier for reference"}},required:["content"]},handler:async(r,s)=>{let{content:e,source:c}=r;try{let t=atob(e),n=new Uint8Array(t.length);for(let l=0;l<t.length;l++)n[l]=t.charCodeAt(l);let o$1=n.buffer,a=await o(o$1),d=`doc_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;s.session.documents.set(d,{id:d,document:a,buffer:o$1,source:c,lastModified:Date.now()});let p=a.package.document.content.filter(l=>l.type==="paragraph").length;return {content:[{type:"text",text:JSON.stringify({documentId:d,source:c,paragraphCount:p,message:"Document loaded successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to load document: ${t.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},C={name:"docx_save",description:`Export the document to base64-encoded DOCX format.
4
+ Returns the document as a base64 string that can be saved to a file.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e$1}=r,c=s.session.documents.get(e$1);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e$1}`}]};try{let t;c.buffer?t=await d(c.document):t=await e(c.document);let n=new Uint8Array(t),o="";for(let d=0;d<n.length;d++)o+=String.fromCharCode(n[d]);let a=btoa(o);return {content:[{type:"text",text:JSON.stringify({documentId:e$1,base64:a,size:t.byteLength,message:"Document exported successfully"})}]}}catch(t){return {isError:true,content:[{type:"text",text:`Failed to save document: ${t.message}`}]}}},annotations:{category:"core",readOnly:true,complexity:"low"}},R={name:"docx_close",description:`Close a document and free its memory.
5
+ Use this when done working with a document.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r;return s.session.documents.has(e)?(s.session.documents.delete(e),{content:[{type:"text",text:JSON.stringify({documentId:e,message:"Document closed"})}]}):{isError:true,content:[{type:"text",text:`Document not found: ${e}`}]}},annotations:{category:"core",readOnly:false,complexity:"low"}},k={name:"docx_get_info",description:`Get metadata and statistics about a document.
6
+ Returns paragraph count, word count, table count, and other useful info.`,inputSchema:{type:"object",properties:{documentId:u},required:["documentId"]},handler:async(r,s)=>{let{documentId:e}=r,c=s.session.documents.get(e);if(!c)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let t=c.document,n=t.package.document,o=n.content.filter(p=>p.type==="paragraph"),a=n.content.filter(p=>p.type==="table"),d=0;for(let p of o)if(p.type==="paragraph"){let l=P(p);d+=l.split(/\s+/).filter(x=>x.length>0).length;}return {content:[{type:"text",text:JSON.stringify({documentId:e,paragraphCount:o.length,tableCount:a.length,wordCount:d,hasStyles:!!t.package.styles,hasTheme:!!t.package.theme,source:c.source,lastModified:c.lastModified})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},$={name:"docx_get_text",description:`Get the plain text content of the document.
7
7
  Returns all text concatenated with paragraph breaks.
8
- Useful for understanding document content before making edits.`,inputSchema:{type:"object",properties:{documentId:u,maxLength:{type:"number",description:"Maximum characters to return (default: 10000)",default:1e4}},required:["documentId"]},handler:async(r,s)=>{let{documentId:e,maxLength:c=1e4}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let n=t.document.package.document,o=[];for(let p of n.content)p.type==="paragraph"?o.push(_(p)):p.type==="table"&&o.push("[TABLE]");let a=o.join(`
8
+ Useful for understanding document content before making edits.`,inputSchema:{type:"object",properties:{documentId:u,maxLength:{type:"number",description:"Maximum characters to return (default: 10000)",default:1e4}},required:["documentId"]},handler:async(r,s)=>{let{documentId:e,maxLength:c=1e4}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};let n=t.document.package.document,o=[];for(let p of n.content)p.type==="paragraph"?o.push(P(p)):p.type==="table"&&o.push("[TABLE]");let a=o.join(`
9
9
  `),d=a.length>c;return d&&(a=a.slice(0,c)+"..."),{content:[{type:"text",text:JSON.stringify({documentId:e,text:a,truncated:d,totalLength:d?o.join(`
10
10
  `).length:a.length})}]}},annotations:{category:"core",readOnly:true,complexity:"low"}},J={name:"docx_insert_text",description:`Insert text at a specific position in the document.
11
- Position is specified by paragraph index (0-indexed) and character offset.`,inputSchema:{type:"object",properties:{documentId:u,position:h,text:{type:"string",description:"Text to insert"}},required:["documentId","position","text"]},handler:async(r,s)=>{let{documentId:e,position:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"insertText",position:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,insertedLength:t.length,position:c})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to insert text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},j={name:"docx_replace_text",description:`Replace text in a range with new text.
12
- Specify start and end positions to define the range to replace.`,inputSchema:{type:"object",properties:{documentId:u,range:T,text:{type:"string",description:"Replacement text"}},required:["documentId","range","text"]},handler:async(r,s)=>{let{documentId:e,range:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"replaceText",range:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,replacedRange:c,newTextLength:t.length})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to replace text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},E={name:"docx_delete_text",description:`Delete text in a range.
13
- Specify start and end positions to define the range to delete.`,inputSchema:{type:"object",properties:{documentId:u,range:T},required:["documentId","range"]},handler:async(r,s)=>{let{documentId:e,range:c}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let n=a(t.document,{type:"deleteText",range:c});return t.document=n,t.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,deletedRange:c})}]}}catch(n){return {isError:true,content:[{type:"text",text:`Failed to delete text: ${n.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},O={name:"docx_format_text",description:`Apply formatting to text in a range.
14
- Supports bold, italic, underline, font size, font family, color, and highlight.`,inputSchema:{type:"object",properties:{documentId:u,range:T,formatting:{type:"object",description:"Formatting options to apply",properties:{bold:{type:"boolean"},italic:{type:"boolean"},underline:{type:"boolean"},strikethrough:{type:"boolean"},fontSize:{type:"number",description:"Font size in points"},fontFamily:{type:"string"},color:{type:"string",description:'Hex color (e.g., "#FF0000")'},highlight:{type:"string",description:"Highlight color name"}}}},required:["documentId","range","formatting"]},handler:async(r,s)=>{let{documentId:e,range:c,formatting:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"formatText",range:c,formatting:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,range:c,appliedFormatting:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to format text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"medium"}},P={name:"docx_apply_style",description:`Apply a named style to a paragraph.
15
- Use document styles like "Heading1", "Heading2", "Normal", etc.`,inputSchema:{type:"object",properties:{documentId:u,paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},styleId:{type:"string",description:'Style ID (e.g., "Heading1", "Normal")'}},required:["documentId","paragraphIndex","styleId"]},handler:async(r,s)=>{let{documentId:e,paragraphIndex:c,styleId:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"applyStyle",paragraphIndex:c,styleId:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,paragraphIndex:c,styleId:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to apply style: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}};function _(r){let s=[];for(let e of r.content)e.type==="run"?s.push(q(e)):e.type==="hyperlink"&&s.push(A(e));return s.join("")}function q(r){return r.content.filter(s=>s.type==="text").map(s=>s.text).join("")}function A(r){let s=[];for(let e of r.children)e.type==="run"&&s.push(q(e));return s.join("")}var y=[C,R,k,$,v,J,j,E,O,P];function M(r={}){let{name:s="docx-editor",version:e="0.1.0",includeCoreTools:c=true,debug:t=false,additionalTools:n=[]}=r,o=new Map,a={id:`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,documents:new Map,data:new Map};if(c)for(let i of y)o.set(i.name,i),t&&console.log(`[MCP] Registered core tool: ${i.name}`);let d=b.getMcpTools();for(let i of d)o.has(i.name)&&console.warn(`[MCP] Tool '${i.name}' from plugin overrides existing tool`),o.set(i.name,i),t&&console.log(`[MCP] Registered plugin tool: ${i.name}`);for(let i of n)o.set(i.name,i),t&&console.log(`[MCP] Registered additional tool: ${i.name}`);let p=t?(i,f)=>{console.log(`[MCP] ${i}`,f??"");}:()=>{};async function l(i,f){let b=o.get(i);if(!b)throw new Error(`Unknown tool: ${i}`);p(`Calling tool: ${i}`,f);let N={session:a,log:p};try{let g=await b.handler(f,N);return p(`Tool ${i} completed`,g),g}catch(g){throw p(`Tool ${i} failed`,g),g}}function x(){return Array.from(o.values()).map(i=>({name:i.name,description:i.description,inputSchema:z(i.inputSchema),category:i.annotations?.category}))}function L(){return {name:s,version:e,toolCount:o.size}}return {tools:o,session:a,handleToolCall:l,listTools:x,getInfo:L}}async function F(r,s){let{id:e,method:c,params:t}=s;try{switch(c){case "initialize":return {jsonrpc:"2.0",id:e,result:{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:r.getInfo()}};case "tools/list":{let n=r.listTools();return {jsonrpc:"2.0",id:e,result:{tools:n.map(o=>({name:o.name,description:o.description,inputSchema:o.inputSchema}))}}}case "tools/call":{let{name:n,arguments:o}=t,a=await r.handleToolCall(n,o);return {jsonrpc:"2.0",id:e,result:a}}default:return {jsonrpc:"2.0",id:e,error:{code:-32601,message:`Method not found: ${c}`}}}}catch(n){return {jsonrpc:"2.0",id:e,error:{code:-32e3,message:n.message}}}}async function H(r={}){let s=M(r);r.debug&&(console.error(`[MCP] Server started: ${s.getInfo().name} v${s.getInfo().version}`),console.error(`[MCP] Tools registered: ${s.tools.size}`));let c=(await import('readline')).createInterface({input:process.stdin,output:process.stdout,terminal:false}),t="";c.on("line",async n=>{t+=n;try{let o=JSON.parse(t);t="";let a=await F(s,o);process.stdout.write(JSON.stringify(a)+`
16
- `);}catch{}}),c.on("close",()=>{r.debug&&console.error("[MCP] Server closed"),process.exit(0);});}function z(r){return typeof r=="object"&&r!==null&&("type"in r||"properties"in r)?r:{type:"object",properties:{}}}export{P as applyStyleTool,k as closeDocumentTool,y as coreMcpTools,M as createMcpServer,M as default,E as deleteTextTool,O as formatTextTool,$ as getDocumentInfoTool,v as getDocumentTextTool,F as handleJsonRpcRequest,J as insertTextTool,C as loadDocumentTool,j as replaceTextTool,R as saveDocumentTool,H as startStdioServer};
11
+ Position is specified by paragraph index (0-indexed) and character offset.`,inputSchema:{type:"object",properties:{documentId:u,position:h,text:{type:"string",description:"Text to insert"}},required:["documentId","position","text"]},handler:async(r,s)=>{let{documentId:e,position:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"insertText",position:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,insertedLength:t.length,position:c})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to insert text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},v={name:"docx_replace_text",description:`Replace text in a range with new text.
12
+ Specify start and end positions to define the range to replace.`,inputSchema:{type:"object",properties:{documentId:u,range:T,text:{type:"string",description:"Replacement text"}},required:["documentId","range","text"]},handler:async(r,s)=>{let{documentId:e,range:c,text:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"replaceText",range:c,text:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,replacedRange:c,newTextLength:t.length})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to replace text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},j={name:"docx_delete_text",description:`Delete text in a range.
13
+ Specify start and end positions to define the range to delete.`,inputSchema:{type:"object",properties:{documentId:u,range:T},required:["documentId","range"]},handler:async(r,s)=>{let{documentId:e,range:c}=r,t=s.session.documents.get(e);if(!t)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let n=a(t.document,{type:"deleteText",range:c});return t.document=n,t.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,deletedRange:c})}]}}catch(n){return {isError:true,content:[{type:"text",text:`Failed to delete text: ${n.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}},E={name:"docx_format_text",description:`Apply formatting to text in a range.
14
+ Supports bold, italic, underline, font size, font family, color, and highlight.`,inputSchema:{type:"object",properties:{documentId:u,range:T,formatting:{type:"object",description:"Formatting options to apply",properties:{bold:{type:"boolean"},italic:{type:"boolean"},underline:{type:"boolean"},strikethrough:{type:"boolean"},fontSize:{type:"number",description:"Font size in points"},fontFamily:{type:"string"},color:{type:"string",description:'Hex color (e.g., "#FF0000")'},highlight:{type:"string",description:"Highlight color name"}}}},required:["documentId","range","formatting"]},handler:async(r,s)=>{let{documentId:e,range:c,formatting:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"formatText",range:c,formatting:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,range:c,appliedFormatting:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to format text: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"medium"}},O={name:"docx_apply_style",description:`Apply a named style to a paragraph.
15
+ Use document styles like "Heading1", "Heading2", "Normal", etc.`,inputSchema:{type:"object",properties:{documentId:u,paragraphIndex:{type:"number",description:"Index of the paragraph (0-indexed)",minimum:0},styleId:{type:"string",description:'Style ID (e.g., "Heading1", "Normal")'}},required:["documentId","paragraphIndex","styleId"]},handler:async(r,s)=>{let{documentId:e,paragraphIndex:c,styleId:t}=r,n=s.session.documents.get(e);if(!n)return {isError:true,content:[{type:"text",text:`Document not found: ${e}`}]};try{let o=a(n.document,{type:"applyStyle",paragraphIndex:c,styleId:t});return n.document=o,n.lastModified=Date.now(),{content:[{type:"text",text:JSON.stringify({success:!0,paragraphIndex:c,styleId:t})}]}}catch(o){return {isError:true,content:[{type:"text",text:`Failed to apply style: ${o.message}`}]}}},annotations:{category:"core",readOnly:false,complexity:"low"}};function P(r){let s=[];for(let e of r.content)e.type==="run"?s.push(_(e)):e.type==="hyperlink"&&s.push(A(e));return s.join("")}function _(r){return r.content.filter(s=>s.type==="text").map(s=>s.text).join("")}function A(r){let s=[];for(let e of r.children)e.type==="run"&&s.push(_(e));return s.join("")}var y=[D,C,R,k,$,J,v,j,E,O];function q(r={}){let{name:s="docx-editor",version:e="0.1.0",includeCoreTools:c=true,debug:t=false,additionalTools:n=[]}=r,o=new Map,a={id:`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,documents:new Map,data:new Map};if(c)for(let i of y)o.set(i.name,i),t&&console.log(`[MCP] Registered core tool: ${i.name}`);let d=b.getMcpTools();for(let i of d)o.has(i.name)&&console.warn(`[MCP] Tool '${i.name}' from plugin overrides existing tool`),o.set(i.name,i),t&&console.log(`[MCP] Registered plugin tool: ${i.name}`);for(let i of n)o.set(i.name,i),t&&console.log(`[MCP] Registered additional tool: ${i.name}`);let p=t?(i,f)=>{console.log(`[MCP] ${i}`,f??"");}:()=>{};async function l(i,f){let M=o.get(i);if(!M)throw new Error(`Unknown tool: ${i}`);p(`Calling tool: ${i}`,f);let N={session:a,log:p};try{let g=await M.handler(f,N);return p(`Tool ${i} completed`,g),g}catch(g){throw p(`Tool ${i} failed`,g),g}}function x(){return Array.from(o.values()).map(i=>({name:i.name,description:i.description,inputSchema:z(i.inputSchema),category:i.annotations?.category}))}function L(){return {name:s,version:e,toolCount:o.size}}return {tools:o,session:a,handleToolCall:l,listTools:x,getInfo:L}}async function F(r,s){let{id:e,method:c,params:t}=s;try{switch(c){case "initialize":return {jsonrpc:"2.0",id:e,result:{protocolVersion:"2024-11-05",capabilities:{tools:{}},serverInfo:r.getInfo()}};case "tools/list":{let n=r.listTools();return {jsonrpc:"2.0",id:e,result:{tools:n.map(o=>({name:o.name,description:o.description,inputSchema:o.inputSchema}))}}}case "tools/call":{let{name:n,arguments:o}=t,a=await r.handleToolCall(n,o);return {jsonrpc:"2.0",id:e,result:a}}default:return {jsonrpc:"2.0",id:e,error:{code:-32601,message:`Method not found: ${c}`}}}}catch(n){return {jsonrpc:"2.0",id:e,error:{code:-32e3,message:n.message}}}}async function H(r={}){let s=q(r);r.debug&&(console.error(`[MCP] Server started: ${s.getInfo().name} v${s.getInfo().version}`),console.error(`[MCP] Tools registered: ${s.tools.size}`));let c=(await import('readline')).createInterface({input:process.stdin,output:process.stdout,terminal:false}),t="";c.on("line",async n=>{t+=n;try{let o=JSON.parse(t);t="";let a=await F(s,o);process.stdout.write(JSON.stringify(a)+`
16
+ `);}catch{}}),c.on("close",()=>{r.debug&&console.error("[MCP] Server closed"),process.exit(0);});}function z(r){return typeof r=="object"&&r!==null&&("type"in r||"properties"in r)?r:{type:"object",properties:{}}}export{O as applyStyleTool,R as closeDocumentTool,y as coreMcpTools,q as createMcpServer,j as deleteTextTool,E as formatTextTool,k as getDocumentInfoTool,$ as getDocumentTextTool,F as handleJsonRpcRequest,J as insertTextTool,D as loadDocumentTool,v as replaceTextTool,C as saveDocumentTool,H as startStdioServer};
@@ -1,4 +1,4 @@
1
- import { C as CorePlugin, P as PluginOptions, a as PluginRegistrationResult, b as CommandHandler, M as McpToolDefinition, c as PluginEventListener } from './types-BnShY2aQ.cjs';
1
+ import { C as CorePlugin, P as PluginOptions, a as PluginRegistrationResult, b as CommandHandler, M as McpToolDefinition, c as PluginEventListener } from './types-BALm1KBi.cjs';
2
2
 
3
3
  /**
4
4
  * Plugin Registry
@@ -1,4 +1,4 @@
1
- import { C as CorePlugin, P as PluginOptions, a as PluginRegistrationResult, b as CommandHandler, M as McpToolDefinition, c as PluginEventListener } from './types-BnShY2aQ.js';
1
+ import { C as CorePlugin, P as PluginOptions, a as PluginRegistrationResult, b as CommandHandler, M as McpToolDefinition, c as PluginEventListener } from './types-BALm1KBi.js';
2
2
 
3
3
  /**
4
4
  * Plugin Registry
@@ -0,0 +1 @@
1
+ 'use strict';var chunkY37VT37I_cjs=require('./chunk-Y37VT37I.cjs');require('./chunk-RTESADL3.cjs');Object.defineProperty(exports,"getCaretPosition",{enumerable:true,get:function(){return chunkY37VT37I_cjs.j}});Object.defineProperty(exports,"groupRectsByPage",{enumerable:true,get:function(){return chunkY37VT37I_cjs.l}});Object.defineProperty(exports,"isMultiPageSelection",{enumerable:true,get:function(){return chunkY37VT37I_cjs.k}});Object.defineProperty(exports,"selectionToRects",{enumerable:true,get:function(){return chunkY37VT37I_cjs.i}});
@@ -0,0 +1 @@
1
+ export{j as getCaretPosition,l as groupRectsByPage,k as isMultiPageSelection,i as selectionToRects}from'./chunk-S6FZ7HL6.js';import'./chunk-3IYNTJO5.js';
package/dist/styles.css CHANGED
@@ -1 +1 @@
1
- .ep-root .\!visible{visibility:visible!important}.ep-root .visible{visibility:visible}.ep-root .invisible{visibility:hidden}.ep-root .collapse{visibility:collapse}.ep-root .static{position:static}.ep-root .fixed{position:fixed}.ep-root .absolute{position:absolute}.ep-root .relative{position:relative}.ep-root .sticky{position:sticky}.ep-root .left-1{left:.25rem}.ep-root .left-1\/2{left:50%}.ep-root .top-0{top:0}.ep-root .top-full{top:100%}.ep-root .z-50{z-index:50}.ep-root .mx-1\.5{margin-left:.375rem;margin-right:.375rem}.ep-root .-ml-1{margin-left:-.25rem}.ep-root .mt-1{margin-top:.25rem}.ep-root .\!block{display:block!important}.ep-root .block{display:block}.ep-root .inline-block{display:inline-block}.ep-root .inline{display:inline}.ep-root .flex{display:flex}.ep-root .inline-flex{display:inline-flex}.ep-root .\!table{display:table!important}.ep-root .table{display:table}.ep-root .grid{display:grid}.ep-root .inline-grid{display:inline-grid}.ep-root .contents{display:contents}.ep-root .hidden{display:none}.ep-root .h-10{height:2.5rem}.ep-root .h-11{height:2.75rem}.ep-root .h-6{height:1.5rem}.ep-root .h-7{height:1.75rem}.ep-root .h-8{height:2rem}.ep-root .h-9{height:2.25rem}.ep-root .max-h-60{max-height:15rem}.ep-root .max-h-\[300px\]{max-height:300px}.ep-root .min-h-\[44px\]{min-height:44px}.ep-root .w-10{width:2.5rem}.ep-root .w-7{width:1.75rem}.ep-root .w-8{width:2rem}.ep-root .w-9{width:2.25rem}.ep-root .w-full{width:100%}.ep-root .w-px{width:1px}.ep-root .min-w-\[200px\]{min-width:200px}.ep-root .min-w-\[55px\]{min-width:55px}.ep-root .min-w-\[60px\]{min-width:60px}.ep-root .min-w-\[70px\]{min-width:70px}.ep-root .flex-shrink{flex-shrink:1}.ep-root .flex-shrink-0{flex-shrink:0}.ep-root .shrink{flex-shrink:1}.ep-root .border-collapse{border-collapse:collapse}.ep-root .-translate-x-1\/2{--tw-translate-x:-50%}.ep-root .-translate-x-1\/2,.ep-root .-translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .-translate-y-full{--tw-translate-y:-100%}.ep-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .cursor-not-allowed{cursor:not-allowed}.ep-root .cursor-pointer{cursor:pointer}.ep-root .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.ep-root .resize{resize:both}.ep-root .flex-col{flex-direction:column}.ep-root .flex-wrap{flex-wrap:wrap}.ep-root .items-center{align-items:center}.ep-root .justify-center{justify-content:center}.ep-root .gap-0{gap:0}.ep-root .gap-0\.5{gap:.125rem}.ep-root .gap-1{gap:.25rem}.ep-root .overflow-x-auto{overflow-x:auto}.ep-root .overflow-y-auto{overflow-y:auto}.ep-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-root .whitespace-nowrap{white-space:nowrap}.ep-root .rounded{border-radius:.25rem}.ep-root .rounded-md{border-radius:calc(var(--radius) - 2px)}.ep-root .rounded-none{border-radius:0}.ep-root .rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.ep-root .rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.ep-root .\!border{border-width:1px!important}.ep-root .border{border-width:1px}.ep-root .border-b{border-bottom-width:1px}.ep-root .border-r{border-right-width:1px}.ep-root .border-input{border-color:hsl(var(--input))}.ep-root .border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.ep-root .border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ep-root .border-slate-200\/50{border-color:rgba(226,232,240,.5)}.ep-root .border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .bg-background{background-color:hsl(var(--background))}.ep-root .bg-destructive{background-color:hsl(var(--destructive))}.ep-root .bg-doc-bg{background-color:var(--doc-bg)}.ep-root .bg-primary{background-color:hsl(var(--primary))}.ep-root .bg-secondary{background-color:hsl(var(--secondary))}.ep-root .bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ep-root .bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ep-root .bg-transparent{background-color:transparent}.ep-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.ep-root .px-1{padding-left:.25rem;padding-right:.25rem}.ep-root .px-2{padding-left:.5rem;padding-right:.5rem}.ep-root .px-3{padding-left:.75rem;padding-right:.75rem}.ep-root .px-4{padding-left:1rem;padding-right:1rem}.ep-root .px-5{padding-left:1.25rem;padding-right:1.25rem}.ep-root .px-8{padding-left:2rem;padding-right:2rem}.ep-root .py-1{padding-top:.25rem;padding-bottom:.25rem}.ep-root .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.ep-root .py-2{padding-top:.5rem;padding-bottom:.5rem}.ep-root .text-left{text-align:left}.ep-root .text-center{text-align:center}.ep-root .text-sm{font-size:.875rem;line-height:1.25rem}.ep-root .text-xs{font-size:.75rem;line-height:1rem}.ep-root .font-medium{font-weight:500}.ep-root .uppercase{text-transform:uppercase}.ep-root .lowercase{text-transform:lowercase}.ep-root .capitalize{text-transform:capitalize}.ep-root .italic{font-style:italic}.ep-root .ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.ep-root .text-destructive-foreground{color:hsl(var(--destructive-foreground))}.ep-root .text-primary{color:hsl(var(--primary))}.ep-root .text-primary-foreground{color:hsl(var(--primary-foreground))}.ep-root .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ep-root .text-secondary-foreground{color:hsl(var(--secondary-foreground))}.ep-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ep-root .text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ep-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .underline{text-decoration-line:underline}.ep-root .line-through{text-decoration-line:line-through}.ep-root .underline-offset-4{text-underline-offset:4px}.ep-root .opacity-30{opacity:.3}.ep-root .opacity-50{opacity:.5}.ep-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.ep-root .shadow,.ep-root .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.ep-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .\!outline{outline-style:solid!important}.ep-root .outline{outline-style:solid}.ep-root .ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ep-root .blur{--tw-blur:blur(8px)}.ep-root .blur,.ep-root .drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ep-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.ep-root .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ep-root .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .duration-150{transition-duration:.15s}.ep-root .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.ep-root .animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.ep-root .fade-in-0{--tw-enter-opacity:0}.ep-root .zoom-in{--tw-enter-scale:0}.ep-root .zoom-in-95{--tw-enter-scale:.95}.ep-root .zoom-out{--tw-exit-scale:0}.ep-root .duration-150{animation-duration:.15s}.ep-root .ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.ep-root .running{animation-play-state:running}.ep-root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:221.2 83.2% 53.3%;--radius:0.5rem;--doc-bg:#f8f9fa;--doc-primary:#1a73e8;--doc-primary-hover:#1557b0;--doc-primary-light:#e8f0fe;--doc-text:#202124;--doc-text-muted:#5f6368;--doc-text-subtle:#9aa0a6;--doc-text-placeholder:#999;--doc-border:#e0e0e0;--doc-border-light:#dadce0;--doc-border-dark:#d0d0d0;--doc-border-input:#ccc;--doc-bg-subtle:#f5f5f5;--doc-bg-hover:#f1f3f4;--doc-bg-input:#f8f9fa;--doc-error:#c5221f;--doc-error-bg:#fce8e6;--doc-success:#34a853;--doc-success-bg:#e8f5e9;--doc-warning:#f9a825;--doc-warning-bg:#fff8e1;--doc-link:#0563c1}[contenteditable=true]{caret-color:#000;outline:none;caret-shape:bar}.docx-run-editable[contenteditable=true]{caret-color:#000;min-height:1em;display:inline}.docx-paragraph-empty [contenteditable=true]{min-height:1em;min-width:1px;display:inline-block}.docx-paragraph-editable{cursor:text}.docx-run-editable[contenteditable=true]:focus{outline:none}.docx-paragraph-editable:focus-within{outline:none}.docx-run ::selection,.docx-run-editable ::selection,.docx-run-editable::selection,.docx-run::selection,[contenteditable=true] ::selection,[contenteditable=true]::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run ::-moz-selection,.docx-run-editable ::-moz-selection,.docx-run-editable::-moz-selection,.docx-run::-moz-selection,[contenteditable=true] ::-moz-selection,[contenteditable=true]::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::selection,.docx-paragraph-editable ::selection,.docx-paragraph-editable::selection,.docx-paragraph::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::-moz-selection,.docx-paragraph-editable ::-moz-selection,.docx-paragraph-editable::-moz-selection,.docx-paragraph::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::selection,.docx-hyperlink::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::-moz-selection,.docx-hyperlink::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-highlighted ::selection,.docx-run-highlighted::selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-highlighted ::-moz-selection,.docx-run-highlighted::-moz-selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-dark-bg ::selection,.docx-run-dark-bg::selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-dark-bg ::-moz-selection,.docx-run-dark-bg::-moz-selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-bold ::selection,.docx-run-bold::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-bold ::-moz-selection,.docx-run-bold::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::selection,.docx-run-italic::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::-moz-selection,.docx-run-italic::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-find-highlight{background-color:rgba(255,235,59,.5)!important;border-radius:2px}.docx-find-highlight-current{background-color:rgba(255,152,0,.6)!important;border-radius:2px;outline:2px solid rgba(255,152,0,.8)}.docx-ai-selection-preview{background-color:rgba(156,39,176,.2);border-bottom:2px dashed rgba(156,39,176,.6)}.docx-selection-overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:hidden}.docx-selection-overlay-rect{position:absolute;background-color:rgba(26,115,232,.3);pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;mix-blend-mode:multiply}.docx-run-highlighted[contenteditable=true]{caret-color:#333}.docx-run-dark-bg[contenteditable=true]{caret-color:#fff}.docx-editor{cursor:default}.docx-editor-page{cursor:text}.docx-bookmark-end,.docx-bookmark-start,.docx-drawing-placeholder,.docx-field,.docx-list-marker,.docx-shape-placeholder{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-has-variable [contenteditable=false]{cursor:default;-webkit-user-select:all;-moz-user-select:all;user-select:all}.layout-table-cell-selected{outline:2px solid rgba(66,133,244,.6);outline-offset:-2px;background-color:rgba(66,133,244,.12)!important}.layout-table-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-resize-handle.dragging,.layout-table-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-bottom,.layout-table-row-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-bottom.dragging,.layout-table-edge-handle-bottom:hover,.layout-table-row-resize-handle.dragging,.layout-table-row-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-right{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-right.dragging,.layout-table-edge-handle-right:hover{background-color:rgba(66,133,244,.6)}.ep-root .last\:border-r-0:last-child{border-right-width:0}.ep-root .hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .hover\:bg-accent:hover{background-color:hsl(var(--accent))}.ep-root .hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.ep-root .hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.ep-root .hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.ep-root .hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-100\/80:hover{background-color:rgba(241,245,249,.8)}.ep-root .hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ep-root .hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.ep-root .hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ep-root .hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .hover\:underline:hover{text-decoration-line:underline}.ep-root .focus\:bg-slate-100\/80:focus{background-color:rgba(241,245,249,.8)}.ep-root .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.ep-root .focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus\:ring-slate-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ep-root .focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.ep-root .focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.ep-root .focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.ep-root .disabled\:pointer-events-none:disabled{pointer-events:none}.ep-root .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.ep-root .disabled\:opacity-50:disabled{opacity:.5}
1
+ .ep-root .\!visible{visibility:visible!important}.ep-root .visible{visibility:visible}.ep-root .invisible{visibility:hidden}.ep-root .collapse{visibility:collapse}.ep-root .static{position:static}.ep-root .fixed{position:fixed}.ep-root .absolute{position:absolute}.ep-root .relative{position:relative}.ep-root .sticky{position:sticky}.ep-root .left-1{left:.25rem}.ep-root .left-1\/2{left:50%}.ep-root .right-2{right:.5rem}.ep-root .top-0{top:0}.ep-root .top-full{top:100%}.ep-root .z-50{z-index:50}.ep-root .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.ep-root .mx-1\.5{margin-left:.375rem;margin-right:.375rem}.ep-root .my-1{margin-top:.25rem;margin-bottom:.25rem}.ep-root .-ml-1{margin-left:-.25rem}.ep-root .mt-1{margin-top:.25rem}.ep-root .\!block{display:block!important}.ep-root .block{display:block}.ep-root .inline-block{display:inline-block}.ep-root .inline{display:inline}.ep-root .flex{display:flex}.ep-root .inline-flex{display:inline-flex}.ep-root .\!table{display:table!important}.ep-root .table{display:table}.ep-root .grid{display:grid}.ep-root .inline-grid{display:inline-grid}.ep-root .contents{display:contents}.ep-root .hidden{display:none}.ep-root .h-10{height:2.5rem}.ep-root .h-11{height:2.75rem}.ep-root .h-3\.5{height:.875rem}.ep-root .h-4{height:1rem}.ep-root .h-5{height:1.25rem}.ep-root .h-6{height:1.5rem}.ep-root .h-7{height:1.75rem}.ep-root .h-8{height:2rem}.ep-root .h-9{height:2.25rem}.ep-root .h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.ep-root .h-px{height:1px}.ep-root .max-h-60{max-height:15rem}.ep-root .max-h-72{max-height:18rem}.ep-root .max-h-\[300px\]{max-height:300px}.ep-root .max-h-\[400px\]{max-height:400px}.ep-root .min-h-\[44px\]{min-height:44px}.ep-root .w-10{width:2.5rem}.ep-root .w-3\.5{width:.875rem}.ep-root .w-4{width:1rem}.ep-root .w-5{width:1.25rem}.ep-root .w-7{width:1.75rem}.ep-root .w-8{width:2rem}.ep-root .w-9{width:2.25rem}.ep-root .w-full{width:100%}.ep-root .w-px{width:1px}.ep-root .min-w-\[260px\]{min-width:260px}.ep-root .min-w-\[55px\]{min-width:55px}.ep-root .min-w-\[60px\]{min-width:60px}.ep-root .min-w-\[70px\]{min-width:70px}.ep-root .min-w-\[8rem\]{min-width:8rem}.ep-root .min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.ep-root .flex-shrink{flex-shrink:1}.ep-root .flex-shrink-0{flex-shrink:0}.ep-root .shrink{flex-shrink:1}.ep-root .shrink-0{flex-shrink:0}.ep-root .border-collapse{border-collapse:collapse}.ep-root .-translate-x-1\/2{--tw-translate-x:-50%}.ep-root .-translate-x-1\/2,.ep-root .-translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .-translate-y-full{--tw-translate-y:-100%}.ep-root .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .cursor-not-allowed{cursor:not-allowed}.ep-root .cursor-pointer{cursor:pointer}.ep-root .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ep-root .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.ep-root .resize{resize:both}.ep-root .flex-col{flex-direction:column}.ep-root .flex-wrap{flex-wrap:wrap}.ep-root .items-center{align-items:center}.ep-root .justify-center{justify-content:center}.ep-root .justify-between{justify-content:space-between}.ep-root .gap-0{gap:0}.ep-root .gap-0\.5{gap:.125rem}.ep-root .gap-1{gap:.25rem}.ep-root .overflow-hidden{overflow:hidden}.ep-root .overflow-x-auto{overflow-x:auto}.ep-root .overflow-y-auto{overflow-y:auto}.ep-root .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-root .whitespace-nowrap{white-space:nowrap}.ep-root .rounded{border-radius:.25rem}.ep-root .rounded-lg{border-radius:var(--radius)}.ep-root .rounded-md{border-radius:calc(var(--radius) - 2px)}.ep-root .rounded-none{border-radius:0}.ep-root .rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.ep-root .rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.ep-root .\!border{border-width:1px!important}.ep-root .border{border-width:1px}.ep-root .border-b{border-bottom-width:1px}.ep-root .border-r{border-right-width:1px}.ep-root .border-input{border-color:hsl(var(--input))}.ep-root .border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity,1))}.ep-root .border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.ep-root .border-slate-200\/50{border-color:rgba(226,232,240,.5)}.ep-root .border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .bg-background{background-color:hsl(var(--background))}.ep-root .bg-destructive{background-color:hsl(var(--destructive))}.ep-root .bg-doc-bg{background-color:var(--doc-bg)}.ep-root .bg-primary{background-color:hsl(var(--primary))}.ep-root .bg-secondary{background-color:hsl(var(--secondary))}.ep-root .bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .bg-slate-200{--tw-bg-opacity:1;background-color:rgb(226 232 240/var(--tw-bg-opacity,1))}.ep-root .bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.ep-root .bg-transparent{background-color:transparent}.ep-root .bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.ep-root .\!p-0\.5{padding:.125rem!important}.ep-root .p-1{padding:.25rem}.ep-root .px-1{padding-left:.25rem;padding-right:.25rem}.ep-root .px-2{padding-left:.5rem;padding-right:.5rem}.ep-root .px-3{padding-left:.75rem;padding-right:.75rem}.ep-root .px-4{padding-left:1rem;padding-right:1rem}.ep-root .px-5{padding-left:1.25rem;padding-right:1.25rem}.ep-root .px-8{padding-left:2rem;padding-right:2rem}.ep-root .py-1{padding-top:.25rem;padding-bottom:.25rem}.ep-root .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.ep-root .py-2{padding-top:.5rem;padding-bottom:.5rem}.ep-root .py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.ep-root .text-left{text-align:left}.ep-root .text-center{text-align:center}.ep-root .text-sm{font-size:.875rem;line-height:1.25rem}.ep-root .text-xs{font-size:.75rem;line-height:1rem}.ep-root .font-medium{font-weight:500}.ep-root .uppercase{text-transform:uppercase}.ep-root .lowercase{text-transform:lowercase}.ep-root .capitalize{text-transform:capitalize}.ep-root .italic{font-style:italic}.ep-root .ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.ep-root .text-destructive-foreground{color:hsl(var(--destructive-foreground))}.ep-root .text-primary{color:hsl(var(--primary))}.ep-root .text-primary-foreground{color:hsl(var(--primary-foreground))}.ep-root .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.ep-root .text-secondary-foreground{color:hsl(var(--secondary-foreground))}.ep-root .text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.ep-root .text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.ep-root .text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.ep-root .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .underline{text-decoration-line:underline}.ep-root .line-through{text-decoration-line:line-through}.ep-root .underline-offset-4{text-underline-offset:4px}.ep-root .opacity-30{opacity:.3}.ep-root .opacity-50{opacity:.5}.ep-root .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.ep-root .shadow,.ep-root .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.ep-root .shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ep-root .outline-none{outline:2px solid transparent;outline-offset:2px}.ep-root .\!outline{outline-style:solid!important}.ep-root .outline{outline-style:solid}.ep-root .ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.ep-root .blur{--tw-blur:blur(8px)}.ep-root .blur,.ep-root .drop-shadow{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ep-root .drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px rgba(0,0,0,.1)) drop-shadow(0 1px 1px rgba(0,0,0,.06))}.ep-root .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.ep-root .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ep-root .duration-150{transition-duration:.15s}.ep-root .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.ep-root .animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.ep-root .fade-in-0{--tw-enter-opacity:0}.ep-root .zoom-in{--tw-enter-scale:0}.ep-root .zoom-in-95{--tw-enter-scale:.95}.ep-root .zoom-out{--tw-exit-scale:0}.ep-root .duration-150{animation-duration:.15s}.ep-root .ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ep-root .ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.ep-root .running{animation-play-state:running}.ep-root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:221.2 83.2% 53.3%;--primary-foreground:210 40% 98%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:221.2 83.2% 53.3%;--radius:0.5rem;--doc-bg:#f8f9fa;--doc-primary:#1a73e8;--doc-primary-hover:#1557b0;--doc-primary-light:#e8f0fe;--doc-text:#202124;--doc-text-muted:#5f6368;--doc-text-subtle:#9aa0a6;--doc-text-placeholder:#999;--doc-border:#e0e0e0;--doc-border-light:#dadce0;--doc-border-dark:#d0d0d0;--doc-border-input:#ccc;--doc-bg-subtle:#f5f5f5;--doc-bg-hover:#f1f3f4;--doc-bg-input:#f8f9fa;--doc-error:#c5221f;--doc-error-bg:#fce8e6;--doc-success:#34a853;--doc-success-bg:#e8f5e9;--doc-warning:#f9a825;--doc-warning-bg:#fff8e1;--doc-link:#0563c1}[contenteditable=true]{caret-color:#000;outline:none;caret-shape:bar}.docx-run-editable[contenteditable=true]{caret-color:#000;min-height:1em;display:inline}.docx-paragraph-empty [contenteditable=true]{min-height:1em;min-width:1px;display:inline-block}.docx-paragraph-editable{cursor:text}.docx-run-editable[contenteditable=true]:focus{outline:none}.docx-paragraph-editable:focus-within{outline:none}.docx-run ::selection,.docx-run-editable ::selection,.docx-run-editable::selection,.docx-run::selection,[contenteditable=true] ::selection,[contenteditable=true]::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run ::-moz-selection,.docx-run-editable ::-moz-selection,.docx-run-editable::-moz-selection,.docx-run::-moz-selection,[contenteditable=true] ::-moz-selection,[contenteditable=true]::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::selection,.docx-paragraph-editable ::selection,.docx-paragraph-editable::selection,.docx-paragraph::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-paragraph ::-moz-selection,.docx-paragraph-editable ::-moz-selection,.docx-paragraph-editable::-moz-selection,.docx-paragraph::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::selection,.docx-hyperlink::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-hyperlink ::-moz-selection,.docx-hyperlink::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-highlighted ::selection,.docx-run-highlighted::selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-highlighted ::-moz-selection,.docx-run-highlighted::-moz-selection{background-color:rgba(26,115,232,.5)!important;color:inherit!important}.docx-run-dark-bg ::selection,.docx-run-dark-bg::selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-dark-bg ::-moz-selection,.docx-run-dark-bg::-moz-selection{background-color:rgba(100,181,246,.5)!important;color:inherit!important}.docx-run-bold ::selection,.docx-run-bold::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-bold ::-moz-selection,.docx-run-bold::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::selection,.docx-run-italic::selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-run-italic ::-moz-selection,.docx-run-italic::-moz-selection{background-color:rgba(26,115,232,.3)!important;color:inherit!important}.docx-find-highlight{background-color:rgba(255,235,59,.5)!important;border-radius:2px}.docx-find-highlight-current{background-color:rgba(255,152,0,.6)!important;border-radius:2px;outline:2px solid rgba(255,152,0,.8)}.docx-ai-selection-preview{background-color:rgba(156,39,176,.2);border-bottom:2px dashed rgba(156,39,176,.6)}.docx-selection-overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:hidden}.docx-selection-overlay-rect{position:absolute;background-color:rgba(66,133,244,.25);pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-highlighted[contenteditable=true]{caret-color:#333}.docx-run-dark-bg[contenteditable=true]{caret-color:#fff}.docx-editor{cursor:default}.docx-editor-page{cursor:text}.docx-bookmark-end,.docx-bookmark-start,.docx-drawing-placeholder,.docx-field,.docx-list-marker,.docx-shape-placeholder{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.docx-run-has-variable [contenteditable=false]{cursor:default;-webkit-user-select:all;-moz-user-select:all;user-select:all}.layout-table-cell-selected{position:relative;outline:2px solid rgba(66,133,244,.6);outline-offset:-2px}.layout-table-cell-selected:after{content:"";position:absolute;inset:0;background-color:rgba(66,133,244,.15);pointer-events:none}.layout-table-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-resize-handle.dragging,.layout-table-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-bottom,.layout-table-row-resize-handle{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-bottom.dragging,.layout-table-edge-handle-bottom:hover,.layout-table-row-resize-handle.dragging,.layout-table-row-resize-handle:hover{background-color:rgba(66,133,244,.6)}.layout-table-edge-handle-right{background-color:transparent;transition:background-color .15s}.layout-table-edge-handle-right.dragging,.layout-table-edge-handle-right:hover{background-color:rgba(66,133,244,.6)}.docx-outline-heading-btn:hover{background-color:#f1f3f4}@media (max-width:1280px){.docx-outline-nav{display:none!important}}.layout-page-content{cursor:text}.layout-page-footer,.layout-page-header{cursor:pointer;transition:background-color .15s ease}.layout-page-footer:hover,.layout-page-header:hover{background-color:rgba(37,99,235,.06)}.layout-page-header:empty:hover:after{content:"Double-click to add header";display:block;text-align:center;color:#9ca3af;font-size:11px;padding:4px 0}.layout-page-footer:empty:hover:after{content:"Double-click to add footer";display:block;text-align:center;color:#9ca3af;font-size:11px;padding:4px 0}.hf-editor-pm .ProseMirror{outline:none;min-height:40px;padding:4px}.hf-editor-pm .ProseMirror:focus{outline:none}.hf-editor-pm .ProseMirror p{display:block;margin:0;padding:0;min-height:1em;white-space:pre-wrap;word-wrap:break-word;line-height:normal}.paged-editor--hf-editing .layout-page-content{opacity:.4;pointer-events:none;transition:opacity .15s ease}.paged-editor--editing-header .layout-page-header{border-bottom:1px dotted #4285f4}.paged-editor--editing-footer .layout-page-footer{border-top:1px dotted #4285f4}.paged-editor--editing-footer .layout-page-footer>*,.paged-editor--editing-header .layout-page-header>*{visibility:hidden}.paged-editor--hf-editing .layout-page-footer:hover,.paged-editor--hf-editing .layout-page-header:hover{background-color:transparent}.docx-section-break{position:relative}.docx-section-break:after{content:"Section Break (" attr(data-section-break) ")";display:block;text-align:center;font-size:9px;color:var(--doc-text-muted,#9ca3af);border-top:1px dashed var(--doc-border,#d1d5db);margin-top:4px;padding-top:2px;pointer-events:none}.ep-root .last\:border-r-0:last-child{border-right-width:0}.ep-root .hover\:border-slate-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.ep-root .hover\:bg-accent:hover{background-color:hsl(var(--accent))}.ep-root .hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.ep-root .hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.ep-root .hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.ep-root .hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-100\/80:hover{background-color:rgba(241,245,249,.8)}.ep-root .hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.ep-root .hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.ep-root .hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.ep-root .hover\:text-slate-900:hover{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.ep-root .hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.ep-root .hover\:underline:hover{text-decoration-line:underline}.ep-root .focus\:bg-slate-100:focus{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.ep-root .focus\:bg-slate-100\/80:focus{background-color:rgba(241,245,249,.8)}.ep-root .focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.ep-root .focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus\:ring-slate-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(148 163 184/var(--tw-ring-opacity,1))}.ep-root .focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.ep-root .focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ep-root .focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.ep-root .focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.ep-root .disabled\:pointer-events-none:disabled{pointer-events:none}.ep-root .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.ep-root .disabled\:opacity-50:disabled{opacity:.5}.ep-root .data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.ep-root .data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.ep-root .data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.ep-root .data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.ep-root .data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.ep-root .data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.ep-root .data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.ep-root .data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.ep-root .data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.ep-root .data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.ep-root .data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.ep-root .data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.ep-root .data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.ep-root .data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.ep-root :is(.\[\&\>span\]\:truncate>span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@@ -224,6 +224,8 @@ interface ParagraphFormatting {
224
224
  widowControl?: boolean;
225
225
  /** Page break before (w:pageBreakBefore) */
226
226
  pageBreakBefore?: boolean;
227
+ /** Contextual spacing — suppress space between paragraphs of the same style (w:contextualSpacing) */
228
+ contextualSpacing?: boolean;
227
229
  /** Numbering properties (w:numPr) */
228
230
  numPr?: {
229
231
  /** Numbering definition ID (w:numId) */
@@ -2388,4 +2390,4 @@ interface PluginRegistrationResult {
2388
2390
  warnings?: string[];
2389
2391
  }
2390
2392
 
2391
- export { type RunContent as $, type AIAction as A, type BlockContent as B, type CorePlugin as C, type DocumentBody as D, type Endnote as E, type Footnote as F, type McpToolContent as G, type Hyperlink as H, type Image as I, type JsonSchema as J, type McpToolContext as K, type ListLevel as L, type McpToolDefinition as M, type McpToolHandler as N, type McpToolResult as O, type PluginOptions as P, type NumberingDefinitions as Q, type Run as R, type ParagraphContext as S, type TextFormatting as T, type ParagraphFormatting as U, type ParagraphOutline as V, type PluginCommand as W, type PluginEvent as X, type Range as Y, type Relationship as Z, type ReplaceTextCommand as _, type PluginRegistrationResult as a, type SectionInfo as a0, type SectionProperties as a1, type SelectionContext as a2, type SetVariableCommand as a3, type Style as a4, type StyleDefinitions as a5, type StyleInfo as a6, type SuggestedAction as a7, type TableCell as a8, type TableRow as a9, type Shape as aA, type TextBox as aB, type ThemeColorScheme as aC, type ThemeFont as aD, type ThemeFontScheme as aE, type ExtractCommand as aF, type McpToolExample as aG, type TypedCommandHandler as aH, type TextContent as aa, type Theme as ab, type ZodSchemaLike as ac, comparePositions as ad, createCollapsedRange as ae, createCommand as af, createRange as ag, getActionDescription as ah, getActionLabel as ai, isPositionInRange as aj, isZodSchema as ak, type ColorValue as al, type ThemeColorSlot as am, type ParagraphAlignment as an, type StyleType as ao, type TabStop as ap, type TabStopAlignment as aq, type BorderSpec as ar, type ShadingProperties as as, type BreakContent as at, type BookmarkEnd as au, type BookmarkStart as av, type Field as aw, type FooterReference as ax, type HeaderFooter as ay, type HeaderReference as az, type CommandHandler as b, type PluginEventListener as c, type McpSession as d, type Paragraph as e, type Table as f, type Position as g, type Document as h, type AIActionRequest as i, type AgentCommand as j, type AgentContext as k, type AgentResponse as l, type ApplyStyleCommand as m, type ApplyVariablesCommand as n, type CommandResult as o, DEFAULT_AI_ACTIONS as p, type DeleteTextCommand as q, type DocxPackage as r, type FormatParagraphCommand as s, type FormatTextCommand as t, type InsertHyperlinkCommand as u, type InsertImageCommand as v, type InsertTableCommand as w, type InsertTextCommand as x, type LoadedDocument as y, type McpToolAnnotations as z };
2393
+ export { type RunContent as $, type AIAction as A, type BlockContent as B, type CorePlugin as C, type DocumentBody as D, type Endnote as E, type Footnote as F, type McpToolContent as G, type Hyperlink as H, type Image as I, type JsonSchema as J, type McpToolContext as K, type ListLevel as L, type McpToolDefinition as M, type McpToolHandler as N, type McpToolResult as O, type PluginOptions as P, type NumberingDefinitions as Q, type Run as R, type ParagraphContext as S, type TextFormatting as T, type ParagraphFormatting as U, type ParagraphOutline as V, type PluginCommand as W, type PluginEvent as X, type Range as Y, type Relationship as Z, type ReplaceTextCommand as _, type PluginRegistrationResult as a, type SectionInfo as a0, type SectionProperties as a1, type SelectionContext as a2, type SetVariableCommand as a3, type Style as a4, type StyleDefinitions as a5, type StyleInfo as a6, type SuggestedAction as a7, type TableCell as a8, type TableRow as a9, type ThemeColorScheme as aA, type ThemeFont as aB, type ThemeFontScheme as aC, type ExtractCommand as aD, type McpToolExample as aE, type TypedCommandHandler as aF, type TextContent as aa, type Theme as ab, type ZodSchemaLike as ac, comparePositions as ad, createCollapsedRange as ae, createCommand as af, createRange as ag, getActionDescription as ah, getActionLabel as ai, isPositionInRange as aj, isZodSchema as ak, type ColorValue as al, type ThemeColorSlot as am, type ParagraphAlignment as an, type StyleType as ao, type TabStop as ap, type ShadingProperties as aq, type BreakContent as ar, type BookmarkEnd as as, type BookmarkStart as at, type Field as au, type FooterReference as av, type HeaderFooter as aw, type HeaderReference as ax, type Shape as ay, type TextBox as az, type CommandHandler as b, type PluginEventListener as c, type McpSession as d, type Paragraph as e, type Table as f, type Position as g, type Document as h, type AIActionRequest as i, type AgentCommand as j, type AgentContext as k, type AgentResponse as l, type ApplyStyleCommand as m, type ApplyVariablesCommand as n, type CommandResult as o, DEFAULT_AI_ACTIONS as p, type DeleteTextCommand as q, type DocxPackage as r, type FormatParagraphCommand as s, type FormatTextCommand as t, type InsertHyperlinkCommand as u, type InsertImageCommand as v, type InsertTableCommand as w, type InsertTextCommand as x, type LoadedDocument as y, type McpToolAnnotations as z };
@@ -224,6 +224,8 @@ interface ParagraphFormatting {
224
224
  widowControl?: boolean;
225
225
  /** Page break before (w:pageBreakBefore) */
226
226
  pageBreakBefore?: boolean;
227
+ /** Contextual spacing — suppress space between paragraphs of the same style (w:contextualSpacing) */
228
+ contextualSpacing?: boolean;
227
229
  /** Numbering properties (w:numPr) */
228
230
  numPr?: {
229
231
  /** Numbering definition ID (w:numId) */
@@ -2388,4 +2390,4 @@ interface PluginRegistrationResult {
2388
2390
  warnings?: string[];
2389
2391
  }
2390
2392
 
2391
- export { type RunContent as $, type AIAction as A, type BlockContent as B, type CorePlugin as C, type DocumentBody as D, type Endnote as E, type Footnote as F, type McpToolContent as G, type Hyperlink as H, type Image as I, type JsonSchema as J, type McpToolContext as K, type ListLevel as L, type McpToolDefinition as M, type McpToolHandler as N, type McpToolResult as O, type PluginOptions as P, type NumberingDefinitions as Q, type Run as R, type ParagraphContext as S, type TextFormatting as T, type ParagraphFormatting as U, type ParagraphOutline as V, type PluginCommand as W, type PluginEvent as X, type Range as Y, type Relationship as Z, type ReplaceTextCommand as _, type PluginRegistrationResult as a, type SectionInfo as a0, type SectionProperties as a1, type SelectionContext as a2, type SetVariableCommand as a3, type Style as a4, type StyleDefinitions as a5, type StyleInfo as a6, type SuggestedAction as a7, type TableCell as a8, type TableRow as a9, type Shape as aA, type TextBox as aB, type ThemeColorScheme as aC, type ThemeFont as aD, type ThemeFontScheme as aE, type ExtractCommand as aF, type McpToolExample as aG, type TypedCommandHandler as aH, type TextContent as aa, type Theme as ab, type ZodSchemaLike as ac, comparePositions as ad, createCollapsedRange as ae, createCommand as af, createRange as ag, getActionDescription as ah, getActionLabel as ai, isPositionInRange as aj, isZodSchema as ak, type ColorValue as al, type ThemeColorSlot as am, type ParagraphAlignment as an, type StyleType as ao, type TabStop as ap, type TabStopAlignment as aq, type BorderSpec as ar, type ShadingProperties as as, type BreakContent as at, type BookmarkEnd as au, type BookmarkStart as av, type Field as aw, type FooterReference as ax, type HeaderFooter as ay, type HeaderReference as az, type CommandHandler as b, type PluginEventListener as c, type McpSession as d, type Paragraph as e, type Table as f, type Position as g, type Document as h, type AIActionRequest as i, type AgentCommand as j, type AgentContext as k, type AgentResponse as l, type ApplyStyleCommand as m, type ApplyVariablesCommand as n, type CommandResult as o, DEFAULT_AI_ACTIONS as p, type DeleteTextCommand as q, type DocxPackage as r, type FormatParagraphCommand as s, type FormatTextCommand as t, type InsertHyperlinkCommand as u, type InsertImageCommand as v, type InsertTableCommand as w, type InsertTextCommand as x, type LoadedDocument as y, type McpToolAnnotations as z };
2393
+ export { type RunContent as $, type AIAction as A, type BlockContent as B, type CorePlugin as C, type DocumentBody as D, type Endnote as E, type Footnote as F, type McpToolContent as G, type Hyperlink as H, type Image as I, type JsonSchema as J, type McpToolContext as K, type ListLevel as L, type McpToolDefinition as M, type McpToolHandler as N, type McpToolResult as O, type PluginOptions as P, type NumberingDefinitions as Q, type Run as R, type ParagraphContext as S, type TextFormatting as T, type ParagraphFormatting as U, type ParagraphOutline as V, type PluginCommand as W, type PluginEvent as X, type Range as Y, type Relationship as Z, type ReplaceTextCommand as _, type PluginRegistrationResult as a, type SectionInfo as a0, type SectionProperties as a1, type SelectionContext as a2, type SetVariableCommand as a3, type Style as a4, type StyleDefinitions as a5, type StyleInfo as a6, type SuggestedAction as a7, type TableCell as a8, type TableRow as a9, type ThemeColorScheme as aA, type ThemeFont as aB, type ThemeFontScheme as aC, type ExtractCommand as aD, type McpToolExample as aE, type TypedCommandHandler as aF, type TextContent as aa, type Theme as ab, type ZodSchemaLike as ac, comparePositions as ad, createCollapsedRange as ae, createCommand as af, createRange as ag, getActionDescription as ah, getActionLabel as ai, isPositionInRange as aj, isZodSchema as ak, type ColorValue as al, type ThemeColorSlot as am, type ParagraphAlignment as an, type StyleType as ao, type TabStop as ap, type ShadingProperties as aq, type BreakContent as ar, type BookmarkEnd as as, type BookmarkStart as at, type Field as au, type FooterReference as av, type HeaderFooter as aw, type HeaderReference as ax, type Shape as ay, type TextBox as az, type CommandHandler as b, type PluginEventListener as c, type McpSession as d, type Paragraph as e, type Table as f, type Position as g, type Document as h, type AIActionRequest as i, type AgentCommand as j, type AgentContext as k, type AgentResponse as l, type ApplyStyleCommand as m, type ApplyVariablesCommand as n, type CommandResult as o, DEFAULT_AI_ACTIONS as p, type DeleteTextCommand as q, type DocxPackage as r, type FormatParagraphCommand as s, type FormatTextCommand as t, type InsertHyperlinkCommand as u, type InsertImageCommand as v, type InsertTableCommand as w, type InsertTextCommand as x, type LoadedDocument as y, type McpToolAnnotations as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/docx-js-editor",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "A browser-based DOCX template editor with variable insertion support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -36,10 +36,14 @@
36
36
  "dist"
37
37
  ],
38
38
  "scripts": {
39
- "dev": "vite",
39
+ "dev": "vite --config examples/vite/vite.config.ts",
40
+ "dev:nextjs": "cd examples/nextjs && npm run dev",
41
+ "dev:remix": "cd examples/remix && npm run dev",
42
+ "dev:astro": "cd examples/astro && npm run dev",
43
+ "dev:demo": "bash examples/dev-all.sh",
40
44
  "build": "tsup && bun run build:css",
41
45
  "build:css": "tailwindcss -c ./tailwind.config.lib.js -i ./src/styles/editor.css -o ./dist/styles.css --minify",
42
- "build:demo": "vite build",
46
+ "build:demo": "vite build --config examples/vite/vite.config.ts",
43
47
  "test": "bun test",
44
48
  "test:watch": "bun test --watch",
45
49
  "test:e2e": "npx playwright test",
@@ -67,6 +71,7 @@
67
71
  }
68
72
  },
69
73
  "dependencies": {
74
+ "@radix-ui/react-select": "^2.2.6",
70
75
  "clsx": "^2.1.0",
71
76
  "docxtemplater": "^3.50.0",
72
77
  "jszip": "^3.10.1",
@@ -86,8 +91,8 @@
86
91
  "@playwright/test": "^1.58.1",
87
92
  "@testing-library/react": "^16.0.0",
88
93
  "@types/bun": "^1.0.0",
89
- "@types/react": "^19.0.0",
90
- "@types/react-dom": "^19.0.0",
94
+ "@types/react": "19.0.8",
95
+ "@types/react-dom": "19.0.3",
91
96
  "@typescript-eslint/eslint-plugin": "^8.54.0",
92
97
  "@typescript-eslint/parser": "^8.54.0",
93
98
  "@vitejs/plugin-react": "^5.1.2",