@eigenpal/docx-js-editor 0.0.28 → 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 (136) hide show
  1. package/dist/{ClipboardManager-BzgQ-SOi.d.cts → ClipboardManager-t936d0KD.d.mts} +1 -1
  2. package/dist/{DocumentAgent-B9FUoSVS.d.cts → DocumentAgent-BqA9EJ3F.d.mts} +1 -1
  3. package/dist/FindReplaceDialog-AQFR4OCT.js +1 -1
  4. package/dist/FindReplaceDialog-N4J5OB7O.mjs +1 -0
  5. package/dist/FootnotePropertiesDialog-UFUIHLDW.mjs +1 -0
  6. package/dist/FootnotePropertiesDialog-YYIZU5U6.js +1 -1
  7. package/dist/HyperlinkDialog-HGZ2S37Z.js +1 -1
  8. package/dist/HyperlinkDialog-YQSQFHOP.mjs +1 -0
  9. package/dist/ImagePositionDialog-DQ4JWS4F.js +1 -1
  10. package/dist/ImagePositionDialog-HT6J2SHV.mjs +1 -0
  11. package/dist/ImagePropertiesDialog-3VK2S2AF.mjs +1 -0
  12. package/dist/ImagePropertiesDialog-GJMGLM6G.js +1 -1
  13. package/dist/PageSetupDialog-3QCVUNDL.mjs +1 -0
  14. package/dist/PageSetupDialog-ZZTFPZKJ.js +1 -1
  15. package/dist/TablePropertiesDialog-FI5E3RCB.mjs +1 -0
  16. package/dist/TablePropertiesDialog-STZOGHJB.js +1 -1
  17. package/dist/chunk-2KHL5RSD.js +3 -3
  18. package/dist/chunk-4VUZBV2S.js +1 -1
  19. package/dist/chunk-6WPRCJ5A.mjs +1 -0
  20. package/dist/chunk-7HZRJTOL.mjs +4 -0
  21. package/dist/chunk-AARNCPWR.js +1 -1
  22. package/dist/chunk-AZRYS2WF.mjs +2 -0
  23. package/dist/chunk-BUEMG4NW.js +1 -1
  24. package/dist/chunk-CQRI4YUS.mjs +26 -0
  25. package/dist/chunk-CTYOM6BE.js +2 -2
  26. package/dist/{chunk-PRBTINOW.js → chunk-DLVLK5FT.mjs} +2 -2
  27. package/dist/chunk-FVUGBRDD.js +1 -1
  28. package/dist/chunk-G72SXG7G.js +258 -0
  29. package/dist/chunk-H5NTJZO4.js +1 -1
  30. package/dist/chunk-I6LFWQFR.mjs +59 -0
  31. package/dist/chunk-IFPN3NT3.js +3 -3
  32. package/dist/chunk-IRO7KGGC.js +59 -0
  33. package/dist/chunk-KCUPCJFL.mjs +111 -0
  34. package/dist/chunk-LYBG4YI7.mjs +1 -0
  35. package/dist/chunk-M5F4SK3W.mjs +1 -0
  36. package/dist/chunk-MRWJ3GNH.js +9 -0
  37. package/dist/chunk-MVCTPHRR.mjs +258 -0
  38. package/dist/chunk-PB7VMDDP.js +24 -0
  39. package/dist/chunk-PJVI53AH.js +2 -2
  40. package/dist/chunk-QAZ4233N.mjs +1 -0
  41. package/dist/{chunk-OJ7NJK46.cjs → chunk-QQ63M65M.js} +1 -1
  42. package/dist/chunk-QTSXJRP6.mjs +1 -0
  43. package/dist/chunk-QVPR2W5S.js +1 -1
  44. package/dist/chunk-SE5EN2QL.js +1 -1
  45. package/dist/chunk-TAUMSKRE.mjs +1 -0
  46. package/dist/{chunk-JO2CKU4O.js → chunk-TDEHAPMZ.mjs} +1 -1
  47. package/dist/chunk-VHWEKJ35.js +10 -0
  48. package/dist/chunk-VR6PT4IZ.js +26 -0
  49. package/dist/chunk-W53SI3XW.mjs +1 -0
  50. package/dist/chunk-WOHFANC5.mjs +3 -0
  51. package/dist/chunk-XGL3EGKF.js +7 -7
  52. package/dist/chunk-XWBCP563.mjs +2 -0
  53. package/dist/{chunk-TOGKKPIW.js → chunk-YGTSQZRK.mjs} +1 -1
  54. package/dist/chunk-Z35FA4M4.mjs +10 -0
  55. package/dist/{clipboard-Cm7udEnb.d.cts → clipboard-BkM7Zvgs.d.mts} +1 -1
  56. package/dist/{colorResolver-Bu7uJqpw.d.cts → colorResolver-BwI_Uxp3.d.mts} +2 -2
  57. package/dist/{core-plugins-reexport.d.cts → core-plugins-reexport.d.mts} +4 -4
  58. package/dist/core-plugins-reexport.js +1 -1
  59. package/dist/core-plugins-reexport.mjs +1 -0
  60. package/dist/{core-reexport.d.cts → core-reexport.d.mts} +11 -11
  61. package/dist/core-reexport.js +1 -1
  62. package/dist/core-reexport.mjs +1 -0
  63. package/dist/executor-L2MVKMXO.js +1 -1
  64. package/dist/executor-XKBCCVNY.mjs +1 -0
  65. package/dist/{fontLoader-X8ocGzeD.d.cts → fontLoader-DicgJidU.d.mts} +1 -1
  66. package/dist/{headless-reexport.d.cts → headless-reexport.d.mts} +7 -7
  67. package/dist/headless-reexport.js +2 -2
  68. package/dist/headless-reexport.mjs +4 -0
  69. package/dist/{index.d.cts → index.d.mts} +14 -14
  70. package/dist/index.d.ts +2 -2
  71. package/dist/index.js +6 -6
  72. package/dist/index.mjs +155 -0
  73. package/dist/lib-BCT2DRYI.mjs +1 -0
  74. package/dist/lib-U35UU4OU.js +1 -1
  75. package/dist/{mcp-reexport.d.cts → mcp-reexport.d.mts} +2 -2
  76. package/dist/mcp-reexport.js +9 -9
  77. package/dist/mcp-reexport.mjs +16 -0
  78. package/dist/processTemplate-5ZST2Q5L.js +1 -0
  79. package/dist/{processTemplate-CGIQEJ26.js → processTemplate-LRHXOWMZ.mjs} +1 -1
  80. package/dist/{react-BgZObIoP.d.ts → react-By80Gfi-.d.ts} +4 -0
  81. package/dist/{react-D9JDP3cV.d.cts → react-C-pJU0Y4.d.mts} +8 -4
  82. package/dist/{react.d.cts → react.d.mts} +5 -5
  83. package/dist/react.d.ts +1 -1
  84. package/dist/react.js +1 -1
  85. package/dist/react.mjs +1 -0
  86. package/dist/{registry-Bxb5ZI1z.d.cts → registry-DyIMyB-0.d.mts} +1 -1
  87. package/dist/selectionRects-6TRAXB7D.js +1 -0
  88. package/dist/selectionRects-IS7ZAS3A.mjs +1 -0
  89. package/dist/{types-D03hsi5t.d.cts → types-B3LkfO0u.d.mts} +1 -1
  90. package/dist/{ui.d.cts → ui.d.mts} +3 -3
  91. package/dist/ui.js +1 -1
  92. package/dist/ui.mjs +1 -0
  93. package/dist/{variableDetector-iGl52A6q.d.cts → variableDetector-CIqTek7A.d.mts} +1 -1
  94. package/package.json +17 -18
  95. package/dist/FindReplaceDialog-J3DI3U5I.cjs +0 -1
  96. package/dist/FootnotePropertiesDialog-DO5DCAW6.cjs +0 -1
  97. package/dist/HyperlinkDialog-PEPS3C2G.cjs +0 -1
  98. package/dist/ImagePositionDialog-UYXYHSP4.cjs +0 -1
  99. package/dist/ImagePropertiesDialog-V6SVKINO.cjs +0 -1
  100. package/dist/PageSetupDialog-RLMYJ3BA.cjs +0 -1
  101. package/dist/TablePropertiesDialog-A36OXG3A.cjs +0 -1
  102. package/dist/chunk-2FYTKTQL.cjs +0 -111
  103. package/dist/chunk-2VHQ7YOQ.cjs +0 -1
  104. package/dist/chunk-3YHC2RAO.js +0 -258
  105. package/dist/chunk-63YB7DGI.js +0 -59
  106. package/dist/chunk-7OCUAFPO.cjs +0 -258
  107. package/dist/chunk-HE3SUXOQ.cjs +0 -4
  108. package/dist/chunk-HRUPO723.js +0 -10
  109. package/dist/chunk-IA4LPH2A.cjs +0 -1
  110. package/dist/chunk-JMR5HNJP.cjs +0 -10
  111. package/dist/chunk-KR32M3S4.cjs +0 -1
  112. package/dist/chunk-MSV5LTHM.cjs +0 -9
  113. package/dist/chunk-NLYEW36R.js +0 -26
  114. package/dist/chunk-NVAQQYBJ.cjs +0 -1
  115. package/dist/chunk-P7ZF45KZ.cjs +0 -1
  116. package/dist/chunk-PCJ5ACUV.cjs +0 -1
  117. package/dist/chunk-PVV7DV3L.cjs +0 -59
  118. package/dist/chunk-QDNL7NWN.cjs +0 -3
  119. package/dist/chunk-VPDOOMUJ.cjs +0 -26
  120. package/dist/chunk-VTAS7VZ6.cjs +0 -2
  121. package/dist/chunk-XKBIFFAS.cjs +0 -24
  122. package/dist/chunk-XS2AQFMF.cjs +0 -2
  123. package/dist/chunk-YS7FDEZ4.cjs +0 -1
  124. package/dist/core-plugins-reexport.cjs +0 -1
  125. package/dist/core-reexport.cjs +0 -1
  126. package/dist/executor-JGWZ7S6Z.cjs +0 -1
  127. package/dist/headless-reexport.cjs +0 -4
  128. package/dist/index.cjs +0 -155
  129. package/dist/lib-SPXD4LFI.cjs +0 -1
  130. package/dist/mcp-reexport.cjs +0 -16
  131. package/dist/processTemplate-FOYV6BC5.cjs +0 -1
  132. package/dist/react.cjs +0 -1
  133. package/dist/selectionRects-BMXJJCPJ.cjs +0 -1
  134. package/dist/selectionRects-TWK7CAC3.js +0 -1
  135. package/dist/ui.cjs +0 -1
  136. /package/dist/{agentApi-BVHzyk2l.d.cts → agentApi-BVHzyk2l.d.mts} +0 -0
@@ -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-BVHzyk2l.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, _ as StyleInfo, h as AgentContext, P as Position, R as Range, K as ParagraphFormatting, A as AgentCommand } from './agentApi-BVHzyk2l.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 +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;