@payloadcms/richtext-lexical 3.0.0-beta.53 → 3.0.0-beta.54

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 (677) hide show
  1. package/dist/cell/index.d.ts.map +1 -1
  2. package/dist/cell/index.js +1 -1
  3. package/dist/cell/index.js.map +1 -1
  4. package/dist/exports/client/Field-XBUN6QOM.js +2 -0
  5. package/dist/exports/client/Field-XBUN6QOM.js.map +7 -0
  6. package/dist/exports/client/chunk-JIP5PWU3.js +2 -0
  7. package/dist/exports/client/chunk-JIP5PWU3.js.map +7 -0
  8. package/dist/exports/client/{chunk-QU5MKT75.js → chunk-TZLHAUCW.js} +2 -2
  9. package/dist/exports/client/{component-E2NHAHBC.js → component-CEUVAHRO.js} +2 -2
  10. package/dist/exports/client/component-CEUVAHRO.js.map +7 -0
  11. package/dist/exports/client/component-PEFMKIXI.js +2 -0
  12. package/dist/exports/client/component-PEFMKIXI.js.map +7 -0
  13. package/dist/exports/client/index.d.ts +36 -27
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +7 -5
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/feature.client.d.ts +1 -2
  18. package/dist/features/align/feature.client.d.ts.map +1 -1
  19. package/dist/features/align/feature.client.js +9 -16
  20. package/dist/features/align/feature.client.js.map +1 -1
  21. package/dist/features/align/feature.server.d.ts +1 -2
  22. package/dist/features/align/feature.server.d.ts.map +1 -1
  23. package/dist/features/align/feature.server.js +9 -15
  24. package/dist/features/align/feature.server.js.map +1 -1
  25. package/dist/features/align/i18n.js.map +1 -1
  26. package/dist/features/align/toolbarAlignGroup.js.map +1 -1
  27. package/dist/features/blockquote/feature.client.d.ts +1 -2
  28. package/dist/features/blockquote/feature.client.d.ts.map +1 -1
  29. package/dist/features/blockquote/feature.client.js +37 -44
  30. package/dist/features/blockquote/feature.client.js.map +1 -1
  31. package/dist/features/blockquote/feature.server.d.ts +1 -2
  32. package/dist/features/blockquote/feature.server.d.ts.map +1 -1
  33. package/dist/features/blockquote/feature.server.js +35 -40
  34. package/dist/features/blockquote/feature.server.js.map +1 -1
  35. package/dist/features/blockquote/i18n.js.map +1 -1
  36. package/dist/features/blockquote/markdownTransformer.js.map +1 -1
  37. package/dist/features/blocks/component/BlockContent.js +2 -2
  38. package/dist/features/blocks/component/BlockContent.js.map +1 -1
  39. package/dist/features/blocks/component/FormSavePlugin.js.map +1 -1
  40. package/dist/features/blocks/component/index.js +1 -1
  41. package/dist/features/blocks/component/index.js.map +1 -1
  42. package/dist/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  43. package/dist/features/blocks/drawer/index.js +1 -1
  44. package/dist/features/blocks/drawer/index.js.map +1 -1
  45. package/dist/features/blocks/feature.client.d.ts +1 -2
  46. package/dist/features/blocks/feature.client.d.ts.map +1 -1
  47. package/dist/features/blocks/feature.client.js +74 -80
  48. package/dist/features/blocks/feature.client.js.map +1 -1
  49. package/dist/features/blocks/feature.server.d.ts +1 -2
  50. package/dist/features/blocks/feature.server.d.ts.map +1 -1
  51. package/dist/features/blocks/feature.server.js +88 -90
  52. package/dist/features/blocks/feature.server.js.map +1 -1
  53. package/dist/features/blocks/graphQLPopulationPromise.d.ts +1 -1
  54. package/dist/features/blocks/graphQLPopulationPromise.d.ts.map +1 -1
  55. package/dist/features/blocks/graphQLPopulationPromise.js.map +1 -1
  56. package/dist/features/blocks/i18n.js.map +1 -1
  57. package/dist/features/blocks/nodes/BlocksNode.js.map +1 -1
  58. package/dist/features/blocks/plugin/commands.js.map +1 -1
  59. package/dist/features/blocks/plugin/index.d.ts +1 -1
  60. package/dist/features/blocks/plugin/index.d.ts.map +1 -1
  61. package/dist/features/blocks/plugin/index.js.map +1 -1
  62. package/dist/features/blocks/validate.d.ts +1 -1
  63. package/dist/features/blocks/validate.d.ts.map +1 -1
  64. package/dist/features/blocks/validate.js.map +1 -1
  65. package/dist/features/converters/html/converter/converters/linebreak.js.map +1 -1
  66. package/dist/features/converters/html/converter/converters/paragraph.js.map +1 -1
  67. package/dist/features/converters/html/converter/converters/text.js.map +1 -1
  68. package/dist/features/converters/html/converter/defaultConverters.js.map +1 -1
  69. package/dist/features/converters/html/converter/index.js.map +1 -1
  70. package/dist/features/converters/html/converter/types.js.map +1 -1
  71. package/dist/features/converters/html/feature.server.d.ts +1 -2
  72. package/dist/features/converters/html/feature.server.d.ts.map +1 -1
  73. package/dist/features/converters/html/feature.server.js +6 -12
  74. package/dist/features/converters/html/feature.server.js.map +1 -1
  75. package/dist/features/converters/html/field/index.js +1 -1
  76. package/dist/features/converters/html/field/index.js.map +1 -1
  77. package/dist/features/createClientComponent.d.ts +3 -2
  78. package/dist/features/createClientComponent.d.ts.map +1 -1
  79. package/dist/features/createClientComponent.js.map +1 -1
  80. package/dist/features/createFeaturePropComponent.d.ts.map +1 -1
  81. package/dist/features/createFeaturePropComponent.js.map +1 -1
  82. package/dist/features/debug/testRecorder/feature.client.d.ts +1 -2
  83. package/dist/features/debug/testRecorder/feature.client.d.ts.map +1 -1
  84. package/dist/features/debug/testRecorder/feature.client.js +9 -16
  85. package/dist/features/debug/testRecorder/feature.client.js.map +1 -1
  86. package/dist/features/debug/testRecorder/feature.server.d.ts +1 -2
  87. package/dist/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  88. package/dist/features/debug/testRecorder/feature.server.js +8 -13
  89. package/dist/features/debug/testRecorder/feature.server.js.map +1 -1
  90. package/dist/features/debug/testRecorder/plugin/index.d.ts +1 -1
  91. package/dist/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  92. package/dist/features/debug/testRecorder/plugin/index.js.map +1 -1
  93. package/dist/features/debug/treeView/feature.client.d.ts +1 -2
  94. package/dist/features/debug/treeView/feature.client.d.ts.map +1 -1
  95. package/dist/features/debug/treeView/feature.client.js +9 -16
  96. package/dist/features/debug/treeView/feature.client.js.map +1 -1
  97. package/dist/features/debug/treeView/feature.server.d.ts +1 -2
  98. package/dist/features/debug/treeView/feature.server.d.ts.map +1 -1
  99. package/dist/features/debug/treeView/feature.server.js +8 -13
  100. package/dist/features/debug/treeView/feature.server.js.map +1 -1
  101. package/dist/features/debug/treeView/plugin/index.d.ts +1 -1
  102. package/dist/features/debug/treeView/plugin/index.d.ts.map +1 -1
  103. package/dist/features/debug/treeView/plugin/index.js.map +1 -1
  104. package/dist/features/format/bold/feature.client.d.ts +1 -2
  105. package/dist/features/format/bold/feature.client.d.ts.map +1 -1
  106. package/dist/features/format/bold/feature.client.js +16 -23
  107. package/dist/features/format/bold/feature.client.js.map +1 -1
  108. package/dist/features/format/bold/feature.server.d.ts +1 -2
  109. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  110. package/dist/features/format/bold/feature.server.js +21 -24
  111. package/dist/features/format/bold/feature.server.js.map +1 -1
  112. package/dist/features/format/bold/markdownTransformers.js.map +1 -1
  113. package/dist/features/format/inlineCode/feature.client.d.ts +1 -2
  114. package/dist/features/format/inlineCode/feature.client.d.ts.map +1 -1
  115. package/dist/features/format/inlineCode/feature.client.js +12 -21
  116. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  117. package/dist/features/format/inlineCode/feature.server.d.ts +1 -2
  118. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  119. package/dist/features/format/inlineCode/feature.server.js +11 -16
  120. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  121. package/dist/features/format/inlineCode/markdownTransformers.js.map +1 -1
  122. package/dist/features/format/italic/feature.client.d.ts +1 -2
  123. package/dist/features/format/italic/feature.client.d.ts.map +1 -1
  124. package/dist/features/format/italic/feature.client.js +13 -22
  125. package/dist/features/format/italic/feature.client.js.map +1 -1
  126. package/dist/features/format/italic/feature.server.d.ts +1 -2
  127. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  128. package/dist/features/format/italic/feature.server.js +12 -17
  129. package/dist/features/format/italic/feature.server.js.map +1 -1
  130. package/dist/features/format/italic/markdownTransformers.js.map +1 -1
  131. package/dist/features/format/shared/toolbarFormatGroup.js.map +1 -1
  132. package/dist/features/format/strikethrough/feature.client.d.ts +1 -2
  133. package/dist/features/format/strikethrough/feature.client.d.ts.map +1 -1
  134. package/dist/features/format/strikethrough/feature.client.js +12 -21
  135. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  136. package/dist/features/format/strikethrough/feature.server.d.ts +1 -2
  137. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  138. package/dist/features/format/strikethrough/feature.server.js +11 -16
  139. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  140. package/dist/features/format/strikethrough/markdownTransformers.js.map +1 -1
  141. package/dist/features/format/subscript/feature.client.d.ts +1 -2
  142. package/dist/features/format/subscript/feature.client.d.ts.map +1 -1
  143. package/dist/features/format/subscript/feature.client.js +9 -18
  144. package/dist/features/format/subscript/feature.client.js.map +1 -1
  145. package/dist/features/format/subscript/feature.server.d.ts +1 -2
  146. package/dist/features/format/subscript/feature.server.d.ts.map +1 -1
  147. package/dist/features/format/subscript/feature.server.js +8 -13
  148. package/dist/features/format/subscript/feature.server.js.map +1 -1
  149. package/dist/features/format/superscript/feature.client.d.ts +1 -2
  150. package/dist/features/format/superscript/feature.client.d.ts.map +1 -1
  151. package/dist/features/format/superscript/feature.client.js +9 -18
  152. package/dist/features/format/superscript/feature.client.js.map +1 -1
  153. package/dist/features/format/superscript/feature.server.d.ts +1 -2
  154. package/dist/features/format/superscript/feature.server.d.ts.map +1 -1
  155. package/dist/features/format/superscript/feature.server.js +8 -13
  156. package/dist/features/format/superscript/feature.server.js.map +1 -1
  157. package/dist/features/format/underline/feature.client.d.ts +1 -2
  158. package/dist/features/format/underline/feature.client.d.ts.map +1 -1
  159. package/dist/features/format/underline/feature.client.js +9 -18
  160. package/dist/features/format/underline/feature.client.js.map +1 -1
  161. package/dist/features/format/underline/feature.server.d.ts +1 -2
  162. package/dist/features/format/underline/feature.server.d.ts.map +1 -1
  163. package/dist/features/format/underline/feature.server.js +8 -13
  164. package/dist/features/format/underline/feature.server.js.map +1 -1
  165. package/dist/features/heading/feature.client.d.ts +1 -2
  166. package/dist/features/heading/feature.client.d.ts.map +1 -1
  167. package/dist/features/heading/feature.client.js +70 -76
  168. package/dist/features/heading/feature.client.js.map +1 -1
  169. package/dist/features/heading/feature.server.d.ts +1 -2
  170. package/dist/features/heading/feature.server.d.ts.map +1 -1
  171. package/dist/features/heading/feature.server.js +51 -53
  172. package/dist/features/heading/feature.server.js.map +1 -1
  173. package/dist/features/heading/i18n.js.map +1 -1
  174. package/dist/features/heading/markdownTransformer.js.map +1 -1
  175. package/dist/features/horizontalRule/component/index.js.map +1 -1
  176. package/dist/features/horizontalRule/feature.client.d.ts +1 -2
  177. package/dist/features/horizontalRule/feature.client.d.ts.map +1 -1
  178. package/dist/features/horizontalRule/feature.client.js +58 -65
  179. package/dist/features/horizontalRule/feature.client.js.map +1 -1
  180. package/dist/features/horizontalRule/feature.server.d.ts +1 -2
  181. package/dist/features/horizontalRule/feature.server.d.ts.map +1 -1
  182. package/dist/features/horizontalRule/feature.server.js +26 -31
  183. package/dist/features/horizontalRule/feature.server.js.map +1 -1
  184. package/dist/features/horizontalRule/i18n.js.map +1 -1
  185. package/dist/features/horizontalRule/markdownTransformer.js.map +1 -1
  186. package/dist/features/horizontalRule/nodes/HorizontalRuleNode.js.map +1 -1
  187. package/dist/features/horizontalRule/plugin/index.d.ts +1 -1
  188. package/dist/features/horizontalRule/plugin/index.d.ts.map +1 -1
  189. package/dist/features/horizontalRule/plugin/index.js.map +1 -1
  190. package/dist/features/indent/feature.client.d.ts +1 -2
  191. package/dist/features/indent/feature.client.d.ts.map +1 -1
  192. package/dist/features/indent/feature.client.js +9 -16
  193. package/dist/features/indent/feature.client.js.map +1 -1
  194. package/dist/features/indent/feature.server.d.ts +1 -2
  195. package/dist/features/indent/feature.server.d.ts.map +1 -1
  196. package/dist/features/indent/feature.server.js +9 -15
  197. package/dist/features/indent/feature.server.js.map +1 -1
  198. package/dist/features/indent/i18n.js.map +1 -1
  199. package/dist/features/indent/toolbarIndentGroup.js.map +1 -1
  200. package/dist/features/link/drawer/baseFields.d.ts +2 -2
  201. package/dist/features/link/drawer/baseFields.d.ts.map +1 -1
  202. package/dist/features/link/drawer/baseFields.js.map +1 -1
  203. package/dist/features/link/drawer/index.js.map +1 -1
  204. package/dist/features/link/drawer/types.js.map +1 -1
  205. package/dist/features/link/feature.client.d.ts +3 -4
  206. package/dist/features/link/feature.client.d.ts.map +1 -1
  207. package/dist/features/link/feature.client.js +34 -41
  208. package/dist/features/link/feature.client.js.map +1 -1
  209. package/dist/features/link/feature.server.d.ts +4 -6
  210. package/dist/features/link/feature.server.d.ts.map +1 -1
  211. package/dist/features/link/feature.server.js +123 -125
  212. package/dist/features/link/feature.server.js.map +1 -1
  213. package/dist/features/link/graphQLPopulationPromise.d.ts +1 -1
  214. package/dist/features/link/graphQLPopulationPromise.d.ts.map +1 -1
  215. package/dist/features/link/graphQLPopulationPromise.js.map +1 -1
  216. package/dist/features/link/i18n.js.map +1 -1
  217. package/dist/features/link/markdownTransformer.js.map +1 -1
  218. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  219. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  220. package/dist/features/link/nodes/types.js.map +1 -1
  221. package/dist/features/link/plugins/autoLink/index.d.ts +1 -1
  222. package/dist/features/link/plugins/autoLink/index.d.ts.map +1 -1
  223. package/dist/features/link/plugins/autoLink/index.js.map +1 -1
  224. package/dist/features/link/plugins/clickableLink/index.d.ts +1 -1
  225. package/dist/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  226. package/dist/features/link/plugins/clickableLink/index.js.map +1 -1
  227. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  228. package/dist/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  229. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts +1 -1
  230. package/dist/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  231. package/dist/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  232. package/dist/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  233. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts +2 -2
  234. package/dist/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  235. package/dist/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  236. package/dist/features/link/plugins/link/index.d.ts +1 -1
  237. package/dist/features/link/plugins/link/index.d.ts.map +1 -1
  238. package/dist/features/link/plugins/link/index.js.map +1 -1
  239. package/dist/features/link/validate.d.ts +1 -1
  240. package/dist/features/link/validate.d.ts.map +1 -1
  241. package/dist/features/link/validate.js.map +1 -1
  242. package/dist/features/lists/checklist/feature.client.d.ts +1 -2
  243. package/dist/features/lists/checklist/feature.client.d.ts.map +1 -1
  244. package/dist/features/lists/checklist/feature.client.js +50 -57
  245. package/dist/features/lists/checklist/feature.client.js.map +1 -1
  246. package/dist/features/lists/checklist/feature.server.d.ts +1 -2
  247. package/dist/features/lists/checklist/feature.server.d.ts.map +1 -1
  248. package/dist/features/lists/checklist/feature.server.js +28 -31
  249. package/dist/features/lists/checklist/feature.server.js.map +1 -1
  250. package/dist/features/lists/checklist/i18n.js.map +1 -1
  251. package/dist/features/lists/checklist/markdownTransformers.js.map +1 -1
  252. package/dist/features/lists/checklist/plugin/index.d.ts +1 -1
  253. package/dist/features/lists/checklist/plugin/index.d.ts.map +1 -1
  254. package/dist/features/lists/checklist/plugin/index.js.map +1 -1
  255. package/dist/features/lists/htmlConverter.js.map +1 -1
  256. package/dist/features/lists/orderedList/feature.client.d.ts +1 -2
  257. package/dist/features/lists/orderedList/feature.client.d.ts.map +1 -1
  258. package/dist/features/lists/orderedList/feature.client.js +39 -46
  259. package/dist/features/lists/orderedList/feature.client.js.map +1 -1
  260. package/dist/features/lists/orderedList/feature.server.d.ts +1 -2
  261. package/dist/features/lists/orderedList/feature.server.d.ts.map +1 -1
  262. package/dist/features/lists/orderedList/feature.server.js +28 -31
  263. package/dist/features/lists/orderedList/feature.server.js.map +1 -1
  264. package/dist/features/lists/orderedList/i18n.js.map +1 -1
  265. package/dist/features/lists/orderedList/markdownTransformer.js.map +1 -1
  266. package/dist/features/lists/plugin/index.d.ts +1 -1
  267. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  268. package/dist/features/lists/plugin/index.js.map +1 -1
  269. package/dist/features/lists/shared/markdown.d.ts +1 -1
  270. package/dist/features/lists/shared/markdown.js.map +1 -1
  271. package/dist/features/lists/shared/slashMenuListGroup.js.map +1 -1
  272. package/dist/features/lists/unorderedList/feature.client.d.ts +1 -2
  273. package/dist/features/lists/unorderedList/feature.client.d.ts.map +1 -1
  274. package/dist/features/lists/unorderedList/feature.client.js +40 -49
  275. package/dist/features/lists/unorderedList/feature.client.js.map +1 -1
  276. package/dist/features/lists/unorderedList/feature.server.d.ts +1 -2
  277. package/dist/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  278. package/dist/features/lists/unorderedList/feature.server.js +26 -31
  279. package/dist/features/lists/unorderedList/feature.server.js.map +1 -1
  280. package/dist/features/lists/unorderedList/i18n.js.map +1 -1
  281. package/dist/features/lists/unorderedList/markdownTransformer.js.map +1 -1
  282. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts +0 -1
  283. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.d.ts.map +1 -1
  284. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
  285. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  286. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js +1 -1
  287. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  288. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts +0 -1
  289. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.d.ts.map +1 -1
  290. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  291. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  292. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js +1 -1
  293. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  294. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts +0 -1
  295. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.d.ts.map +1 -1
  296. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  297. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  298. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js +1 -1
  299. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  300. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts +0 -1
  301. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  302. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  303. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  304. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js +1 -1
  305. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  306. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts +0 -1
  307. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.d.ts.map +1 -1
  308. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  309. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  310. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js +1 -1
  311. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  312. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts +0 -1
  313. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  314. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  315. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  316. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js +1 -1
  317. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  318. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts +0 -1
  319. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.d.ts.map +1 -1
  320. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  321. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  322. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js +1 -1
  323. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  324. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  325. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  326. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +1 -1
  327. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  328. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +1 -2
  329. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +1 -1
  330. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +20 -27
  331. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  332. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +1 -2
  333. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  334. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +39 -42
  335. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  336. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  337. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  338. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +0 -1
  339. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts.map +1 -1
  340. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  341. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  342. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js +1 -1
  343. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  344. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts +0 -1
  345. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.d.ts.map +1 -1
  346. package/dist/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  347. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  348. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js +1 -1
  349. package/dist/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  350. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts +0 -1
  351. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.d.ts.map +1 -1
  352. package/dist/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  353. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  354. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js +1 -1
  355. package/dist/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  356. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts +0 -1
  357. package/dist/features/migrations/slateToLexical/converter/converters/link/client.d.ts.map +1 -1
  358. package/dist/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  359. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  360. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js +1 -1
  361. package/dist/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  362. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts +0 -1
  363. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.d.ts.map +1 -1
  364. package/dist/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  365. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  366. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js +1 -1
  367. package/dist/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  368. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts +0 -1
  369. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.d.ts.map +1 -1
  370. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  371. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  372. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js +1 -1
  373. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  374. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts +0 -1
  375. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.d.ts.map +1 -1
  376. package/dist/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  377. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  378. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js +1 -1
  379. package/dist/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  380. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts +0 -1
  381. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.d.ts.map +1 -1
  382. package/dist/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  383. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  384. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js +1 -1
  385. package/dist/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  386. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts +0 -1
  387. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.d.ts.map +1 -1
  388. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  389. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  390. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js +1 -1
  391. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  392. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts +0 -1
  393. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.d.ts.map +1 -1
  394. package/dist/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  395. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  396. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js +1 -1
  397. package/dist/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  398. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  399. package/dist/features/migrations/slateToLexical/converter/index.js.map +1 -1
  400. package/dist/features/migrations/slateToLexical/converter/types.d.ts +1 -1
  401. package/dist/features/migrations/slateToLexical/converter/types.js.map +1 -1
  402. package/dist/features/migrations/slateToLexical/feature.client.d.ts +1 -2
  403. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +1 -1
  404. package/dist/features/migrations/slateToLexical/feature.client.js +20 -27
  405. package/dist/features/migrations/slateToLexical/feature.client.js.map +1 -1
  406. package/dist/features/migrations/slateToLexical/feature.server.d.ts +1 -2
  407. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  408. package/dist/features/migrations/slateToLexical/feature.server.js +39 -42
  409. package/dist/features/migrations/slateToLexical/feature.server.js.map +1 -1
  410. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  411. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  412. package/dist/features/paragraph/feature.client.d.ts +1 -2
  413. package/dist/features/paragraph/feature.client.d.ts.map +1 -1
  414. package/dist/features/paragraph/feature.client.js +33 -40
  415. package/dist/features/paragraph/feature.client.js.map +1 -1
  416. package/dist/features/paragraph/feature.server.d.ts +1 -2
  417. package/dist/features/paragraph/feature.server.d.ts.map +1 -1
  418. package/dist/features/paragraph/feature.server.js +10 -15
  419. package/dist/features/paragraph/feature.server.js.map +1 -1
  420. package/dist/features/paragraph/i18n.js.map +1 -1
  421. package/dist/features/relationship/drawer/commands.js.map +1 -1
  422. package/dist/features/relationship/drawer/index.d.ts.map +1 -1
  423. package/dist/features/relationship/drawer/index.js.map +1 -1
  424. package/dist/features/relationship/feature.client.d.ts +3 -4
  425. package/dist/features/relationship/feature.client.d.ts.map +1 -1
  426. package/dist/features/relationship/feature.client.js +60 -67
  427. package/dist/features/relationship/feature.client.js.map +1 -1
  428. package/dist/features/relationship/feature.server.d.ts +4 -4
  429. package/dist/features/relationship/feature.server.d.ts.map +1 -1
  430. package/dist/features/relationship/feature.server.js +45 -51
  431. package/dist/features/relationship/feature.server.js.map +1 -1
  432. package/dist/features/relationship/graphQLPopulationPromise.d.ts +1 -1
  433. package/dist/features/relationship/graphQLPopulationPromise.d.ts.map +1 -1
  434. package/dist/features/relationship/graphQLPopulationPromise.js.map +1 -1
  435. package/dist/features/relationship/i18n.js.map +1 -1
  436. package/dist/features/relationship/nodes/RelationshipNode.js.map +1 -1
  437. package/dist/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  438. package/dist/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  439. package/dist/features/relationship/plugins/index.d.ts +1 -1
  440. package/dist/features/relationship/plugins/index.d.ts.map +1 -1
  441. package/dist/features/relationship/plugins/index.js.map +1 -1
  442. package/dist/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  443. package/dist/features/shared/slashMenu/basicGroup.js.map +1 -1
  444. package/dist/features/shared/toolbar/addDropdownGroup.js.map +1 -1
  445. package/dist/features/shared/toolbar/featureButtonsGroup.js.map +1 -1
  446. package/dist/features/shared/toolbar/textDropdownGroup.js.map +1 -1
  447. package/dist/features/toolbars/fixed/Toolbar/index.d.ts +1 -1
  448. package/dist/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  449. package/dist/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  450. package/dist/features/toolbars/fixed/feature.client.d.ts +1 -2
  451. package/dist/features/toolbars/fixed/feature.client.d.ts.map +1 -1
  452. package/dist/features/toolbars/fixed/feature.client.js +9 -16
  453. package/dist/features/toolbars/fixed/feature.client.js.map +1 -1
  454. package/dist/features/toolbars/fixed/feature.server.d.ts +1 -2
  455. package/dist/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  456. package/dist/features/toolbars/fixed/feature.server.js +16 -18
  457. package/dist/features/toolbars/fixed/feature.server.js.map +1 -1
  458. package/dist/features/toolbars/inline/Toolbar/index.d.ts +1 -1
  459. package/dist/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  460. package/dist/features/toolbars/inline/Toolbar/index.js.map +1 -1
  461. package/dist/features/toolbars/inline/feature.client.d.ts +1 -2
  462. package/dist/features/toolbars/inline/feature.client.d.ts.map +1 -1
  463. package/dist/features/toolbars/inline/feature.client.js +9 -16
  464. package/dist/features/toolbars/inline/feature.client.js.map +1 -1
  465. package/dist/features/toolbars/inline/feature.server.d.ts +1 -2
  466. package/dist/features/toolbars/inline/feature.server.d.ts.map +1 -1
  467. package/dist/features/toolbars/inline/feature.server.js +8 -13
  468. package/dist/features/toolbars/inline/feature.server.js.map +1 -1
  469. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  470. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  471. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  472. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  473. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  474. package/dist/features/toolbars/types.d.ts +7 -2
  475. package/dist/features/toolbars/types.d.ts.map +1 -1
  476. package/dist/features/toolbars/types.js.map +1 -1
  477. package/dist/features/typeUtilities.d.ts +1 -1
  478. package/dist/features/typeUtilities.d.ts.map +1 -1
  479. package/dist/features/typeUtilities.js.map +1 -1
  480. package/dist/features/typesClient.d.ts +182 -0
  481. package/dist/features/typesClient.d.ts.map +1 -0
  482. package/dist/features/typesClient.js +3 -0
  483. package/dist/features/typesClient.js.map +1 -0
  484. package/dist/features/{types.d.ts → typesServer.d.ts} +15 -191
  485. package/dist/features/typesServer.d.ts.map +1 -0
  486. package/dist/features/typesServer.js +3 -0
  487. package/dist/features/typesServer.js.map +1 -0
  488. package/dist/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  489. package/dist/features/upload/component/index.d.ts.map +1 -1
  490. package/dist/features/upload/component/index.js +1 -1
  491. package/dist/features/upload/component/index.js.map +1 -1
  492. package/dist/features/upload/drawer/commands.js.map +1 -1
  493. package/dist/features/upload/drawer/index.d.ts.map +1 -1
  494. package/dist/features/upload/drawer/index.js.map +1 -1
  495. package/dist/features/upload/feature.client.d.ts +1 -2
  496. package/dist/features/upload/feature.client.d.ts.map +1 -1
  497. package/dist/features/upload/feature.client.js +62 -69
  498. package/dist/features/upload/feature.client.js.map +1 -1
  499. package/dist/features/upload/feature.server.d.ts +3 -4
  500. package/dist/features/upload/feature.server.d.ts.map +1 -1
  501. package/dist/features/upload/feature.server.js +166 -168
  502. package/dist/features/upload/feature.server.js.map +1 -1
  503. package/dist/features/upload/graphQLPopulationPromise.d.ts +1 -1
  504. package/dist/features/upload/graphQLPopulationPromise.d.ts.map +1 -1
  505. package/dist/features/upload/graphQLPopulationPromise.js.map +1 -1
  506. package/dist/features/upload/i18n.js.map +1 -1
  507. package/dist/features/upload/nodes/UploadNode.js.map +1 -1
  508. package/dist/features/upload/plugin/index.d.ts +1 -1
  509. package/dist/features/upload/plugin/index.d.ts.map +1 -1
  510. package/dist/features/upload/plugin/index.js.map +1 -1
  511. package/dist/features/upload/validate.d.ts +1 -1
  512. package/dist/features/upload/validate.d.ts.map +1 -1
  513. package/dist/features/upload/validate.js.map +1 -1
  514. package/dist/field/Field.d.ts.map +1 -1
  515. package/dist/field/Field.js.map +1 -1
  516. package/dist/field/index.d.ts.map +1 -1
  517. package/dist/field/index.js +9 -7
  518. package/dist/field/index.js.map +1 -1
  519. package/dist/i18n.js.map +1 -1
  520. package/dist/index.d.ts +9 -7
  521. package/dist/index.d.ts.map +1 -1
  522. package/dist/index.js +17 -17
  523. package/dist/index.js.map +1 -1
  524. package/dist/lexical/EditorPlugin.d.ts +1 -1
  525. package/dist/lexical/EditorPlugin.d.ts.map +1 -1
  526. package/dist/lexical/EditorPlugin.js.map +1 -1
  527. package/dist/lexical/LexicalEditor.js.map +1 -1
  528. package/dist/lexical/LexicalProvider.js.map +1 -1
  529. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  530. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  531. package/dist/lexical/config/client/default.js.map +1 -1
  532. package/dist/lexical/config/client/loader.d.ts +1 -1
  533. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  534. package/dist/lexical/config/client/loader.js +2 -2
  535. package/dist/lexical/config/client/loader.js.map +1 -1
  536. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  537. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  538. package/dist/lexical/config/client/sanitize.js +1 -1
  539. package/dist/lexical/config/client/sanitize.js.map +1 -1
  540. package/dist/lexical/config/server/default.d.ts +2 -2
  541. package/dist/lexical/config/server/default.d.ts.map +1 -1
  542. package/dist/lexical/config/server/default.js.map +1 -1
  543. package/dist/lexical/config/server/loader.d.ts +2 -2
  544. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  545. package/dist/lexical/config/server/loader.js +2 -2
  546. package/dist/lexical/config/server/loader.js.map +1 -1
  547. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  548. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  549. package/dist/lexical/config/server/sanitize.js.map +1 -1
  550. package/dist/lexical/config/types.d.ts +4 -3
  551. package/dist/lexical/config/types.d.ts.map +1 -1
  552. package/dist/lexical/config/types.js.map +1 -1
  553. package/dist/lexical/nodes/index.js.map +1 -1
  554. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  555. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  556. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  557. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +9 -1
  558. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  559. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  560. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  561. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  562. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  563. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  564. package/dist/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  565. package/dist/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  566. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  567. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts +0 -1
  568. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  569. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  570. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.js.map +1 -1
  571. package/dist/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -1
  572. package/dist/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  573. package/dist/lexical/plugins/handles/utils/getNodeCloseToPoint.js.map +1 -1
  574. package/dist/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  575. package/dist/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  576. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  577. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  578. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  579. package/dist/lexical/ui/icons/AI/index.js.map +1 -1
  580. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  581. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  582. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  583. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  584. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  585. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  586. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  587. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  588. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  589. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  590. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  591. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  592. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  593. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  594. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  595. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  596. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  597. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  598. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  599. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  600. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  601. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  602. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  603. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  604. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  605. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  606. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  607. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  608. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  609. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  610. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  611. package/dist/lexical/utils/canUseDOM.js.map +1 -1
  612. package/dist/lexical/utils/cloneDeep.js.map +1 -1
  613. package/dist/lexical/utils/environment.js.map +1 -1
  614. package/dist/lexical/utils/getDOMRangeRect.js.map +1 -1
  615. package/dist/lexical/utils/getSelectedNode.js.map +1 -1
  616. package/dist/lexical/utils/guard.js.map +1 -1
  617. package/dist/lexical/utils/invariant.js.map +1 -1
  618. package/dist/lexical/utils/joinClasses.js.map +1 -1
  619. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  620. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  621. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  622. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  623. package/dist/lexical/utils/point.js.map +1 -1
  624. package/dist/lexical/utils/rect.js.map +1 -1
  625. package/dist/lexical/utils/setFloatingElemPosition.js.map +1 -1
  626. package/dist/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  627. package/dist/lexical/utils/swipe.js.map +1 -1
  628. package/dist/lexical/utils/url.js.map +1 -1
  629. package/dist/populateGraphQL/defaultValue.js.map +1 -1
  630. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  631. package/dist/populateGraphQL/populate.js.map +1 -1
  632. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  633. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  634. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  635. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -1
  636. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  637. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  638. package/dist/types.d.ts +6 -6
  639. package/dist/types.d.ts.map +1 -1
  640. package/dist/types.js.map +1 -1
  641. package/dist/utilities/createClientFeature.d.ts +13 -0
  642. package/dist/utilities/createClientFeature.d.ts.map +1 -0
  643. package/dist/utilities/createClientFeature.js +30 -0
  644. package/dist/utilities/createClientFeature.js.map +1 -0
  645. package/dist/utilities/createServerFeature.d.ts +16 -0
  646. package/dist/utilities/createServerFeature.d.ts.map +1 -0
  647. package/dist/utilities/createServerFeature.js +34 -0
  648. package/dist/utilities/createServerFeature.js.map +1 -0
  649. package/dist/utilities/forEachNodeRecursively.js.map +1 -1
  650. package/dist/utilities/generateComponentMap.d.ts +2 -2
  651. package/dist/utilities/generateComponentMap.d.ts.map +1 -1
  652. package/dist/utilities/generateComponentMap.js +4 -4
  653. package/dist/utilities/generateComponentMap.js.map +1 -1
  654. package/dist/utilities/generateSchemaMap.d.ts +2 -2
  655. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  656. package/dist/utilities/generateSchemaMap.js +1 -1
  657. package/dist/utilities/generateSchemaMap.js.map +1 -1
  658. package/dist/utilities/recurseNodeTree.js.map +1 -1
  659. package/dist/utilities/useLexicalFeature.d.ts +1 -1
  660. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  661. package/dist/utilities/useLexicalFeature.js.map +1 -1
  662. package/dist/validate/index.js.map +1 -1
  663. package/dist/validate/validateNodes.d.ts +1 -1
  664. package/dist/validate/validateNodes.d.ts.map +1 -1
  665. package/dist/validate/validateNodes.js.map +1 -1
  666. package/package.json +10 -10
  667. package/dist/exports/client/Field-YMWNSE3A.js +0 -2
  668. package/dist/exports/client/Field-YMWNSE3A.js.map +0 -7
  669. package/dist/exports/client/chunk-ZITHDR53.js +0 -2
  670. package/dist/exports/client/chunk-ZITHDR53.js.map +0 -7
  671. package/dist/exports/client/component-E2NHAHBC.js.map +0 -7
  672. package/dist/exports/client/component-X4LSLSWF.js +0 -2
  673. package/dist/exports/client/component-X4LSLSWF.js.map +0 -7
  674. package/dist/features/types.d.ts.map +0 -1
  675. package/dist/features/types.js +0 -3
  676. package/dist/features/types.js.map +0 -1
  677. /package/dist/exports/client/{chunk-QU5MKT75.js.map → chunk-TZLHAUCW.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/testRecorder/plugin/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAGxD,OAAO,cAAc,CAAA;AA8ErB,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEzD;AAmWD,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAYzD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/testRecorder/plugin/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAG9D,OAAO,cAAc,CAAA;AA8ErB,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAEzD;AAmWD,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,SAAS,CAYzD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/debug/testRecorder/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\n\nimport { IS_APPLE } from '../../../../lexical/utils/environment.js'\nimport './index.scss'\n\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'Enter',\n 'Backspace',\n 'Delete',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = window.getSelection()\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = window.getSelection()\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = window.getSelection()\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","$createParagraphNode","$createTextNode","$getRoot","React","useCallback","useEffect","useLayoutEffect","useRef","useState","IS_APPLE","copy","text","textArea","document","createElement","value","style","position","opacity","body","appendChild","focus","select","result","execCommand","console","log","error","removeChild","download","filename","a","setAttribute","encodeURIComponent","display","click","formatStep","step","formatOneStep","name","x","y","anchorPath","toString","anchorOffset","focusPath","focusOffset","formattedStep","count","join","isSelectAll","event","key","toLowerCase","metaKey","ctrlKey","sanitizeSelection","selection","anchorNode","focusNode","getPathFromNodeToEditor","node","rootElement","currentNode","path","undefined","unshift","Array","from","parentNode","childNodes","indexOf","keyPresses","Set","useTestRecorder","editor","steps","setSteps","isRecording","setIsRecording","setCurrentInnerHTML","templatedTest","setTemplatedTest","previousSelectionRef","skipNextSelectionChangeRef","preRef","getCurrentEditor","generateTestContent","getRootElement","browserSelection","window","getSelection","contains","map","pushStep","currentSteps","currentIndex","length","lastStep","slice","onKeyDown","has","onKeyUp","registerRootListener","prevRootElement","removeEventListener","addEventListener","current","scrollTo","scrollHeight","testContent","removeUpdateListener","registerUpdateListener","dirtyElements","dirtyLeaves","editorState","currentSelection","_selection","previousSelection","skipNextSelectionChange","size","innerHTML","toggleEditorSelection","currentEditor","update","root","clear","append","currentIsRecording","onSnapshotClick","onCopyClick","onDownloadClick","button","className","id","onClick","e","preventDefault","title","type","output","div","pre","ref","TestRecorderPlugin","testRecorderButton","testRecorderOutput","Fragment","p"],"rangeMapp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,SAAS,WAAW0D;IACtB,GAAG;QAACA;KAAoB;IAExB,MAAM6C,uBACJ,KAACA;QACCC,WAAW,CAAC,kBAAkB,EAAEvD,cAAc,WAAW,GAAG,CAAC;QAC7DwD,IAAG;QACHC,SAAS,CAACC;YACRd,sBAAsBpC;YACtBkD,EAAEC,cAAc;QAClB;QACAC,OAAO5D,cAAc,0BAA0B;QAC/C6D,MAAK;kBAEJ7D,cAAc,0BAA0B;;IAG7C,MAAM8D,SAAS9D,4BACb,MAAC+D;QAAIR,WAAU;;0BACb,MAACQ;gBAAIR,WAAU;;kCACb,KAACD;wBACCC,WAAU;wBACVC,IAAG;wBACHC,SAAS,CAACC;4BACRP;4BACAO,EAAEC,cAAc;wBAClB;wBACAC,OAAM;wBACNC,MAAK;kCACN;;kCAGD,KAACP;wBACCC,WAAU;wBACVC,IAAG;wBACHC,SAAS,CAACC;4BACRN;4BACAM,EAAEC,cAAc;wBAClB;wBACAC,OAAM;wBACNC,MAAK;kCACN;;kCAGD,KAACP;wBACCC,WAAU;wBACVC,IAAG;wBACHC,SAAS,CAACC;4BACRL;4BACAK,EAAEC,cAAc;wBAClB;wBACAC,OAAM;wBACNC,MAAK;kCACN;;;;0BAIH,KAACG;gBAAIR,IAAG;gBAAgBS,KAAK1D;0BAC1BJ;;;SAGH;IAEJ,OAAO;QAACmD;QAAQQ;KAAO;AACzB;AACA,OAAO,MAAMI,qBAAiD;IAC5D,MAAM,CAACrE,OAAO,GAAG5E;IACjB,MAAM,CAACkJ,oBAAoBC,mBAAmB,GAAGxE,gBAAgBC;IAEjE,qBACE,MAACxE,MAAMgJ,QAAQ;;0BACb,KAACC;0BAAE;;YACFH;YACAC;0BACD,KAACE;0BAAE;;;;AAGT,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/features/debug/testRecorder/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type { BaseSelection, LexicalEditor } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { $createParagraphNode, $createTextNode, $getRoot } from 'lexical'\nimport * as React from 'react'\nimport { type JSX, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\n\nimport { IS_APPLE } from '../../../../lexical/utils/environment.js'\nimport './index.scss'\n\nconst copy = (text: null | string) => {\n const textArea = document.createElement('textarea')\n textArea.value = text || ''\n textArea.style.position = 'absolute'\n textArea.style.opacity = '0'\n document.body?.appendChild(textArea)\n textArea.focus()\n textArea.select()\n try {\n const result = document.execCommand('copy')\n // eslint-disable-next-line no-console\n console.log(result)\n } catch (error) {\n console.error(error)\n }\n document.body?.removeChild(textArea)\n}\n\nconst download = (filename: string, text: null | string) => {\n const a = document.createElement('a')\n a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text || ''))\n a.setAttribute('download', filename)\n a.style.display = 'none'\n document.body?.appendChild(a)\n a.click()\n document.body?.removeChild(a)\n}\n\nconst formatStep = (step: Step) => {\n const formatOneStep = (name: string, value: Step['value']) => {\n switch (name) {\n case 'click': {\n return ` await page.mouse.click(${value.x}, ${value.y});`\n }\n case 'press': {\n return ` await page.keyboard.press('${value}');`\n }\n case 'keydown': {\n return ` await page.keyboard.keydown('${value}');`\n }\n case 'keyup': {\n return ` await page.keyboard.keyup('${value}');`\n }\n case 'type': {\n return ` await page.keyboard.type('${value}');`\n }\n case 'selectAll': {\n return ` await selectAll(page);`\n }\n case 'snapshot': {\n return ` await assertHTMLSnapshot(page);\n await assertSelection(page, {\n anchorPath: [${value.anchorPath.toString()}],\n anchorOffset: ${value.anchorOffset},\n focusPath: [${value.focusPath.toString()}],\n focusOffset: ${value.focusOffset},\n });\n`\n }\n default:\n return ``\n }\n }\n const formattedStep = formatOneStep(step.name, step.value)\n switch (step.count) {\n case 1:\n return formattedStep\n case 2:\n return [formattedStep, formattedStep].join(`\\n`)\n default:\n return ` await repeat(${step.count}, async () => {\n ${formattedStep}\n );`\n }\n}\n\nexport function isSelectAll(event: KeyboardEvent): boolean {\n return event.key.toLowerCase() === 'a' && (IS_APPLE ? event.metaKey : event.ctrlKey)\n}\n\n// stolen from LexicalSelection-test\nfunction sanitizeSelection(selection: Selection) {\n const { anchorNode, focusNode } = selection\n let { anchorOffset, focusOffset } = selection\n if (anchorOffset !== 0) {\n anchorOffset--\n }\n if (focusOffset !== 0) {\n focusOffset--\n }\n return { anchorNode, anchorOffset, focusNode, focusOffset }\n}\n\nfunction getPathFromNodeToEditor(node: Node, rootElement: HTMLElement | null) {\n let currentNode: Node | null | undefined = node\n const path = []\n while (currentNode !== rootElement) {\n if (currentNode !== null && currentNode !== undefined) {\n path.unshift(\n Array.from(currentNode?.parentNode?.childNodes ?? []).indexOf(currentNode as ChildNode),\n )\n }\n currentNode = currentNode?.parentNode\n }\n return path\n}\n\nconst keyPresses = new Set([\n 'Enter',\n 'Backspace',\n 'Delete',\n 'Escape',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n])\n\ntype Step = {\n count: number\n name: string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any\n}\n\ntype Steps = Step[]\n\nfunction useTestRecorder(editor: LexicalEditor): [JSX.Element, JSX.Element | null] {\n const [steps, setSteps] = useState<Steps>([])\n const [isRecording, setIsRecording] = useState(false)\n const [, setCurrentInnerHTML] = useState('')\n const [templatedTest, setTemplatedTest] = useState('')\n const previousSelectionRef = useRef<BaseSelection | null>(null)\n const skipNextSelectionChangeRef = useRef(false)\n const preRef = useRef<HTMLPreElement>(null)\n\n const getCurrentEditor = useCallback(() => {\n return editor\n }, [editor])\n\n const generateTestContent = useCallback(() => {\n const rootElement = editor.getRootElement()\n const browserSelection = window.getSelection()\n\n if (\n rootElement == null ||\n browserSelection == null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null ||\n !rootElement.contains(browserSelection.anchorNode) ||\n !rootElement.contains(browserSelection.focusNode)\n ) {\n return null\n }\n\n return `\nimport {\n initializeE2E,\n assertHTMLSnapshot,\n assertSelection,\n repeat,\n} from '../utils';\nimport {selectAll} from '../keyboardShortcuts';\nimport { RangeSelection } from 'lexical';\nimport { NodeSelection } from 'lexical';\n\ndescribe('Test case', () => {\n initializeE2E((e2e) => {\n it('Should pass this test', async () => {\n const {page} = e2e;\n\n await page.focus('div[contenteditable=\"true\"]');\n${steps.map(formatStep).join(`\\n`)}\n });\n});\n `\n }, [editor, steps])\n\n // just a wrapper around inserting new actions so that we can\n // coalesce some actions like insertText/moveNativeSelection\n const pushStep = useCallback(\n (name: string, value: Step['value']) => {\n setSteps((currentSteps) => {\n // trying to group steps\n const currentIndex = steps.length - 1\n const lastStep = steps[currentIndex]\n if (lastStep) {\n if (lastStep.name === name) {\n if (name === 'type') {\n // for typing events we just append the text\n return [\n ...steps.slice(0, currentIndex),\n { ...lastStep, value: lastStep.value + value },\n ]\n } else {\n // for other events we bump the counter if their values are the same\n if (lastStep.value === value) {\n return [...steps.slice(0, currentIndex), { ...lastStep, count: lastStep.count + 1 }]\n }\n }\n }\n }\n // could not group, just append a new one\n return [...currentSteps, { name, count: 1, value }]\n })\n },\n [steps, setSteps],\n )\n\n useLayoutEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (isSelectAll(event)) {\n pushStep('selectAll', '')\n } else if (keyPresses.has(key)) {\n pushStep('press', event.key)\n } else if ([...key].length > 1) {\n pushStep('keydown', event.key)\n } else {\n pushStep('type', event.key)\n }\n }\n\n const onKeyUp = (event: KeyboardEvent) => {\n if (!isRecording) {\n return\n }\n const key = event.key\n if (!keyPresses.has(key) && [...key].length > 1) {\n pushStep('keyup', event.key)\n }\n }\n\n return editor.registerRootListener(\n (rootElement: HTMLElement | null, prevRootElement: HTMLElement | null) => {\n if (prevRootElement !== null) {\n prevRootElement.removeEventListener('keydown', onKeyDown)\n prevRootElement.removeEventListener('keyup', onKeyUp)\n }\n if (rootElement !== null) {\n rootElement.addEventListener('keydown', onKeyDown)\n rootElement.addEventListener('keyup', onKeyUp)\n }\n },\n )\n }, [editor, isRecording, pushStep])\n\n useLayoutEffect(() => {\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }, [generateTestContent])\n\n useEffect(() => {\n if (steps) {\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n if (preRef.current) {\n preRef.current.scrollTo(0, preRef.current.scrollHeight)\n }\n }\n }, [generateTestContent, steps])\n\n useEffect(() => {\n const removeUpdateListener = editor.registerUpdateListener(\n ({ dirtyElements, dirtyLeaves, editorState }) => {\n if (!isRecording) {\n return\n }\n const currentSelection = editorState._selection\n const previousSelection = previousSelectionRef.current\n const skipNextSelectionChange = skipNextSelectionChangeRef.current\n if (previousSelection !== currentSelection) {\n if (dirtyLeaves.size === 0 && dirtyElements.size === 0 && !skipNextSelectionChange) {\n const browserSelection = window.getSelection()\n if (\n browserSelection &&\n (browserSelection.anchorNode == null || browserSelection.focusNode == null)\n ) {\n return\n }\n }\n previousSelectionRef.current = currentSelection\n }\n skipNextSelectionChangeRef.current = false\n const testContent = generateTestContent()\n if (testContent !== null) {\n setTemplatedTest(testContent)\n }\n },\n )\n return removeUpdateListener\n }, [editor, generateTestContent, isRecording, pushStep])\n\n // save innerHTML\n useEffect(() => {\n if (!isRecording) {\n return\n }\n const removeUpdateListener = editor.registerUpdateListener(() => {\n const rootElement = editor.getRootElement()\n if (rootElement !== null) {\n setCurrentInnerHTML(rootElement?.innerHTML)\n }\n })\n return removeUpdateListener\n }, [editor, isRecording])\n\n // clear editor and start recording\n const toggleEditorSelection = useCallback(\n (currentEditor: LexicalEditor) => {\n if (!isRecording) {\n currentEditor.update(() => {\n const root = $getRoot()\n root.clear()\n const text = $createTextNode()\n root.append($createParagraphNode().append(text))\n text.select()\n })\n setSteps([])\n }\n setIsRecording((currentIsRecording) => !currentIsRecording)\n },\n [isRecording],\n )\n\n const onSnapshotClick = useCallback(() => {\n if (!isRecording) {\n return\n }\n const browserSelection = window.getSelection()\n if (\n browserSelection === null ||\n browserSelection.anchorNode == null ||\n browserSelection.focusNode == null\n ) {\n return\n }\n const { anchorNode, anchorOffset, focusNode, focusOffset } = sanitizeSelection(browserSelection)\n const rootElement = getCurrentEditor().getRootElement()\n let anchorPath\n if (anchorNode !== null) {\n anchorPath = getPathFromNodeToEditor(anchorNode, rootElement)\n }\n let focusPath\n if (focusNode !== null) {\n focusPath = getPathFromNodeToEditor(focusNode, rootElement)\n }\n pushStep('snapshot', {\n anchorNode,\n anchorOffset,\n anchorPath,\n focusNode,\n focusOffset,\n focusPath,\n })\n }, [pushStep, isRecording, getCurrentEditor])\n\n const onCopyClick = useCallback(() => {\n copy(generateTestContent())\n }, [generateTestContent])\n\n const onDownloadClick = useCallback(() => {\n download('test.js', generateTestContent())\n }, [generateTestContent])\n\n const button = (\n <button\n className={`editor-dev-button ${isRecording ? 'active' : ''}`}\n id=\"test-recorder-button\"\n onClick={(e) => {\n toggleEditorSelection(getCurrentEditor())\n e.preventDefault()\n }}\n title={isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n type=\"button\"\n >\n {isRecording ? 'Disable test recorder' : 'Enable test recorder'}\n </button>\n )\n const output = isRecording ? (\n <div className=\"test-recorder-output\">\n <div className=\"test-recorder-toolbar\">\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-snapshot\"\n onClick={(e) => {\n onSnapshotClick()\n e.preventDefault()\n }}\n title=\"Insert snapshot\"\n type=\"button\"\n >\n Insert Snapshot\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-copy\"\n onClick={(e) => {\n onCopyClick()\n e.preventDefault()\n }}\n title=\"Copy to clipboard\"\n type=\"button\"\n >\n Copy\n </button>\n <button\n className=\"test-recorder-button\"\n id=\"test-recorder-button-download\"\n onClick={(e) => {\n onDownloadClick()\n e.preventDefault()\n }}\n title=\"Download as a file\"\n type=\"button\"\n >\n Download\n </button>\n </div>\n <pre id=\"test-recorder\" ref={preRef}>\n {templatedTest}\n </pre>\n </div>\n ) : null\n\n return [button, output]\n}\nexport const TestRecorderPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n const [testRecorderButton, testRecorderOutput] = useTestRecorder(editor)\n\n return (\n <React.Fragment>\n <p>HI</p>\n {testRecorderButton}\n {testRecorderOutput}\n <p>DONE</p>\n </React.Fragment>\n )\n}\n"],"names":["useLexicalComposerContext","$createParagraphNode","$createTextNode","$getRoot","React","useCallback","useEffect","useLayoutEffect","useRef","useState","IS_APPLE","copy","text","textArea","document","createElement","value","style","position","opacity","body","appendChild","focus","select","result","execCommand","console","log","error","removeChild","download","filename","a","setAttribute","encodeURIComponent","display","click","formatStep","step","formatOneStep","name","x","y","anchorPath","toString","anchorOffset","focusPath","focusOffset","formattedStep","count","join","isSelectAll","event","key","toLowerCase","metaKey","ctrlKey","sanitizeSelection","selection","anchorNode","focusNode","getPathFromNodeToEditor","node","rootElement","currentNode","path","undefined","unshift","Array","from","parentNode","childNodes","indexOf","keyPresses","Set","useTestRecorder","editor","steps","setSteps","isRecording","setIsRecording","setCurrentInnerHTML","templatedTest","setTemplatedTest","previousSelectionRef","skipNextSelectionChangeRef","preRef","getCurrentEditor","generateTestContent","getRootElement","browserSelection","window","getSelection","contains","map","pushStep","currentSteps","currentIndex","length","lastStep","slice","onKeyDown","has","onKeyUp","registerRootListener","prevRootElement","removeEventListener","addEventListener","current","scrollTo","scrollHeight","testContent","removeUpdateListener","registerUpdateListener","dirtyElements","dirtyLeaves","editorState","currentSelection","_selection","previousSelection","skipNextSelectionChange","size","innerHTML","toggleEditorSelection","currentEditor","update","root","clear","append","currentIsRecording","onSnapshotClick","onCopyClick","onDownloadClick","button","className","id","onClick","e","preventDefault","title","type","output","div","pre","ref","TestRecorderPlugin","testRecorderButton","testRecorderOutput","Fragment","p"],"mappings":"AAAA;;AAGA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,oBAAoB,EAAEC,eAAe,EAAEC,QAAQ,Q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CAACC;4BACRL;4BACAK,EAAEC,cAAc;wBAClB;wBACAC,OAAM;wBACNC,MAAK;kCACN;;;;0BAIH,KAACG;gBAAIR,IAAG;gBAAgBS,KAAK1D;0BAC1BJ;;;SAGH;IAEJ,OAAO;QAACmD;QAAQQ;KAAO;AACzB;AACA,OAAO,MAAMI,qBAAiD;IAC5D,MAAM,CAACrE,OAAO,GAAG5E;IACjB,MAAM,CAACkJ,oBAAoBC,mBAAmB,GAAGxE,gBAAgBC;IAEjE,qBACE,MAACxE,MAAMgJ,QAAQ;;0BACb,KAACC;0BAAE;;YACFH;YACAC;0BACD,KAACE;0BAAE;;;;AAGT,EAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const TreeViewFeatureClientComponent: import("react").FC<{
1
+ export declare const TreeViewFeatureClient: import("react").FC<{
3
2
  featureKey: string;
4
3
  order: number;
5
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/debug/treeView/feature.client.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,8BAA8B;;;EAA+C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/debug/treeView/feature.client.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB;;;EAOhC,CAAA"}
@@ -1,20 +1,13 @@
1
1
  'use client';
2
- import { createClientComponent } from '../../createClientComponent.js';
2
+ import { createClientFeature } from '../../../utilities/createClientFeature.js';
3
3
  import { TreeViewPlugin } from './plugin/index.js';
4
- const TreeViewFeatureClient = (props)=>{
5
- return {
6
- clientFeatureProps: props,
7
- feature: ()=>({
8
- clientFeatureProps: props,
9
- plugins: [
10
- {
11
- Component: TreeViewPlugin,
12
- position: 'bottom'
13
- }
14
- ]
15
- })
16
- };
17
- };
18
- export const TreeViewFeatureClientComponent = createClientComponent(TreeViewFeatureClient);
4
+ export const TreeViewFeatureClient = createClientFeature({
5
+ plugins: [
6
+ {
7
+ Component: TreeViewPlugin,
8
+ position: 'bottom'
9
+ }
10
+ ]
11
+ });
19
12
 
20
13
  //# sourceMappingURL=feature.client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/debug/treeView/feature.client.tsx"],"sourcesContent":["'use client'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { TreeViewPlugin } from './plugin/index.js'\n\nconst TreeViewFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n plugins: [\n {\n Component: TreeViewPlugin,\n position: 'bottom',\n },\n ],\n }),\n }\n}\n\nexport const TreeViewFeatureClientComponent = createClientComponent(TreeViewFeatureClient)\n"],"names":["createClientComponent","TreeViewPlugin","TreeViewFeatureClient","props","clientFeatureProps","feature","plugins","Component","position","TreeViewFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA;AAGA,SAASA,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,cAAc,QAAQ,oBAAmB;AAElD,MAAMC,wBAAkE,CAACC;IACvE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,SAAS;oBACP;wBACEC,WAAWN;wBACXO,UAAU;oBACZ;iBACD;YACH,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,iCAAiCT,sBAAsBE,uBAAsB"}
1
+ {"version":3,"sources":["../../../../src/features/debug/treeView/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { TreeViewPlugin } from './plugin/index.js'\n\nexport const TreeViewFeatureClient = createClientFeature({\n plugins: [\n {\n Component: TreeViewPlugin,\n position: 'bottom',\n },\n ],\n})\n"],"names":["createClientFeature","TreeViewPlugin","TreeViewFeatureClient","plugins","Component","position"],"mappings":"AAAA;AAEA,SAASA,mBAAmB,QAAQ,4CAA2C;AAC/E,SAASC,cAAc,QAAQ,oBAAmB;AAElD,OAAO,MAAMC,wBAAwBF,oBAAoB;IACvDG,SAAS;QACP;YACEC,WAAWH;YACXI,UAAU;QACZ;KACD;AACH,GAAE"}
@@ -1,3 +1,2 @@
1
- import type { FeatureProviderProviderServer } from '../../types.js';
2
- export declare const TreeViewFeature: FeatureProviderProviderServer<undefined, undefined>;
1
+ export declare const TreeViewFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, undefined>;
3
2
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/debug/treeView/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAKnE,eAAO,MAAM,eAAe,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAW/E,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/debug/treeView/feature.server.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,+FAK1B,CAAA"}
@@ -1,16 +1,11 @@
1
1
  // eslint-disable-next-line payload/no-imports-from-exports-dir
2
- import { TreeViewFeatureClientComponent } from '../../../exports/client/index.js';
3
- export const TreeViewFeature = (props)=>{
4
- return {
5
- feature: ()=>{
6
- return {
7
- ClientComponent: TreeViewFeatureClientComponent,
8
- serverFeatureProps: props
9
- };
10
- },
11
- key: 'treeView',
12
- serverFeatureProps: props
13
- };
14
- };
2
+ import { TreeViewFeatureClient } from '../../../exports/client/index.js';
3
+ import { createServerFeature } from '../../../utilities/createServerFeature.js';
4
+ export const TreeViewFeature = createServerFeature({
5
+ feature: {
6
+ ClientFeature: TreeViewFeatureClient
7
+ },
8
+ key: 'treeView'
9
+ });
15
10
 
16
11
  //# sourceMappingURL=feature.server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/debug/treeView/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { TreeViewFeatureClientComponent } from '../../../exports/client/index.js'\n\nexport const TreeViewFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: TreeViewFeatureClientComponent,\n serverFeatureProps: props,\n }\n },\n key: 'treeView',\n serverFeatureProps: props,\n }\n}\n"],"names":["TreeViewFeatureClientComponent","TreeViewFeature","props","feature","ClientComponent","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,+DAA+D;AAC/D,SAASA,8BAA8B,QAAQ,mCAAkC;AAEjF,OAAO,MAAMC,kBAAuE,CAACC;IACnF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoBH;YACtB;QACF;QACAI,KAAK;QACLD,oBAAoBH;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/debug/treeView/feature.server.ts"],"sourcesContent":["// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { TreeViewFeatureClient } from '../../../exports/client/index.js'\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\n\nexport const TreeViewFeature = createServerFeature({\n feature: {\n ClientFeature: TreeViewFeatureClient,\n },\n key: 'treeView',\n})\n"],"names":["TreeViewFeatureClient","createServerFeature","TreeViewFeature","feature","ClientFeature","key"],"mappings":"AAAA,+DAA+D;AAC/D,SAASA,qBAAqB,QAAQ,mCAAkC;AACxE,SAASC,mBAAmB,QAAQ,4CAA2C;AAE/E,OAAO,MAAMC,kBAAkBD,oBAAoB;IACjDE,SAAS;QACPC,eAAeJ;IACjB;IACAK,KAAK;AACP,GAAE"}
@@ -1,4 +1,4 @@
1
- import type { PluginComponent } from '../../../types.js';
1
+ import type { PluginComponent } from '../../../typesClient.js';
2
2
  import './index.scss';
3
3
  export declare const TreeViewPlugin: PluginComponent<undefined>;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/treeView/plugin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,SAAS,CAarD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/debug/treeView/plugin/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAE9D,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,cAAc,EAAE,eAAe,CAAC,SAAS,CAarD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/features/debug/treeView/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../types.js'\n\nimport './index.scss'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n"],"names":["useLexicalComposerContext","TreeView","React","TreeViewPlugin","editor","timeTravelButtonClassName","timeTravelPanelButtonClassName","timeTravelPanelClassName","timeTravelPanelSliderClassName","treeTypeButtonClassName","viewClassName"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,QAAQ,QAAQ,oCAAmC;AAC5D,YAAYC,WAAW,QAAO;AAM9B,OAAO,MAAMC,iBAA6C;IACxD,MAAM,CAACC,OAAO,GAAGJ;IACjB,qBACE,KAACC;QACCG,QAAQA;QACRC,2BAA0B;QAC1BC,gCAA+B;QAC/BC,0BAAyB;QACzBC,gCAA+B;QAC/BC,yBAAwB;QACxBC,eAAc;;AAGpB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/features/debug/treeView/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { TreeView } from '@lexical/react/LexicalTreeView.js'\nimport * as React from 'react'\n\nimport type { PluginComponent } from '../../../typesClient.js'\n\nimport './index.scss'\n\nexport const TreeViewPlugin: PluginComponent<undefined> = () => {\n const [editor] = useLexicalComposerContext()\n return (\n <TreeView\n editor={editor}\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-panel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-panel-slider\"\n treeTypeButtonClassName=\"debug-treetype-button\"\n viewClassName=\"tree-view-output\"\n />\n )\n}\n"],"names":["useLexicalComposerContext","TreeView","React","TreeViewPlugin","editor","timeTravelButtonClassName","timeTravelPanelButtonClassName","timeTravelPanelClassName","timeTravelPanelSliderClassName","treeTypeButtonClassName","viewClassName"],"mappings":"AAAA;;AACA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,QAAQ,QAAQ,oCAAmC;AAC5D,YAAYC,WAAW,QAAO;AAM9B,OAAO,MAAMC,iBAA6C;IACxD,MAAM,CAACC,OAAO,GAAGJ;IACjB,qBACE,KAACC;QACCG,QAAQA;QACRC,2BAA0B;QAC1BC,gCAA+B;QAC/BC,0BAAyB;QACzBC,gCAA+B;QAC/BC,yBAAwB;QACxBC,eAAc;;AAGpB,EAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const BoldFeatureClientComponent: import("react").FC<{
1
+ export declare const BoldFeatureClient: import("react").FC<{
3
2
  featureKey: string;
4
3
  order: number;
5
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.client.tsx"],"names":[],"mappings":";AA0DA,eAAO,MAAM,0BAA0B;;;EAA2C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.client.tsx"],"names":[],"mappings":"AAkCA,eAAO,MAAM,iBAAiB;;;EAe5B,CAAA"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js';
4
- import { createClientComponent } from '../../createClientComponent.js';
4
+ import { createClientFeature } from '../../../utilities/createClientFeature.js';
5
5
  import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
6
  import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from './markdownTransformers.js';
7
7
  const toolbarGroups = [
@@ -22,30 +22,23 @@ const toolbarGroups = [
22
22
  }
23
23
  ])
24
24
  ];
25
- const BoldFeatureClient = (props)=>{
25
+ export const BoldFeatureClient = createClientFeature(({ featureProviderMap })=>{
26
+ const markdownTransformers = [
27
+ BOLD_STAR,
28
+ BOLD_UNDERSCORE
29
+ ];
30
+ if (featureProviderMap.get('italic')) {
31
+ markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR);
32
+ }
26
33
  return {
27
- clientFeatureProps: props,
28
- feature: ({ featureProviderMap })=>{
29
- const markdownTransformers = [
30
- BOLD_STAR,
31
- BOLD_UNDERSCORE
32
- ];
33
- if (featureProviderMap.get('italic')) {
34
- markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR);
35
- }
36
- return {
37
- clientFeatureProps: props,
38
- markdownTransformers,
39
- toolbarFixed: {
40
- groups: toolbarGroups
41
- },
42
- toolbarInline: {
43
- groups: toolbarGroups
44
- }
45
- };
34
+ markdownTransformers,
35
+ toolbarFixed: {
36
+ groups: toolbarGroups
37
+ },
38
+ toolbarInline: {
39
+ groups: toolbarGroups
46
40
  }
47
41
  };
48
- };
49
- export const BoldFeatureClientComponent = createClientComponent(BoldFeatureClient);
42
+ });
50
43
 
51
44
  //# sourceMappingURL=feature.client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/format/bold/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nconst BoldFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n clientFeatureProps: props,\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const BoldFeatureClientComponent = createClientComponent(BoldFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","BoldIcon","createClientComponent","toolbarFormatGroupWithItems","BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","BoldFeatureClient","props","clientFeatureProps","feature","featureProviderMap","markdownTransformers","get","push","toolbarFixed","groups","toolbarInline","BoldFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AACA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAKhE,SAASC,QAAQ,QAAQ,0CAAyC;AAClE,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV,4BAA2B;AAElC,MAAMC,gBAAgC;IACpCL,4BAA4B;QAC1B;YACEM,gBAAgBR;YAChBS,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIZ,kBAAkBY,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAAChB,qBAAqB;YAC9C;YACAiB,OAAO;QACT;KACD;CACF;AAED,MAAMC,oBAA8D,CAACC;IACnE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,MAAMC,uBAAuB;gBAACjB;gBAAWC;aAAgB;YACzD,IAAIe,mBAAmBE,GAAG,CAAC,WAAW;gBACpCD,qBAAqBE,IAAI,CAACpB,wBAAwBD;YACpD;YAEA,OAAO;gBACLgB,oBAAoBD;gBACpBI;gBACAG,cAAc;oBACZC,QAAQnB;gBACV;gBACAoB,eAAe;oBACbD,QAAQnB;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMqB,6BAA6B3B,sBAAsBgB,mBAAkB"}
1
+ {"version":3,"sources":["../../../../src/features/format/bold/feature.client.tsx"],"sourcesContent":["'use client'\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { BoldIcon } from '../../../lexical/ui/icons/Bold/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: BoldIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('bold')\n }\n return false\n },\n key: 'bold',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'bold')\n },\n order: 1,\n },\n ]),\n]\n\nexport const BoldFeatureClient = createClientFeature(({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n markdownTransformers,\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n})\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","BoldIcon","createClientFeature","toolbarFormatGroupWithItems","BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","BoldFeatureClient","featureProviderMap","markdownTransformers","get","push","toolbarFixed","groups","toolbarInline"],"mappings":"AAAA;AACA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,QAAQ,QAAQ,0CAAyC;AAClE,SAASC,mBAAmB,QAAQ,4CAA2C;AAC/E,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV,4BAA2B;AAElC,MAAMC,gBAAgC;IACpCL,4BAA4B;QAC1B;YACEM,gBAAgBR;YAChBS,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIZ,kBAAkBY,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAAChB,qBAAqB;YAC9C;YACAiB,OAAO;QACT;KACD;CACF;AAED,OAAO,MAAMC,oBAAoBhB,oBAAoB,CAAC,EAAEiB,kBAAkB,EAAE;IAC1E,MAAMC,uBAAuB;QAACd;QAAWC;KAAgB;IACzD,IAAIY,mBAAmBE,GAAG,CAAC,WAAW;QACpCD,qBAAqBE,IAAI,CAACjB,wBAAwBD;IACpD;IAEA,OAAO;QACLgB;QACAG,cAAc;YACZC,QAAQhB;QACV;QACAiB,eAAe;YACbD,QAAQhB;QACV;IACF;AACF,GAAE"}
@@ -1,3 +1,2 @@
1
- import type { FeatureProviderProviderServer } from '../../types.js';
2
- export declare const BoldFeature: FeatureProviderProviderServer<undefined, undefined>;
1
+ export declare const BoldFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, undefined>;
3
2
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAWnE,eAAO,MAAM,WAAW,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAkB3E,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/bold/feature.server.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,+FActB,CAAA"}
@@ -1,28 +1,25 @@
1
1
  // eslint-disable-next-line payload/no-imports-from-exports-dir
2
- import { BoldFeatureClientComponent } from '../../../exports/client/index.js';
2
+ import { BoldFeatureClient } from '../../../exports/client/index.js';
3
+ import { createServerFeature } from '../../../utilities/createServerFeature.js';
3
4
  import { BOLD_ITALIC_STAR, BOLD_ITALIC_UNDERSCORE, BOLD_STAR, BOLD_UNDERSCORE } from './markdownTransformers.js';
4
- export const BoldFeature = (props)=>{
5
- return {
6
- dependenciesSoft: [
7
- 'italic'
8
- ],
9
- feature: ({ featureProviderMap })=>{
10
- const markdownTransformers = [
11
- BOLD_STAR,
12
- BOLD_UNDERSCORE
13
- ];
14
- if (featureProviderMap.get('italic')) {
15
- markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR);
16
- }
17
- return {
18
- ClientComponent: BoldFeatureClientComponent,
19
- markdownTransformers,
20
- serverFeatureProps: props
21
- };
22
- },
23
- key: 'bold',
24
- serverFeatureProps: props
25
- };
26
- };
5
+ export const BoldFeature = createServerFeature({
6
+ dependenciesSoft: [
7
+ 'italic'
8
+ ],
9
+ feature: ({ featureProviderMap })=>{
10
+ const markdownTransformers = [
11
+ BOLD_STAR,
12
+ BOLD_UNDERSCORE
13
+ ];
14
+ if (featureProviderMap.get('italic')) {
15
+ markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR);
16
+ }
17
+ return {
18
+ ClientFeature: BoldFeatureClient,
19
+ markdownTransformers
20
+ };
21
+ },
22
+ key: 'bold'
23
+ });
27
24
 
28
25
  //# sourceMappingURL=feature.server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/format/bold/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { BoldFeatureClientComponent } from '../../../exports/client/index.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nexport const BoldFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n dependenciesSoft: ['italic'],\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n ClientComponent: BoldFeatureClientComponent,\n markdownTransformers,\n serverFeatureProps: props,\n }\n },\n key: 'bold',\n serverFeatureProps: props,\n }\n}\n"],"names":["BoldFeatureClientComponent","BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","BoldFeature","props","dependenciesSoft","feature","featureProviderMap","markdownTransformers","get","push","ClientComponent","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,+DAA+D;AAC/D,SAASA,0BAA0B,QAAQ,mCAAkC;AAC7E,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV,4BAA2B;AAElC,OAAO,MAAMC,cAAmE,CAACC;IAC/E,OAAO;QACLC,kBAAkB;YAAC;SAAS;QAC5BC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;YAC9B,MAAMC,uBAAuB;gBAACP;gBAAWC;aAAgB;YACzD,IAAIK,mBAAmBE,GAAG,CAAC,WAAW;gBACpCD,qBAAqBE,IAAI,CAACV,wBAAwBD;YACpD;YAEA,OAAO;gBACLY,iBAAiBb;gBACjBU;gBACAI,oBAAoBR;YACtB;QACF;QACAS,KAAK;QACLD,oBAAoBR;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/format/bold/feature.server.ts"],"sourcesContent":["// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { BoldFeatureClient } from '../../../exports/client/index.js'\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport {\n BOLD_ITALIC_STAR,\n BOLD_ITALIC_UNDERSCORE,\n BOLD_STAR,\n BOLD_UNDERSCORE,\n} from './markdownTransformers.js'\n\nexport const BoldFeature = createServerFeature({\n dependenciesSoft: ['italic'],\n feature: ({ featureProviderMap }) => {\n const markdownTransformers = [BOLD_STAR, BOLD_UNDERSCORE]\n if (featureProviderMap.get('italic')) {\n markdownTransformers.push(BOLD_ITALIC_UNDERSCORE, BOLD_ITALIC_STAR)\n }\n\n return {\n ClientFeature: BoldFeatureClient,\n markdownTransformers,\n }\n },\n key: 'bold',\n})\n"],"names":["BoldFeatureClient","createServerFeature","BOLD_ITALIC_STAR","BOLD_ITALIC_UNDERSCORE","BOLD_STAR","BOLD_UNDERSCORE","BoldFeature","dependenciesSoft","feature","featureProviderMap","markdownTransformers","get","push","ClientFeature","key"],"mappings":"AAAA,+DAA+D;AAC/D,SAASA,iBAAiB,QAAQ,mCAAkC;AACpE,SAASC,mBAAmB,QAAQ,4CAA2C;AAC/E,SACEC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,eAAe,QACV,4BAA2B;AAElC,OAAO,MAAMC,cAAcL,oBAAoB;IAC7CM,kBAAkB;QAAC;KAAS;IAC5BC,SAAS,CAAC,EAAEC,kBAAkB,EAAE;QAC9B,MAAMC,uBAAuB;YAACN;YAAWC;SAAgB;QACzD,IAAII,mBAAmBE,GAAG,CAAC,WAAW;YACpCD,qBAAqBE,IAAI,CAACT,wBAAwBD;QACpD;QAEA,OAAO;YACLW,eAAeb;YACfU;QACF;IACF;IACAI,KAAK;AACP,GAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/format/bold/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const BOLD_ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n tag: '***',\n}\n\nexport const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n intraword: false,\n tag: '___',\n}\n\nexport const BOLD_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n tag: '**',\n}\n\nexport const BOLD_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n intraword: false,\n tag: '__',\n}\n"],"names":["BOLD_ITALIC_STAR","type","format","tag","BOLD_ITALIC_UNDERSCORE","intraword","BOLD_STAR","BOLD_UNDERSCORE"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,MAAMA,mBAA0C;IACrDC,MAAM;IACNC,QAAQ;QAAC;QAAQ;KAAS;IAC1BC,KAAK;AACP,EAAC;AAED,OAAO,MAAMC,yBAAgD;IAC3DH,MAAM;IACNC,QAAQ;QAAC;QAAQ;KAAS;IAC1BG,WAAW;IACXF,KAAK;AACP,EAAC;AAED,OAAO,MAAMG,YAAmC;IAC9CL,MAAM;IACNC,QAAQ;QAAC;KAAO;IAChBC,KAAK;AACP,EAAC;AAED,OAAO,MAAMI,kBAAyC;IACpDN,MAAM;IACNC,QAAQ;QAAC;KAAO;IAChBG,WAAW;IACXF,KAAK;AACP,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/format/bold/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const BOLD_ITALIC_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n tag: '***',\n}\n\nexport const BOLD_ITALIC_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold', 'italic'],\n intraword: false,\n tag: '___',\n}\n\nexport const BOLD_STAR: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n tag: '**',\n}\n\nexport const BOLD_UNDERSCORE: TextFormatTransformer = {\n type: 'text-format',\n format: ['bold'],\n intraword: false,\n tag: '__',\n}\n"],"names":["BOLD_ITALIC_STAR","type","format","tag","BOLD_ITALIC_UNDERSCORE","intraword","BOLD_STAR","BOLD_UNDERSCORE"],"mappings":"AAEA,OAAO,MAAMA,mBAA0C;IACrDC,MAAM;IACNC,QAAQ;QAAC;QAAQ;KAAS;IAC1BC,KAAK;AACP,EAAC;AAED,OAAO,MAAMC,yBAAgD;IAC3DH,MAAM;IACNC,QAAQ;QAAC;QAAQ;KAAS;IAC1BG,WAAW;IACXF,KAAK;AACP,EAAC;AAED,OAAO,MAAMG,YAAmC;IAC9CL,MAAM;IACNC,QAAQ;QAAC;KAAO;IAChBC,KAAK;AACP,EAAC;AAED,OAAO,MAAMI,kBAAyC;IACpDN,MAAM;IACNC,QAAQ;QAAC;KAAO;IAChBG,WAAW;IACXF,KAAK;AACP,EAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const InlineCodeFeatureClientComponent: import("react").FC<{
1
+ export declare const InlineCodeFeatureClient: import("react").FC<{
3
2
  featureKey: string;
4
3
  order: number;
5
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,gCAAgC;;;EAAiD,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,uBAAuB;;;EAQlC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical';
3
3
  import { CodeIcon } from '../../../lexical/ui/icons/Code/index.js';
4
- import { createClientComponent } from '../../createClientComponent.js';
4
+ import { createClientFeature } from '../../../utilities/createClientFeature.js';
5
5
  import { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js';
6
6
  import { INLINE_CODE } from './markdownTransformers.js';
7
7
  const toolbarGroups = [
@@ -22,25 +22,16 @@ const toolbarGroups = [
22
22
  }
23
23
  ])
24
24
  ];
25
- const InlineCodeFeatureClient = (props)=>{
26
- return {
27
- clientFeatureProps: props,
28
- feature: ()=>{
29
- return {
30
- clientFeatureProps: props,
31
- markdownTransformers: [
32
- INLINE_CODE
33
- ],
34
- toolbarFixed: {
35
- groups: toolbarGroups
36
- },
37
- toolbarInline: {
38
- groups: toolbarGroups
39
- }
40
- };
41
- }
42
- };
43
- };
44
- export const InlineCodeFeatureClientComponent = createClientComponent(InlineCodeFeatureClient);
25
+ export const InlineCodeFeatureClient = createClientFeature({
26
+ markdownTransformers: [
27
+ INLINE_CODE
28
+ ],
29
+ toolbarFixed: {
30
+ groups: toolbarGroups
31
+ },
32
+ toolbarInline: {
33
+ groups: toolbarGroups
34
+ }
35
+ });
45
36
 
46
37
  //# sourceMappingURL=feature.client.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\nimport type { FeatureProviderProviderClient } from '../../types.js'\n\nimport { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientComponent } from '../../createClientComponent.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nconst InlineCodeFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => {\n return {\n clientFeatureProps: props,\n markdownTransformers: [INLINE_CODE],\n\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n }\n },\n }\n}\n\nexport const InlineCodeFeatureClientComponent = createClientComponent(InlineCodeFeatureClient)\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","CodeIcon","createClientComponent","toolbarFormatGroupWithItems","INLINE_CODE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","InlineCodeFeatureClient","props","clientFeatureProps","feature","markdownTransformers","toolbarFixed","groups","toolbarInline","InlineCodeFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAKhE,SAASC,QAAQ,QAAQ,0CAAyC;AAClE,SAASC,qBAAqB,QAAQ,iCAAgC;AACtE,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SAASC,WAAW,QAAQ,4BAA2B;AAEvD,MAAMC,gBAAgC;IACpCF,4BAA4B;QAC1B;YACEG,gBAAgBL;YAChBM,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIT,kBAAkBS,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACb,qBAAqB;YAC9C;YACAc,OAAO;QACT;KACD;CACF;AAED,MAAMC,0BAAoE,CAACC;IACzE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS;YACP,OAAO;gBACLD,oBAAoBD;gBACpBG,sBAAsB;oBAACf;iBAAY;gBAEnCgB,cAAc;oBACZC,QAAQhB;gBACV;gBACAiB,eAAe;oBACbD,QAAQhB;gBACV;YACF;QACF;IACF;AACF;AAEA,OAAO,MAAMkB,mCAAmCrB,sBAAsBa,yBAAwB"}
1
+ {"version":3,"sources":["../../../../src/features/format/inlineCode/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport { $isRangeSelection, FORMAT_TEXT_COMMAND } from 'lexical'\n\nimport type { ToolbarGroup } from '../../toolbars/types.js'\n\nimport { CodeIcon } from '../../../lexical/ui/icons/Code/index.js'\nimport { createClientFeature } from '../../../utilities/createClientFeature.js'\nimport { toolbarFormatGroupWithItems } from '../shared/toolbarFormatGroup.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarFormatGroupWithItems([\n {\n ChildComponent: CodeIcon,\n isActive: ({ selection }) => {\n if ($isRangeSelection(selection)) {\n return selection.hasFormat('code')\n }\n return false\n },\n key: 'inlineCode',\n onSelect: ({ editor }) => {\n editor.dispatchCommand(FORMAT_TEXT_COMMAND, 'code')\n },\n order: 7,\n },\n ]),\n]\n\nexport const InlineCodeFeatureClient = createClientFeature({\n markdownTransformers: [INLINE_CODE],\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"names":["$isRangeSelection","FORMAT_TEXT_COMMAND","CodeIcon","createClientFeature","toolbarFormatGroupWithItems","INLINE_CODE","toolbarGroups","ChildComponent","isActive","selection","hasFormat","key","onSelect","editor","dispatchCommand","order","InlineCodeFeatureClient","markdownTransformers","toolbarFixed","groups","toolbarInline"],"mappings":"AAAA;AAEA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,UAAS;AAIhE,SAASC,QAAQ,QAAQ,0CAAyC;AAClE,SAASC,mBAAmB,QAAQ,4CAA2C;AAC/E,SAASC,2BAA2B,QAAQ,kCAAiC;AAC7E,SAASC,WAAW,QAAQ,4BAA2B;AAEvD,MAAMC,gBAAgC;IACpCF,4BAA4B;QAC1B;YACEG,gBAAgBL;YAChBM,UAAU,CAAC,EAAEC,SAAS,EAAE;gBACtB,IAAIT,kBAAkBS,YAAY;oBAChC,OAAOA,UAAUC,SAAS,CAAC;gBAC7B;gBACA,OAAO;YACT;YACAC,KAAK;YACLC,UAAU,CAAC,EAAEC,MAAM,EAAE;gBACnBA,OAAOC,eAAe,CAACb,qBAAqB;YAC9C;YACAc,OAAO;QACT;KACD;CACF;AAED,OAAO,MAAMC,0BAA0Bb,oBAAoB;IACzDc,sBAAsB;QAACZ;KAAY;IACnCa,cAAc;QACZC,QAAQb;IACV;IACAc,eAAe;QACbD,QAAQb;IACV;AACF,GAAE"}
@@ -1,3 +1,2 @@
1
- import type { FeatureProviderProviderServer } from '../../types.js';
2
- export declare const InlineCodeFeature: FeatureProviderProviderServer<undefined, undefined>;
1
+ export declare const InlineCodeFeature: import("../../typesServer.js").FeatureProviderProviderServer<undefined, undefined, undefined>;
3
2
  //# sourceMappingURL=feature.server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAA;AAMnE,eAAO,MAAM,iBAAiB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CAYjF,CAAA"}
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,+FAM5B,CAAA"}
@@ -1,20 +1,15 @@
1
1
  // eslint-disable-next-line payload/no-imports-from-exports-dir
2
- import { InlineCodeFeatureClientComponent } from '../../../exports/client/index.js';
2
+ import { InlineCodeFeatureClient } from '../../../exports/client/index.js';
3
+ import { createServerFeature } from '../../../utilities/createServerFeature.js';
3
4
  import { INLINE_CODE } from './markdownTransformers.js';
4
- export const InlineCodeFeature = (props)=>{
5
- return {
6
- feature: ()=>{
7
- return {
8
- ClientComponent: InlineCodeFeatureClientComponent,
9
- markdownTransformers: [
10
- INLINE_CODE
11
- ],
12
- serverFeatureProps: props
13
- };
14
- },
15
- key: 'inlineCode',
16
- serverFeatureProps: props
17
- };
18
- };
5
+ export const InlineCodeFeature = createServerFeature({
6
+ feature: {
7
+ ClientFeature: InlineCodeFeatureClient,
8
+ markdownTransformers: [
9
+ INLINE_CODE
10
+ ]
11
+ },
12
+ key: 'inlineCode'
13
+ });
19
14
 
20
15
  //# sourceMappingURL=feature.server.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../../types.js'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { InlineCodeFeatureClientComponent } from '../../../exports/client/index.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nexport const InlineCodeFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: InlineCodeFeatureClientComponent,\n markdownTransformers: [INLINE_CODE],\n serverFeatureProps: props,\n }\n },\n key: 'inlineCode',\n serverFeatureProps: props,\n }\n}\n"],"names":["InlineCodeFeatureClientComponent","INLINE_CODE","InlineCodeFeature","props","feature","ClientComponent","markdownTransformers","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAEA,+DAA+D;AAC/D,SAASA,gCAAgC,QAAQ,mCAAkC;AACnF,SAASC,WAAW,QAAQ,4BAA2B;AAEvD,OAAO,MAAMC,oBAAyE,CAACC;IACrF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBL;gBACjBM,sBAAsB;oBAACL;iBAAY;gBACnCM,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/format/inlineCode/feature.server.ts"],"sourcesContent":["// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { InlineCodeFeatureClient } from '../../../exports/client/index.js'\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { INLINE_CODE } from './markdownTransformers.js'\n\nexport const InlineCodeFeature = createServerFeature({\n feature: {\n ClientFeature: InlineCodeFeatureClient,\n markdownTransformers: [INLINE_CODE],\n },\n key: 'inlineCode',\n})\n"],"names":["InlineCodeFeatureClient","createServerFeature","INLINE_CODE","InlineCodeFeature","feature","ClientFeature","markdownTransformers","key"],"mappings":"AAAA,+DAA+D;AAC/D,SAASA,uBAAuB,QAAQ,mCAAkC;AAC1E,SAASC,mBAAmB,QAAQ,4CAA2C;AAC/E,SAASC,WAAW,QAAQ,4BAA2B;AAEvD,OAAO,MAAMC,oBAAoBF,oBAAoB;IACnDG,SAAS;QACPC,eAAeL;QACfM,sBAAsB;YAACJ;SAAY;IACrC;IACAK,KAAK;AACP,GAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/features/format/inlineCode/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const INLINE_CODE: TextFormatTransformer = {\n type: 'text-format',\n format: ['code'],\n tag: '`',\n}\n"],"names":["INLINE_CODE","type","format","tag"],"rangeMappings":";;;;;;","mappings":"AAEA,OAAO,MAAMA,cAAqC;IAChDC,MAAM;IACNC,QAAQ;QAAC;KAAO;IAChBC,KAAK;AACP,EAAC"}
1
+ {"version":3,"sources":["../../../../src/features/format/inlineCode/markdownTransformers.ts"],"sourcesContent":["import type { TextFormatTransformer } from '@lexical/markdown'\n\nexport const INLINE_CODE: TextFormatTransformer = {\n type: 'text-format',\n format: ['code'],\n tag: '`',\n}\n"],"names":["INLINE_CODE","type","format","tag"],"mappings":"AAEA,OAAO,MAAMA,cAAqC;IAChDC,MAAM;IACNC,QAAQ;QAAC;KAAO;IAChBC,KAAK;AACP,EAAC"}
@@ -1,5 +1,4 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- export declare const ItalicFeatureClientComponent: import("react").FC<{
1
+ export declare const ItalicFeatureClient: import("react").FC<{
3
2
  featureKey: string;
4
3
  order: number;
5
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.client.tsx"],"names":[],"mappings":";AAkDA,eAAO,MAAM,4BAA4B;;;EAA6C,CAAA"}
1
+ {"version":3,"file":"feature.client.d.ts","sourceRoot":"","sources":["../../../../src/features/format/italic/feature.client.tsx"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mBAAmB;;;EAQ9B,CAAA"}