@nice2dev/ui 1.1.10 → 1.2.1

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 (269) hide show
  1. package/CHANGELOG.md +183 -0
  2. package/README.md +12 -20
  3. package/dist/NiceApiExplorer.doc-CFJndg5h.js +25 -0
  4. package/dist/NiceApiExplorer.doc-TEx67kV5.cjs +1 -0
  5. package/dist/NiceBPMNDesigner.doc-6lK1pXRq.js +32 -0
  6. package/dist/NiceBPMNDesigner.doc-BY8t7qOi.cjs +8 -0
  7. package/dist/NiceBackupDiffViewer.doc-CYvOeX19.js +25 -0
  8. package/dist/NiceBackupDiffViewer.doc-ChQaZCg1.cjs +1 -0
  9. package/dist/NiceBackupList.doc-BdQCw0_D.cjs +1 -0
  10. package/dist/NiceBackupList.doc-BwjIAoqz.js +25 -0
  11. package/dist/NiceBackupRestoreDialog.doc-B2iiqTps.cjs +1 -0
  12. package/dist/NiceBackupRestoreDialog.doc-DuXSGJiD.js +25 -0
  13. package/dist/NiceBackupScheduler.doc-BpY45181.js +31 -0
  14. package/dist/NiceBackupScheduler.doc-ByeL3iH1.cjs +7 -0
  15. package/dist/NiceBackupStatusBadge.doc-BA3dYgiW.cjs +1 -0
  16. package/dist/NiceBackupStatusBadge.doc-CxwkVarP.js +25 -0
  17. package/dist/NiceBackupTagEditor.doc-Bej1KHco.cjs +7 -0
  18. package/dist/NiceBackupTagEditor.doc-CNy4uNws.js +31 -0
  19. package/dist/NiceBottomSheet.doc-keq-Fzlz.cjs +8 -0
  20. package/dist/NiceBottomSheet.doc-v-UPUKQk.js +32 -0
  21. package/dist/NiceBranchManager.doc-BTyRjX7X.cjs +6 -0
  22. package/dist/NiceBranchManager.doc-Cz4SyEqE.js +30 -0
  23. package/dist/NiceButton-3AcJJ15c.cjs +1 -0
  24. package/dist/NiceButton-5tWvfXKl.cjs +1 -0
  25. package/dist/NiceButton-DHSgQT1_.js +112 -0
  26. package/dist/NiceButton-vkI07DP0.js +88 -0
  27. package/dist/NiceCodeEditor-B8At55f5.js +1179 -0
  28. package/dist/NiceCodeEditor-BJSEzhcY.cjs +260 -0
  29. package/dist/NiceCodeEditor-VGIDWSkS.js +1181 -0
  30. package/dist/NiceCodeEditor-qX39PSnQ.cjs +260 -0
  31. package/dist/NiceColorPicker-CQhhjZ8w.cjs +1 -0
  32. package/dist/NiceColorPicker-Cbop7VMu.js +491 -0
  33. package/dist/NiceColorPicker-DCgmE-3H.cjs +1 -0
  34. package/dist/NiceColorPicker-DK30kJgy.js +486 -0
  35. package/dist/NiceColorPicker-DtPFxDKM.cjs +1 -0
  36. package/dist/NiceColorPicker-bNJBAU_c.js +598 -0
  37. package/dist/NiceConnectorConfigForm.doc-BKrDuhXw.cjs +7 -0
  38. package/dist/NiceConnectorConfigForm.doc-BsHeXz3M.js +31 -0
  39. package/dist/NiceDataBranchGraph.doc-Axidz41W.js +29 -0
  40. package/dist/NiceDataBranchGraph.doc-sjLmrrtE.cjs +5 -0
  41. package/dist/NiceDataBranchManager.doc-B1-Rp2X4.cjs +6 -0
  42. package/dist/NiceDataBranchManager.doc-GUqfTFvW.js +30 -0
  43. package/dist/NiceDataConflictResolver.doc-CjQryrTu.cjs +5 -0
  44. package/dist/NiceDataConflictResolver.doc-L-TcnQMX.js +29 -0
  45. package/dist/NiceDataDiffViewer.doc-BzGrf0U-.cjs +6 -0
  46. package/dist/NiceDataDiffViewer.doc-goxhSldH.js +30 -0
  47. package/dist/NiceDataGrid-BDEIbuBS.js +2218 -0
  48. package/dist/NiceDataGrid-BOCJr6XF.js +2217 -0
  49. package/dist/NiceDataGrid-BV5Oh-gy.cjs +10 -0
  50. package/dist/NiceDataGrid-CS5aB-EN.cjs +10 -0
  51. package/dist/NiceDataGrid-Dd7SI-M6.cjs +10 -0
  52. package/dist/NiceDataGrid-DjZchXYG.js +2217 -0
  53. package/dist/NiceDataMapper.doc-QmnmnvVq.js +30 -0
  54. package/dist/NiceDataMapper.doc-ytGVtYVr.cjs +6 -0
  55. package/dist/NiceDataMergeBuilder.doc-BcmzKxh2.cjs +6 -0
  56. package/dist/NiceDataMergeBuilder.doc-BvYa4aUJ.js +30 -0
  57. package/dist/NiceDataSnapshot.doc-C73K1biG.cjs +6 -0
  58. package/dist/NiceDataSnapshot.doc-hU7wnOzM.js +30 -0
  59. package/dist/NiceDesktopViews.doc-DJjYlyP2.cjs +1 -0
  60. package/dist/NiceDesktopViews.doc-ly-VUAJj.js +25 -0
  61. package/dist/NiceDeviceControlCard.doc-BZIo92-w.cjs +1 -0
  62. package/dist/NiceDeviceControlCard.doc-DIzZcW9L.js +25 -0
  63. package/dist/NiceDocumentViewer-B9VIVKyw.js +726 -0
  64. package/dist/NiceDocumentViewer-CDXAmPp7.cjs +180 -0
  65. package/dist/NiceDocumentationViewer.doc-BSNGa7a_.js +25 -0
  66. package/dist/NiceDocumentationViewer.doc-CrwlvPFg.cjs +1 -0
  67. package/dist/NiceEnergyChart.doc-DW-jllDV.cjs +1 -0
  68. package/dist/NiceEnergyChart.doc-DnEehTff.js +25 -0
  69. package/dist/NiceFeatureGate.doc-DN17uS_B.cjs +3 -0
  70. package/dist/NiceFeatureGate.doc-DNfFSRrh.js +27 -0
  71. package/dist/NiceForm-BCEXovJR.cjs +1 -0
  72. package/dist/NiceForm-BcN4p2kG.cjs +1 -0
  73. package/dist/NiceForm-D7oyWHXg.js +4820 -0
  74. package/dist/NiceForm-DUhxXArr.js +4817 -0
  75. package/dist/NiceForm-tIXS-M6b.js +4770 -0
  76. package/dist/NiceForm-uCeVmTrD.cjs +1 -0
  77. package/dist/NiceFormItem.doc-BJwEnDz2.js +36 -0
  78. package/dist/NiceFormItem.doc-Ck3PgaPD.cjs +12 -0
  79. package/dist/NiceGantt-CTbqCuwv.cjs +1 -0
  80. package/dist/NiceGantt-Dao7pN9z.js +328 -0
  81. package/dist/NiceGantt.doc-B6YZcJvG.cjs +11 -0
  82. package/dist/NiceGantt.doc-DsI1QXly.js +48 -0
  83. package/dist/NiceGitBlame.doc-BQ2KvGkD.js +30 -0
  84. package/dist/NiceGitBlame.doc-DuTSjZVN.cjs +6 -0
  85. package/dist/NiceGitDiffViewer.doc-D24AGos_.js +30 -0
  86. package/dist/NiceGitDiffViewer.doc-D9FVquBC.cjs +6 -0
  87. package/dist/NiceGitGraph.doc-C-8VGMIz.js +29 -0
  88. package/dist/NiceGitGraph.doc-eRvTmefl.cjs +5 -0
  89. package/dist/NiceGitHooks.doc-DCTVw7HX.cjs +5 -0
  90. package/dist/NiceGitHooks.doc-OCFj5w6v.js +29 -0
  91. package/dist/NiceHtmlEditor-BYk1roA4.cjs +10 -0
  92. package/dist/NiceHtmlEditor-C5kLeF9H.cjs +10 -0
  93. package/dist/NiceHtmlEditor-CFVMIC5L.js +848 -0
  94. package/dist/NiceHtmlEditor-DUwcqj5N.cjs +10 -0
  95. package/dist/NiceHtmlEditor-DiAphF1k.js +889 -0
  96. package/dist/NiceHtmlEditor-mWebBmy1.js +849 -0
  97. package/dist/NiceInstanceMonitor.doc-BSDZp5xa.js +31 -0
  98. package/dist/NiceInstanceMonitor.doc-HVbLufnh.cjs +7 -0
  99. package/dist/NiceLocaleManager.doc-CbVHDEWu.js +25 -0
  100. package/dist/NiceLocaleManager.doc-XH6hMW0Z.cjs +1 -0
  101. package/dist/NiceLockButton.doc-BMhSj3TB.cjs +1 -0
  102. package/dist/NiceLockButton.doc-DvHGhcfm.js +25 -0
  103. package/dist/NiceLoginForm-BHyDY7br.cjs +1 -0
  104. package/dist/NiceLoginForm-BuxFY2Rk.js +750 -0
  105. package/dist/NiceLoginForm-DQe77Isv.js +747 -0
  106. package/dist/NiceLoginForm-NBCo-DUZ.cjs +1 -0
  107. package/dist/NiceLoginForm.css +1 -0
  108. package/dist/NiceMAM.doc-CsQ57saR.cjs +8 -0
  109. package/dist/NiceMAM.doc-hjW7buTH.js +32 -0
  110. package/dist/NiceMention--3P3vO-W.cjs +430 -0
  111. package/dist/NiceMention-CA7CL5BI.js +11263 -0
  112. package/dist/NiceMention-CHcKRl-L.cjs +430 -0
  113. package/dist/NiceMention-Co2cqkVM.js +11316 -0
  114. package/dist/NiceMention-DJD0BLcp.js +11269 -0
  115. package/dist/NiceMention-DcaUEMSg.cjs +430 -0
  116. package/dist/NiceMention.css +1 -1
  117. package/dist/NiceModal-C4p8a82e.cjs +1 -0
  118. package/dist/NiceModal-TNlkaL_i.js +85 -0
  119. package/dist/NiceModuleLifecyclePanel-BWbKdVC_.js +7054 -0
  120. package/dist/NiceModuleLifecyclePanel-CZHIzvkE.cjs +1 -0
  121. package/dist/NiceModuleLifecyclePanel-DV3F_QdI.cjs +1 -0
  122. package/dist/NiceModuleLifecyclePanel-OC9YK2kG.js +7052 -0
  123. package/dist/NiceModuleLifecyclePanel-_OcfDmtC.cjs +1 -0
  124. package/dist/NiceModuleLifecyclePanel-gaZkIEtK.js +6825 -0
  125. package/dist/NiceModuleLifecyclePanel.css +1 -1
  126. package/dist/NiceNetworkDiscoveryPanel.doc-B0RtGaS3.js +25 -0
  127. package/dist/NiceNetworkDiscoveryPanel.doc-BFgFZI5G.cjs +1 -0
  128. package/dist/NicePagination-8XsBbMNx.js +165 -0
  129. package/dist/NicePagination-B3nZDZem.js +165 -0
  130. package/dist/NicePagination-B8rg1Y67.cjs +1 -0
  131. package/dist/NicePagination-CkOoXf0f.js +165 -0
  132. package/dist/NicePagination-D7lek1G7.cjs +1 -0
  133. package/dist/NicePagination-OjTEfZJE.cjs +1 -0
  134. package/dist/NicePipelineEditor.doc-CjqDKe2x.js +29 -0
  135. package/dist/NicePipelineEditor.doc-DZ0pTVTp.cjs +5 -0
  136. package/dist/NicePipelineMonitor.doc-C88-TagI.cjs +5 -0
  137. package/dist/NicePipelineMonitor.doc-CFtH4XJx.js +29 -0
  138. package/dist/NicePivotGrid-BJRSciWl.js +1183 -0
  139. package/dist/NicePivotGrid-BaZa2YZW.js +1157 -0
  140. package/dist/NicePivotGrid-CS1dPmNI.cjs +152 -0
  141. package/dist/NicePivotGrid-D2AxqDzJ.js +1183 -0
  142. package/dist/NicePivotGrid-DxQ6Py9D.cjs +152 -0
  143. package/dist/NicePivotGrid-DyOPhPO8.cjs +152 -0
  144. package/dist/NiceRoomGrid.doc-DJPVUQVg.cjs +8 -0
  145. package/dist/NiceRoomGrid.doc-DLHJS_Wb.js +32 -0
  146. package/dist/NiceSavedQueryPanel-B5HhqlAI.cjs +586 -0
  147. package/dist/NiceSavedQueryPanel-BC84uRfh.cjs +586 -0
  148. package/dist/NiceSavedQueryPanel-CMStDOKe.js +5125 -0
  149. package/dist/NiceSavedQueryPanel-CMfcODIO.js +5120 -0
  150. package/dist/NiceSavedQueryPanel-D2i34e_b.cjs +586 -0
  151. package/dist/NiceSavedQueryPanel-mPO2THs7.js +5142 -0
  152. package/dist/NiceSavedQueryPanel.css +1 -1
  153. package/dist/NiceSceneBar.doc-09sc3yuF.cjs +1 -0
  154. package/dist/NiceSceneBar.doc-DLePMuVU.js +25 -0
  155. package/dist/NiceSceneSelector.doc-CPzCAy-d.cjs +7 -0
  156. package/dist/NiceSceneSelector.doc-FCLZvPc0.js +31 -0
  157. package/dist/NiceScheduler-7gP7vcLy.cjs +5 -0
  158. package/dist/NiceScheduler-BAJRzFQN.js +1690 -0
  159. package/dist/NiceScheduler-Cy7F9tgH.js +1693 -0
  160. package/dist/NiceScheduler-DquRUZxD.cjs +5 -0
  161. package/dist/NiceScheduler-dJ7gHDv7.cjs +5 -0
  162. package/dist/NiceScheduler-l8N4yCWd.js +1716 -0
  163. package/dist/NiceSchedulerViews.doc-C9opZpgg.cjs +1 -0
  164. package/dist/NiceSchedulerViews.doc-Dy7ZH1iL.js +25 -0
  165. package/dist/NiceSelect-CZR8Zu_k.js +420 -0
  166. package/dist/NiceSelect-DIKGbaJo.cjs +1 -0
  167. package/dist/NiceSelect-DZB1Rs9x.js +435 -0
  168. package/dist/NiceSelect-tMz9QQUs.cjs +1 -0
  169. package/dist/NiceSensorGaugePanel.doc-BHirbWLn.cjs +8 -0
  170. package/dist/NiceSensorGaugePanel.doc-DjKmooI6.js +32 -0
  171. package/dist/NiceSpotlight.doc-BVZFfDVI.cjs +10 -0
  172. package/dist/NiceSpotlight.doc-JqwkzrEm.js +34 -0
  173. package/dist/NiceStateDesigner.doc-CfnwiwfU.js +29 -0
  174. package/dist/NiceStateDesigner.doc-DV4zEC50.cjs +5 -0
  175. package/dist/NiceStepper.doc-5VjaLM6r.js +31 -0
  176. package/dist/NiceStepper.doc-f8lYpr33.cjs +7 -0
  177. package/dist/NiceStreamDashboard.doc-74KUXya1.cjs +8 -0
  178. package/dist/NiceStreamDashboard.doc-k8PQfCM0.js +32 -0
  179. package/dist/NiceTaskInbox.doc-CHrxthqp.js +32 -0
  180. package/dist/NiceTaskInbox.doc-CdCTfgBq.cjs +8 -0
  181. package/dist/NiceTestBuilder.doc-BoBzLfa0.js +30 -0
  182. package/dist/NiceTestBuilder.doc-Cj1fNTvk.cjs +6 -0
  183. package/dist/NiceTranscoder.doc-Dnirl3wg.cjs +7 -0
  184. package/dist/NiceTranscoder.doc-cInCYZh7.js +31 -0
  185. package/dist/NiceVideoAnnotator.doc-C1iEi7OM.cjs +7 -0
  186. package/dist/NiceVideoAnnotator.doc-C8zyfKH_.js +31 -0
  187. package/dist/NiceVideoEditor.doc-C6mhEb-q.cjs +7 -0
  188. package/dist/NiceVideoEditor.doc-lrwmKjqj.js +31 -0
  189. package/dist/NiceWindow-BEov3s9F.js +2094 -0
  190. package/dist/NiceWindow-CDt6PCEg.cjs +1 -0
  191. package/dist/NiceWindow-CWN8OCHF.js +2109 -0
  192. package/dist/NiceWindow-Dd8qjkIW.cjs +1 -0
  193. package/dist/NiceWindow.css +1 -1
  194. package/dist/charts-Bo2WAI5T.cjs +768 -0
  195. package/dist/charts-ByrdMeQP.js +4767 -0
  196. package/dist/charts-C047IMVn.cjs +768 -0
  197. package/dist/charts-CCXSb3xk.js +4752 -0
  198. package/dist/charts-CqETcUhH.js +4752 -0
  199. package/dist/charts-DouiiHOT.cjs +768 -0
  200. package/dist/charts.cjs +1 -1
  201. package/dist/charts.css +1 -1
  202. package/dist/charts.d.ts +28 -18
  203. package/dist/charts.mjs +1 -1
  204. package/dist/core-B8eBUE4m.js +438 -0
  205. package/dist/core-BL-KmGYC.js +795 -0
  206. package/dist/core-Chg-oYCr.cjs +1 -0
  207. package/dist/core-CxBnKAhs.cjs +1 -0
  208. package/dist/core-D_LRh59n.js +795 -0
  209. package/dist/core-lBFqvT0V.cjs +1 -0
  210. package/dist/core-lazy-Bh2yg4Et.js +351 -0
  211. package/dist/core-lazy-CkWKjfc6.cjs +1 -0
  212. package/dist/data-branching-Dak1_ZKR.cjs +1 -0
  213. package/dist/data-branching-DiLAO4Qt.js +6386 -0
  214. package/dist/data-branching-Km4lc8P_.cjs +1 -0
  215. package/dist/data-branching-YQtJJEtn.js +6273 -0
  216. package/dist/data-branching.cjs +1 -1
  217. package/dist/data-branching.mjs +1 -1
  218. package/dist/data.cjs +1 -1
  219. package/dist/data.d.ts +22 -69
  220. package/dist/data.mjs +3 -3
  221. package/dist/devops-D5yIDM3e.js +8312 -0
  222. package/dist/devops-DkVluHBp.cjs +17 -0
  223. package/dist/devops-rVpB0ZAX.cjs +17 -0
  224. package/dist/devops-zsMUueTd.js +8648 -0
  225. package/dist/devops.cjs +1 -1
  226. package/dist/devops.d.ts +3 -3
  227. package/dist/devops.mjs +1 -1
  228. package/dist/editors.cjs +1 -1
  229. package/dist/editors.d.ts +106 -63
  230. package/dist/editors.mjs +55 -54
  231. package/dist/feedback.cjs +1 -1
  232. package/dist/feedback.d.ts +76 -2
  233. package/dist/feedback.mjs +10 -9
  234. package/dist/index.cjs +261 -261
  235. package/dist/index.css +1 -1
  236. package/dist/index.d.ts +831 -433
  237. package/dist/index.mjs +27339 -26540
  238. package/dist/injectStyleOnce-BzC_BCs_.js +9 -0
  239. package/dist/injectStyleOnce-DeWaxcdf.cjs +1 -0
  240. package/dist/lazy.cjs +1 -1
  241. package/dist/lazy.d.ts +9 -7
  242. package/dist/lazy.mjs +55 -55
  243. package/dist/navigation.cjs +1 -1
  244. package/dist/navigation.css +1 -0
  245. package/dist/navigation.d.ts +99 -43
  246. package/dist/navigation.mjs +504 -547
  247. package/dist/no-code-6WyYb3hL.cjs +331 -0
  248. package/dist/no-code-BH5oVFC6.js +8186 -0
  249. package/dist/no-code-CnHG5_Vn.js +8186 -0
  250. package/dist/no-code-DMKlg1Zl.cjs +331 -0
  251. package/dist/no-code-DiTEnuRv.js +8288 -0
  252. package/dist/no-code-wG9c0z_T.cjs +331 -0
  253. package/dist/no-code.cjs +1 -1
  254. package/dist/no-code.css +1 -1
  255. package/dist/no-code.d.ts +25 -18
  256. package/dist/no-code.mjs +3 -3
  257. package/dist/overlays.cjs +1 -1
  258. package/dist/overlays.d.ts +36 -30
  259. package/dist/overlays.mjs +24 -490
  260. package/dist/pickerCommons-0vyK1Knv.js +547 -0
  261. package/dist/pickerCommons-BCRiHDE_.cjs +1 -0
  262. package/dist/pickerCommons-BFbItm8o.cjs +1 -0
  263. package/dist/pickerCommons-BHirHJyn.js +548 -0
  264. package/dist/pickerCommons-Bt8JIaTN.cjs +1 -0
  265. package/dist/pickerCommons-DkumQ3KE.js +548 -0
  266. package/dist/pickerCommons.css +1 -1
  267. package/dist/style.css +15 -9
  268. package/package.json +4 -6
  269. package/css/legacy-bg-text-aliases.css +0 -87
@@ -0,0 +1,10 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("@nice2dev/ui-core"),i=require("react"),g=require("./NiceColorPicker-DCgmE-3H.cjs"),Ze=require("./NiceSelect-tMz9QQUs.cjs");function he(b){const t=b.trim().toLowerCase();return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")?!0:!(t.startsWith("javascript:")||t.startsWith("vbscript:")||t.startsWith("data:text"))}const et=[{target:".nice-htmleditor",titleKey:"tutorial.htmlEditor.intro.title",title:"Rich text editor",contentKey:"tutorial.htmlEditor.intro.content",content:"Format text with the toolbar, insert links, images and tables, and switch to HTML or Markdown source when you need it.",placement:"auto"}],tt=["bold","italic","underline","strikethrough","h1","h2","h3","ul","ol","blockquote","hr","link","unlink","image","table","code","alignLeft","alignCenter","alignRight","fontSize","fontColor","undo","redo","clear","findReplace","emoji","source","fullscreen","markdown"],l=b=>r.jsx(u.NiceIcon,{name:b,size:16}),nt={bold:r.jsx("strong",{style:{fontFamily:"serif"},children:"B"}),italic:r.jsx("em",{style:{fontFamily:"serif"},children:"I"}),underline:r.jsx("span",{style:{textDecoration:"underline"},children:"U"}),strikethrough:r.jsx("span",{style:{textDecoration:"line-through"},children:"S"}),h1:"H1",h2:"H2",h3:"H3",ul:l("list"),ol:l("list-ordered"),link:l("link"),unlink:l("unlink"),undo:l("reply"),redo:l("forward"),clear:l("trash"),table:l("table"),image:l("image"),code:l("code"),markdown:"MD",blockquote:l("quote"),hr:l("minus"),subscript:"X₂",superscript:"X²",indent:l("indent"),outdent:l("outdent"),alignLeft:l("align-left"),alignCenter:l("align-center"),alignRight:l("align-right"),alignJustify:l("align-justify"),fullscreen:l("expand"),removeFormat:l("eraser"),print:l("printer"),source:l("terminal"),emoji:l("smile"),findReplace:l("search"),fontSize:l("type"),fontColor:l("palette")},rt=[{value:"1",label:"8pt"},{value:"2",label:"10pt"},{value:"3",label:"12pt"},{value:"4",label:"14pt"},{value:"5",label:"18pt"},{value:"6",label:"24pt"},{value:"7",label:"36pt"}],ot=[{label:"Faces",emojis:["😀","😂","😊","😍","🤔","😢","😎","🥳","😤","🤯","🥰","😴"]},{label:"Hands",emojis:["👍","👎","👏","🤝","✌️","🤞","💪","🙌","👋","🤙"]},{label:"Symbols",emojis:["❤️","⭐","🔥","✅","❌","⚡","💡","📌","🎯","🏆","🎉","💬"]},{label:"Arrows",emojis:["➡️","⬅️","⬆️","⬇️","↩️","🔄","▶️","⏸️","⏹️","⏩"]}];function it(b){let t=b;return t=t.replace(/<h1[^>]*>(.*?)<\/h1>/gi,`# $1
2
+ `),t=t.replace(/<h2[^>]*>(.*?)<\/h2>/gi,`## $1
3
+ `),t=t.replace(/<h3[^>]*>(.*?)<\/h3>/gi,`### $1
4
+ `),t=t.replace(/<strong[^>]*>(.*?)<\/strong>/gi,"**$1**"),t=t.replace(/<b[^>]*>(.*?)<\/b>/gi,"**$1**"),t=t.replace(/<em[^>]*>(.*?)<\/em>/gi,"*$1*"),t=t.replace(/<i[^>]*>(.*?)<\/i>/gi,"*$1*"),t=t.replace(/<code[^>]*>(.*?)<\/code>/gi,"`$1`"),t=t.replace(/<pre[^>]*>(.*?)<\/pre>/gis,"```\n$1\n```\n"),t=t.replace(/<br\s*\/?>/gi,`
5
+ `),t=t.replace(/<li[^>]*>(.*?)<\/li>/gi,`- $1
6
+ `),t=t.replace(/<\/?(?:ul|ol|p|div)[^>]*>/gi,`
7
+ `),t=t.replace(/<[^>]+>/g,""),t=t.replace(/\n{3,}/g,`
8
+
9
+ `),t.trim()}function st(b){let t=b;return t=t.replace(/^### (.+)$/gm,"<h3>$1</h3>"),t=t.replace(/^## (.+)$/gm,"<h2>$1</h2>"),t=t.replace(/^# (.+)$/gm,"<h1>$1</h1>"),t=t.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),t=t.replace(/\*(.+?)\*/g,"<em>$1</em>"),t=t.replace(/`([^`]+)`/g,"<code>$1</code>"),t=t.replace(/```\n?([\s\S]*?)\n?```/g,"<pre>$1</pre>"),t=t.replace(/^- (.+)$/gm,"<li>$1</li>"),t=t.replace(/(<li>.*<\/li>)/gs,"<ul>$1</ul>"),t=t.replace(/\n/g,"<br>"),t}const at=({value:b,defaultValue:t,onChange:xe,placeholder:be,height:$=200,toolbar:ge=tt,readOnly:h,onImageUpload:w,mentionTrigger:C,mentionSuggestions:Ce,onMentionSearch:Y,onFileDrop:H,pasteCleanup:Z=!0,maxLength:M=0,showWordCount:ee=!1,templates:D,label:te,error:L,helperText:ne,required:ke,disabled:x,size:ye="md",id:re,className:ve,style:je,accessMode:Se,tutorial:Te})=>{const I=u.useNiceAccessMode(Se,re),we=I==="hidden";I==="disabled"&&(x=!0),I==="readOnly"&&(h=!0);const oe=u.useControlId(re),[m,c]=u.useControllableState({value:b,defaultValue:t,fallbackValue:"",onChange:xe,componentName:"NiceHtmlEditor"}),d=i.useRef(null),[He]=i.useState(()=>({__html:m})),E=i.useRef(m);E.current=m;const Me=i.useCallback(e=>{d.current=e,e&&e.innerHTML!==E.current&&(e.innerHTML=E.current)},[]);i.useLayoutEffect(()=>{const e=d.current;e&&e.innerHTML!==m&&(e.innerHTML=m)},[m]);const ie=i.useRef(null),Ne=i.useRef(null),[v,O]=i.useState(!1),[F,se]=i.useState(""),[j,B]=i.useState(!1),[W,ae]=i.useState(""),[K,R]=i.useState(!1),[_e,Le]=i.useState(""),[A,q]=i.useState(0),[P,Re]=i.useState(!1),[le,ze]=i.useState("#000000"),[ce,$e]=i.useState("#ffff00"),[de,U]=i.useState(0),[De,Ie]=i.useState(0),[Q,X]=i.useState(!1),[f,Ee]=i.useState(""),[N,Oe]=i.useState(""),[J,ue]=i.useState(!1),[me,fe]=i.useState(!1),p=i.useCallback((e,n)=>{if(h||x)return;if(e==="markdown"){v?(c(st(F)),O(!1)):(se(it(m)),O(!0),B(!1));return}if(e==="source"){j?(c(W),B(!1)):(ae(m),B(!0),O(!1));return}const s=d.current;if(s){if(e==="fullscreen"){Re(o=>!o);return}if(e==="emoji"){ue(o=>!o);return}if(e==="findReplace"){X(o=>!o);return}if(e==="image"){if(w)ie.current?.click();else{const o=prompt("Image URL:");o&&he(o)&&(s.focus(),document.execCommand("insertImage",!1,o),c(u.sanitizeHtml(s.innerHTML)))}return}switch(s.focus(),e){case"bold":document.execCommand("bold");break;case"italic":document.execCommand("italic");break;case"underline":document.execCommand("underline");break;case"strikethrough":document.execCommand("strikeThrough");break;case"h1":document.execCommand("formatBlock",!1,"h1");break;case"h2":document.execCommand("formatBlock",!1,"h2");break;case"h3":document.execCommand("formatBlock",!1,"h3");break;case"ul":document.execCommand("insertUnorderedList");break;case"ol":document.execCommand("insertOrderedList");break;case"blockquote":document.execCommand("formatBlock",!1,"blockquote");break;case"hr":document.execCommand("insertHorizontalRule");break;case"subscript":document.execCommand("subscript");break;case"superscript":document.execCommand("superscript");break;case"indent":document.execCommand("indent");break;case"outdent":document.execCommand("outdent");break;case"alignLeft":document.execCommand("justifyLeft");break;case"alignCenter":document.execCommand("justifyCenter");break;case"alignRight":document.execCommand("justifyRight");break;case"alignJustify":document.execCommand("justifyFull");break;case"removeFormat":document.execCommand("removeFormat");break;case"print":window.print();return;case"link":{const o=prompt("URL:");o&&he(o)&&document.execCommand("createLink",!1,o);break}case"unlink":document.execCommand("unlink");break;case"undo":document.execCommand("undo");break;case"redo":document.execCommand("redo");break;case"clear":document.execCommand("removeFormat");break;case"fontSize":{n&&document.execCommand("fontSize",!1,n);break}case"fontColor":{n&&document.execCommand("foreColor",!1,n);break}case"bgColor":{n&&document.execCommand("hiliteColor",!1,n);break}case"table":{document.execCommand("insertHTML",!1,'<table class="nice-htmleditor__table"><thead><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th></tr></thead><tbody><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></tbody></table><p>&nbsp;</p>');break}case"code":{const a=window.getSelection()?.toString()||"";a.includes(`
10
+ `)||a.length>60?document.execCommand("insertHTML",!1,`<pre class="nice-htmleditor__code-block">${a||"// code"}</pre>`):document.execCommand("insertHTML",!1,`<code>${a||"code"}</code>`);break}}c(u.sanitizeHtml(s.innerHTML)),U(s.textContent?.length??0)}},[c,h,x,v,F,m,w,j,W]),Fe=i.useCallback(async e=>{const n=e.target.files?.[0];if(!n||!w)return;const s=await w(n),o=d.current;o&&s&&(o.focus(),document.execCommand("insertImage",!1,s),c(o.innerHTML)),e.target.value=""},[w,c]),Be=i.useCallback(()=>{const e=d.current;if(!e)return;const n=e.textContent?.length??0;if(M>0&&n>M&&(e.textContent=(e.textContent??"").slice(0,M)),U(n),Ie((e.textContent??"").trim().split(/\s+/).filter(Boolean).length),c(e.innerHTML),C){const s=window.getSelection();if(s&&s.rangeCount>0){const o=s.getRangeAt(0),a=o.startContainer;if(a.nodeType===Node.TEXT_NODE){const k=a.textContent||"",T=o.startOffset,z=k.slice(0,T),y=z.lastIndexOf(C);if(y>=0&&(y===0||/\s/.test(z[y-1]))){const _=z.slice(y+C.length);if(!/\s/.test(_)){R(!0),Le(_),q(0),Y?.(_);return}}}}R(!1)}},[c,C,Y]),S=Ce?.filter(e=>e.label.toLowerCase().includes(_e.toLowerCase())).slice(0,8)??[],V=i.useCallback(e=>{const n=d.current;if(!n)return;const s=window.getSelection();if(!s||s.rangeCount===0)return;const o=s.getRangeAt(0),a=o.startContainer;if(a.nodeType===Node.TEXT_NODE&&C){const k=a.textContent||"",T=o.startOffset,y=k.slice(0,T).lastIndexOf(C);if(y>=0){const _=k.slice(0,y),Ve=k.slice(T),Ge=`<span class="nice-htmleditor__mention" data-mention="${e.key}" contenteditable="false">${C}${e.label}</span>&nbsp;`;a.textContent=_;const G=document.createRange();G.setStartAfter(a),G.collapse(!0);const Ye=G.createContextualFragment(Ge+Ve);a.parentNode?.insertBefore(Ye,a.nextSibling),s.collapseToEnd(),c(n.innerHTML)}}R(!1)},[C,c]),We=i.useCallback(e=>{if(K&&S.length>0){e.key==="ArrowDown"?(e.preventDefault(),q(n=>Math.min(n+1,S.length-1))):e.key==="ArrowUp"?(e.preventDefault(),q(n=>Math.max(n-1,0))):e.key==="Enter"?(e.preventDefault(),V(S[A])):e.key==="Escape"&&R(!1);return}(e.ctrlKey||e.metaKey)&&e.key==="b"?(e.preventDefault(),p("bold")):(e.ctrlKey||e.metaKey)&&e.key==="i"?(e.preventDefault(),p("italic")):(e.ctrlKey||e.metaKey)&&e.key==="u"?(e.preventDefault(),p("underline")):(e.ctrlKey||e.metaKey)&&e.key==="f"?(e.preventDefault(),X(n=>!n)):(e.ctrlKey||e.metaKey)&&e.key==="z"&&!e.shiftKey?(e.preventDefault(),p("undo")):(e.ctrlKey||e.metaKey)&&(e.key==="y"||e.key==="z"&&e.shiftKey)&&(e.preventDefault(),p("redo"))},[K,S,A,V,p]),Ke=i.useCallback(e=>{if(!Z)return;e.preventDefault();const n=e.clipboardData.getData("text/html"),s=e.clipboardData.getData("text/plain");if(n){const a=n.replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<script[\s\S]*?<\/script>/gi,"").replace(/class="[^"]*"/gi,"").replace(/style="[^"]*"/gi,"").replace(/<o:[^>]*>[\s\S]*?<\/o:[^>]*>/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?(?:xml|meta|link|font|span)[^>]*>/gi,"");document.execCommand("insertHTML",!1,a)}else s&&document.execCommand("insertText",!1,s);const o=d.current;o&&(c(o.innerHTML),U(o.textContent?.length??0))},[Z,c]),Ae=i.useCallback(async e=>{if(!H)return;e.preventDefault();const n=Array.from(e.dataTransfer.files);if(n.length===0)return;const s=await H(n),o=d.current;if(o){o.focus();for(const a of s)if(/\.(png|jpe?g|gif|webp|svg|bmp|ico)$/i.test(a)||a.startsWith("data:image/"))document.execCommand("insertImage",!1,a);else{const T=`<a href="${a}">${a.split("/").pop()??a}</a>`;document.execCommand("insertHTML",!1,T)}c(o.innerHTML)}},[H,c]),qe=i.useCallback(e=>{H&&e.preventDefault()},[H]),pe=i.useCallback(e=>{const n=d.current;if(!n||!f)return;const s=n.textContent??"",o=f.toLowerCase(),a=s.toLowerCase();(e===1?a.indexOf(o):a.lastIndexOf(o))!==-1&&(n.focus(),window.find?.(f))},[f]),Pe=i.useCallback(()=>{const e=d.current;!e||!f||(e.innerHTML=e.innerHTML.split(f).join(N),c(e.innerHTML))},[f,N,c]),Ue=i.useCallback(()=>{if(!f)return;const e=m.split(f).join(N);c(e);const n=d.current;n&&(n.innerHTML=e)},[f,N,m,c]),Qe=i.useCallback(e=>{const n=d.current;n&&(n.focus(),document.execCommand("insertText",!1,e),c(n.innerHTML),ue(!1))},[c]),Xe=i.useCallback(e=>{const n=d.current;n&&(n.focus(),document.execCommand("insertHTML",!1,e),c(n.innerHTML),fe(!1))},[c]),Je=i.useCallback(e=>{const n=x||h;if(e==="fontSize")return r.jsx(Ze.NiceSelect,{size:"sm",value:"",onChange:o=>p("fontSize",String(o)),disabled:n,placeholder:"Size",options:rt.map(o=>({value:o.value,label:o.label})),style:{minWidth:70,maxWidth:80}},e);if(e==="fontColor")return r.jsx(g.NiceColorPicker,{value:le,onChange:o=>{ze(o),p("fontColor",o)},disabled:n,size:"sm",label:"",title:"Text color"},e);if(e==="bgColor")return r.jsx(g.NiceColorPicker,{value:ce,onChange:o=>{$e(o),p("bgColor",o)},disabled:n,size:"sm",label:"",title:"Highlight color"},e);const s=e==="markdown"&&v||e==="fullscreen"&&P||e==="source"&&j||e==="findReplace"&&Q||e==="emoji"&&J;return r.jsx(g.NiceButton,{size:"sm",variant:s?"primary":"ghost",onClick:()=>p(e),title:e,disabled:n,children:nt[e]||e},e)},[x,h,p,v,P,le,ce,j,Q,J]);return we?null:r.jsxs("div",{className:`nice-field nice-field--${ye} ${L?"nice-field--error":""} ${ve||""}`,style:je,children:[te&&r.jsxs("label",{className:"nice-field__label",htmlFor:oe,children:[te,ke&&r.jsx("span",{className:"nice-field__required",children:"*"})]}),r.jsxs("div",{ref:Ne,className:`nice-htmleditor${P?" nice-htmleditor--fullscreen":""}`,style:{position:"relative"},children:[r.jsx("span",{style:{position:"absolute",top:6,right:6,zIndex:20},children:r.jsx(u.NiceTutorialButton,{steps:u.resolveTutorial(Te,et)})}),r.jsxs("div",{className:"nice-htmleditor__toolbar",style:{display:"flex",flexWrap:"wrap",gap:2,alignItems:"center"},children:[ge.map(Je),D&&D.length>0&&r.jsxs("div",{style:{position:"relative"},children:[r.jsx(g.NiceButton,{size:"sm",variant:me?"primary":"ghost",onClick:()=>fe(e=>!e),title:"Insert template",children:r.jsx(u.NiceIcon,{name:"clipboard",size:16})}),me&&r.jsx("ul",{style:{position:"absolute",top:"100%",right:0,zIndex:200,background:"var(--nice-bg-primary, #fff)",border:"1px solid var(--nice-border-color, #ddd)",borderRadius:6,boxShadow:"0 4px 16px var(--nice-overlay-12, rgba(0, 0, 0, 0.12))",listStyle:"none",margin:0,padding:4,minWidth:160,maxHeight:200,overflow:"auto"},children:D.map((e,n)=>r.jsx("li",{style:{padding:"6px 10px",cursor:"pointer",borderRadius:4},onMouseDown:s=>{s.preventDefault(),Xe(e.html)},children:e.label},n))})]})]}),Q&&r.jsxs("div",{className:"nice-htmleditor__find-bar",style:{display:"flex",gap:4,alignItems:"center",padding:"4px 8px",background:"var(--nice-bg-secondary, #f8f9fa)",borderBottom:"1px solid var(--nice-border-color, #ddd)",fontSize:"0.875em"},children:[r.jsx("input",{type:"text",placeholder:"Find...",value:f,onChange:e=>Ee(e.target.value),style:{flex:1,maxWidth:180,padding:"2px 6px",border:"1px solid var(--nice-border-color, #ccc)",borderRadius:4,background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)"}}),r.jsx("input",{type:"text",placeholder:"Replace...",value:N,onChange:e=>Oe(e.target.value),style:{flex:1,maxWidth:180,padding:"2px 6px",border:"1px solid var(--nice-border-color, #ccc)",borderRadius:4,background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)"}}),r.jsx(g.NiceButton,{size:"sm",variant:"ghost",onClick:()=>pe(1),title:"Find next",children:r.jsx(u.NiceIcon,{name:"chevron-right",size:14})}),r.jsx(g.NiceButton,{size:"sm",variant:"ghost",onClick:()=>pe(-1),title:"Find previous",children:r.jsx(u.NiceIcon,{name:"chevron-left",size:14})}),r.jsx(g.NiceButton,{size:"sm",variant:"ghost",onClick:Pe,disabled:x||h,children:"Replace"}),r.jsx(g.NiceButton,{size:"sm",variant:"ghost",onClick:Ue,disabled:x||h,children:"All"}),r.jsx(g.NiceButton,{size:"sm",variant:"ghost",onClick:()=>X(!1),children:r.jsx(u.NiceIcon,{name:"close",size:14,title:"Close"})})]}),J&&r.jsx("div",{className:"nice-htmleditor__emoji-picker",style:{padding:8,background:"var(--nice-bg-primary, #fff)",borderBottom:"1px solid var(--nice-border-color, #ddd)",maxHeight:180,overflowY:"auto"},children:ot.map(e=>r.jsxs("div",{children:[r.jsx("div",{style:{fontSize:"0.7em",fontWeight:600,color:"var(--nice-text-muted, #999)",padding:"4px 0"},children:e.label}),r.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:2},children:e.emojis.map(n=>r.jsx("span",{style:{cursor:"pointer",fontSize:"1.2em",padding:2,borderRadius:4},onClick:()=>Qe(n),title:n,children:n},n))})]},e.label))}),r.jsx("input",{ref:ie,type:"file",accept:"image/*",style:{display:"none"},onChange:Fe}),j?r.jsx("textarea",{className:"nice-htmleditor__source",value:W,onChange:e=>ae(e.target.value),style:{minHeight:$,width:"100%",fontFamily:"monospace",resize:"vertical",whiteSpace:"pre",fontSize:"0.85em",background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)",border:"none",padding:12,boxSizing:"border-box",outline:"none"},disabled:x||h}):v?r.jsx("textarea",{className:"nice-htmleditor__markdown",value:F,onChange:e=>se(e.target.value),style:{minHeight:$,width:"100%",fontFamily:"monospace",resize:"vertical",background:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #1f2937)",border:"none",padding:12,boxSizing:"border-box",outline:"none"},disabled:x||h}):r.jsxs("div",{style:{position:"relative"},children:[r.jsx("div",{ref:Me,id:oe,className:"nice-htmleditor__content",contentEditable:!x&&!h,dangerouslySetInnerHTML:He,onInput:Be,onKeyDown:We,onPaste:Ke,onDrop:Ae,onDragOver:qe,style:{minHeight:$},"data-placeholder":be,role:"textbox","aria-multiline":"true",suppressContentEditableWarning:!0}),K&&S.length>0&&r.jsx("ul",{className:"nice-htmleditor__mention-list",children:S.map((e,n)=>r.jsx("li",{className:`nice-htmleditor__mention-item ${n===A?"nice-htmleditor__mention-item--active":""}`,onMouseDown:s=>{s.preventDefault(),V(e)},children:e.label},e.key))})]}),r.jsxs("div",{className:"nice-htmleditor__statusbar",style:{display:"flex",gap:12,padding:"2px 8px",fontSize:"0.75em",color:"var(--nice-text-muted, #666)",borderTop:"1px solid var(--nice-border-color, #eee)"},children:[M>0&&r.jsxs("span",{children:[de," / ",M]}),ee&&r.jsxs("span",{children:[De," words"]}),ee&&r.jsxs("span",{children:[de," chars"]}),j&&r.jsx("span",{style:{fontWeight:600},children:"HTML Source"}),v&&r.jsx("span",{style:{fontWeight:600},children:"Markdown"})]})]}),L&&r.jsx("div",{className:"nice-field__error",children:L}),ne&&!L&&r.jsx("div",{className:"nice-field__hint",children:ne})]})};exports.NiceHtmlEditor=at;