@postnzt/docx-js-editor 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ClipboardManager-C0rTRkVQ.d.ts +464 -0
- package/dist/ClipboardManager-CgpKW2At.d.mts +464 -0
- package/dist/DocumentAgent-BqA9EJ3F.d.mts +442 -0
- package/dist/DocumentAgent-CRCXiBT7.d.ts +442 -0
- package/dist/FindReplaceDialog-KNJETYJX.js +1 -0
- package/dist/FindReplaceDialog-YW3R4FHM.mjs +1 -0
- package/dist/FootnotePropertiesDialog-452A4UT5.js +1 -0
- package/dist/FootnotePropertiesDialog-H24AC5XK.mjs +1 -0
- package/dist/HyperlinkDialog-GBAYMTUE.js +1 -0
- package/dist/HyperlinkDialog-HNYTXDCB.mjs +1 -0
- package/dist/ImagePositionDialog-B4RLP2W5.mjs +1 -0
- package/dist/ImagePositionDialog-M65BYQQE.js +1 -0
- package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +1 -0
- package/dist/ImagePropertiesDialog-O4WQSF5M.js +1 -0
- package/dist/PageSetupDialog-2GIBTKMJ.js +1 -0
- package/dist/PageSetupDialog-Q7SHEZIJ.mjs +1 -0
- package/dist/TablePropertiesDialog-LMXWX3FI.mjs +1 -0
- package/dist/TablePropertiesDialog-WOZ4ES3H.js +1 -0
- package/dist/agentApi-BVHzyk2l.d.mts +2239 -0
- package/dist/agentApi-BVHzyk2l.d.ts +2239 -0
- package/dist/chunk-2HDYCD2Q.mjs +1 -0
- package/dist/chunk-377ZVTSE.js +2 -0
- package/dist/chunk-37SLIJPH.mjs +58 -0
- package/dist/chunk-4VUZBV2S.js +1 -0
- package/dist/chunk-6WPRCJ5A.mjs +1 -0
- package/dist/chunk-7MGFEP2R.mjs +26 -0
- package/dist/chunk-7QTNB64A.mjs +9 -0
- package/dist/chunk-AARNCPWR.js +1 -0
- package/dist/chunk-AU5NVRHP.js +2 -0
- package/dist/chunk-BP3V2HDD.js +261 -0
- package/dist/chunk-BUEMG4NW.js +1 -0
- package/dist/chunk-DC65PJYE.js +4 -0
- package/dist/chunk-DLVLK5FT.mjs +24 -0
- package/dist/chunk-EV3CM6TU.js +1 -0
- package/dist/chunk-FVUGBRDD.js +1 -0
- package/dist/chunk-GZOCOWWB.mjs +2 -0
- package/dist/chunk-H5NTJZO4.js +1 -0
- package/dist/chunk-IFPN3NT3.js +3 -0
- package/dist/chunk-KCOGY3V2.js +10 -0
- package/dist/chunk-KUL2SDYC.js +26 -0
- package/dist/chunk-LFZXSNOF.mjs +261 -0
- package/dist/chunk-LYBG4YI7.mjs +1 -0
- package/dist/chunk-M5F4SK3W.mjs +1 -0
- package/dist/chunk-P7WEP4JU.js +9 -0
- package/dist/chunk-PB7VMDDP.js +24 -0
- package/dist/chunk-QAZ4233N.mjs +1 -0
- package/dist/chunk-QSUPYUOP.js +2 -0
- package/dist/chunk-QTSXJRP6.mjs +1 -0
- package/dist/chunk-QVPR2W5S.js +1 -0
- package/dist/chunk-RTFUE3KK.mjs +10 -0
- package/dist/chunk-SCYTWBF5.mjs +111 -0
- package/dist/chunk-SE5EN2QL.js +1 -0
- package/dist/chunk-T6X4C2QO.js +111 -0
- package/dist/chunk-TAUMSKRE.mjs +1 -0
- package/dist/chunk-W53SI3XW.mjs +1 -0
- package/dist/chunk-WOHFANC5.mjs +3 -0
- package/dist/chunk-X5A54T6S.mjs +4 -0
- package/dist/chunk-YKBSKEBS.mjs +2 -0
- package/dist/chunk-Z26WOH6R.mjs +2 -0
- package/dist/chunk-ZJNGMDRE.js +58 -0
- package/dist/clipboard-Cu80iVDh.d.ts +1181 -0
- package/dist/clipboard-dFROLI95.d.mts +1181 -0
- package/dist/colorResolver-BwI_Uxp3.d.mts +662 -0
- package/dist/colorResolver-Dlmk3itT.d.ts +662 -0
- package/dist/core-plugins-reexport.d.mts +31 -0
- package/dist/core-plugins-reexport.d.ts +31 -0
- package/dist/core-plugins-reexport.js +1 -0
- package/dist/core-plugins-reexport.mjs +1 -0
- package/dist/core-reexport.d.mts +309 -0
- package/dist/core-reexport.d.ts +309 -0
- package/dist/core-reexport.js +1 -0
- package/dist/core-reexport.mjs +1 -0
- package/dist/executor-L2MVKMXO.js +1 -0
- package/dist/executor-XKBCCVNY.mjs +1 -0
- package/dist/fontLoader-BI9ZoACv.d.ts +176 -0
- package/dist/fontLoader-DicgJidU.d.mts +176 -0
- package/dist/headless-reexport.d.mts +195 -0
- package/dist/headless-reexport.d.ts +195 -0
- package/dist/headless-reexport.js +4 -0
- package/dist/headless-reexport.mjs +4 -0
- package/dist/index.css +1 -0
- package/dist/index.d.mts +480 -0
- package/dist/index.d.ts +480 -0
- package/dist/index.js +112 -0
- package/dist/index.mjs +112 -0
- package/dist/lib-BCT2DRYI.mjs +1 -0
- package/dist/lib-U35UU4OU.js +1 -0
- package/dist/mcp-reexport.d.mts +156 -0
- package/dist/mcp-reexport.d.ts +156 -0
- package/dist/mcp-reexport.js +16 -0
- package/dist/mcp-reexport.mjs +16 -0
- package/dist/processTemplate-5ZST2Q5L.js +1 -0
- package/dist/processTemplate-LRHXOWMZ.mjs +1 -0
- package/dist/react-Cl2n0F5S.d.ts +1091 -0
- package/dist/react-DZlAKNXg.d.mts +1091 -0
- package/dist/react.css +1 -0
- package/dist/react.d.mts +10 -0
- package/dist/react.d.ts +10 -0
- package/dist/react.js +1 -0
- package/dist/react.mjs +1 -0
- package/dist/registry-D4FQ9aKX.d.mts +165 -0
- package/dist/registry-DrYyUXQr.d.ts +165 -0
- package/dist/selectionRects-DEX5THEG.js +1 -0
- package/dist/selectionRects-SQTAHMCH.mjs +1 -0
- package/dist/styles.css +1 -0
- package/dist/types-B3LkfO0u.d.mts +310 -0
- package/dist/types-igZ1x_e4.d.ts +310 -0
- package/dist/ui.d.mts +2005 -0
- package/dist/ui.d.ts +2005 -0
- package/dist/ui.js +1 -0
- package/dist/ui.mjs +1 -0
- package/dist/variableDetector-CIqTek7A.d.mts +204 -0
- package/dist/variableDetector-CkYvLv62.d.ts +204 -0
- package/i18n/de.json +745 -0
- package/i18n/en.json +745 -0
- package/i18n/pl.json +745 -0
- package/package.json +127 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkFVUGBRDD_js=require('./chunk-FVUGBRDD.js'),chunkP7WEP4JU_js=require('./chunk-P7WEP4JU.js'),chunk4VUZBV2S_js=require('./chunk-4VUZBV2S.js'),chunkKCOGY3V2_js=require('./chunk-KCOGY3V2.js'),chunkPB7VMDDP_js=require('./chunk-PB7VMDDP.js'),chunkZJNGMDRE_js=require('./chunk-ZJNGMDRE.js'),chunkAARNCPWR_js=require('./chunk-AARNCPWR.js'),chunkKUL2SDYC_js=require('./chunk-KUL2SDYC.js'),chunkBUEMG4NW_js=require('./chunk-BUEMG4NW.js'),chunkSE5EN2QL_js=require('./chunk-SE5EN2QL.js');require('./chunk-IFPN3NT3.js'),require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"AutoSaveManager",{enumerable:true,get:function(){return chunkFVUGBRDD_js.r}});Object.defineProperty(exports,"EditorCoordinator",{enumerable:true,get:function(){return chunkFVUGBRDD_js.L}});Object.defineProperty(exports,"ErrorManager",{enumerable:true,get:function(){return chunkFVUGBRDD_js.H}});Object.defineProperty(exports,"LayoutCoordinator",{enumerable:true,get:function(){return chunkFVUGBRDD_js.K}});Object.defineProperty(exports,"PluginLifecycleManager",{enumerable:true,get:function(){return chunkFVUGBRDD_js.J}});Object.defineProperty(exports,"Subscribable",{enumerable:true,get:function(){return chunkFVUGBRDD_js.q}});Object.defineProperty(exports,"TABLE_DATA_ATTRIBUTES",{enumerable:true,get:function(){return chunkFVUGBRDD_js.x}});Object.defineProperty(exports,"TableSelectionManager",{enumerable:true,get:function(){return chunkFVUGBRDD_js.C}});Object.defineProperty(exports,"VERSION",{enumerable:true,get:function(){return chunkFVUGBRDD_js.M}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunkFVUGBRDD_js.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunkFVUGBRDD_js.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunkFVUGBRDD_js.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunkFVUGBRDD_js.d}});Object.defineProperty(exports,"createSelectionFromDOM",{enumerable:true,get:function(){return chunkFVUGBRDD_js.F}});Object.defineProperty(exports,"deleteTableFromDocument",{enumerable:true,get:function(){return chunkFVUGBRDD_js.B}});Object.defineProperty(exports,"extractFormattingFromElement",{enumerable:true,get:function(){return chunkFVUGBRDD_js.D}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunkFVUGBRDD_js.o}});Object.defineProperty(exports,"findTableFromClick",{enumerable:true,get:function(){return chunkFVUGBRDD_js.y}});Object.defineProperty(exports,"formatLastSaveTime",{enumerable:true,get:function(){return chunkFVUGBRDD_js.s}});Object.defineProperty(exports,"formatStorageSize",{enumerable:true,get:function(){return chunkFVUGBRDD_js.v}});Object.defineProperty(exports,"getAutoSaveStatusLabel",{enumerable:true,get:function(){return chunkFVUGBRDD_js.t}});Object.defineProperty(exports,"getAutoSaveStorageSize",{enumerable:true,get:function(){return chunkFVUGBRDD_js.u}});Object.defineProperty(exports,"getSelectionRuns",{enumerable:true,get:function(){return chunkFVUGBRDD_js.E}});Object.defineProperty(exports,"getTableFromDocument",{enumerable:true,get:function(){return chunkFVUGBRDD_js.z}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkFVUGBRDD_js.m}});Object.defineProperty(exports,"injectStyles",{enumerable:true,get:function(){return chunkFVUGBRDD_js.I}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunkFVUGBRDD_js.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.f}});Object.defineProperty(exports,"isAutoSaveSupported",{enumerable:true,get:function(){return chunkFVUGBRDD_js.w}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunkFVUGBRDD_js.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunkFVUGBRDD_js.p}});Object.defineProperty(exports,"rgbToHex",{enumerable:true,get:function(){return chunkFVUGBRDD_js.G}});Object.defineProperty(exports,"updateTableInDocument",{enumerable:true,get:function(){return chunkFVUGBRDD_js.A}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkP7WEP4JU_js.f}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkP7WEP4JU_js.c}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.m}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkP7WEP4JU_js.b}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.l}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkP7WEP4JU_js.e}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkP7WEP4JU_js.d}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkP7WEP4JU_js.i}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkP7WEP4JU_js.k}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkP7WEP4JU_js.a}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunk4VUZBV2S_js.l}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunk4VUZBV2S_js.q}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.i}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.h}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.j}});Object.defineProperty(exports,"ensureHexPrefix",{enumerable:true,get:function(){return chunk4VUZBV2S_js.m}});Object.defineProperty(exports,"generateThemeTintShadeMatrix",{enumerable:true,get:function(){return chunk4VUZBV2S_js.p}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.f}});Object.defineProperty(exports,"getThemeTintShadeHex",{enumerable:true,get:function(){return chunk4VUZBV2S_js.o}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunk4VUZBV2S_js.d}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunk4VUZBV2S_js.e}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.k}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunk4VUZBV2S_js.g}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.b}});Object.defineProperty(exports,"resolveHighlightToCss",{enumerable:true,get:function(){return chunk4VUZBV2S_js.n}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunk4VUZBV2S_js.c}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.a}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkKCOGY3V2_js.b}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkKCOGY3V2_js.c}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkKCOGY3V2_js.d}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.m}});Object.defineProperty(exports,"docxtemplaterPlugin",{enumerable:true,get:function(){return chunkKCOGY3V2_js.o}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkKCOGY3V2_js.e}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkKCOGY3V2_js.i}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.f}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkKCOGY3V2_js.g}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkKCOGY3V2_js.j}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.l}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkKCOGY3V2_js.k}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkKCOGY3V2_js.h}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkPB7VMDDP_js.e}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkPB7VMDDP_js.a}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkPB7VMDDP_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkPB7VMDDP_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkPB7VMDDP_js.f}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkZJNGMDRE_js.r}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkZJNGMDRE_js.i}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkZJNGMDRE_js.b}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkZJNGMDRE_js.c}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkZJNGMDRE_js.a}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkZJNGMDRE_js.n}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkAARNCPWR_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkAARNCPWR_js.b}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkKUL2SDYC_js.i}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkKUL2SDYC_js.g}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkKUL2SDYC_js.e}});Object.defineProperty(exports,"isFontsLoading",{enumerable:true,get:function(){return chunkKUL2SDYC_js.f}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkKUL2SDYC_js.c}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkKUL2SDYC_js.j}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKUL2SDYC_js.d}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkKUL2SDYC_js.h}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkKUL2SDYC_js.n}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkKUL2SDYC_js.k}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkKUL2SDYC_js.m}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunkBUEMG4NW_js.a}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunkBUEMG4NW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunkBUEMG4NW_js.c}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.c}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkSE5EN2QL_js.e}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkSE5EN2QL_js.k}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.h}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkSE5EN2QL_js.d}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkSE5EN2QL_js.b}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.g}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkSE5EN2QL_js.f}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkSE5EN2QL_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{r as AutoSaveManager,L as EditorCoordinator,H as ErrorManager,K as LayoutCoordinator,J as PluginLifecycleManager,q as Subscribable,x as TABLE_DATA_ATTRIBUTES,C as TableSelectionManager,M as VERSION,n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,F as createSelectionFromDOM,B as deleteTableFromDocument,D as extractFormattingFromElement,o as findPageBreaks,y as findTableFromClick,s as formatLastSaveTime,v as formatStorageSize,t as getAutoSaveStatusLabel,u as getAutoSaveStorageSize,E as getSelectionRuns,z as getTableFromDocument,m as hasPageBreakBefore,I as injectStyles,h as insertHorizontalRule,f as insertPageBreak,w as isAutoSaveSupported,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak,G as rgbToHex,A as updateTableInDocument}from'./chunk-QTSXJRP6.mjs';export{f as DocumentAgent,c as attemptSelectiveSave,m as buildExtendedSelectionContext,b as buildPatchedDocumentXml,l as buildSelectionContext,e as createDocumentWithText,d as createEmptyDocument,i as getAgentContext,k as getDocumentSummary,a as validatePatchSafety}from'./chunk-7QTNB64A.mjs';export{l as blendColors,q as colorsEqual,i as createRgbColor,h as createThemeColor,j as darkenColor,m as ensureHexPrefix,p as generateThemeTintShadeMatrix,f as getContrastingColor,o as getThemeTintShadeHex,d as isBlack,e as isWhite,k as lightenColor,g as parseColorString,a as resolveColor,b as resolveHighlightColor,n as resolveHighlightToCss,c as resolveShadingColor}from'./chunk-QAZ4233N.mjs';export{a as detectVariables,b as detectVariablesDetailed,c as detectVariablesInBody,d as detectVariablesInParagraph,m as documentHasVariables,o as docxtemplaterPlugin,e as extractVariablesFromText,i as formatVariable,f as hasTemplateVariables,g as isValidVariableName,j as parseVariable,l as removeVariables,k as replaceVariables,h as sanitizeVariableName}from'./chunk-RTFUE3KK.mjs';export{e as getTemplateTags,a as processTemplate,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-DLVLK5FT.mjs';export{r as createDocx,i as repackDocx,b as serializeDocumentBody,c as serializeDocx,a as serializeSectionProperties,n as updateMultipleFiles}from'./chunk-37SLIJPH.mjs';export{a as executeCommand,b as executeCommands}from'./chunk-M5F4SK3W.mjs';export{i as canRenderFont,g as getLoadedFonts,e as isFontLoaded,f as isFontsLoading,c as loadFont,j as loadFontFromBuffer,d as loadFonts,h as onFontsLoaded,n as parseDocx,k as preloadCommonFonts,m as toArrayBuffer}from'./chunk-7MGFEP2R.mjs';export{a as PluginRegistry,b as pluginRegistry,c as registerPlugins}from'./chunk-W53SI3XW.mjs';export{c as emuToPixels,e as emuToTwips,k as formatPx,h as halfPointsToPixels,d as pixelsToEmu,b as pixelsToTwips,g as pointsToPixels,f as twipsToEmu,a as twipsToPixels}from'./chunk-LYBG4YI7.mjs';import'./chunk-WOHFANC5.mjs';import'./chunk-TAUMSKRE.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkAARNCPWR_js=require('./chunk-AARNCPWR.js');require('./chunk-BUEMG4NW.js'),require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkAARNCPWR_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkAARNCPWR_js.b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as executeCommand,b as executeCommands}from'./chunk-M5F4SK3W.mjs';import'./chunk-W53SI3XW.mjs';import'./chunk-TAUMSKRE.mjs';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { D as Document, B as BreakContent, a as Paragraph, b as Run, c as RunContent } from './agentApi-BVHzyk2l.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Insert Operations Utility
|
|
5
|
+
*
|
|
6
|
+
* Utility functions for inserting content into the document.
|
|
7
|
+
* Provides functions for inserting page breaks, horizontal rules, and other elements.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Insert position in the document
|
|
12
|
+
*/
|
|
13
|
+
interface InsertPosition {
|
|
14
|
+
/** Paragraph index in the document body */
|
|
15
|
+
paragraphIndex: number;
|
|
16
|
+
/** Run index within the paragraph (optional) */
|
|
17
|
+
runIndex?: number;
|
|
18
|
+
/** Character offset within the run (optional) */
|
|
19
|
+
offset?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a page break content element
|
|
23
|
+
*/
|
|
24
|
+
declare function createPageBreak(): BreakContent;
|
|
25
|
+
/**
|
|
26
|
+
* Create a column break content element
|
|
27
|
+
*/
|
|
28
|
+
declare function createColumnBreak(): BreakContent;
|
|
29
|
+
/**
|
|
30
|
+
* Create a text wrapping break (line break)
|
|
31
|
+
*/
|
|
32
|
+
declare function createLineBreak(clear?: 'none' | 'left' | 'right' | 'all'): BreakContent;
|
|
33
|
+
/**
|
|
34
|
+
* Create a run containing a page break
|
|
35
|
+
*/
|
|
36
|
+
declare function createPageBreakRun(): Run;
|
|
37
|
+
/**
|
|
38
|
+
* Create an empty paragraph with a page break before it
|
|
39
|
+
*/
|
|
40
|
+
declare function createPageBreakParagraph(): Paragraph;
|
|
41
|
+
/**
|
|
42
|
+
* Insert a page break at a position in the document
|
|
43
|
+
* This inserts a new paragraph with pageBreakBefore: true
|
|
44
|
+
*/
|
|
45
|
+
declare function insertPageBreak(doc: Document, position: InsertPosition): Document;
|
|
46
|
+
/**
|
|
47
|
+
* Create a horizontal rule paragraph
|
|
48
|
+
* Uses a paragraph with bottom border to simulate horizontal rule
|
|
49
|
+
*/
|
|
50
|
+
declare function createHorizontalRule(): Paragraph;
|
|
51
|
+
/**
|
|
52
|
+
* Insert a horizontal rule at a position in the document
|
|
53
|
+
*/
|
|
54
|
+
declare function insertHorizontalRule(doc: Document, position: InsertPosition): Document;
|
|
55
|
+
/**
|
|
56
|
+
* Check if content is a page break
|
|
57
|
+
*/
|
|
58
|
+
declare function isPageBreak(content: RunContent): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Check if content is a column break
|
|
61
|
+
*/
|
|
62
|
+
declare function isColumnBreak(content: RunContent): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Check if content is a line break
|
|
65
|
+
*/
|
|
66
|
+
declare function isLineBreak(content: RunContent): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Check if content is any type of break
|
|
69
|
+
*/
|
|
70
|
+
declare function isBreakContent(content: RunContent): content is BreakContent;
|
|
71
|
+
/**
|
|
72
|
+
* Check if a paragraph has pageBreakBefore
|
|
73
|
+
*/
|
|
74
|
+
declare function hasPageBreakBefore(paragraph: Paragraph): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Count page breaks in a document
|
|
77
|
+
*/
|
|
78
|
+
declare function countPageBreaks(doc: Document): number;
|
|
79
|
+
/**
|
|
80
|
+
* Find all page break positions in a document
|
|
81
|
+
*/
|
|
82
|
+
declare function findPageBreaks(doc: Document): InsertPosition[];
|
|
83
|
+
/**
|
|
84
|
+
* Remove a page break at a specific position
|
|
85
|
+
*/
|
|
86
|
+
declare function removePageBreak(doc: Document, position: InsertPosition): Document;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Google Fonts Loader
|
|
90
|
+
*
|
|
91
|
+
* Dynamically loads fonts from Google Fonts API with:
|
|
92
|
+
* - Loading state tracking
|
|
93
|
+
* - Duplicate prevention
|
|
94
|
+
* - Callback notifications
|
|
95
|
+
* - Font availability detection
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Load a font from Google Fonts
|
|
99
|
+
*
|
|
100
|
+
* @param fontFamily - The font family name to load
|
|
101
|
+
* @param options - Optional configuration
|
|
102
|
+
* @returns Promise resolving to true if font loaded successfully, false otherwise
|
|
103
|
+
*/
|
|
104
|
+
declare function loadFont(fontFamily: string, options?: {
|
|
105
|
+
weights?: number[];
|
|
106
|
+
styles?: ('normal' | 'italic')[];
|
|
107
|
+
}): Promise<boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Load multiple fonts from Google Fonts
|
|
110
|
+
*
|
|
111
|
+
* @param families - Array of font family names to load
|
|
112
|
+
* @param options - Optional configuration
|
|
113
|
+
* @returns Promise resolving when all fonts are loaded (or failed)
|
|
114
|
+
*/
|
|
115
|
+
declare function loadFonts(families: string[], options?: {
|
|
116
|
+
weights?: number[];
|
|
117
|
+
styles?: ('normal' | 'italic')[];
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Check if a font is loaded
|
|
121
|
+
*
|
|
122
|
+
* @param fontFamily - The font family name to check
|
|
123
|
+
* @returns true if the font is loaded, false otherwise
|
|
124
|
+
*/
|
|
125
|
+
declare function isFontLoaded(fontFamily: string): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Check if any fonts are currently loading
|
|
128
|
+
*
|
|
129
|
+
* @returns true if any fonts are loading, false otherwise
|
|
130
|
+
*/
|
|
131
|
+
declare function isLoading(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Get list of all loaded fonts
|
|
134
|
+
*
|
|
135
|
+
* @returns Array of loaded font family names
|
|
136
|
+
*/
|
|
137
|
+
declare function getLoadedFonts(): string[];
|
|
138
|
+
/**
|
|
139
|
+
* Register a callback to be notified when fonts are loaded
|
|
140
|
+
*
|
|
141
|
+
* @param callback - Function to call when fonts are loaded
|
|
142
|
+
* @returns Cleanup function to remove the callback
|
|
143
|
+
*/
|
|
144
|
+
declare function onFontsLoaded(callback: (fonts: string[]) => void): () => void;
|
|
145
|
+
/**
|
|
146
|
+
* Check if a font is available on the system using canvas measurement
|
|
147
|
+
*
|
|
148
|
+
* This uses the technique of comparing text width with the target font
|
|
149
|
+
* vs a known fallback font. If they differ, the font is available.
|
|
150
|
+
*
|
|
151
|
+
* @param fontFamily - The font family name to check
|
|
152
|
+
* @param fallbackFont - Fallback font to compare against
|
|
153
|
+
* @returns true if font is available, false otherwise
|
|
154
|
+
*/
|
|
155
|
+
declare function canRenderFont(fontFamily: string, fallbackFont?: string): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Load a font from a raw buffer (e.g., embedded in DOCX)
|
|
158
|
+
*
|
|
159
|
+
* @param fontFamily - The font family name
|
|
160
|
+
* @param buffer - Font file buffer (TTF, OTF, WOFF, WOFF2)
|
|
161
|
+
* @param options - Font options
|
|
162
|
+
* @returns Promise resolving when font is loaded
|
|
163
|
+
*/
|
|
164
|
+
declare function loadFontFromBuffer(fontFamily: string, buffer: ArrayBuffer, options?: {
|
|
165
|
+
weight?: number | string;
|
|
166
|
+
style?: 'normal' | 'italic';
|
|
167
|
+
}): Promise<boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* Preload a list of common document fonts
|
|
170
|
+
*
|
|
171
|
+
* This preloads fonts commonly used in DOCX documents that have
|
|
172
|
+
* Google Fonts equivalents.
|
|
173
|
+
*/
|
|
174
|
+
declare function preloadCommonFonts(): Promise<void>;
|
|
175
|
+
|
|
176
|
+
export { type InsertPosition as I, countPageBreaks as a, createColumnBreak as b, canRenderFont as c, createHorizontalRule as d, createLineBreak as e, createPageBreak as f, createPageBreakParagraph as g, createPageBreakRun as h, findPageBreaks as i, getLoadedFonts as j, hasPageBreakBefore as k, insertHorizontalRule as l, insertPageBreak as m, isBreakContent as n, isColumnBreak as o, isFontLoaded as p, isLoading as q, isLineBreak as r, isPageBreak as s, loadFont as t, loadFontFromBuffer as u, loadFonts as v, onFontsLoaded as w, preloadCommonFonts as x, removePageBreak as y };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { D as Document, B as BreakContent, a as Paragraph, b as Run, c as RunContent } from './agentApi-BVHzyk2l.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Insert Operations Utility
|
|
5
|
+
*
|
|
6
|
+
* Utility functions for inserting content into the document.
|
|
7
|
+
* Provides functions for inserting page breaks, horizontal rules, and other elements.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Insert position in the document
|
|
12
|
+
*/
|
|
13
|
+
interface InsertPosition {
|
|
14
|
+
/** Paragraph index in the document body */
|
|
15
|
+
paragraphIndex: number;
|
|
16
|
+
/** Run index within the paragraph (optional) */
|
|
17
|
+
runIndex?: number;
|
|
18
|
+
/** Character offset within the run (optional) */
|
|
19
|
+
offset?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a page break content element
|
|
23
|
+
*/
|
|
24
|
+
declare function createPageBreak(): BreakContent;
|
|
25
|
+
/**
|
|
26
|
+
* Create a column break content element
|
|
27
|
+
*/
|
|
28
|
+
declare function createColumnBreak(): BreakContent;
|
|
29
|
+
/**
|
|
30
|
+
* Create a text wrapping break (line break)
|
|
31
|
+
*/
|
|
32
|
+
declare function createLineBreak(clear?: 'none' | 'left' | 'right' | 'all'): BreakContent;
|
|
33
|
+
/**
|
|
34
|
+
* Create a run containing a page break
|
|
35
|
+
*/
|
|
36
|
+
declare function createPageBreakRun(): Run;
|
|
37
|
+
/**
|
|
38
|
+
* Create an empty paragraph with a page break before it
|
|
39
|
+
*/
|
|
40
|
+
declare function createPageBreakParagraph(): Paragraph;
|
|
41
|
+
/**
|
|
42
|
+
* Insert a page break at a position in the document
|
|
43
|
+
* This inserts a new paragraph with pageBreakBefore: true
|
|
44
|
+
*/
|
|
45
|
+
declare function insertPageBreak(doc: Document, position: InsertPosition): Document;
|
|
46
|
+
/**
|
|
47
|
+
* Create a horizontal rule paragraph
|
|
48
|
+
* Uses a paragraph with bottom border to simulate horizontal rule
|
|
49
|
+
*/
|
|
50
|
+
declare function createHorizontalRule(): Paragraph;
|
|
51
|
+
/**
|
|
52
|
+
* Insert a horizontal rule at a position in the document
|
|
53
|
+
*/
|
|
54
|
+
declare function insertHorizontalRule(doc: Document, position: InsertPosition): Document;
|
|
55
|
+
/**
|
|
56
|
+
* Check if content is a page break
|
|
57
|
+
*/
|
|
58
|
+
declare function isPageBreak(content: RunContent): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Check if content is a column break
|
|
61
|
+
*/
|
|
62
|
+
declare function isColumnBreak(content: RunContent): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Check if content is a line break
|
|
65
|
+
*/
|
|
66
|
+
declare function isLineBreak(content: RunContent): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Check if content is any type of break
|
|
69
|
+
*/
|
|
70
|
+
declare function isBreakContent(content: RunContent): content is BreakContent;
|
|
71
|
+
/**
|
|
72
|
+
* Check if a paragraph has pageBreakBefore
|
|
73
|
+
*/
|
|
74
|
+
declare function hasPageBreakBefore(paragraph: Paragraph): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Count page breaks in a document
|
|
77
|
+
*/
|
|
78
|
+
declare function countPageBreaks(doc: Document): number;
|
|
79
|
+
/**
|
|
80
|
+
* Find all page break positions in a document
|
|
81
|
+
*/
|
|
82
|
+
declare function findPageBreaks(doc: Document): InsertPosition[];
|
|
83
|
+
/**
|
|
84
|
+
* Remove a page break at a specific position
|
|
85
|
+
*/
|
|
86
|
+
declare function removePageBreak(doc: Document, position: InsertPosition): Document;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Google Fonts Loader
|
|
90
|
+
*
|
|
91
|
+
* Dynamically loads fonts from Google Fonts API with:
|
|
92
|
+
* - Loading state tracking
|
|
93
|
+
* - Duplicate prevention
|
|
94
|
+
* - Callback notifications
|
|
95
|
+
* - Font availability detection
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Load a font from Google Fonts
|
|
99
|
+
*
|
|
100
|
+
* @param fontFamily - The font family name to load
|
|
101
|
+
* @param options - Optional configuration
|
|
102
|
+
* @returns Promise resolving to true if font loaded successfully, false otherwise
|
|
103
|
+
*/
|
|
104
|
+
declare function loadFont(fontFamily: string, options?: {
|
|
105
|
+
weights?: number[];
|
|
106
|
+
styles?: ('normal' | 'italic')[];
|
|
107
|
+
}): Promise<boolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Load multiple fonts from Google Fonts
|
|
110
|
+
*
|
|
111
|
+
* @param families - Array of font family names to load
|
|
112
|
+
* @param options - Optional configuration
|
|
113
|
+
* @returns Promise resolving when all fonts are loaded (or failed)
|
|
114
|
+
*/
|
|
115
|
+
declare function loadFonts(families: string[], options?: {
|
|
116
|
+
weights?: number[];
|
|
117
|
+
styles?: ('normal' | 'italic')[];
|
|
118
|
+
}): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Check if a font is loaded
|
|
121
|
+
*
|
|
122
|
+
* @param fontFamily - The font family name to check
|
|
123
|
+
* @returns true if the font is loaded, false otherwise
|
|
124
|
+
*/
|
|
125
|
+
declare function isFontLoaded(fontFamily: string): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Check if any fonts are currently loading
|
|
128
|
+
*
|
|
129
|
+
* @returns true if any fonts are loading, false otherwise
|
|
130
|
+
*/
|
|
131
|
+
declare function isLoading(): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Get list of all loaded fonts
|
|
134
|
+
*
|
|
135
|
+
* @returns Array of loaded font family names
|
|
136
|
+
*/
|
|
137
|
+
declare function getLoadedFonts(): string[];
|
|
138
|
+
/**
|
|
139
|
+
* Register a callback to be notified when fonts are loaded
|
|
140
|
+
*
|
|
141
|
+
* @param callback - Function to call when fonts are loaded
|
|
142
|
+
* @returns Cleanup function to remove the callback
|
|
143
|
+
*/
|
|
144
|
+
declare function onFontsLoaded(callback: (fonts: string[]) => void): () => void;
|
|
145
|
+
/**
|
|
146
|
+
* Check if a font is available on the system using canvas measurement
|
|
147
|
+
*
|
|
148
|
+
* This uses the technique of comparing text width with the target font
|
|
149
|
+
* vs a known fallback font. If they differ, the font is available.
|
|
150
|
+
*
|
|
151
|
+
* @param fontFamily - The font family name to check
|
|
152
|
+
* @param fallbackFont - Fallback font to compare against
|
|
153
|
+
* @returns true if font is available, false otherwise
|
|
154
|
+
*/
|
|
155
|
+
declare function canRenderFont(fontFamily: string, fallbackFont?: string): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Load a font from a raw buffer (e.g., embedded in DOCX)
|
|
158
|
+
*
|
|
159
|
+
* @param fontFamily - The font family name
|
|
160
|
+
* @param buffer - Font file buffer (TTF, OTF, WOFF, WOFF2)
|
|
161
|
+
* @param options - Font options
|
|
162
|
+
* @returns Promise resolving when font is loaded
|
|
163
|
+
*/
|
|
164
|
+
declare function loadFontFromBuffer(fontFamily: string, buffer: ArrayBuffer, options?: {
|
|
165
|
+
weight?: number | string;
|
|
166
|
+
style?: 'normal' | 'italic';
|
|
167
|
+
}): Promise<boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* Preload a list of common document fonts
|
|
170
|
+
*
|
|
171
|
+
* This preloads fonts commonly used in DOCX documents that have
|
|
172
|
+
* Google Fonts equivalents.
|
|
173
|
+
*/
|
|
174
|
+
declare function preloadCommonFonts(): Promise<void>;
|
|
175
|
+
|
|
176
|
+
export { type InsertPosition as I, countPageBreaks as a, createColumnBreak as b, canRenderFont as c, createHorizontalRule as d, createLineBreak as e, createPageBreak as f, createPageBreakParagraph as g, createPageBreakRun as h, findPageBreaks as i, getLoadedFonts as j, hasPageBreakBefore as k, insertHorizontalRule as l, insertPageBreak as m, isBreakContent as n, isColumnBreak as o, isFontLoaded as p, isLoading as q, isLineBreak as r, isPageBreak as s, loadFont as t, loadFontFromBuffer as u, loadFonts as v, onFontsLoaded as w, preloadCommonFonts as x, removePageBreak as y };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { d as DocumentBody, a as Paragraph, T as TextFormatting, H as Hyperlink, b as Run, e as Table, P as Position } from './agentApi-BVHzyk2l.mjs';
|
|
2
|
+
export { f as AIAction, g as AIActionRequest, A as AgentCommand, h as AgentContext, i as AgentResponse, j as ApplyStyleCommand, k as ApplyVariablesCommand, l as BlockContent, C as Comment, m as CommentRangeEnd, n as CommentRangeStart, o as DEFAULT_AI_ACTIONS, p as DeleteTextCommand, q as Deletion, D as Document, r as DocxPackage, E as Endnote, F as Footnote, s as FormatParagraphCommand, t as FormatTextCommand, I as Image, u as InsertHyperlinkCommand, v as InsertImageCommand, w as InsertTableCommand, x as InsertTextCommand, y as Insertion, L as ListLevel, M as MoveFrom, z as MoveTo, N as NumberingDefinitions, G as ParagraphContent, J as ParagraphContext, K as ParagraphFormatting, O as ParagraphOutline, R as Range, Q as Relationship, S as ReplaceTextCommand, c as RunContent, U as SectionInfo, V as SectionProperties, W as SelectionContext, X as SetVariableCommand, Y as Style, Z as StyleDefinitions, _ as StyleInfo, $ as SuggestedAction, a0 as TableCell, a1 as TableRow, a2 as TextContent, a3 as Theme, a4 as TrackedChangeInfo, a5 as TrackedRunChange, a6 as comparePositions, a7 as createCollapsedRange, a8 as createCommand, a9 as createRange, aa as getActionDescription, ab as getActionLabel, ac as isPositionInRange } from './agentApi-BVHzyk2l.mjs';
|
|
3
|
+
export { A as AgentContextOptions, S as ContextSelectionOptions, C as CreateEmptyDocumentOptions, E as ExtendedSelectionContext, F as FormattingSummary, P as ProcessTemplateOptions, a as ProcessTemplateResult, b as SelectionContextOptions, T as TemplateError, c as blendColors, d as buildExtendedSelectionContext, e as buildSelectionContext, f as buildSelectionContextFromContext, g as colorsEqual, h as createDocumentWithText, i as createEmptyDocument, j as createRgbColor, k as createTemplateProcessor, l as createThemeColor, m as darkenColor, n as emuToPixels, o as emuToTwips, p as executeCommand, q as executeCommands, r as formatPx, s as getAgentContext, t as getContrastingColor, u as getDocumentSummary, v as getMissingVariables, w as getSelectionFormattingSummary, x as getTemplateTags, y as halfPointsToPixels, z as isBlack, B as isWhite, D as lightenColor, G as parseColorString, H as parseDocx, I as pixelsToEmu, J as pixelsToTwips, K as pointsToPixels, L as previewTemplate, M as processTemplate, N as processTemplateAdvanced, O as processTemplateAsBlob, Q as processTemplateDetailed, R as resolveColor, U as resolveHighlightColor, V as resolveShadingColor, W as serializeDocumentBody, X as serializeDocx, Y as serializeSectionProperties, Z as twipsToEmu, _ as twipsToPixels, $ as validateTemplate } from './colorResolver-BwI_Uxp3.mjs';
|
|
4
|
+
export { b as CommandHandler, d as CommandResult, C as CorePlugin, J as JsonSchema, L as LoadedDocument, e as McpSession, f as McpToolAnnotations, g as McpToolContent, h as McpToolContext, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult, C as Plugin, k as PluginCommand, b as PluginCommandHandler, l as PluginEvent, c as PluginEventListener, P as PluginOptions, a as PluginRegistrationResult, M as ToolDefinition, i as ToolHandler, j as ToolResult, Z as ZodSchemaLike, m as isZodSchema } from './types-B3LkfO0u.mjs';
|
|
5
|
+
export { D as DocumentAgent, F as FormattedTextSegment, I as InsertHyperlinkOptions, a as InsertImageOptions, b as InsertTableOptions, c as InsertTextOptions, d as attemptSelectiveSave, e as createAgent, f as createAgentFromDocument } from './DocumentAgent-BqA9EJ3F.mjs';
|
|
6
|
+
export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-D4FQ9aKX.mjs';
|
|
7
|
+
export { V as VariableDetectionResult, a as VariableOccurrence, b as buildPatchedDocumentXml, c as createDocx, d as detectVariables, e as detectVariablesDetailed, f as detectVariablesInBody, g as detectVariablesInParagraph, h as documentHasVariables, i as extractVariablesFromText, j as formatVariable, k as hasTemplateVariables, l as isValidVariableName, p as parseVariable, r as removeVariables, m as repackDocx, n as replaceVariables, s as sanitizeVariableName, u as updateMultipleFiles, v as validatePatchSafety } from './variableDetector-CIqTek7A.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Shared Text Utilities for Agent Module
|
|
11
|
+
*
|
|
12
|
+
* Common text extraction and manipulation utilities used by
|
|
13
|
+
* context.ts, selectionContext.ts, and other agent-related code.
|
|
14
|
+
*
|
|
15
|
+
* Consolidates duplicated helper functions into a single location.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get plain text from a paragraph
|
|
20
|
+
*/
|
|
21
|
+
declare function getParagraphText(paragraph: Paragraph): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get plain text from a run
|
|
24
|
+
*/
|
|
25
|
+
declare function getRunText(run: Run): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get plain text from a hyperlink
|
|
28
|
+
*/
|
|
29
|
+
declare function getHyperlinkText(hyperlink: Hyperlink): string;
|
|
30
|
+
/**
|
|
31
|
+
* Get plain text from a table
|
|
32
|
+
*/
|
|
33
|
+
declare function getTableText(table: Table): string;
|
|
34
|
+
/**
|
|
35
|
+
* Get plain text from document body
|
|
36
|
+
*/
|
|
37
|
+
declare function getBodyText(body: DocumentBody): string;
|
|
38
|
+
/**
|
|
39
|
+
* Count words in text
|
|
40
|
+
*/
|
|
41
|
+
declare function countWords(text: string): number;
|
|
42
|
+
/**
|
|
43
|
+
* Count characters in text
|
|
44
|
+
*/
|
|
45
|
+
declare function countCharacters(text: string, includeSpaces?: boolean): number;
|
|
46
|
+
/**
|
|
47
|
+
* Get word count from document body
|
|
48
|
+
*/
|
|
49
|
+
declare function getBodyWordCount(body: DocumentBody): number;
|
|
50
|
+
/**
|
|
51
|
+
* Get character count from document body
|
|
52
|
+
*/
|
|
53
|
+
declare function getBodyCharacterCount(body: DocumentBody): number;
|
|
54
|
+
/**
|
|
55
|
+
* Get text before a position
|
|
56
|
+
*
|
|
57
|
+
* @param paragraphs - Array of paragraphs
|
|
58
|
+
* @param position - Position to get text before
|
|
59
|
+
* @param maxChars - Maximum characters to return
|
|
60
|
+
* @returns Text before the position
|
|
61
|
+
*/
|
|
62
|
+
declare function getTextBefore(paragraphs: Paragraph[], position: Position, maxChars: number): string;
|
|
63
|
+
/**
|
|
64
|
+
* Get text after a position
|
|
65
|
+
*
|
|
66
|
+
* @param paragraphs - Array of paragraphs
|
|
67
|
+
* @param position - Position to get text after
|
|
68
|
+
* @param maxChars - Maximum characters to return
|
|
69
|
+
* @returns Text after the position
|
|
70
|
+
*/
|
|
71
|
+
declare function getTextAfter(paragraphs: Paragraph[], position: Position, maxChars: number): string;
|
|
72
|
+
/**
|
|
73
|
+
* Get formatting at a specific position in a paragraph
|
|
74
|
+
*
|
|
75
|
+
* @param paragraph - The paragraph to check
|
|
76
|
+
* @param offset - Character offset in the paragraph
|
|
77
|
+
* @returns Formatting at that position
|
|
78
|
+
*/
|
|
79
|
+
declare function getFormattingAtPosition(paragraph: Paragraph, offset: number): Partial<TextFormatting>;
|
|
80
|
+
/**
|
|
81
|
+
* Check if position is within a hyperlink
|
|
82
|
+
*
|
|
83
|
+
* @param paragraph - The paragraph to check
|
|
84
|
+
* @param offset - Character offset in the paragraph
|
|
85
|
+
* @returns True if position is in a hyperlink
|
|
86
|
+
*/
|
|
87
|
+
declare function isPositionInHyperlink(paragraph: Paragraph, offset: number): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Get hyperlink at position
|
|
90
|
+
*
|
|
91
|
+
* @param paragraph - The paragraph to check
|
|
92
|
+
* @param offset - Character offset in the paragraph
|
|
93
|
+
* @returns The hyperlink at that position, or undefined
|
|
94
|
+
*/
|
|
95
|
+
declare function getHyperlinkAtPosition(paragraph: Paragraph, offset: number): Hyperlink | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Check if style ID represents a heading
|
|
98
|
+
*
|
|
99
|
+
* @param styleId - Style ID to check
|
|
100
|
+
* @returns True if it's a heading style
|
|
101
|
+
*/
|
|
102
|
+
declare function isHeadingStyle(styleId?: string): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Parse heading level from style ID
|
|
105
|
+
*
|
|
106
|
+
* @param styleId - Style ID to parse
|
|
107
|
+
* @returns Heading level (1-9) or undefined
|
|
108
|
+
*/
|
|
109
|
+
declare function parseHeadingLevel(styleId?: string): number | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* Check if document body has images
|
|
112
|
+
*
|
|
113
|
+
* @param body - Document body to check
|
|
114
|
+
* @returns True if contains images
|
|
115
|
+
*/
|
|
116
|
+
declare function hasImages(body: DocumentBody): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Check if document body has hyperlinks
|
|
119
|
+
*
|
|
120
|
+
* @param body - Document body to check
|
|
121
|
+
* @returns True if contains hyperlinks
|
|
122
|
+
*/
|
|
123
|
+
declare function hasHyperlinks(body: DocumentBody): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Check if document body has tables
|
|
126
|
+
*
|
|
127
|
+
* @param body - Document body to check
|
|
128
|
+
* @returns True if contains tables
|
|
129
|
+
*/
|
|
130
|
+
declare function hasTables(body: DocumentBody): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Get all paragraphs from document body
|
|
133
|
+
*
|
|
134
|
+
* @param body - Document body
|
|
135
|
+
* @returns Array of paragraphs
|
|
136
|
+
*/
|
|
137
|
+
declare function getParagraphs(body: DocumentBody): Paragraph[];
|
|
138
|
+
/**
|
|
139
|
+
* Get paragraph at index from document body
|
|
140
|
+
*
|
|
141
|
+
* @param body - Document body
|
|
142
|
+
* @param index - Paragraph index (0-indexed)
|
|
143
|
+
* @returns Paragraph or undefined
|
|
144
|
+
*/
|
|
145
|
+
declare function getParagraphAtIndex(body: DocumentBody, index: number): Paragraph | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Get block index for a paragraph index
|
|
148
|
+
*
|
|
149
|
+
* @param body - Document body
|
|
150
|
+
* @param paragraphIndex - Paragraph index
|
|
151
|
+
* @returns Block index or -1 if not found
|
|
152
|
+
*/
|
|
153
|
+
declare function getBlockIndexForParagraph(body: DocumentBody, paragraphIndex: number): number;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Headless API Entry Point
|
|
157
|
+
*
|
|
158
|
+
* Provides document manipulation functionality without React/DOM dependencies.
|
|
159
|
+
* Suitable for Node.js scripts, CLI tools, and server-side processing.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* import { DocumentAgent, parseDocx, pluginRegistry } from '@postnzt/docx-editor/headless';
|
|
164
|
+
* import { docxtemplaterPlugin } from '@postnzt/docx-editor/core-plugins';
|
|
165
|
+
*
|
|
166
|
+
* // Register plugins
|
|
167
|
+
* pluginRegistry.register(docxtemplaterPlugin);
|
|
168
|
+
*
|
|
169
|
+
* // Load and manipulate document
|
|
170
|
+
* const buffer = fs.readFileSync('template.docx');
|
|
171
|
+
* const agent = await DocumentAgent.fromBuffer(buffer);
|
|
172
|
+
*
|
|
173
|
+
* // Get document info
|
|
174
|
+
* console.log('Word count:', agent.getWordCount());
|
|
175
|
+
* console.log('Variables:', agent.getVariables());
|
|
176
|
+
*
|
|
177
|
+
* // Edit document
|
|
178
|
+
* const newAgent = agent
|
|
179
|
+
* .insertText({ paragraphIndex: 0, offset: 0 }, 'Hello ')
|
|
180
|
+
* .applyStyle(0, 'Heading1');
|
|
181
|
+
*
|
|
182
|
+
* // Apply template variables
|
|
183
|
+
* const finalAgent = await newAgent.applyVariables({
|
|
184
|
+
* customer_name: 'Jane Doe',
|
|
185
|
+
* date: '2024-02-15',
|
|
186
|
+
* });
|
|
187
|
+
*
|
|
188
|
+
* // Export
|
|
189
|
+
* const output = await finalAgent.toBuffer();
|
|
190
|
+
* fs.writeFileSync('output.docx', Buffer.from(output));
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
declare const VERSION = "0.0.2";
|
|
194
|
+
|
|
195
|
+
export { DocumentBody, Hyperlink, Paragraph, Position, Run, Table, TextFormatting, VERSION, countCharacters, countWords, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, isHeadingStyle, isPositionInHyperlink, parseHeadingLevel };
|