@eigenpal/docx-js-editor 0.0.27 → 0.0.29

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 (155) hide show
  1. package/dist/{ClipboardManager-YQYq5X_Z.d.ts → ClipboardManager-D0D4aUKE.d.ts} +1 -1
  2. package/dist/{ClipboardManager-BYO62Qs5.d.cts → ClipboardManager-t936d0KD.d.mts} +1 -1
  3. package/dist/{DocumentAgent-ZcA8CUmC.d.cts → DocumentAgent-BqA9EJ3F.d.mts} +1 -1
  4. package/dist/{DocumentAgent-BW1-gnqM.d.ts → DocumentAgent-CRCXiBT7.d.ts} +1 -1
  5. package/dist/FindReplaceDialog-AQFR4OCT.js +1 -1
  6. package/dist/FindReplaceDialog-N4J5OB7O.mjs +1 -0
  7. package/dist/FootnotePropertiesDialog-UFUIHLDW.mjs +1 -0
  8. package/dist/FootnotePropertiesDialog-YYIZU5U6.js +1 -1
  9. package/dist/HyperlinkDialog-HGZ2S37Z.js +1 -1
  10. package/dist/HyperlinkDialog-YQSQFHOP.mjs +1 -0
  11. package/dist/ImagePositionDialog-DQ4JWS4F.js +1 -1
  12. package/dist/ImagePositionDialog-HT6J2SHV.mjs +1 -0
  13. package/dist/ImagePropertiesDialog-3VK2S2AF.mjs +1 -0
  14. package/dist/ImagePropertiesDialog-GJMGLM6G.js +1 -1
  15. package/dist/PageSetupDialog-3QCVUNDL.mjs +1 -0
  16. package/dist/PageSetupDialog-ZZTFPZKJ.js +1 -1
  17. package/dist/TablePropertiesDialog-FI5E3RCB.mjs +1 -0
  18. package/dist/TablePropertiesDialog-STZOGHJB.js +1 -1
  19. package/dist/{agentApi-B0688ssC.d.cts → agentApi-BVHzyk2l.d.mts} +5 -1
  20. package/dist/{agentApi-B0688ssC.d.ts → agentApi-BVHzyk2l.d.ts} +5 -1
  21. package/dist/chunk-2KHL5RSD.js +4 -0
  22. package/dist/chunk-4VUZBV2S.js +1 -1
  23. package/dist/chunk-6WPRCJ5A.mjs +1 -0
  24. package/dist/chunk-7HZRJTOL.mjs +4 -0
  25. package/dist/chunk-AARNCPWR.js +1 -1
  26. package/dist/chunk-AZRYS2WF.mjs +2 -0
  27. package/dist/chunk-BUEMG4NW.js +1 -1
  28. package/dist/chunk-CQRI4YUS.mjs +26 -0
  29. package/dist/chunk-CTYOM6BE.js +2 -2
  30. package/dist/chunk-DLVLK5FT.mjs +24 -0
  31. package/dist/chunk-FVUGBRDD.js +1 -1
  32. package/dist/chunk-G72SXG7G.js +258 -0
  33. package/dist/chunk-H5NTJZO4.js +1 -1
  34. package/dist/chunk-I6LFWQFR.mjs +59 -0
  35. package/dist/chunk-IFPN3NT3.js +3 -0
  36. package/dist/chunk-IRO7KGGC.js +59 -0
  37. package/dist/chunk-KCUPCJFL.mjs +111 -0
  38. package/dist/chunk-LYBG4YI7.mjs +1 -0
  39. package/dist/chunk-M5F4SK3W.mjs +1 -0
  40. package/dist/chunk-MRWJ3GNH.js +9 -0
  41. package/dist/chunk-MVCTPHRR.mjs +258 -0
  42. package/dist/chunk-PB7VMDDP.js +24 -0
  43. package/dist/chunk-PJVI53AH.js +2 -2
  44. package/dist/chunk-QAZ4233N.mjs +1 -0
  45. package/dist/{chunk-OJ7NJK46.cjs → chunk-QQ63M65M.js} +1 -1
  46. package/dist/chunk-QTSXJRP6.mjs +1 -0
  47. package/dist/chunk-QVPR2W5S.js +1 -1
  48. package/dist/chunk-SE5EN2QL.js +1 -1
  49. package/dist/chunk-TAUMSKRE.mjs +1 -0
  50. package/dist/{chunk-JO2CKU4O.js → chunk-TDEHAPMZ.mjs} +1 -1
  51. package/dist/chunk-VHWEKJ35.js +10 -0
  52. package/dist/chunk-VR6PT4IZ.js +26 -0
  53. package/dist/chunk-W53SI3XW.mjs +1 -0
  54. package/dist/chunk-WOHFANC5.mjs +3 -0
  55. package/dist/chunk-XGL3EGKF.js +111 -0
  56. package/dist/chunk-XWBCP563.mjs +2 -0
  57. package/dist/{chunk-T2SRPPZY.js → chunk-YGTSQZRK.mjs} +1 -1
  58. package/dist/chunk-Z35FA4M4.mjs +10 -0
  59. package/dist/{clipboard-Da1iPK0O.d.cts → clipboard-B7N7Kx2X.d.ts} +1 -1
  60. package/dist/{clipboard-D0EG6AxE.d.ts → clipboard-BkM7Zvgs.d.mts} +1 -1
  61. package/dist/{colorResolver-DR1p8Eg-.d.cts → colorResolver-BwI_Uxp3.d.mts} +2 -2
  62. package/dist/{colorResolver-Dk7bMHIa.d.ts → colorResolver-Dlmk3itT.d.ts} +2 -2
  63. package/dist/{core-plugins-reexport.d.cts → core-plugins-reexport.d.mts} +4 -4
  64. package/dist/core-plugins-reexport.d.ts +4 -4
  65. package/dist/core-plugins-reexport.js +1 -1
  66. package/dist/core-plugins-reexport.mjs +1 -0
  67. package/dist/{core-reexport.d.cts → core-reexport.d.mts} +11 -11
  68. package/dist/core-reexport.d.ts +10 -10
  69. package/dist/core-reexport.js +1 -1
  70. package/dist/core-reexport.mjs +1 -0
  71. package/dist/executor-L2MVKMXO.js +1 -1
  72. package/dist/executor-XKBCCVNY.mjs +1 -0
  73. package/dist/{fontLoader-C7RvUiHx.d.ts → fontLoader-BI9ZoACv.d.ts} +1 -1
  74. package/dist/{fontLoader-54sS8rtN.d.cts → fontLoader-DicgJidU.d.mts} +1 -1
  75. package/dist/{headless-reexport.d.cts → headless-reexport.d.mts} +7 -7
  76. package/dist/headless-reexport.d.ts +7 -7
  77. package/dist/headless-reexport.js +2 -2
  78. package/dist/headless-reexport.mjs +4 -0
  79. package/dist/{index.d.cts → index.d.mts} +14 -14
  80. package/dist/index.d.ts +11 -11
  81. package/dist/index.js +6 -6
  82. package/dist/index.mjs +155 -0
  83. package/dist/lib-BCT2DRYI.mjs +1 -0
  84. package/dist/lib-U35UU4OU.js +1 -0
  85. package/dist/{mcp-reexport.d.cts → mcp-reexport.d.mts} +2 -2
  86. package/dist/mcp-reexport.d.ts +2 -2
  87. package/dist/mcp-reexport.js +9 -9
  88. package/dist/mcp-reexport.mjs +16 -0
  89. package/dist/processTemplate-5ZST2Q5L.js +1 -0
  90. package/dist/{processTemplate-3HN7Q3KT.js → processTemplate-LRHXOWMZ.mjs} +1 -1
  91. package/dist/{react-XjilVrXZ.d.cts → react-By80Gfi-.d.ts} +8 -4
  92. package/dist/{react-C_O0Z9ci.d.ts → react-C-pJU0Y4.d.mts} +8 -4
  93. package/dist/{react.d.cts → react.d.mts} +5 -5
  94. package/dist/react.d.ts +5 -5
  95. package/dist/react.js +1 -1
  96. package/dist/react.mjs +1 -0
  97. package/dist/{registry-BHOeZbR9.d.ts → registry-CgWNVTk9.d.ts} +1 -1
  98. package/dist/{registry-CqFFeBgF.d.cts → registry-DyIMyB-0.d.mts} +1 -1
  99. package/dist/selectionRects-6TRAXB7D.js +1 -0
  100. package/dist/selectionRects-IS7ZAS3A.mjs +1 -0
  101. package/dist/{types-DAxXgYu5.d.cts → types-B3LkfO0u.d.mts} +1 -1
  102. package/dist/{types-BwCYaZKB.d.ts → types-igZ1x_e4.d.ts} +1 -1
  103. package/dist/{ui.d.cts → ui.d.mts} +4 -4
  104. package/dist/ui.d.ts +4 -4
  105. package/dist/ui.js +1 -1
  106. package/dist/ui.mjs +1 -0
  107. package/dist/{variableDetector-DIeB1Nxd.d.cts → variableDetector-CIqTek7A.d.mts} +1 -1
  108. package/dist/{variableDetector-B2FHghLx.d.ts → variableDetector-CkYvLv62.d.ts} +1 -1
  109. package/package.json +17 -18
  110. package/dist/FindReplaceDialog-J3DI3U5I.cjs +0 -1
  111. package/dist/FootnotePropertiesDialog-DO5DCAW6.cjs +0 -1
  112. package/dist/HyperlinkDialog-PEPS3C2G.cjs +0 -1
  113. package/dist/ImagePositionDialog-UYXYHSP4.cjs +0 -1
  114. package/dist/ImagePropertiesDialog-V6SVKINO.cjs +0 -1
  115. package/dist/PageSetupDialog-RLMYJ3BA.cjs +0 -1
  116. package/dist/TablePropertiesDialog-A36OXG3A.cjs +0 -1
  117. package/dist/chunk-2VHQ7YOQ.cjs +0 -1
  118. package/dist/chunk-4XF5YD4I.js +0 -111
  119. package/dist/chunk-76GITSCY.cjs +0 -258
  120. package/dist/chunk-7YCCCWUZ.cjs +0 -3
  121. package/dist/chunk-ABNIHWGF.js +0 -10
  122. package/dist/chunk-B7TICMXD.cjs +0 -23
  123. package/dist/chunk-CL62W2HQ.cjs +0 -26
  124. package/dist/chunk-CLDB6TL7.js +0 -23
  125. package/dist/chunk-E7U5ZBOK.js +0 -3
  126. package/dist/chunk-EUH3GF72.cjs +0 -111
  127. package/dist/chunk-H7AKDCWH.js +0 -258
  128. package/dist/chunk-IA4LPH2A.cjs +0 -1
  129. package/dist/chunk-J5YOIHCW.cjs +0 -10
  130. package/dist/chunk-KR32M3S4.cjs +0 -1
  131. package/dist/chunk-MHUCHYNM.cjs +0 -59
  132. package/dist/chunk-NKW2UER2.cjs +0 -9
  133. package/dist/chunk-NVAQQYBJ.cjs +0 -1
  134. package/dist/chunk-P7ZF45KZ.cjs +0 -1
  135. package/dist/chunk-PCJ5ACUV.cjs +0 -1
  136. package/dist/chunk-PP54GVGD.js +0 -59
  137. package/dist/chunk-USRMBYI6.js +0 -3
  138. package/dist/chunk-VTAS7VZ6.cjs +0 -2
  139. package/dist/chunk-XQNCLN4T.cjs +0 -3
  140. package/dist/chunk-XS2AQFMF.cjs +0 -2
  141. package/dist/chunk-YP3CXYSU.js +0 -26
  142. package/dist/chunk-YS7FDEZ4.cjs +0 -1
  143. package/dist/core-plugins-reexport.cjs +0 -1
  144. package/dist/core-reexport.cjs +0 -1
  145. package/dist/executor-JGWZ7S6Z.cjs +0 -1
  146. package/dist/headless-reexport.cjs +0 -4
  147. package/dist/index.cjs +0 -155
  148. package/dist/lib-GD2QD2JK.js +0 -1
  149. package/dist/lib-HOLGQI5K.cjs +0 -1
  150. package/dist/mcp-reexport.cjs +0 -16
  151. package/dist/processTemplate-BXZKWRQD.cjs +0 -1
  152. package/dist/react.cjs +0 -1
  153. package/dist/selectionRects-BMXJJCPJ.cjs +0 -1
  154. package/dist/selectionRects-TWK7CAC3.js +0 -1
  155. package/dist/ui.cjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Node } from 'prosemirror-model';
4
- import { D as Document, e as Table, b as Run } from './agentApi-B0688ssC.js';
4
+ import { D as Document, e as Table, b as Run } from './agentApi-BVHzyk2l.js';
5
5
 
6
6
  /**
7
7
  * Framework-Agnostic Plugin Interface for the DOCX Editor
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from 'prosemirror-state';
2
2
  import { EditorView } from 'prosemirror-view';
3
3
  import { Node } from 'prosemirror-model';
4
- import { D as Document, e as Table, b as Run } from './agentApi-B0688ssC.cjs';
4
+ import { D as Document, e as Table, b as Run } from './agentApi-BVHzyk2l.mjs';
5
5
 
6
6
  /**
7
7
  * Framework-Agnostic Plugin Interface for the DOCX Editor
@@ -1,4 +1,4 @@
1
- import { D as Document, T as TextFormatting, O as StyleInfo, h as AgentContext, P as Position, R as Range, w as ParagraphFormatting, A as AgentCommand } from './agentApi-B0688ssC.cjs';
1
+ import { D as Document, T as TextFormatting, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-BVHzyk2l.mjs';
2
2
 
3
3
  /**
4
4
  * Selective Save Module
@@ -1,4 +1,4 @@
1
- import { D as Document, T as TextFormatting, O as StyleInfo, h as AgentContext, P as Position, R as Range, w as ParagraphFormatting, A as AgentCommand } from './agentApi-B0688ssC.js';
1
+ import { D as Document, T as TextFormatting, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-BVHzyk2l.js';
2
2
 
3
3
  /**
4
4
  * Selective Save Module
@@ -1 +1 @@
1
- export{n as FindReplaceDialog,a as createDefaultFindOptions,c as createSearchPattern,o as default,b as escapeRegexString,d as findAllMatches,j as findInDocument,k as findInParagraph,i as getDefaultHighlightOptions,g as getMatchCountText,h as isEmptySearch,e as replaceAllInContent,f as replaceFirstInContent,l as scrollToMatch,m as useFindReplace}from'./chunk-CTYOM6BE.js';import'./chunk-H5NTJZO4.js';
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkCTYOM6BE_js=require('./chunk-CTYOM6BE.js');require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"FindReplaceDialog",{enumerable:true,get:function(){return chunkCTYOM6BE_js.n}});Object.defineProperty(exports,"createDefaultFindOptions",{enumerable:true,get:function(){return chunkCTYOM6BE_js.a}});Object.defineProperty(exports,"createSearchPattern",{enumerable:true,get:function(){return chunkCTYOM6BE_js.c}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkCTYOM6BE_js.o}});Object.defineProperty(exports,"escapeRegexString",{enumerable:true,get:function(){return chunkCTYOM6BE_js.b}});Object.defineProperty(exports,"findAllMatches",{enumerable:true,get:function(){return chunkCTYOM6BE_js.d}});Object.defineProperty(exports,"findInDocument",{enumerable:true,get:function(){return chunkCTYOM6BE_js.j}});Object.defineProperty(exports,"findInParagraph",{enumerable:true,get:function(){return chunkCTYOM6BE_js.k}});Object.defineProperty(exports,"getDefaultHighlightOptions",{enumerable:true,get:function(){return chunkCTYOM6BE_js.i}});Object.defineProperty(exports,"getMatchCountText",{enumerable:true,get:function(){return chunkCTYOM6BE_js.g}});Object.defineProperty(exports,"isEmptySearch",{enumerable:true,get:function(){return chunkCTYOM6BE_js.h}});Object.defineProperty(exports,"replaceAllInContent",{enumerable:true,get:function(){return chunkCTYOM6BE_js.e}});Object.defineProperty(exports,"replaceFirstInContent",{enumerable:true,get:function(){return chunkCTYOM6BE_js.f}});Object.defineProperty(exports,"scrollToMatch",{enumerable:true,get:function(){return chunkCTYOM6BE_js.l}});Object.defineProperty(exports,"useFindReplace",{enumerable:true,get:function(){return chunkCTYOM6BE_js.m}});
@@ -0,0 +1 @@
1
+ export{n as FindReplaceDialog,a as createDefaultFindOptions,c as createSearchPattern,o as default,b as escapeRegexString,d as findAllMatches,j as findInDocument,k as findInParagraph,i as getDefaultHighlightOptions,g as getMatchCountText,h as isEmptySearch,e as replaceAllInContent,f as replaceFirstInContent,l as scrollToMatch,m as useFindReplace}from'./chunk-XWBCP563.mjs';import'./chunk-TAUMSKRE.mjs';
@@ -0,0 +1 @@
1
+ import'./chunk-TAUMSKRE.mjs';import {useState,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var A={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},D={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},a={display:"block",fontSize:12,color:"#666",marginBottom:4},i={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},P={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},L={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},h={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},O={...h,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},f=[{value:"decimal",label:"1, 2, 3, ..."},{value:"lowerRoman",label:"i, ii, iii, ..."},{value:"upperRoman",label:"I, II, III, ..."},{value:"lowerLetter",label:"a, b, c, ..."},{value:"upperLetter",label:"A, B, C, ..."},{value:"chicago",label:"*, \u2020, \u2021, ..."}];function j({isOpen:x,onClose:l,onApply:y,footnotePr:r,endnotePr:s}){let[u,C]=useState(r?.position??"pageBottom"),[p,F]=useState(r?.numFmt??"decimal"),[m,N]=useState(r?.numStart??1),[c,R]=useState(r?.numRestart??"continuous"),[d,E]=useState(s?.position??"docEnd"),[b,k]=useState(s?.numFmt??"lowerRoman"),[v,I]=useState(s?.numStart??1),[g,w]=useState(s?.numRestart??"continuous"),B=useCallback(()=>{y({position:u,numFmt:p,numStart:m,numRestart:c},{position:d,numFmt:b,numStart:v,numRestart:g}),l();},[u,p,m,c,d,b,v,g,y,l]);return x?jsx("div",{style:A,onClick:l,children:jsxs("div",{style:D,onClick:e=>e.stopPropagation(),children:[jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:"Footnote & Endnote Properties"}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:"Footnotes"}),jsx("label",{style:a,children:"Position"}),jsxs("select",{style:i,value:u,onChange:e=>C(e.target.value),children:[jsx("option",{value:"pageBottom",children:"Bottom of page"}),jsx("option",{value:"beneathText",children:"Below text"})]}),jsx("label",{style:a,children:"Number format"}),jsx("select",{style:i,value:p,onChange:e=>F(e.target.value),children:f.map(e=>jsx("option",{value:e.value,children:e.label},e.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:a,children:"Start at"}),jsx("input",{type:"number",min:1,style:P,value:m,onChange:e=>N(parseInt(e.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:a,children:"Numbering"}),jsxs("select",{style:i,value:c,onChange:e=>R(e.target.value),children:[jsx("option",{value:"continuous",children:"Continuous"}),jsx("option",{value:"eachSect",children:"Restart each section"}),jsx("option",{value:"eachPage",children:"Restart each page"})]})]})]})]}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:"Endnotes"}),jsx("label",{style:a,children:"Position"}),jsxs("select",{style:i,value:d,onChange:e=>E(e.target.value),children:[jsx("option",{value:"docEnd",children:"End of document"}),jsx("option",{value:"sectEnd",children:"End of section"})]}),jsx("label",{style:a,children:"Number format"}),jsx("select",{style:i,value:b,onChange:e=>k(e.target.value),children:f.map(e=>jsx("option",{value:e.value,children:e.label},e.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:a,children:"Start at"}),jsx("input",{type:"number",min:1,style:P,value:v,onChange:e=>I(parseInt(e.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:a,children:"Numbering"}),jsxs("select",{style:i,value:g,onChange:e=>w(e.target.value),children:[jsx("option",{value:"continuous",children:"Continuous"}),jsx("option",{value:"eachSect",children:"Restart each section"})]})]})]})]}),jsxs("div",{style:L,children:[jsx("button",{style:h,onClick:l,children:"Cancel"}),jsx("button",{style:O,onClick:B,children:"Apply"})]})]})}):null}export{j as FootnotePropertiesDialog};
@@ -1 +1 @@
1
- import'./chunk-H5NTJZO4.js';import {useState,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var A={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},D={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},a={display:"block",fontSize:12,color:"#666",marginBottom:4},i={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},P={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},L={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},h={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},O={...h,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},f=[{value:"decimal",label:"1, 2, 3, ..."},{value:"lowerRoman",label:"i, ii, iii, ..."},{value:"upperRoman",label:"I, II, III, ..."},{value:"lowerLetter",label:"a, b, c, ..."},{value:"upperLetter",label:"A, B, C, ..."},{value:"chicago",label:"*, \u2020, \u2021, ..."}];function j({isOpen:x,onClose:l,onApply:y,footnotePr:r,endnotePr:s}){let[u,C]=useState(r?.position??"pageBottom"),[p,F]=useState(r?.numFmt??"decimal"),[m,N]=useState(r?.numStart??1),[c,R]=useState(r?.numRestart??"continuous"),[d,E]=useState(s?.position??"docEnd"),[b,k]=useState(s?.numFmt??"lowerRoman"),[v,I]=useState(s?.numStart??1),[g,w]=useState(s?.numRestart??"continuous"),B=useCallback(()=>{y({position:u,numFmt:p,numStart:m,numRestart:c},{position:d,numFmt:b,numStart:v,numRestart:g}),l();},[u,p,m,c,d,b,v,g,y,l]);return x?jsx("div",{style:A,onClick:l,children:jsxs("div",{style:D,onClick:e=>e.stopPropagation(),children:[jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:"Footnote & Endnote Properties"}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:"Footnotes"}),jsx("label",{style:a,children:"Position"}),jsxs("select",{style:i,value:u,onChange:e=>C(e.target.value),children:[jsx("option",{value:"pageBottom",children:"Bottom of page"}),jsx("option",{value:"beneathText",children:"Below text"})]}),jsx("label",{style:a,children:"Number format"}),jsx("select",{style:i,value:p,onChange:e=>F(e.target.value),children:f.map(e=>jsx("option",{value:e.value,children:e.label},e.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:a,children:"Start at"}),jsx("input",{type:"number",min:1,style:P,value:m,onChange:e=>N(parseInt(e.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:a,children:"Numbering"}),jsxs("select",{style:i,value:c,onChange:e=>R(e.target.value),children:[jsx("option",{value:"continuous",children:"Continuous"}),jsx("option",{value:"eachSect",children:"Restart each section"}),jsx("option",{value:"eachPage",children:"Restart each page"})]})]})]})]}),jsxs("div",{style:S,children:[jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:"Endnotes"}),jsx("label",{style:a,children:"Position"}),jsxs("select",{style:i,value:d,onChange:e=>E(e.target.value),children:[jsx("option",{value:"docEnd",children:"End of document"}),jsx("option",{value:"sectEnd",children:"End of section"})]}),jsx("label",{style:a,children:"Number format"}),jsx("select",{style:i,value:b,onChange:e=>k(e.target.value),children:f.map(e=>jsx("option",{value:e.value,children:e.label},e.value))}),jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxs("div",{children:[jsx("label",{style:a,children:"Start at"}),jsx("input",{type:"number",min:1,style:P,value:v,onChange:e=>I(parseInt(e.target.value,10)||1)})]}),jsxs("div",{style:{flex:1},children:[jsx("label",{style:a,children:"Numbering"}),jsxs("select",{style:i,value:g,onChange:e=>w(e.target.value),children:[jsx("option",{value:"continuous",children:"Continuous"}),jsx("option",{value:"eachSect",children:"Restart each section"})]})]})]})]}),jsxs("div",{style:L,children:[jsx("button",{style:h,onClick:l,children:"Cancel"}),jsx("button",{style:O,onClick:B,children:"Apply"})]})]})}):null}export{j as FootnotePropertiesDialog};
1
+ 'use strict';require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var A={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},D={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",padding:24,minWidth:400,maxWidth:500},S={marginBottom:16,padding:12,border:"1px solid #e0e0e0",borderRadius:4},a={display:"block",fontSize:12,color:"#666",marginBottom:4},i={width:"100%",padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},P={width:60,padding:"4px 8px",border:"1px solid #ccc",borderRadius:4,fontSize:13,marginBottom:8},L={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},h={padding:"6px 16px",border:"1px solid #ccc",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"white"},O={...h,backgroundColor:"#2563eb",color:"white",border:"1px solid #2563eb"},f=[{value:"decimal",label:"1, 2, 3, ..."},{value:"lowerRoman",label:"i, ii, iii, ..."},{value:"upperRoman",label:"I, II, III, ..."},{value:"lowerLetter",label:"a, b, c, ..."},{value:"upperLetter",label:"A, B, C, ..."},{value:"chicago",label:"*, \u2020, \u2021, ..."}];function j({isOpen:x,onClose:l,onApply:y,footnotePr:r,endnotePr:s}){let[u,C]=react.useState(r?.position??"pageBottom"),[p,F]=react.useState(r?.numFmt??"decimal"),[m,N]=react.useState(r?.numStart??1),[c,R]=react.useState(r?.numRestart??"continuous"),[d,E]=react.useState(s?.position??"docEnd"),[b,k]=react.useState(s?.numFmt??"lowerRoman"),[v,I]=react.useState(s?.numStart??1),[g,w]=react.useState(s?.numRestart??"continuous"),B=react.useCallback(()=>{y({position:u,numFmt:p,numStart:m,numRestart:c},{position:d,numFmt:b,numStart:v,numRestart:g}),l();},[u,p,m,c,d,b,v,g,y,l]);return x?jsxRuntime.jsx("div",{style:A,onClick:l,children:jsxRuntime.jsxs("div",{style:D,onClick:e=>e.stopPropagation(),children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:"Footnote & Endnote Properties"}),jsxRuntime.jsxs("div",{style:S,children:[jsxRuntime.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:"Footnotes"}),jsxRuntime.jsx("label",{style:a,children:"Position"}),jsxRuntime.jsxs("select",{style:i,value:u,onChange:e=>C(e.target.value),children:[jsxRuntime.jsx("option",{value:"pageBottom",children:"Bottom of page"}),jsxRuntime.jsx("option",{value:"beneathText",children:"Below text"})]}),jsxRuntime.jsx("label",{style:a,children:"Number format"}),jsxRuntime.jsx("select",{style:i,value:p,onChange:e=>F(e.target.value),children:f.map(e=>jsxRuntime.jsx("option",{value:e.value,children:e.label},e.value))}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{style:a,children:"Start at"}),jsxRuntime.jsx("input",{type:"number",min:1,style:P,value:m,onChange:e=>N(parseInt(e.target.value,10)||1)})]}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("label",{style:a,children:"Numbering"}),jsxRuntime.jsxs("select",{style:i,value:c,onChange:e=>R(e.target.value),children:[jsxRuntime.jsx("option",{value:"continuous",children:"Continuous"}),jsxRuntime.jsx("option",{value:"eachSect",children:"Restart each section"}),jsxRuntime.jsx("option",{value:"eachPage",children:"Restart each page"})]})]})]})]}),jsxRuntime.jsxs("div",{style:S,children:[jsxRuntime.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:"Endnotes"}),jsxRuntime.jsx("label",{style:a,children:"Position"}),jsxRuntime.jsxs("select",{style:i,value:d,onChange:e=>E(e.target.value),children:[jsxRuntime.jsx("option",{value:"docEnd",children:"End of document"}),jsxRuntime.jsx("option",{value:"sectEnd",children:"End of section"})]}),jsxRuntime.jsx("label",{style:a,children:"Number format"}),jsxRuntime.jsx("select",{style:i,value:b,onChange:e=>k(e.target.value),children:f.map(e=>jsxRuntime.jsx("option",{value:e.value,children:e.label},e.value))}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{style:a,children:"Start at"}),jsxRuntime.jsx("input",{type:"number",min:1,style:P,value:v,onChange:e=>I(parseInt(e.target.value,10)||1)})]}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("label",{style:a,children:"Numbering"}),jsxRuntime.jsxs("select",{style:i,value:g,onChange:e=>w(e.target.value),children:[jsxRuntime.jsx("option",{value:"continuous",children:"Continuous"}),jsxRuntime.jsx("option",{value:"eachSect",children:"Restart each section"})]})]})]})]}),jsxRuntime.jsxs("div",{style:L,children:[jsxRuntime.jsx("button",{style:h,onClick:l,children:"Cancel"}),jsxRuntime.jsx("button",{style:O,onClick:B,children:"Apply"})]})]})}):null}exports.FootnotePropertiesDialog=j;
@@ -1 +1 @@
1
- export{d as HyperlinkDialog,f as createBookmarkLinkData,e as createHyperlinkData,n as default,j as emailToMailto,l as extractBookmarksForDialog,i as getDisplayText,c as getUrlType,h as isBookmarkHyperlinkData,g as isExternalHyperlinkData,a as isValidUrl,b as normalizeUrl,k as phoneToTel,m as useHyperlinkDialog}from'./chunk-PJVI53AH.js';import'./chunk-H5NTJZO4.js';
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkPJVI53AH_js=require('./chunk-PJVI53AH.js');require('./chunk-H5NTJZO4.js');Object.defineProperty(exports,"HyperlinkDialog",{enumerable:true,get:function(){return chunkPJVI53AH_js.d}});Object.defineProperty(exports,"createBookmarkLinkData",{enumerable:true,get:function(){return chunkPJVI53AH_js.f}});Object.defineProperty(exports,"createHyperlinkData",{enumerable:true,get:function(){return chunkPJVI53AH_js.e}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkPJVI53AH_js.n}});Object.defineProperty(exports,"emailToMailto",{enumerable:true,get:function(){return chunkPJVI53AH_js.j}});Object.defineProperty(exports,"extractBookmarksForDialog",{enumerable:true,get:function(){return chunkPJVI53AH_js.l}});Object.defineProperty(exports,"getDisplayText",{enumerable:true,get:function(){return chunkPJVI53AH_js.i}});Object.defineProperty(exports,"getUrlType",{enumerable:true,get:function(){return chunkPJVI53AH_js.c}});Object.defineProperty(exports,"isBookmarkHyperlinkData",{enumerable:true,get:function(){return chunkPJVI53AH_js.h}});Object.defineProperty(exports,"isExternalHyperlinkData",{enumerable:true,get:function(){return chunkPJVI53AH_js.g}});Object.defineProperty(exports,"isValidUrl",{enumerable:true,get:function(){return chunkPJVI53AH_js.a}});Object.defineProperty(exports,"normalizeUrl",{enumerable:true,get:function(){return chunkPJVI53AH_js.b}});Object.defineProperty(exports,"phoneToTel",{enumerable:true,get:function(){return chunkPJVI53AH_js.k}});Object.defineProperty(exports,"useHyperlinkDialog",{enumerable:true,get:function(){return chunkPJVI53AH_js.m}});
@@ -0,0 +1 @@
1
+ export{d as HyperlinkDialog,f as createBookmarkLinkData,e as createHyperlinkData,n as default,j as emailToMailto,l as extractBookmarksForDialog,i as getDisplayText,c as getUrlType,h as isBookmarkHyperlinkData,g as isExternalHyperlinkData,a as isValidUrl,b as normalizeUrl,k as phoneToTel,m as useHyperlinkDialog}from'./chunk-AZRYS2WF.mjs';import'./chunk-TAUMSKRE.mjs';
@@ -1 +1 @@
1
- import'./chunk-H5NTJZO4.js';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var F={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},G={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},J={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},Q={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},w={display:"flex",flexDirection:"column",gap:8},I={fontSize:13,fontWeight:600,color:"var(--doc-text)"},l={display:"flex",alignItems:"center",gap:8},a={width:75,fontSize:12,color:"var(--doc-text-muted)"},s={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},d={...s},U={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},K={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function Z({isOpen:f,onClose:r,onApply:D,currentData:n}){let[v,u]=useState("align"),[y,k]=useState("center"),[c,z]=useState("column"),[b,A]=useState(0),[g,m]=useState("align"),[h,L]=useState("top"),[S,B]=useState("paragraph"),[x,M]=useState(0),[C,N]=useState(0),[P,E]=useState(0),[T,H]=useState(0),[R,V]=useState(0);useEffect(()=>{if(!f)return;let e=n?.horizontal,p=n?.vertical;e?.align?(u("align"),k(e.align)):e?.posOffset!=null&&(u("offset"),A(e.posOffset)),e?.relativeTo&&z(e.relativeTo),p?.align?(m("align"),L(p.align)):p?.posOffset!=null&&(m("offset"),M(p.posOffset)),p?.relativeTo&&B(p.relativeTo),N(n?.distTop??0),E(n?.distBottom??0),H(n?.distLeft??0),V(n?.distRight??0);},[f,n]);let O=useCallback(()=>{let e={};e.horizontal={relativeTo:c,...v==="align"?{align:y}:{posOffset:b}},e.vertical={relativeTo:S,...g==="align"?{align:h}:{posOffset:x}},e.distTop=C,e.distBottom=P,e.distLeft=T,e.distRight=R,D(e),r();},[v,y,c,b,g,h,S,x,C,P,T,R,D,r]),j=useCallback(e=>{e.key==="Escape"&&r(),e.key==="Enter"&&O();},[r,O]);return f?jsx("div",{style:F,onClick:r,onKeyDown:j,children:jsxs("div",{style:G,onClick:e=>e.stopPropagation(),role:"dialog","aria-label":"Image position",children:[jsx("div",{style:J,children:"Image Position"}),jsxs("div",{style:Q,children:[jsxs("div",{style:w,children:[jsx("div",{style:I,children:"Horizontal"}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Position"}),jsxs("select",{style:d,value:v,onChange:e=>u(e.target.value),children:[jsx("option",{value:"align",children:"Alignment"}),jsx("option",{value:"offset",children:"Offset"})]})]}),v==="align"?jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Align"}),jsxs("select",{style:d,value:y,onChange:e=>k(e.target.value),children:[jsx("option",{value:"left",children:"Left"}),jsx("option",{value:"center",children:"Center"}),jsx("option",{value:"right",children:"Right"})]})]}):jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Offset (px)"}),jsx("input",{type:"number",style:s,value:b,onChange:e=>A(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Relative to"}),jsxs("select",{style:d,value:c,onChange:e=>z(e.target.value),children:[jsx("option",{value:"page",children:"Page"}),jsx("option",{value:"column",children:"Column"}),jsx("option",{value:"margin",children:"Margin"}),jsx("option",{value:"character",children:"Character"})]})]})]}),jsxs("div",{style:w,children:[jsx("div",{style:I,children:"Vertical"}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Position"}),jsxs("select",{style:d,value:g,onChange:e=>m(e.target.value),children:[jsx("option",{value:"align",children:"Alignment"}),jsx("option",{value:"offset",children:"Offset"})]})]}),g==="align"?jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Align"}),jsxs("select",{style:d,value:h,onChange:e=>L(e.target.value),children:[jsx("option",{value:"top",children:"Top"}),jsx("option",{value:"center",children:"Center"}),jsx("option",{value:"bottom",children:"Bottom"})]})]}):jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Offset (px)"}),jsx("input",{type:"number",style:s,value:x,onChange:e=>M(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Relative to"}),jsxs("select",{style:d,value:S,onChange:e=>B(e.target.value),children:[jsx("option",{value:"page",children:"Page"}),jsx("option",{value:"margin",children:"Margin"}),jsx("option",{value:"paragraph",children:"Paragraph"}),jsx("option",{value:"line",children:"Line"})]})]})]}),jsxs("div",{style:w,children:[jsx("div",{style:I,children:"Distance from text (px)"}),jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Top"}),jsx("input",{type:"number",style:s,min:0,value:C,onChange:e=>N(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Bottom"}),jsx("input",{type:"number",style:s,min:0,value:P,onChange:e=>E(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Left"}),jsx("input",{type:"number",style:s,min:0,value:T,onChange:e=>H(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Right"}),jsx("input",{type:"number",style:s,min:0,value:R,onChange:e=>V(Number(e.target.value)||0)})]})]})]})]}),jsxs("div",{style:U,children:[jsx("button",{type:"button",style:K,onClick:r,children:"Cancel"}),jsx("button",{type:"button",style:{...K,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:O,children:"Apply"})]})]})}):null}export{Z as ImagePositionDialog};
1
+ 'use strict';require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var F={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},G={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},J={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},Q={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},w={display:"flex",flexDirection:"column",gap:8},I={fontSize:13,fontWeight:600,color:"var(--doc-text)"},l={display:"flex",alignItems:"center",gap:8},a={width:75,fontSize:12,color:"var(--doc-text-muted)"},s={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},d={...s},U={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},K={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function Z({isOpen:f,onClose:r,onApply:D,currentData:n}){let[v,u]=react.useState("align"),[y,k]=react.useState("center"),[c,z]=react.useState("column"),[b,A]=react.useState(0),[g,m]=react.useState("align"),[h,L]=react.useState("top"),[S,B]=react.useState("paragraph"),[x,M]=react.useState(0),[C,N]=react.useState(0),[P,E]=react.useState(0),[T,H]=react.useState(0),[R,V]=react.useState(0);react.useEffect(()=>{if(!f)return;let e=n?.horizontal,p=n?.vertical;e?.align?(u("align"),k(e.align)):e?.posOffset!=null&&(u("offset"),A(e.posOffset)),e?.relativeTo&&z(e.relativeTo),p?.align?(m("align"),L(p.align)):p?.posOffset!=null&&(m("offset"),M(p.posOffset)),p?.relativeTo&&B(p.relativeTo),N(n?.distTop??0),E(n?.distBottom??0),H(n?.distLeft??0),V(n?.distRight??0);},[f,n]);let O=react.useCallback(()=>{let e={};e.horizontal={relativeTo:c,...v==="align"?{align:y}:{posOffset:b}},e.vertical={relativeTo:S,...g==="align"?{align:h}:{posOffset:x}},e.distTop=C,e.distBottom=P,e.distLeft=T,e.distRight=R,D(e),r();},[v,y,c,b,g,h,S,x,C,P,T,R,D,r]),j=react.useCallback(e=>{e.key==="Escape"&&r(),e.key==="Enter"&&O();},[r,O]);return f?jsxRuntime.jsx("div",{style:F,onClick:r,onKeyDown:j,children:jsxRuntime.jsxs("div",{style:G,onClick:e=>e.stopPropagation(),role:"dialog","aria-label":"Image position",children:[jsxRuntime.jsx("div",{style:J,children:"Image Position"}),jsxRuntime.jsxs("div",{style:Q,children:[jsxRuntime.jsxs("div",{style:w,children:[jsxRuntime.jsx("div",{style:I,children:"Horizontal"}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Position"}),jsxRuntime.jsxs("select",{style:d,value:v,onChange:e=>u(e.target.value),children:[jsxRuntime.jsx("option",{value:"align",children:"Alignment"}),jsxRuntime.jsx("option",{value:"offset",children:"Offset"})]})]}),v==="align"?jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Align"}),jsxRuntime.jsxs("select",{style:d,value:y,onChange:e=>k(e.target.value),children:[jsxRuntime.jsx("option",{value:"left",children:"Left"}),jsxRuntime.jsx("option",{value:"center",children:"Center"}),jsxRuntime.jsx("option",{value:"right",children:"Right"})]})]}):jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Offset (px)"}),jsxRuntime.jsx("input",{type:"number",style:s,value:b,onChange:e=>A(Number(e.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Relative to"}),jsxRuntime.jsxs("select",{style:d,value:c,onChange:e=>z(e.target.value),children:[jsxRuntime.jsx("option",{value:"page",children:"Page"}),jsxRuntime.jsx("option",{value:"column",children:"Column"}),jsxRuntime.jsx("option",{value:"margin",children:"Margin"}),jsxRuntime.jsx("option",{value:"character",children:"Character"})]})]})]}),jsxRuntime.jsxs("div",{style:w,children:[jsxRuntime.jsx("div",{style:I,children:"Vertical"}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Position"}),jsxRuntime.jsxs("select",{style:d,value:g,onChange:e=>m(e.target.value),children:[jsxRuntime.jsx("option",{value:"align",children:"Alignment"}),jsxRuntime.jsx("option",{value:"offset",children:"Offset"})]})]}),g==="align"?jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Align"}),jsxRuntime.jsxs("select",{style:d,value:h,onChange:e=>L(e.target.value),children:[jsxRuntime.jsx("option",{value:"top",children:"Top"}),jsxRuntime.jsx("option",{value:"center",children:"Center"}),jsxRuntime.jsx("option",{value:"bottom",children:"Bottom"})]})]}):jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Offset (px)"}),jsxRuntime.jsx("input",{type:"number",style:s,value:x,onChange:e=>M(Number(e.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:a,children:"Relative to"}),jsxRuntime.jsxs("select",{style:d,value:S,onChange:e=>B(e.target.value),children:[jsxRuntime.jsx("option",{value:"page",children:"Page"}),jsxRuntime.jsx("option",{value:"margin",children:"Margin"}),jsxRuntime.jsx("option",{value:"paragraph",children:"Paragraph"}),jsxRuntime.jsx("option",{value:"line",children:"Line"})]})]})]}),jsxRuntime.jsxs("div",{style:w,children:[jsxRuntime.jsx("div",{style:I,children:"Distance from text (px)"}),jsxRuntime.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:{...a,width:45},children:"Top"}),jsxRuntime.jsx("input",{type:"number",style:s,min:0,value:C,onChange:e=>N(Number(e.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:{...a,width:45},children:"Bottom"}),jsxRuntime.jsx("input",{type:"number",style:s,min:0,value:P,onChange:e=>E(Number(e.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:{...a,width:45},children:"Left"}),jsxRuntime.jsx("input",{type:"number",style:s,min:0,value:T,onChange:e=>H(Number(e.target.value)||0)})]}),jsxRuntime.jsxs("div",{style:l,children:[jsxRuntime.jsx("label",{style:{...a,width:45},children:"Right"}),jsxRuntime.jsx("input",{type:"number",style:s,min:0,value:R,onChange:e=>V(Number(e.target.value)||0)})]})]})]})]}),jsxRuntime.jsxs("div",{style:U,children:[jsxRuntime.jsx("button",{type:"button",style:K,onClick:r,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",style:{...K,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:O,children:"Apply"})]})]})}):null}exports.ImagePositionDialog=Z;
@@ -0,0 +1 @@
1
+ import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var F={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},G={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},J={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},Q={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},w={display:"flex",flexDirection:"column",gap:8},I={fontSize:13,fontWeight:600,color:"var(--doc-text)"},l={display:"flex",alignItems:"center",gap:8},a={width:75,fontSize:12,color:"var(--doc-text-muted)"},s={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},d={...s},U={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},K={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function Z({isOpen:f,onClose:r,onApply:D,currentData:n}){let[v,u]=useState("align"),[y,k]=useState("center"),[c,z]=useState("column"),[b,A]=useState(0),[g,m]=useState("align"),[h,L]=useState("top"),[S,B]=useState("paragraph"),[x,M]=useState(0),[C,N]=useState(0),[P,E]=useState(0),[T,H]=useState(0),[R,V]=useState(0);useEffect(()=>{if(!f)return;let e=n?.horizontal,p=n?.vertical;e?.align?(u("align"),k(e.align)):e?.posOffset!=null&&(u("offset"),A(e.posOffset)),e?.relativeTo&&z(e.relativeTo),p?.align?(m("align"),L(p.align)):p?.posOffset!=null&&(m("offset"),M(p.posOffset)),p?.relativeTo&&B(p.relativeTo),N(n?.distTop??0),E(n?.distBottom??0),H(n?.distLeft??0),V(n?.distRight??0);},[f,n]);let O=useCallback(()=>{let e={};e.horizontal={relativeTo:c,...v==="align"?{align:y}:{posOffset:b}},e.vertical={relativeTo:S,...g==="align"?{align:h}:{posOffset:x}},e.distTop=C,e.distBottom=P,e.distLeft=T,e.distRight=R,D(e),r();},[v,y,c,b,g,h,S,x,C,P,T,R,D,r]),j=useCallback(e=>{e.key==="Escape"&&r(),e.key==="Enter"&&O();},[r,O]);return f?jsx("div",{style:F,onClick:r,onKeyDown:j,children:jsxs("div",{style:G,onClick:e=>e.stopPropagation(),role:"dialog","aria-label":"Image position",children:[jsx("div",{style:J,children:"Image Position"}),jsxs("div",{style:Q,children:[jsxs("div",{style:w,children:[jsx("div",{style:I,children:"Horizontal"}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Position"}),jsxs("select",{style:d,value:v,onChange:e=>u(e.target.value),children:[jsx("option",{value:"align",children:"Alignment"}),jsx("option",{value:"offset",children:"Offset"})]})]}),v==="align"?jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Align"}),jsxs("select",{style:d,value:y,onChange:e=>k(e.target.value),children:[jsx("option",{value:"left",children:"Left"}),jsx("option",{value:"center",children:"Center"}),jsx("option",{value:"right",children:"Right"})]})]}):jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Offset (px)"}),jsx("input",{type:"number",style:s,value:b,onChange:e=>A(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Relative to"}),jsxs("select",{style:d,value:c,onChange:e=>z(e.target.value),children:[jsx("option",{value:"page",children:"Page"}),jsx("option",{value:"column",children:"Column"}),jsx("option",{value:"margin",children:"Margin"}),jsx("option",{value:"character",children:"Character"})]})]})]}),jsxs("div",{style:w,children:[jsx("div",{style:I,children:"Vertical"}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Position"}),jsxs("select",{style:d,value:g,onChange:e=>m(e.target.value),children:[jsx("option",{value:"align",children:"Alignment"}),jsx("option",{value:"offset",children:"Offset"})]})]}),g==="align"?jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Align"}),jsxs("select",{style:d,value:h,onChange:e=>L(e.target.value),children:[jsx("option",{value:"top",children:"Top"}),jsx("option",{value:"center",children:"Center"}),jsx("option",{value:"bottom",children:"Bottom"})]})]}):jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Offset (px)"}),jsx("input",{type:"number",style:s,value:x,onChange:e=>M(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:a,children:"Relative to"}),jsxs("select",{style:d,value:S,onChange:e=>B(e.target.value),children:[jsx("option",{value:"page",children:"Page"}),jsx("option",{value:"margin",children:"Margin"}),jsx("option",{value:"paragraph",children:"Paragraph"}),jsx("option",{value:"line",children:"Line"})]})]})]}),jsxs("div",{style:w,children:[jsx("div",{style:I,children:"Distance from text (px)"}),jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Top"}),jsx("input",{type:"number",style:s,min:0,value:C,onChange:e=>N(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Bottom"}),jsx("input",{type:"number",style:s,min:0,value:P,onChange:e=>E(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Left"}),jsx("input",{type:"number",style:s,min:0,value:T,onChange:e=>H(Number(e.target.value)||0)})]}),jsxs("div",{style:l,children:[jsx("label",{style:{...a,width:45},children:"Right"}),jsx("input",{type:"number",style:s,min:0,value:R,onChange:e=>V(Number(e.target.value)||0)})]})]})]})]}),jsxs("div",{style:U,children:[jsx("button",{type:"button",style:K,onClick:r,children:"Cancel"}),jsx("button",{type:"button",style:{...K,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:O,children:"Apply"})]})]})}):null}export{Z as ImagePositionDialog};
@@ -0,0 +1 @@
1
+ import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var D={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:380,maxWidth:440,width:"100%",margin:20},w={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},h={display:"flex",flexDirection:"column",gap:8},C={fontSize:13,fontWeight:600,color:"var(--doc-text)"},v={display:"flex",alignItems:"center",gap:8},u={width:60,fontSize:12,color:"var(--doc-text-muted)"},s={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},z={...s},A={...s,minHeight:60,resize:"vertical",fontFamily:"inherit"},B={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},P={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function T({isOpen:p,onClose:i,onApply:g,currentData:l}){let[c,S]=useState(""),[r,x]=useState(0),[d,y]=useState("#000000"),[a,f]=useState("solid");useEffect(()=>{p&&(S(l?.alt??""),x(l?.borderWidth??0),y(l?.borderColor??"#000000"),f(l?.borderStyle??"solid"));},[p,l]);let b=useCallback(()=>{g({alt:c||void 0,borderWidth:r>0?r:void 0,borderColor:r>0?d:void 0,borderStyle:r>0?a:void 0}),i();},[c,r,d,a,g,i]),I=useCallback(t=>{t.key==="Escape"&&i(),t.key==="Enter"&&!t.shiftKey&&b();},[i,b]);return p?jsx("div",{style:D,onClick:i,onKeyDown:I,children:jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":"Image properties",children:[jsx("div",{style:w,children:"Image Properties"}),jsxs("div",{style:R,children:[jsxs("div",{style:h,children:[jsx("div",{style:C,children:"Alt Text"}),jsx("textarea",{style:A,value:c,onChange:t=>S(t.target.value),placeholder:"Describe this image for accessibility..."})]}),jsxs("div",{style:h,children:[jsx("div",{style:C,children:"Border"}),jsxs("div",{style:v,children:[jsx("label",{style:u,children:"Width"}),jsx("input",{type:"number",style:{...s,maxWidth:80},min:0,max:20,step:.5,value:r,onChange:t=>x(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:12,color:"var(--doc-text-muted)"},children:"px"})]}),jsxs("div",{style:v,children:[jsx("label",{style:u,children:"Style"}),jsxs("select",{style:z,value:a,onChange:t=>f(t.target.value),children:[jsx("option",{value:"solid",children:"Solid"}),jsx("option",{value:"dashed",children:"Dashed"}),jsx("option",{value:"dotted",children:"Dotted"}),jsx("option",{value:"double",children:"Double"}),jsx("option",{value:"groove",children:"Groove"}),jsx("option",{value:"ridge",children:"Ridge"}),jsx("option",{value:"inset",children:"Inset"}),jsx("option",{value:"outset",children:"Outset"})]})]}),jsxs("div",{style:v,children:[jsx("label",{style:u,children:"Color"}),jsx("input",{type:"color",value:d,onChange:t=>y(t.target.value),style:{width:32,height:24,padding:0,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"}}),jsx("input",{type:"text",style:{...s,maxWidth:90},value:d,onChange:t=>y(t.target.value)})]}),r>0&&jsx("div",{style:{marginTop:4,padding:8,border:`${r}px ${a} ${d}`,borderRadius:4,fontSize:11,color:"var(--doc-text-muted)",textAlign:"center"},children:"Preview"})]})]}),jsxs("div",{style:B,children:[jsx("button",{type:"button",style:P,onClick:i,children:"Cancel"}),jsx("button",{type:"button",style:{...P,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:b,children:"Apply"})]})]})}):null}export{T as ImagePropertiesDialog};
@@ -1 +1 @@
1
- import'./chunk-H5NTJZO4.js';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var D={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:380,maxWidth:440,width:"100%",margin:20},w={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},h={display:"flex",flexDirection:"column",gap:8},C={fontSize:13,fontWeight:600,color:"var(--doc-text)"},v={display:"flex",alignItems:"center",gap:8},u={width:60,fontSize:12,color:"var(--doc-text-muted)"},s={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},z={...s},A={...s,minHeight:60,resize:"vertical",fontFamily:"inherit"},B={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},P={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function T({isOpen:p,onClose:i,onApply:g,currentData:l}){let[c,S]=useState(""),[r,x]=useState(0),[d,y]=useState("#000000"),[a,f]=useState("solid");useEffect(()=>{p&&(S(l?.alt??""),x(l?.borderWidth??0),y(l?.borderColor??"#000000"),f(l?.borderStyle??"solid"));},[p,l]);let b=useCallback(()=>{g({alt:c||void 0,borderWidth:r>0?r:void 0,borderColor:r>0?d:void 0,borderStyle:r>0?a:void 0}),i();},[c,r,d,a,g,i]),I=useCallback(t=>{t.key==="Escape"&&i(),t.key==="Enter"&&!t.shiftKey&&b();},[i,b]);return p?jsx("div",{style:D,onClick:i,onKeyDown:I,children:jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":"Image properties",children:[jsx("div",{style:w,children:"Image Properties"}),jsxs("div",{style:R,children:[jsxs("div",{style:h,children:[jsx("div",{style:C,children:"Alt Text"}),jsx("textarea",{style:A,value:c,onChange:t=>S(t.target.value),placeholder:"Describe this image for accessibility..."})]}),jsxs("div",{style:h,children:[jsx("div",{style:C,children:"Border"}),jsxs("div",{style:v,children:[jsx("label",{style:u,children:"Width"}),jsx("input",{type:"number",style:{...s,maxWidth:80},min:0,max:20,step:.5,value:r,onChange:t=>x(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:12,color:"var(--doc-text-muted)"},children:"px"})]}),jsxs("div",{style:v,children:[jsx("label",{style:u,children:"Style"}),jsxs("select",{style:z,value:a,onChange:t=>f(t.target.value),children:[jsx("option",{value:"solid",children:"Solid"}),jsx("option",{value:"dashed",children:"Dashed"}),jsx("option",{value:"dotted",children:"Dotted"}),jsx("option",{value:"double",children:"Double"}),jsx("option",{value:"groove",children:"Groove"}),jsx("option",{value:"ridge",children:"Ridge"}),jsx("option",{value:"inset",children:"Inset"}),jsx("option",{value:"outset",children:"Outset"})]})]}),jsxs("div",{style:v,children:[jsx("label",{style:u,children:"Color"}),jsx("input",{type:"color",value:d,onChange:t=>y(t.target.value),style:{width:32,height:24,padding:0,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"}}),jsx("input",{type:"text",style:{...s,maxWidth:90},value:d,onChange:t=>y(t.target.value)})]}),r>0&&jsx("div",{style:{marginTop:4,padding:8,border:`${r}px ${a} ${d}`,borderRadius:4,fontSize:11,color:"var(--doc-text-muted)",textAlign:"center"},children:"Preview"})]})]}),jsxs("div",{style:B,children:[jsx("button",{type:"button",style:P,onClick:i,children:"Cancel"}),jsx("button",{type:"button",style:{...P,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:b,children:"Apply"})]})]})}):null}export{T as ImagePropertiesDialog};
1
+ 'use strict';require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var D={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},k={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:380,maxWidth:440,width:"100%",margin:20},w={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},R={padding:"16px 20px",display:"flex",flexDirection:"column",gap:16},h={display:"flex",flexDirection:"column",gap:8},C={fontSize:13,fontWeight:600,color:"var(--doc-text)"},v={display:"flex",alignItems:"center",gap:8},u={width:60,fontSize:12,color:"var(--doc-text-muted)"},s={flex:1,padding:"4px 6px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:12},z={...s},A={...s,minHeight:60,resize:"vertical",fontFamily:"inherit"},B={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},P={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function T({isOpen:p,onClose:i,onApply:g,currentData:l}){let[c,S]=react.useState(""),[r,x]=react.useState(0),[d,y]=react.useState("#000000"),[a,f]=react.useState("solid");react.useEffect(()=>{p&&(S(l?.alt??""),x(l?.borderWidth??0),y(l?.borderColor??"#000000"),f(l?.borderStyle??"solid"));},[p,l]);let b=react.useCallback(()=>{g({alt:c||void 0,borderWidth:r>0?r:void 0,borderColor:r>0?d:void 0,borderStyle:r>0?a:void 0}),i();},[c,r,d,a,g,i]),I=react.useCallback(t=>{t.key==="Escape"&&i(),t.key==="Enter"&&!t.shiftKey&&b();},[i,b]);return p?jsxRuntime.jsx("div",{style:D,onClick:i,onKeyDown:I,children:jsxRuntime.jsxs("div",{style:k,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":"Image properties",children:[jsxRuntime.jsx("div",{style:w,children:"Image Properties"}),jsxRuntime.jsxs("div",{style:R,children:[jsxRuntime.jsxs("div",{style:h,children:[jsxRuntime.jsx("div",{style:C,children:"Alt Text"}),jsxRuntime.jsx("textarea",{style:A,value:c,onChange:t=>S(t.target.value),placeholder:"Describe this image for accessibility..."})]}),jsxRuntime.jsxs("div",{style:h,children:[jsxRuntime.jsx("div",{style:C,children:"Border"}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:u,children:"Width"}),jsxRuntime.jsx("input",{type:"number",style:{...s,maxWidth:80},min:0,max:20,step:.5,value:r,onChange:t=>x(Number(t.target.value)||0)}),jsxRuntime.jsx("span",{style:{fontSize:12,color:"var(--doc-text-muted)"},children:"px"})]}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:u,children:"Style"}),jsxRuntime.jsxs("select",{style:z,value:a,onChange:t=>f(t.target.value),children:[jsxRuntime.jsx("option",{value:"solid",children:"Solid"}),jsxRuntime.jsx("option",{value:"dashed",children:"Dashed"}),jsxRuntime.jsx("option",{value:"dotted",children:"Dotted"}),jsxRuntime.jsx("option",{value:"double",children:"Double"}),jsxRuntime.jsx("option",{value:"groove",children:"Groove"}),jsxRuntime.jsx("option",{value:"ridge",children:"Ridge"}),jsxRuntime.jsx("option",{value:"inset",children:"Inset"}),jsxRuntime.jsx("option",{value:"outset",children:"Outset"})]})]}),jsxRuntime.jsxs("div",{style:v,children:[jsxRuntime.jsx("label",{style:u,children:"Color"}),jsxRuntime.jsx("input",{type:"color",value:d,onChange:t=>y(t.target.value),style:{width:32,height:24,padding:0,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"}}),jsxRuntime.jsx("input",{type:"text",style:{...s,maxWidth:90},value:d,onChange:t=>y(t.target.value)})]}),r>0&&jsxRuntime.jsx("div",{style:{marginTop:4,padding:8,border:`${r}px ${a} ${d}`,borderRadius:4,fontSize:11,color:"var(--doc-text-muted)",textAlign:"center"},children:"Preview"})]})]}),jsxRuntime.jsxs("div",{style:B,children:[jsxRuntime.jsx("button",{type:"button",style:P,onClick:i,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",style:{...P,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:b,children:"Apply"})]})]})}):null}exports.ImagePropertiesDialog=T;
@@ -0,0 +1 @@
1
+ import'./chunk-LYBG4YI7.mjs';import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var I=[{label:'Letter (8.5" \xD7 11")',width:12240,height:15840},{label:'A4 (8.27" \xD7 11.69")',width:11906,height:16838},{label:'Legal (8.5" \xD7 14")',width:12240,height:20160},{label:'A3 (11.69" \xD7 16.54")',width:16838,height:23811},{label:'A5 (5.83" \xD7 8.27")',width:8391,height:11906},{label:'B5 (6.93" \xD7 9.84")',width:9979,height:14175},{label:'Executive (7.25" \xD7 10.5")',width:10440,height:15120}];function v(i){return Math.round(i/1440*100)/100}function f(i){return Math.round(i*1440)}function O(i,a){let h=Math.min(i,a),n=Math.max(i,a);return I.findIndex(l=>Math.abs(l.width-h)<20&&Math.abs(l.height-n)<20)}var Z={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},J={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},Q={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},A={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},c={display:"flex",alignItems:"center",gap:12},g={width:80,fontSize:13,color:"var(--doc-text-muted)"},b={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},W={...b},x={fontSize:11,color:"var(--doc-text-muted)",width:16},V={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},H={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},N=12240,B=15840,s=1440;function ee({isOpen:i,onClose:a,onApply:h,currentProps:n}){let[l,y]=useState(N),[u,m]=useState(B),[p,M]=useState("portrait"),[C,R]=useState(s),[P,z]=useState(s),[w,k]=useState(s),[T,D]=useState(s);useEffect(()=>{if(!i)return;let e=n?.pageWidth||N,r=n?.pageHeight||B,U=n?.orientation||(e>r?"landscape":"portrait");y(e),m(r),M(U),R(n?.marginTop??s),z(n?.marginBottom??s),k(n?.marginLeft??s),D(n?.marginRight??s);},[i,n]);let F=useCallback(e=>{if(e<0)return;let r=I[e];p==="landscape"?(y(r.height),m(r.width)):(y(r.width),m(r.height));},[p]),G=useCallback(e=>{e!==p&&(M(e),y(u),m(l));},[p,l,u]),E=useCallback(()=>{h({pageWidth:l,pageHeight:u,orientation:p,marginTop:C,marginBottom:P,marginLeft:w,marginRight:T}),a();},[l,u,p,C,P,w,T,h,a]),K=useCallback(e=>{e.key==="Escape"&&a(),e.key==="Enter"&&E();},[a,E]);if(!i)return null;let L=O(l,u);return jsx("div",{style:Z,onClick:a,onKeyDown:K,children:jsxs("div",{style:q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":"Page setup",children:[jsx("div",{style:J,children:"Page Setup"}),jsxs("div",{style:Q,children:[jsx("div",{style:A,children:"Page Size"}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Size"}),jsxs("select",{style:W,value:L,onChange:e=>F(Number(e.target.value)),children:[I.map((e,r)=>jsx("option",{value:r,children:e.label},e.label)),L<0&&jsx("option",{value:-1,children:"Custom"})]})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Orientation"}),jsxs("select",{style:W,value:p,onChange:e=>G(e.target.value),children:[jsx("option",{value:"portrait",children:"Portrait"}),jsx("option",{value:"landscape",children:"Landscape"})]})]}),jsx("div",{style:{...A,marginTop:4},children:"Margins"}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Top"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(C),onChange:e=>R(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Bottom"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(P),onChange:e=>z(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Left"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(w),onChange:e=>k(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Right"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(T),onChange:e=>D(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]})]}),jsxs("div",{style:V,children:[jsx("button",{type:"button",style:H,onClick:a,children:"Cancel"}),jsx("button",{type:"button",style:{...H,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:E,children:"Apply"})]})]})})}export{ee as PageSetupDialog};
@@ -1 +1 @@
1
- import'./chunk-SE5EN2QL.js';import'./chunk-H5NTJZO4.js';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var I=[{label:'Letter (8.5" \xD7 11")',width:12240,height:15840},{label:'A4 (8.27" \xD7 11.69")',width:11906,height:16838},{label:'Legal (8.5" \xD7 14")',width:12240,height:20160},{label:'A3 (11.69" \xD7 16.54")',width:16838,height:23811},{label:'A5 (5.83" \xD7 8.27")',width:8391,height:11906},{label:'B5 (6.93" \xD7 9.84")',width:9979,height:14175},{label:'Executive (7.25" \xD7 10.5")',width:10440,height:15120}];function v(i){return Math.round(i/1440*100)/100}function f(i){return Math.round(i*1440)}function O(i,a){let h=Math.min(i,a),n=Math.max(i,a);return I.findIndex(l=>Math.abs(l.width-h)<20&&Math.abs(l.height-n)<20)}var Z={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},J={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},Q={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},A={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},c={display:"flex",alignItems:"center",gap:12},g={width:80,fontSize:13,color:"var(--doc-text-muted)"},b={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},W={...b},x={fontSize:11,color:"var(--doc-text-muted)",width:16},V={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},H={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},N=12240,B=15840,s=1440;function ee({isOpen:i,onClose:a,onApply:h,currentProps:n}){let[l,y]=useState(N),[u,m]=useState(B),[p,M]=useState("portrait"),[C,R]=useState(s),[P,z]=useState(s),[w,k]=useState(s),[T,D]=useState(s);useEffect(()=>{if(!i)return;let e=n?.pageWidth||N,r=n?.pageHeight||B,U=n?.orientation||(e>r?"landscape":"portrait");y(e),m(r),M(U),R(n?.marginTop??s),z(n?.marginBottom??s),k(n?.marginLeft??s),D(n?.marginRight??s);},[i,n]);let F=useCallback(e=>{if(e<0)return;let r=I[e];p==="landscape"?(y(r.height),m(r.width)):(y(r.width),m(r.height));},[p]),G=useCallback(e=>{e!==p&&(M(e),y(u),m(l));},[p,l,u]),E=useCallback(()=>{h({pageWidth:l,pageHeight:u,orientation:p,marginTop:C,marginBottom:P,marginLeft:w,marginRight:T}),a();},[l,u,p,C,P,w,T,h,a]),K=useCallback(e=>{e.key==="Escape"&&a(),e.key==="Enter"&&E();},[a,E]);if(!i)return null;let L=O(l,u);return jsx("div",{style:Z,onClick:a,onKeyDown:K,children:jsxs("div",{style:q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":"Page setup",children:[jsx("div",{style:J,children:"Page Setup"}),jsxs("div",{style:Q,children:[jsx("div",{style:A,children:"Page Size"}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Size"}),jsxs("select",{style:W,value:L,onChange:e=>F(Number(e.target.value)),children:[I.map((e,r)=>jsx("option",{value:r,children:e.label},e.label)),L<0&&jsx("option",{value:-1,children:"Custom"})]})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Orientation"}),jsxs("select",{style:W,value:p,onChange:e=>G(e.target.value),children:[jsx("option",{value:"portrait",children:"Portrait"}),jsx("option",{value:"landscape",children:"Landscape"})]})]}),jsx("div",{style:{...A,marginTop:4},children:"Margins"}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Top"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(C),onChange:e=>R(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Bottom"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(P),onChange:e=>z(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Left"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(w),onChange:e=>k(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]}),jsxs("div",{style:c,children:[jsx("label",{style:g,children:"Right"}),jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(T),onChange:e=>D(f(Number(e.target.value)||0))}),jsx("span",{style:x,children:"in"})]})]}),jsxs("div",{style:V,children:[jsx("button",{type:"button",style:H,onClick:a,children:"Cancel"}),jsx("button",{type:"button",style:{...H,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:E,children:"Apply"})]})]})})}export{ee as PageSetupDialog};
1
+ 'use strict';require('./chunk-SE5EN2QL.js'),require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var I=[{label:'Letter (8.5" \xD7 11")',width:12240,height:15840},{label:'A4 (8.27" \xD7 11.69")',width:11906,height:16838},{label:'Legal (8.5" \xD7 14")',width:12240,height:20160},{label:'A3 (11.69" \xD7 16.54")',width:16838,height:23811},{label:'A5 (5.83" \xD7 8.27")',width:8391,height:11906},{label:'B5 (6.93" \xD7 9.84")',width:9979,height:14175},{label:'Executive (7.25" \xD7 10.5")',width:10440,height:15120}];function v(i){return Math.round(i/1440*100)/100}function f(i){return Math.round(i*1440)}function O(i,a){let h=Math.min(i,a),n=Math.max(i,a);return I.findIndex(l=>Math.abs(l.width-h)<20&&Math.abs(l.height-n)<20)}var Z={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},q={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:400,maxWidth:480,width:"100%",margin:20},J={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},Q={padding:"16px 20px",display:"flex",flexDirection:"column",gap:14},A={fontSize:12,fontWeight:600,color:"var(--doc-text-muted)",textTransform:"uppercase",letterSpacing:"0.5px"},c={display:"flex",alignItems:"center",gap:12},g={width:80,fontSize:13,color:"var(--doc-text-muted)"},b={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},W={...b},x={fontSize:11,color:"var(--doc-text-muted)",width:16},V={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},H={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"},N=12240,B=15840,s=1440;function ee({isOpen:i,onClose:a,onApply:h,currentProps:n}){let[l,y]=react.useState(N),[u,m]=react.useState(B),[p,M]=react.useState("portrait"),[C,R]=react.useState(s),[P,z]=react.useState(s),[w,k]=react.useState(s),[T,D]=react.useState(s);react.useEffect(()=>{if(!i)return;let e=n?.pageWidth||N,r=n?.pageHeight||B,U=n?.orientation||(e>r?"landscape":"portrait");y(e),m(r),M(U),R(n?.marginTop??s),z(n?.marginBottom??s),k(n?.marginLeft??s),D(n?.marginRight??s);},[i,n]);let F=react.useCallback(e=>{if(e<0)return;let r=I[e];p==="landscape"?(y(r.height),m(r.width)):(y(r.width),m(r.height));},[p]),G=react.useCallback(e=>{e!==p&&(M(e),y(u),m(l));},[p,l,u]),E=react.useCallback(()=>{h({pageWidth:l,pageHeight:u,orientation:p,marginTop:C,marginBottom:P,marginLeft:w,marginRight:T}),a();},[l,u,p,C,P,w,T,h,a]),K=react.useCallback(e=>{e.key==="Escape"&&a(),e.key==="Enter"&&E();},[a,E]);if(!i)return null;let L=O(l,u);return jsxRuntime.jsx("div",{style:Z,onClick:a,onKeyDown:K,children:jsxRuntime.jsxs("div",{style:q,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":"Page setup",children:[jsxRuntime.jsx("div",{style:J,children:"Page Setup"}),jsxRuntime.jsxs("div",{style:Q,children:[jsxRuntime.jsx("div",{style:A,children:"Page Size"}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:g,children:"Size"}),jsxRuntime.jsxs("select",{style:W,value:L,onChange:e=>F(Number(e.target.value)),children:[I.map((e,r)=>jsxRuntime.jsx("option",{value:r,children:e.label},e.label)),L<0&&jsxRuntime.jsx("option",{value:-1,children:"Custom"})]})]}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:g,children:"Orientation"}),jsxRuntime.jsxs("select",{style:W,value:p,onChange:e=>G(e.target.value),children:[jsxRuntime.jsx("option",{value:"portrait",children:"Portrait"}),jsxRuntime.jsx("option",{value:"landscape",children:"Landscape"})]})]}),jsxRuntime.jsx("div",{style:{...A,marginTop:4},children:"Margins"}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:g,children:"Top"}),jsxRuntime.jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(C),onChange:e=>R(f(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:x,children:"in"})]}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:g,children:"Bottom"}),jsxRuntime.jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(P),onChange:e=>z(f(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:x,children:"in"})]}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:g,children:"Left"}),jsxRuntime.jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(w),onChange:e=>k(f(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:x,children:"in"})]}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:g,children:"Right"}),jsxRuntime.jsx("input",{type:"number",style:b,min:0,max:10,step:.1,value:v(T),onChange:e=>D(f(Number(e.target.value)||0))}),jsxRuntime.jsx("span",{style:x,children:"in"})]})]}),jsxRuntime.jsxs("div",{style:V,children:[jsxRuntime.jsx("button",{type:"button",style:H,onClick:a,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",style:{...H,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:E,children:"Apply"})]})]})})}exports.PageSetupDialog=ee;
@@ -0,0 +1 @@
1
+ import'./chunk-TAUMSKRE.mjs';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var C={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},P={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},T={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},k={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},c={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},x={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},S={...x},R={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},h={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function z({isOpen:n,onClose:r,onApply:y,currentProps:i}){let[a,b]=useState(i?.width||0),[l,f]=useState(i?.widthType||"auto"),[p,g]=useState(i?.justification||"left");useEffect(()=>{n&&(b(i?.width||0),f(i?.widthType||"auto"),g(i?.justification||"left"));},[n,i]);let d=useCallback(()=>{let t={};l==="auto"?(t.width=null,t.widthType="auto"):(t.width=a,t.widthType=l),t.justification=p,y(t),r();},[a,l,p,y,r]),w=useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&d();},[r,d]);return n?jsx("div",{style:C,onClick:r,onKeyDown:w,children:jsxs("div",{style:P,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":"Table properties",children:[jsx("div",{style:T,children:"Table Properties"}),jsxs("div",{style:k,children:[jsxs("div",{style:c,children:[jsx("label",{style:u,children:"Width type"}),jsxs("select",{style:S,value:l,onChange:t=>f(t.target.value),children:[jsx("option",{value:"auto",children:"Auto"}),jsx("option",{value:"dxa",children:"Fixed (twips)"}),jsx("option",{value:"pct",children:"Percentage"})]})]}),l!=="auto"&&jsxs("div",{style:c,children:[jsx("label",{style:u,children:"Width"}),jsx("input",{type:"number",style:x,min:0,step:l==="pct"?5:100,value:a,onChange:t=>b(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:l==="pct"?"(50ths of %)":"tw"})]}),jsxs("div",{style:c,children:[jsx("label",{style:u,children:"Alignment"}),jsxs("select",{style:S,value:p,onChange:t=>g(t.target.value),children:[jsx("option",{value:"left",children:"Left"}),jsx("option",{value:"center",children:"Center"}),jsx("option",{value:"right",children:"Right"})]})]})]}),jsxs("div",{style:R,children:[jsx("button",{type:"button",style:h,onClick:r,children:"Cancel"}),jsx("button",{type:"button",style:{...h,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:"Apply"})]})]})}):null}export{z as TablePropertiesDialog};
@@ -1 +1 @@
1
- import'./chunk-H5NTJZO4.js';import {useState,useEffect,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var C={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},P={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},T={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},k={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},c={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},x={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},S={...x},R={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},h={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function z({isOpen:n,onClose:r,onApply:y,currentProps:i}){let[a,b]=useState(i?.width||0),[l,f]=useState(i?.widthType||"auto"),[p,g]=useState(i?.justification||"left");useEffect(()=>{n&&(b(i?.width||0),f(i?.widthType||"auto"),g(i?.justification||"left"));},[n,i]);let d=useCallback(()=>{let t={};l==="auto"?(t.width=null,t.widthType="auto"):(t.width=a,t.widthType=l),t.justification=p,y(t),r();},[a,l,p,y,r]),w=useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&d();},[r,d]);return n?jsx("div",{style:C,onClick:r,onKeyDown:w,children:jsxs("div",{style:P,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":"Table properties",children:[jsx("div",{style:T,children:"Table Properties"}),jsxs("div",{style:k,children:[jsxs("div",{style:c,children:[jsx("label",{style:u,children:"Width type"}),jsxs("select",{style:S,value:l,onChange:t=>f(t.target.value),children:[jsx("option",{value:"auto",children:"Auto"}),jsx("option",{value:"dxa",children:"Fixed (twips)"}),jsx("option",{value:"pct",children:"Percentage"})]})]}),l!=="auto"&&jsxs("div",{style:c,children:[jsx("label",{style:u,children:"Width"}),jsx("input",{type:"number",style:x,min:0,step:l==="pct"?5:100,value:a,onChange:t=>b(Number(t.target.value)||0)}),jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:l==="pct"?"(50ths of %)":"tw"})]}),jsxs("div",{style:c,children:[jsx("label",{style:u,children:"Alignment"}),jsxs("select",{style:S,value:p,onChange:t=>g(t.target.value),children:[jsx("option",{value:"left",children:"Left"}),jsx("option",{value:"center",children:"Center"}),jsx("option",{value:"right",children:"Right"})]})]})]}),jsxs("div",{style:R,children:[jsx("button",{type:"button",style:h,onClick:r,children:"Cancel"}),jsx("button",{type:"button",style:{...h,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:"Apply"})]})]})}):null}export{z as TablePropertiesDialog};
1
+ 'use strict';require('./chunk-H5NTJZO4.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var C={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},P={backgroundColor:"white",borderRadius:8,boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:360,maxWidth:440,width:"100%",margin:20},T={padding:"16px 20px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:16,fontWeight:600},k={padding:"16px 20px",display:"flex",flexDirection:"column",gap:12},c={display:"flex",alignItems:"center",gap:12},u={width:80,fontSize:13,color:"var(--doc-text-muted)"},x={flex:1,padding:"6px 8px",border:"1px solid var(--doc-border)",borderRadius:4,fontSize:13},S={...x},R={padding:"12px 20px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"flex-end",gap:8},h={padding:"6px 16px",fontSize:13,border:"1px solid var(--doc-border)",borderRadius:4,cursor:"pointer"};function z({isOpen:n,onClose:r,onApply:y,currentProps:i}){let[a,b]=react.useState(i?.width||0),[l,f]=react.useState(i?.widthType||"auto"),[p,g]=react.useState(i?.justification||"left");react.useEffect(()=>{n&&(b(i?.width||0),f(i?.widthType||"auto"),g(i?.justification||"left"));},[n,i]);let d=react.useCallback(()=>{let t={};l==="auto"?(t.width=null,t.widthType="auto"):(t.width=a,t.widthType=l),t.justification=p,y(t),r();},[a,l,p,y,r]),w=react.useCallback(t=>{t.key==="Escape"&&r(),t.key==="Enter"&&d();},[r,d]);return n?jsxRuntime.jsx("div",{style:C,onClick:r,onKeyDown:w,children:jsxRuntime.jsxs("div",{style:P,onClick:t=>t.stopPropagation(),role:"dialog","aria-label":"Table properties",children:[jsxRuntime.jsx("div",{style:T,children:"Table Properties"}),jsxRuntime.jsxs("div",{style:k,children:[jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:u,children:"Width type"}),jsxRuntime.jsxs("select",{style:S,value:l,onChange:t=>f(t.target.value),children:[jsxRuntime.jsx("option",{value:"auto",children:"Auto"}),jsxRuntime.jsx("option",{value:"dxa",children:"Fixed (twips)"}),jsxRuntime.jsx("option",{value:"pct",children:"Percentage"})]})]}),l!=="auto"&&jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:u,children:"Width"}),jsxRuntime.jsx("input",{type:"number",style:x,min:0,step:l==="pct"?5:100,value:a,onChange:t=>b(Number(t.target.value)||0)}),jsxRuntime.jsx("span",{style:{fontSize:11,color:"var(--doc-text-muted)"},children:l==="pct"?"(50ths of %)":"tw"})]}),jsxRuntime.jsxs("div",{style:c,children:[jsxRuntime.jsx("label",{style:u,children:"Alignment"}),jsxRuntime.jsxs("select",{style:S,value:p,onChange:t=>g(t.target.value),children:[jsxRuntime.jsx("option",{value:"left",children:"Left"}),jsxRuntime.jsx("option",{value:"center",children:"Center"}),jsxRuntime.jsx("option",{value:"right",children:"Right"})]})]})]}),jsxRuntime.jsxs("div",{style:R,children:[jsxRuntime.jsx("button",{type:"button",style:h,onClick:r,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",style:{...h,backgroundColor:"var(--doc-primary)",color:"white",borderColor:"var(--doc-primary)"},onClick:d,children:"Apply"})]})]})}):null}exports.TablePropertiesDialog=z;
@@ -1145,6 +1145,10 @@ interface MoveToRangeEnd {
1145
1145
  type: 'moveToRangeEnd';
1146
1146
  id: number;
1147
1147
  }
1148
+ /**
1149
+ * Run-level tracked wrappers represented in WordprocessingML.
1150
+ */
1151
+ type TrackedRunChange = Insertion | Deletion | MoveFrom | MoveTo;
1148
1152
  /**
1149
1153
  * Run property change (w:rPrChange)
1150
1154
  */
@@ -2232,4 +2236,4 @@ declare const DEFAULT_AI_ACTIONS: AIAction[];
2232
2236
  */
2233
2237
  declare function createCommand<T extends AgentCommand>(command: Omit<T, 'id'>): T;
2234
2238
 
2235
- export { createRange as $, type AgentCommand as A, type BreakContent as B, type SectionProperties as C, type Document as D, type Endnote as E, type Footnote as F, type SelectionContext as G, type Hyperlink as H, type Image as I, type SetVariableCommand as J, type Style as K, type ListLevel as L, type StyleDefinitions as M, type NumberingDefinitions as N, type StyleInfo as O, type Position as P, type SuggestedAction as Q, type Range as R, type SectionInfo as S, type TextFormatting as T, type TableCell as U, type TableRow as V, type TextContent as W, type Theme as X, comparePositions as Y, createCollapsedRange as Z, createCommand as _, type Paragraph as a, getActionDescription as a0, getActionLabel as a1, isPositionInRange as a2, type BookmarkEnd as a3, type BookmarkStart as a4, type Field as a5, type FooterReference as a6, type HeaderFooter as a7, type HeaderReference as a8, type Shape as a9, type TextBox as aa, type ThemeColorScheme as ab, type ThemeFont as ac, type ThemeFontScheme as ad, type ColorValue as ae, type ThemeColorSlot as af, type ParagraphAlignment as ag, type StyleType as ah, type TabStop as ai, type Run as b, type RunContent as c, type DocumentBody as d, type Table as e, type AIAction as f, type AIActionRequest as g, type AgentContext as h, type AgentResponse as i, type ApplyStyleCommand as j, type ApplyVariablesCommand as k, type BlockContent as l, DEFAULT_AI_ACTIONS as m, type DeleteTextCommand as n, type DocxPackage as o, type FormatParagraphCommand as p, type FormatTextCommand as q, type InsertHyperlinkCommand as r, type InsertImageCommand as s, type InsertTableCommand as t, type InsertTextCommand as u, type ParagraphContext as v, type ParagraphFormatting as w, type ParagraphOutline as x, type Relationship as y, type ReplaceTextCommand as z };
2239
+ export { type SuggestedAction as $, type AgentCommand as A, type BreakContent as B, type Comment as C, type Document as D, type Endnote as E, type Footnote as F, type ParagraphContent as G, type Hyperlink as H, type Image as I, type ParagraphContext as J, type ParagraphFormatting as K, type ListLevel as L, type MoveFrom as M, type NumberingDefinitions as N, type ParagraphOutline as O, type Position as P, type Relationship as Q, type Range as R, type ReplaceTextCommand as S, type TextFormatting as T, type SectionInfo as U, type SectionProperties as V, type SelectionContext as W, type SetVariableCommand as X, type Style as Y, type StyleDefinitions as Z, type StyleInfo as _, type Paragraph as a, type TableCell as a0, type TableRow as a1, type TextContent as a2, type Theme as a3, type TrackedChangeInfo as a4, type TrackedRunChange as a5, comparePositions as a6, createCollapsedRange as a7, createCommand as a8, createRange as a9, getActionDescription as aa, getActionLabel as ab, isPositionInRange as ac, type BookmarkEnd as ad, type BookmarkStart as ae, type Field as af, type FooterReference as ag, type HeaderFooter as ah, type HeaderReference as ai, type Shape as aj, type TextBox as ak, type ThemeColorScheme as al, type ThemeFont as am, type ThemeFontScheme as an, type ColorValue as ao, type ThemeColorSlot as ap, type ParagraphAlignment as aq, type StyleType as ar, type TabStop as as, type Run as b, type RunContent as c, type DocumentBody as d, type Table as e, type AIAction as f, type AIActionRequest as g, type AgentContext as h, type AgentResponse as i, type ApplyStyleCommand as j, type ApplyVariablesCommand as k, type BlockContent as l, type CommentRangeEnd as m, type CommentRangeStart as n, DEFAULT_AI_ACTIONS as o, type DeleteTextCommand as p, type Deletion 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 Insertion as y, type MoveTo as z };
@@ -1145,6 +1145,10 @@ interface MoveToRangeEnd {
1145
1145
  type: 'moveToRangeEnd';
1146
1146
  id: number;
1147
1147
  }
1148
+ /**
1149
+ * Run-level tracked wrappers represented in WordprocessingML.
1150
+ */
1151
+ type TrackedRunChange = Insertion | Deletion | MoveFrom | MoveTo;
1148
1152
  /**
1149
1153
  * Run property change (w:rPrChange)
1150
1154
  */
@@ -2232,4 +2236,4 @@ declare const DEFAULT_AI_ACTIONS: AIAction[];
2232
2236
  */
2233
2237
  declare function createCommand<T extends AgentCommand>(command: Omit<T, 'id'>): T;
2234
2238
 
2235
- export { createRange as $, type AgentCommand as A, type BreakContent as B, type SectionProperties as C, type Document as D, type Endnote as E, type Footnote as F, type SelectionContext as G, type Hyperlink as H, type Image as I, type SetVariableCommand as J, type Style as K, type ListLevel as L, type StyleDefinitions as M, type NumberingDefinitions as N, type StyleInfo as O, type Position as P, type SuggestedAction as Q, type Range as R, type SectionInfo as S, type TextFormatting as T, type TableCell as U, type TableRow as V, type TextContent as W, type Theme as X, comparePositions as Y, createCollapsedRange as Z, createCommand as _, type Paragraph as a, getActionDescription as a0, getActionLabel as a1, isPositionInRange as a2, type BookmarkEnd as a3, type BookmarkStart as a4, type Field as a5, type FooterReference as a6, type HeaderFooter as a7, type HeaderReference as a8, type Shape as a9, type TextBox as aa, type ThemeColorScheme as ab, type ThemeFont as ac, type ThemeFontScheme as ad, type ColorValue as ae, type ThemeColorSlot as af, type ParagraphAlignment as ag, type StyleType as ah, type TabStop as ai, type Run as b, type RunContent as c, type DocumentBody as d, type Table as e, type AIAction as f, type AIActionRequest as g, type AgentContext as h, type AgentResponse as i, type ApplyStyleCommand as j, type ApplyVariablesCommand as k, type BlockContent as l, DEFAULT_AI_ACTIONS as m, type DeleteTextCommand as n, type DocxPackage as o, type FormatParagraphCommand as p, type FormatTextCommand as q, type InsertHyperlinkCommand as r, type InsertImageCommand as s, type InsertTableCommand as t, type InsertTextCommand as u, type ParagraphContext as v, type ParagraphFormatting as w, type ParagraphOutline as x, type Relationship as y, type ReplaceTextCommand as z };
2239
+ export { type SuggestedAction as $, type AgentCommand as A, type BreakContent as B, type Comment as C, type Document as D, type Endnote as E, type Footnote as F, type ParagraphContent as G, type Hyperlink as H, type Image as I, type ParagraphContext as J, type ParagraphFormatting as K, type ListLevel as L, type MoveFrom as M, type NumberingDefinitions as N, type ParagraphOutline as O, type Position as P, type Relationship as Q, type Range as R, type ReplaceTextCommand as S, type TextFormatting as T, type SectionInfo as U, type SectionProperties as V, type SelectionContext as W, type SetVariableCommand as X, type Style as Y, type StyleDefinitions as Z, type StyleInfo as _, type Paragraph as a, type TableCell as a0, type TableRow as a1, type TextContent as a2, type Theme as a3, type TrackedChangeInfo as a4, type TrackedRunChange as a5, comparePositions as a6, createCollapsedRange as a7, createCommand as a8, createRange as a9, getActionDescription as aa, getActionLabel as ab, isPositionInRange as ac, type BookmarkEnd as ad, type BookmarkStart as ae, type Field as af, type FooterReference as ag, type HeaderFooter as ah, type HeaderReference as ai, type Shape as aj, type TextBox as ak, type ThemeColorScheme as al, type ThemeFont as am, type ThemeFontScheme as an, type ColorValue as ao, type ThemeColorSlot as ap, type ParagraphAlignment as aq, type StyleType as ar, type TabStop as as, type Run as b, type RunContent as c, type DocumentBody as d, type Table as e, type AIAction as f, type AIActionRequest as g, type AgentContext as h, type AgentResponse as i, type ApplyStyleCommand as j, type ApplyVariablesCommand as k, type BlockContent as l, type CommentRangeEnd as m, type CommentRangeStart as n, DEFAULT_AI_ACTIONS as o, type DeleteTextCommand as p, type Deletion 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 Insertion as y, type MoveTo as z };