@ethberry/mui-lexical 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/LICENSE +16 -0
  2. package/README.md +1 -0
  3. package/dist/common/hooks/index.d.ts +1 -0
  4. package/dist/common/hooks/index.js +18 -0
  5. package/dist/common/hooks/index.js.map +1 -0
  6. package/dist/common/hooks/useModal.d.ts +2 -0
  7. package/dist/common/hooks/useModal.js +28 -0
  8. package/dist/common/hooks/useModal.js.map +1 -0
  9. package/dist/common/index.d.ts +2 -0
  10. package/dist/common/index.js +19 -0
  11. package/dist/common/index.js.map +1 -0
  12. package/dist/common/types/index.d.ts +5 -0
  13. package/dist/common/types/index.js +3 -0
  14. package/dist/common/types/index.js.map +1 -0
  15. package/dist/components/index.d.ts +1 -0
  16. package/dist/components/index.js +18 -0
  17. package/dist/components/index.js.map +1 -0
  18. package/dist/components/ui/Modal/index.d.ts +6 -0
  19. package/dist/components/ui/Modal/index.js +18 -0
  20. package/dist/components/ui/Modal/index.js.map +1 -0
  21. package/dist/components/ui/index.d.ts +1 -0
  22. package/dist/components/ui/index.js +18 -0
  23. package/dist/components/ui/index.js.map +1 -0
  24. package/dist/config/lexicalEditorConfig.d.ts +78 -0
  25. package/dist/config/lexicalEditorConfig.js +33 -0
  26. package/dist/config/lexicalEditorConfig.js.map +1 -0
  27. package/dist/config/lexicalEditorTheme.d.ts +68 -0
  28. package/dist/config/lexicalEditorTheme.js +71 -0
  29. package/dist/config/lexicalEditorTheme.js.map +1 -0
  30. package/dist/display/index.d.ts +6 -0
  31. package/dist/display/index.js +47 -0
  32. package/dist/display/index.js.map +1 -0
  33. package/dist/display/styled.d.ts +1 -0
  34. package/dist/display/styled.js +67 -0
  35. package/dist/display/styled.js.map +1 -0
  36. package/dist/editor/Editor.d.ts +16 -0
  37. package/dist/editor/Editor.js +95 -0
  38. package/dist/editor/Editor.js.map +1 -0
  39. package/dist/editor/Editor.stories.d.ts +13 -0
  40. package/dist/editor/Editor.stories.js +135 -0
  41. package/dist/editor/Editor.stories.js.map +1 -0
  42. package/dist/editor/commands/index.d.ts +4 -0
  43. package/dist/editor/commands/index.js +6 -0
  44. package/dist/editor/commands/index.js.map +1 -0
  45. package/dist/editor/constants/index.d.ts +2 -0
  46. package/dist/editor/constants/index.js +40 -0
  47. package/dist/editor/constants/index.js.map +1 -0
  48. package/dist/editor/context/SharedHistoryContext.d.ts +11 -0
  49. package/dist/editor/context/SharedHistoryContext.js +17 -0
  50. package/dist/editor/context/SharedHistoryContext.js.map +1 -0
  51. package/dist/editor/context/ToolbarContext.d.ts +56 -0
  52. package/dist/editor/context/ToolbarContext.js +67 -0
  53. package/dist/editor/context/ToolbarContext.js.map +1 -0
  54. package/dist/editor/context/index.d.ts +2 -0
  55. package/dist/editor/context/index.js +19 -0
  56. package/dist/editor/context/index.js.map +1 -0
  57. package/dist/editor/editorStyles.d.ts +1 -0
  58. package/dist/editor/editorStyles.js +1273 -0
  59. package/dist/editor/editorStyles.js.map +1 -0
  60. package/dist/editor/hooks/index.d.ts +1 -0
  61. package/dist/editor/hooks/index.js +18 -0
  62. package/dist/editor/hooks/index.js.map +1 -0
  63. package/dist/editor/hooks/useModal.d.ts +2 -0
  64. package/dist/editor/hooks/useModal.js +29 -0
  65. package/dist/editor/hooks/useModal.js.map +1 -0
  66. package/dist/editor/images/icons/3-columns.d.ts +1 -0
  67. package/dist/editor/images/icons/3-columns.js +9 -0
  68. package/dist/editor/images/icons/3-columns.js.map +1 -0
  69. package/dist/editor/images/icons/add-sign.d.ts +1 -0
  70. package/dist/editor/images/icons/add-sign.js +9 -0
  71. package/dist/editor/images/icons/add-sign.js.map +1 -0
  72. package/dist/editor/images/icons/arrow-clockwise.d.ts +1 -0
  73. package/dist/editor/images/icons/arrow-clockwise.js +9 -0
  74. package/dist/editor/images/icons/arrow-clockwise.js.map +1 -0
  75. package/dist/editor/images/icons/arrow-counterclockwise.d.ts +1 -0
  76. package/dist/editor/images/icons/arrow-counterclockwise.js +9 -0
  77. package/dist/editor/images/icons/arrow-counterclockwise.js.map +1 -0
  78. package/dist/editor/images/icons/bg-color.d.ts +1 -0
  79. package/dist/editor/images/icons/bg-color.js +9 -0
  80. package/dist/editor/images/icons/bg-color.js.map +1 -0
  81. package/dist/editor/images/icons/camera.d.ts +1 -0
  82. package/dist/editor/images/icons/camera.js +9 -0
  83. package/dist/editor/images/icons/camera.js.map +1 -0
  84. package/dist/editor/images/icons/card-checklist.d.ts +1 -0
  85. package/dist/editor/images/icons/card-checklist.js +9 -0
  86. package/dist/editor/images/icons/card-checklist.js.map +1 -0
  87. package/dist/editor/images/icons/caret-right-fill.d.ts +1 -0
  88. package/dist/editor/images/icons/caret-right-fill.js +9 -0
  89. package/dist/editor/images/icons/caret-right-fill.js.map +1 -0
  90. package/dist/editor/images/icons/chat-left-text.d.ts +1 -0
  91. package/dist/editor/images/icons/chat-left-text.js +9 -0
  92. package/dist/editor/images/icons/chat-left-text.js.map +1 -0
  93. package/dist/editor/images/icons/chat-right-dots.d.ts +1 -0
  94. package/dist/editor/images/icons/chat-right-dots.js +9 -0
  95. package/dist/editor/images/icons/chat-right-dots.js.map +1 -0
  96. package/dist/editor/images/icons/chat-right-text.d.ts +1 -0
  97. package/dist/editor/images/icons/chat-right-text.js +9 -0
  98. package/dist/editor/images/icons/chat-right-text.js.map +1 -0
  99. package/dist/editor/images/icons/chat-right.d.ts +1 -0
  100. package/dist/editor/images/icons/chat-right.js +9 -0
  101. package/dist/editor/images/icons/chat-right.js.map +1 -0
  102. package/dist/editor/images/icons/chat-square-quote.d.ts +1 -0
  103. package/dist/editor/images/icons/chat-square-quote.js +9 -0
  104. package/dist/editor/images/icons/chat-square-quote.js.map +1 -0
  105. package/dist/editor/images/icons/chevron-down.d.ts +1 -0
  106. package/dist/editor/images/icons/chevron-down.js +9 -0
  107. package/dist/editor/images/icons/chevron-down.js.map +1 -0
  108. package/dist/editor/images/icons/clipboard.d.ts +1 -0
  109. package/dist/editor/images/icons/clipboard.js +9 -0
  110. package/dist/editor/images/icons/clipboard.js.map +1 -0
  111. package/dist/editor/images/icons/close.d.ts +1 -0
  112. package/dist/editor/images/icons/close.js +9 -0
  113. package/dist/editor/images/icons/close.js.map +1 -0
  114. package/dist/editor/images/icons/code.d.ts +1 -0
  115. package/dist/editor/images/icons/code.js +9 -0
  116. package/dist/editor/images/icons/code.js.map +1 -0
  117. package/dist/editor/images/icons/comments.d.ts +1 -0
  118. package/dist/editor/images/icons/comments.js +9 -0
  119. package/dist/editor/images/icons/comments.js.map +1 -0
  120. package/dist/editor/images/icons/copy.d.ts +1 -0
  121. package/dist/editor/images/icons/copy.js +9 -0
  122. package/dist/editor/images/icons/copy.js.map +1 -0
  123. package/dist/editor/images/icons/diagram-2.d.ts +1 -0
  124. package/dist/editor/images/icons/diagram-2.js +9 -0
  125. package/dist/editor/images/icons/diagram-2.js.map +1 -0
  126. package/dist/editor/images/icons/download.d.ts +1 -0
  127. package/dist/editor/images/icons/download.js +9 -0
  128. package/dist/editor/images/icons/download.js.map +1 -0
  129. package/dist/editor/images/icons/draggable-block-menu.d.ts +1 -0
  130. package/dist/editor/images/icons/draggable-block-menu.js +9 -0
  131. package/dist/editor/images/icons/draggable-block-menu.js.map +1 -0
  132. package/dist/editor/images/icons/dropdown-more.d.ts +1 -0
  133. package/dist/editor/images/icons/dropdown-more.js +9 -0
  134. package/dist/editor/images/icons/dropdown-more.js.map +1 -0
  135. package/dist/editor/images/icons/figma.d.ts +1 -0
  136. package/dist/editor/images/icons/figma.js +9 -0
  137. package/dist/editor/images/icons/figma.js.map +1 -0
  138. package/dist/editor/images/icons/file-earmark-text.d.ts +1 -0
  139. package/dist/editor/images/icons/file-earmark-text.js +9 -0
  140. package/dist/editor/images/icons/file-earmark-text.js.map +1 -0
  141. package/dist/editor/images/icons/file-image.d.ts +1 -0
  142. package/dist/editor/images/icons/file-image.js +9 -0
  143. package/dist/editor/images/icons/file-image.js.map +1 -0
  144. package/dist/editor/images/icons/filetype-gif.d.ts +1 -0
  145. package/dist/editor/images/icons/filetype-gif.js +9 -0
  146. package/dist/editor/images/icons/filetype-gif.js.map +1 -0
  147. package/dist/editor/images/icons/font-color.d.ts +1 -0
  148. package/dist/editor/images/icons/font-color.js +9 -0
  149. package/dist/editor/images/icons/font-color.js.map +1 -0
  150. package/dist/editor/images/icons/font-family.d.ts +1 -0
  151. package/dist/editor/images/icons/font-family.js +9 -0
  152. package/dist/editor/images/icons/font-family.js.map +1 -0
  153. package/dist/editor/images/icons/format-clear.d.ts +1 -0
  154. package/dist/editor/images/icons/format-clear.js +9 -0
  155. package/dist/editor/images/icons/format-clear.js.map +1 -0
  156. package/dist/editor/images/icons/highlighter.d.ts +1 -0
  157. package/dist/editor/images/icons/highlighter.js +9 -0
  158. package/dist/editor/images/icons/highlighter.js.map +1 -0
  159. package/dist/editor/images/icons/horizontal-rule.d.ts +1 -0
  160. package/dist/editor/images/icons/horizontal-rule.js +9 -0
  161. package/dist/editor/images/icons/horizontal-rule.js.map +1 -0
  162. package/dist/editor/images/icons/indent.d.ts +1 -0
  163. package/dist/editor/images/icons/indent.js +9 -0
  164. package/dist/editor/images/icons/indent.js.map +1 -0
  165. package/dist/editor/images/icons/index.d.ts +88 -0
  166. package/dist/editor/images/icons/index.js +105 -0
  167. package/dist/editor/images/icons/index.js.map +1 -0
  168. package/dist/editor/images/icons/journal-text.d.ts +1 -0
  169. package/dist/editor/images/icons/journal-text.js +9 -0
  170. package/dist/editor/images/icons/journal-text.js.map +1 -0
  171. package/dist/editor/images/icons/justify.d.ts +1 -0
  172. package/dist/editor/images/icons/justify.js +9 -0
  173. package/dist/editor/images/icons/justify.js.map +1 -0
  174. package/dist/editor/images/icons/link.d.ts +1 -0
  175. package/dist/editor/images/icons/link.js +9 -0
  176. package/dist/editor/images/icons/link.js.map +1 -0
  177. package/dist/editor/images/icons/list-ol.d.ts +1 -0
  178. package/dist/editor/images/icons/list-ol.js +9 -0
  179. package/dist/editor/images/icons/list-ol.js.map +1 -0
  180. package/dist/editor/images/icons/list-ul.d.ts +1 -0
  181. package/dist/editor/images/icons/list-ul.js +9 -0
  182. package/dist/editor/images/icons/list-ul.js.map +1 -0
  183. package/dist/editor/images/icons/lock-fill.d.ts +1 -0
  184. package/dist/editor/images/icons/lock-fill.js +9 -0
  185. package/dist/editor/images/icons/lock-fill.js.map +1 -0
  186. package/dist/editor/images/icons/lock.d.ts +1 -0
  187. package/dist/editor/images/icons/lock.js +9 -0
  188. package/dist/editor/images/icons/lock.js.map +1 -0
  189. package/dist/editor/images/icons/markdown.d.ts +1 -0
  190. package/dist/editor/images/icons/markdown.js +9 -0
  191. package/dist/editor/images/icons/markdown.js.map +1 -0
  192. package/dist/editor/images/icons/mic.d.ts +1 -0
  193. package/dist/editor/images/icons/mic.js +9 -0
  194. package/dist/editor/images/icons/mic.js.map +1 -0
  195. package/dist/editor/images/icons/minus-sign.d.ts +1 -0
  196. package/dist/editor/images/icons/minus-sign.js +9 -0
  197. package/dist/editor/images/icons/minus-sign.js.map +1 -0
  198. package/dist/editor/images/icons/outdent.d.ts +1 -0
  199. package/dist/editor/images/icons/outdent.js +9 -0
  200. package/dist/editor/images/icons/outdent.js.map +1 -0
  201. package/dist/editor/images/icons/paint-bucket.d.ts +1 -0
  202. package/dist/editor/images/icons/paint-bucket.js +9 -0
  203. package/dist/editor/images/icons/paint-bucket.js.map +1 -0
  204. package/dist/editor/images/icons/palette.d.ts +1 -0
  205. package/dist/editor/images/icons/palette.js +9 -0
  206. package/dist/editor/images/icons/palette.js.map +1 -0
  207. package/dist/editor/images/icons/pencil-fill.d.ts +1 -0
  208. package/dist/editor/images/icons/pencil-fill.js +9 -0
  209. package/dist/editor/images/icons/pencil-fill.js.map +1 -0
  210. package/dist/editor/images/icons/plug-fill.d.ts +1 -0
  211. package/dist/editor/images/icons/plug-fill.js +9 -0
  212. package/dist/editor/images/icons/plug-fill.js.map +1 -0
  213. package/dist/editor/images/icons/plug.d.ts +1 -0
  214. package/dist/editor/images/icons/plug.js +9 -0
  215. package/dist/editor/images/icons/plug.js.map +1 -0
  216. package/dist/editor/images/icons/plus-slash-minus.d.ts +1 -0
  217. package/dist/editor/images/icons/plus-slash-minus.js +9 -0
  218. package/dist/editor/images/icons/plus-slash-minus.js.map +1 -0
  219. package/dist/editor/images/icons/plus.d.ts +1 -0
  220. package/dist/editor/images/icons/plus.js +9 -0
  221. package/dist/editor/images/icons/plus.js.map +1 -0
  222. package/dist/editor/images/icons/prettier-error.d.ts +1 -0
  223. package/dist/editor/images/icons/prettier-error.js +9 -0
  224. package/dist/editor/images/icons/prettier-error.js.map +1 -0
  225. package/dist/editor/images/icons/prettier.d.ts +1 -0
  226. package/dist/editor/images/icons/prettier.js +9 -0
  227. package/dist/editor/images/icons/prettier.js.map +1 -0
  228. package/dist/editor/images/icons/scissors.d.ts +1 -0
  229. package/dist/editor/images/icons/scissors.js +9 -0
  230. package/dist/editor/images/icons/scissors.js.map +1 -0
  231. package/dist/editor/images/icons/send.d.ts +1 -0
  232. package/dist/editor/images/icons/send.js +9 -0
  233. package/dist/editor/images/icons/send.js.map +1 -0
  234. package/dist/editor/images/icons/square-check.d.ts +1 -0
  235. package/dist/editor/images/icons/square-check.js +9 -0
  236. package/dist/editor/images/icons/square-check.js.map +1 -0
  237. package/dist/editor/images/icons/sticky.d.ts +1 -0
  238. package/dist/editor/images/icons/sticky.js +9 -0
  239. package/dist/editor/images/icons/sticky.js.map +1 -0
  240. package/dist/editor/images/icons/success-alt.d.ts +1 -0
  241. package/dist/editor/images/icons/success-alt.js +9 -0
  242. package/dist/editor/images/icons/success-alt.js.map +1 -0
  243. package/dist/editor/images/icons/success.d.ts +1 -0
  244. package/dist/editor/images/icons/success.js +9 -0
  245. package/dist/editor/images/icons/success.js.map +1 -0
  246. package/dist/editor/images/icons/table.d.ts +1 -0
  247. package/dist/editor/images/icons/table.js +9 -0
  248. package/dist/editor/images/icons/table.js.map +1 -0
  249. package/dist/editor/images/icons/text-center.d.ts +1 -0
  250. package/dist/editor/images/icons/text-center.js +9 -0
  251. package/dist/editor/images/icons/text-center.js.map +1 -0
  252. package/dist/editor/images/icons/text-left.d.ts +1 -0
  253. package/dist/editor/images/icons/text-left.js +9 -0
  254. package/dist/editor/images/icons/text-left.js.map +1 -0
  255. package/dist/editor/images/icons/text-paragraph.d.ts +1 -0
  256. package/dist/editor/images/icons/text-paragraph.js +9 -0
  257. package/dist/editor/images/icons/text-paragraph.js.map +1 -0
  258. package/dist/editor/images/icons/text-right.d.ts +1 -0
  259. package/dist/editor/images/icons/text-right.js +9 -0
  260. package/dist/editor/images/icons/text-right.js.map +1 -0
  261. package/dist/editor/images/icons/trash.d.ts +1 -0
  262. package/dist/editor/images/icons/trash.js +9 -0
  263. package/dist/editor/images/icons/trash.js.map +1 -0
  264. package/dist/editor/images/icons/trash3.d.ts +1 -0
  265. package/dist/editor/images/icons/trash3.js +9 -0
  266. package/dist/editor/images/icons/trash3.js.map +1 -0
  267. package/dist/editor/images/icons/type-bold.d.ts +1 -0
  268. package/dist/editor/images/icons/type-bold.js +9 -0
  269. package/dist/editor/images/icons/type-bold.js.map +1 -0
  270. package/dist/editor/images/icons/type-capitalize.d.ts +1 -0
  271. package/dist/editor/images/icons/type-capitalize.js +9 -0
  272. package/dist/editor/images/icons/type-capitalize.js.map +1 -0
  273. package/dist/editor/images/icons/type-h1.d.ts +1 -0
  274. package/dist/editor/images/icons/type-h1.js +9 -0
  275. package/dist/editor/images/icons/type-h1.js.map +1 -0
  276. package/dist/editor/images/icons/type-h2.d.ts +1 -0
  277. package/dist/editor/images/icons/type-h2.js +9 -0
  278. package/dist/editor/images/icons/type-h2.js.map +1 -0
  279. package/dist/editor/images/icons/type-h3.d.ts +1 -0
  280. package/dist/editor/images/icons/type-h3.js +9 -0
  281. package/dist/editor/images/icons/type-h3.js.map +1 -0
  282. package/dist/editor/images/icons/type-h4.d.ts +1 -0
  283. package/dist/editor/images/icons/type-h4.js +9 -0
  284. package/dist/editor/images/icons/type-h4.js.map +1 -0
  285. package/dist/editor/images/icons/type-h5.d.ts +1 -0
  286. package/dist/editor/images/icons/type-h5.js +9 -0
  287. package/dist/editor/images/icons/type-h5.js.map +1 -0
  288. package/dist/editor/images/icons/type-h6.d.ts +1 -0
  289. package/dist/editor/images/icons/type-h6.js +9 -0
  290. package/dist/editor/images/icons/type-h6.js.map +1 -0
  291. package/dist/editor/images/icons/type-italic.d.ts +1 -0
  292. package/dist/editor/images/icons/type-italic.js +9 -0
  293. package/dist/editor/images/icons/type-italic.js.map +1 -0
  294. package/dist/editor/images/icons/type-lowercase.d.ts +1 -0
  295. package/dist/editor/images/icons/type-lowercase.js +9 -0
  296. package/dist/editor/images/icons/type-lowercase.js.map +1 -0
  297. package/dist/editor/images/icons/type-strikethrough.d.ts +1 -0
  298. package/dist/editor/images/icons/type-strikethrough.js +9 -0
  299. package/dist/editor/images/icons/type-strikethrough.js.map +1 -0
  300. package/dist/editor/images/icons/type-subscript.d.ts +1 -0
  301. package/dist/editor/images/icons/type-subscript.js +9 -0
  302. package/dist/editor/images/icons/type-subscript.js.map +1 -0
  303. package/dist/editor/images/icons/type-superscript.d.ts +1 -0
  304. package/dist/editor/images/icons/type-superscript.js +9 -0
  305. package/dist/editor/images/icons/type-superscript.js.map +1 -0
  306. package/dist/editor/images/icons/type-underline.d.ts +1 -0
  307. package/dist/editor/images/icons/type-underline.js +9 -0
  308. package/dist/editor/images/icons/type-underline.js.map +1 -0
  309. package/dist/editor/images/icons/type-uppercase.d.ts +1 -0
  310. package/dist/editor/images/icons/type-uppercase.js +9 -0
  311. package/dist/editor/images/icons/type-uppercase.js.map +1 -0
  312. package/dist/editor/images/icons/upload.d.ts +1 -0
  313. package/dist/editor/images/icons/upload.js +9 -0
  314. package/dist/editor/images/icons/upload.js.map +1 -0
  315. package/dist/editor/images/icons/user.d.ts +1 -0
  316. package/dist/editor/images/icons/user.js +9 -0
  317. package/dist/editor/images/icons/user.js.map +1 -0
  318. package/dist/editor/images/icons/vertical-bottom.d.ts +1 -0
  319. package/dist/editor/images/icons/vertical-bottom.js +9 -0
  320. package/dist/editor/images/icons/vertical-bottom.js.map +1 -0
  321. package/dist/editor/images/icons/vertical-middle.d.ts +1 -0
  322. package/dist/editor/images/icons/vertical-middle.js +9 -0
  323. package/dist/editor/images/icons/vertical-middle.js.map +1 -0
  324. package/dist/editor/images/icons/vertical-top.d.ts +1 -0
  325. package/dist/editor/images/icons/vertical-top.js +9 -0
  326. package/dist/editor/images/icons/vertical-top.js.map +1 -0
  327. package/dist/editor/images/icons/x.d.ts +1 -0
  328. package/dist/editor/images/icons/x.js +9 -0
  329. package/dist/editor/images/icons/x.js.map +1 -0
  330. package/dist/editor/images/icons/youtube.d.ts +1 -0
  331. package/dist/editor/images/icons/youtube.js +9 -0
  332. package/dist/editor/images/icons/youtube.js.map +1 -0
  333. package/dist/editor/index.d.ts +1 -0
  334. package/dist/editor/index.js +6 -0
  335. package/dist/editor/index.js.map +1 -0
  336. package/dist/editor/nodes/Image/ImageComponent.d.ts +15 -0
  337. package/dist/editor/nodes/Image/ImageComponent.js +248 -0
  338. package/dist/editor/nodes/Image/ImageComponent.js.map +1 -0
  339. package/dist/editor/nodes/Image/ImageNode.d.ts +50 -0
  340. package/dist/editor/nodes/Image/ImageNode.js +128 -0
  341. package/dist/editor/nodes/Image/ImageNode.js.map +1 -0
  342. package/dist/editor/nodes/Image/imageNodeStyles.d.ts +1 -0
  343. package/dist/editor/nodes/Image/imageNodeStyles.js +41 -0
  344. package/dist/editor/nodes/Image/imageNodeStyles.js.map +1 -0
  345. package/dist/editor/nodes/Image/index.d.ts +3 -0
  346. package/dist/editor/nodes/Image/index.js +10 -0
  347. package/dist/editor/nodes/Image/index.js.map +1 -0
  348. package/dist/editor/nodes/InlineImage/InlineImageComponent.d.ts +18 -0
  349. package/dist/editor/nodes/InlineImage/InlineImageComponent.js +160 -0
  350. package/dist/editor/nodes/InlineImage/InlineImageComponent.js.map +1 -0
  351. package/dist/editor/nodes/InlineImage/InlineImageNode.d.ts +59 -0
  352. package/dist/editor/nodes/InlineImage/InlineImageNode.js +149 -0
  353. package/dist/editor/nodes/InlineImage/InlineImageNode.js.map +1 -0
  354. package/dist/editor/nodes/InlineImage/index.d.ts +3 -0
  355. package/dist/editor/nodes/InlineImage/index.js +10 -0
  356. package/dist/editor/nodes/InlineImage/index.js.map +1 -0
  357. package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.d.ts +1 -0
  358. package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.js +90 -0
  359. package/dist/editor/nodes/InlineImage/inlineImageNodeStyles.js.map +1 -0
  360. package/dist/editor/nodes/PlaygroundNodes.d.ts +2 -0
  361. package/dist/editor/nodes/PlaygroundNodes.js +32 -0
  362. package/dist/editor/nodes/PlaygroundNodes.js.map +1 -0
  363. package/dist/editor/nodes/Video/VideoComponent.d.ts +9 -0
  364. package/dist/editor/nodes/Video/VideoComponent.js +15 -0
  365. package/dist/editor/nodes/Video/VideoComponent.js.map +1 -0
  366. package/dist/editor/nodes/Video/VideoNode.d.ts +34 -0
  367. package/dist/editor/nodes/Video/VideoNode.js +129 -0
  368. package/dist/editor/nodes/Video/VideoNode.js.map +1 -0
  369. package/dist/editor/nodes/Video/index.d.ts +3 -0
  370. package/dist/editor/nodes/Video/index.js +10 -0
  371. package/dist/editor/nodes/Video/index.js.map +1 -0
  372. package/dist/editor/nodes/Video/videoNodeStyles.d.ts +1 -0
  373. package/dist/editor/nodes/Video/videoNodeStyles.js +44 -0
  374. package/dist/editor/nodes/Video/videoNodeStyles.js.map +1 -0
  375. package/dist/editor/nodes/index.d.ts +4 -0
  376. package/dist/editor/nodes/index.js +21 -0
  377. package/dist/editor/nodes/index.js.map +1 -0
  378. package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.d.ts +1 -0
  379. package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.js +68 -0
  380. package/dist/editor/plugins/CodeActionMenuPlugin/codeActionMenuPluginStyles.js.map +1 -0
  381. package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.d.ts +7 -0
  382. package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.js +48 -0
  383. package/dist/editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.js.map +1 -0
  384. package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +9 -0
  385. package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js +136 -0
  386. package/dist/editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.js.map +1 -0
  387. package/dist/editor/plugins/CodeActionMenuPlugin/components/index.d.ts +2 -0
  388. package/dist/editor/plugins/CodeActionMenuPlugin/components/index.js +19 -0
  389. package/dist/editor/plugins/CodeActionMenuPlugin/components/index.js.map +1 -0
  390. package/dist/editor/plugins/CodeActionMenuPlugin/index.d.ts +12 -0
  391. package/dist/editor/plugins/CodeActionMenuPlugin/index.js +118 -0
  392. package/dist/editor/plugins/CodeActionMenuPlugin/index.js.map +1 -0
  393. package/dist/editor/plugins/CodeActionMenuPlugin/utils.d.ts +1 -0
  394. package/dist/editor/plugins/CodeActionMenuPlugin/utils.js +15 -0
  395. package/dist/editor/plugins/CodeActionMenuPlugin/utils.js.map +1 -0
  396. package/dist/editor/plugins/CodeHighlightPlugin/index.d.ts +2 -0
  397. package/dist/editor/plugins/CodeHighlightPlugin/index.js +15 -0
  398. package/dist/editor/plugins/CodeHighlightPlugin/index.js.map +1 -0
  399. package/dist/editor/plugins/ComponentPickerPlugin/index.d.ts +9 -0
  400. package/dist/editor/plugins/ComponentPickerPlugin/index.js +217 -0
  401. package/dist/editor/plugins/ComponentPickerPlugin/index.js.map +1 -0
  402. package/dist/editor/plugins/ContextMenuPlugin/index.d.ts +18 -0
  403. package/dist/editor/plugins/ContextMenuPlugin/index.js +190 -0
  404. package/dist/editor/plugins/ContextMenuPlugin/index.js.map +1 -0
  405. package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.d.ts +1 -0
  406. package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.js +48 -0
  407. package/dist/editor/plugins/FloatingLinkEditorPlugin/floatLinkEditorPluginStyles.js.map +1 -0
  408. package/dist/editor/plugins/FloatingLinkEditorPlugin/index.d.ts +14 -0
  409. package/dist/editor/plugins/FloatingLinkEditorPlugin/index.js +275 -0
  410. package/dist/editor/plugins/FloatingLinkEditorPlugin/index.js.map +1 -0
  411. package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.d.ts +1 -0
  412. package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.js +141 -0
  413. package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/floatTextFormatToolbarPluginStyles.js.map +1 -0
  414. package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +15 -0
  415. package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.js +214 -0
  416. package/dist/editor/plugins/FloatingTextFormatToolbarPlugin/index.js.map +1 -0
  417. package/dist/editor/plugins/ImagesPlugin/index.d.ts +28 -0
  418. package/dist/editor/plugins/ImagesPlugin/index.js +175 -0
  419. package/dist/editor/plugins/ImagesPlugin/index.js.map +1 -0
  420. package/dist/editor/plugins/LinkPlugin/index.d.ts +9 -0
  421. package/dist/editor/plugins/LinkPlugin/index.js +14 -0
  422. package/dist/editor/plugins/LinkPlugin/index.js.map +1 -0
  423. package/dist/editor/plugins/MarkdownShortcutPlugin/index.d.ts +9 -0
  424. package/dist/editor/plugins/MarkdownShortcutPlugin/index.js +11 -0
  425. package/dist/editor/plugins/MarkdownShortcutPlugin/index.js.map +1 -0
  426. package/dist/editor/plugins/MarkdownTransformers/index.d.ts +5 -0
  427. package/dist/editor/plugins/MarkdownTransformers/index.js +181 -0
  428. package/dist/editor/plugins/MarkdownTransformers/index.js.map +1 -0
  429. package/dist/editor/plugins/MaxLengthPlugin/index.d.ts +10 -0
  430. package/dist/editor/plugins/MaxLengthPlugin/index.js +48 -0
  431. package/dist/editor/plugins/MaxLengthPlugin/index.js.map +1 -0
  432. package/dist/editor/plugins/ShortcutsPlugin/index.d.ts +13 -0
  433. package/dist/editor/plugins/ShortcutsPlugin/index.js +102 -0
  434. package/dist/editor/plugins/ShortcutsPlugin/index.js.map +1 -0
  435. package/dist/editor/plugins/ShortcutsPlugin/shortcuts.d.ts +56 -0
  436. package/dist/editor/plugins/ShortcutsPlugin/shortcuts.js +145 -0
  437. package/dist/editor/plugins/ShortcutsPlugin/shortcuts.js.map +1 -0
  438. package/dist/editor/plugins/TabFocusPlugin/index.d.ts +8 -0
  439. package/dist/editor/plugins/TabFocusPlugin/index.js +46 -0
  440. package/dist/editor/plugins/TabFocusPlugin/index.js.map +1 -0
  441. package/dist/editor/plugins/TableActionMenuPlugin/index.d.ts +12 -0
  442. package/dist/editor/plugins/TableActionMenuPlugin/index.js +371 -0
  443. package/dist/editor/plugins/TableActionMenuPlugin/index.js.map +1 -0
  444. package/dist/editor/plugins/TableCellResizer/index.d.ts +3 -0
  445. package/dist/editor/plugins/TableCellResizer/index.js +301 -0
  446. package/dist/editor/plugins/TableCellResizer/index.js.map +1 -0
  447. package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.d.ts +1 -0
  448. package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.js +18 -0
  449. package/dist/editor/plugins/TableCellResizer/tableCellResizerPluginStyles.js.map +1 -0
  450. package/dist/editor/plugins/TableHoverActionsPlugin/index.d.ts +11 -0
  451. package/dist/editor/plugins/TableHoverActionsPlugin/index.js +193 -0
  452. package/dist/editor/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  453. package/dist/editor/plugins/TablePlugin.d.ts +38 -0
  454. package/dist/editor/plugins/TablePlugin.js +77 -0
  455. package/dist/editor/plugins/TablePlugin.js.map +1 -0
  456. package/dist/editor/plugins/ToolbarPlugin/index.d.ts +19 -0
  457. package/dist/editor/plugins/ToolbarPlugin/index.js +199 -0
  458. package/dist/editor/plugins/ToolbarPlugin/index.js.map +1 -0
  459. package/dist/editor/plugins/ToolbarPlugin/utils.d.ts +22 -0
  460. package/dist/editor/plugins/ToolbarPlugin/utils.js +224 -0
  461. package/dist/editor/plugins/ToolbarPlugin/utils.js.map +1 -0
  462. package/dist/editor/plugins/VideoPlugin/index.d.ts +7 -0
  463. package/dist/editor/plugins/VideoPlugin/index.js +61 -0
  464. package/dist/editor/plugins/VideoPlugin/index.js.map +1 -0
  465. package/dist/editor/plugins/index.d.ts +19 -0
  466. package/dist/editor/plugins/index.js +36 -0
  467. package/dist/editor/plugins/index.js.map +1 -0
  468. package/dist/editor/themes/index.d.ts +1 -0
  469. package/dist/editor/themes/index.js +6 -0
  470. package/dist/editor/themes/index.js.map +1 -0
  471. package/dist/editor/themes/playgroundEditorTheme.d.ts +2 -0
  472. package/dist/editor/themes/playgroundEditorTheme.js +116 -0
  473. package/dist/editor/themes/playgroundEditorTheme.js.map +1 -0
  474. package/dist/editor/themes/playgroundEditorThemeStyles.d.ts +1 -0
  475. package/dist/editor/themes/playgroundEditorThemeStyles.js +702 -0
  476. package/dist/editor/themes/playgroundEditorThemeStyles.js.map +1 -0
  477. package/dist/editor/types/index.d.ts +19 -0
  478. package/dist/editor/types/index.js +3 -0
  479. package/dist/editor/types/index.js.map +1 -0
  480. package/dist/editor/ui/BlockFormatDropdown/index.d.ts +18 -0
  481. package/dist/editor/ui/BlockFormatDropdown/index.js +73 -0
  482. package/dist/editor/ui/BlockFormatDropdown/index.js.map +1 -0
  483. package/dist/editor/ui/BoldButton/index.d.ts +7 -0
  484. package/dist/editor/ui/BoldButton/index.js +14 -0
  485. package/dist/editor/ui/BoldButton/index.js.map +1 -0
  486. package/dist/editor/ui/Button.d.ts +12 -0
  487. package/dist/editor/ui/Button.js +38 -0
  488. package/dist/editor/ui/Button.js.map +1 -0
  489. package/dist/editor/ui/CenterAlignButton/index.d.ts +7 -0
  490. package/dist/editor/ui/CenterAlignButton/index.js +14 -0
  491. package/dist/editor/ui/CenterAlignButton/index.js.map +1 -0
  492. package/dist/editor/ui/ClearEditorButton/index.d.ts +7 -0
  493. package/dist/editor/ui/ClearEditorButton/index.js +10 -0
  494. package/dist/editor/ui/ClearEditorButton/index.js.map +1 -0
  495. package/dist/editor/ui/ClearFormattingButton/index.d.ts +7 -0
  496. package/dist/editor/ui/ClearFormattingButton/index.js +10 -0
  497. package/dist/editor/ui/ClearFormattingButton/index.js.map +1 -0
  498. package/dist/editor/ui/CodeButton/index.d.ts +7 -0
  499. package/dist/editor/ui/CodeButton/index.js +14 -0
  500. package/dist/editor/ui/CodeButton/index.js.map +1 -0
  501. package/dist/editor/ui/CodeLanguageDropdown/index.d.ts +10 -0
  502. package/dist/editor/ui/CodeLanguageDropdown/index.js +26 -0
  503. package/dist/editor/ui/CodeLanguageDropdown/index.js.map +1 -0
  504. package/dist/editor/ui/ContentEditable.d.ts +9 -0
  505. package/dist/editor/ui/ContentEditable.js +63 -0
  506. package/dist/editor/ui/ContentEditable.js.map +1 -0
  507. package/dist/editor/ui/Dialog.d.ts +10 -0
  508. package/dist/editor/ui/Dialog.js +33 -0
  509. package/dist/editor/ui/Dialog.js.map +1 -0
  510. package/dist/editor/ui/Divider/index.d.ts +2 -0
  511. package/dist/editor/ui/Divider/index.js +9 -0
  512. package/dist/editor/ui/Divider/index.js.map +1 -0
  513. package/dist/editor/ui/DropDown.d.ts +16 -0
  514. package/dist/editor/ui/DropDown.js +141 -0
  515. package/dist/editor/ui/DropDown.js.map +1 -0
  516. package/dist/editor/ui/FlashMessage.d.ts +6 -0
  517. package/dist/editor/ui/FlashMessage.js +32 -0
  518. package/dist/editor/ui/FlashMessage.js.map +1 -0
  519. package/dist/editor/ui/HorizontalRuleButton/index.d.ts +3 -0
  520. package/dist/editor/ui/HorizontalRuleButton/index.js +13 -0
  521. package/dist/editor/ui/HorizontalRuleButton/index.js.map +1 -0
  522. package/dist/editor/ui/ImageButton/index.d.ts +8 -0
  523. package/dist/editor/ui/ImageButton/index.js +13 -0
  524. package/dist/editor/ui/ImageButton/index.js.map +1 -0
  525. package/dist/editor/ui/ImageResizer.d.ts +17 -0
  526. package/dist/editor/ui/ImageResizer.js +174 -0
  527. package/dist/editor/ui/ImageResizer.js.map +1 -0
  528. package/dist/editor/ui/ItalicButton/index.d.ts +7 -0
  529. package/dist/editor/ui/ItalicButton/index.js +14 -0
  530. package/dist/editor/ui/ItalicButton/index.js.map +1 -0
  531. package/dist/editor/ui/LeftAlignButton/index.d.ts +7 -0
  532. package/dist/editor/ui/LeftAlignButton/index.js +14 -0
  533. package/dist/editor/ui/LeftAlignButton/index.js.map +1 -0
  534. package/dist/editor/ui/LinkButton/index.d.ts +8 -0
  535. package/dist/editor/ui/LinkButton/index.js +11 -0
  536. package/dist/editor/ui/LinkButton/index.js.map +1 -0
  537. package/dist/editor/ui/Modal.d.ts +9 -0
  538. package/dist/editor/ui/Modal.js +110 -0
  539. package/dist/editor/ui/Modal.js.map +1 -0
  540. package/dist/editor/ui/RedoButton/index.d.ts +3 -0
  541. package/dist/editor/ui/RedoButton/index.js +14 -0
  542. package/dist/editor/ui/RedoButton/index.js.map +1 -0
  543. package/dist/editor/ui/RightAlignButton/index.d.ts +7 -0
  544. package/dist/editor/ui/RightAlignButton/index.js +14 -0
  545. package/dist/editor/ui/RightAlignButton/index.js.map +1 -0
  546. package/dist/editor/ui/Select.d.ts +8 -0
  547. package/dist/editor/ui/Select.js +52 -0
  548. package/dist/editor/ui/Select.js.map +1 -0
  549. package/dist/editor/ui/StrikethroughButton/index.d.ts +7 -0
  550. package/dist/editor/ui/StrikethroughButton/index.js +14 -0
  551. package/dist/editor/ui/StrikethroughButton/index.js.map +1 -0
  552. package/dist/editor/ui/TableButton/index.d.ts +8 -0
  553. package/dist/editor/ui/TableButton/index.js +13 -0
  554. package/dist/editor/ui/TableButton/index.js.map +1 -0
  555. package/dist/editor/ui/TextInput.d.ts +13 -0
  556. package/dist/editor/ui/TextInput.js +36 -0
  557. package/dist/editor/ui/TextInput.js.map +1 -0
  558. package/dist/editor/ui/UnderlineButton/index.d.ts +7 -0
  559. package/dist/editor/ui/UnderlineButton/index.js +14 -0
  560. package/dist/editor/ui/UnderlineButton/index.js.map +1 -0
  561. package/dist/editor/ui/UndoButton/index.d.ts +3 -0
  562. package/dist/editor/ui/UndoButton/index.js +14 -0
  563. package/dist/editor/ui/UndoButton/index.js.map +1 -0
  564. package/dist/editor/ui/VideoButton/index.d.ts +8 -0
  565. package/dist/editor/ui/VideoButton/index.js +13 -0
  566. package/dist/editor/ui/VideoButton/index.js.map +1 -0
  567. package/dist/editor/ui/index.d.ts +30 -0
  568. package/dist/editor/ui/index.js +74 -0
  569. package/dist/editor/ui/index.js.map +1 -0
  570. package/dist/editor/utils/dropDownActiveClass.d.ts +1 -0
  571. package/dist/editor/utils/dropDownActiveClass.js +12 -0
  572. package/dist/editor/utils/dropDownActiveClass.js.map +1 -0
  573. package/dist/editor/utils/getDOMRangeRect.d.ts +1 -0
  574. package/dist/editor/utils/getDOMRangeRect.js +19 -0
  575. package/dist/editor/utils/getDOMRangeRect.js.map +1 -0
  576. package/dist/editor/utils/getSelectedNode.d.ts +2 -0
  577. package/dist/editor/utils/getSelectedNode.js +21 -0
  578. package/dist/editor/utils/getSelectedNode.js.map +1 -0
  579. package/dist/editor/utils/getThemeSelector.d.ts +2 -0
  580. package/dist/editor/utils/getThemeSelector.js +15 -0
  581. package/dist/editor/utils/getThemeSelector.js.map +1 -0
  582. package/dist/editor/utils/index.d.ts +9 -0
  583. package/dist/editor/utils/index.js +26 -0
  584. package/dist/editor/utils/index.js.map +1 -0
  585. package/dist/editor/utils/joinClasses.d.ts +1 -0
  586. package/dist/editor/utils/joinClasses.js +8 -0
  587. package/dist/editor/utils/joinClasses.js.map +1 -0
  588. package/dist/editor/utils/parseVideoUrl.d.ts +15 -0
  589. package/dist/editor/utils/parseVideoUrl.js +115 -0
  590. package/dist/editor/utils/parseVideoUrl.js.map +1 -0
  591. package/dist/editor/utils/setFloatingElemPosition.d.ts +1 -0
  592. package/dist/editor/utils/setFloatingElemPosition.js +47 -0
  593. package/dist/editor/utils/setFloatingElemPosition.js.map +1 -0
  594. package/dist/editor/utils/setFloatingElemPositionForLinkEditor.d.ts +1 -0
  595. package/dist/editor/utils/setFloatingElemPositionForLinkEditor.js +29 -0
  596. package/dist/editor/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  597. package/dist/editor/utils/url.d.ts +2 -0
  598. package/dist/editor/utils/url.js +25 -0
  599. package/dist/editor/utils/url.js.map +1 -0
  600. package/dist/index.d.ts +3 -0
  601. package/dist/index.js +37 -0
  602. package/dist/index.js.map +1 -0
  603. package/eslint.config.mjs +27 -0
  604. package/package.json +110 -0
  605. package/tsconfig.eslint.json +10 -0
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getThemeSelector = getThemeSelector;
4
+ function getThemeSelector(getTheme, name) {
5
+ var _a;
6
+ const className = (_a = getTheme()) === null || _a === void 0 ? void 0 : _a[name];
7
+ if (typeof className !== "string") {
8
+ throw new Error(`getThemeClass: required theme property ${name} not defined`);
9
+ }
10
+ return className
11
+ .split(/\s+/g)
12
+ .map(cls => `.${cls}`)
13
+ .join();
14
+ }
15
+ //# sourceMappingURL=getThemeSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getThemeSelector.js","sourceRoot":"","sources":["../../../src/editor/utils/getThemeSelector.ts"],"names":[],"mappings":";;AAEA,4CAYC;AAZD,SAAgB,gBAAgB,CAC9B,QAAqD,EACrD,IAA8B;;IAE9B,MAAM,SAAS,GAAG,MAAA,QAAQ,EAAE,0CAAG,IAAI,CAAC,CAAC;IACrC,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA0C,IAAI,cAAc,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,SAAS;SACb,KAAK,CAAC,MAAM,CAAC;SACb,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC;SACrB,IAAI,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,9 @@
1
+ export * from "./dropDownActiveClass";
2
+ export * from "./getDOMRangeRect";
3
+ export * from "./getSelectedNode";
4
+ export * from "./getThemeSelector";
5
+ export * from "./joinClasses";
6
+ export * from "./parseVideoUrl";
7
+ export * from "./setFloatingElemPosition";
8
+ export * from "./setFloatingElemPositionForLinkEditor";
9
+ export * from "./url";
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dropDownActiveClass"), exports);
18
+ __exportStar(require("./getDOMRangeRect"), exports);
19
+ __exportStar(require("./getSelectedNode"), exports);
20
+ __exportStar(require("./getThemeSelector"), exports);
21
+ __exportStar(require("./joinClasses"), exports);
22
+ __exportStar(require("./parseVideoUrl"), exports);
23
+ __exportStar(require("./setFloatingElemPosition"), exports);
24
+ __exportStar(require("./setFloatingElemPositionForLinkEditor"), exports);
25
+ __exportStar(require("./url"), exports);
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/editor/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,oDAAkC;AAClC,oDAAkC;AAClC,qDAAmC;AACnC,gDAA8B;AAC9B,kDAAgC;AAChC,4DAA0C;AAC1C,yEAAuD;AACvD,wCAAsB"}
@@ -0,0 +1 @@
1
+ export declare const joinClasses: (...args: Array<string | boolean | null | undefined>) => string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.joinClasses = void 0;
4
+ const joinClasses = (...args) => {
5
+ return args.filter(Boolean).join(" ");
6
+ };
7
+ exports.joinClasses = joinClasses;
8
+ //# sourceMappingURL=joinClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joinClasses.js","sourceRoot":"","sources":["../../../src/editor/utils/joinClasses.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAC,GAAG,IAAgD,EAAE,EAAE;IACjF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB"}
@@ -0,0 +1,15 @@
1
+ export type VideoProvider = "youtube" | "vimeo";
2
+ export type ParsedVideo = {
3
+ provider: "youtube";
4
+ id: string;
5
+ embedUrl: string;
6
+ originalUrl: string;
7
+ startAt?: number;
8
+ } | {
9
+ provider: "vimeo";
10
+ id: string;
11
+ embedUrl: string;
12
+ originalUrl: string;
13
+ startAt?: number;
14
+ };
15
+ export declare function parseVideoUrl(raw: string): ParsedVideo | null;
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseVideoUrl = parseVideoUrl;
4
+ const TIME_RE = /(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?/i;
5
+ function parseTimeToSeconds(raw) {
6
+ if (!raw) {
7
+ return undefined;
8
+ }
9
+ if (/^\d+$/.test(raw)) {
10
+ return Number(raw);
11
+ }
12
+ if (raw.includes(":")) {
13
+ const parts = raw.split(":").map((p) => Number(p));
14
+ if (parts.some(Number.isNaN)) {
15
+ return undefined;
16
+ }
17
+ let seconds = 0;
18
+ for (let i = 0; i < parts.length; i++) {
19
+ const power = parts.length - i - 1;
20
+ seconds += parts[i] * Math.pow(60, power);
21
+ }
22
+ return seconds;
23
+ }
24
+ const m = TIME_RE.exec(raw);
25
+ if (m) {
26
+ const h = m[1] ? Number(m[1]) : 0;
27
+ const min = m[2] ? Number(m[2]) : 0;
28
+ const s = m[3] ? Number(m[3]) : 0;
29
+ return h * 3600 + min * 60 + s;
30
+ }
31
+ return undefined;
32
+ }
33
+ function parseYoutube(url) {
34
+ var _a, _b, _c;
35
+ const host = url.hostname.toLowerCase();
36
+ let id;
37
+ if (host === "youtu.be") {
38
+ const splitPathname = url.pathname.split("/").filter(Boolean);
39
+ id = (_a = splitPathname[0]) !== null && _a !== void 0 ? _a : null;
40
+ }
41
+ else if (host.endsWith("youtube.com") ||
42
+ host.endsWith("youtube-nocookie.com")) {
43
+ const path = url.pathname.replace(/^\/+/, "");
44
+ const params = url.searchParams;
45
+ if (path === "watch") {
46
+ id = params.get("v");
47
+ }
48
+ else if (path.startsWith("shorts/")) {
49
+ id = (_b = path.split("/")[1]) !== null && _b !== void 0 ? _b : null;
50
+ }
51
+ else if (path.startsWith("embed/")) {
52
+ id = (_c = path.split("/")[1]) !== null && _c !== void 0 ? _c : null;
53
+ }
54
+ }
55
+ if (!id)
56
+ return null;
57
+ const start = parseTimeToSeconds(url.searchParams.get("t") || url.searchParams.get("start")) ||
58
+ (url.hash.startsWith("#t=")
59
+ ? parseTimeToSeconds(url.hash.slice(3))
60
+ : undefined);
61
+ const embedUrl = `https://www.youtube-nocookie.com/embed/${encodeURIComponent(id)}${start ? `?start=${start}` : ""}`;
62
+ return {
63
+ provider: "youtube",
64
+ id,
65
+ startAt: start,
66
+ embedUrl,
67
+ originalUrl: url.toString(),
68
+ };
69
+ }
70
+ function parseVimeo(url) {
71
+ const host = url.hostname.toLowerCase();
72
+ let id = null;
73
+ if (host === "vimeo.com") {
74
+ const seg = url.pathname.split("/").filter(Boolean);
75
+ if (seg.length >= 1 && /^\d+$/.test(seg[0]))
76
+ id = seg[0];
77
+ }
78
+ else if (host === "player.vimeo.com") {
79
+ const seg = url.pathname.split("/").filter(Boolean);
80
+ if (seg[0] === "video" && /^\d+$/.test(seg[1]))
81
+ id = seg[1];
82
+ }
83
+ if (!id)
84
+ return null;
85
+ const start = parseTimeToSeconds(url.searchParams.get("t")) ||
86
+ (url.hash.startsWith("#t=")
87
+ ? parseTimeToSeconds(url.hash.slice(3))
88
+ : undefined);
89
+ const anchor = start ? `#t=${start}s` : "";
90
+ const embedUrl = `https://player.vimeo.com/video/${encodeURIComponent(id)}${anchor}`;
91
+ return {
92
+ provider: "vimeo",
93
+ id,
94
+ startAt: start,
95
+ embedUrl,
96
+ originalUrl: url.toString(),
97
+ };
98
+ }
99
+ function parseVideoUrl(raw) {
100
+ let url;
101
+ try {
102
+ url = new URL(raw.trim());
103
+ }
104
+ catch (_a) {
105
+ return null;
106
+ }
107
+ const y = parseYoutube(url);
108
+ if (y)
109
+ return y;
110
+ const v = parseVimeo(url);
111
+ if (v)
112
+ return v;
113
+ return null;
114
+ }
115
+ //# sourceMappingURL=parseVideoUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseVideoUrl.js","sourceRoot":"","sources":["../../../src/editor/utils/parseVideoUrl.ts"],"names":[],"mappings":";;AAgIA,sCAYC;AA1HD,MAAM,OAAO,GAAG,oCAAoC,CAAC;AAErD,SAAS,kBAAkB,CAAC,GAAkB;IAC5C,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,IAAI,GAAG,CA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ElemPosition(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, isLink?: boolean, verticalGap?: number, horizontalOffset?: number): void;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setFloatingElemPosition = setFloatingElemPosition;
4
+ const VERTICAL_GAP = 10;
5
+ const HORIZONTAL_OFFSET = 5;
6
+ function setFloatingElemPosition(targetRect, floatingElem, anchorElem, isLink = false, verticalGap = VERTICAL_GAP, horizontalOffset = HORIZONTAL_OFFSET) {
7
+ const scrollerElem = anchorElem.parentElement;
8
+ if (targetRect === null || !scrollerElem) {
9
+ floatingElem.style.opacity = "0";
10
+ floatingElem.style.transform = "translate(-10000px, -10000px)";
11
+ return;
12
+ }
13
+ const floatingElemRect = floatingElem.getBoundingClientRect();
14
+ const anchorElementRect = anchorElem.getBoundingClientRect();
15
+ const editorScrollerRect = scrollerElem.getBoundingClientRect();
16
+ let top = targetRect.top - floatingElemRect.height - verticalGap;
17
+ let left = targetRect.left - horizontalOffset;
18
+ // Check if text is end-aligned
19
+ const selection = window.getSelection();
20
+ if (selection && selection.rangeCount > 0) {
21
+ const range = selection.getRangeAt(0);
22
+ const textNode = range.startContainer;
23
+ if (textNode.nodeType === Node.ELEMENT_NODE || textNode.parentElement) {
24
+ const textElement = textNode.nodeType === Node.ELEMENT_NODE ? textNode : textNode.parentElement;
25
+ const textAlign = window.getComputedStyle(textElement).textAlign;
26
+ if (textAlign === "right" || textAlign === "end") {
27
+ // For end-aligned text, position the toolbar relative to the text end
28
+ left = targetRect.right - floatingElemRect.width + horizontalOffset;
29
+ }
30
+ }
31
+ }
32
+ if (top < editorScrollerRect.top) {
33
+ // adjusted height for link element if the element is at top
34
+ top += floatingElemRect.height + targetRect.height + verticalGap * (isLink ? 9 : 2);
35
+ }
36
+ if (left + floatingElemRect.width > editorScrollerRect.right) {
37
+ left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;
38
+ }
39
+ if (left < editorScrollerRect.left) {
40
+ left = editorScrollerRect.left + horizontalOffset;
41
+ }
42
+ top -= anchorElementRect.top;
43
+ left -= anchorElementRect.left;
44
+ floatingElem.style.opacity = "1";
45
+ floatingElem.style.transform = `translate(${left}px, ${top}px)`;
46
+ }
47
+ //# sourceMappingURL=setFloatingElemPosition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPosition.js","sourceRoot":"","sources":["../../../src/editor/utils/setFloatingElemPosition.ts"],"names":[],"mappings":";;AAGA,0DA0DC;AA7DD,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B,SAAgB,uBAAuB,CACrC,UAA0B,EAC1B,YAAyB,EACzB,UAAuB,EACvB,MAAM,GAAG,KAAK,EACd,cAAsB,YAAY,EAClC,mBAA2B,iBAAiB;IAE5C,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC;IAE9C,IAAI,UAAU,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QACzC,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QACjC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,+BAA+B,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,MAAM,gBAAgB,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAC;IAC9D,MAAM,iBAAiB,GAAG,UAAU,CAAC,qBAAqB,EAAE,CAAC;IAC7D,MAAM,kBAAkB,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAC;IAEhE,IAAI,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,gBAAgB,CAAC,MAAM,GAAG,WAAW,CAAC;IACjE,IAAI,IAAI,GAAG,UAAU,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAE9C,+BAA+B;IAC/B,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;IACxC,IAAI,SAAS,IAAI,SAAS,CAAC,UAAU,GAAG,CAAC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C7B,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAC;IAE/B,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IACjC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,aAAa,IAAI,OAAO,GAAG,KAAK,CAAC;AAClE,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function setFloatingElemPositionForLinkEditor(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, verticalGap?: number, horizontalOffset?: number): void;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setFloatingElemPositionForLinkEditor = setFloatingElemPositionForLinkEditor;
4
+ const VERTICAL_GAP = 10;
5
+ const HORIZONTAL_OFFSET = 5;
6
+ function setFloatingElemPositionForLinkEditor(targetRect, floatingElem, anchorElem, verticalGap = VERTICAL_GAP, horizontalOffset = HORIZONTAL_OFFSET) {
7
+ const scrollerElem = anchorElem.parentElement;
8
+ if (targetRect === null || !scrollerElem) {
9
+ floatingElem.style.opacity = "0";
10
+ floatingElem.style.transform = "translate(-10000px, -10000px)";
11
+ return;
12
+ }
13
+ const floatingElemRect = floatingElem.getBoundingClientRect();
14
+ const anchorElementRect = anchorElem.getBoundingClientRect();
15
+ const editorScrollerRect = scrollerElem.getBoundingClientRect();
16
+ let top = targetRect.top - verticalGap;
17
+ let left = targetRect.left - horizontalOffset;
18
+ if (top < editorScrollerRect.top) {
19
+ top += floatingElemRect.height + targetRect.height + verticalGap * 2;
20
+ }
21
+ if (left + floatingElemRect.width > editorScrollerRect.right) {
22
+ left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;
23
+ }
24
+ top -= anchorElementRect.top;
25
+ left -= anchorElementRect.left;
26
+ floatingElem.style.opacity = "1";
27
+ floatingElem.style.transform = `translate(${left}px, ${top}px)`;
28
+ }
29
+ //# sourceMappingURL=setFloatingElemPositionForLinkEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAC;IAE/B,YAAY,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IACjC,YAAY,CAAC,KAAK,CAAC,SAAS,GAAG,aAAa,IAAI,OAAO,GAAG,KAAK,CAAC;AAClE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function sanitizeUrl(url: string): string;
2
+ export declare function validateUrl(url: string): boolean;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sanitizeUrl = sanitizeUrl;
4
+ exports.validateUrl = validateUrl;
5
+ const SUPPORTED_URL_PROTOCOLS = new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
6
+ function sanitizeUrl(url) {
7
+ try {
8
+ const parsedUrl = new URL(url);
9
+ if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) {
10
+ return "about:blank";
11
+ }
12
+ }
13
+ catch (_a) {
14
+ return url;
15
+ }
16
+ return url;
17
+ }
18
+ // Source: https://stackoverflow.com/a/8234912/2013580
19
+ const urlRegExp = new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);
20
+ function validateUrl(url) {
21
+ // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.
22
+ // Maybe show a dialog where they user can type the URL before inserting it.
23
+ return url === "https://" || urlRegExp.test(url);
24
+ }
25
+ //# sourceMappingURL=url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/editor/utils/url.ts"],"names":[],"mappings":";;AAEA,kCAWC;AAOD,kCAIC;AAxBD,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAExF,SAAgB,WAAW,CAAC,GAAW;IACrC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;YACrD,OAAO,aAAa,CAAC;QACvB,CAAC;IACH,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,sDAAsD;AACtD,MAAM,SAAS,GAAG,IAAI,MAAM,CAC1B,4JAA4J,CAC7J,CAAC;AAEF,SAAgB,WAAW,CAAC,GAAW;IACrC,8FAA8F;IAC9F,4EAA4E;IAC5E,OAAO,GAAG,KAAK,UAAU,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./editor";
2
+ export * from "./display";
3
+ export declare const muiLexicalStyles: import("@emotion/utils").SerializedStyles[];
package/dist/index.js ADDED
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.muiLexicalStyles = void 0;
18
+ const plugins_1 = require("./editor/plugins");
19
+ const themes_1 = require("./editor/themes");
20
+ const editorStyles_1 = require("./editor/editorStyles");
21
+ const ui_1 = require("./editor/ui");
22
+ const nodes_1 = require("./editor/nodes");
23
+ __exportStar(require("./editor"), exports);
24
+ __exportStar(require("./display"), exports);
25
+ exports.muiLexicalStyles = [
26
+ ...ui_1.componentsStyles,
27
+ editorStyles_1.editorStyles,
28
+ nodes_1.imageNodeStyles,
29
+ nodes_1.inlineImageNodeStyles,
30
+ plugins_1.codeActionMenuPluginStyles,
31
+ plugins_1.floatLinkEditorPluginStyles,
32
+ plugins_1.floatTextFormatToolbarPluginStyles,
33
+ plugins_1.tableCellResizerPluginStyles,
34
+ themes_1.playgroundEditorThemeStyles,
35
+ nodes_1.videoNodeStyles,
36
+ ];
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAK0B;AAC1B,4CAA8D;AAC9D,wDAAqD;AACrD,oCAA+C;AAC/C,0CAAyF;AAEzF,2CAAyB;AACzB,4CAA0B;AACb,QAAA,gBAAgB,GAAG;IAC9B,GAAG,qBAAgB;IACnB,2BAAY;IACZ,uBAAe;IACf,6BAAqB;IACrB,oCAA0B;IAC1B,qCAA2B;IAC3B,4CAAkC;IAClC,sCAA4B;IAC5B,oCAA2B;IAC3B,uBAAe;CAChB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import typescriptRules from "@ethberry/eslint-config/presets/tsx.mjs";
2
+ import jestRules from "@ethberry/eslint-config/tests/jest.mjs";
3
+
4
+ // DON'T ADD ANY RULES!
5
+ // FIX YOUR SHIT!!!
6
+
7
+ export default [
8
+ {
9
+ ignores: [
10
+ "**/dist",
11
+ ]
12
+ },
13
+
14
+ {
15
+ languageOptions: {
16
+ parserOptions: {
17
+ project: [
18
+ "./tsconfig.eslint.json",
19
+ ],
20
+ tsconfigRootDir: import.meta.dirname
21
+ },
22
+ }
23
+ },
24
+
25
+ ...typescriptRules,
26
+ ...jestRules,
27
+ ];
package/package.json ADDED
@@ -0,0 +1,110 @@
1
+ {
2
+ "author": {
3
+ "email": "trejgun@gmail.com",
4
+ "name": "TrejGun",
5
+ "url": "https://ethberry.io/"
6
+ },
7
+ "bugs": {
8
+ "url": "https://github.com/TrejGun/mui-lexical/issues"
9
+ },
10
+ "contributors": [
11
+ {
12
+ "email": "pro200hummer@gmail.com",
13
+ "name": "Pavel Nikalaichyk",
14
+ "url": "https://github.com/pro200hummer"
15
+ }
16
+ ],
17
+ "dependencies": {
18
+ "@emotion/cache": "11.14.0",
19
+ "@emotion/react": "11.14.0",
20
+ "@emotion/server": "11.11.0",
21
+ "@emotion/styled": "11.14.1",
22
+ "@lexical/code": "0.38.2",
23
+ "@lexical/link": "0.38.2",
24
+ "@lexical/list": "0.38.2",
25
+ "@lexical/markdown": "0.38.2",
26
+ "@lexical/overflow": "0.38.2",
27
+ "@lexical/react": "0.38.2",
28
+ "@lexical/rich-text": "0.38.2",
29
+ "@lexical/selection": "0.38.2",
30
+ "@lexical/table": "0.38.2",
31
+ "@lexical/utils": "0.38.2",
32
+ "@mui/icons-material": "^7.0.0",
33
+ "@mui/material": "^7.0.0",
34
+ "lexical": "0.38.2",
35
+ "lodash-es": "4.17.21",
36
+ "mdi-material-ui": "7.9.4"
37
+ },
38
+ "description": "Material-UI Lexical Editor and Viewer",
39
+ "devDependencies": {
40
+ "@babel/preset-env": "7.28.5",
41
+ "@babel/preset-react": "7.28.5",
42
+ "@babel/preset-typescript": "7.28.5",
43
+ "@ethberry/eslint-config": "5.0.9",
44
+ "@storybook/addon-essentials": "8.4.5",
45
+ "@storybook/addon-interactions": "8.4.5",
46
+ "@storybook/addon-links": "8.4.5",
47
+ "@storybook/addon-webpack5-compiler-babel": "4.0.0",
48
+ "@storybook/blocks": "8.4.5",
49
+ "@storybook/manager-api": "8.6.14",
50
+ "@storybook/react": "8.4.5",
51
+ "@storybook/react-webpack5": "8.4.5",
52
+ "@storybook/test": "8.4.5",
53
+ "@svgr/webpack": "8.1.0",
54
+ "@types/lodash-es": "4.17.12",
55
+ "@types/node": "22.19.0",
56
+ "@types/react": "19.2.2",
57
+ "@types/react-dom": "19.2.2",
58
+ "husky": "9.1.7",
59
+ "lint-staged": "16.2.6",
60
+ "prettier": "3.6.2",
61
+ "react": "19.2.0",
62
+ "react-dom": "19.2.0",
63
+ "rimraf": "6.0.1",
64
+ "storybook": "8.4.5",
65
+ "typescript": "5.9.3",
66
+ "webpack": "5.97.1"
67
+ },
68
+ "engines": {
69
+ "node": ">=20"
70
+ },
71
+ "homepage": "https://github.com/TrejGun/mui-lexical#readme",
72
+ "keywords": [
73
+ "material-ui",
74
+ "mui",
75
+ "lexical editor",
76
+ "rte",
77
+ "react",
78
+ "text editor",
79
+ "lexical"
80
+ ],
81
+ "license": "MIT",
82
+ "main": "./dist/index.js",
83
+ "name": "@ethberry/mui-lexical",
84
+ "peerDependencies": {
85
+ "@mui/icons-material": "^7.0.0",
86
+ "@mui/material": "^7.0.0",
87
+ "@mui/system": "^7.0.0",
88
+ "react": "^19.0.0",
89
+ "react-dom": "^19.0.0"
90
+ },
91
+ "private": false,
92
+ "publishConfig": {
93
+ "registry": "https://registry.npmjs.org/"
94
+ },
95
+ "repository": {
96
+ "type": "git",
97
+ "url": "git+https://github.com/TrejGun/mui-lexical.git"
98
+ },
99
+ "scripts": {
100
+ "build": "tsc",
101
+ "lint": "eslint . --fix",
102
+ "prebuild": "rimraf dist/",
103
+ "prepare": "husky",
104
+ "storybook": "storybook dev -p 6006 --debug-webpack",
105
+ "build-storybook": "storybook build",
106
+ "test": "jest"
107
+ },
108
+ "types": "./dist/index.d.ts",
109
+ "version": "1.0.7"
110
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "noUnusedLocals": true,
5
+ "noUnusedParameters": true,
6
+ "rootDirs": ["./src", "./.storybook"]
7
+ },
8
+ "include": ["./src/**/*", "./.storybook/**/*"],
9
+ "exclude": ["node_modules", "./dist"]
10
+ }