suneditor 3.0.0-beta.9 → 3.0.0-rc.2

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 (380) hide show
  1. package/README.md +65 -57
  2. package/dist/suneditor-contents.min.css +1 -0
  3. package/dist/suneditor.min.css +1 -1
  4. package/dist/suneditor.min.js +1 -1
  5. package/package.json +110 -61
  6. package/src/assets/design/color.css +36 -17
  7. package/src/assets/design/size.css +2 -0
  8. package/src/assets/icons/defaultIcons.js +17 -2
  9. package/src/assets/suneditor-contents.css +51 -16
  10. package/src/assets/suneditor.css +116 -43
  11. package/src/core/config/contextProvider.js +288 -0
  12. package/src/core/config/eventManager.js +188 -0
  13. package/src/core/config/instanceCheck.js +59 -0
  14. package/src/core/config/optionProvider.js +452 -0
  15. package/src/core/editor.js +166 -1637
  16. package/src/core/event/actions/index.js +229 -0
  17. package/src/core/event/effects/common.registry.js +74 -0
  18. package/src/core/event/effects/keydown.registry.js +573 -0
  19. package/src/core/event/effects/ruleHelpers.js +148 -0
  20. package/src/core/event/eventOrchestrator.js +944 -0
  21. package/src/core/event/executor.js +27 -0
  22. package/src/core/{base/eventHandlers → event/handlers}/handler_toolbar.js +27 -28
  23. package/src/core/{base/eventHandlers → event/handlers}/handler_ww_clipboard.js +10 -8
  24. package/src/core/{base/eventHandlers → event/handlers}/handler_ww_dragDrop.js +22 -23
  25. package/src/core/event/handlers/handler_ww_input.js +75 -0
  26. package/src/core/event/handlers/handler_ww_key.js +228 -0
  27. package/src/core/event/handlers/handler_ww_mouse.js +166 -0
  28. package/src/core/event/ports.js +211 -0
  29. package/src/core/event/reducers/keydown.reducer.js +97 -0
  30. package/src/core/event/rules/keydown.rule.arrow.js +63 -0
  31. package/src/core/event/rules/keydown.rule.backspace.js +208 -0
  32. package/src/core/event/rules/keydown.rule.delete.js +132 -0
  33. package/src/core/event/rules/keydown.rule.enter.js +150 -0
  34. package/src/core/event/rules/keydown.rule.tab.js +35 -0
  35. package/src/core/event/support/defaultLineManager.js +136 -0
  36. package/src/core/event/support/selectionState.js +204 -0
  37. package/src/core/kernel/coreKernel.js +320 -0
  38. package/src/core/kernel/kernelInjector.js +19 -0
  39. package/src/core/kernel/store.js +173 -0
  40. package/src/core/{class → logic/dom}/char.js +42 -45
  41. package/src/core/logic/dom/format.js +1075 -0
  42. package/src/core/{class → logic/dom}/html.js +743 -624
  43. package/src/core/logic/dom/inline.js +1847 -0
  44. package/src/core/logic/dom/listFormat.js +601 -0
  45. package/src/core/{class → logic/dom}/nodeTransform.js +92 -72
  46. package/src/core/{class → logic/dom}/offset.js +254 -317
  47. package/src/core/logic/dom/selection.js +754 -0
  48. package/src/core/logic/panel/menu.js +389 -0
  49. package/src/core/logic/panel/toolbar.js +449 -0
  50. package/src/core/logic/panel/viewer.js +761 -0
  51. package/src/core/logic/shell/_commandExecutor.js +380 -0
  52. package/src/core/logic/shell/commandDispatcher.js +241 -0
  53. package/src/core/logic/shell/component.js +970 -0
  54. package/src/core/logic/shell/focusManager.js +110 -0
  55. package/src/core/{base → logic/shell}/history.js +110 -60
  56. package/src/core/logic/shell/pluginManager.js +363 -0
  57. package/src/core/logic/shell/shortcuts.js +130 -0
  58. package/src/core/logic/shell/ui.js +904 -0
  59. package/src/core/schema/context.js +66 -0
  60. package/src/core/schema/frameContext.js +160 -0
  61. package/src/core/schema/options.js +628 -0
  62. package/src/core/section/constructor.js +194 -500
  63. package/src/core/section/documentType.js +297 -222
  64. package/src/events.js +808 -543
  65. package/src/helper/clipboard.js +27 -16
  66. package/src/helper/converter.js +100 -78
  67. package/src/helper/dom/domCheck.js +56 -30
  68. package/src/helper/dom/domQuery.js +159 -89
  69. package/src/helper/dom/domUtils.js +114 -49
  70. package/src/helper/dom/index.js +5 -1
  71. package/src/helper/env.js +26 -26
  72. package/src/helper/index.js +1 -1
  73. package/src/helper/keyCodeMap.js +25 -28
  74. package/src/helper/numbers.js +4 -8
  75. package/src/helper/unicode.js +4 -8
  76. package/src/hooks/base.js +307 -0
  77. package/src/hooks/params.js +130 -0
  78. package/src/interfaces/contracts.js +227 -0
  79. package/src/interfaces/index.js +7 -0
  80. package/src/interfaces/plugins.js +239 -0
  81. package/src/langs/ckb.js +4 -4
  82. package/src/langs/cs.js +4 -4
  83. package/src/langs/da.js +4 -4
  84. package/src/langs/de.js +4 -4
  85. package/src/langs/en.js +4 -4
  86. package/src/langs/es.js +4 -4
  87. package/src/langs/fa.js +4 -4
  88. package/src/langs/fr.js +4 -4
  89. package/src/langs/he.js +4 -4
  90. package/src/langs/hu.js +4 -4
  91. package/src/langs/it.js +4 -4
  92. package/src/langs/ja.js +4 -4
  93. package/src/langs/km.js +4 -4
  94. package/src/langs/ko.js +4 -4
  95. package/src/langs/lv.js +4 -4
  96. package/src/langs/nl.js +4 -4
  97. package/src/langs/pl.js +4 -4
  98. package/src/langs/pt_br.js +13 -13
  99. package/src/langs/ro.js +4 -4
  100. package/src/langs/ru.js +4 -4
  101. package/src/langs/se.js +4 -4
  102. package/src/langs/tr.js +4 -4
  103. package/src/langs/uk.js +4 -4
  104. package/src/langs/ur.js +4 -4
  105. package/src/langs/zh_cn.js +4 -4
  106. package/src/modules/{Browser.js → contract/Browser.js} +119 -128
  107. package/src/modules/{ColorPicker.js → contract/ColorPicker.js} +132 -142
  108. package/src/modules/contract/Controller.js +589 -0
  109. package/src/modules/{Figure.js → contract/Figure.js} +591 -411
  110. package/src/modules/{HueSlider.js → contract/HueSlider.js} +125 -86
  111. package/src/modules/contract/Modal.js +357 -0
  112. package/src/modules/contract/index.js +9 -0
  113. package/src/modules/manager/ApiManager.js +197 -0
  114. package/src/modules/{FileManager.js → manager/FileManager.js} +128 -160
  115. package/src/modules/manager/index.js +5 -0
  116. package/src/modules/{ModalAnchorEditor.js → ui/ModalAnchorEditor.js} +108 -138
  117. package/src/modules/{SelectMenu.js → ui/SelectMenu.js} +119 -120
  118. package/src/modules/{_DragHandle.js → ui/_DragHandle.js} +1 -1
  119. package/src/modules/ui/index.js +6 -0
  120. package/src/plugins/browser/audioGallery.js +23 -26
  121. package/src/plugins/browser/fileBrowser.js +25 -28
  122. package/src/plugins/browser/fileGallery.js +20 -23
  123. package/src/plugins/browser/imageGallery.js +24 -23
  124. package/src/plugins/browser/videoGallery.js +27 -29
  125. package/src/plugins/command/blockquote.js +11 -17
  126. package/src/plugins/command/exportPDF.js +26 -26
  127. package/src/plugins/command/fileUpload.js +138 -133
  128. package/src/plugins/command/list_bulleted.js +48 -44
  129. package/src/plugins/command/list_numbered.js +48 -44
  130. package/src/plugins/dropdown/align.js +64 -50
  131. package/src/plugins/dropdown/backgroundColor.js +34 -35
  132. package/src/plugins/dropdown/{formatBlock.js → blockStyle.js} +43 -37
  133. package/src/plugins/dropdown/font.js +50 -36
  134. package/src/plugins/dropdown/fontColor.js +34 -35
  135. package/src/plugins/dropdown/hr.js +55 -50
  136. package/src/plugins/dropdown/layout.js +20 -15
  137. package/src/plugins/dropdown/lineHeight.js +46 -30
  138. package/src/plugins/dropdown/list.js +32 -33
  139. package/src/plugins/dropdown/paragraphStyle.js +40 -34
  140. package/src/plugins/dropdown/table/index.js +915 -0
  141. package/src/plugins/dropdown/table/render/table.html.js +308 -0
  142. package/src/plugins/dropdown/table/render/table.menu.js +121 -0
  143. package/src/plugins/dropdown/table/services/table.cell.js +465 -0
  144. package/src/plugins/dropdown/table/services/table.clipboard.js +414 -0
  145. package/src/plugins/dropdown/table/services/table.grid.js +504 -0
  146. package/src/plugins/dropdown/table/services/table.resize.js +463 -0
  147. package/src/plugins/dropdown/table/services/table.selection.js +466 -0
  148. package/src/plugins/dropdown/table/services/table.style.js +844 -0
  149. package/src/plugins/dropdown/table/shared/table.constants.js +109 -0
  150. package/src/plugins/dropdown/table/shared/table.utils.js +219 -0
  151. package/src/plugins/dropdown/template.js +20 -15
  152. package/src/plugins/dropdown/textStyle.js +28 -22
  153. package/src/plugins/field/mention.js +54 -49
  154. package/src/plugins/index.js +5 -5
  155. package/src/plugins/input/fontSize.js +100 -97
  156. package/src/plugins/input/pageNavigator.js +13 -10
  157. package/src/plugins/modal/audio.js +208 -219
  158. package/src/plugins/modal/drawing.js +99 -104
  159. package/src/plugins/modal/embed.js +323 -312
  160. package/src/plugins/modal/image/index.js +942 -0
  161. package/src/plugins/modal/image/render/image.html.js +150 -0
  162. package/src/plugins/modal/image/services/image.size.js +198 -0
  163. package/src/plugins/modal/image/services/image.upload.js +216 -0
  164. package/src/plugins/modal/image/shared/image.constants.js +20 -0
  165. package/src/plugins/modal/link.js +74 -54
  166. package/src/plugins/modal/math.js +126 -119
  167. package/src/plugins/modal/video/index.js +858 -0
  168. package/src/plugins/modal/video/render/video.html.js +131 -0
  169. package/src/plugins/modal/video/services/video.size.js +281 -0
  170. package/src/plugins/modal/video/services/video.upload.js +92 -0
  171. package/src/plugins/popup/anchor.js +57 -49
  172. package/src/suneditor.js +73 -61
  173. package/src/themes/cobalt.css +155 -0
  174. package/src/themes/dark.css +143 -120
  175. package/src/typedef.js +214 -63
  176. package/types/assets/icons/defaultIcons.d.ts +8 -0
  177. package/types/assets/suneditor-contents.css.d.ts +1 -0
  178. package/types/assets/suneditor.css.d.ts +1 -0
  179. package/types/core/config/contextProvider.d.ts +148 -0
  180. package/types/core/config/eventManager.d.ts +68 -0
  181. package/types/core/config/instanceCheck.d.ts +33 -0
  182. package/types/core/config/optionProvider.d.ts +147 -0
  183. package/types/core/editor.d.ts +27 -586
  184. package/types/core/event/actions/index.d.ts +50 -0
  185. package/types/core/event/effects/common.registry.d.ts +56 -0
  186. package/types/core/event/effects/keydown.registry.d.ts +80 -0
  187. package/types/core/event/effects/ruleHelpers.d.ts +36 -0
  188. package/types/core/event/eventOrchestrator.d.ts +191 -0
  189. package/types/core/event/executor.d.ts +13 -0
  190. package/types/core/event/handlers/handler_toolbar.d.ts +38 -0
  191. package/types/core/event/handlers/handler_ww_clipboard.d.ts +36 -0
  192. package/types/core/event/handlers/handler_ww_dragDrop.d.ts +26 -0
  193. package/types/core/event/handlers/handler_ww_input.d.ts +38 -0
  194. package/types/core/event/handlers/handler_ww_key.d.ts +40 -0
  195. package/types/core/event/handlers/handler_ww_mouse.d.ts +47 -0
  196. package/types/core/event/ports.d.ts +256 -0
  197. package/types/core/event/reducers/keydown.reducer.d.ts +84 -0
  198. package/types/core/event/rules/keydown.rule.arrow.d.ts +19 -0
  199. package/types/core/event/rules/keydown.rule.backspace.d.ts +18 -0
  200. package/types/core/event/rules/keydown.rule.delete.d.ts +18 -0
  201. package/types/core/event/rules/keydown.rule.enter.d.ts +18 -0
  202. package/types/core/event/rules/keydown.rule.tab.d.ts +18 -0
  203. package/types/core/event/support/defaultLineManager.d.ts +22 -0
  204. package/types/core/event/support/selectionState.d.ts +29 -0
  205. package/types/core/kernel/coreKernel.d.ts +219 -0
  206. package/types/core/kernel/kernelInjector.d.ts +16 -0
  207. package/types/core/kernel/store.d.ts +170 -0
  208. package/types/core/logic/dom/char.d.ts +46 -0
  209. package/types/core/logic/dom/format.d.ts +234 -0
  210. package/types/core/logic/dom/html.d.ts +290 -0
  211. package/types/core/logic/dom/inline.d.ts +93 -0
  212. package/types/core/logic/dom/listFormat.d.ts +101 -0
  213. package/types/core/logic/dom/nodeTransform.d.ts +110 -0
  214. package/types/core/logic/dom/offset.d.ts +335 -0
  215. package/types/core/logic/dom/selection.d.ts +165 -0
  216. package/types/core/logic/panel/menu.d.ts +93 -0
  217. package/types/core/logic/panel/toolbar.d.ts +128 -0
  218. package/types/core/logic/panel/viewer.d.ts +89 -0
  219. package/types/core/logic/shell/_commandExecutor.d.ts +18 -0
  220. package/types/core/logic/shell/commandDispatcher.d.ts +65 -0
  221. package/types/core/logic/shell/component.d.ts +182 -0
  222. package/types/core/logic/shell/focusManager.d.ts +31 -0
  223. package/types/core/{base → logic/shell}/history.d.ts +13 -12
  224. package/types/core/logic/shell/pluginManager.d.ts +115 -0
  225. package/types/core/logic/shell/shortcuts.d.ts +131 -0
  226. package/types/core/logic/shell/ui.d.ts +261 -0
  227. package/types/core/schema/context.d.ts +104 -0
  228. package/types/core/schema/frameContext.d.ts +320 -0
  229. package/types/core/schema/options.d.ts +1241 -0
  230. package/types/core/section/constructor.d.ts +117 -652
  231. package/types/core/section/documentType.d.ts +43 -61
  232. package/types/events.d.ts +796 -65
  233. package/types/helper/clipboard.d.ts +5 -4
  234. package/types/helper/converter.d.ts +55 -43
  235. package/types/helper/dom/domCheck.d.ts +27 -19
  236. package/types/helper/dom/domQuery.d.ts +76 -57
  237. package/types/helper/dom/domUtils.d.ts +62 -39
  238. package/types/helper/dom/index.d.ts +87 -1
  239. package/types/helper/env.d.ts +16 -13
  240. package/types/helper/index.d.ts +8 -2
  241. package/types/helper/keyCodeMap.d.ts +24 -23
  242. package/types/helper/numbers.d.ts +4 -6
  243. package/types/helper/unicode.d.ts +4 -3
  244. package/types/hooks/base.d.ts +239 -0
  245. package/types/hooks/params.d.ts +65 -0
  246. package/types/index.d.ts +20 -117
  247. package/types/interfaces/contracts.d.ts +183 -0
  248. package/types/interfaces/index.d.ts +3 -0
  249. package/types/interfaces/plugins.d.ts +168 -0
  250. package/types/langs/_Lang.d.ts +2 -2
  251. package/types/langs/index.d.ts +2 -2
  252. package/types/modules/contract/Browser.d.ts +262 -0
  253. package/types/modules/contract/ColorPicker.d.ts +99 -0
  254. package/types/modules/contract/Controller.d.ts +204 -0
  255. package/types/modules/contract/Figure.d.ts +529 -0
  256. package/types/modules/{HueSlider.d.ts → contract/HueSlider.d.ts} +39 -28
  257. package/types/modules/contract/Modal.d.ts +62 -0
  258. package/types/modules/contract/index.d.ts +7 -0
  259. package/types/modules/manager/ApiManager.d.ts +106 -0
  260. package/types/modules/manager/FileManager.d.ts +124 -0
  261. package/types/modules/manager/index.d.ts +3 -0
  262. package/types/modules/ui/ModalAnchorEditor.d.ts +152 -0
  263. package/types/modules/ui/SelectMenu.d.ts +107 -0
  264. package/types/modules/{_DragHandle.d.ts → ui/_DragHandle.d.ts} +1 -0
  265. package/types/modules/ui/index.d.ts +4 -0
  266. package/types/plugins/browser/audioGallery.d.ts +33 -41
  267. package/types/plugins/browser/fileBrowser.d.ts +42 -50
  268. package/types/plugins/browser/fileGallery.d.ts +33 -41
  269. package/types/plugins/browser/imageGallery.d.ts +30 -37
  270. package/types/plugins/browser/videoGallery.d.ts +33 -41
  271. package/types/plugins/command/blockquote.d.ts +4 -21
  272. package/types/plugins/command/exportPDF.d.ts +23 -33
  273. package/types/plugins/command/fileUpload.d.ts +80 -100
  274. package/types/plugins/command/list_bulleted.d.ts +9 -35
  275. package/types/plugins/command/list_numbered.d.ts +9 -35
  276. package/types/plugins/dropdown/align.d.ts +23 -46
  277. package/types/plugins/dropdown/backgroundColor.d.ts +35 -53
  278. package/types/plugins/dropdown/blockStyle.d.ts +45 -0
  279. package/types/plugins/dropdown/font.d.ts +18 -41
  280. package/types/plugins/dropdown/fontColor.d.ts +35 -53
  281. package/types/plugins/dropdown/hr.d.ts +26 -52
  282. package/types/plugins/dropdown/layout.d.ts +19 -25
  283. package/types/plugins/dropdown/lineHeight.d.ts +21 -39
  284. package/types/plugins/dropdown/list.d.ts +6 -34
  285. package/types/plugins/dropdown/paragraphStyle.d.ts +34 -45
  286. package/types/plugins/dropdown/table/index.d.ts +158 -0
  287. package/types/plugins/dropdown/table/render/table.html.d.ts +71 -0
  288. package/types/plugins/dropdown/table/render/table.menu.d.ts +59 -0
  289. package/types/plugins/dropdown/table/services/table.cell.d.ts +76 -0
  290. package/types/plugins/dropdown/table/services/table.clipboard.d.ts +26 -0
  291. package/types/plugins/dropdown/table/services/table.grid.d.ts +77 -0
  292. package/types/plugins/dropdown/table/services/table.resize.d.ts +72 -0
  293. package/types/plugins/dropdown/table/services/table.selection.d.ts +59 -0
  294. package/types/plugins/dropdown/table/services/table.style.d.ts +162 -0
  295. package/types/plugins/dropdown/table/shared/table.constants.d.ts +134 -0
  296. package/types/plugins/dropdown/table/shared/table.utils.d.ts +91 -0
  297. package/types/plugins/dropdown/template.d.ts +19 -25
  298. package/types/plugins/dropdown/textStyle.d.ts +23 -30
  299. package/types/plugins/field/mention.d.ts +66 -72
  300. package/types/plugins/index.d.ts +41 -40
  301. package/types/plugins/input/fontSize.d.ts +57 -96
  302. package/types/plugins/input/pageNavigator.d.ts +5 -8
  303. package/types/plugins/modal/audio.d.ts +60 -153
  304. package/types/plugins/modal/drawing.d.ts +16 -118
  305. package/types/plugins/modal/embed.d.ts +46 -166
  306. package/types/plugins/modal/image/index.d.ts +281 -0
  307. package/types/plugins/modal/image/render/image.html.d.ts +45 -0
  308. package/types/plugins/modal/image/services/image.size.d.ts +55 -0
  309. package/types/plugins/modal/image/services/image.upload.d.ts +24 -0
  310. package/types/plugins/modal/image/shared/image.constants.d.ts +17 -0
  311. package/types/plugins/modal/link.d.ts +46 -66
  312. package/types/plugins/modal/math.d.ts +17 -86
  313. package/types/plugins/modal/{video.d.ts → video/index.d.ts} +89 -221
  314. package/types/plugins/modal/video/render/video.html.d.ts +37 -0
  315. package/types/plugins/modal/video/services/video.size.d.ts +74 -0
  316. package/types/plugins/modal/video/services/video.upload.d.ts +19 -0
  317. package/types/plugins/popup/anchor.d.ts +8 -38
  318. package/types/suneditor.d.ts +55 -24
  319. package/types/typedef.d.ts +344 -228
  320. package/CONTRIBUTING.md +0 -186
  321. package/src/core/base/eventHandlers/handler_ww_key_input.js +0 -1200
  322. package/src/core/base/eventHandlers/handler_ww_mouse.js +0 -194
  323. package/src/core/base/eventManager.js +0 -1523
  324. package/src/core/class/component.js +0 -856
  325. package/src/core/class/format.js +0 -3433
  326. package/src/core/class/menu.js +0 -346
  327. package/src/core/class/selection.js +0 -610
  328. package/src/core/class/shortcuts.js +0 -98
  329. package/src/core/class/toolbar.js +0 -431
  330. package/src/core/class/ui.js +0 -424
  331. package/src/core/class/viewer.js +0 -750
  332. package/src/core/section/actives.js +0 -266
  333. package/src/core/section/context.js +0 -102
  334. package/src/editorInjector/_classes.js +0 -36
  335. package/src/editorInjector/_core.js +0 -87
  336. package/src/editorInjector/index.js +0 -73
  337. package/src/modules/ApiManager.js +0 -191
  338. package/src/modules/Controller.js +0 -474
  339. package/src/modules/Modal.js +0 -346
  340. package/src/modules/index.js +0 -14
  341. package/src/plugins/dropdown/table.js +0 -4034
  342. package/src/plugins/modal/image.js +0 -1376
  343. package/src/plugins/modal/video.js +0 -1226
  344. package/types/core/base/eventHandlers/handler_toolbar.d.ts +0 -41
  345. package/types/core/base/eventHandlers/handler_ww_clipboard.d.ts +0 -40
  346. package/types/core/base/eventHandlers/handler_ww_dragDrop.d.ts +0 -35
  347. package/types/core/base/eventHandlers/handler_ww_key_input.d.ts +0 -45
  348. package/types/core/base/eventHandlers/handler_ww_mouse.d.ts +0 -39
  349. package/types/core/base/eventManager.d.ts +0 -401
  350. package/types/core/class/char.d.ts +0 -61
  351. package/types/core/class/component.d.ts +0 -213
  352. package/types/core/class/format.d.ts +0 -623
  353. package/types/core/class/html.d.ts +0 -430
  354. package/types/core/class/menu.d.ts +0 -126
  355. package/types/core/class/nodeTransform.d.ts +0 -93
  356. package/types/core/class/offset.d.ts +0 -522
  357. package/types/core/class/selection.d.ts +0 -188
  358. package/types/core/class/shortcuts.d.ts +0 -142
  359. package/types/core/class/toolbar.d.ts +0 -189
  360. package/types/core/class/ui.d.ts +0 -164
  361. package/types/core/class/viewer.d.ts +0 -140
  362. package/types/core/section/actives.d.ts +0 -46
  363. package/types/core/section/context.d.ts +0 -45
  364. package/types/editorInjector/_classes.d.ts +0 -41
  365. package/types/editorInjector/_core.d.ts +0 -87
  366. package/types/editorInjector/index.d.ts +0 -69
  367. package/types/modules/ApiManager.d.ts +0 -125
  368. package/types/modules/Browser.d.ts +0 -326
  369. package/types/modules/ColorPicker.d.ts +0 -135
  370. package/types/modules/Controller.d.ts +0 -251
  371. package/types/modules/Figure.d.ts +0 -517
  372. package/types/modules/FileManager.d.ts +0 -202
  373. package/types/modules/Modal.d.ts +0 -111
  374. package/types/modules/ModalAnchorEditor.d.ts +0 -236
  375. package/types/modules/SelectMenu.d.ts +0 -194
  376. package/types/modules/index.d.ts +0 -26
  377. package/types/plugins/dropdown/formatBlock.d.ts +0 -55
  378. package/types/plugins/dropdown/table.d.ts +0 -627
  379. package/types/plugins/modal/image.d.ts +0 -451
  380. /package/{LICENSE → LICENSE.txt} +0 -0
@@ -1,41 +0,0 @@
1
- /**
2
- * @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_toolbar
3
- */
4
- /**
5
- * @private
6
- * @this {EventManagerThis_handler_toolbar}
7
- * @param {MouseEvent} e - Event object
8
- */
9
- export function ButtonsHandler(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, e: MouseEvent): void;
10
- export class ButtonsHandler {
11
- /**
12
- * @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_toolbar
13
- */
14
- /**
15
- * @private
16
- * @this {EventManagerThis_handler_toolbar}
17
- * @param {MouseEvent} e - Event object
18
- */
19
- private constructor();
20
- _inputFocus: boolean;
21
- __inputPlugin: {
22
- obj: any;
23
- target: HTMLInputElement;
24
- value: string;
25
- };
26
- __inputBlurEvent: __se__EventInfo;
27
- __inputKeyEvent: __se__EventInfo;
28
- }
29
- /**
30
- * @private
31
- * @this {EventManagerThis_handler_toolbar}
32
- * @param {MouseEvent} e - Event object
33
- */
34
- export function OnClick_menuTray(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, e: MouseEvent): void;
35
- /**
36
- * @private
37
- * @this {EventManagerThis_handler_toolbar}
38
- * @param {MouseEvent} e - Event object
39
- */
40
- export function OnClick_toolbar(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, e: MouseEvent): void;
41
- export type EventManagerThis_handler_toolbar = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
@@ -1,40 +0,0 @@
1
- /**
2
- * @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_ww_clipboard
3
- */
4
- /**
5
- * @private
6
- * @this {EventManagerThis_handler_ww_clipboard}
7
- * @param {ClipboardEvent} e - Event object
8
- */
9
- export function OnPaste_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, frameContext: any, e: ClipboardEvent): true | Promise<boolean>;
10
- /**
11
- * @private
12
- * @this {EventManagerThis_handler_ww_clipboard}
13
- * @param {ClipboardEvent} e - Event object
14
- */
15
- export function OnCopy_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, frameContext: any, e: ClipboardEvent): Promise<boolean>;
16
- export class OnCopy_wysiwyg {
17
- /**
18
- * @private
19
- * @this {EventManagerThis_handler_ww_clipboard}
20
- * @param {ClipboardEvent} e - Event object
21
- */
22
- private constructor();
23
- __secopy: any;
24
- }
25
- /**
26
- * @private
27
- * @this {EventManagerThis_handler_ww_clipboard}
28
- * @param {ClipboardEvent} e - Event object
29
- */
30
- export function OnCut_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, frameContext: any, e: ClipboardEvent): Promise<boolean>;
31
- export class OnCut_wysiwyg {
32
- /**
33
- * @private
34
- * @this {EventManagerThis_handler_ww_clipboard}
35
- * @param {ClipboardEvent} e - Event object
36
- */
37
- private constructor();
38
- __secopy: any;
39
- }
40
- export type EventManagerThis_handler_ww_clipboard = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
@@ -1,35 +0,0 @@
1
- /**
2
- * @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_ww_dragDrop
3
- */
4
- /**
5
- * @private
6
- * @this {EventManagerThis_handler_ww_dragDrop}
7
- * @param {__se__FrameContext} fc - Frame context object
8
- * @param {HTMLElement} dragCursor - Drag cursor element
9
- * @param {?HTMLElement} _iframeTopArea - Iframe top area element
10
- * @param {?HTMLElement} _innerToolbar - Inner toolbar element
11
- * @param {DragEvent} e - Event object
12
- */
13
- export function OnDragOver_wysiwyg(
14
- this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>,
15
- fc: __se__FrameContext,
16
- dragCursor: HTMLElement,
17
- _iframeTopArea: HTMLElement | null,
18
- _innerToolbar: HTMLElement | null,
19
- e: DragEvent
20
- ): void;
21
- /**
22
- * @private
23
- * @this {EventManagerThis_handler_ww_dragDrop}
24
- * @param {HTMLElement} dragCursor - Drag cursor element
25
- */
26
- export function OnDragEnd_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, dragCursor: HTMLElement): void;
27
- /**
28
- * @private
29
- * @this {EventManagerThis_handler_ww_dragDrop}
30
- * @param {__se__FrameContext} fc - Frame context object
31
- * @param {HTMLElement} dragCursor - Drag cursor element
32
- * @param {DragEvent} e - Event object
33
- */
34
- export function OnDrop_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, dragCursor: HTMLElement, e: DragEvent): boolean | Promise<boolean>;
35
- export type EventManagerThis_handler_ww_dragDrop = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
@@ -1,45 +0,0 @@
1
- /**
2
- * @private
3
- * @this {EventManagerThis_handler_ww_key_input}
4
- * @param {__se__FrameContext} fc - Frame context object
5
- * @param {InputEvent} e - Event object
6
- */
7
- export function OnInput_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: InputEvent): Promise<boolean>;
8
- /**
9
- * @private
10
- * @this {EventManagerThis_handler_ww_key_input}
11
- * @param {__se__FrameContext} fc - Frame context object
12
- * @param {KeyboardEvent} e - Event object
13
- */
14
- export function OnKeyDown_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: KeyboardEvent): Promise<boolean>;
15
- export class OnKeyDown_wysiwyg {
16
- /**
17
- * @private
18
- * @this {EventManagerThis_handler_ww_key_input}
19
- * @param {__se__FrameContext} fc - Frame context object
20
- * @param {KeyboardEvent} e - Event object
21
- */
22
- private constructor();
23
- isComposing: boolean;
24
- _onShortcutKey: boolean;
25
- _formatAttrsTemp: NamedNodeMap;
26
- }
27
- /**
28
- * @private
29
- * @this {EventManagerThis_handler_ww_key_input}
30
- * @param {__se__FrameContext} fc - Frame context object
31
- * @param {KeyboardEvent} e - Event object
32
- */
33
- export function OnKeyUp_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: KeyboardEvent): Promise<void>;
34
- export class OnKeyUp_wysiwyg {
35
- /**
36
- * @private
37
- * @this {EventManagerThis_handler_ww_key_input}
38
- * @param {__se__FrameContext} fc - Frame context object
39
- * @param {KeyboardEvent} e - Event object
40
- */
41
- private constructor();
42
- _formatAttrsTemp: any;
43
- __retainTimer: number | void;
44
- }
45
- export type EventManagerThis_handler_ww_key_input = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
@@ -1,39 +0,0 @@
1
- /**
2
- * @typedef {Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis_handler_ww_mouse
3
- */
4
- /**
5
- * @private
6
- * @this {EventManagerThis_handler_ww_mouse}
7
- * @param {__se__FrameContext} fc - Frame context object
8
- * @param {MouseEvent} e - Event object
9
- */
10
- export function OnMouseDown_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<void>;
11
- /**
12
- * @private
13
- * @this {EventManagerThis_handler_ww_mouse}
14
- * @param {__se__FrameContext} fc - Frame context object
15
- * @param {MouseEvent} e - Event object
16
- */
17
- export function OnMouseUp_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<void>;
18
- /**
19
- * @private
20
- * @this {EventManagerThis_handler_ww_mouse}
21
- * @param {__se__FrameContext} fc - Frame context object
22
- * @param {MouseEvent} e - Event object
23
- */
24
- export function OnClick_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<boolean>;
25
- /**
26
- * @private
27
- * @this {EventManagerThis_handler_ww_mouse}
28
- * @param {__se__FrameContext} fc - Frame context object
29
- * @param {MouseEvent} e - Event object
30
- */
31
- export function OnMouseMove_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): boolean;
32
- /**
33
- * @private
34
- * @this {EventManagerThis_handler_ww_mouse}
35
- * @param {__se__FrameContext} fc - Frame context object
36
- * @param {MouseEvent} e - Event object
37
- */
38
- export function OnMouseLeave_wysiwyg(this: Omit<import('../eventManager').default & Partial<import('../../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, e: MouseEvent): Promise<void>;
39
- export type EventManagerThis_handler_ww_mouse = Omit<import('../eventManager').default & Partial<__se__EditorInjector>, 'eventManager'>;
@@ -1,401 +0,0 @@
1
- export default EventManager;
2
- export type EventManagerThis = Omit<EventManager & Partial<__se__EditorInjector>, 'eventManager'>;
3
- /**
4
- * @typedef {Omit<EventManager & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
5
- */
6
- /**
7
- * @constructor
8
- * @this {EventManagerThis}
9
- * @description Event manager, editor's all event management class
10
- * @param {__se__EditorCore} editor - The root editor instance
11
- * @property {__se__EditorCore} editor - The root editor instance
12
- */
13
- declare function EventManager(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, editor: __se__EditorCore): void;
14
- declare class EventManager {
15
- /**
16
- * @typedef {Omit<EventManager & Partial<__se__EditorInjector>, 'eventManager'>} EventManagerThis
17
- */
18
- /**
19
- * @constructor
20
- * @this {EventManagerThis}
21
- * @description Event manager, editor's all event management class
22
- * @param {__se__EditorCore} editor - The root editor instance
23
- * @property {__se__EditorCore} editor - The root editor instance
24
- */
25
- constructor(editor: __se__EditorCore);
26
- /**
27
- * @description Old browsers: When there is no 'e.isComposing' in the keyup event
28
- * @type {boolean}
29
- */
30
- isComposing: boolean;
31
- /** @type {Array<*>} */
32
- _events: Array<any>;
33
- /** @type {RegExp} */
34
- _onButtonsCheck: RegExp;
35
- /** @type {boolean} */
36
- _onShortcutKey: boolean;
37
- /** @type {number} */
38
- _balloonDelay: number;
39
- /** @type {ResizeObserver} */
40
- _wwFrameObserver: ResizeObserver;
41
- /** @type {ResizeObserver} */
42
- _toolbarObserver: ResizeObserver;
43
- /** @type {Element|null} */
44
- _lineBreakComp: Element | null;
45
- /** @type {Object<string, *>|null} */
46
- _formatAttrsTemp: {
47
- [x: string]: any;
48
- } | null;
49
- /** @type {number} */
50
- _resizeClientY: number;
51
- /** @type {__se__GlobalEventInfo|null} */
52
- __resize_editor: __se__GlobalEventInfo | null;
53
- /** @type {__se__GlobalEventInfo|null} */
54
- __close_move: __se__GlobalEventInfo | null;
55
- /** @type {__se__GlobalEventInfo|null} */
56
- __geckoActiveEvent: __se__GlobalEventInfo | null;
57
- /** @type {Array<Element>} */
58
- __scrollparents: Array<Element>;
59
- /** @type {Array<Node>} */
60
- __cacheStyleNodes: Array<Node>;
61
- /** @type {__se__GlobalEventInfo|null} */
62
- __selectionSyncEvent: __se__GlobalEventInfo | null;
63
- /** @type {boolean} */
64
- _inputFocus: boolean;
65
- /** @type {Object<string, *>|null} */
66
- __inputPlugin: {
67
- [x: string]: any;
68
- } | null;
69
- /** @type {?__se__EventInfo=} */
70
- __inputBlurEvent: (__se__EventInfo | null) | undefined;
71
- /** @type {?__se__EventInfo=} */
72
- __inputKeyEvent: (__se__EventInfo | null) | undefined;
73
- /** @type {HTMLInputElement} */
74
- __focusTemp: HTMLInputElement;
75
- /** @type {number|void} */
76
- __retainTimer: number | void;
77
- /** @type {Element} */
78
- __eventDoc: Element;
79
- /** @type {string} */
80
- __secopy: string;
81
- /**
82
- * @this {EventManagerThis}
83
- * @description Register for an event.
84
- * - Only events registered with this method are unregistered or re-registered when methods such as 'setOptions', 'destroy' are called.
85
- * @param {*} target Target element
86
- * @param {string} type Event type
87
- * @param {(...args: *) => *} listener Event handler
88
- * @param {boolean|AddEventListenerOptions=} useCapture Event useCapture option
89
- * @return {__se__EventInfo|null} Registered event information
90
- */
91
- addEvent(
92
- this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
93
- target: any,
94
- type: string,
95
- listener: (...args: any) => any,
96
- useCapture?: (boolean | AddEventListenerOptions) | undefined
97
- ): __se__EventInfo | null;
98
- /**
99
- * @this {EventManagerThis}
100
- * @description Remove event
101
- * @param {__se__EventInfo} params event info = this.addEvent()
102
- * @returns {undefined|null} Success: null, Not found: undefined
103
- */
104
- removeEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, params: __se__EventInfo): undefined | null;
105
- /**
106
- * @this {EventManagerThis}
107
- * @description Add an event to document.
108
- * - When created as an Iframe, the same event is added to the document in the Iframe.
109
- * @param {string} type Event type
110
- * @param {(...args: *) => *} listener Event listener
111
- * @param {boolean|AddEventListenerOptions=} useCapture Use event capture
112
- * @return {__se__GlobalEventInfo} Registered event information
113
- */
114
- addGlobalEvent(
115
- this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
116
- type: string,
117
- listener: (...args: any) => any,
118
- useCapture?: (boolean | AddEventListenerOptions) | undefined
119
- ): __se__GlobalEventInfo;
120
- /**
121
- * @this {EventManagerThis}
122
- * @description Remove events from document.
123
- * - When created as an Iframe, the event of the document inside the Iframe is also removed.
124
- * @param {string|__se__GlobalEventInfo} type Event type or (Event info = this.addGlobalEvent())
125
- * @param {(...args: *) => *=} listener Event listener
126
- * @param {boolean|AddEventListenerOptions=} useCapture Use event capture
127
- * @returns {undefined|null} Success: null, Not found: undefined
128
- */
129
- removeGlobalEvent(
130
- this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
131
- type: string | __se__GlobalEventInfo,
132
- listener?: ((...args: any) => any) | undefined,
133
- useCapture?: (boolean | AddEventListenerOptions) | undefined
134
- ): undefined | null;
135
- /**
136
- * @this {EventManagerThis}
137
- * @description Activates the corresponding button with the tags information of the current cursor position,
138
- * - such as 'bold', 'underline', etc., and executes the 'active' method of the plugins.
139
- * @param {?Node=} selectionNode selectionNode
140
- * @returns {Node|undefined} selectionNode
141
- */
142
- applyTagEffect(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, selectionNode?: (Node | null) | undefined): Node | undefined;
143
- /**
144
- * @private
145
- * @this {EventManagerThis}
146
- * @description Gives an active effect when the mouse down event is blocked. (Used when "env.isGecko" is true)
147
- * @param {Node} target Target element
148
- * @private
149
- */
150
- _injectActiveEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, target: Node): void;
151
- /**
152
- * @private
153
- * @this {EventManagerThis}
154
- * @description remove class, display text.
155
- * @param {Array<string>} ignoredList Igonred button list
156
- * @private
157
- */
158
- _setKeyEffect(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, ignoredList: Array<string>): void;
159
- /**
160
- * @private
161
- * @this {EventManagerThis}
162
- * @description Show toolbar-balloon with delay.
163
- */
164
- _showToolbarBalloonDelay(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
165
- /**
166
- * @private
167
- * @this {EventManagerThis}
168
- * @description Show or hide the toolbar-balloon.
169
- */
170
- _toggleToolbarBalloon(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
171
- /**
172
- * @private
173
- * @this {EventManagerThis}
174
- * @description Hide the toolbar.
175
- */
176
- _hideToolbar(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
177
- /**
178
- * @private
179
- * @this {EventManagerThis}
180
- * @description Hide the Sub-Toolbar.
181
- */
182
- _hideToolbar_sub(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
183
- /**
184
- * @private
185
- * @this {EventManagerThis}
186
- * @description Checks if a node is a non-focusable element(.data-se-non-focus). (e.g. fileUpload.component > span)
187
- * @param {Node} node Node to check
188
- * @returns {boolean} True if the node is non-focusable, otherwise false
189
- */
190
- _isNonFocusNode(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, node: Node): boolean;
191
- /**
192
- * @private
193
- * @this {EventManagerThis}
194
- * @description Determines if the "range" is within an uneditable node.
195
- * @param {Range} range The range object
196
- * @param {boolean} isFront Whether to check the start or end of the range
197
- * @returns {Node|null} The uneditable node if found, otherwise null
198
- */
199
- _isUneditableNode(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, range: Range, isFront: boolean): Node | null;
200
- /**
201
- * @private
202
- * @this {EventManagerThis}
203
- * @description Retrieves the sibling node of a selected node if it is uneditable.
204
- * - Used only in `_isUneditableNode`.
205
- * @param {Node} selectNode The selected node
206
- * @param {string} siblingKey The key to access the sibling (`previousSibling` or `nextSibling`)
207
- * @param {Node} container The parent container node
208
- * @returns {Node|null} The sibling node if found, otherwise null
209
- */
210
- _isUneditableNode_getSibling(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, selectNode: Node, siblingKey: string, container: Node): Node | null;
211
- /**
212
- * @private
213
- * @this {EventManagerThis}
214
- * @description Deletes specific elements such as tables in "Firefox" and media elements (image, video, audio) in "Chrome".
215
- * - Handles deletion logic based on selection range and node types.
216
- * @returns {boolean} Returns `true` if an element was deleted and focus was adjusted, otherwise `false`.
217
- */
218
- _hardDelete(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): boolean;
219
- /**
220
- * @private
221
- * @this {EventManagerThis}
222
- * @description If there is no default format, add a line and move 'selection'.
223
- * @param {string|null} formatName Format tag name (default: 'P')
224
- */
225
- _setDefaultLine(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, formatName: string | null): any;
226
- /**
227
- * @private
228
- * @this {EventManagerThis}
229
- * @description Handles data transfer actions for paste and drop events.
230
- * - It processes clipboard data, triggers relevant events, and inserts cleaned data into the editor.
231
- * @param {"paste"|"drop"} type The type of event
232
- * @param {Event} e The original event object
233
- * @param {DataTransfer} clipboardData The clipboard data object
234
- * @param {__se__FrameContext} frameContext The frame context
235
- * @returns {Promise<boolean>} Resolves to `false` if processing is complete, otherwise allows default behavior
236
- */
237
- _dataTransferAction(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, type: 'paste' | 'drop', e: Event, clipboardData: DataTransfer, frameContext: __se__FrameContext): Promise<boolean>;
238
- /**
239
- * @private
240
- * @this {EventManagerThis}
241
- * @description Processes clipboard data for paste and drop events, handling text and HTML cleanup.
242
- * - Supports specific handling for content from Microsoft Office applications.
243
- * @param {"paste"|"drop"} type The type of event
244
- * @param {Event} e The original event object
245
- * @param {DataTransfer} clipboardData The clipboard data object
246
- * @param {__se__FrameContext} frameContext The frame context
247
- * @returns {Promise<boolean>} Resolves to `false` if processing is complete, otherwise allows default behavior
248
- */
249
- _setClipboardData(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, type: 'paste' | 'drop', e: Event, clipboardData: DataTransfer, frameContext: __se__FrameContext): Promise<boolean>;
250
- /**
251
- * @private
252
- * @this {EventManagerThis}
253
- * @description Registers common UI events such as toolbar and menu interactions.
254
- * - Adds event listeners for various UI elements, sets up observers, and configures window events.
255
- */
256
- _addCommonEvents(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
257
- /**
258
- * @private
259
- * @this {EventManagerThis}
260
- * @description Registers event listeners for the editor's frame, including text input, selection, and UI interactions.
261
- * - Handles events inside an iframe or within the standard wysiwyg editor.
262
- * @param {__se__FrameContext} fc The frame context object
263
- */
264
- _addFrameEvents(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext): void;
265
- /**
266
- * @private
267
- * @this {EventManagerThis}
268
- * @description Adds event listeners for resizing the status bar if resizing is enabled.
269
- * - If resizing is not enabled, applies a non-resizable class.
270
- * @param {__se__FrameContext} fc The frame context object
271
- * @param {__se__FrameOptions} fo The frame options object
272
- */
273
- __addStatusbarEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, fc: __se__FrameContext, fo: __se__FrameOptions): void;
274
- /**
275
- * @private
276
- * @this {EventManagerThis}
277
- * @description Removes all registered event listeners from the editor.
278
- * - Disconnects observers and clears stored event references.
279
- */
280
- _removeAllEvents(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
281
- /**
282
- * @private
283
- * @this {EventManagerThis}
284
- * @description Adjusts the position of the editor's toolbar, controllers, and other floating elements based on scroll position.
285
- * - Ensures UI elements maintain their intended relative positions when scrolling.
286
- * @param {Element} eventWysiwyg The wysiwyg event object containing scroll data
287
- */
288
- _moveContainer(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, eventWysiwyg: Element): void;
289
- /**
290
- * @private
291
- * @this {EventManagerThis}
292
- * @description Handles the scrolling of the editor container.
293
- * - Repositions open controllers if necessary.
294
- */
295
- _scrollContainer(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
296
- /**
297
- * @private
298
- * @this {EventManagerThis}
299
- * @description Repositions the currently open controllers within the editor.
300
- * - Ensures elements are displayed in their correct positions after scrolling.
301
- * @param {Array<object>} cont List of controllers to reposition
302
- */
303
- __rePositionController(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, cont: Array<object>): void;
304
- /**
305
- * @private
306
- * @this {EventManagerThis}
307
- * @description Resets the frame status, adjusting toolbar and UI elements based on the current state.
308
- * - Handles inline editor adjustments, fullscreen mode, and responsive toolbar updates.
309
- */
310
- _resetFrameStatus(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
311
- /**
312
- * @private
313
- * @this {EventManagerThis}
314
- * @description Synchronizes the selection state by resetting it on mouseup.
315
- * - Ensures selection updates correctly across different interactions.
316
- */
317
- _setSelectionSync(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
318
- /**
319
- * @private
320
- * @this {EventManagerThis}
321
- * @description Retains the style nodes for formatting consistency when applying styles.
322
- * - Preserves nested styling by cloning and restructuring the style nodes.
323
- * @param {HTMLElement} formatEl The format element where styles should be retained
324
- * @param {Array<Node>} _styleNodes The list of style nodes to retain
325
- */
326
- _retainStyleNodes(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, formatEl: HTMLElement, _styleNodes: Array<Node>): void;
327
- /**
328
- * @private
329
- * @this {EventManagerThis}
330
- * @description Clears retained style nodes by replacing content with a single line break.
331
- * - Resets the selection to the start of the cleared element.
332
- * @param {HTMLElement} formatEl The format element where styles should be cleared
333
- */
334
- _clearRetainStyleNodes(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, formatEl: HTMLElement): void;
335
- /**
336
- * @private
337
- * @this {EventManagerThis}
338
- * @description Calls a registered plugin event and executes associated handlers.
339
- * - If any handler returns `false`, the event propagation stops.
340
- * @param {string} name The name of the plugin event
341
- * @param {{ frameContext: __se__FrameContext, event: Event, data?: string, line?: Node, range?: Range, file?: File, doc?: Document }} e The event object passed to the plugin event handler
342
- * @returns {boolean|undefined} Returns `false` if any handler stops the event, otherwise `undefined`
343
- */
344
- _callPluginEvent(
345
- this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>,
346
- name: string,
347
- e: {
348
- frameContext: __se__FrameContext;
349
- event: Event;
350
- data?: string;
351
- line?: Node;
352
- range?: Range;
353
- file?: File;
354
- doc?: Document;
355
- }
356
- ): boolean | undefined;
357
- /**
358
- * @private
359
- * @this {EventManagerThis}
360
- * @description Handles the selection of a component when hovering over it.
361
- * - If the target is a component, it ensures that the component is selected properly.
362
- * @param {Element} target The element being hovered over
363
- */
364
- _overComponentSelect(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, target: Element): void;
365
- /**
366
- * @private
367
- * @this {EventManagerThis}
368
- * @description Removes input event listeners and resets input-related properties.
369
- */
370
- __removeInput(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>): void;
371
- /**
372
- * @private
373
- * @this {EventManagerThis}
374
- * @description Prevents the default behavior of the Enter key and refocuses the editor.
375
- * @param {Event} e The keyboard event
376
- */
377
- __enterPrevent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, e: Event): void;
378
- /**
379
- * @private
380
- * @description Scrolls the editor view to the caret position after pressing Enter. (Ignored on mobile devices)
381
- * @this {EventManagerThis}
382
- * @param {*} range Range object
383
- */
384
- __enterScrollTo(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, range: any): void;
385
- /**
386
- * @private
387
- * @description Focus Event Postprocessing
388
- * @this {EventManagerThis}
389
- * @param {__se__FrameContext} frameContext - frame context object
390
- * @param {Event} event - Event object
391
- */
392
- __postFocusEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, frameContext: __se__FrameContext, event: Event): void;
393
- /**
394
- * @private
395
- * @description Blur Event Postprocessing
396
- * @this {EventManagerThis}
397
- * @param {__se__FrameContext} frameContext - frame context object
398
- * @param {Event} event - Event object
399
- */
400
- __postBlurEvent(this: Omit<EventManager & Partial<import('../../editorInjector').default>, 'eventManager'>, frameContext: __se__FrameContext, event: Event): void;
401
- }
@@ -1,61 +0,0 @@
1
- export default Char;
2
- export type CharThis = Omit<Char & Partial<__se__EditorInjector>, 'char'>;
3
- /**
4
- * @typedef {Omit<Char & Partial<__se__EditorInjector>, 'char'>} CharThis
5
- */
6
- /**
7
- * @constructor
8
- * @this {CharThis}
9
- * @description character count, character limit, etc. management class
10
- * @param {__se__EditorCore} editor - The root editor instance
11
- */
12
- declare function Char(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, editor: __se__EditorCore): void;
13
- declare class Char {
14
- /**
15
- * @typedef {Omit<Char & Partial<__se__EditorInjector>, 'char'>} CharThis
16
- */
17
- /**
18
- * @constructor
19
- * @this {CharThis}
20
- * @description character count, character limit, etc. management class
21
- * @param {__se__EditorCore} editor - The root editor instance
22
- */
23
- constructor(editor: __se__EditorCore);
24
- /**
25
- * @this {CharThis}
26
- * @description Returns false if char count is greater than "frameOptions.get('charCounter_max')" when "html" is added to the current editor.
27
- * @param {Node|string} html Element node or String.
28
- * @returns {boolean}
29
- */
30
- check(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, html: Node | string): boolean;
31
- /**
32
- * @this {CharThis}
33
- * @description Get the [content]'s number of characters or binary data size. (frameOptions.get('charCounter_type'))
34
- * - If [content] is undefined, get the current editor's number of characters or binary data size.
35
- * @param {string=} content Content to count. (defalut: this.editor.frameContext.get('wysiwyg'))
36
- * @returns {number}
37
- */
38
- getLength(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, content?: string | undefined): number;
39
- /**
40
- * @this {CharThis}
41
- * @descriptionGets Get the length in bytes of a string.
42
- * @param {string} text String text
43
- * @returns {number}
44
- */
45
- getByteLength(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, text: string): number;
46
- /**
47
- * @this {CharThis}
48
- * @description Set the char count to charCounter element textContent.
49
- * @param {?__se__FrameContext=} fc Frame context
50
- */
51
- display(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, fc?: (__se__FrameContext | null) | undefined): void;
52
- /**
53
- * @this {CharThis}
54
- * @description Returns false if char count is greater than "frameOptions.get('charCounter_max')" when "inputText" is added to the current editor.
55
- * - If the current number of characters is greater than "charCounter_max", the excess characters are removed.
56
- * And call the char.display()
57
- * @param {string} inputText Text added.
58
- * @returns {boolean}
59
- */
60
- test(this: Omit<Char & Partial<import('../../editorInjector').default>, 'char'>, inputText: string, _fromInputEvent: any): boolean;
61
- }