@lotte-innovate/ui-component-test 0.2.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (478) hide show
  1. package/_virtual/icons.mjs +2 -0
  2. package/_virtual/icons.mjs.map +1 -0
  3. package/_virtual/index.mjs +2 -0
  4. package/_virtual/index.mjs.map +1 -0
  5. package/_virtual/index10.mjs +2 -0
  6. package/_virtual/index10.mjs.map +1 -0
  7. package/_virtual/index11.mjs +2 -0
  8. package/_virtual/index11.mjs.map +1 -0
  9. package/_virtual/index12.mjs +2 -0
  10. package/_virtual/index12.mjs.map +1 -0
  11. package/_virtual/index13.mjs +2 -0
  12. package/_virtual/index13.mjs.map +1 -0
  13. package/_virtual/index14.mjs +2 -0
  14. package/_virtual/index14.mjs.map +1 -0
  15. package/_virtual/index15.mjs +2 -0
  16. package/_virtual/index15.mjs.map +1 -0
  17. package/_virtual/index16.mjs +2 -0
  18. package/_virtual/index16.mjs.map +1 -0
  19. package/_virtual/index17.mjs +2 -0
  20. package/_virtual/index17.mjs.map +1 -0
  21. package/_virtual/index18.mjs +2 -0
  22. package/_virtual/index18.mjs.map +1 -0
  23. package/_virtual/index19.mjs +2 -0
  24. package/_virtual/index19.mjs.map +1 -0
  25. package/_virtual/index2.mjs +2 -0
  26. package/_virtual/index2.mjs.map +1 -0
  27. package/_virtual/index20.mjs +2 -0
  28. package/_virtual/index20.mjs.map +1 -0
  29. package/_virtual/index3.mjs +2 -0
  30. package/_virtual/index3.mjs.map +1 -0
  31. package/_virtual/index4.mjs +2 -0
  32. package/_virtual/index4.mjs.map +1 -0
  33. package/_virtual/index5.mjs +2 -0
  34. package/_virtual/index5.mjs.map +1 -0
  35. package/_virtual/index6.mjs +2 -0
  36. package/_virtual/index6.mjs.map +1 -0
  37. package/_virtual/index7.mjs +2 -0
  38. package/_virtual/index7.mjs.map +1 -0
  39. package/_virtual/index8.mjs +2 -0
  40. package/_virtual/index8.mjs.map +1 -0
  41. package/_virtual/index9.mjs +2 -0
  42. package/_virtual/index9.mjs.map +1 -0
  43. package/_virtual/model.mjs +2 -0
  44. package/_virtual/model.mjs.map +1 -0
  45. package/_virtual/plugin.mjs +2 -0
  46. package/_virtual/plugin.mjs.map +1 -0
  47. package/_virtual/plugin2.mjs +2 -0
  48. package/_virtual/plugin2.mjs.map +1 -0
  49. package/_virtual/plugin3.mjs +2 -0
  50. package/_virtual/plugin3.mjs.map +1 -0
  51. package/_virtual/plugin4.mjs +2 -0
  52. package/_virtual/plugin4.mjs.map +1 -0
  53. package/_virtual/plugin5.mjs +2 -0
  54. package/_virtual/plugin5.mjs.map +1 -0
  55. package/_virtual/plugin6.mjs +2 -0
  56. package/_virtual/plugin6.mjs.map +1 -0
  57. package/_virtual/plugin7.mjs +2 -0
  58. package/_virtual/plugin7.mjs.map +1 -0
  59. package/_virtual/theme.mjs +2 -0
  60. package/_virtual/theme.mjs.map +1 -0
  61. package/_virtual/tinymce.mjs +2 -0
  62. package/_virtual/tinymce.mjs.map +1 -0
  63. package/_virtual/tinymce2.mjs +2 -0
  64. package/_virtual/tinymce2.mjs.map +1 -0
  65. package/dist/lib/color/constants.d.ts +9 -14
  66. package/dist/lib/color/constants.js +79 -14
  67. package/dist/lib/color/dark.js +1 -1
  68. package/dist/lib/color/light.js +3 -3
  69. package/dist/lib/components/Editor/index.d.ts +25 -0
  70. package/dist/lib/components/Editor/index.js +95 -0
  71. package/dist/lib/components/Editor/index.mjs +3 -0
  72. package/dist/lib/components/Editor/index.mjs.map +1 -0
  73. package/dist/lib/components/index.d.ts +1 -46
  74. package/dist/lib/components/index.js +1 -48
  75. package/dist/lib/constants.d.ts +475 -6
  76. package/dist/lib/constants.js +368 -35
  77. package/dist/lib/constants.mjs +2 -0
  78. package/dist/lib/constants.mjs.map +1 -0
  79. package/dist/lib/index.d.ts +1 -1
  80. package/dist/lib/index.js +1 -1
  81. package/dist/lib/index.mjs +2 -0
  82. package/dist/lib/index.mjs.map +1 -0
  83. package/dist/lib/theme/ThemeProvider.d.ts +16 -0
  84. package/dist/lib/theme/ThemeProvider.js +29 -0
  85. package/dist/lib/theme/ThemeProvider.mjs +3 -0
  86. package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
  87. package/dist/lib/theme/index.d.ts +2 -0
  88. package/dist/lib/theme/index.js +2 -0
  89. package/dist/lib/types.d.ts +79 -0
  90. package/dist/lib/utils/utils.d.ts +0 -1
  91. package/dist/lib/utils/utils.js +0 -17
  92. package/dist/lib/utils/utils.mjs +2 -0
  93. package/dist/lib/utils/utils.mjs.map +1 -0
  94. package/dist/tsconfig.tsbuildinfo +1 -0
  95. package/package.json +105 -134
  96. package/public/tinymce/CHANGELOG.md +3453 -0
  97. package/public/tinymce/README.md +73 -0
  98. package/public/tinymce/bower.json +27 -0
  99. package/public/tinymce/composer.json +52 -0
  100. package/public/tinymce/icons/default/icons.js +194 -0
  101. package/public/tinymce/icons/default/icons.min.js +1 -0
  102. package/public/tinymce/icons/default/icons.mjs +2 -0
  103. package/public/tinymce/icons/default/icons.mjs.map +1 -0
  104. package/public/tinymce/icons/default/index.d.ts +1 -0
  105. package/public/tinymce/icons/default/index.js +7 -0
  106. package/public/tinymce/icons/default/index.mjs +2 -0
  107. package/public/tinymce/icons/default/index.mjs.map +1 -0
  108. package/public/tinymce/license.txt +21 -0
  109. package/public/tinymce/models/dom/index.d.ts +1 -0
  110. package/public/tinymce/models/dom/index.js +7 -0
  111. package/public/tinymce/models/dom/index.mjs +2 -0
  112. package/public/tinymce/models/dom/index.mjs.map +1 -0
  113. package/public/tinymce/models/dom/model.js +8040 -0
  114. package/public/tinymce/models/dom/model.min.js +4 -0
  115. package/public/tinymce/models/dom/model.mjs +2 -0
  116. package/public/tinymce/models/dom/model.mjs.map +1 -0
  117. package/public/tinymce/package.json +32 -0
  118. package/public/tinymce/plugins/advlist/index.d.ts +1 -0
  119. package/public/tinymce/plugins/advlist/index.js +7 -0
  120. package/public/tinymce/plugins/advlist/index.mjs +2 -0
  121. package/public/tinymce/plugins/advlist/index.mjs.map +1 -0
  122. package/public/tinymce/plugins/advlist/plugin.js +259 -0
  123. package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
  124. package/public/tinymce/plugins/advlist/plugin.mjs +2 -0
  125. package/public/tinymce/plugins/advlist/plugin.mjs.map +1 -0
  126. package/public/tinymce/plugins/autolink/index.js +7 -0
  127. package/public/tinymce/plugins/autolink/plugin.js +228 -0
  128. package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
  129. package/public/tinymce/plugins/code/index.d.ts +1 -0
  130. package/public/tinymce/plugins/code/index.js +7 -0
  131. package/public/tinymce/plugins/code/index.mjs +2 -0
  132. package/public/tinymce/plugins/code/index.mjs.map +1 -0
  133. package/public/tinymce/plugins/code/plugin.js +85 -0
  134. package/public/tinymce/plugins/code/plugin.min.js +4 -0
  135. package/public/tinymce/plugins/code/plugin.mjs +2 -0
  136. package/public/tinymce/plugins/code/plugin.mjs.map +1 -0
  137. package/public/tinymce/plugins/codesample/index.d.ts +1 -0
  138. package/public/tinymce/plugins/codesample/index.js +7 -0
  139. package/public/tinymce/plugins/codesample/index.mjs +2 -0
  140. package/public/tinymce/plugins/codesample/index.mjs.map +1 -0
  141. package/public/tinymce/plugins/codesample/plugin.d.ts +45 -0
  142. package/public/tinymce/plugins/codesample/plugin.js +2463 -0
  143. package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
  144. package/public/tinymce/plugins/codesample/plugin.mjs +2 -0
  145. package/public/tinymce/plugins/codesample/plugin.mjs.map +1 -0
  146. package/public/tinymce/plugins/image/index.d.ts +1 -0
  147. package/public/tinymce/plugins/image/index.js +7 -0
  148. package/public/tinymce/plugins/image/index.mjs +2 -0
  149. package/public/tinymce/plugins/image/index.mjs.map +1 -0
  150. package/public/tinymce/plugins/image/plugin.js +1505 -0
  151. package/public/tinymce/plugins/image/plugin.min.js +4 -0
  152. package/public/tinymce/plugins/image/plugin.mjs +2 -0
  153. package/public/tinymce/plugins/image/plugin.mjs.map +1 -0
  154. package/public/tinymce/plugins/link/index.d.ts +1 -0
  155. package/public/tinymce/plugins/link/index.js +7 -0
  156. package/public/tinymce/plugins/link/index.mjs +2 -0
  157. package/public/tinymce/plugins/link/index.mjs.map +1 -0
  158. package/public/tinymce/plugins/link/plugin.js +1242 -0
  159. package/public/tinymce/plugins/link/plugin.min.js +4 -0
  160. package/public/tinymce/plugins/link/plugin.mjs +2 -0
  161. package/public/tinymce/plugins/link/plugin.mjs.map +1 -0
  162. package/public/tinymce/plugins/lists/index.d.ts +1 -0
  163. package/public/tinymce/plugins/lists/index.js +7 -0
  164. package/public/tinymce/plugins/lists/index.mjs +2 -0
  165. package/public/tinymce/plugins/lists/index.mjs.map +1 -0
  166. package/public/tinymce/plugins/lists/plugin.js +2172 -0
  167. package/public/tinymce/plugins/lists/plugin.min.js +4 -0
  168. package/public/tinymce/plugins/lists/plugin.mjs +2 -0
  169. package/public/tinymce/plugins/lists/plugin.mjs.map +1 -0
  170. package/public/tinymce/plugins/table/index.d.ts +1 -0
  171. package/public/tinymce/plugins/table/index.js +7 -0
  172. package/public/tinymce/plugins/table/index.mjs +2 -0
  173. package/public/tinymce/plugins/table/index.mjs.map +1 -0
  174. package/public/tinymce/plugins/table/plugin.js +3462 -0
  175. package/public/tinymce/plugins/table/plugin.min.js +4 -0
  176. package/public/tinymce/plugins/table/plugin.mjs +2 -0
  177. package/public/tinymce/plugins/table/plugin.mjs.map +1 -0
  178. package/public/tinymce/skins/content/default/content.css +61 -0
  179. package/public/tinymce/skins/content/default/content.js +2 -0
  180. package/public/tinymce/skins/content/default/content.min.css +1 -0
  181. package/public/tinymce/skins/content/default/content.mjs +2 -0
  182. package/public/tinymce/skins/content/default/content.mjs.map +1 -0
  183. package/public/tinymce/skins/ui/oxide/content.css +785 -0
  184. package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
  185. package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
  186. package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
  187. package/public/tinymce/skins/ui/oxide/content.js +2 -0
  188. package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
  189. package/public/tinymce/skins/ui/oxide/content.mjs +2 -0
  190. package/public/tinymce/skins/ui/oxide/content.mjs.map +1 -0
  191. package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
  192. package/public/tinymce/skins/ui/oxide/skin.js +2 -0
  193. package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
  194. package/public/tinymce/skins/ui/oxide/skin.mjs +2 -0
  195. package/public/tinymce/skins/ui/oxide/skin.mjs.map +1 -0
  196. package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  197. package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  198. package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  199. package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
  200. package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
  201. package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  202. package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
  203. package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
  204. package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  205. package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
  206. package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  207. package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  208. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  209. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  210. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  211. package/public/tinymce/themes/silver/index.d.ts +1 -0
  212. package/public/tinymce/themes/silver/index.js +7 -0
  213. package/public/tinymce/themes/silver/index.mjs +2 -0
  214. package/public/tinymce/themes/silver/index.mjs.map +1 -0
  215. package/public/tinymce/themes/silver/theme.js +30775 -0
  216. package/public/tinymce/themes/silver/theme.min.js +384 -0
  217. package/public/tinymce/themes/silver/theme.mjs +2 -0
  218. package/public/tinymce/themes/silver/theme.mjs.map +1 -0
  219. package/public/tinymce/tinymce.d.ts +3238 -0
  220. package/public/tinymce/tinymce.js +31779 -0
  221. package/public/tinymce/tinymce.min.js +384 -0
  222. package/public/tinymce/tinymce.mjs +2 -0
  223. package/public/tinymce/tinymce.mjs.map +1 -0
  224. package/README.md +0 -163
  225. package/dist/globals.css +0 -261081
  226. package/dist/lib/Typography/Header/index.d.ts +0 -13
  227. package/dist/lib/Typography/Header/index.js +0 -55
  228. package/dist/lib/Typography/Text/index.d.ts +0 -15
  229. package/dist/lib/Typography/Text/index.js +0 -44
  230. package/dist/lib/Typography/index.d.ts +0 -2
  231. package/dist/lib/Typography/index.js +0 -2
  232. package/dist/lib/components/Accordion/index.d.ts +0 -16
  233. package/dist/lib/components/Accordion/index.js +0 -58
  234. package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +0 -14
  235. package/dist/lib/components/AlertDialog/AlertDialogAction.js +0 -59
  236. package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +0 -13
  237. package/dist/lib/components/AlertDialog/AlertDialogCancel.js +0 -56
  238. package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +0 -11
  239. package/dist/lib/components/AlertDialog/AlertDialogContent.js +0 -49
  240. package/dist/lib/components/AlertDialog/AlertDialogDescription.d.ts +0 -10
  241. package/dist/lib/components/AlertDialog/AlertDialogDescription.js +0 -45
  242. package/dist/lib/components/AlertDialog/AlertDialogTitle.d.ts +0 -10
  243. package/dist/lib/components/AlertDialog/AlertDialogTitle.js +0 -45
  244. package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +0 -17
  245. package/dist/lib/components/AlertDialog/AlertDialogTrigger.js +0 -55
  246. package/dist/lib/components/AlertDialog/index.d.ts +0 -20
  247. package/dist/lib/components/AlertDialog/index.js +0 -37
  248. package/dist/lib/components/AspectRatio/index.d.ts +0 -10
  249. package/dist/lib/components/AspectRatio/index.js +0 -42
  250. package/dist/lib/components/Avatar/index.d.ts +0 -17
  251. package/dist/lib/components/Avatar/index.js +0 -57
  252. package/dist/lib/components/Badge/index.d.ts +0 -18
  253. package/dist/lib/components/Badge/index.js +0 -54
  254. package/dist/lib/components/BubbleChart/index.d.ts +0 -31
  255. package/dist/lib/components/BubbleChart/index.js +0 -43
  256. package/dist/lib/components/Button/index.d.ts +0 -16
  257. package/dist/lib/components/Button/index.js +0 -56
  258. package/dist/lib/components/Callout/CalloutIcon.d.ts +0 -12
  259. package/dist/lib/components/Callout/CalloutIcon.js +0 -57
  260. package/dist/lib/components/Callout/CalloutText.d.ts +0 -10
  261. package/dist/lib/components/Callout/CalloutText.js +0 -52
  262. package/dist/lib/components/Callout/index.d.ts +0 -20
  263. package/dist/lib/components/Callout/index.js +0 -75
  264. package/dist/lib/components/Card/index.d.ts +0 -14
  265. package/dist/lib/components/Card/index.js +0 -64
  266. package/dist/lib/components/Checkbox/index.d.ts +0 -17
  267. package/dist/lib/components/Checkbox/index.js +0 -89
  268. package/dist/lib/components/CheckboxCard/index.d.ts +0 -20
  269. package/dist/lib/components/CheckboxCard/index.js +0 -58
  270. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +0 -5
  271. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.js +0 -33
  272. package/dist/lib/components/CheckboxGroup/index.d.ts +0 -17
  273. package/dist/lib/components/CheckboxGroup/index.js +0 -35
  274. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.d.ts +0 -4
  275. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.js +0 -40
  276. package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +0 -11
  277. package/dist/lib/components/ContextMenu/ContextMenuContent.js +0 -56
  278. package/dist/lib/components/ContextMenu/ContextMenuGroup.d.ts +0 -4
  279. package/dist/lib/components/ContextMenu/ContextMenuGroup.js +0 -30
  280. package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +0 -13
  281. package/dist/lib/components/ContextMenu/ContextMenuItem.js +0 -59
  282. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +0 -10
  283. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.js +0 -50
  284. package/dist/lib/components/ContextMenu/ContextMenuLabel.d.ts +0 -11
  285. package/dist/lib/components/ContextMenu/ContextMenuLabel.js +0 -48
  286. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.d.ts +0 -8
  287. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +0 -31
  288. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.d.ts +0 -4
  289. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.js +0 -41
  290. package/dist/lib/components/ContextMenu/ContextMenuSeparator.d.ts +0 -3
  291. package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +0 -31
  292. package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +0 -11
  293. package/dist/lib/components/ContextMenu/ContextMenuSubContent.js +0 -53
  294. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.d.ts +0 -4
  295. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.js +0 -40
  296. package/dist/lib/components/ContextMenu/ContextMenuTrigger.d.ts +0 -4
  297. package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +0 -31
  298. package/dist/lib/components/ContextMenu/index.d.ts +0 -25
  299. package/dist/lib/components/ContextMenu/index.js +0 -54
  300. package/dist/lib/components/DataList/DataListItem.d.ts +0 -9
  301. package/dist/lib/components/DataList/DataListItem.js +0 -43
  302. package/dist/lib/components/DataList/DataListLabel.d.ts +0 -10
  303. package/dist/lib/components/DataList/DataListLabel.js +0 -49
  304. package/dist/lib/components/DataList/DataListValue.d.ts +0 -11
  305. package/dist/lib/components/DataList/DataListValue.js +0 -51
  306. package/dist/lib/components/DataList/index.d.ts +0 -17
  307. package/dist/lib/components/DataList/index.js +0 -57
  308. package/dist/lib/components/Dialog/DialogAction.d.ts +0 -15
  309. package/dist/lib/components/Dialog/DialogAction.js +0 -57
  310. package/dist/lib/components/Dialog/DialogCancel.d.ts +0 -11
  311. package/dist/lib/components/Dialog/DialogCancel.js +0 -53
  312. package/dist/lib/components/Dialog/DialogContent.d.ts +0 -11
  313. package/dist/lib/components/Dialog/DialogContent.js +0 -55
  314. package/dist/lib/components/Dialog/DialogDescription.d.ts +0 -9
  315. package/dist/lib/components/Dialog/DialogDescription.js +0 -45
  316. package/dist/lib/components/Dialog/DialogSlot.d.ts +0 -9
  317. package/dist/lib/components/Dialog/DialogSlot.js +0 -44
  318. package/dist/lib/components/Dialog/DialogTitle.d.ts +0 -11
  319. package/dist/lib/components/Dialog/DialogTitle.js +0 -45
  320. package/dist/lib/components/Dialog/DialogTrigger.d.ts +0 -3
  321. package/dist/lib/components/Dialog/DialogTrigger.js +0 -30
  322. package/dist/lib/components/Dialog/index.d.ts +0 -18
  323. package/dist/lib/components/Dialog/index.js +0 -38
  324. package/dist/lib/components/DoughnutChart/index.d.ts +0 -23
  325. package/dist/lib/components/DoughnutChart/index.js +0 -46
  326. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.d.ts +0 -8
  327. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +0 -31
  328. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +0 -11
  329. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.js +0 -58
  330. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +0 -7
  331. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.js +0 -38
  332. package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +0 -11
  333. package/dist/lib/components/DropdownMenu/DropdownMenuContent.js +0 -54
  334. package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +0 -13
  335. package/dist/lib/components/DropdownMenu/DropdownMenuItem.js +0 -56
  336. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +0 -10
  337. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.js +0 -46
  338. package/dist/lib/components/DropdownMenu/DropdownMenuLable.d.ts +0 -11
  339. package/dist/lib/components/DropdownMenu/DropdownMenuLable.js +0 -46
  340. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.d.ts +0 -4
  341. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.js +0 -39
  342. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.d.ts +0 -3
  343. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +0 -31
  344. package/dist/lib/components/DropdownMenu/DropdownMenuSub.d.ts +0 -3
  345. package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +0 -30
  346. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +0 -4
  347. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.js +0 -38
  348. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +0 -13
  349. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +0 -51
  350. package/dist/lib/components/DropdownMenu/index.d.ts +0 -23
  351. package/dist/lib/components/DropdownMenu/index.js +0 -43
  352. package/dist/lib/components/HoverCard/HoverCardContent.d.ts +0 -14
  353. package/dist/lib/components/HoverCard/HoverCardContent.js +0 -59
  354. package/dist/lib/components/HoverCard/HoverCardTrigger.d.ts +0 -3
  355. package/dist/lib/components/HoverCard/HoverCardTrigger.js +0 -30
  356. package/dist/lib/components/HoverCard/index.d.ts +0 -10
  357. package/dist/lib/components/HoverCard/index.js +0 -33
  358. package/dist/lib/components/IconButton/index.d.ts +0 -15
  359. package/dist/lib/components/IconButton/index.js +0 -63
  360. package/dist/lib/components/Inset/index.d.ts +0 -10
  361. package/dist/lib/components/Inset/index.js +0 -50
  362. package/dist/lib/components/Label/index.d.ts +0 -17
  363. package/dist/lib/components/Label/index.js +0 -53
  364. package/dist/lib/components/Menubar/MenubarCheckboxItem.d.ts +0 -4
  365. package/dist/lib/components/Menubar/MenubarCheckboxItem.js +0 -38
  366. package/dist/lib/components/Menubar/MenubarContent.d.ts +0 -11
  367. package/dist/lib/components/Menubar/MenubarContent.js +0 -60
  368. package/dist/lib/components/Menubar/MenubarItem.d.ts +0 -13
  369. package/dist/lib/components/Menubar/MenubarItem.js +0 -54
  370. package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +0 -10
  371. package/dist/lib/components/Menubar/MenubarItemIndicator.js +0 -49
  372. package/dist/lib/components/Menubar/MenubarMenu.d.ts +0 -2
  373. package/dist/lib/components/Menubar/MenubarMenu.js +0 -30
  374. package/dist/lib/components/Menubar/MenubarRadioGroup.d.ts +0 -8
  375. package/dist/lib/components/Menubar/MenubarRadioGroup.js +0 -31
  376. package/dist/lib/components/Menubar/MenubarRadioItem.d.ts +0 -4
  377. package/dist/lib/components/Menubar/MenubarRadioItem.js +0 -40
  378. package/dist/lib/components/Menubar/MenubarSeparator.d.ts +0 -3
  379. package/dist/lib/components/Menubar/MenubarSeparator.js +0 -31
  380. package/dist/lib/components/Menubar/MenubarSub.d.ts +0 -3
  381. package/dist/lib/components/Menubar/MenubarSub.js +0 -30
  382. package/dist/lib/components/Menubar/MenubarSubContent.d.ts +0 -10
  383. package/dist/lib/components/Menubar/MenubarSubContent.js +0 -51
  384. package/dist/lib/components/Menubar/MenubarSubTrigger.d.ts +0 -4
  385. package/dist/lib/components/Menubar/MenubarSubTrigger.js +0 -41
  386. package/dist/lib/components/Menubar/MenubarTrigger.d.ts +0 -12
  387. package/dist/lib/components/Menubar/MenubarTrigger.js +0 -57
  388. package/dist/lib/components/Menubar/index.d.ts +0 -31
  389. package/dist/lib/components/Menubar/index.js +0 -73
  390. package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +0 -11
  391. package/dist/lib/components/NavigationMenu/NavigationMenuContent.js +0 -48
  392. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.d.ts +0 -3
  393. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -31
  394. package/dist/lib/components/NavigationMenu/NavigationMenuItem.d.ts +0 -3
  395. package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +0 -30
  396. package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +0 -13
  397. package/dist/lib/components/NavigationMenu/NavigationMenuLink.js +0 -51
  398. package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +0 -12
  399. package/dist/lib/components/NavigationMenu/NavigationMenuList.js +0 -47
  400. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +0 -13
  401. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.js +0 -58
  402. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +0 -12
  403. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.js +0 -53
  404. package/dist/lib/components/NavigationMenu/index.d.ts +0 -21
  405. package/dist/lib/components/NavigationMenu/index.js +0 -50
  406. package/dist/lib/components/PieChart/index.d.ts +0 -23
  407. package/dist/lib/components/PieChart/index.js +0 -46
  408. package/dist/lib/components/Popover/PopoverClose.d.ts +0 -9
  409. package/dist/lib/components/Popover/PopoverClose.js +0 -46
  410. package/dist/lib/components/Popover/PopoverContent.d.ts +0 -11
  411. package/dist/lib/components/Popover/PopoverContent.js +0 -63
  412. package/dist/lib/components/Popover/PopoverTrigger.d.ts +0 -3
  413. package/dist/lib/components/Popover/PopoverTrigger.js +0 -30
  414. package/dist/lib/components/Popover/index.d.ts +0 -12
  415. package/dist/lib/components/Popover/index.js +0 -34
  416. package/dist/lib/components/Progress/index.d.ts +0 -16
  417. package/dist/lib/components/Progress/index.js +0 -57
  418. package/dist/lib/components/RadarChart/index.d.ts +0 -34
  419. package/dist/lib/components/RadarChart/index.js +0 -43
  420. package/dist/lib/components/Radio/index.d.ts +0 -14
  421. package/dist/lib/components/Radio/index.js +0 -51
  422. package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +0 -10
  423. package/dist/lib/components/RadioCards/RadioCardsItem.js +0 -52
  424. package/dist/lib/components/RadioCards/index.d.ts +0 -14
  425. package/dist/lib/components/RadioCards/index.js +0 -43
  426. package/dist/lib/components/RadioGroup/RadioGroupItem.d.ts +0 -13
  427. package/dist/lib/components/RadioGroup/RadioGroupItem.js +0 -44
  428. package/dist/lib/components/RadioGroup/index.d.ts +0 -16
  429. package/dist/lib/components/RadioGroup/index.js +0 -51
  430. package/dist/lib/components/ScrollArea/index.d.ts +0 -9
  431. package/dist/lib/components/ScrollArea/index.js +0 -36
  432. package/dist/lib/components/SegmentedControl/SegmentedControlItem.d.ts +0 -6
  433. package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +0 -35
  434. package/dist/lib/components/SegmentedControl/index.d.ts +0 -15
  435. package/dist/lib/components/SegmentedControl/index.js +0 -48
  436. package/dist/lib/components/Select/index.d.ts +0 -25
  437. package/dist/lib/components/Select/index.js +0 -83
  438. package/dist/lib/components/Separator/index.d.ts +0 -11
  439. package/dist/lib/components/Separator/index.js +0 -47
  440. package/dist/lib/components/Skeleton/index.d.ts +0 -15
  441. package/dist/lib/components/Skeleton/index.js +0 -43
  442. package/dist/lib/components/Slider/index.d.ts +0 -15
  443. package/dist/lib/components/Slider/index.js +0 -50
  444. package/dist/lib/components/Spinner/index.d.ts +0 -15
  445. package/dist/lib/components/Spinner/index.js +0 -47
  446. package/dist/lib/components/TabNav/index.d.ts +0 -11
  447. package/dist/lib/components/TabNav/index.js +0 -46
  448. package/dist/lib/components/Table/index.d.ts +0 -21
  449. package/dist/lib/components/Table/index.js +0 -89
  450. package/dist/lib/components/Tabs/index.d.ts +0 -16
  451. package/dist/lib/components/Tabs/index.js +0 -59
  452. package/dist/lib/components/TextArea/index.d.ts +0 -16
  453. package/dist/lib/components/TextArea/index.js +0 -58
  454. package/dist/lib/components/TextField/index.d.ts +0 -18
  455. package/dist/lib/components/TextField/index.js +0 -53
  456. package/dist/lib/components/Toast/ToastActionButton.d.ts +0 -14
  457. package/dist/lib/components/Toast/ToastActionButton.js +0 -67
  458. package/dist/lib/components/Toast/ToastDescription.d.ts +0 -13
  459. package/dist/lib/components/Toast/ToastDescription.js +0 -53
  460. package/dist/lib/components/Toast/ToastTitle.d.ts +0 -13
  461. package/dist/lib/components/Toast/ToastTitle.js +0 -53
  462. package/dist/lib/components/Toast/index.d.ts +0 -30
  463. package/dist/lib/components/Toast/index.js +0 -94
  464. package/dist/lib/components/Toggle/ToggleWithText.d.ts +0 -21
  465. package/dist/lib/components/Toggle/ToggleWithText.js +0 -57
  466. package/dist/lib/components/Toggle/index.d.ts +0 -21
  467. package/dist/lib/components/Toggle/index.js +0 -58
  468. package/dist/lib/components/ToggleGroup/index.d.ts +0 -20
  469. package/dist/lib/components/ToggleGroup/index.js +0 -43
  470. package/dist/lib/components/ToggleGroup/toggleGroupItem.d.ts +0 -17
  471. package/dist/lib/components/ToggleGroup/toggleGroupItem.js +0 -52
  472. package/dist/lib/components/ToggleSwitch/index.d.ts +0 -13
  473. package/dist/lib/components/ToggleSwitch/index.js +0 -71
  474. package/dist/lib/components/Tooltip/index.d.ts +0 -20
  475. package/dist/lib/components/Tooltip/index.js +0 -49
  476. package/dist/styles.css +0 -32748
  477. package/dist/tailwind.config.d.ts +0 -3
  478. package/dist/tailwind.config.js +0 -144
@@ -0,0 +1,3238 @@
1
+ interface StringPathBookmark {
2
+ start: string;
3
+ end?: string;
4
+ forward?: boolean;
5
+ }
6
+ interface RangeBookmark {
7
+ rng: Range;
8
+ forward?: boolean;
9
+ }
10
+ interface IdBookmark {
11
+ id: string;
12
+ keep?: boolean;
13
+ forward?: boolean;
14
+ }
15
+ interface IndexBookmark {
16
+ name: string;
17
+ index: number;
18
+ }
19
+ interface PathBookmark {
20
+ start: number[];
21
+ end?: number[];
22
+ isFakeCaret?: boolean;
23
+ forward?: boolean;
24
+ }
25
+ type Bookmark = StringPathBookmark | RangeBookmark | IdBookmark | IndexBookmark | PathBookmark;
26
+ type NormalizedEvent<E, T = any> = E & {
27
+ readonly type: string;
28
+ readonly target: T;
29
+ readonly isDefaultPrevented: () => boolean;
30
+ readonly preventDefault: () => void;
31
+ readonly isPropagationStopped: () => boolean;
32
+ readonly stopPropagation: () => void;
33
+ readonly isImmediatePropagationStopped: () => boolean;
34
+ readonly stopImmediatePropagation: () => void;
35
+ };
36
+ type MappedEvent<T extends {}, K extends string> = K extends keyof T ? T[K] : any;
37
+ interface NativeEventMap {
38
+ 'beforepaste': Event;
39
+ 'blur': FocusEvent;
40
+ 'beforeinput': InputEvent;
41
+ 'click': MouseEvent;
42
+ 'compositionend': Event;
43
+ 'compositionstart': Event;
44
+ 'compositionupdate': Event;
45
+ 'contextmenu': PointerEvent;
46
+ 'copy': ClipboardEvent;
47
+ 'cut': ClipboardEvent;
48
+ 'dblclick': MouseEvent;
49
+ 'drag': DragEvent;
50
+ 'dragdrop': DragEvent;
51
+ 'dragend': DragEvent;
52
+ 'draggesture': DragEvent;
53
+ 'dragover': DragEvent;
54
+ 'dragstart': DragEvent;
55
+ 'drop': DragEvent;
56
+ 'focus': FocusEvent;
57
+ 'focusin': FocusEvent;
58
+ 'focusout': FocusEvent;
59
+ 'input': InputEvent;
60
+ 'keydown': KeyboardEvent;
61
+ 'keypress': KeyboardEvent;
62
+ 'keyup': KeyboardEvent;
63
+ 'mousedown': MouseEvent;
64
+ 'mouseenter': MouseEvent;
65
+ 'mouseleave': MouseEvent;
66
+ 'mousemove': MouseEvent;
67
+ 'mouseout': MouseEvent;
68
+ 'mouseover': MouseEvent;
69
+ 'mouseup': MouseEvent;
70
+ 'paste': ClipboardEvent;
71
+ 'selectionchange': Event;
72
+ 'submit': Event;
73
+ 'touchend': TouchEvent;
74
+ 'touchmove': TouchEvent;
75
+ 'touchstart': TouchEvent;
76
+ 'touchcancel': TouchEvent;
77
+ 'wheel': WheelEvent;
78
+ }
79
+ type EditorEvent<T> = NormalizedEvent<T>;
80
+ interface EventDispatcherSettings {
81
+ scope?: any;
82
+ toggleEvent?: (name: string, state: boolean) => void | boolean;
83
+ beforeFire?: <T>(args: EditorEvent<T>) => void;
84
+ }
85
+ interface EventDispatcherConstructor<T extends {}> {
86
+ readonly prototype: EventDispatcher<T>;
87
+ new (settings?: EventDispatcherSettings): EventDispatcher<T>;
88
+ isNative: (name: string) => boolean;
89
+ }
90
+ declare class EventDispatcher<T extends {}> {
91
+ static isNative(name: string): boolean;
92
+ private readonly settings;
93
+ private readonly scope;
94
+ private readonly toggleEvent;
95
+ private bindings;
96
+ constructor(settings?: EventDispatcherSettings);
97
+ fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
98
+ dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
99
+ on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void | boolean), prepend?: boolean, extra?: {}): this;
100
+ off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
101
+ once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
102
+ has(name: string): boolean;
103
+ }
104
+ type UndoLevelType = 'fragmented' | 'complete';
105
+ interface BaseUndoLevel {
106
+ type: UndoLevelType;
107
+ bookmark: Bookmark | null;
108
+ beforeBookmark: Bookmark | null;
109
+ }
110
+ interface FragmentedUndoLevel extends BaseUndoLevel {
111
+ type: 'fragmented';
112
+ fragments: string[];
113
+ content: '';
114
+ }
115
+ interface CompleteUndoLevel extends BaseUndoLevel {
116
+ type: 'complete';
117
+ fragments: null;
118
+ content: string;
119
+ }
120
+ type NewUndoLevel = CompleteUndoLevel | FragmentedUndoLevel;
121
+ type UndoLevel = NewUndoLevel & {
122
+ bookmark: Bookmark;
123
+ };
124
+ interface UndoManager {
125
+ data: UndoLevel[];
126
+ typing: boolean;
127
+ add: (level?: Partial<UndoLevel>, event?: EditorEvent<any>) => UndoLevel | null;
128
+ dispatchChange: () => void;
129
+ beforeChange: () => void;
130
+ undo: () => UndoLevel | undefined;
131
+ redo: () => UndoLevel | undefined;
132
+ clear: () => void;
133
+ reset: () => void;
134
+ hasUndo: () => boolean;
135
+ hasRedo: () => boolean;
136
+ transact: (callback: () => void) => UndoLevel | null;
137
+ ignore: (callback: () => void) => void;
138
+ extra: (callback1: () => void, callback2: () => void) => void;
139
+ }
140
+ type SchemaType = 'html4' | 'html5' | 'html5-strict';
141
+ interface ElementSettings {
142
+ block_elements?: string;
143
+ boolean_attributes?: string;
144
+ move_caret_before_on_enter_elements?: string;
145
+ non_empty_elements?: string;
146
+ self_closing_elements?: string;
147
+ text_block_elements?: string;
148
+ text_inline_elements?: string;
149
+ void_elements?: string;
150
+ whitespace_elements?: string;
151
+ transparent_elements?: string;
152
+ wrap_block_elements?: string;
153
+ }
154
+ interface SchemaSettings extends ElementSettings {
155
+ custom_elements?: string;
156
+ extended_valid_elements?: string;
157
+ invalid_elements?: string;
158
+ invalid_styles?: string | Record<string, string>;
159
+ schema?: SchemaType;
160
+ valid_children?: string;
161
+ valid_classes?: string | Record<string, string>;
162
+ valid_elements?: string;
163
+ valid_styles?: string | Record<string, string>;
164
+ verify_html?: boolean;
165
+ padd_empty_block_inline_children?: boolean;
166
+ }
167
+ interface Attribute {
168
+ required?: boolean;
169
+ defaultValue?: string;
170
+ forcedValue?: string;
171
+ validValues?: Record<string, {}>;
172
+ }
173
+ interface DefaultAttribute {
174
+ name: string;
175
+ value: string;
176
+ }
177
+ interface AttributePattern extends Attribute {
178
+ pattern: RegExp;
179
+ }
180
+ interface ElementRule {
181
+ attributes: Record<string, Attribute>;
182
+ attributesDefault?: DefaultAttribute[];
183
+ attributesForced?: DefaultAttribute[];
184
+ attributesOrder: string[];
185
+ attributePatterns?: AttributePattern[];
186
+ attributesRequired?: string[];
187
+ paddEmpty?: boolean;
188
+ removeEmpty?: boolean;
189
+ removeEmptyAttrs?: boolean;
190
+ paddInEmptyBlock?: boolean;
191
+ }
192
+ interface SchemaElement extends ElementRule {
193
+ outputName?: string;
194
+ parentsRequired?: string[];
195
+ pattern?: RegExp;
196
+ }
197
+ interface SchemaMap {
198
+ [name: string]: {};
199
+ }
200
+ interface SchemaRegExpMap {
201
+ [name: string]: RegExp;
202
+ }
203
+ interface Schema {
204
+ type: SchemaType;
205
+ children: Record<string, SchemaMap>;
206
+ elements: Record<string, SchemaElement>;
207
+ getValidStyles: () => Record<string, string[]> | undefined;
208
+ getValidClasses: () => Record<string, SchemaMap> | undefined;
209
+ getBlockElements: () => SchemaMap;
210
+ getInvalidStyles: () => Record<string, SchemaMap> | undefined;
211
+ getVoidElements: () => SchemaMap;
212
+ getTextBlockElements: () => SchemaMap;
213
+ getTextInlineElements: () => SchemaMap;
214
+ getBoolAttrs: () => SchemaMap;
215
+ getElementRule: (name: string) => SchemaElement | undefined;
216
+ getSelfClosingElements: () => SchemaMap;
217
+ getNonEmptyElements: () => SchemaMap;
218
+ getMoveCaretBeforeOnEnterElements: () => SchemaMap;
219
+ getWhitespaceElements: () => SchemaMap;
220
+ getTransparentElements: () => SchemaMap;
221
+ getSpecialElements: () => SchemaRegExpMap;
222
+ isValidChild: (name: string, child: string) => boolean;
223
+ isValid: (name: string, attr?: string) => boolean;
224
+ isBlock: (name: string) => boolean;
225
+ isInline: (name: string) => boolean;
226
+ isWrapper: (name: string) => boolean;
227
+ getCustomElements: () => SchemaMap;
228
+ addValidElements: (validElements: string) => void;
229
+ setValidElements: (validElements: string) => void;
230
+ addCustomElements: (customElements: string) => void;
231
+ addValidChildren: (validChildren: any) => void;
232
+ }
233
+ type Attributes$1 = Array<{
234
+ name: string;
235
+ value: string;
236
+ }> & {
237
+ map: Record<string, string>;
238
+ };
239
+ interface AstNodeConstructor {
240
+ readonly prototype: AstNode;
241
+ new (name: string, type: number): AstNode;
242
+ create(name: string, attrs?: Record<string, string>): AstNode;
243
+ }
244
+ declare class AstNode {
245
+ static create(name: string, attrs?: Record<string, string>): AstNode;
246
+ name: string;
247
+ type: number;
248
+ attributes?: Attributes$1;
249
+ value?: string;
250
+ parent?: AstNode | null;
251
+ firstChild?: AstNode | null;
252
+ lastChild?: AstNode | null;
253
+ next?: AstNode | null;
254
+ prev?: AstNode | null;
255
+ raw?: boolean;
256
+ constructor(name: string, type: number);
257
+ replace(node: AstNode): AstNode;
258
+ attr(name: string, value: string | null | undefined): AstNode | undefined;
259
+ attr(name: Record<string, string | null | undefined> | undefined): AstNode | undefined;
260
+ attr(name: string): string | undefined;
261
+ clone(): AstNode;
262
+ wrap(wrapper: AstNode): AstNode;
263
+ unwrap(): void;
264
+ remove(): AstNode;
265
+ append(node: AstNode): AstNode;
266
+ insert(node: AstNode, refNode: AstNode, before?: boolean): AstNode;
267
+ getAll(name: string): AstNode[];
268
+ children(): AstNode[];
269
+ empty(): AstNode;
270
+ isEmpty(elements: SchemaMap, whitespace?: SchemaMap, predicate?: (node: AstNode) => boolean): boolean;
271
+ walk(prev?: boolean): AstNode | null | undefined;
272
+ }
273
+ type Content = string | AstNode;
274
+ type ContentFormat = 'raw' | 'text' | 'html' | 'tree';
275
+ interface GetContentArgs {
276
+ format: ContentFormat;
277
+ get: boolean;
278
+ getInner: boolean;
279
+ no_events?: boolean;
280
+ save?: boolean;
281
+ source_view?: boolean;
282
+ [key: string]: any;
283
+ }
284
+ interface SetContentArgs {
285
+ format: string;
286
+ set: boolean;
287
+ content: Content;
288
+ no_events?: boolean;
289
+ no_selection?: boolean;
290
+ paste?: boolean;
291
+ load?: boolean;
292
+ initial?: boolean;
293
+ [key: string]: any;
294
+ }
295
+ interface GetSelectionContentArgs extends GetContentArgs {
296
+ selection?: boolean;
297
+ contextual?: boolean;
298
+ }
299
+ interface SetSelectionContentArgs extends SetContentArgs {
300
+ content: string;
301
+ selection?: boolean;
302
+ }
303
+ interface BlobInfoData {
304
+ id?: string;
305
+ name?: string;
306
+ filename?: string;
307
+ blob: Blob;
308
+ base64: string;
309
+ blobUri?: string;
310
+ uri?: string;
311
+ }
312
+ interface BlobInfo {
313
+ id: () => string;
314
+ name: () => string;
315
+ filename: () => string;
316
+ blob: () => Blob;
317
+ base64: () => string;
318
+ blobUri: () => string;
319
+ uri: () => string | undefined;
320
+ }
321
+ interface BlobCache {
322
+ create: {
323
+ (o: BlobInfoData): BlobInfo;
324
+ (id: string, blob: Blob, base64: string, name?: string, filename?: string): BlobInfo;
325
+ };
326
+ add: (blobInfo: BlobInfo) => void;
327
+ get: (id: string) => BlobInfo | undefined;
328
+ getByUri: (blobUri: string) => BlobInfo | undefined;
329
+ getByData: (base64: string, type: string) => BlobInfo | undefined;
330
+ findFirst: (predicate: (blobInfo: BlobInfo) => boolean) => BlobInfo | undefined;
331
+ removeByUri: (blobUri: string) => void;
332
+ destroy: () => void;
333
+ }
334
+ interface BlobInfoImagePair {
335
+ image: HTMLImageElement;
336
+ blobInfo: BlobInfo;
337
+ }
338
+ declare class NodeChange {
339
+ private readonly editor;
340
+ private lastPath;
341
+ constructor(editor: Editor);
342
+ nodeChanged(args?: Record<string, any>): void;
343
+ private isSameElementPath;
344
+ }
345
+ interface SelectionOverrides {
346
+ showCaret: (direction: number, node: HTMLElement, before: boolean, scrollIntoView?: boolean) => Range | null;
347
+ showBlockCaretContainer: (blockCaretContainer: HTMLElement) => void;
348
+ hideFakeCaret: () => void;
349
+ destroy: () => void;
350
+ }
351
+ interface Quirks {
352
+ refreshContentEditable(): void;
353
+ isHidden(): boolean;
354
+ }
355
+ type DecoratorData = Record<string, any>;
356
+ type Decorator = (uid: string, data: DecoratorData) => {
357
+ attributes?: {};
358
+ classes?: string[];
359
+ };
360
+ type AnnotationListener = (state: boolean, name: string, data?: {
361
+ uid: string;
362
+ nodes: any[];
363
+ }) => void;
364
+ type AnnotationListenerApi = AnnotationListener;
365
+ interface AnnotatorSettings {
366
+ decorate: Decorator;
367
+ persistent?: boolean;
368
+ }
369
+ interface Annotator {
370
+ register: (name: string, settings: AnnotatorSettings) => void;
371
+ annotate: (name: string, data: DecoratorData) => void;
372
+ annotationChanged: (name: string, f: AnnotationListenerApi) => void;
373
+ remove: (name: string) => void;
374
+ removeAll: (name: string) => void;
375
+ getAll: (name: string) => Record<string, Element[]>;
376
+ }
377
+ interface GeomRect {
378
+ readonly x: number;
379
+ readonly y: number;
380
+ readonly w: number;
381
+ readonly h: number;
382
+ }
383
+ interface Rect {
384
+ inflate: (rect: GeomRect, w: number, h: number) => GeomRect;
385
+ relativePosition: (rect: GeomRect, targetRect: GeomRect, rel: string) => GeomRect;
386
+ findBestRelativePosition: (rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]) => string | null;
387
+ intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
388
+ clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
389
+ create: (x: number, y: number, w: number, h: number) => GeomRect;
390
+ fromClientRect: (clientRect: DOMRect) => GeomRect;
391
+ }
392
+ interface NotificationManagerImpl {
393
+ open: (spec: NotificationSpec, closeCallback: () => void) => NotificationApi;
394
+ close: <T extends NotificationApi>(notification: T) => void;
395
+ getArgs: <T extends NotificationApi>(notification: T) => NotificationSpec;
396
+ }
397
+ interface NotificationSpec {
398
+ type?: 'info' | 'warning' | 'error' | 'success';
399
+ text: string;
400
+ icon?: string;
401
+ progressBar?: boolean;
402
+ timeout?: number;
403
+ closeButton?: boolean;
404
+ }
405
+ interface NotificationApi {
406
+ close: () => void;
407
+ progressBar: {
408
+ value: (percent: number) => void;
409
+ };
410
+ text: (text: string) => void;
411
+ reposition: () => void;
412
+ getEl: () => HTMLElement;
413
+ settings: NotificationSpec;
414
+ }
415
+ interface NotificationManager {
416
+ open: (spec: NotificationSpec) => NotificationApi;
417
+ close: () => void;
418
+ getNotifications: () => NotificationApi[];
419
+ }
420
+ interface UploadFailure {
421
+ message: string;
422
+ remove?: boolean;
423
+ }
424
+ type ProgressFn = (percent: number) => void;
425
+ type UploadHandler = (blobInfo: BlobInfo, progress: ProgressFn) => Promise<string>;
426
+ interface UploadResult$2 {
427
+ url: string;
428
+ blobInfo: BlobInfo;
429
+ status: boolean;
430
+ error?: UploadFailure;
431
+ }
432
+ interface RawPattern {
433
+ start?: any;
434
+ end?: any;
435
+ format?: any;
436
+ cmd?: any;
437
+ value?: any;
438
+ replacement?: any;
439
+ }
440
+ interface InlineBasePattern {
441
+ readonly start: string;
442
+ readonly end: string;
443
+ }
444
+ interface InlineFormatPattern extends InlineBasePattern {
445
+ readonly type: 'inline-format';
446
+ readonly format: string[];
447
+ }
448
+ interface InlineCmdPattern extends InlineBasePattern {
449
+ readonly type: 'inline-command';
450
+ readonly cmd: string;
451
+ readonly value?: any;
452
+ }
453
+ type InlinePattern = InlineFormatPattern | InlineCmdPattern;
454
+ interface BlockBasePattern {
455
+ readonly start: string;
456
+ }
457
+ interface BlockFormatPattern extends BlockBasePattern {
458
+ readonly type: 'block-format';
459
+ readonly format: string;
460
+ }
461
+ interface BlockCmdPattern extends BlockBasePattern {
462
+ readonly type: 'block-command';
463
+ readonly cmd: string;
464
+ readonly value?: any;
465
+ }
466
+ type BlockPattern = BlockFormatPattern | BlockCmdPattern;
467
+ type Pattern = InlinePattern | BlockPattern;
468
+ interface DynamicPatternContext {
469
+ readonly text: string;
470
+ readonly block: Element;
471
+ }
472
+ type DynamicPatternsLookup = (ctx: DynamicPatternContext) => Pattern[];
473
+ type RawDynamicPatternsLookup = (ctx: DynamicPatternContext) => RawPattern[];
474
+ interface AlertBannerSpec {
475
+ type: 'alertbanner';
476
+ level: 'info' | 'warn' | 'error' | 'success';
477
+ text: string;
478
+ icon: string;
479
+ url?: string;
480
+ }
481
+ interface ButtonSpec {
482
+ type: 'button';
483
+ text: string;
484
+ enabled?: boolean;
485
+ primary?: boolean;
486
+ name?: string;
487
+ icon?: string;
488
+ borderless?: boolean;
489
+ buttonType?: 'primary' | 'secondary' | 'toolbar';
490
+ }
491
+ interface FormComponentSpec {
492
+ type: string;
493
+ name: string;
494
+ }
495
+ interface FormComponentWithLabelSpec extends FormComponentSpec {
496
+ label?: string;
497
+ }
498
+ interface CheckboxSpec extends FormComponentSpec {
499
+ type: 'checkbox';
500
+ label: string;
501
+ enabled?: boolean;
502
+ }
503
+ interface CollectionSpec extends FormComponentWithLabelSpec {
504
+ type: 'collection';
505
+ }
506
+ interface CollectionItem {
507
+ value: string;
508
+ text: string;
509
+ icon: string;
510
+ }
511
+ interface ColorInputSpec extends FormComponentWithLabelSpec {
512
+ type: 'colorinput';
513
+ storageKey?: string;
514
+ }
515
+ interface ColorPickerSpec extends FormComponentWithLabelSpec {
516
+ type: 'colorpicker';
517
+ }
518
+ interface CustomEditorInit {
519
+ setValue: (value: string) => void;
520
+ getValue: () => string;
521
+ destroy: () => void;
522
+ }
523
+ type CustomEditorInitFn = (elm: HTMLElement, settings: any) => Promise<CustomEditorInit>;
524
+ interface CustomEditorOldSpec extends FormComponentSpec {
525
+ type: 'customeditor';
526
+ tag?: string;
527
+ init: (e: HTMLElement) => Promise<CustomEditorInit>;
528
+ }
529
+ interface CustomEditorNewSpec extends FormComponentSpec {
530
+ type: 'customeditor';
531
+ tag?: string;
532
+ scriptId: string;
533
+ scriptUrl: string;
534
+ settings?: any;
535
+ }
536
+ type CustomEditorSpec = CustomEditorOldSpec | CustomEditorNewSpec;
537
+ interface DropZoneSpec extends FormComponentWithLabelSpec {
538
+ type: 'dropzone';
539
+ }
540
+ interface GridSpec {
541
+ type: 'grid';
542
+ columns: number;
543
+ items: BodyComponentSpec[];
544
+ }
545
+ interface HtmlPanelSpec {
546
+ type: 'htmlpanel';
547
+ html: string;
548
+ presets?: 'presentation' | 'document';
549
+ }
550
+ interface IframeSpec extends FormComponentWithLabelSpec {
551
+ type: 'iframe';
552
+ border?: boolean;
553
+ sandboxed?: boolean;
554
+ streamContent?: boolean;
555
+ transparent?: boolean;
556
+ }
557
+ interface ImagePreviewSpec extends FormComponentSpec {
558
+ type: 'imagepreview';
559
+ height?: string;
560
+ }
561
+ interface InputSpec extends FormComponentWithLabelSpec {
562
+ type: 'input';
563
+ inputMode?: string;
564
+ placeholder?: string;
565
+ maximized?: boolean;
566
+ enabled?: boolean;
567
+ }
568
+ type Alignment = 'start' | 'center' | 'end';
569
+ interface LabelSpec {
570
+ type: 'label';
571
+ label: string;
572
+ items: BodyComponentSpec[];
573
+ align?: Alignment;
574
+ }
575
+ interface ListBoxSingleItemSpec {
576
+ text: string;
577
+ value: string;
578
+ }
579
+ interface ListBoxNestedItemSpec {
580
+ text: string;
581
+ items: ListBoxItemSpec[];
582
+ }
583
+ type ListBoxItemSpec = ListBoxNestedItemSpec | ListBoxSingleItemSpec;
584
+ interface ListBoxSpec extends FormComponentWithLabelSpec {
585
+ type: 'listbox';
586
+ items: ListBoxItemSpec[];
587
+ disabled?: boolean;
588
+ }
589
+ interface PanelSpec {
590
+ type: 'panel';
591
+ classes?: string[];
592
+ items: BodyComponentSpec[];
593
+ }
594
+ interface SelectBoxItemSpec {
595
+ text: string;
596
+ value: string;
597
+ }
598
+ interface SelectBoxSpec extends FormComponentWithLabelSpec {
599
+ type: 'selectbox';
600
+ items: SelectBoxItemSpec[];
601
+ size?: number;
602
+ enabled?: boolean;
603
+ }
604
+ interface SizeInputSpec extends FormComponentWithLabelSpec {
605
+ type: 'sizeinput';
606
+ constrain?: boolean;
607
+ enabled?: boolean;
608
+ }
609
+ interface SliderSpec extends FormComponentSpec {
610
+ type: 'slider';
611
+ label: string;
612
+ min?: number;
613
+ max?: number;
614
+ }
615
+ interface TableSpec {
616
+ type: 'table';
617
+ header: string[];
618
+ cells: string[][];
619
+ }
620
+ interface TextAreaSpec extends FormComponentWithLabelSpec {
621
+ type: 'textarea';
622
+ placeholder?: string;
623
+ maximized?: boolean;
624
+ enabled?: boolean;
625
+ }
626
+ interface BaseToolbarButtonSpec<I extends BaseToolbarButtonInstanceApi> {
627
+ enabled?: boolean;
628
+ tooltip?: string;
629
+ icon?: string;
630
+ text?: string;
631
+ onSetup?: (api: I) => (api: I) => void;
632
+ }
633
+ interface BaseToolbarButtonInstanceApi {
634
+ isEnabled: () => boolean;
635
+ setEnabled: (state: boolean) => void;
636
+ setText: (text: string) => void;
637
+ setIcon: (icon: string) => void;
638
+ }
639
+ interface ToolbarButtonSpec extends BaseToolbarButtonSpec<ToolbarButtonInstanceApi> {
640
+ type?: 'button';
641
+ onAction: (api: ToolbarButtonInstanceApi) => void;
642
+ }
643
+ interface ToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
644
+ }
645
+ interface ToolbarGroupSetting {
646
+ name: string;
647
+ items: string[];
648
+ }
649
+ type ToolbarConfig = string | ToolbarGroupSetting[];
650
+ interface GroupToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
651
+ }
652
+ interface GroupToolbarButtonSpec extends BaseToolbarButtonSpec<GroupToolbarButtonInstanceApi> {
653
+ type?: 'grouptoolbarbutton';
654
+ items?: ToolbarConfig;
655
+ }
656
+ interface CardImageSpec {
657
+ type: 'cardimage';
658
+ src: string;
659
+ alt?: string;
660
+ classes?: string[];
661
+ }
662
+ interface CardTextSpec {
663
+ type: 'cardtext';
664
+ text: string;
665
+ name?: string;
666
+ classes?: string[];
667
+ }
668
+ type CardItemSpec = CardContainerSpec | CardImageSpec | CardTextSpec;
669
+ type CardContainerDirection = 'vertical' | 'horizontal';
670
+ type CardContainerAlign = 'left' | 'right';
671
+ type CardContainerValign = 'top' | 'middle' | 'bottom';
672
+ interface CardContainerSpec {
673
+ type: 'cardcontainer';
674
+ items: CardItemSpec[];
675
+ direction?: CardContainerDirection;
676
+ align?: CardContainerAlign;
677
+ valign?: CardContainerValign;
678
+ }
679
+ interface CommonMenuItemSpec {
680
+ enabled?: boolean;
681
+ text?: string;
682
+ value?: string;
683
+ meta?: Record<string, any>;
684
+ shortcut?: string;
685
+ }
686
+ interface CommonMenuItemInstanceApi {
687
+ isEnabled: () => boolean;
688
+ setEnabled: (state: boolean) => void;
689
+ }
690
+ interface CardMenuItemInstanceApi extends CommonMenuItemInstanceApi {
691
+ }
692
+ interface CardMenuItemSpec extends Omit<CommonMenuItemSpec, 'text' | 'shortcut'> {
693
+ type: 'cardmenuitem';
694
+ label?: string;
695
+ items: CardItemSpec[];
696
+ onSetup?: (api: CardMenuItemInstanceApi) => (api: CardMenuItemInstanceApi) => void;
697
+ onAction?: (api: CardMenuItemInstanceApi) => void;
698
+ }
699
+ interface ChoiceMenuItemSpec extends CommonMenuItemSpec {
700
+ type?: 'choiceitem';
701
+ icon?: string;
702
+ }
703
+ interface ChoiceMenuItemInstanceApi extends CommonMenuItemInstanceApi {
704
+ isActive: () => boolean;
705
+ setActive: (state: boolean) => void;
706
+ }
707
+ interface ContextMenuItem extends CommonMenuItemSpec {
708
+ text: string;
709
+ icon?: string;
710
+ type?: 'item';
711
+ onAction: () => void;
712
+ }
713
+ interface ContextSubMenu extends CommonMenuItemSpec {
714
+ type: 'submenu';
715
+ text: string;
716
+ icon?: string;
717
+ getSubmenuItems: () => string | Array<ContextMenuContents>;
718
+ }
719
+ type ContextMenuContents = string | ContextMenuItem | SeparatorMenuItemSpec | ContextSubMenu;
720
+ interface ContextMenuApi {
721
+ update: (element: Element) => string | Array<ContextMenuContents>;
722
+ }
723
+ interface FancyActionArgsMap {
724
+ 'inserttable': {
725
+ numRows: number;
726
+ numColumns: number;
727
+ };
728
+ 'colorswatch': {
729
+ value: string;
730
+ };
731
+ }
732
+ interface BaseFancyMenuItemSpec<T extends keyof FancyActionArgsMap> {
733
+ type: 'fancymenuitem';
734
+ fancytype: T;
735
+ initData?: Record<string, unknown>;
736
+ onAction?: (data: FancyActionArgsMap[T]) => void;
737
+ }
738
+ interface InsertTableMenuItemSpec extends BaseFancyMenuItemSpec<'inserttable'> {
739
+ fancytype: 'inserttable';
740
+ initData?: {};
741
+ }
742
+ interface ColorSwatchMenuItemSpec extends BaseFancyMenuItemSpec<'colorswatch'> {
743
+ fancytype: 'colorswatch';
744
+ select?: (value: string) => boolean;
745
+ initData?: {
746
+ allowCustomColors?: boolean;
747
+ colors?: ChoiceMenuItemSpec[];
748
+ storageKey?: string;
749
+ };
750
+ }
751
+ type FancyMenuItemSpec = InsertTableMenuItemSpec | ColorSwatchMenuItemSpec;
752
+ interface MenuItemSpec extends CommonMenuItemSpec {
753
+ type?: 'menuitem';
754
+ icon?: string;
755
+ onSetup?: (api: MenuItemInstanceApi) => (api: MenuItemInstanceApi) => void;
756
+ onAction?: (api: MenuItemInstanceApi) => void;
757
+ }
758
+ interface MenuItemInstanceApi extends CommonMenuItemInstanceApi {
759
+ }
760
+ interface SeparatorMenuItemSpec {
761
+ type?: 'separator';
762
+ text?: string;
763
+ }
764
+ interface ToggleMenuItemSpec extends CommonMenuItemSpec {
765
+ type?: 'togglemenuitem';
766
+ icon?: string;
767
+ active?: boolean;
768
+ onSetup?: (api: ToggleMenuItemInstanceApi) => void;
769
+ onAction: (api: ToggleMenuItemInstanceApi) => void;
770
+ }
771
+ interface ToggleMenuItemInstanceApi extends CommonMenuItemInstanceApi {
772
+ isActive: () => boolean;
773
+ setActive: (state: boolean) => void;
774
+ }
775
+ type NestedMenuItemContents = string | MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec | SeparatorMenuItemSpec | FancyMenuItemSpec;
776
+ interface NestedMenuItemSpec extends CommonMenuItemSpec {
777
+ type?: 'nestedmenuitem';
778
+ icon?: string;
779
+ getSubmenuItems: () => string | Array<NestedMenuItemContents>;
780
+ onSetup?: (api: NestedMenuItemInstanceApi) => (api: NestedMenuItemInstanceApi) => void;
781
+ }
782
+ interface NestedMenuItemInstanceApi extends CommonMenuItemInstanceApi {
783
+ setTooltip: (tooltip: string) => void;
784
+ setIconFill: (id: string, value: string) => void;
785
+ }
786
+ type MenuButtonItemTypes = NestedMenuItemContents;
787
+ type SuccessCallback$1 = (menu: string | MenuButtonItemTypes[]) => void;
788
+ interface MenuButtonFetchContext {
789
+ pattern: string;
790
+ }
791
+ interface BaseMenuButtonSpec {
792
+ text?: string;
793
+ tooltip?: string;
794
+ icon?: string;
795
+ search?: boolean | {
796
+ placeholder?: string;
797
+ };
798
+ fetch: (success: SuccessCallback$1, fetchContext: MenuButtonFetchContext, api: BaseMenuButtonInstanceApi) => void;
799
+ onSetup?: (api: BaseMenuButtonInstanceApi) => (api: BaseMenuButtonInstanceApi) => void;
800
+ }
801
+ interface BaseMenuButtonInstanceApi {
802
+ isEnabled: () => boolean;
803
+ setEnabled: (state: boolean) => void;
804
+ isActive: () => boolean;
805
+ setActive: (state: boolean) => void;
806
+ setText: (text: string) => void;
807
+ setIcon: (icon: string) => void;
808
+ }
809
+ interface ToolbarMenuButtonSpec extends BaseMenuButtonSpec {
810
+ type?: 'menubutton';
811
+ onSetup?: (api: ToolbarMenuButtonInstanceApi) => (api: ToolbarMenuButtonInstanceApi) => void;
812
+ }
813
+ interface ToolbarMenuButtonInstanceApi extends BaseMenuButtonInstanceApi {
814
+ }
815
+ type ToolbarSplitButtonItemTypes = ChoiceMenuItemSpec | SeparatorMenuItemSpec;
816
+ type SuccessCallback = (menu: ToolbarSplitButtonItemTypes[]) => void;
817
+ type SelectPredicate = (value: string) => boolean;
818
+ type PresetTypes = 'color' | 'normal' | 'listpreview';
819
+ type ColumnTypes$1 = number | 'auto';
820
+ interface ToolbarSplitButtonSpec {
821
+ type?: 'splitbutton';
822
+ tooltip?: string;
823
+ icon?: string;
824
+ text?: string;
825
+ select?: SelectPredicate;
826
+ presets?: PresetTypes;
827
+ columns?: ColumnTypes$1;
828
+ fetch: (success: SuccessCallback) => void;
829
+ onSetup?: (api: ToolbarSplitButtonInstanceApi) => (api: ToolbarSplitButtonInstanceApi) => void;
830
+ onAction: (api: ToolbarSplitButtonInstanceApi) => void;
831
+ onItemAction: (api: ToolbarSplitButtonInstanceApi, value: string) => void;
832
+ }
833
+ interface ToolbarSplitButtonInstanceApi {
834
+ isEnabled: () => boolean;
835
+ setEnabled: (state: boolean) => void;
836
+ setIconFill: (id: string, value: string) => void;
837
+ isActive: () => boolean;
838
+ setActive: (state: boolean) => void;
839
+ setTooltip: (tooltip: string) => void;
840
+ setText: (text: string) => void;
841
+ setIcon: (icon: string) => void;
842
+ }
843
+ interface BaseToolbarToggleButtonSpec<I extends BaseToolbarButtonInstanceApi> extends BaseToolbarButtonSpec<I> {
844
+ active?: boolean;
845
+ }
846
+ interface BaseToolbarToggleButtonInstanceApi extends BaseToolbarButtonInstanceApi {
847
+ isActive: () => boolean;
848
+ setActive: (state: boolean) => void;
849
+ }
850
+ interface ToolbarToggleButtonSpec extends BaseToolbarToggleButtonSpec<ToolbarToggleButtonInstanceApi> {
851
+ type?: 'togglebutton';
852
+ onAction: (api: ToolbarToggleButtonInstanceApi) => void;
853
+ }
854
+ interface ToolbarToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
855
+ }
856
+ type Id = string;
857
+ interface TreeSpec {
858
+ type: 'tree';
859
+ items: TreeItemSpec[];
860
+ onLeafAction?: (id: Id) => void;
861
+ defaultExpandedIds?: Id[];
862
+ onToggleExpand?: (expandedIds: Id[], { expanded, node }: {
863
+ expanded: boolean;
864
+ node: Id;
865
+ }) => void;
866
+ defaultSelectedId?: Id;
867
+ }
868
+ interface BaseTreeItemSpec {
869
+ title: string;
870
+ id: Id;
871
+ menu?: ToolbarMenuButtonSpec;
872
+ }
873
+ interface DirectorySpec extends BaseTreeItemSpec {
874
+ type: 'directory';
875
+ children: TreeItemSpec[];
876
+ }
877
+ interface LeafSpec extends BaseTreeItemSpec {
878
+ type: 'leaf';
879
+ }
880
+ type TreeItemSpec = DirectorySpec | LeafSpec;
881
+ interface UrlInputSpec extends FormComponentWithLabelSpec {
882
+ type: 'urlinput';
883
+ filetype?: 'image' | 'media' | 'file';
884
+ enabled?: boolean;
885
+ picker_text?: string;
886
+ }
887
+ interface UrlInputData {
888
+ value: string;
889
+ meta: {
890
+ text?: string;
891
+ };
892
+ }
893
+ type BodyComponentSpec = BarSpec | ButtonSpec | CheckboxSpec | TextAreaSpec | InputSpec | ListBoxSpec | SelectBoxSpec | SizeInputSpec | SliderSpec | IframeSpec | HtmlPanelSpec | UrlInputSpec | DropZoneSpec | ColorInputSpec | GridSpec | ColorPickerSpec | ImagePreviewSpec | AlertBannerSpec | CollectionSpec | LabelSpec | TableSpec | TreeSpec | PanelSpec | CustomEditorSpec;
894
+ interface BarSpec {
895
+ type: 'bar';
896
+ items: BodyComponentSpec[];
897
+ }
898
+ interface DialogToggleMenuItemSpec extends CommonMenuItemSpec {
899
+ type?: 'togglemenuitem';
900
+ name: string;
901
+ }
902
+ type DialogFooterMenuButtonItemSpec = DialogToggleMenuItemSpec;
903
+ interface BaseDialogFooterButtonSpec {
904
+ name?: string;
905
+ align?: 'start' | 'end';
906
+ primary?: boolean;
907
+ enabled?: boolean;
908
+ icon?: string;
909
+ buttonType?: 'primary' | 'secondary';
910
+ }
911
+ interface DialogFooterNormalButtonSpec extends BaseDialogFooterButtonSpec {
912
+ type: 'submit' | 'cancel' | 'custom';
913
+ text: string;
914
+ }
915
+ interface DialogFooterMenuButtonSpec extends BaseDialogFooterButtonSpec {
916
+ type: 'menu';
917
+ text?: string;
918
+ tooltip?: string;
919
+ icon?: string;
920
+ items: DialogFooterMenuButtonItemSpec[];
921
+ }
922
+ interface DialogFooterToggleButtonSpec extends BaseDialogFooterButtonSpec {
923
+ type: 'togglebutton';
924
+ tooltip?: string;
925
+ icon?: string;
926
+ text?: string;
927
+ active?: boolean;
928
+ }
929
+ type DialogFooterButtonSpec = DialogFooterNormalButtonSpec | DialogFooterMenuButtonSpec | DialogFooterToggleButtonSpec;
930
+ interface TabSpec {
931
+ name?: string;
932
+ title: string;
933
+ items: BodyComponentSpec[];
934
+ }
935
+ interface TabPanelSpec {
936
+ type: 'tabpanel';
937
+ tabs: TabSpec[];
938
+ }
939
+ type DialogDataItem = any;
940
+ type DialogData = Record<string, DialogDataItem>;
941
+ interface DialogInstanceApi<T extends DialogData> {
942
+ getData: () => T;
943
+ setData: (data: Partial<T>) => void;
944
+ setEnabled: (name: string, state: boolean) => void;
945
+ focus: (name: string) => void;
946
+ showTab: (name: string) => void;
947
+ redial: (nu: DialogSpec<T>) => void;
948
+ block: (msg: string) => void;
949
+ unblock: () => void;
950
+ toggleFullscreen: () => void;
951
+ close: () => void;
952
+ }
953
+ interface DialogActionDetails {
954
+ name: string;
955
+ value?: any;
956
+ }
957
+ interface DialogChangeDetails<T> {
958
+ name: keyof T;
959
+ }
960
+ interface DialogTabChangeDetails {
961
+ newTabName: string;
962
+ oldTabName: string;
963
+ }
964
+ type DialogActionHandler<T extends DialogData> = (api: DialogInstanceApi<T>, details: DialogActionDetails) => void;
965
+ type DialogChangeHandler<T extends DialogData> = (api: DialogInstanceApi<T>, details: DialogChangeDetails<T>) => void;
966
+ type DialogSubmitHandler<T extends DialogData> = (api: DialogInstanceApi<T>) => void;
967
+ type DialogCloseHandler = () => void;
968
+ type DialogCancelHandler<T extends DialogData> = (api: DialogInstanceApi<T>) => void;
969
+ type DialogTabChangeHandler<T extends DialogData> = (api: DialogInstanceApi<T>, details: DialogTabChangeDetails) => void;
970
+ type DialogSize = 'normal' | 'medium' | 'large';
971
+ interface DialogSpec<T extends DialogData> {
972
+ title: string;
973
+ size?: DialogSize;
974
+ body: TabPanelSpec | PanelSpec;
975
+ buttons?: DialogFooterButtonSpec[];
976
+ initialData?: Partial<T>;
977
+ onAction?: DialogActionHandler<T>;
978
+ onChange?: DialogChangeHandler<T>;
979
+ onSubmit?: DialogSubmitHandler<T>;
980
+ onClose?: DialogCloseHandler;
981
+ onCancel?: DialogCancelHandler<T>;
982
+ onTabChange?: DialogTabChangeHandler<T>;
983
+ }
984
+ interface UrlDialogInstanceApi {
985
+ block: (msg: string) => void;
986
+ unblock: () => void;
987
+ close: () => void;
988
+ sendMessage: (msg: any) => void;
989
+ }
990
+ interface UrlDialogActionDetails {
991
+ name: string;
992
+ value?: any;
993
+ }
994
+ interface UrlDialogMessage {
995
+ mceAction: string;
996
+ [key: string]: any;
997
+ }
998
+ type UrlDialogActionHandler = (api: UrlDialogInstanceApi, actions: UrlDialogActionDetails) => void;
999
+ type UrlDialogCloseHandler = () => void;
1000
+ type UrlDialogCancelHandler = (api: UrlDialogInstanceApi) => void;
1001
+ type UrlDialogMessageHandler = (api: UrlDialogInstanceApi, message: UrlDialogMessage) => void;
1002
+ interface UrlDialogFooterButtonSpec extends DialogFooterNormalButtonSpec {
1003
+ type: 'cancel' | 'custom';
1004
+ }
1005
+ interface UrlDialogSpec {
1006
+ title: string;
1007
+ url: string;
1008
+ height?: number;
1009
+ width?: number;
1010
+ buttons?: UrlDialogFooterButtonSpec[];
1011
+ onAction?: UrlDialogActionHandler;
1012
+ onClose?: UrlDialogCloseHandler;
1013
+ onCancel?: UrlDialogCancelHandler;
1014
+ onMessage?: UrlDialogMessageHandler;
1015
+ }
1016
+ type ColumnTypes = number | 'auto';
1017
+ type SeparatorItemSpec = SeparatorMenuItemSpec;
1018
+ interface AutocompleterItemSpec {
1019
+ type?: 'autocompleteitem';
1020
+ value: string;
1021
+ text?: string;
1022
+ icon?: string;
1023
+ meta?: Record<string, any>;
1024
+ }
1025
+ type AutocompleterContents = SeparatorItemSpec | AutocompleterItemSpec | CardMenuItemSpec;
1026
+ interface AutocompleterSpec {
1027
+ type?: 'autocompleter';
1028
+ ch?: string;
1029
+ trigger?: string;
1030
+ minChars?: number;
1031
+ columns?: ColumnTypes;
1032
+ matches?: (rng: Range, text: string, pattern: string) => boolean;
1033
+ fetch: (pattern: string, maxResults: number, fetchOptions: Record<string, any>) => Promise<AutocompleterContents[]>;
1034
+ onAction: (autocompleterApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
1035
+ maxResults?: number;
1036
+ highlightOn?: string[];
1037
+ }
1038
+ interface AutocompleterInstanceApi {
1039
+ hide: () => void;
1040
+ reload: (fetchOptions: Record<string, any>) => void;
1041
+ }
1042
+ type ContextPosition = 'node' | 'selection' | 'line';
1043
+ type ContextScope = 'node' | 'editor';
1044
+ interface ContextBarSpec {
1045
+ predicate?: (elem: Element) => boolean;
1046
+ position?: ContextPosition;
1047
+ scope?: ContextScope;
1048
+ }
1049
+ interface ContextFormLaunchButtonApi extends BaseToolbarButtonSpec<BaseToolbarButtonInstanceApi> {
1050
+ type: 'contextformbutton';
1051
+ }
1052
+ interface ContextFormLaunchToggleButtonSpec extends BaseToolbarToggleButtonSpec<BaseToolbarToggleButtonInstanceApi> {
1053
+ type: 'contextformtogglebutton';
1054
+ }
1055
+ interface ContextFormButtonInstanceApi extends BaseToolbarButtonInstanceApi {
1056
+ }
1057
+ interface ContextFormToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
1058
+ }
1059
+ interface ContextFormButtonSpec extends BaseToolbarButtonSpec<ContextFormButtonInstanceApi> {
1060
+ type?: 'contextformbutton';
1061
+ primary?: boolean;
1062
+ onAction: (formApi: ContextFormInstanceApi, api: ContextFormButtonInstanceApi) => void;
1063
+ }
1064
+ interface ContextFormToggleButtonSpec extends BaseToolbarToggleButtonSpec<ContextFormToggleButtonInstanceApi> {
1065
+ type?: 'contextformtogglebutton';
1066
+ onAction: (formApi: ContextFormInstanceApi, buttonApi: ContextFormToggleButtonInstanceApi) => void;
1067
+ primary?: boolean;
1068
+ }
1069
+ interface ContextFormInstanceApi {
1070
+ hide: () => void;
1071
+ getValue: () => string;
1072
+ }
1073
+ interface ContextFormSpec extends ContextBarSpec {
1074
+ type?: 'contextform';
1075
+ initValue?: () => string;
1076
+ label?: string;
1077
+ launch?: ContextFormLaunchButtonApi | ContextFormLaunchToggleButtonSpec;
1078
+ commands: Array<ContextFormToggleButtonSpec | ContextFormButtonSpec>;
1079
+ }
1080
+ interface ContextToolbarSpec extends ContextBarSpec {
1081
+ type?: 'contexttoolbar';
1082
+ items: string;
1083
+ }
1084
+ type PublicDialog_d_AlertBannerSpec = AlertBannerSpec;
1085
+ type PublicDialog_d_BarSpec = BarSpec;
1086
+ type PublicDialog_d_BodyComponentSpec = BodyComponentSpec;
1087
+ type PublicDialog_d_ButtonSpec = ButtonSpec;
1088
+ type PublicDialog_d_CheckboxSpec = CheckboxSpec;
1089
+ type PublicDialog_d_CollectionItem = CollectionItem;
1090
+ type PublicDialog_d_CollectionSpec = CollectionSpec;
1091
+ type PublicDialog_d_ColorInputSpec = ColorInputSpec;
1092
+ type PublicDialog_d_ColorPickerSpec = ColorPickerSpec;
1093
+ type PublicDialog_d_CustomEditorSpec = CustomEditorSpec;
1094
+ type PublicDialog_d_CustomEditorInit = CustomEditorInit;
1095
+ type PublicDialog_d_CustomEditorInitFn = CustomEditorInitFn;
1096
+ type PublicDialog_d_DialogData = DialogData;
1097
+ type PublicDialog_d_DialogSize = DialogSize;
1098
+ type PublicDialog_d_DialogSpec<T extends DialogData> = DialogSpec<T>;
1099
+ type PublicDialog_d_DialogInstanceApi<T extends DialogData> = DialogInstanceApi<T>;
1100
+ type PublicDialog_d_DialogFooterButtonSpec = DialogFooterButtonSpec;
1101
+ type PublicDialog_d_DialogActionDetails = DialogActionDetails;
1102
+ type PublicDialog_d_DialogChangeDetails<T> = DialogChangeDetails<T>;
1103
+ type PublicDialog_d_DialogTabChangeDetails = DialogTabChangeDetails;
1104
+ type PublicDialog_d_DropZoneSpec = DropZoneSpec;
1105
+ type PublicDialog_d_GridSpec = GridSpec;
1106
+ type PublicDialog_d_HtmlPanelSpec = HtmlPanelSpec;
1107
+ type PublicDialog_d_IframeSpec = IframeSpec;
1108
+ type PublicDialog_d_ImagePreviewSpec = ImagePreviewSpec;
1109
+ type PublicDialog_d_InputSpec = InputSpec;
1110
+ type PublicDialog_d_LabelSpec = LabelSpec;
1111
+ type PublicDialog_d_ListBoxSpec = ListBoxSpec;
1112
+ type PublicDialog_d_ListBoxItemSpec = ListBoxItemSpec;
1113
+ type PublicDialog_d_ListBoxNestedItemSpec = ListBoxNestedItemSpec;
1114
+ type PublicDialog_d_ListBoxSingleItemSpec = ListBoxSingleItemSpec;
1115
+ type PublicDialog_d_PanelSpec = PanelSpec;
1116
+ type PublicDialog_d_SelectBoxSpec = SelectBoxSpec;
1117
+ type PublicDialog_d_SelectBoxItemSpec = SelectBoxItemSpec;
1118
+ type PublicDialog_d_SizeInputSpec = SizeInputSpec;
1119
+ type PublicDialog_d_SliderSpec = SliderSpec;
1120
+ type PublicDialog_d_TableSpec = TableSpec;
1121
+ type PublicDialog_d_TabSpec = TabSpec;
1122
+ type PublicDialog_d_TabPanelSpec = TabPanelSpec;
1123
+ type PublicDialog_d_TextAreaSpec = TextAreaSpec;
1124
+ type PublicDialog_d_TreeSpec = TreeSpec;
1125
+ type PublicDialog_d_TreeItemSpec = TreeItemSpec;
1126
+ type PublicDialog_d_UrlInputData = UrlInputData;
1127
+ type PublicDialog_d_UrlInputSpec = UrlInputSpec;
1128
+ type PublicDialog_d_UrlDialogSpec = UrlDialogSpec;
1129
+ type PublicDialog_d_UrlDialogFooterButtonSpec = UrlDialogFooterButtonSpec;
1130
+ type PublicDialog_d_UrlDialogInstanceApi = UrlDialogInstanceApi;
1131
+ type PublicDialog_d_UrlDialogActionDetails = UrlDialogActionDetails;
1132
+ type PublicDialog_d_UrlDialogMessage = UrlDialogMessage;
1133
+ declare namespace PublicDialog_d {
1134
+ export { PublicDialog_d_AlertBannerSpec as AlertBannerSpec, PublicDialog_d_BarSpec as BarSpec, PublicDialog_d_BodyComponentSpec as BodyComponentSpec, PublicDialog_d_ButtonSpec as ButtonSpec, PublicDialog_d_CheckboxSpec as CheckboxSpec, PublicDialog_d_CollectionItem as CollectionItem, PublicDialog_d_CollectionSpec as CollectionSpec, PublicDialog_d_ColorInputSpec as ColorInputSpec, PublicDialog_d_ColorPickerSpec as ColorPickerSpec, PublicDialog_d_CustomEditorSpec as CustomEditorSpec, PublicDialog_d_CustomEditorInit as CustomEditorInit, PublicDialog_d_CustomEditorInitFn as CustomEditorInitFn, PublicDialog_d_DialogData as DialogData, PublicDialog_d_DialogSize as DialogSize, PublicDialog_d_DialogSpec as DialogSpec, PublicDialog_d_DialogInstanceApi as DialogInstanceApi, PublicDialog_d_DialogFooterButtonSpec as DialogFooterButtonSpec, PublicDialog_d_DialogActionDetails as DialogActionDetails, PublicDialog_d_DialogChangeDetails as DialogChangeDetails, PublicDialog_d_DialogTabChangeDetails as DialogTabChangeDetails, PublicDialog_d_DropZoneSpec as DropZoneSpec, PublicDialog_d_GridSpec as GridSpec, PublicDialog_d_HtmlPanelSpec as HtmlPanelSpec, PublicDialog_d_IframeSpec as IframeSpec, PublicDialog_d_ImagePreviewSpec as ImagePreviewSpec, PublicDialog_d_InputSpec as InputSpec, PublicDialog_d_LabelSpec as LabelSpec, PublicDialog_d_ListBoxSpec as ListBoxSpec, PublicDialog_d_ListBoxItemSpec as ListBoxItemSpec, PublicDialog_d_ListBoxNestedItemSpec as ListBoxNestedItemSpec, PublicDialog_d_ListBoxSingleItemSpec as ListBoxSingleItemSpec, PublicDialog_d_PanelSpec as PanelSpec, PublicDialog_d_SelectBoxSpec as SelectBoxSpec, PublicDialog_d_SelectBoxItemSpec as SelectBoxItemSpec, PublicDialog_d_SizeInputSpec as SizeInputSpec, PublicDialog_d_SliderSpec as SliderSpec, PublicDialog_d_TableSpec as TableSpec, PublicDialog_d_TabSpec as TabSpec, PublicDialog_d_TabPanelSpec as TabPanelSpec, PublicDialog_d_TextAreaSpec as TextAreaSpec, PublicDialog_d_TreeSpec as TreeSpec, PublicDialog_d_TreeItemSpec as TreeItemSpec, DirectorySpec as TreeDirectorySpec, LeafSpec as TreeLeafSpec, PublicDialog_d_UrlInputData as UrlInputData, PublicDialog_d_UrlInputSpec as UrlInputSpec, PublicDialog_d_UrlDialogSpec as UrlDialogSpec, PublicDialog_d_UrlDialogFooterButtonSpec as UrlDialogFooterButtonSpec, PublicDialog_d_UrlDialogInstanceApi as UrlDialogInstanceApi, PublicDialog_d_UrlDialogActionDetails as UrlDialogActionDetails, PublicDialog_d_UrlDialogMessage as UrlDialogMessage, };
1135
+ }
1136
+ type PublicInlineContent_d_AutocompleterSpec = AutocompleterSpec;
1137
+ type PublicInlineContent_d_AutocompleterItemSpec = AutocompleterItemSpec;
1138
+ type PublicInlineContent_d_AutocompleterContents = AutocompleterContents;
1139
+ type PublicInlineContent_d_AutocompleterInstanceApi = AutocompleterInstanceApi;
1140
+ type PublicInlineContent_d_ContextPosition = ContextPosition;
1141
+ type PublicInlineContent_d_ContextScope = ContextScope;
1142
+ type PublicInlineContent_d_ContextFormSpec = ContextFormSpec;
1143
+ type PublicInlineContent_d_ContextFormInstanceApi = ContextFormInstanceApi;
1144
+ type PublicInlineContent_d_ContextFormButtonSpec = ContextFormButtonSpec;
1145
+ type PublicInlineContent_d_ContextFormButtonInstanceApi = ContextFormButtonInstanceApi;
1146
+ type PublicInlineContent_d_ContextFormToggleButtonSpec = ContextFormToggleButtonSpec;
1147
+ type PublicInlineContent_d_ContextFormToggleButtonInstanceApi = ContextFormToggleButtonInstanceApi;
1148
+ type PublicInlineContent_d_ContextToolbarSpec = ContextToolbarSpec;
1149
+ type PublicInlineContent_d_SeparatorItemSpec = SeparatorItemSpec;
1150
+ declare namespace PublicInlineContent_d {
1151
+ export { PublicInlineContent_d_AutocompleterSpec as AutocompleterSpec, PublicInlineContent_d_AutocompleterItemSpec as AutocompleterItemSpec, PublicInlineContent_d_AutocompleterContents as AutocompleterContents, PublicInlineContent_d_AutocompleterInstanceApi as AutocompleterInstanceApi, PublicInlineContent_d_ContextPosition as ContextPosition, PublicInlineContent_d_ContextScope as ContextScope, PublicInlineContent_d_ContextFormSpec as ContextFormSpec, PublicInlineContent_d_ContextFormInstanceApi as ContextFormInstanceApi, PublicInlineContent_d_ContextFormButtonSpec as ContextFormButtonSpec, PublicInlineContent_d_ContextFormButtonInstanceApi as ContextFormButtonInstanceApi, PublicInlineContent_d_ContextFormToggleButtonSpec as ContextFormToggleButtonSpec, PublicInlineContent_d_ContextFormToggleButtonInstanceApi as ContextFormToggleButtonInstanceApi, PublicInlineContent_d_ContextToolbarSpec as ContextToolbarSpec, PublicInlineContent_d_SeparatorItemSpec as SeparatorItemSpec, };
1152
+ }
1153
+ type PublicMenu_d_MenuItemSpec = MenuItemSpec;
1154
+ type PublicMenu_d_MenuItemInstanceApi = MenuItemInstanceApi;
1155
+ type PublicMenu_d_NestedMenuItemContents = NestedMenuItemContents;
1156
+ type PublicMenu_d_NestedMenuItemSpec = NestedMenuItemSpec;
1157
+ type PublicMenu_d_NestedMenuItemInstanceApi = NestedMenuItemInstanceApi;
1158
+ type PublicMenu_d_FancyMenuItemSpec = FancyMenuItemSpec;
1159
+ type PublicMenu_d_ColorSwatchMenuItemSpec = ColorSwatchMenuItemSpec;
1160
+ type PublicMenu_d_InsertTableMenuItemSpec = InsertTableMenuItemSpec;
1161
+ type PublicMenu_d_ToggleMenuItemSpec = ToggleMenuItemSpec;
1162
+ type PublicMenu_d_ToggleMenuItemInstanceApi = ToggleMenuItemInstanceApi;
1163
+ type PublicMenu_d_ChoiceMenuItemSpec = ChoiceMenuItemSpec;
1164
+ type PublicMenu_d_ChoiceMenuItemInstanceApi = ChoiceMenuItemInstanceApi;
1165
+ type PublicMenu_d_SeparatorMenuItemSpec = SeparatorMenuItemSpec;
1166
+ type PublicMenu_d_ContextMenuApi = ContextMenuApi;
1167
+ type PublicMenu_d_ContextMenuContents = ContextMenuContents;
1168
+ type PublicMenu_d_ContextMenuItem = ContextMenuItem;
1169
+ type PublicMenu_d_ContextSubMenu = ContextSubMenu;
1170
+ type PublicMenu_d_CardMenuItemSpec = CardMenuItemSpec;
1171
+ type PublicMenu_d_CardMenuItemInstanceApi = CardMenuItemInstanceApi;
1172
+ type PublicMenu_d_CardItemSpec = CardItemSpec;
1173
+ type PublicMenu_d_CardContainerSpec = CardContainerSpec;
1174
+ type PublicMenu_d_CardImageSpec = CardImageSpec;
1175
+ type PublicMenu_d_CardTextSpec = CardTextSpec;
1176
+ declare namespace PublicMenu_d {
1177
+ export { PublicMenu_d_MenuItemSpec as MenuItemSpec, PublicMenu_d_MenuItemInstanceApi as MenuItemInstanceApi, PublicMenu_d_NestedMenuItemContents as NestedMenuItemContents, PublicMenu_d_NestedMenuItemSpec as NestedMenuItemSpec, PublicMenu_d_NestedMenuItemInstanceApi as NestedMenuItemInstanceApi, PublicMenu_d_FancyMenuItemSpec as FancyMenuItemSpec, PublicMenu_d_ColorSwatchMenuItemSpec as ColorSwatchMenuItemSpec, PublicMenu_d_InsertTableMenuItemSpec as InsertTableMenuItemSpec, PublicMenu_d_ToggleMenuItemSpec as ToggleMenuItemSpec, PublicMenu_d_ToggleMenuItemInstanceApi as ToggleMenuItemInstanceApi, PublicMenu_d_ChoiceMenuItemSpec as ChoiceMenuItemSpec, PublicMenu_d_ChoiceMenuItemInstanceApi as ChoiceMenuItemInstanceApi, PublicMenu_d_SeparatorMenuItemSpec as SeparatorMenuItemSpec, PublicMenu_d_ContextMenuApi as ContextMenuApi, PublicMenu_d_ContextMenuContents as ContextMenuContents, PublicMenu_d_ContextMenuItem as ContextMenuItem, PublicMenu_d_ContextSubMenu as ContextSubMenu, PublicMenu_d_CardMenuItemSpec as CardMenuItemSpec, PublicMenu_d_CardMenuItemInstanceApi as CardMenuItemInstanceApi, PublicMenu_d_CardItemSpec as CardItemSpec, PublicMenu_d_CardContainerSpec as CardContainerSpec, PublicMenu_d_CardImageSpec as CardImageSpec, PublicMenu_d_CardTextSpec as CardTextSpec, };
1178
+ }
1179
+ interface SidebarInstanceApi {
1180
+ element: () => HTMLElement;
1181
+ }
1182
+ interface SidebarSpec {
1183
+ icon?: string;
1184
+ tooltip?: string;
1185
+ onShow?: (api: SidebarInstanceApi) => void;
1186
+ onSetup?: (api: SidebarInstanceApi) => (api: SidebarInstanceApi) => void;
1187
+ onHide?: (api: SidebarInstanceApi) => void;
1188
+ }
1189
+ type PublicSidebar_d_SidebarSpec = SidebarSpec;
1190
+ type PublicSidebar_d_SidebarInstanceApi = SidebarInstanceApi;
1191
+ declare namespace PublicSidebar_d {
1192
+ export { PublicSidebar_d_SidebarSpec as SidebarSpec, PublicSidebar_d_SidebarInstanceApi as SidebarInstanceApi, };
1193
+ }
1194
+ type PublicToolbar_d_ToolbarButtonSpec = ToolbarButtonSpec;
1195
+ type PublicToolbar_d_ToolbarButtonInstanceApi = ToolbarButtonInstanceApi;
1196
+ type PublicToolbar_d_ToolbarSplitButtonSpec = ToolbarSplitButtonSpec;
1197
+ type PublicToolbar_d_ToolbarSplitButtonInstanceApi = ToolbarSplitButtonInstanceApi;
1198
+ type PublicToolbar_d_ToolbarMenuButtonSpec = ToolbarMenuButtonSpec;
1199
+ type PublicToolbar_d_ToolbarMenuButtonInstanceApi = ToolbarMenuButtonInstanceApi;
1200
+ type PublicToolbar_d_ToolbarToggleButtonSpec = ToolbarToggleButtonSpec;
1201
+ type PublicToolbar_d_ToolbarToggleButtonInstanceApi = ToolbarToggleButtonInstanceApi;
1202
+ type PublicToolbar_d_GroupToolbarButtonSpec = GroupToolbarButtonSpec;
1203
+ type PublicToolbar_d_GroupToolbarButtonInstanceApi = GroupToolbarButtonInstanceApi;
1204
+ declare namespace PublicToolbar_d {
1205
+ export { PublicToolbar_d_ToolbarButtonSpec as ToolbarButtonSpec, PublicToolbar_d_ToolbarButtonInstanceApi as ToolbarButtonInstanceApi, PublicToolbar_d_ToolbarSplitButtonSpec as ToolbarSplitButtonSpec, PublicToolbar_d_ToolbarSplitButtonInstanceApi as ToolbarSplitButtonInstanceApi, PublicToolbar_d_ToolbarMenuButtonSpec as ToolbarMenuButtonSpec, PublicToolbar_d_ToolbarMenuButtonInstanceApi as ToolbarMenuButtonInstanceApi, PublicToolbar_d_ToolbarToggleButtonSpec as ToolbarToggleButtonSpec, PublicToolbar_d_ToolbarToggleButtonInstanceApi as ToolbarToggleButtonInstanceApi, PublicToolbar_d_GroupToolbarButtonSpec as GroupToolbarButtonSpec, PublicToolbar_d_GroupToolbarButtonInstanceApi as GroupToolbarButtonInstanceApi, };
1206
+ }
1207
+ interface ViewButtonApi {
1208
+ setIcon: (newIcon: string) => void;
1209
+ }
1210
+ interface ViewToggleButtonApi extends ViewButtonApi {
1211
+ isActive: () => boolean;
1212
+ setActive: (state: boolean) => void;
1213
+ }
1214
+ interface BaseButtonSpec<Api extends ViewButtonApi> {
1215
+ text?: string;
1216
+ icon?: string;
1217
+ tooltip?: string;
1218
+ buttonType?: 'primary' | 'secondary';
1219
+ borderless?: boolean;
1220
+ onAction: (api: Api) => void;
1221
+ }
1222
+ interface ViewNormalButtonSpec extends BaseButtonSpec<ViewButtonApi> {
1223
+ text: string;
1224
+ type: 'button';
1225
+ }
1226
+ interface ViewToggleButtonSpec extends BaseButtonSpec<ViewToggleButtonApi> {
1227
+ type: 'togglebutton';
1228
+ active?: boolean;
1229
+ onAction: (api: ViewToggleButtonApi) => void;
1230
+ }
1231
+ interface ViewButtonsGroupSpec {
1232
+ type: 'group';
1233
+ buttons: Array<ViewNormalButtonSpec | ViewToggleButtonSpec>;
1234
+ }
1235
+ type ViewButtonSpec = ViewNormalButtonSpec | ViewToggleButtonSpec | ViewButtonsGroupSpec;
1236
+ interface ViewInstanceApi {
1237
+ getContainer: () => HTMLElement;
1238
+ }
1239
+ interface ViewSpec {
1240
+ buttons?: ViewButtonSpec[];
1241
+ onShow: (api: ViewInstanceApi) => void;
1242
+ onHide: (api: ViewInstanceApi) => void;
1243
+ }
1244
+ type PublicView_d_ViewSpec = ViewSpec;
1245
+ type PublicView_d_ViewInstanceApi = ViewInstanceApi;
1246
+ declare namespace PublicView_d {
1247
+ export { PublicView_d_ViewSpec as ViewSpec, PublicView_d_ViewInstanceApi as ViewInstanceApi, };
1248
+ }
1249
+ interface Registry$1 {
1250
+ addButton: (name: string, spec: ToolbarButtonSpec) => void;
1251
+ addGroupToolbarButton: (name: string, spec: GroupToolbarButtonSpec) => void;
1252
+ addToggleButton: (name: string, spec: ToolbarToggleButtonSpec) => void;
1253
+ addMenuButton: (name: string, spec: ToolbarMenuButtonSpec) => void;
1254
+ addSplitButton: (name: string, spec: ToolbarSplitButtonSpec) => void;
1255
+ addMenuItem: (name: string, spec: MenuItemSpec) => void;
1256
+ addNestedMenuItem: (name: string, spec: NestedMenuItemSpec) => void;
1257
+ addToggleMenuItem: (name: string, spec: ToggleMenuItemSpec) => void;
1258
+ addContextMenu: (name: string, spec: ContextMenuApi) => void;
1259
+ addContextToolbar: (name: string, spec: ContextToolbarSpec) => void;
1260
+ addContextForm: (name: string, spec: ContextFormSpec) => void;
1261
+ addIcon: (name: string, svgData: string) => void;
1262
+ addAutocompleter: (name: string, spec: AutocompleterSpec) => void;
1263
+ addSidebar: (name: string, spec: SidebarSpec) => void;
1264
+ addView: (name: string, spec: ViewSpec) => void;
1265
+ getAll: () => {
1266
+ buttons: Record<string, ToolbarButtonSpec | GroupToolbarButtonSpec | ToolbarMenuButtonSpec | ToolbarSplitButtonSpec | ToolbarToggleButtonSpec>;
1267
+ menuItems: Record<string, MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec>;
1268
+ popups: Record<string, AutocompleterSpec>;
1269
+ contextMenus: Record<string, ContextMenuApi>;
1270
+ contextToolbars: Record<string, ContextToolbarSpec | ContextFormSpec>;
1271
+ icons: Record<string, string>;
1272
+ sidebars: Record<string, SidebarSpec>;
1273
+ views: Record<string, ViewSpec>;
1274
+ };
1275
+ }
1276
+ interface AutocompleteLookupData {
1277
+ readonly matchText: string;
1278
+ readonly items: AutocompleterContents[];
1279
+ readonly columns: ColumnTypes;
1280
+ readonly onAction: (autoApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
1281
+ readonly highlightOn: string[];
1282
+ }
1283
+ interface AutocompleterEventArgs {
1284
+ readonly lookupData: AutocompleteLookupData[];
1285
+ }
1286
+ interface RangeLikeObject {
1287
+ startContainer: Node;
1288
+ startOffset: number;
1289
+ endContainer: Node;
1290
+ endOffset: number;
1291
+ }
1292
+ type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
1293
+ type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
1294
+ type Format = ApplyFormat | RemoveFormat;
1295
+ type Formats = Record<string, Format | Format[]>;
1296
+ type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string | null);
1297
+ type FormatVars = Record<string, string | null>;
1298
+ interface BaseFormat<T> {
1299
+ ceFalseOverride?: boolean;
1300
+ classes?: string | string[];
1301
+ collapsed?: boolean;
1302
+ exact?: boolean;
1303
+ expand?: boolean;
1304
+ links?: boolean;
1305
+ mixed?: boolean;
1306
+ block_expand?: boolean;
1307
+ onmatch?: (node: Element, fmt: T, itemName: string) => boolean;
1308
+ remove?: 'none' | 'empty' | 'all';
1309
+ remove_similar?: boolean;
1310
+ split?: boolean;
1311
+ deep?: boolean;
1312
+ preserve_attributes?: string[];
1313
+ }
1314
+ interface Block {
1315
+ block: string;
1316
+ list_block?: string;
1317
+ wrapper?: boolean;
1318
+ }
1319
+ interface Inline {
1320
+ inline: string;
1321
+ }
1322
+ interface Selector {
1323
+ selector: string;
1324
+ inherit?: boolean;
1325
+ }
1326
+ interface CommonFormat<T> extends BaseFormat<T> {
1327
+ attributes?: Record<string, FormatAttrOrStyleValue>;
1328
+ styles?: Record<string, FormatAttrOrStyleValue>;
1329
+ toggle?: boolean;
1330
+ preview?: string | false;
1331
+ onformat?: (elm: Element, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject | null) => void;
1332
+ clear_child_styles?: boolean;
1333
+ merge_siblings?: boolean;
1334
+ merge_with_parents?: boolean;
1335
+ }
1336
+ interface BlockFormat extends Block, CommonFormat<BlockFormat> {
1337
+ }
1338
+ interface InlineFormat extends Inline, CommonFormat<InlineFormat> {
1339
+ }
1340
+ interface SelectorFormat extends Selector, CommonFormat<SelectorFormat> {
1341
+ }
1342
+ interface CommonRemoveFormat<T> extends BaseFormat<T> {
1343
+ attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
1344
+ styles?: string[] | Record<string, FormatAttrOrStyleValue>;
1345
+ }
1346
+ interface RemoveBlockFormat extends Block, CommonRemoveFormat<RemoveBlockFormat> {
1347
+ }
1348
+ interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineFormat> {
1349
+ }
1350
+ interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
1351
+ }
1352
+ interface Filter<C extends Function> {
1353
+ name: string;
1354
+ callbacks: C[];
1355
+ }
1356
+ interface ParserArgs {
1357
+ getInner?: boolean | number;
1358
+ forced_root_block?: boolean | string;
1359
+ context?: string;
1360
+ isRootContent?: boolean;
1361
+ format?: string;
1362
+ invalid?: boolean;
1363
+ no_events?: boolean;
1364
+ [key: string]: any;
1365
+ }
1366
+ type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
1367
+ interface ParserFilter extends Filter<ParserFilterCallback> {
1368
+ }
1369
+ interface DomParserSettings {
1370
+ allow_html_data_urls?: boolean;
1371
+ allow_svg_data_urls?: boolean;
1372
+ allow_conditional_comments?: boolean;
1373
+ allow_html_in_named_anchor?: boolean;
1374
+ allow_script_urls?: boolean;
1375
+ allow_unsafe_link_target?: boolean;
1376
+ blob_cache?: BlobCache;
1377
+ convert_fonts_to_spans?: boolean;
1378
+ convert_unsafe_embeds?: boolean;
1379
+ document?: Document;
1380
+ fix_list_elements?: boolean;
1381
+ font_size_legacy_values?: string;
1382
+ forced_root_block?: boolean | string;
1383
+ forced_root_block_attrs?: Record<string, string>;
1384
+ inline_styles?: boolean;
1385
+ pad_empty_with_br?: boolean;
1386
+ preserve_cdata?: boolean;
1387
+ remove_trailing_brs?: boolean;
1388
+ root_name?: string;
1389
+ sandbox_iframes?: boolean;
1390
+ sanitize?: boolean;
1391
+ validate?: boolean;
1392
+ }
1393
+ interface DomParser {
1394
+ schema: Schema;
1395
+ addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
1396
+ getAttributeFilters: () => ParserFilter[];
1397
+ removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
1398
+ addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
1399
+ getNodeFilters: () => ParserFilter[];
1400
+ removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
1401
+ parse: (html: string, args?: ParserArgs) => AstNode;
1402
+ }
1403
+ interface StyleSheetLoaderSettings {
1404
+ maxLoadTime?: number;
1405
+ contentCssCors?: boolean;
1406
+ referrerPolicy?: ReferrerPolicy;
1407
+ }
1408
+ interface StyleSheetLoader {
1409
+ load: (url: string) => Promise<void>;
1410
+ loadRawCss: (key: string, css: string) => void;
1411
+ loadAll: (urls: string[]) => Promise<string[]>;
1412
+ unload: (url: string) => void;
1413
+ unloadRawCss: (key: string) => void;
1414
+ unloadAll: (urls: string[]) => void;
1415
+ _setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
1416
+ _setContentCssCors: (contentCssCors: boolean) => void;
1417
+ }
1418
+ type Registry = Registry$1;
1419
+ interface EditorUiApi {
1420
+ show: () => void;
1421
+ hide: () => void;
1422
+ setEnabled: (state: boolean) => void;
1423
+ isEnabled: () => boolean;
1424
+ }
1425
+ interface EditorUi extends EditorUiApi {
1426
+ registry: Registry;
1427
+ styleSheetLoader: StyleSheetLoader;
1428
+ }
1429
+ type Ui_d_Registry = Registry;
1430
+ type Ui_d_EditorUiApi = EditorUiApi;
1431
+ type Ui_d_EditorUi = EditorUi;
1432
+ declare namespace Ui_d {
1433
+ export { Ui_d_Registry as Registry, PublicDialog_d as Dialog, PublicInlineContent_d as InlineContent, PublicMenu_d as Menu, PublicView_d as View, PublicSidebar_d as Sidebar, PublicToolbar_d as Toolbar, Ui_d_EditorUiApi as EditorUiApi, Ui_d_EditorUi as EditorUi, };
1434
+ }
1435
+ interface WindowParams {
1436
+ readonly inline?: 'cursor' | 'toolbar' | 'bottom';
1437
+ readonly ariaAttrs?: boolean;
1438
+ readonly persistent?: boolean;
1439
+ }
1440
+ type InstanceApi<T extends DialogData> = UrlDialogInstanceApi | DialogInstanceApi<T>;
1441
+ interface WindowManagerImpl {
1442
+ open: <T extends DialogData>(config: DialogSpec<T>, params: WindowParams | undefined, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
1443
+ openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
1444
+ alert: (message: string, callback: () => void) => void;
1445
+ confirm: (message: string, callback: (state: boolean) => void) => void;
1446
+ close: (dialog: InstanceApi<any>) => void;
1447
+ }
1448
+ interface WindowManager {
1449
+ open: <T extends DialogData>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
1450
+ openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
1451
+ alert: (message: string, callback?: () => void, scope?: any) => void;
1452
+ confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
1453
+ close: () => void;
1454
+ }
1455
+ interface ExecCommandEvent {
1456
+ command: string;
1457
+ ui: boolean;
1458
+ value?: any;
1459
+ }
1460
+ interface BeforeGetContentEvent extends GetContentArgs {
1461
+ selection?: boolean;
1462
+ }
1463
+ interface GetContentEvent extends BeforeGetContentEvent {
1464
+ content: string;
1465
+ }
1466
+ interface BeforeSetContentEvent extends SetContentArgs {
1467
+ content: string;
1468
+ selection?: boolean;
1469
+ }
1470
+ interface SetContentEvent extends BeforeSetContentEvent {
1471
+ content: string;
1472
+ }
1473
+ interface SaveContentEvent extends GetContentEvent {
1474
+ save: boolean;
1475
+ }
1476
+ interface NewBlockEvent {
1477
+ newBlock: Element;
1478
+ }
1479
+ interface NodeChangeEvent {
1480
+ element: Element;
1481
+ parents: Node[];
1482
+ selectionChange?: boolean;
1483
+ initial?: boolean;
1484
+ }
1485
+ interface FormatEvent {
1486
+ format: string;
1487
+ vars?: FormatVars;
1488
+ node?: Node | RangeLikeObject | null;
1489
+ }
1490
+ interface ObjectResizeEvent {
1491
+ target: HTMLElement;
1492
+ width: number;
1493
+ height: number;
1494
+ origin: string;
1495
+ }
1496
+ interface ObjectSelectedEvent {
1497
+ target: Node;
1498
+ targetClone?: Node;
1499
+ }
1500
+ interface ScrollIntoViewEvent {
1501
+ elm: HTMLElement;
1502
+ alignToTop: boolean | undefined;
1503
+ }
1504
+ interface SetSelectionRangeEvent {
1505
+ range: Range;
1506
+ forward: boolean | undefined;
1507
+ }
1508
+ interface ShowCaretEvent {
1509
+ target: Node;
1510
+ direction: number;
1511
+ before: boolean;
1512
+ }
1513
+ interface SwitchModeEvent {
1514
+ mode: string;
1515
+ }
1516
+ interface ChangeEvent {
1517
+ level: UndoLevel;
1518
+ lastLevel: UndoLevel | undefined;
1519
+ }
1520
+ interface AddUndoEvent extends ChangeEvent {
1521
+ originalEvent: Event | undefined;
1522
+ }
1523
+ interface UndoRedoEvent {
1524
+ level: UndoLevel;
1525
+ }
1526
+ interface WindowEvent<T extends DialogData> {
1527
+ dialog: InstanceApi<T>;
1528
+ }
1529
+ interface ProgressStateEvent {
1530
+ state: boolean;
1531
+ time?: number;
1532
+ }
1533
+ interface AfterProgressStateEvent {
1534
+ state: boolean;
1535
+ }
1536
+ interface PlaceholderToggleEvent {
1537
+ state: boolean;
1538
+ }
1539
+ interface LoadErrorEvent {
1540
+ message: string;
1541
+ }
1542
+ interface PreProcessEvent extends ParserArgs {
1543
+ node: Element;
1544
+ }
1545
+ interface PostProcessEvent extends ParserArgs {
1546
+ content: string;
1547
+ }
1548
+ interface PastePlainTextToggleEvent {
1549
+ state: boolean;
1550
+ }
1551
+ interface PastePreProcessEvent {
1552
+ content: string;
1553
+ readonly internal: boolean;
1554
+ }
1555
+ interface PastePostProcessEvent {
1556
+ node: HTMLElement;
1557
+ readonly internal: boolean;
1558
+ }
1559
+ interface EditableRootStateChangeEvent {
1560
+ state: boolean;
1561
+ }
1562
+ interface NewTableRowEvent {
1563
+ node: HTMLTableRowElement;
1564
+ }
1565
+ interface NewTableCellEvent {
1566
+ node: HTMLTableCellElement;
1567
+ }
1568
+ interface TableEventData {
1569
+ readonly structure: boolean;
1570
+ readonly style: boolean;
1571
+ }
1572
+ interface TableModifiedEvent extends TableEventData {
1573
+ readonly table: HTMLTableElement;
1574
+ }
1575
+ interface BeforeOpenNotificationEvent {
1576
+ notification: NotificationSpec;
1577
+ }
1578
+ interface OpenNotificationEvent {
1579
+ notification: NotificationApi;
1580
+ }
1581
+ interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
1582
+ 'activate': {
1583
+ relatedTarget: Editor | null;
1584
+ };
1585
+ 'deactivate': {
1586
+ relatedTarget: Editor;
1587
+ };
1588
+ 'focus': {
1589
+ blurredEditor: Editor | null;
1590
+ };
1591
+ 'blur': {
1592
+ focusedEditor: Editor | null;
1593
+ };
1594
+ 'resize': UIEvent;
1595
+ 'scroll': UIEvent;
1596
+ 'input': InputEvent;
1597
+ 'beforeinput': InputEvent;
1598
+ 'detach': {};
1599
+ 'remove': {};
1600
+ 'init': {};
1601
+ 'ScrollIntoView': ScrollIntoViewEvent;
1602
+ 'AfterScrollIntoView': ScrollIntoViewEvent;
1603
+ 'ObjectResized': ObjectResizeEvent;
1604
+ 'ObjectResizeStart': ObjectResizeEvent;
1605
+ 'SwitchMode': SwitchModeEvent;
1606
+ 'ScrollWindow': Event;
1607
+ 'ResizeWindow': UIEvent;
1608
+ 'SkinLoaded': {};
1609
+ 'SkinLoadError': LoadErrorEvent;
1610
+ 'PluginLoadError': LoadErrorEvent;
1611
+ 'ModelLoadError': LoadErrorEvent;
1612
+ 'IconsLoadError': LoadErrorEvent;
1613
+ 'ThemeLoadError': LoadErrorEvent;
1614
+ 'LanguageLoadError': LoadErrorEvent;
1615
+ 'BeforeExecCommand': ExecCommandEvent;
1616
+ 'ExecCommand': ExecCommandEvent;
1617
+ 'NodeChange': NodeChangeEvent;
1618
+ 'FormatApply': FormatEvent;
1619
+ 'FormatRemove': FormatEvent;
1620
+ 'ShowCaret': ShowCaretEvent;
1621
+ 'SelectionChange': {};
1622
+ 'ObjectSelected': ObjectSelectedEvent;
1623
+ 'BeforeObjectSelected': ObjectSelectedEvent;
1624
+ 'GetSelectionRange': {
1625
+ range: Range;
1626
+ };
1627
+ 'SetSelectionRange': SetSelectionRangeEvent;
1628
+ 'AfterSetSelectionRange': SetSelectionRangeEvent;
1629
+ 'BeforeGetContent': BeforeGetContentEvent;
1630
+ 'GetContent': GetContentEvent;
1631
+ 'BeforeSetContent': BeforeSetContentEvent;
1632
+ 'SetContent': SetContentEvent;
1633
+ 'SaveContent': SaveContentEvent;
1634
+ 'RawSaveContent': SaveContentEvent;
1635
+ 'LoadContent': {
1636
+ load: boolean;
1637
+ element: HTMLElement;
1638
+ };
1639
+ 'PreviewFormats': {};
1640
+ 'AfterPreviewFormats': {};
1641
+ 'ScriptsLoaded': {};
1642
+ 'PreInit': {};
1643
+ 'PostRender': {};
1644
+ 'NewBlock': NewBlockEvent;
1645
+ 'ClearUndos': {};
1646
+ 'TypingUndo': {};
1647
+ 'Redo': UndoRedoEvent;
1648
+ 'Undo': UndoRedoEvent;
1649
+ 'BeforeAddUndo': AddUndoEvent;
1650
+ 'AddUndo': AddUndoEvent;
1651
+ 'change': ChangeEvent;
1652
+ 'CloseWindow': WindowEvent<any>;
1653
+ 'OpenWindow': WindowEvent<any>;
1654
+ 'ProgressState': ProgressStateEvent;
1655
+ 'AfterProgressState': AfterProgressStateEvent;
1656
+ 'PlaceholderToggle': PlaceholderToggleEvent;
1657
+ 'tap': TouchEvent;
1658
+ 'longpress': TouchEvent;
1659
+ 'longpresscancel': {};
1660
+ 'PreProcess': PreProcessEvent;
1661
+ 'PostProcess': PostProcessEvent;
1662
+ 'AutocompleterStart': AutocompleterEventArgs;
1663
+ 'AutocompleterUpdate': AutocompleterEventArgs;
1664
+ 'AutocompleterEnd': {};
1665
+ 'PastePlainTextToggle': PastePlainTextToggleEvent;
1666
+ 'PastePreProcess': PastePreProcessEvent;
1667
+ 'PastePostProcess': PastePostProcessEvent;
1668
+ 'TableModified': TableModifiedEvent;
1669
+ 'NewRow': NewTableRowEvent;
1670
+ 'NewCell': NewTableCellEvent;
1671
+ 'SetAttrib': SetAttribEvent;
1672
+ 'hide': {};
1673
+ 'show': {};
1674
+ 'dirty': {};
1675
+ 'BeforeOpenNotification': BeforeOpenNotificationEvent;
1676
+ 'OpenNotification': OpenNotificationEvent;
1677
+ }
1678
+ interface EditorManagerEventMap {
1679
+ 'AddEditor': {
1680
+ editor: Editor;
1681
+ };
1682
+ 'RemoveEditor': {
1683
+ editor: Editor;
1684
+ };
1685
+ 'BeforeUnload': {
1686
+ returnValue: any;
1687
+ };
1688
+ }
1689
+ type EventTypes_d_ExecCommandEvent = ExecCommandEvent;
1690
+ type EventTypes_d_BeforeGetContentEvent = BeforeGetContentEvent;
1691
+ type EventTypes_d_GetContentEvent = GetContentEvent;
1692
+ type EventTypes_d_BeforeSetContentEvent = BeforeSetContentEvent;
1693
+ type EventTypes_d_SetContentEvent = SetContentEvent;
1694
+ type EventTypes_d_SaveContentEvent = SaveContentEvent;
1695
+ type EventTypes_d_NewBlockEvent = NewBlockEvent;
1696
+ type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
1697
+ type EventTypes_d_FormatEvent = FormatEvent;
1698
+ type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
1699
+ type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
1700
+ type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
1701
+ type EventTypes_d_SetSelectionRangeEvent = SetSelectionRangeEvent;
1702
+ type EventTypes_d_ShowCaretEvent = ShowCaretEvent;
1703
+ type EventTypes_d_SwitchModeEvent = SwitchModeEvent;
1704
+ type EventTypes_d_ChangeEvent = ChangeEvent;
1705
+ type EventTypes_d_AddUndoEvent = AddUndoEvent;
1706
+ type EventTypes_d_UndoRedoEvent = UndoRedoEvent;
1707
+ type EventTypes_d_WindowEvent<T extends DialogData> = WindowEvent<T>;
1708
+ type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
1709
+ type EventTypes_d_AfterProgressStateEvent = AfterProgressStateEvent;
1710
+ type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
1711
+ type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
1712
+ type EventTypes_d_PreProcessEvent = PreProcessEvent;
1713
+ type EventTypes_d_PostProcessEvent = PostProcessEvent;
1714
+ type EventTypes_d_PastePlainTextToggleEvent = PastePlainTextToggleEvent;
1715
+ type EventTypes_d_PastePreProcessEvent = PastePreProcessEvent;
1716
+ type EventTypes_d_PastePostProcessEvent = PastePostProcessEvent;
1717
+ type EventTypes_d_EditableRootStateChangeEvent = EditableRootStateChangeEvent;
1718
+ type EventTypes_d_NewTableRowEvent = NewTableRowEvent;
1719
+ type EventTypes_d_NewTableCellEvent = NewTableCellEvent;
1720
+ type EventTypes_d_TableEventData = TableEventData;
1721
+ type EventTypes_d_TableModifiedEvent = TableModifiedEvent;
1722
+ type EventTypes_d_BeforeOpenNotificationEvent = BeforeOpenNotificationEvent;
1723
+ type EventTypes_d_OpenNotificationEvent = OpenNotificationEvent;
1724
+ type EventTypes_d_EditorEventMap = EditorEventMap;
1725
+ type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
1726
+ declare namespace EventTypes_d {
1727
+ export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_BeforeGetContentEvent as BeforeGetContentEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_BeforeSetContentEvent as BeforeSetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_SaveContentEvent as SaveContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_FormatEvent as FormatEvent, EventTypes_d_ObjectResizeEvent as ObjectResizeEvent, EventTypes_d_ObjectSelectedEvent as ObjectSelectedEvent, EventTypes_d_ScrollIntoViewEvent as ScrollIntoViewEvent, EventTypes_d_SetSelectionRangeEvent as SetSelectionRangeEvent, EventTypes_d_ShowCaretEvent as ShowCaretEvent, EventTypes_d_SwitchModeEvent as SwitchModeEvent, EventTypes_d_ChangeEvent as ChangeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_PreProcessEvent as PreProcessEvent, EventTypes_d_PostProcessEvent as PostProcessEvent, EventTypes_d_PastePlainTextToggleEvent as PastePlainTextToggleEvent, EventTypes_d_PastePreProcessEvent as PastePreProcessEvent, EventTypes_d_PastePostProcessEvent as PastePostProcessEvent, EventTypes_d_EditableRootStateChangeEvent as EditableRootStateChangeEvent, EventTypes_d_NewTableRowEvent as NewTableRowEvent, EventTypes_d_NewTableCellEvent as NewTableCellEvent, EventTypes_d_TableEventData as TableEventData, EventTypes_d_TableModifiedEvent as TableModifiedEvent, EventTypes_d_BeforeOpenNotificationEvent as BeforeOpenNotificationEvent, EventTypes_d_OpenNotificationEvent as OpenNotificationEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
1728
+ }
1729
+ type Format_d_Formats = Formats;
1730
+ type Format_d_Format = Format;
1731
+ type Format_d_ApplyFormat = ApplyFormat;
1732
+ type Format_d_BlockFormat = BlockFormat;
1733
+ type Format_d_InlineFormat = InlineFormat;
1734
+ type Format_d_SelectorFormat = SelectorFormat;
1735
+ type Format_d_RemoveFormat = RemoveFormat;
1736
+ type Format_d_RemoveBlockFormat = RemoveBlockFormat;
1737
+ type Format_d_RemoveInlineFormat = RemoveInlineFormat;
1738
+ type Format_d_RemoveSelectorFormat = RemoveSelectorFormat;
1739
+ declare namespace Format_d {
1740
+ export { Format_d_Formats as Formats, Format_d_Format as Format, Format_d_ApplyFormat as ApplyFormat, Format_d_BlockFormat as BlockFormat, Format_d_InlineFormat as InlineFormat, Format_d_SelectorFormat as SelectorFormat, Format_d_RemoveFormat as RemoveFormat, Format_d_RemoveBlockFormat as RemoveBlockFormat, Format_d_RemoveInlineFormat as RemoveInlineFormat, Format_d_RemoveSelectorFormat as RemoveSelectorFormat, };
1741
+ }
1742
+ type StyleFormat = BlockStyleFormat | InlineStyleFormat | SelectorStyleFormat;
1743
+ type AllowedFormat = Separator | FormatReference | StyleFormat | NestedFormatting;
1744
+ interface Separator {
1745
+ title: string;
1746
+ }
1747
+ interface FormatReference {
1748
+ title: string;
1749
+ format: string;
1750
+ icon?: string;
1751
+ }
1752
+ interface NestedFormatting {
1753
+ title: string;
1754
+ items: Array<FormatReference | StyleFormat>;
1755
+ }
1756
+ interface CommonStyleFormat {
1757
+ name?: string;
1758
+ title: string;
1759
+ icon?: string;
1760
+ }
1761
+ interface BlockStyleFormat extends BlockFormat, CommonStyleFormat {
1762
+ }
1763
+ interface InlineStyleFormat extends InlineFormat, CommonStyleFormat {
1764
+ }
1765
+ interface SelectorStyleFormat extends SelectorFormat, CommonStyleFormat {
1766
+ }
1767
+ type EntityEncoding = 'named' | 'numeric' | 'raw' | 'named,numeric' | 'named+numeric' | 'numeric,named' | 'numeric+named';
1768
+ interface ContentLanguage {
1769
+ readonly title: string;
1770
+ readonly code: string;
1771
+ readonly customCode?: string;
1772
+ }
1773
+ type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
1774
+ editorContainer: HTMLElement;
1775
+ iframeContainer: HTMLElement;
1776
+ height?: number;
1777
+ iframeHeight?: number;
1778
+ api?: EditorUiApi;
1779
+ };
1780
+ type SetupCallback = (editor: Editor) => void;
1781
+ type FilePickerCallback = (callback: (value: string, meta?: Record<string, any>) => void, value: string, meta: Record<string, any>) => void;
1782
+ type FilePickerValidationStatus = 'valid' | 'unknown' | 'invalid' | 'none';
1783
+ type FilePickerValidationCallback = (info: {
1784
+ type: string;
1785
+ url: string;
1786
+ }, callback: (validation: {
1787
+ status: FilePickerValidationStatus;
1788
+ message: string;
1789
+ }) => void) => void;
1790
+ type PastePreProcessFn = (editor: Editor, args: PastePreProcessEvent) => void;
1791
+ type PastePostProcessFn = (editor: Editor, args: PastePostProcessEvent) => void;
1792
+ type URLConverter = (url: string, name: string, elm?: string | Element) => string;
1793
+ type URLConverterCallback = (url: string, node: Node | string | undefined, on_save: boolean, name: string) => string;
1794
+ interface ToolbarGroup {
1795
+ name?: string;
1796
+ items: string[];
1797
+ }
1798
+ type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
1799
+ type ToolbarLocation = 'top' | 'bottom' | 'auto';
1800
+ type ForceHexColor = 'always' | 'rgb_only' | 'off';
1801
+ interface BaseEditorOptions {
1802
+ a11y_advanced_options?: boolean;
1803
+ add_form_submit_trigger?: boolean;
1804
+ add_unload_trigger?: boolean;
1805
+ allow_conditional_comments?: boolean;
1806
+ allow_html_data_urls?: boolean;
1807
+ allow_html_in_named_anchor?: boolean;
1808
+ allow_script_urls?: boolean;
1809
+ allow_svg_data_urls?: boolean;
1810
+ allow_unsafe_link_target?: boolean;
1811
+ anchor_bottom?: false | string;
1812
+ anchor_top?: false | string;
1813
+ auto_focus?: string | true;
1814
+ automatic_uploads?: boolean;
1815
+ base_url?: string;
1816
+ block_formats?: string;
1817
+ block_unsupported_drop?: boolean;
1818
+ body_id?: string;
1819
+ body_class?: string;
1820
+ br_in_pre?: boolean;
1821
+ br_newline_selector?: string;
1822
+ browser_spellcheck?: boolean;
1823
+ branding?: boolean;
1824
+ cache_suffix?: string;
1825
+ color_cols?: number;
1826
+ color_cols_foreground?: number;
1827
+ color_cols_background?: number;
1828
+ color_map?: string[];
1829
+ color_map_foreground?: string[];
1830
+ color_map_background?: string[];
1831
+ color_default_foreground?: string;
1832
+ color_default_background?: string;
1833
+ content_css?: boolean | string | string[];
1834
+ content_css_cors?: boolean;
1835
+ content_security_policy?: string;
1836
+ content_style?: string;
1837
+ content_langs?: ContentLanguage[];
1838
+ contextmenu?: string | string[] | false;
1839
+ contextmenu_never_use_native?: boolean;
1840
+ convert_fonts_to_spans?: boolean;
1841
+ convert_unsafe_embeds?: boolean;
1842
+ convert_urls?: boolean;
1843
+ custom_colors?: boolean;
1844
+ custom_elements?: string;
1845
+ custom_ui_selector?: string;
1846
+ custom_undo_redo_levels?: number;
1847
+ default_font_stack?: string[];
1848
+ deprecation_warnings?: boolean;
1849
+ directionality?: 'ltr' | 'rtl';
1850
+ doctype?: string;
1851
+ document_base_url?: string;
1852
+ draggable_modal?: boolean;
1853
+ editable_class?: string;
1854
+ editable_root?: boolean;
1855
+ element_format?: 'xhtml' | 'html';
1856
+ elementpath?: boolean;
1857
+ encoding?: string;
1858
+ end_container_on_empty_block?: boolean | string;
1859
+ entities?: string;
1860
+ entity_encoding?: EntityEncoding;
1861
+ extended_valid_elements?: string;
1862
+ event_root?: string;
1863
+ file_picker_callback?: FilePickerCallback;
1864
+ file_picker_types?: string;
1865
+ file_picker_validator_handler?: FilePickerValidationCallback;
1866
+ fix_list_elements?: boolean;
1867
+ fixed_toolbar_container?: string;
1868
+ fixed_toolbar_container_target?: HTMLElement;
1869
+ font_css?: string | string[];
1870
+ font_family_formats?: string;
1871
+ font_size_classes?: string;
1872
+ font_size_legacy_values?: string;
1873
+ font_size_style_values?: string;
1874
+ font_size_formats?: string;
1875
+ font_size_input_default_unit?: string;
1876
+ force_hex_color?: ForceHexColor;
1877
+ forced_root_block?: string;
1878
+ forced_root_block_attrs?: Record<string, string>;
1879
+ formats?: Formats;
1880
+ format_noneditable_selector?: string;
1881
+ height?: number | string;
1882
+ help_accessibility?: boolean;
1883
+ hidden_input?: boolean;
1884
+ highlight_on_focus?: boolean;
1885
+ icons?: string;
1886
+ icons_url?: string;
1887
+ id?: string;
1888
+ iframe_aria_text?: string;
1889
+ iframe_attrs?: Record<string, string>;
1890
+ images_file_types?: string;
1891
+ images_replace_blob_uris?: boolean;
1892
+ images_reuse_filename?: boolean;
1893
+ images_upload_base_path?: string;
1894
+ images_upload_credentials?: boolean;
1895
+ images_upload_handler?: UploadHandler;
1896
+ images_upload_url?: string;
1897
+ indent?: boolean;
1898
+ indent_after?: string;
1899
+ indent_before?: string;
1900
+ indent_use_margin?: boolean;
1901
+ indentation?: string;
1902
+ init_instance_callback?: SetupCallback;
1903
+ inline?: boolean;
1904
+ inline_boundaries?: boolean;
1905
+ inline_boundaries_selector?: string;
1906
+ inline_styles?: boolean;
1907
+ invalid_elements?: string;
1908
+ invalid_styles?: string | Record<string, string>;
1909
+ keep_styles?: boolean;
1910
+ language?: string;
1911
+ language_load?: boolean;
1912
+ language_url?: string;
1913
+ line_height_formats?: string;
1914
+ max_height?: number;
1915
+ max_width?: number;
1916
+ menu?: Record<string, {
1917
+ title: string;
1918
+ items: string;
1919
+ }>;
1920
+ menubar?: boolean | string;
1921
+ min_height?: number;
1922
+ min_width?: number;
1923
+ model?: string;
1924
+ model_url?: string;
1925
+ newdocument_content?: string;
1926
+ newline_behavior?: 'block' | 'linebreak' | 'invert' | 'default';
1927
+ no_newline_selector?: string;
1928
+ noneditable_class?: string;
1929
+ noneditable_regexp?: RegExp | RegExp[];
1930
+ nowrap?: boolean;
1931
+ object_resizing?: boolean | string;
1932
+ pad_empty_with_br?: boolean;
1933
+ paste_as_text?: boolean;
1934
+ paste_block_drop?: boolean;
1935
+ paste_data_images?: boolean;
1936
+ paste_merge_formats?: boolean;
1937
+ paste_postprocess?: PastePostProcessFn;
1938
+ paste_preprocess?: PastePreProcessFn;
1939
+ paste_remove_styles_if_webkit?: boolean;
1940
+ paste_tab_spaces?: number;
1941
+ paste_webkit_styles?: string;
1942
+ placeholder?: string;
1943
+ preserve_cdata?: boolean;
1944
+ preview_styles?: false | string;
1945
+ promotion?: boolean;
1946
+ protect?: RegExp[];
1947
+ readonly?: boolean;
1948
+ referrer_policy?: ReferrerPolicy;
1949
+ relative_urls?: boolean;
1950
+ remove_script_host?: boolean;
1951
+ remove_trailing_brs?: boolean;
1952
+ removed_menuitems?: string;
1953
+ resize?: boolean | 'both';
1954
+ resize_img_proportional?: boolean;
1955
+ root_name?: string;
1956
+ sandbox_iframes?: boolean;
1957
+ schema?: SchemaType;
1958
+ selector?: string;
1959
+ setup?: SetupCallback;
1960
+ sidebar_show?: string;
1961
+ skin?: boolean | string;
1962
+ skin_url?: string;
1963
+ smart_paste?: boolean;
1964
+ statusbar?: boolean;
1965
+ style_formats?: AllowedFormat[];
1966
+ style_formats_autohide?: boolean;
1967
+ style_formats_merge?: boolean;
1968
+ submit_patch?: boolean;
1969
+ suffix?: string;
1970
+ table_tab_navigation?: boolean;
1971
+ target?: HTMLElement;
1972
+ text_patterns?: RawPattern[] | false;
1973
+ text_patterns_lookup?: RawDynamicPatternsLookup;
1974
+ theme?: string | ThemeInitFunc | false;
1975
+ theme_url?: string;
1976
+ toolbar?: boolean | string | string[] | Array<ToolbarGroup>;
1977
+ toolbar1?: string;
1978
+ toolbar2?: string;
1979
+ toolbar3?: string;
1980
+ toolbar4?: string;
1981
+ toolbar5?: string;
1982
+ toolbar6?: string;
1983
+ toolbar7?: string;
1984
+ toolbar8?: string;
1985
+ toolbar9?: string;
1986
+ toolbar_groups?: Record<string, GroupToolbarButtonSpec>;
1987
+ toolbar_location?: ToolbarLocation;
1988
+ toolbar_mode?: ToolbarMode;
1989
+ toolbar_sticky?: boolean;
1990
+ toolbar_sticky_offset?: number;
1991
+ typeahead_urls?: boolean;
1992
+ ui_mode?: 'combined' | 'split';
1993
+ url_converter?: URLConverter;
1994
+ url_converter_scope?: any;
1995
+ urlconverter_callback?: URLConverterCallback;
1996
+ valid_children?: string;
1997
+ valid_classes?: string | Record<string, string>;
1998
+ valid_elements?: string;
1999
+ valid_styles?: string | Record<string, string>;
2000
+ verify_html?: boolean;
2001
+ visual?: boolean;
2002
+ visual_anchor_class?: string;
2003
+ visual_table_class?: string;
2004
+ width?: number | string;
2005
+ xss_sanitization?: boolean;
2006
+ disable_nodechange?: boolean;
2007
+ forced_plugins?: string | string[];
2008
+ plugin_base_urls?: Record<string, string>;
2009
+ service_message?: string;
2010
+ [key: string]: any;
2011
+ }
2012
+ interface RawEditorOptions extends BaseEditorOptions {
2013
+ external_plugins?: Record<string, string>;
2014
+ mobile?: RawEditorOptions;
2015
+ plugins?: string | string[];
2016
+ }
2017
+ interface NormalizedEditorOptions extends BaseEditorOptions {
2018
+ external_plugins: Record<string, string>;
2019
+ forced_plugins: string[];
2020
+ plugins: string[];
2021
+ }
2022
+ interface EditorOptions extends NormalizedEditorOptions {
2023
+ a11y_advanced_options: boolean;
2024
+ allow_unsafe_link_target: boolean;
2025
+ anchor_bottom: string;
2026
+ anchor_top: string;
2027
+ automatic_uploads: boolean;
2028
+ block_formats: string;
2029
+ body_class: string;
2030
+ body_id: string;
2031
+ br_newline_selector: string;
2032
+ color_map: string[];
2033
+ color_cols: number;
2034
+ color_cols_foreground: number;
2035
+ color_cols_background: number;
2036
+ color_default_background: string;
2037
+ color_default_foreground: string;
2038
+ content_css: string[];
2039
+ contextmenu: string[];
2040
+ convert_unsafe_embeds: boolean;
2041
+ custom_colors: boolean;
2042
+ default_font_stack: string[];
2043
+ document_base_url: string;
2044
+ init_content_sync: boolean;
2045
+ draggable_modal: boolean;
2046
+ editable_class: string;
2047
+ editable_root: boolean;
2048
+ font_css: string[];
2049
+ font_family_formats: string;
2050
+ font_size_classes: string;
2051
+ font_size_formats: string;
2052
+ font_size_input_default_unit: string;
2053
+ font_size_legacy_values: string;
2054
+ font_size_style_values: string;
2055
+ forced_root_block: string;
2056
+ forced_root_block_attrs: Record<string, string>;
2057
+ force_hex_color: ForceHexColor;
2058
+ format_noneditable_selector: string;
2059
+ height: number | string;
2060
+ highlight_on_focus: boolean;
2061
+ iframe_attrs: Record<string, string>;
2062
+ images_file_types: string;
2063
+ images_upload_base_path: string;
2064
+ images_upload_credentials: boolean;
2065
+ images_upload_url: string;
2066
+ indent_use_margin: boolean;
2067
+ indentation: string;
2068
+ inline: boolean;
2069
+ inline_boundaries_selector: string;
2070
+ language: string;
2071
+ language_load: boolean;
2072
+ language_url: string;
2073
+ line_height_formats: string;
2074
+ menu: Record<string, {
2075
+ title: string;
2076
+ items: string;
2077
+ }>;
2078
+ menubar: boolean | string;
2079
+ model: string;
2080
+ newdocument_content: string;
2081
+ no_newline_selector: string;
2082
+ noneditable_class: string;
2083
+ noneditable_regexp: RegExp[];
2084
+ object_resizing: string;
2085
+ pad_empty_with_br: boolean;
2086
+ paste_as_text: boolean;
2087
+ preview_styles: string;
2088
+ promotion: boolean;
2089
+ readonly: boolean;
2090
+ removed_menuitems: string;
2091
+ sandbox_iframes: boolean;
2092
+ toolbar: boolean | string | string[] | Array<ToolbarGroup>;
2093
+ toolbar_groups: Record<string, GroupToolbarButtonSpec>;
2094
+ toolbar_location: ToolbarLocation;
2095
+ toolbar_mode: ToolbarMode;
2096
+ toolbar_persist: boolean;
2097
+ toolbar_sticky: boolean;
2098
+ toolbar_sticky_offset: number;
2099
+ text_patterns: Pattern[];
2100
+ text_patterns_lookup: DynamicPatternsLookup;
2101
+ visual: boolean;
2102
+ visual_anchor_class: string;
2103
+ visual_table_class: string;
2104
+ width: number | string;
2105
+ xss_sanitization: boolean;
2106
+ }
2107
+ type StyleMap = Record<string, string | number>;
2108
+ interface StylesSettings {
2109
+ allow_script_urls?: boolean;
2110
+ allow_svg_data_urls?: boolean;
2111
+ url_converter?: URLConverter;
2112
+ url_converter_scope?: any;
2113
+ force_hex_color?: ForceHexColor;
2114
+ }
2115
+ interface Styles {
2116
+ parse: (css: string | undefined) => Record<string, string>;
2117
+ serialize: (styles: StyleMap, elementName?: string) => string;
2118
+ }
2119
+ type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void | boolean;
2120
+ type EventUtilsEvent<T> = NormalizedEvent<T> & {
2121
+ metaKey: boolean;
2122
+ };
2123
+ interface Callback$1<T> {
2124
+ func: EventUtilsCallback<T>;
2125
+ scope: any;
2126
+ }
2127
+ interface CallbackList<T> extends Array<Callback$1<T>> {
2128
+ fakeName: string | false;
2129
+ capture: boolean;
2130
+ nativeHandler: EventListener;
2131
+ }
2132
+ interface EventUtilsConstructor {
2133
+ readonly prototype: EventUtils;
2134
+ new (): EventUtils;
2135
+ Event: EventUtils;
2136
+ }
2137
+ declare class EventUtils {
2138
+ static Event: EventUtils;
2139
+ domLoaded: boolean;
2140
+ events: Record<number, Record<string, CallbackList<any>>>;
2141
+ private readonly expando;
2142
+ private hasFocusIn;
2143
+ private count;
2144
+ constructor();
2145
+ bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
2146
+ bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
2147
+ unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
2148
+ unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
2149
+ unbind(target: any): this;
2150
+ fire(target: any, name: string, args?: {}): this;
2151
+ dispatch(target: any, name: string, args?: {}): this;
2152
+ clean(target: any): this;
2153
+ destroy(): void;
2154
+ cancel<T>(e: EventUtilsEvent<T>): boolean;
2155
+ private executeHandlers;
2156
+ }
2157
+ interface SetAttribEvent {
2158
+ attrElm: HTMLElement;
2159
+ attrName: string;
2160
+ attrValue: string | boolean | number | null;
2161
+ }
2162
+ interface DOMUtilsSettings {
2163
+ schema: Schema;
2164
+ url_converter: URLConverter;
2165
+ url_converter_scope: any;
2166
+ ownEvents: boolean;
2167
+ keep_values: boolean;
2168
+ update_styles: boolean;
2169
+ root_element: HTMLElement | null;
2170
+ collect: boolean;
2171
+ onSetAttrib: (event: SetAttribEvent) => void;
2172
+ contentCssCors: boolean;
2173
+ referrerPolicy: ReferrerPolicy;
2174
+ force_hex_color: ForceHexColor;
2175
+ }
2176
+ type Target = Node | Window;
2177
+ type RunArguments<T extends Node = Node> = string | T | Array<string | T> | null;
2178
+ type BoundEvent = [
2179
+ Target,
2180
+ string,
2181
+ EventUtilsCallback<any>,
2182
+ any
2183
+ ];
2184
+ type Callback<K extends string> = EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>;
2185
+ type RunResult<T, R> = T extends Array<any> ? R[] : false | R;
2186
+ interface DOMUtils {
2187
+ doc: Document;
2188
+ settings: Partial<DOMUtilsSettings>;
2189
+ win: Window;
2190
+ files: Record<string, boolean>;
2191
+ stdMode: boolean;
2192
+ boxModel: boolean;
2193
+ styleSheetLoader: StyleSheetLoader;
2194
+ boundEvents: BoundEvent[];
2195
+ styles: Styles;
2196
+ schema: Schema;
2197
+ events: EventUtils;
2198
+ root: Node | null;
2199
+ isBlock: {
2200
+ (node: Node | null): node is HTMLElement;
2201
+ (node: string): boolean;
2202
+ };
2203
+ clone: (node: Node, deep: boolean) => Node;
2204
+ getRoot: () => HTMLElement;
2205
+ getViewPort: (argWin?: Window) => GeomRect;
2206
+ getRect: (elm: string | HTMLElement) => GeomRect;
2207
+ getSize: (elm: string | HTMLElement) => {
2208
+ w: number;
2209
+ h: number;
2210
+ };
2211
+ getParent: {
2212
+ <K extends keyof HTMLElementTagNameMap>(node: string | Node | null, selector: K, root?: Node): HTMLElementTagNameMap[K] | null;
2213
+ <T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node): T | null;
2214
+ (node: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node): Node | null;
2215
+ };
2216
+ getParents: {
2217
+ <K extends keyof HTMLElementTagNameMap>(elm: string | HTMLElementTagNameMap[K] | null, selector: K, root?: Node, collect?: boolean): Array<HTMLElementTagNameMap[K]>;
2218
+ <T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node, collect?: boolean): T[];
2219
+ (elm: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node, collect?: boolean): Node[];
2220
+ };
2221
+ get: {
2222
+ <T extends Node>(elm: T): T;
2223
+ (elm: string): HTMLElement | null;
2224
+ };
2225
+ getNext: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
2226
+ getPrev: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
2227
+ select: {
2228
+ <K extends keyof HTMLElementTagNameMap>(selector: K, scope?: string | Node): Array<HTMLElementTagNameMap[K]>;
2229
+ <T extends HTMLElement = HTMLElement>(selector: string, scope?: string | Node): T[];
2230
+ };
2231
+ is: {
2232
+ <T extends Element>(elm: Node | Node[] | null, selector: string): elm is T;
2233
+ (elm: Node | Node[] | null, selector: string): boolean;
2234
+ };
2235
+ add: (parentElm: RunArguments, name: string | Element, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null, create?: boolean) => HTMLElement;
2236
+ create: {
2237
+ <K extends keyof HTMLElementTagNameMap>(name: K, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElementTagNameMap[K];
2238
+ (name: string, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElement;
2239
+ };
2240
+ createHTML: (name: string, attrs?: Record<string, string | null>, html?: string) => string;
2241
+ createFragment: (html?: string) => DocumentFragment;
2242
+ remove: {
2243
+ <T extends Node>(node: T | T[], keepChildren?: boolean): typeof node extends Array<any> ? T[] : T;
2244
+ <T extends Node>(node: string, keepChildren?: boolean): T | false;
2245
+ };
2246
+ getStyle: {
2247
+ (elm: Element, name: string, computed: true): string;
2248
+ (elm: string | Element | null, name: string, computed?: boolean): string | undefined;
2249
+ };
2250
+ setStyle: (elm: string | Element | Element[], name: string, value: string | number | null) => void;
2251
+ setStyles: (elm: string | Element | Element[], stylesArg: StyleMap) => void;
2252
+ removeAllAttribs: (e: RunArguments<Element>) => void;
2253
+ setAttrib: (elm: RunArguments<Element>, name: string, value: string | boolean | number | null) => void;
2254
+ setAttribs: (elm: RunArguments<Element>, attrs: Record<string, string | boolean | number | null>) => void;
2255
+ getAttrib: (elm: string | Element | null, name: string, defaultVal?: string) => string;
2256
+ getAttribs: (elm: string | Element) => NamedNodeMap | Attr[];
2257
+ getPos: (elm: string | Element, rootElm?: Node) => {
2258
+ x: number;
2259
+ y: number;
2260
+ };
2261
+ parseStyle: (cssText: string) => Record<string, string>;
2262
+ serializeStyle: (stylesArg: StyleMap, name?: string) => string;
2263
+ addStyle: (cssText: string) => void;
2264
+ loadCSS: (url: string) => void;
2265
+ hasClass: (elm: string | Element, cls: string) => boolean;
2266
+ addClass: (elm: RunArguments<Element>, cls: string) => void;
2267
+ removeClass: (elm: RunArguments<Element>, cls: string) => void;
2268
+ toggleClass: (elm: RunArguments<Element>, cls: string, state?: boolean) => void;
2269
+ show: (elm: string | Node | Node[]) => void;
2270
+ hide: (elm: string | Node | Node[]) => void;
2271
+ isHidden: (elm: string | Node) => boolean;
2272
+ uniqueId: (prefix?: string) => string;
2273
+ setHTML: (elm: RunArguments<Element>, html: string) => void;
2274
+ getOuterHTML: (elm: string | Node) => string;
2275
+ setOuterHTML: (elm: string | Node | Node[], html: string) => void;
2276
+ decode: (text: string) => string;
2277
+ encode: (text: string) => string;
2278
+ insertAfter: {
2279
+ <T extends Node>(node: T | T[], reference: string | Node): T;
2280
+ <T extends Node>(node: RunArguments<T>, reference: string | Node): RunResult<typeof node, T>;
2281
+ };
2282
+ replace: {
2283
+ <T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T;
2284
+ <T extends Node>(newElm: Node, oldElm: RunArguments<T>, keepChildren?: boolean): false | T;
2285
+ };
2286
+ rename: {
2287
+ <K extends keyof HTMLElementTagNameMap>(elm: Element, name: K): HTMLElementTagNameMap[K];
2288
+ (elm: Element, name: string): Element;
2289
+ };
2290
+ findCommonAncestor: (a: Node, b: Node) => Node | null;
2291
+ run<R, T extends Node>(this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any): typeof elm extends Array<any> ? R[] : R;
2292
+ run<R, T extends Node>(this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any): RunResult<typeof elm, R>;
2293
+ isEmpty: (node: Node, elements?: Record<string, any>, options?: ({
2294
+ includeZwsp?: boolean;
2295
+ })) => boolean;
2296
+ createRng: () => Range;
2297
+ nodeIndex: (node: Node, normalized?: boolean) => number;
2298
+ split: {
2299
+ <T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): T | undefined;
2300
+ <T extends Node>(parentElm: Node, splitElm: T): T | undefined;
2301
+ };
2302
+ bind: {
2303
+ <K extends string>(target: Target, name: K, func: Callback<K>, scope?: any): Callback<K>;
2304
+ <K extends string>(target: Target[], name: K, func: Callback<K>, scope?: any): Callback<K>[];
2305
+ };
2306
+ unbind: {
2307
+ <K extends string>(target: Target, name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils;
2308
+ <K extends string>(target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils[];
2309
+ };
2310
+ fire: (target: Node | Window, name: string, evt?: {}) => EventUtils;
2311
+ dispatch: (target: Node | Window, name: string, evt?: {}) => EventUtils;
2312
+ getContentEditable: (node: Node) => string | null;
2313
+ getContentEditableParent: (node: Node) => string | null;
2314
+ isEditable: (node: Node | null | undefined) => boolean;
2315
+ destroy: () => void;
2316
+ isChildOf: (node: Node, parent: Node) => boolean;
2317
+ dumpRng: (r: Range) => string;
2318
+ }
2319
+ interface ClientRect {
2320
+ left: number;
2321
+ top: number;
2322
+ bottom: number;
2323
+ right: number;
2324
+ width: number;
2325
+ height: number;
2326
+ }
2327
+ interface BookmarkManager {
2328
+ getBookmark: (type?: number, normalized?: boolean) => Bookmark;
2329
+ moveToBookmark: (bookmark: Bookmark) => void;
2330
+ }
2331
+ interface ControlSelection {
2332
+ isResizable: (elm: Element) => boolean;
2333
+ showResizeRect: (elm: HTMLElement) => void;
2334
+ hideResizeRect: () => void;
2335
+ updateResizeRect: (evt: EditorEvent<any>) => void;
2336
+ destroy: () => void;
2337
+ }
2338
+ interface WriterSettings {
2339
+ element_format?: 'xhtml' | 'html';
2340
+ entities?: string;
2341
+ entity_encoding?: EntityEncoding;
2342
+ indent?: boolean;
2343
+ indent_after?: string;
2344
+ indent_before?: string;
2345
+ }
2346
+ type Attributes = Array<{
2347
+ name: string;
2348
+ value: string;
2349
+ }>;
2350
+ interface Writer {
2351
+ cdata: (text: string) => void;
2352
+ comment: (text: string) => void;
2353
+ doctype: (text: string) => void;
2354
+ end: (name: string) => void;
2355
+ getContent: () => string;
2356
+ pi: (name: string, text?: string) => void;
2357
+ reset: () => void;
2358
+ start: (name: string, attrs?: Attributes | null, empty?: boolean) => void;
2359
+ text: (text: string, raw?: boolean) => void;
2360
+ }
2361
+ interface HtmlSerializerSettings extends WriterSettings {
2362
+ inner?: boolean;
2363
+ validate?: boolean;
2364
+ }
2365
+ interface HtmlSerializer {
2366
+ serialize: (node: AstNode) => string;
2367
+ }
2368
+ interface DomSerializerSettings extends DomParserSettings, WriterSettings, SchemaSettings, HtmlSerializerSettings {
2369
+ remove_trailing_brs?: boolean;
2370
+ url_converter?: URLConverter;
2371
+ url_converter_scope?: {};
2372
+ }
2373
+ interface DomSerializerImpl {
2374
+ schema: Schema;
2375
+ addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
2376
+ addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
2377
+ getNodeFilters: () => ParserFilter[];
2378
+ getAttributeFilters: () => ParserFilter[];
2379
+ removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
2380
+ removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
2381
+ serialize: {
2382
+ (node: Element, parserArgs: {
2383
+ format: 'tree';
2384
+ } & ParserArgs): AstNode;
2385
+ (node: Element, parserArgs?: ParserArgs): string;
2386
+ };
2387
+ addRules: (rules: string) => void;
2388
+ setRules: (rules: string) => void;
2389
+ addTempAttr: (name: string) => void;
2390
+ getTempAttrs: () => string[];
2391
+ }
2392
+ interface DomSerializer extends DomSerializerImpl {
2393
+ }
2394
+ interface EditorSelection {
2395
+ bookmarkManager: BookmarkManager;
2396
+ controlSelection: ControlSelection;
2397
+ dom: DOMUtils;
2398
+ win: Window;
2399
+ serializer: DomSerializer;
2400
+ editor: Editor;
2401
+ collapse: (toStart?: boolean) => void;
2402
+ setCursorLocation: {
2403
+ (node: Node, offset: number): void;
2404
+ (): void;
2405
+ };
2406
+ getContent: {
2407
+ (args: {
2408
+ format: 'tree';
2409
+ } & Partial<GetSelectionContentArgs>): AstNode;
2410
+ (args?: Partial<GetSelectionContentArgs>): string;
2411
+ };
2412
+ setContent: (content: string, args?: Partial<SetSelectionContentArgs>) => void;
2413
+ getBookmark: (type?: number, normalized?: boolean) => Bookmark;
2414
+ moveToBookmark: (bookmark: Bookmark) => void;
2415
+ select: (node: Node, content?: boolean) => Node;
2416
+ isCollapsed: () => boolean;
2417
+ isEditable: () => boolean;
2418
+ isForward: () => boolean;
2419
+ setNode: (elm: Element) => Element;
2420
+ getNode: () => HTMLElement;
2421
+ getSel: () => Selection | null;
2422
+ setRng: (rng: Range, forward?: boolean) => void;
2423
+ getRng: () => Range;
2424
+ getStart: (real?: boolean) => Element;
2425
+ getEnd: (real?: boolean) => Element;
2426
+ getSelectedBlocks: (startElm?: Element, endElm?: Element) => Element[];
2427
+ normalize: () => Range;
2428
+ selectorChanged: (selector: string, callback: (active: boolean, args: {
2429
+ node: Node;
2430
+ selector: String;
2431
+ parents: Node[];
2432
+ }) => void) => EditorSelection;
2433
+ selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
2434
+ node: Node;
2435
+ selector: String;
2436
+ parents: Node[];
2437
+ }) => void) => {
2438
+ unbind: () => void;
2439
+ };
2440
+ getScrollContainer: () => HTMLElement | undefined;
2441
+ scrollIntoView: (elm?: HTMLElement, alignToTop?: boolean) => void;
2442
+ placeCaretAt: (clientX: number, clientY: number) => void;
2443
+ getBoundingClientRect: () => ClientRect | DOMRect;
2444
+ destroy: () => void;
2445
+ expand: (options?: {
2446
+ type: 'word';
2447
+ }) => void;
2448
+ }
2449
+ type EditorCommandCallback<S> = (this: S, ui: boolean, value: any) => void;
2450
+ type EditorCommandsCallback = (command: string, ui: boolean, value?: any) => void;
2451
+ interface Commands {
2452
+ state: Record<string, (command: string) => boolean>;
2453
+ exec: Record<string, EditorCommandsCallback>;
2454
+ value: Record<string, (command: string) => string>;
2455
+ }
2456
+ interface ExecCommandArgs {
2457
+ skip_focus?: boolean;
2458
+ }
2459
+ interface EditorCommandsConstructor {
2460
+ readonly prototype: EditorCommands;
2461
+ new (editor: Editor): EditorCommands;
2462
+ }
2463
+ declare class EditorCommands {
2464
+ private readonly editor;
2465
+ private commands;
2466
+ constructor(editor: Editor);
2467
+ execCommand(command: string, ui?: boolean, value?: any, args?: ExecCommandArgs): boolean;
2468
+ queryCommandState(command: string): boolean;
2469
+ queryCommandValue(command: string): string;
2470
+ addCommands<K extends keyof Commands>(commandList: Commands[K], type: K): void;
2471
+ addCommands(commandList: Record<string, EditorCommandsCallback>): void;
2472
+ addCommand<S>(command: string, callback: EditorCommandCallback<S>, scope: S): void;
2473
+ addCommand(command: string, callback: EditorCommandCallback<Editor>): void;
2474
+ queryCommandSupported(command: string): boolean;
2475
+ addQueryStateHandler<S>(command: string, callback: (this: S) => boolean, scope: S): void;
2476
+ addQueryStateHandler(command: string, callback: (this: Editor) => boolean): void;
2477
+ addQueryValueHandler<S>(command: string, callback: (this: S) => string, scope: S): void;
2478
+ addQueryValueHandler(command: string, callback: (this: Editor) => string): void;
2479
+ }
2480
+ interface RawString {
2481
+ raw: string;
2482
+ }
2483
+ type Primitive = string | number | boolean | Record<string | number, any> | Function;
2484
+ type TokenisedString = [
2485
+ string,
2486
+ ...Primitive[]
2487
+ ];
2488
+ type Untranslated = Primitive | TokenisedString | RawString | null | undefined;
2489
+ type TranslatedString = string;
2490
+ interface I18n {
2491
+ getData: () => Record<string, Record<string, string>>;
2492
+ setCode: (newCode: string) => void;
2493
+ getCode: () => string;
2494
+ add: (code: string, items: Record<string, string>) => void;
2495
+ translate: (text: Untranslated) => TranslatedString;
2496
+ isRtl: () => boolean;
2497
+ hasCode: (code: string) => boolean;
2498
+ }
2499
+ interface Observable<T extends {}> {
2500
+ fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
2501
+ dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
2502
+ on<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): EventDispatcher<T>;
2503
+ off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
2504
+ once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
2505
+ hasEventListeners(name: string): boolean;
2506
+ }
2507
+ interface URISettings {
2508
+ base_uri?: URI;
2509
+ }
2510
+ interface URIConstructor {
2511
+ readonly prototype: URI;
2512
+ new (url: string, settings?: URISettings): URI;
2513
+ getDocumentBaseUrl: (loc: {
2514
+ protocol: string;
2515
+ host?: string;
2516
+ href?: string;
2517
+ pathname?: string;
2518
+ }) => string;
2519
+ parseDataUri: (uri: string) => {
2520
+ type: string;
2521
+ data: string;
2522
+ };
2523
+ }
2524
+ interface SafeUriOptions {
2525
+ readonly allow_html_data_urls?: boolean;
2526
+ readonly allow_script_urls?: boolean;
2527
+ readonly allow_svg_data_urls?: boolean;
2528
+ }
2529
+ declare class URI {
2530
+ static parseDataUri(uri: string): {
2531
+ type: string | undefined;
2532
+ data: string;
2533
+ };
2534
+ static isDomSafe(uri: string, context?: string, options?: SafeUriOptions): boolean;
2535
+ static getDocumentBaseUrl(loc: {
2536
+ protocol: string;
2537
+ host?: string;
2538
+ href?: string;
2539
+ pathname?: string;
2540
+ }): string;
2541
+ source: string;
2542
+ protocol: string | undefined;
2543
+ authority: string | undefined;
2544
+ userInfo: string | undefined;
2545
+ user: string | undefined;
2546
+ password: string | undefined;
2547
+ host: string | undefined;
2548
+ port: string | undefined;
2549
+ relative: string | undefined;
2550
+ path: string;
2551
+ directory: string;
2552
+ file: string | undefined;
2553
+ query: string | undefined;
2554
+ anchor: string | undefined;
2555
+ settings: URISettings;
2556
+ constructor(url: string, settings?: URISettings);
2557
+ setPath(path: string): void;
2558
+ toRelative(uri: string): string;
2559
+ toAbsolute(uri: string, noHost?: boolean): string;
2560
+ isSameOrigin(uri: URI): boolean;
2561
+ toRelPath(base: string, path: string): string;
2562
+ toAbsPath(base: string, path: string): string;
2563
+ getURI(noProtoHost?: boolean): string;
2564
+ }
2565
+ interface EditorManager extends Observable<EditorManagerEventMap> {
2566
+ defaultOptions: RawEditorOptions;
2567
+ majorVersion: string;
2568
+ minorVersion: string;
2569
+ releaseDate: string;
2570
+ activeEditor: Editor | null;
2571
+ focusedEditor: Editor | null;
2572
+ baseURI: URI;
2573
+ baseURL: string;
2574
+ documentBaseURL: string;
2575
+ i18n: I18n;
2576
+ suffix: string;
2577
+ add(this: EditorManager, editor: Editor): Editor;
2578
+ addI18n: (code: string, item: Record<string, string>) => void;
2579
+ createEditor(this: EditorManager, id: string, options: RawEditorOptions): Editor;
2580
+ execCommand(this: EditorManager, cmd: string, ui: boolean, value: any): boolean;
2581
+ get(this: EditorManager): Editor[];
2582
+ get(this: EditorManager, id: number | string): Editor | null;
2583
+ init(this: EditorManager, options: RawEditorOptions): Promise<Editor[]>;
2584
+ overrideDefaults(this: EditorManager, defaultOptions: Partial<RawEditorOptions>): void;
2585
+ remove(this: EditorManager): void;
2586
+ remove(this: EditorManager, selector: string): void;
2587
+ remove(this: EditorManager, editor: Editor): Editor | null;
2588
+ setActive(this: EditorManager, editor: Editor): void;
2589
+ setup(this: EditorManager): void;
2590
+ translate: (text: Untranslated) => TranslatedString;
2591
+ triggerSave: () => void;
2592
+ _setBaseUrl(this: EditorManager, baseUrl: string): void;
2593
+ }
2594
+ interface EditorObservable extends Observable<EditorEventMap> {
2595
+ bindPendingEventDelegates(this: Editor): void;
2596
+ toggleNativeEvent(this: Editor, name: string, state: boolean): void;
2597
+ unbindAllNativeEvents(this: Editor): void;
2598
+ }
2599
+ interface ProcessorSuccess<T> {
2600
+ valid: true;
2601
+ value: T;
2602
+ }
2603
+ interface ProcessorError {
2604
+ valid: false;
2605
+ message: string;
2606
+ }
2607
+ type SimpleProcessor = (value: unknown) => boolean;
2608
+ type Processor<T> = (value: unknown) => ProcessorSuccess<T> | ProcessorError;
2609
+ interface BuiltInOptionTypeMap {
2610
+ 'string': string;
2611
+ 'number': number;
2612
+ 'boolean': boolean;
2613
+ 'array': any[];
2614
+ 'function': Function;
2615
+ 'object': any;
2616
+ 'string[]': string[];
2617
+ 'object[]': any[];
2618
+ 'regexp': RegExp;
2619
+ }
2620
+ type BuiltInOptionType = keyof BuiltInOptionTypeMap;
2621
+ interface BaseOptionSpec {
2622
+ immutable?: boolean;
2623
+ deprecated?: boolean;
2624
+ docsUrl?: string;
2625
+ }
2626
+ interface BuiltInOptionSpec<K extends BuiltInOptionType> extends BaseOptionSpec {
2627
+ processor: K;
2628
+ default?: BuiltInOptionTypeMap[K];
2629
+ }
2630
+ interface SimpleOptionSpec<T> extends BaseOptionSpec {
2631
+ processor: SimpleProcessor;
2632
+ default?: T;
2633
+ }
2634
+ interface OptionSpec<T, U> extends BaseOptionSpec {
2635
+ processor: Processor<U>;
2636
+ default?: T;
2637
+ }
2638
+ interface Options {
2639
+ register: {
2640
+ <K extends BuiltInOptionType>(name: string, spec: BuiltInOptionSpec<K>): void;
2641
+ <K extends keyof NormalizedEditorOptions>(name: K, spec: OptionSpec<NormalizedEditorOptions[K], EditorOptions[K]> | SimpleOptionSpec<NormalizedEditorOptions[K]>): void;
2642
+ <T, U>(name: string, spec: OptionSpec<T, U>): void;
2643
+ <T>(name: string, spec: SimpleOptionSpec<T>): void;
2644
+ };
2645
+ isRegistered: (name: string) => boolean;
2646
+ get: {
2647
+ <K extends keyof EditorOptions>(name: K): EditorOptions[K];
2648
+ <T>(name: string): T | undefined;
2649
+ };
2650
+ set: <K extends string, T>(name: K, value: K extends keyof NormalizedEditorOptions ? NormalizedEditorOptions[K] : T) => boolean;
2651
+ unset: (name: string) => boolean;
2652
+ isSet: (name: string) => boolean;
2653
+ }
2654
+ interface UploadResult$1 {
2655
+ element: HTMLImageElement;
2656
+ status: boolean;
2657
+ blobInfo: BlobInfo;
2658
+ uploadUri: string;
2659
+ removed: boolean;
2660
+ }
2661
+ interface EditorUpload {
2662
+ blobCache: BlobCache;
2663
+ addFilter: (filter: (img: HTMLImageElement) => boolean) => void;
2664
+ uploadImages: () => Promise<UploadResult$1[]>;
2665
+ uploadImagesAuto: () => Promise<UploadResult$1[]>;
2666
+ scanForImages: () => Promise<BlobInfoImagePair[]>;
2667
+ destroy: () => void;
2668
+ }
2669
+ type FormatChangeCallback = (state: boolean, data: {
2670
+ node: Node;
2671
+ format: string;
2672
+ parents: Element[];
2673
+ }) => void;
2674
+ interface FormatRegistry {
2675
+ get: {
2676
+ (name: string): Format[] | undefined;
2677
+ (): Record<string, Format[]>;
2678
+ };
2679
+ has: (name: string) => boolean;
2680
+ register: (name: string | Formats, format?: Format[] | Format) => void;
2681
+ unregister: (name: string) => Formats;
2682
+ }
2683
+ interface Formatter extends FormatRegistry {
2684
+ apply: (name: string, vars?: FormatVars, node?: Node | RangeLikeObject | null) => void;
2685
+ remove: (name: string, vars?: FormatVars, node?: Node | Range, similar?: boolean) => void;
2686
+ toggle: (name: string, vars?: FormatVars, node?: Node) => void;
2687
+ match: (name: string, vars?: FormatVars, node?: Node, similar?: boolean) => boolean;
2688
+ closest: (names: string[]) => string | null;
2689
+ matchAll: (names: string[], vars?: FormatVars) => string[];
2690
+ matchNode: (node: Node | null, name: string, vars?: FormatVars, similar?: boolean) => Format | undefined;
2691
+ canApply: (name: string) => boolean;
2692
+ formatChanged: (names: string, callback: FormatChangeCallback, similar?: boolean, vars?: FormatVars) => {
2693
+ unbind: () => void;
2694
+ };
2695
+ getCssText: (format: string | ApplyFormat) => string;
2696
+ }
2697
+ interface EditorMode {
2698
+ isReadOnly: () => boolean;
2699
+ set: (mode: string) => void;
2700
+ get: () => string;
2701
+ register: (mode: string, api: EditorModeApi) => void;
2702
+ }
2703
+ interface EditorModeApi {
2704
+ activate: () => void;
2705
+ deactivate: () => void;
2706
+ editorReadOnly: boolean;
2707
+ }
2708
+ interface Model {
2709
+ readonly table: {
2710
+ readonly getSelectedCells: () => HTMLTableCellElement[];
2711
+ readonly clearSelectedCells: (container: Node) => void;
2712
+ };
2713
+ }
2714
+ type ModelManager = AddOnManager<Model>;
2715
+ interface Plugin {
2716
+ getMetadata?: () => {
2717
+ name: string;
2718
+ url: string;
2719
+ };
2720
+ init?: (editor: Editor, url: string) => void;
2721
+ [key: string]: any;
2722
+ }
2723
+ type PluginManager = AddOnManager<void | Plugin>;
2724
+ interface ShortcutsConstructor {
2725
+ readonly prototype: Shortcuts;
2726
+ new (editor: Editor): Shortcuts;
2727
+ }
2728
+ type CommandFunc = string | [
2729
+ string,
2730
+ boolean,
2731
+ any
2732
+ ] | (() => void);
2733
+ declare class Shortcuts {
2734
+ private readonly editor;
2735
+ private readonly shortcuts;
2736
+ private pendingPatterns;
2737
+ constructor(editor: Editor);
2738
+ add(pattern: string, desc: string | null, cmdFunc: CommandFunc, scope?: any): boolean;
2739
+ remove(pattern: string): boolean;
2740
+ private normalizeCommandFunc;
2741
+ private createShortcut;
2742
+ private hasModifier;
2743
+ private isFunctionKey;
2744
+ private matchShortcut;
2745
+ private executeShortcutAction;
2746
+ }
2747
+ interface RenderResult {
2748
+ iframeContainer?: HTMLElement;
2749
+ editorContainer: HTMLElement;
2750
+ api?: Partial<EditorUiApi>;
2751
+ }
2752
+ interface Theme {
2753
+ ui?: any;
2754
+ inline?: any;
2755
+ execCommand?: (command: string, ui?: boolean, value?: any) => boolean;
2756
+ destroy?: () => void;
2757
+ init?: (editor: Editor, url: string) => void;
2758
+ renderUI?: () => Promise<RenderResult> | RenderResult;
2759
+ getNotificationManagerImpl?: () => NotificationManagerImpl;
2760
+ getWindowManagerImpl?: () => WindowManagerImpl;
2761
+ }
2762
+ type ThemeManager = AddOnManager<void | Theme>;
2763
+ interface EditorConstructor {
2764
+ readonly prototype: Editor;
2765
+ new (id: string, options: RawEditorOptions, editorManager: EditorManager): Editor;
2766
+ }
2767
+ declare class Editor implements EditorObservable {
2768
+ documentBaseUrl: string;
2769
+ baseUri: URI;
2770
+ id: string;
2771
+ plugins: Record<string, Plugin>;
2772
+ documentBaseURI: URI;
2773
+ baseURI: URI;
2774
+ contentCSS: string[];
2775
+ contentStyles: string[];
2776
+ ui: EditorUi;
2777
+ mode: EditorMode;
2778
+ options: Options;
2779
+ editorUpload: EditorUpload;
2780
+ shortcuts: Shortcuts;
2781
+ loadedCSS: Record<string, any>;
2782
+ editorCommands: EditorCommands;
2783
+ suffix: string;
2784
+ editorManager: EditorManager;
2785
+ hidden: boolean;
2786
+ inline: boolean;
2787
+ hasVisual: boolean;
2788
+ isNotDirty: boolean;
2789
+ annotator: Annotator;
2790
+ bodyElement: HTMLElement | undefined;
2791
+ bookmark: any;
2792
+ composing: boolean;
2793
+ container: HTMLElement;
2794
+ contentAreaContainer: HTMLElement;
2795
+ contentDocument: Document;
2796
+ contentWindow: Window;
2797
+ delegates: Record<string, EventUtilsCallback<any>> | undefined;
2798
+ destroyed: boolean;
2799
+ dom: DOMUtils;
2800
+ editorContainer: HTMLElement;
2801
+ eventRoot: Element | undefined;
2802
+ formatter: Formatter;
2803
+ formElement: HTMLElement | undefined;
2804
+ formEventDelegate: ((e: Event) => void) | undefined;
2805
+ hasHiddenInput: boolean;
2806
+ iframeElement: HTMLIFrameElement | null;
2807
+ iframeHTML: string | undefined;
2808
+ initialized: boolean;
2809
+ notificationManager: NotificationManager;
2810
+ orgDisplay: string;
2811
+ orgVisibility: string | undefined;
2812
+ parser: DomParser;
2813
+ quirks: Quirks;
2814
+ readonly: boolean;
2815
+ removed: boolean;
2816
+ schema: Schema;
2817
+ selection: EditorSelection;
2818
+ serializer: DomSerializer;
2819
+ startContent: string;
2820
+ targetElm: HTMLElement;
2821
+ theme: Theme;
2822
+ model: Model;
2823
+ undoManager: UndoManager;
2824
+ windowManager: WindowManager;
2825
+ _beforeUnload: (() => void) | undefined;
2826
+ _eventDispatcher: EventDispatcher<NativeEventMap> | undefined;
2827
+ _nodeChangeDispatcher: NodeChange;
2828
+ _pendingNativeEvents: string[];
2829
+ _selectionOverrides: SelectionOverrides;
2830
+ _skinLoaded: boolean;
2831
+ _editableRoot: boolean;
2832
+ bindPendingEventDelegates: EditorObservable['bindPendingEventDelegates'];
2833
+ toggleNativeEvent: EditorObservable['toggleNativeEvent'];
2834
+ unbindAllNativeEvents: EditorObservable['unbindAllNativeEvents'];
2835
+ fire: EditorObservable['fire'];
2836
+ dispatch: EditorObservable['dispatch'];
2837
+ on: EditorObservable['on'];
2838
+ off: EditorObservable['off'];
2839
+ once: EditorObservable['once'];
2840
+ hasEventListeners: EditorObservable['hasEventListeners'];
2841
+ constructor(id: string, options: RawEditorOptions, editorManager: EditorManager);
2842
+ render(): void;
2843
+ focus(skipFocus?: boolean): void;
2844
+ hasFocus(): boolean;
2845
+ translate(text: Untranslated): TranslatedString;
2846
+ getParam<K extends BuiltInOptionType>(name: string, defaultVal: BuiltInOptionTypeMap[K], type: K): BuiltInOptionTypeMap[K];
2847
+ getParam<K extends keyof NormalizedEditorOptions>(name: K, defaultVal?: NormalizedEditorOptions[K], type?: BuiltInOptionType): NormalizedEditorOptions[K];
2848
+ getParam<T>(name: string, defaultVal: T, type?: BuiltInOptionType): T;
2849
+ hasPlugin(name: string, loaded?: boolean): boolean;
2850
+ nodeChanged(args?: any): void;
2851
+ addCommand<S>(name: string, callback: EditorCommandCallback<S>, scope: S): void;
2852
+ addCommand(name: string, callback: EditorCommandCallback<Editor>): void;
2853
+ addQueryStateHandler<S>(name: string, callback: (this: S) => boolean, scope?: S): void;
2854
+ addQueryStateHandler(name: string, callback: (this: Editor) => boolean): void;
2855
+ addQueryValueHandler<S>(name: string, callback: (this: S) => string, scope: S): void;
2856
+ addQueryValueHandler(name: string, callback: (this: Editor) => string): void;
2857
+ addShortcut(pattern: string, desc: string, cmdFunc: string | [
2858
+ string,
2859
+ boolean,
2860
+ any
2861
+ ] | (() => void), scope?: any): void;
2862
+ execCommand(cmd: string, ui?: boolean, value?: any, args?: ExecCommandArgs): boolean;
2863
+ queryCommandState(cmd: string): boolean;
2864
+ queryCommandValue(cmd: string): string;
2865
+ queryCommandSupported(cmd: string): boolean;
2866
+ show(): void;
2867
+ hide(): void;
2868
+ isHidden(): boolean;
2869
+ setProgressState(state: boolean, time?: number): void;
2870
+ load(args?: Partial<SetContentArgs>): string;
2871
+ save(args?: Partial<GetContentArgs>): string;
2872
+ setContent(content: string, args?: Partial<SetContentArgs>): string;
2873
+ setContent(content: AstNode, args?: Partial<SetContentArgs>): AstNode;
2874
+ setContent(content: Content, args?: Partial<SetContentArgs>): Content;
2875
+ getContent(args: {
2876
+ format: 'tree';
2877
+ } & Partial<GetContentArgs>): AstNode;
2878
+ getContent(args?: Partial<GetContentArgs>): string;
2879
+ insertContent(content: string, args?: any): void;
2880
+ resetContent(initialContent?: string): void;
2881
+ isDirty(): boolean;
2882
+ setDirty(state: boolean): void;
2883
+ getContainer(): HTMLElement;
2884
+ getContentAreaContainer(): HTMLElement;
2885
+ getElement(): HTMLElement;
2886
+ getWin(): Window;
2887
+ getDoc(): Document;
2888
+ getBody(): HTMLElement;
2889
+ convertURL(url: string, name: string, elm?: string | Element): string;
2890
+ addVisual(elm?: HTMLElement): void;
2891
+ setEditableRoot(state: boolean): void;
2892
+ hasEditableRoot(): boolean;
2893
+ remove(): void;
2894
+ destroy(automatic?: boolean): void;
2895
+ uploadImages(): Promise<UploadResult$1[]>;
2896
+ _scanForImages(): Promise<BlobInfoImagePair[]>;
2897
+ }
2898
+ interface UrlObject {
2899
+ prefix: string;
2900
+ resource: string;
2901
+ suffix: string;
2902
+ }
2903
+ type WaitState = 'added' | 'loaded';
2904
+ type AddOnConstructor<T> = (editor: Editor, url: string) => T;
2905
+ interface AddOnManager<T> {
2906
+ items: AddOnConstructor<T>[];
2907
+ urls: Record<string, string>;
2908
+ lookup: Record<string, {
2909
+ instance: AddOnConstructor<T>;
2910
+ }>;
2911
+ get: (name: string) => AddOnConstructor<T> | undefined;
2912
+ requireLangPack: (name: string, languages?: string) => void;
2913
+ add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
2914
+ remove: (name: string) => void;
2915
+ createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
2916
+ load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
2917
+ waitFor: (name: string, state?: WaitState) => Promise<void>;
2918
+ }
2919
+ interface RangeUtils {
2920
+ walk: (rng: Range, callback: (nodes: Node[]) => void) => void;
2921
+ split: (rng: Range) => RangeLikeObject;
2922
+ normalize: (rng: Range) => boolean;
2923
+ expand: (rng: Range, options?: {
2924
+ type: 'word';
2925
+ }) => Range;
2926
+ }
2927
+ interface ScriptLoaderSettings {
2928
+ referrerPolicy?: ReferrerPolicy;
2929
+ }
2930
+ interface ScriptLoaderConstructor {
2931
+ readonly prototype: ScriptLoader;
2932
+ new (): ScriptLoader;
2933
+ ScriptLoader: ScriptLoader;
2934
+ }
2935
+ declare class ScriptLoader {
2936
+ static ScriptLoader: ScriptLoader;
2937
+ private settings;
2938
+ private states;
2939
+ private queue;
2940
+ private scriptLoadedCallbacks;
2941
+ private queueLoadedCallbacks;
2942
+ private loading;
2943
+ constructor(settings?: ScriptLoaderSettings);
2944
+ _setReferrerPolicy(referrerPolicy: ReferrerPolicy): void;
2945
+ loadScript(url: string): Promise<void>;
2946
+ isDone(url: string): boolean;
2947
+ markDone(url: string): void;
2948
+ add(url: string): Promise<void>;
2949
+ load(url: string): Promise<void>;
2950
+ remove(url: string): void;
2951
+ loadQueue(): Promise<void>;
2952
+ loadScripts(scripts: string[]): Promise<void>;
2953
+ }
2954
+ type TextProcessCallback = (node: Text, offset: number, text: string) => number;
2955
+ interface Spot {
2956
+ container: Text;
2957
+ offset: number;
2958
+ }
2959
+ interface TextSeeker {
2960
+ backwards: (node: Node, offset: number, process: TextProcessCallback, root?: Node) => Spot | null;
2961
+ forwards: (node: Node, offset: number, process: TextProcessCallback, root?: Node) => Spot | null;
2962
+ }
2963
+ interface DomTreeWalkerConstructor {
2964
+ readonly prototype: DomTreeWalker;
2965
+ new (startNode: Node, rootNode: Node): DomTreeWalker;
2966
+ }
2967
+ declare class DomTreeWalker {
2968
+ private readonly rootNode;
2969
+ private node;
2970
+ constructor(startNode: Node, rootNode: Node);
2971
+ current(): Node | null | undefined;
2972
+ next(shallow?: boolean): Node | null | undefined;
2973
+ prev(shallow?: boolean): Node | null | undefined;
2974
+ prev2(shallow?: boolean): Node | null | undefined;
2975
+ private findSibling;
2976
+ private findPreviousNode;
2977
+ }
2978
+ interface Version {
2979
+ major: number;
2980
+ minor: number;
2981
+ }
2982
+ interface Env {
2983
+ transparentSrc: string;
2984
+ documentMode: number;
2985
+ cacheSuffix: any;
2986
+ container: any;
2987
+ canHaveCSP: boolean;
2988
+ windowsPhone: boolean;
2989
+ browser: {
2990
+ current: string | undefined;
2991
+ version: Version;
2992
+ isEdge: () => boolean;
2993
+ isChromium: () => boolean;
2994
+ isIE: () => boolean;
2995
+ isOpera: () => boolean;
2996
+ isFirefox: () => boolean;
2997
+ isSafari: () => boolean;
2998
+ };
2999
+ os: {
3000
+ current: string | undefined;
3001
+ version: Version;
3002
+ isWindows: () => boolean;
3003
+ isiOS: () => boolean;
3004
+ isAndroid: () => boolean;
3005
+ isMacOS: () => boolean;
3006
+ isLinux: () => boolean;
3007
+ isSolaris: () => boolean;
3008
+ isFreeBSD: () => boolean;
3009
+ isChromeOS: () => boolean;
3010
+ };
3011
+ deviceType: {
3012
+ isiPad: () => boolean;
3013
+ isiPhone: () => boolean;
3014
+ isTablet: () => boolean;
3015
+ isPhone: () => boolean;
3016
+ isTouch: () => boolean;
3017
+ isWebView: () => boolean;
3018
+ isDesktop: () => boolean;
3019
+ };
3020
+ }
3021
+ interface FakeClipboardItem {
3022
+ readonly items: Record<string, any>;
3023
+ readonly types: ReadonlyArray<string>;
3024
+ readonly getType: <D = any>(type: string) => D | undefined;
3025
+ }
3026
+ interface FakeClipboard {
3027
+ readonly FakeClipboardItem: (items: Record<string, any>) => FakeClipboardItem;
3028
+ readonly write: (data: FakeClipboardItem[]) => void;
3029
+ readonly read: () => FakeClipboardItem[] | undefined;
3030
+ readonly clear: () => void;
3031
+ }
3032
+ interface FocusManager {
3033
+ isEditorUIElement: (elm: Element) => boolean;
3034
+ }
3035
+ interface EntitiesMap {
3036
+ [name: string]: string;
3037
+ }
3038
+ interface Entities {
3039
+ encodeRaw: (text: string, attr?: boolean) => string;
3040
+ encodeAllRaw: (text: string) => string;
3041
+ encodeNumeric: (text: string, attr?: boolean) => string;
3042
+ encodeNamed: (text: string, attr?: boolean, entities?: EntitiesMap) => string;
3043
+ getEncodeFunc: (name: string, entities?: string) => (text: string, attr?: boolean) => string;
3044
+ decode: (text: string) => string;
3045
+ }
3046
+ interface IconPack {
3047
+ icons: Record<string, string>;
3048
+ }
3049
+ interface IconManager {
3050
+ add: (id: string, iconPack: IconPack) => void;
3051
+ get: (id: string) => IconPack;
3052
+ has: (id: string) => boolean;
3053
+ }
3054
+ interface Resource {
3055
+ load: <T = any>(id: string, url: string) => Promise<T>;
3056
+ add: (id: string, data: any) => void;
3057
+ has: (id: string) => boolean;
3058
+ get: (id: string) => any;
3059
+ unload: (id: string) => void;
3060
+ }
3061
+ type TextPatterns_d_Pattern = Pattern;
3062
+ type TextPatterns_d_RawPattern = RawPattern;
3063
+ type TextPatterns_d_DynamicPatternsLookup = DynamicPatternsLookup;
3064
+ type TextPatterns_d_RawDynamicPatternsLookup = RawDynamicPatternsLookup;
3065
+ type TextPatterns_d_DynamicPatternContext = DynamicPatternContext;
3066
+ type TextPatterns_d_BlockCmdPattern = BlockCmdPattern;
3067
+ type TextPatterns_d_BlockPattern = BlockPattern;
3068
+ type TextPatterns_d_BlockFormatPattern = BlockFormatPattern;
3069
+ type TextPatterns_d_InlineCmdPattern = InlineCmdPattern;
3070
+ type TextPatterns_d_InlinePattern = InlinePattern;
3071
+ type TextPatterns_d_InlineFormatPattern = InlineFormatPattern;
3072
+ declare namespace TextPatterns_d {
3073
+ export { TextPatterns_d_Pattern as Pattern, TextPatterns_d_RawPattern as RawPattern, TextPatterns_d_DynamicPatternsLookup as DynamicPatternsLookup, TextPatterns_d_RawDynamicPatternsLookup as RawDynamicPatternsLookup, TextPatterns_d_DynamicPatternContext as DynamicPatternContext, TextPatterns_d_BlockCmdPattern as BlockCmdPattern, TextPatterns_d_BlockPattern as BlockPattern, TextPatterns_d_BlockFormatPattern as BlockFormatPattern, TextPatterns_d_InlineCmdPattern as InlineCmdPattern, TextPatterns_d_InlinePattern as InlinePattern, TextPatterns_d_InlineFormatPattern as InlineFormatPattern, };
3074
+ }
3075
+ interface Delay {
3076
+ setEditorInterval: (editor: Editor, callback: () => void, time?: number) => number;
3077
+ setEditorTimeout: (editor: Editor, callback: () => void, time?: number) => number;
3078
+ }
3079
+ type UploadResult = UploadResult$2;
3080
+ interface ImageUploader {
3081
+ upload: (blobInfos: BlobInfo[], showNotification?: boolean) => Promise<UploadResult[]>;
3082
+ }
3083
+ type ArrayCallback$1<T, R> = (this: any, x: T, i: number, xs: ArrayLike<T>) => R;
3084
+ type ObjCallback$1<T, R> = (this: any, value: T, key: string, obj: Record<string, T>) => R;
3085
+ type ArrayCallback<T, R> = ArrayCallback$1<T, R>;
3086
+ type ObjCallback<T, R> = ObjCallback$1<T, R>;
3087
+ type WalkCallback<T> = (this: any, o: T, i: string, n: keyof T | undefined) => boolean | void;
3088
+ interface Tools {
3089
+ is: (obj: any, type?: string) => boolean;
3090
+ isArray: <T>(arr: any) => arr is Array<T>;
3091
+ inArray: <T>(arr: ArrayLike<T>, value: T) => number;
3092
+ grep: {
3093
+ <T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback<T, boolean>): T[];
3094
+ <T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback<T, boolean>): T[];
3095
+ };
3096
+ trim: (str: string | null | undefined) => string;
3097
+ toArray: <T>(obj: ArrayLike<T>) => T[];
3098
+ hasOwn: (obj: any, name: string) => boolean;
3099
+ makeMap: (items: ArrayLike<string> | string | undefined, delim?: string | RegExp, map?: Record<string, {}>) => Record<string, {}>;
3100
+ each: {
3101
+ <T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, void | boolean>, scope?: any): boolean;
3102
+ <T>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, void | boolean>, scope?: any): boolean;
3103
+ };
3104
+ map: {
3105
+ <T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
3106
+ <T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
3107
+ };
3108
+ extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
3109
+ walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
3110
+ resolve: (path: string, o?: Object) => any;
3111
+ explode: (s: string | string[], d?: string | RegExp) => string[];
3112
+ _addCacheSuffix: (url: string) => string;
3113
+ }
3114
+ interface KeyboardLikeEvent {
3115
+ shiftKey: boolean;
3116
+ ctrlKey: boolean;
3117
+ altKey: boolean;
3118
+ metaKey: boolean;
3119
+ }
3120
+ interface VK {
3121
+ BACKSPACE: number;
3122
+ DELETE: number;
3123
+ DOWN: number;
3124
+ ENTER: number;
3125
+ ESC: number;
3126
+ LEFT: number;
3127
+ RIGHT: number;
3128
+ SPACEBAR: number;
3129
+ TAB: number;
3130
+ UP: number;
3131
+ PAGE_UP: number;
3132
+ PAGE_DOWN: number;
3133
+ END: number;
3134
+ HOME: number;
3135
+ modifierPressed: (e: KeyboardLikeEvent) => boolean;
3136
+ metaKeyPressed: (e: KeyboardLikeEvent) => boolean;
3137
+ }
3138
+ interface DOMUtilsNamespace {
3139
+ (doc: Document, settings: Partial<DOMUtilsSettings>): DOMUtils;
3140
+ DOM: DOMUtils;
3141
+ nodeIndex: (node: Node, normalized?: boolean) => number;
3142
+ }
3143
+ interface RangeUtilsNamespace {
3144
+ (dom: DOMUtils): RangeUtils;
3145
+ compareRanges: (rng1: RangeLikeObject, rng2: RangeLikeObject) => boolean;
3146
+ getCaretRangeFromPoint: (clientX: number, clientY: number, doc: Document) => Range;
3147
+ getSelectedNode: (range: Range) => Node;
3148
+ getNode: (container: Node, offset: number) => Node;
3149
+ }
3150
+ interface AddOnManagerNamespace {
3151
+ <T>(): AddOnManager<T>;
3152
+ language: string | undefined;
3153
+ languageLoad: boolean;
3154
+ baseURL: string;
3155
+ PluginManager: PluginManager;
3156
+ ThemeManager: ThemeManager;
3157
+ ModelManager: ModelManager;
3158
+ }
3159
+ interface BookmarkManagerNamespace {
3160
+ (selection: EditorSelection): BookmarkManager;
3161
+ isBookmarkNode: (node: Node) => boolean;
3162
+ }
3163
+ interface TinyMCE extends EditorManager {
3164
+ geom: {
3165
+ Rect: Rect;
3166
+ };
3167
+ util: {
3168
+ Delay: Delay;
3169
+ Tools: Tools;
3170
+ VK: VK;
3171
+ URI: URIConstructor;
3172
+ EventDispatcher: EventDispatcherConstructor<any>;
3173
+ Observable: Observable<any>;
3174
+ I18n: I18n;
3175
+ LocalStorage: Storage;
3176
+ ImageUploader: ImageUploader;
3177
+ };
3178
+ dom: {
3179
+ EventUtils: EventUtilsConstructor;
3180
+ TreeWalker: DomTreeWalkerConstructor;
3181
+ TextSeeker: (dom: DOMUtils, isBlockBoundary?: (node: Node) => boolean) => TextSeeker;
3182
+ DOMUtils: DOMUtilsNamespace;
3183
+ ScriptLoader: ScriptLoaderConstructor;
3184
+ RangeUtils: RangeUtilsNamespace;
3185
+ Serializer: (settings: DomSerializerSettings, editor?: Editor) => DomSerializer;
3186
+ ControlSelection: (selection: EditorSelection, editor: Editor) => ControlSelection;
3187
+ BookmarkManager: BookmarkManagerNamespace;
3188
+ Selection: (dom: DOMUtils, win: Window, serializer: DomSerializer, editor: Editor) => EditorSelection;
3189
+ StyleSheetLoader: (documentOrShadowRoot: Document | ShadowRoot, settings: StyleSheetLoaderSettings) => StyleSheetLoader;
3190
+ Event: EventUtils;
3191
+ };
3192
+ html: {
3193
+ Styles: (settings?: StylesSettings, schema?: Schema) => Styles;
3194
+ Entities: Entities;
3195
+ Node: AstNodeConstructor;
3196
+ Schema: (settings?: SchemaSettings) => Schema;
3197
+ DomParser: (settings?: DomParserSettings, schema?: Schema) => DomParser;
3198
+ Writer: (settings?: WriterSettings) => Writer;
3199
+ Serializer: (settings?: HtmlSerializerSettings, schema?: Schema) => HtmlSerializer;
3200
+ };
3201
+ AddOnManager: AddOnManagerNamespace;
3202
+ Annotator: (editor: Editor) => Annotator;
3203
+ Editor: EditorConstructor;
3204
+ EditorCommands: EditorCommandsConstructor;
3205
+ EditorManager: EditorManager;
3206
+ EditorObservable: EditorObservable;
3207
+ Env: Env;
3208
+ FocusManager: FocusManager;
3209
+ Formatter: (editor: Editor) => Formatter;
3210
+ NotificationManager: (editor: Editor) => NotificationManager;
3211
+ Shortcuts: ShortcutsConstructor;
3212
+ UndoManager: (editor: Editor) => UndoManager;
3213
+ WindowManager: (editor: Editor) => WindowManager;
3214
+ DOM: DOMUtils;
3215
+ ScriptLoader: ScriptLoader;
3216
+ PluginManager: PluginManager;
3217
+ ThemeManager: ThemeManager;
3218
+ ModelManager: ModelManager;
3219
+ IconManager: IconManager;
3220
+ Resource: Resource;
3221
+ FakeClipboard: FakeClipboard;
3222
+ trim: Tools['trim'];
3223
+ isArray: Tools['isArray'];
3224
+ is: Tools['is'];
3225
+ toArray: Tools['toArray'];
3226
+ makeMap: Tools['makeMap'];
3227
+ each: Tools['each'];
3228
+ map: Tools['map'];
3229
+ grep: Tools['grep'];
3230
+ inArray: Tools['inArray'];
3231
+ extend: Tools['extend'];
3232
+ walk: Tools['walk'];
3233
+ resolve: Tools['resolve'];
3234
+ explode: Tools['explode'];
3235
+ _addCacheSuffix: Tools['_addCacheSuffix'];
3236
+ }
3237
+ declare const tinymce: TinyMCE;
3238
+ export { AddOnManager, Annotator, AstNode, Bookmark, BookmarkManager, ControlSelection, DOMUtils, Delay, DomParser, DomParserSettings, DomSerializer, DomSerializerSettings, DomTreeWalker, Editor, EditorCommands, EditorEvent, EditorManager, EditorModeApi, EditorObservable, EditorOptions, EditorSelection, Entities, Env, EventDispatcher, EventUtils, EventTypes_d as Events, FakeClipboard, FocusManager, Format_d as Formats, Formatter, GeomRect, HtmlSerializer, HtmlSerializerSettings, I18n, IconManager, Model, ModelManager, NotificationApi, NotificationManager, NotificationSpec, Observable, Plugin, PluginManager, RangeUtils, RawEditorOptions, Rect, Resource, Schema, SchemaSettings, ScriptLoader, Shortcuts, StyleSheetLoader, Styles, TextPatterns_d as TextPatterns, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, VK, WindowManager, Writer, WriterSettings, tinymce as default };