@payloadcms/richtext-lexical 3.0.0-beta.48 → 3.0.0-beta.49

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 (324) hide show
  1. package/README.md +1 -1
  2. package/dist/cell/index.d.ts +1 -1
  3. package/dist/cell/index.d.ts.map +1 -1
  4. package/dist/cell/index.js +1 -2
  5. package/dist/cell/index.js.map +1 -1
  6. package/dist/exports/client/Component-6AVANNNR.js +2 -0
  7. package/dist/exports/client/Component-6AVANNNR.js.map +7 -0
  8. package/dist/exports/client/Component-SZVAYRJX.js +2 -0
  9. package/dist/exports/client/Component-SZVAYRJX.js.map +7 -0
  10. package/dist/exports/client/Field-U5PHZTST.js +2 -0
  11. package/dist/exports/client/Field-U5PHZTST.js.map +7 -0
  12. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js +2 -0
  13. package/dist/exports/client/RelationshipComponent-FGUPLCD2.js.map +7 -0
  14. package/dist/exports/client/bundled.css +1 -0
  15. package/dist/exports/client/chunk-33ZTAHVL.js +2 -0
  16. package/dist/exports/client/chunk-33ZTAHVL.js.map +7 -0
  17. package/dist/exports/client/chunk-35NZOHAF.js +2 -0
  18. package/dist/exports/client/chunk-35NZOHAF.js.map +7 -0
  19. package/dist/exports/client/chunk-3PZ2ZFQG.js +3 -0
  20. package/dist/exports/client/chunk-3PZ2ZFQG.js.map +7 -0
  21. package/dist/exports/client/chunk-FSTRW2TI.js +2 -0
  22. package/dist/exports/client/chunk-FSTRW2TI.js.map +7 -0
  23. package/dist/exports/client/chunk-Y5455JF3.js +2 -0
  24. package/dist/exports/client/chunk-Y5455JF3.js.map +7 -0
  25. package/dist/exports/client/component-FFLILIUZ.js +2 -0
  26. package/dist/exports/client/component-FFLILIUZ.js.map +7 -0
  27. package/dist/exports/client/component-GR6KYTLO.js +2 -0
  28. package/dist/exports/client/component-GR6KYTLO.js.map +7 -0
  29. package/dist/exports/client/component-RAVN56DE.js +2 -0
  30. package/dist/exports/client/component-RAVN56DE.js.map +7 -0
  31. package/dist/exports/client/index.d.ts +52 -0
  32. package/dist/exports/client/index.d.ts.map +1 -0
  33. package/dist/exports/client/index.js +36 -0
  34. package/dist/exports/client/index.js.map +7 -0
  35. package/dist/field/Field.d.ts +1 -0
  36. package/dist/field/Field.d.ts.map +1 -1
  37. package/dist/field/Field.js +2 -7
  38. package/dist/field/Field.js.map +1 -1
  39. package/dist/field/bundled.css +0 -0
  40. package/dist/field/features/align/feature.server.d.ts.map +1 -1
  41. package/dist/field/features/align/feature.server.js +2 -1
  42. package/dist/field/features/align/feature.server.js.map +1 -1
  43. package/dist/field/features/blockquote/feature.server.d.ts.map +1 -1
  44. package/dist/field/features/blockquote/feature.server.js +2 -1
  45. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  46. package/dist/field/features/blocks/component/BlockContent.js +1 -9
  47. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  48. package/dist/field/features/blocks/component/FormSavePlugin.d.ts +1 -2
  49. package/dist/field/features/blocks/component/FormSavePlugin.d.ts.map +1 -1
  50. package/dist/field/features/blocks/component/FormSavePlugin.js +2 -2
  51. package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
  52. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  53. package/dist/field/features/blocks/component/index.js +2 -12
  54. package/dist/field/features/blocks/component/index.js.map +1 -1
  55. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts +1 -1
  56. package/dist/field/features/blocks/component/removeEmptyArrayValues.d.ts.map +1 -1
  57. package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  58. package/dist/field/features/blocks/drawer/index.d.ts.map +1 -1
  59. package/dist/field/features/blocks/drawer/index.js +1 -4
  60. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  61. package/dist/field/features/blocks/feature.server.d.ts +1 -1
  62. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  63. package/dist/field/features/blocks/feature.server.js +3 -3
  64. package/dist/field/features/blocks/feature.server.js.map +1 -1
  65. package/dist/field/features/converters/html/field/index.d.ts +1 -1
  66. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  67. package/dist/field/features/converters/html/field/index.js.map +1 -1
  68. package/dist/field/features/createFeaturePropComponent.d.ts.map +1 -1
  69. package/dist/field/features/createFeaturePropComponent.js +1 -3
  70. package/dist/field/features/createFeaturePropComponent.js.map +1 -1
  71. package/dist/field/features/debug/testRecorder/feature.server.d.ts.map +1 -1
  72. package/dist/field/features/debug/testRecorder/feature.server.js +2 -1
  73. package/dist/field/features/debug/testRecorder/feature.server.js.map +1 -1
  74. package/dist/field/features/debug/testRecorder/plugin/index.js +0 -1
  75. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -1
  76. package/dist/field/features/debug/treeView/feature.server.d.ts.map +1 -1
  77. package/dist/field/features/debug/treeView/feature.server.js +2 -1
  78. package/dist/field/features/debug/treeView/feature.server.js.map +1 -1
  79. package/dist/field/features/debug/treeView/plugin/index.js +0 -1
  80. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -1
  81. package/dist/field/features/format/bold/feature.server.d.ts.map +1 -1
  82. package/dist/field/features/format/bold/feature.server.js +2 -1
  83. package/dist/field/features/format/bold/feature.server.js.map +1 -1
  84. package/dist/field/features/format/inlineCode/feature.server.d.ts.map +1 -1
  85. package/dist/field/features/format/inlineCode/feature.server.js +2 -1
  86. package/dist/field/features/format/inlineCode/feature.server.js.map +1 -1
  87. package/dist/field/features/format/italic/feature.server.d.ts.map +1 -1
  88. package/dist/field/features/format/italic/feature.server.js +2 -1
  89. package/dist/field/features/format/italic/feature.server.js.map +1 -1
  90. package/dist/field/features/format/strikethrough/feature.server.d.ts.map +1 -1
  91. package/dist/field/features/format/strikethrough/feature.server.js +2 -1
  92. package/dist/field/features/format/strikethrough/feature.server.js.map +1 -1
  93. package/dist/field/features/format/subscript/feature.server.d.ts.map +1 -1
  94. package/dist/field/features/format/subscript/feature.server.js +2 -1
  95. package/dist/field/features/format/subscript/feature.server.js.map +1 -1
  96. package/dist/field/features/format/superscript/feature.server.d.ts.map +1 -1
  97. package/dist/field/features/format/superscript/feature.server.js +2 -1
  98. package/dist/field/features/format/superscript/feature.server.js.map +1 -1
  99. package/dist/field/features/format/underline/feature.server.d.ts.map +1 -1
  100. package/dist/field/features/format/underline/feature.server.js +2 -1
  101. package/dist/field/features/format/underline/feature.server.js.map +1 -1
  102. package/dist/field/features/heading/feature.client.d.ts.map +1 -1
  103. package/dist/field/features/heading/feature.client.js +1 -2
  104. package/dist/field/features/heading/feature.client.js.map +1 -1
  105. package/dist/field/features/heading/feature.server.d.ts.map +1 -1
  106. package/dist/field/features/heading/feature.server.js +2 -1
  107. package/dist/field/features/heading/feature.server.js.map +1 -1
  108. package/dist/field/features/horizontalRule/feature.server.d.ts.map +1 -1
  109. package/dist/field/features/horizontalRule/feature.server.js +2 -1
  110. package/dist/field/features/horizontalRule/feature.server.js.map +1 -1
  111. package/dist/field/features/horizontalRule/plugin/index.js +0 -1
  112. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -1
  113. package/dist/field/features/indent/feature.server.d.ts.map +1 -1
  114. package/dist/field/features/indent/feature.server.js +2 -1
  115. package/dist/field/features/indent/feature.server.js.map +1 -1
  116. package/dist/field/features/link/drawer/baseFields.d.ts +1 -2
  117. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  118. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  119. package/dist/field/features/link/drawer/index.d.ts.map +1 -1
  120. package/dist/field/features/link/drawer/index.js +2 -10
  121. package/dist/field/features/link/drawer/index.js.map +1 -1
  122. package/dist/field/features/link/drawer/types.d.ts +1 -1
  123. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  124. package/dist/field/features/link/drawer/types.js.map +1 -1
  125. package/dist/field/features/link/feature.server.d.ts +1 -2
  126. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  127. package/dist/field/features/link/feature.server.js +5 -4
  128. package/dist/field/features/link/feature.server.js.map +1 -1
  129. package/dist/field/features/link/nodes/LinkNode.d.ts.map +1 -1
  130. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  131. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  132. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  133. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +3 -8
  134. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  135. package/dist/field/features/link/plugins/floatingLinkEditor/index.js +0 -1
  136. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  137. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +1 -2
  138. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  139. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  140. package/dist/field/features/link/validate.d.ts +1 -1
  141. package/dist/field/features/link/validate.d.ts.map +1 -1
  142. package/dist/field/features/link/validate.js.map +1 -1
  143. package/dist/field/features/lists/checklist/feature.server.d.ts.map +1 -1
  144. package/dist/field/features/lists/checklist/feature.server.js +2 -1
  145. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  146. package/dist/field/features/lists/orderedList/feature.server.d.ts.map +1 -1
  147. package/dist/field/features/lists/orderedList/feature.server.js +2 -1
  148. package/dist/field/features/lists/orderedList/feature.server.js.map +1 -1
  149. package/dist/field/features/lists/unorderedList/feature.server.d.ts.map +1 -1
  150. package/dist/field/features/lists/unorderedList/feature.server.js +2 -1
  151. package/dist/field/features/lists/unorderedList/feature.server.js.map +1 -1
  152. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +1 -1
  153. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js +2 -1
  154. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  155. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -1
  156. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  157. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +1 -2
  158. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  159. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  160. package/dist/field/features/migrations/slateToLexical/feature.server.d.ts.map +1 -1
  161. package/dist/field/features/migrations/slateToLexical/feature.server.js +2 -1
  162. package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
  163. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -1
  164. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  165. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +1 -2
  166. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +1 -1
  167. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  168. package/dist/field/features/paragraph/feature.server.d.ts.map +1 -1
  169. package/dist/field/features/paragraph/feature.server.js +2 -1
  170. package/dist/field/features/paragraph/feature.server.js.map +1 -1
  171. package/dist/field/features/relationship/drawer/index.js +1 -1
  172. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  173. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  174. package/dist/field/features/relationship/feature.server.js +2 -1
  175. package/dist/field/features/relationship/feature.server.js.map +1 -1
  176. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  177. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +2 -8
  178. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  179. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  180. package/dist/field/features/relationship/plugins/index.js +2 -3
  181. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  182. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.d.ts.map +1 -1
  183. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -3
  184. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  185. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  186. package/dist/field/features/toolbars/fixed/Toolbar/index.js +1 -3
  187. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  188. package/dist/field/features/toolbars/fixed/feature.server.d.ts.map +1 -1
  189. package/dist/field/features/toolbars/fixed/feature.server.js +2 -1
  190. package/dist/field/features/toolbars/fixed/feature.server.js.map +1 -1
  191. package/dist/field/features/toolbars/inline/Toolbar/index.js +0 -1
  192. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -1
  193. package/dist/field/features/toolbars/inline/feature.server.d.ts.map +1 -1
  194. package/dist/field/features/toolbars/inline/feature.server.js +2 -1
  195. package/dist/field/features/toolbars/inline/feature.server.js.map +1 -1
  196. package/dist/field/features/toolbars/shared/ToolbarButton/index.js +0 -1
  197. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  198. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts +1 -2
  199. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  200. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js +1 -2
  201. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  202. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js +1 -2
  203. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  204. package/dist/field/features/types.d.ts +1 -3
  205. package/dist/field/features/types.d.ts.map +1 -1
  206. package/dist/field/features/types.js.map +1 -1
  207. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts +1 -1
  208. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.d.ts.map +1 -1
  209. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +3 -10
  210. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  211. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  212. package/dist/field/features/upload/component/index.js +1 -9
  213. package/dist/field/features/upload/component/index.js.map +1 -1
  214. package/dist/field/features/upload/drawer/index.js +1 -1
  215. package/dist/field/features/upload/drawer/index.js.map +1 -1
  216. package/dist/field/features/upload/feature.server.d.ts +1 -1
  217. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  218. package/dist/field/features/upload/feature.server.js +3 -2
  219. package/dist/field/features/upload/feature.server.js.map +1 -1
  220. package/dist/field/features/upload/nodes/UploadNode.d.ts +1 -2
  221. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  222. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  223. package/dist/field/features/upload/plugin/index.js +1 -1
  224. package/dist/field/features/upload/plugin/index.js.map +1 -1
  225. package/dist/field/features/upload/validate.js +1 -1
  226. package/dist/field/features/upload/validate.js.map +1 -1
  227. package/dist/field/index.d.ts.map +1 -1
  228. package/dist/field/index.js +35 -99
  229. package/dist/field/index.js.map +1 -1
  230. package/dist/field/lexical/LexicalEditor.js +1 -2
  231. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  232. package/dist/field/lexical/LexicalProvider.d.ts +1 -2
  233. package/dist/field/lexical/LexicalProvider.d.ts.map +1 -1
  234. package/dist/field/lexical/LexicalProvider.js +1 -1
  235. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  236. package/dist/field/lexical/config/server/loader.d.ts +1 -1
  237. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  238. package/dist/field/lexical/config/server/loader.js.map +1 -1
  239. package/dist/field/lexical/config/server/sanitize.d.ts +1 -1
  240. package/dist/field/lexical/config/server/sanitize.d.ts.map +1 -1
  241. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  242. package/dist/field/lexical/nodes/index.d.ts.map +1 -1
  243. package/dist/field/lexical/nodes/index.js.map +1 -1
  244. package/dist/field/lexical/plugins/SlashMenu/index.js +2 -3
  245. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  246. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +0 -1
  247. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  248. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +0 -1
  249. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  250. package/dist/field/lexical/theme/EditorTheme.js +0 -1
  251. package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
  252. package/dist/field/lexical/ui/ContentEditable.js +0 -1
  253. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  254. package/dist/generateComponentMap.d.ts +1 -1
  255. package/dist/generateComponentMap.d.ts.map +1 -1
  256. package/dist/generateComponentMap.js.map +1 -1
  257. package/dist/generateSchemaMap.d.ts +1 -1
  258. package/dist/generateSchemaMap.d.ts.map +1 -1
  259. package/dist/generateSchemaMap.js.map +1 -1
  260. package/dist/index.d.ts +0 -19
  261. package/dist/index.d.ts.map +1 -1
  262. package/dist/index.js +3 -22
  263. package/dist/index.js.map +1 -1
  264. package/dist/populateGraphQL/populate.d.ts +1 -1
  265. package/dist/populateGraphQL/populate.d.ts.map +1 -1
  266. package/dist/populateGraphQL/populate.js +1 -1
  267. package/dist/populateGraphQL/populate.js.map +1 -1
  268. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  269. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  270. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  271. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts +1 -2
  272. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  273. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js +1 -1
  274. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.js.map +1 -1
  275. package/dist/types.d.ts +1 -3
  276. package/dist/types.d.ts.map +1 -1
  277. package/dist/types.js.map +1 -1
  278. package/dist/useLexicalFeature.d.ts.map +1 -1
  279. package/dist/useLexicalFeature.js +1 -3
  280. package/dist/useLexicalFeature.js.map +1 -1
  281. package/dist/validate/index.d.ts +1 -1
  282. package/dist/validate/index.d.ts.map +1 -1
  283. package/dist/validate/index.js.map +1 -1
  284. package/dist/validate/validateNodes.d.ts +1 -1
  285. package/dist/validate/validateNodes.d.ts.map +1 -1
  286. package/dist/validate/validateNodes.js.map +1 -1
  287. package/package.json +22 -22
  288. package/components.d.ts +0 -6
  289. package/components.js +0 -7
  290. package/dist/exports/components.d.ts +0 -11
  291. package/dist/exports/components.d.ts.map +0 -1
  292. package/dist/exports/components.js +0 -12
  293. package/dist/exports/components.js.map +0 -1
  294. package/dist/field/features/blocks/component/index.scss +0 -149
  295. package/dist/field/features/debug/testRecorder/plugin/index.scss +0 -49
  296. package/dist/field/features/debug/treeView/plugin/index.scss +0 -78
  297. package/dist/field/features/horizontalRule/plugin/index.scss +0 -20
  298. package/dist/field/features/link/drawer/index.scss +0 -50
  299. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +0 -86
  300. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.scss +0 -14
  301. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.scss +0 -14
  302. package/dist/field/features/relationship/nodes/components/index.scss +0 -97
  303. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +0 -119
  304. package/dist/field/features/toolbars/inline/Toolbar/index.scss +0 -53
  305. package/dist/field/features/toolbars/shared/ToolbarButton/index.scss +0 -39
  306. package/dist/field/features/toolbars/shared/ToolbarDropdown/index.scss +0 -112
  307. package/dist/field/features/upload/component/index.scss +0 -152
  308. package/dist/field/index.scss +0 -25
  309. package/dist/field/lexical/LexicalEditor.scss +0 -49
  310. package/dist/field/lexical/plugins/SlashMenu/index.scss +0 -61
  311. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.scss +0 -31
  312. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +0 -72
  313. package/dist/field/lexical/theme/EditorTheme.scss +0 -509
  314. package/dist/field/lexical/ui/ContentEditable.scss +0 -76
  315. package/dist/scss/app.scss +0 -208
  316. package/dist/scss/colors.scss +0 -269
  317. package/dist/scss/queries.scss +0 -27
  318. package/dist/scss/resets.scss +0 -17
  319. package/dist/scss/styles.scss +0 -11
  320. package/dist/scss/svg.scss +0 -10
  321. package/dist/scss/toasts.scss +0 -111
  322. package/dist/scss/type.scss +0 -117
  323. package/dist/scss/vars.scss +0 -213
  324. package/dist/scss/z-index.scss +0 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../src/field/lexical/plugins/handles/DraggableBlockPlugin/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { JSX, DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { isHTMLElement } from '../../../utils/guard.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.scss'\nimport { setTargetLine } from './setTargetLine.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const menuRef = useRef<HTMLDivElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const [draggableBlockElem, setDraggableBlockElem] = useState<HTMLElement | null>(null)\n const [lastTargetBlock, setLastTargetBlock] = useState<{\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n }>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -44 : -8\n\n useEffect(() => {\n /**\n * Handles positioning of the drag handle\n */\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : '3rem',\n blockHandleHorizontalOffset +\n (editorConfig?.admin?.hideGutter\n ? menuRef?.current?.getBoundingClientRect()?.width ?? 0\n : -menuRef?.current?.getBoundingClientRect()?.width ?? 0),\n targetLineElem,\n targetBlockElem,\n lastTargetBlock,\n pageY,\n anchorElem,\n event,\n debugHighlightRef,\n isFoundNodeEmptyParagraph,\n )\n\n // Prevent default event to be able to trigger onDrop events\n // Calling preventDefault() adds the green plus icon to the cursor,\n // indicating that the drop is allowed.\n event.preventDefault()\n\n if (!willStayInSamePosition) {\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow,\n })\n }\n } else {\n hideTargetLine(targetLineElem, lastTargetBlock?.elem)\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow: false,\n })\n }\n\n return true\n }\n\n function onDrop(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n const { dataTransfer, pageY, target } = event\n const dragData = dataTransfer?.getData(DRAG_DATA_FORMAT) || ''\n\n editor.update(() => {\n const draggedNode = $getNodeByKey(dragData)\n if (!draggedNode) {\n return false\n }\n if (!isHTMLElement(target)) {\n return false\n }\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const { blockElem: targetBlockElem, isFoundNodeEmptyParagraph } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n useEdgeAsDefault: true,\n })\n\n if (!targetBlockElem) {\n return false\n }\n const targetNode = $getNearestNodeFromDOMNode(targetBlockElem)\n if (!targetNode) {\n return false\n }\n if (targetNode === draggedNode) {\n return true\n }\n\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n getBoundingClientRectWithoutTransform(targetBlockElem)\n\n const mouseY = pageY\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n targetNode.insertAfter(draggedNode)\n } else {\n // above targetBlockElem\n targetNode.insertBefore(draggedNode)\n }\n } else {\n //\n targetNode.insertBefore(draggedNode)\n targetNode.remove()\n }\n\n /*\n if (pageY >= targetBlockElemTop + targetBlockElemHeight / 2) {\n targetNode.insertAfter(draggedNode)\n } else {\n targetNode.insertBefore(draggedNode)\n }*/\n if (draggableBlockElem !== null) {\n setDraggableBlockElem(null)\n }\n\n // find all previous elements with lexical-block-highlighter class and remove them\n const allPrevHighlighters = document.querySelectorAll('.lexical-block-highlighter')\n allPrevHighlighters.forEach((highlighter) => {\n highlighter.remove()\n })\n\n const newInsertedElem = editor.getElementByKey(draggedNode.getKey())\n setTimeout(() => {\n // add new temp html element to newInsertedElem with the same height and width and the class block-selected\n // to highlight the new inserted element\n const newInsertedElemRect = newInsertedElem.getBoundingClientRect()\n\n const highlightElem = document.createElement('div')\n highlightElem.className = 'lexical-block-highlighter'\n\n // if html data-theme is dark, set the highlighter color to white\n if (document.documentElement.getAttribute('data-theme') === 'dark') {\n highlightElem.style.backgroundColor = 'white'\n } else {\n highlightElem.style.backgroundColor = 'black'\n }\n\n highlightElem.style.transition = 'opacity 0.1s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n setTimeout(() => {\n highlightElem.style.opacity = '0'\n setTimeout(() => {\n highlightElem.remove()\n }, 1000)\n }, 3000)\n }, 120)\n })\n\n return true\n }\n\n // register onDragover event listeners:\n document.addEventListener('dragover', onDragover)\n // register onDrop event listeners:\n document.addEventListener('drop', onDrop)\n\n return () => {\n document.removeEventListener('dragover', onDragover)\n document.removeEventListener('drop', onDrop)\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n function onDragStart(event: ReactDragEvent<HTMLDivElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n\n return createPortal(\n <React.Fragment>\n <div\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n >\n <div className={isEditable ? 'icon' : ''} />\n </div>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n"],"names":["useLexicalComposerContext","eventFiles","$getNearestNodeFromDOMNode","$getNodeByKey","React","useEffect","useRef","useState","createPortal","useEditorConfigContext","isHTMLElement","Point","calculateDistanceFromScrollerElem","getNodeCloseToPoint","getTopLevelNodeKeys","isOnHandleElement","setHandlePosition","getBoundingClientRectWithoutTransform","setTargetLine","DRAGGABLE_BLOCK_MENU_CLASSNAME","DRAG_DATA_FORMAT","prevIndex","Infinity","getCurrentIndex","keysLength","Math","floor","setDragImage","dataTransfer","draggableBlockElem","transform","style","setTimeout","hideTargetLine","targetLineElem","lastTargetBlockElem","opacity","marginBottom","marginTop","useDraggableBlockMenu","editor","anchorElem","isEditable","scrollerElem","parentElement","menuRef","targetLineRef","debugHighlightRef","isDraggingBlockRef","setDraggableBlockElem","lastTargetBlock","setLastTargetBlock","editorConfig","blockHandleHorizontalOffset","admin","hideGutter","onDocumentMouseMove","event","target","distanceFromScrollerElem","pageX","pageY","topLevelNodeKeys","blockElem","_draggableBlockElem","foundAtIndex","isFoundNodeEmptyParagraph","cache_threshold","horizontalOffset","point","x","y","startIndex","length","useEdgeAsDefault","verbose","document","addEventListener","removeEventListener","current","onDragover","isFileTransfer","targetBlockElem","fuzzy","isBelow","willStayInSamePosition","getBoundingClientRect","width","preventDefault","boundingBox","elem","onDrop","dragData","getData","update","draggedNode","targetNode","height","targetBlockElemHeight","top","targetBlockElemTop","mouseY","window","scrollY","insertAfter","insertBefore","remove","allPrevHighlighters","querySelectorAll","forEach","highlighter","newInsertedElem","getElementByKey","getKey","newInsertedElemRect","highlightElem","createElement","className","documentElement","getAttribute","backgroundColor","transition","zIndex","pointerEvents","boxSizing","borderRadius","position","body","appendChild","left","onDragStart","nodeKey","node","setData","onDragEnd","Fragment","div","draggable","ref","DraggableBlockPlugin","_editable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,UAAU,QAAQ,qBAAoB;AAC/C,SAASC,0BAA0B,EAAEC,aAAa,QAAQ,UAAS;AACnE,YAAYC,WAAW,QAAO;AAC9B,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AACnD,SAASC,YAAY,QAAQ,YAAW;AAExC,SAASC,sBAAsB,QAAQ,iDAAgD;AACvF,SAASC,aAAa,QAAQ,0BAAyB;AACvD,SAASC,KAAK,QAAQ,0BAAyB;AAC/C,SAASC,iCAAiC,QAAQ,gDAA+C;AACjG,SAASC,mBAAmB,QAAQ,kCAAiC;AACrE,SAASC,mBAAmB,QAAQ,kCAAiC;AACrE,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,SAASC,qCAAqC,QAAQ,uCAAsC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B+G;IACzC;IAEA,SAASG;QACPtF,mBAAmB+B,OAAO,GAAG;QAC7B9C,eAAea,cAAciC,OAAO,EAAE7B,iBAAiBwC;IACzD;IAEA,qBAAOlF,2BACL,MAACJ,MAAMmI,QAAQ;;0BACb,KAACC;gBACCnB,WAAU;gBACVoB,SAAS;gBACTH,WAAWA;gBACXJ,aAAaA;gBACbQ,KAAK7F;0BAEL,cAAA,KAAC2F;oBAAInB,WAAW3E,aAAa,SAAS;;;0BAExC,KAAC8F;gBAAInB,WAAU;gBAA8BqB,KAAK5F;;0BAClD,KAAC0F;gBAAInB,WAAU;gBAAkBqB,KAAK3F;;;QAExCN;AAEJ;AAEA,OAAO,SAASkG,qBAAqB,EACnClG,aAAamC,SAASmD,IAAI,EAG3B;IACC,MAAM,CAACvF,OAAO,GAAGxC;IACjB,OAAOuC,sBAAsBC,QAAQC,YAAYD,OAAOoG,SAAS;AACnE"}
1
+ {"version":3,"sources":["../../../../../../src/field/lexical/plugins/handles/DraggableBlockPlugin/index.tsx"],"sourcesContent":["'use client'\nimport type { LexicalEditor } from 'lexical'\nimport type { JSX, DragEvent as ReactDragEvent } from 'react'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { eventFiles } from '@lexical/rich-text'\nimport { $getNearestNodeFromDOMNode, $getNodeByKey } from 'lexical'\nimport * as React from 'react'\nimport { useEffect, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useEditorConfigContext } from '../../../config/client/EditorConfigProvider.js'\nimport { isHTMLElement } from '../../../utils/guard.js'\nimport { Point } from '../../../utils/point.js'\nimport { calculateDistanceFromScrollerElem } from '../utils/calculateDistanceFromScrollerElem.js'\nimport { getNodeCloseToPoint } from '../utils/getNodeCloseToPoint.js'\nimport { getTopLevelNodeKeys } from '../utils/getTopLevelNodeKeys.js'\nimport { isOnHandleElement } from '../utils/isOnHandleElement.js'\nimport { setHandlePosition } from '../utils/setHandlePosition.js'\nimport { getBoundingClientRectWithoutTransform } from './getBoundingRectWithoutTransform.js'\nimport './index.scss'\nimport { setTargetLine } from './setTargetLine.js'\n\nconst DRAGGABLE_BLOCK_MENU_CLASSNAME = 'draggable-block-menu'\nconst DRAG_DATA_FORMAT = 'application/x-lexical-drag-block'\n\nlet prevIndex = Infinity\n\nfunction getCurrentIndex(keysLength: number): number {\n if (keysLength === 0) {\n return Infinity\n }\n if (prevIndex >= 0 && prevIndex < keysLength) {\n return prevIndex\n }\n\n return Math.floor(keysLength / 2)\n}\n\nfunction setDragImage(dataTransfer: DataTransfer, draggableBlockElem: HTMLElement) {\n const { transform } = draggableBlockElem.style\n\n // Remove dragImage borders\n dataTransfer.setDragImage(draggableBlockElem, 0, 0)\n\n setTimeout(() => {\n draggableBlockElem.style.transform = transform\n })\n}\n\nfunction hideTargetLine(\n targetLineElem: HTMLElement | null,\n lastTargetBlockElem: HTMLElement | null,\n) {\n if (targetLineElem) {\n targetLineElem.style.opacity = '0'\n }\n if (lastTargetBlockElem) {\n lastTargetBlockElem.style.opacity = ''\n // Delete marginBottom and marginTop values we set\n lastTargetBlockElem.style.marginBottom = ''\n lastTargetBlockElem.style.marginTop = ''\n //lastTargetBlock.style.border = 'none'\n }\n}\n\nfunction useDraggableBlockMenu(\n editor: LexicalEditor,\n anchorElem: HTMLElement,\n isEditable: boolean,\n): React.ReactElement {\n const scrollerElem = anchorElem.parentElement\n\n const menuRef = useRef<HTMLDivElement>(null)\n const targetLineRef = useRef<HTMLDivElement>(null)\n const debugHighlightRef = useRef<HTMLDivElement>(null)\n const isDraggingBlockRef = useRef<boolean>(false)\n const [draggableBlockElem, setDraggableBlockElem] = useState<HTMLElement | null>(null)\n const [lastTargetBlock, setLastTargetBlock] = useState<{\n boundingBox?: DOMRect\n elem: HTMLElement | null\n isBelow: boolean\n }>(null)\n\n const { editorConfig } = useEditorConfigContext()\n\n const blockHandleHorizontalOffset = editorConfig?.admin?.hideGutter ? -44 : -8\n\n useEffect(() => {\n /**\n * Handles positioning of the drag handle\n */\n function onDocumentMouseMove(event: MouseEvent) {\n const target = event.target\n if (!isHTMLElement(target)) {\n return\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n )\n if (distanceFromScrollerElem === -1) {\n setDraggableBlockElem(null)\n return\n }\n\n if (isOnHandleElement(target, DRAGGABLE_BLOCK_MENU_CLASSNAME)) {\n return\n }\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: _draggableBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n cache_threshold: 0,\n editor,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: false,\n verbose: false,\n })\n\n prevIndex = foundAtIndex\n\n //if (DEBUG && _draggableBlockElem) {\n //targetBlockElem.style.border = '3px solid red'\n // highlightElemOriginalPosition(debugHighlightRef, _draggableBlockElem, anchorElem)\n //}\n\n if (!_draggableBlockElem && !isFoundNodeEmptyParagraph) {\n return\n }\n\n if (draggableBlockElem !== _draggableBlockElem) {\n setDraggableBlockElem(_draggableBlockElem)\n }\n }\n\n // Since the draggableBlockElem is outside the actual editor, we need to listen to the document\n // to be able to detect when the mouse is outside the editor and respect a buffer around\n // the scrollerElem to avoid the draggableBlockElem disappearing too early.\n document?.addEventListener('mousemove', onDocumentMouseMove)\n\n return () => {\n document?.removeEventListener('mousemove', onDocumentMouseMove)\n }\n }, [scrollerElem, anchorElem, editor, draggableBlockElem])\n\n useEffect(() => {\n if (menuRef.current) {\n setHandlePosition(\n draggableBlockElem,\n menuRef.current,\n anchorElem,\n blockHandleHorizontalOffset,\n )\n }\n }, [anchorElem, draggableBlockElem, blockHandleHorizontalOffset])\n\n useEffect(() => {\n function onDragover(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n\n const { pageY, target } = event\n if (!isHTMLElement(target)) {\n return false\n }\n\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const topLevelNodeKeys = getTopLevelNodeKeys(editor)\n\n const {\n blockElem: targetBlockElem,\n foundAtIndex,\n isFoundNodeEmptyParagraph,\n } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n startIndex: getCurrentIndex(topLevelNodeKeys.length),\n useEdgeAsDefault: true,\n verbose: true,\n })\n\n prevIndex = foundAtIndex\n\n const targetLineElem = targetLineRef.current\n // targetBlockElem === null shouldn't happen\n if (targetBlockElem === null || targetLineElem === null) {\n return false\n }\n\n if (draggableBlockElem !== targetBlockElem) {\n const { isBelow, willStayInSamePosition } = setTargetLine(\n editorConfig?.admin?.hideGutter ? '0px' : '3rem',\n blockHandleHorizontalOffset +\n (editorConfig?.admin?.hideGutter\n ? menuRef?.current?.getBoundingClientRect()?.width ?? 0\n : -menuRef?.current?.getBoundingClientRect()?.width ?? 0),\n targetLineElem,\n targetBlockElem,\n lastTargetBlock,\n pageY,\n anchorElem,\n event,\n debugHighlightRef,\n isFoundNodeEmptyParagraph,\n )\n\n // Prevent default event to be able to trigger onDrop events\n // Calling preventDefault() adds the green plus icon to the cursor,\n // indicating that the drop is allowed.\n event.preventDefault()\n\n if (!willStayInSamePosition) {\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow,\n })\n }\n } else {\n hideTargetLine(targetLineElem, lastTargetBlock?.elem)\n setLastTargetBlock({\n boundingBox: targetBlockElem.getBoundingClientRect(),\n elem: targetBlockElem,\n isBelow: false,\n })\n }\n\n return true\n }\n\n function onDrop(event: DragEvent): boolean {\n if (!isDraggingBlockRef.current) {\n return false\n }\n const [isFileTransfer] = eventFiles(event)\n if (isFileTransfer) {\n return false\n }\n const { dataTransfer, pageY, target } = event\n const dragData = dataTransfer?.getData(DRAG_DATA_FORMAT) || ''\n\n editor.update(() => {\n const draggedNode = $getNodeByKey(dragData)\n if (!draggedNode) {\n return false\n }\n if (!isHTMLElement(target)) {\n return false\n }\n const distanceFromScrollerElem = calculateDistanceFromScrollerElem(\n scrollerElem,\n event.pageX,\n event.pageY,\n target,\n 100,\n 50,\n )\n\n const { blockElem: targetBlockElem, isFoundNodeEmptyParagraph } = getNodeCloseToPoint({\n anchorElem,\n editor,\n fuzzy: true,\n horizontalOffset: -distanceFromScrollerElem,\n point: new Point(event.x, event.y),\n useEdgeAsDefault: true,\n })\n\n if (!targetBlockElem) {\n return false\n }\n const targetNode = $getNearestNodeFromDOMNode(targetBlockElem)\n if (!targetNode) {\n return false\n }\n if (targetNode === draggedNode) {\n return true\n }\n\n const { height: targetBlockElemHeight, top: targetBlockElemTop } =\n getBoundingClientRectWithoutTransform(targetBlockElem)\n\n const mouseY = pageY\n const isBelow = mouseY >= targetBlockElemTop + targetBlockElemHeight / 2 + window.scrollY\n\n if (!isFoundNodeEmptyParagraph) {\n if (isBelow) {\n // below targetBlockElem\n targetNode.insertAfter(draggedNode)\n } else {\n // above targetBlockElem\n targetNode.insertBefore(draggedNode)\n }\n } else {\n //\n targetNode.insertBefore(draggedNode)\n targetNode.remove()\n }\n\n /*\n if (pageY >= targetBlockElemTop + targetBlockElemHeight / 2) {\n targetNode.insertAfter(draggedNode)\n } else {\n targetNode.insertBefore(draggedNode)\n }*/\n if (draggableBlockElem !== null) {\n setDraggableBlockElem(null)\n }\n\n // find all previous elements with lexical-block-highlighter class and remove them\n const allPrevHighlighters = document.querySelectorAll('.lexical-block-highlighter')\n allPrevHighlighters.forEach((highlighter) => {\n highlighter.remove()\n })\n\n const newInsertedElem = editor.getElementByKey(draggedNode.getKey())\n setTimeout(() => {\n // add new temp html element to newInsertedElem with the same height and width and the class block-selected\n // to highlight the new inserted element\n const newInsertedElemRect = newInsertedElem.getBoundingClientRect()\n\n const highlightElem = document.createElement('div')\n highlightElem.className = 'lexical-block-highlighter'\n\n // if html data-theme is dark, set the highlighter color to white\n if (document.documentElement.getAttribute('data-theme') === 'dark') {\n highlightElem.style.backgroundColor = 'white'\n } else {\n highlightElem.style.backgroundColor = 'black'\n }\n\n highlightElem.style.transition = 'opacity 0.1s ease-in-out'\n highlightElem.style.zIndex = '1'\n highlightElem.style.pointerEvents = 'none'\n highlightElem.style.boxSizing = 'border-box'\n highlightElem.style.borderRadius = '4px'\n highlightElem.style.position = 'absolute'\n document.body.appendChild(highlightElem)\n\n highlightElem.style.opacity = '0.1'\n\n highlightElem.style.height = `${newInsertedElemRect.height + 8}px`\n highlightElem.style.width = `${newInsertedElemRect.width + 8}px`\n highlightElem.style.top = `${newInsertedElemRect.top + window.scrollY - 4}px`\n highlightElem.style.left = `${newInsertedElemRect.left - 4}px`\n\n setTimeout(() => {\n highlightElem.style.opacity = '0'\n setTimeout(() => {\n highlightElem.remove()\n }, 1000)\n }, 3000)\n }, 120)\n })\n\n return true\n }\n\n // register onDragover event listeners:\n document.addEventListener('dragover', onDragover)\n // register onDrop event listeners:\n document.addEventListener('drop', onDrop)\n\n return () => {\n document.removeEventListener('dragover', onDragover)\n document.removeEventListener('drop', onDrop)\n }\n }, [\n scrollerElem,\n blockHandleHorizontalOffset,\n anchorElem,\n editor,\n lastTargetBlock,\n draggableBlockElem,\n editorConfig?.admin?.hideGutter,\n ])\n\n function onDragStart(event: ReactDragEvent<HTMLDivElement>): void {\n const dataTransfer = event.dataTransfer\n if (!dataTransfer || !draggableBlockElem) {\n return\n }\n setDragImage(dataTransfer, draggableBlockElem)\n let nodeKey = ''\n editor.update(() => {\n const node = $getNearestNodeFromDOMNode(draggableBlockElem)\n if (node) {\n nodeKey = node.getKey()\n }\n })\n isDraggingBlockRef.current = true\n dataTransfer.setData(DRAG_DATA_FORMAT, nodeKey)\n }\n\n function onDragEnd(): void {\n isDraggingBlockRef.current = false\n hideTargetLine(targetLineRef.current, lastTargetBlock?.elem)\n }\n\n return createPortal(\n <React.Fragment>\n <div\n className=\"icon draggable-block-menu\"\n draggable\n onDragEnd={onDragEnd}\n onDragStart={onDragStart}\n ref={menuRef}\n >\n <div className={isEditable ? 'icon' : ''} />\n </div>\n <div className=\"draggable-block-target-line\" ref={targetLineRef} />\n <div className=\"debug-highlight\" ref={debugHighlightRef} />\n </React.Fragment>,\n anchorElem,\n )\n}\n\nexport function DraggableBlockPlugin({\n anchorElem = document.body,\n}: {\n anchorElem?: HTMLElement\n}): React.ReactElement {\n const [editor] = useLexicalComposerContext()\n return useDraggableBlockMenu(editor, anchorElem, editor._editable)\n}\n"],"names":["useLexicalComposerContext","eventFiles","$getNearestNodeFromDOMNode","$getNodeByKey","React","useEffect","useRef","useState","createPortal","useEditorConfigContext","isHTMLElement","Point","calculateDistanceFromScrollerElem","getNodeCloseToPoint","getTopLevelNodeKeys","isOnHandleElement","setHandlePosition","getBoundingClientRectWithoutTransform","setTargetLine","DRAGGABLE_BLOCK_MENU_CLASSNAME","DRAG_DATA_FORMAT","prevIndex","Infinity","getCurrentIndex","keysLength","Math","floor","setDragImage","dataTransfer","draggableBlockElem","transform","style","setTimeout","hideTargetLine","targetLineElem","lastTargetBlockElem","opacity","marginBottom","marginTop","useDraggableBlockMenu","editor","anchorElem","isEditable","scrollerElem","parentElement","menuRef","targetLineRef","debugHighlightRef","isDraggingBlockRef","setDraggableBlockElem","lastTargetBlock","setLastTargetBlock","editorConfig","blockHandleHorizontalOffset","admin","hideGutter","onDocumentMouseMove","event","target","distanceFromScrollerElem","pageX","pageY","topLevelNodeKeys","blockElem","_draggableBlockElem","foundAtIndex","isFoundNodeEmptyParagraph","cache_threshold","horizontalOffset","point","x","y","startIndex","length","useEdgeAsDefault","verbose","document","addEventListener","removeEventListener","current","onDragover","isFileTransfer","targetBlockElem","fuzzy","isBelow","willStayInSamePosition","getBoundingClientRect","width","preventDefault","boundingBox","elem","onDrop","dragData","getData","update","draggedNode","targetNode","height","targetBlockElemHeight","top","targetBlockElemTop","mouseY","window","scrollY","insertAfter","insertBefore","remove","allPrevHighlighters","querySelectorAll","forEach","highlighter","newInsertedElem","getElementByKey","getKey","newInsertedElemRect","highlightElem","createElement","className","documentElement","getAttribute","backgroundColor","transition","zIndex","pointerEvents","boxSizing","borderRadius","position","body","appendChild","left","onDragStart","nodeKey","node","setData","onDragEnd","Fragment","div","draggable","ref","DraggableBlockPlugin","_editable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,yBAAyB,QAAQ,2CAA0C;AACpF,SAASC,UAAU,QAAQ,qBAAoB;AAC/C,SAASC,0BAA0B,EAAEC,aAAa,QAAQ,UAAS;AACnE,YAAYC,WAAW,QAAO;AAC9B,SAASC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AACnD,SAASC,YAAY,QAAQ,YAAW;AAExC,SAASC,sBAAsB,QAAQ,iDAAgD;AACvF,SAASC,aAAa,QAAQ,0BAAyB;AACvD,SAASC,KAAK,QAAQ,0BAAyB;AAC/C,SAASC,iCAAiC,QAAQ,gDAA+C;AACjG,SAASC,mBAAmB,QAAQ,kCAAiC;AACrE,SAASC,mBAAmB,QAAQ,kCAAiC;AACrE,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,SAASC,i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AG;QAC7BnD,aAAayG,OAAO,CAACjH,kBAAkB+G;IACzC;IAEA,SAASG;QACPtF,mBAAmB+B,OAAO,GAAG;QAC7B9C,eAAea,cAAciC,OAAO,EAAE7B,iBAAiBwC;IACzD;IAEA,qBAAOlF,2BACL,MAACJ,MAAMmI,QAAQ;;0BACb,KAACC;gBACCnB,WAAU;gBACVoB,SAAS;gBACTH,WAAWA;gBACXJ,aAAaA;gBACbQ,KAAK7F;0BAEL,cAAA,KAAC2F;oBAAInB,WAAW3E,aAAa,SAAS;;;0BAExC,KAAC8F;gBAAInB,WAAU;gBAA8BqB,KAAK5F;;0BAClD,KAAC0F;gBAAInB,WAAU;gBAAkBqB,KAAK3F;;;QAExCN;AAEJ;AAEA,OAAO,SAASkG,qBAAqB,EACnClG,aAAamC,SAASmD,IAAI,EAG3B;IACC,MAAM,CAACvF,OAAO,GAAGxC;IACjB,OAAOuC,sBAAsBC,QAAQC,YAAYD,OAAOoG,SAAS;AACnE"}
@@ -1,4 +1,3 @@
1
- import './EditorTheme.scss';
2
1
  export const LexicalEditorTheme = {
3
2
  block: 'LexicalEditorTheme__block',
4
3
  blockCursor: 'LexicalEditorTheme__blockCursor',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/theme/EditorTheme.tsx"],"sourcesContent":["import type { EditorThemeClasses } from 'lexical'\n\nimport './EditorTheme.scss'\n\nexport const LexicalEditorTheme: EditorThemeClasses = {\n block: 'LexicalEditorTheme__block',\n blockCursor: 'LexicalEditorTheme__blockCursor',\n characterLimit: 'LexicalEditorTheme__characterLimit',\n code: 'LexicalEditorTheme__code',\n codeHighlight: {\n atrule: 'LexicalEditorTheme__tokenAttr',\n attr: 'LexicalEditorTheme__tokenAttr',\n boolean: 'LexicalEditorTheme__tokenProperty',\n builtin: 'LexicalEditorTheme__tokenSelector',\n cdata: 'LexicalEditorTheme__tokenComment',\n char: 'LexicalEditorTheme__tokenSelector',\n class: 'LexicalEditorTheme__tokenFunction',\n 'class-name': 'LexicalEditorTheme__tokenFunction',\n comment: 'LexicalEditorTheme__tokenComment',\n constant: 'LexicalEditorTheme__tokenProperty',\n deleted: 'LexicalEditorTheme__tokenProperty',\n doctype: 'LexicalEditorTheme__tokenComment',\n entity: 'LexicalEditorTheme__tokenOperator',\n function: 'LexicalEditorTheme__tokenFunction',\n important: 'LexicalEditorTheme__tokenVariable',\n inserted: 'LexicalEditorTheme__tokenSelector',\n keyword: 'LexicalEditorTheme__tokenAttr',\n namespace: 'LexicalEditorTheme__tokenVariable',\n number: 'LexicalEditorTheme__tokenProperty',\n operator: 'LexicalEditorTheme__tokenOperator',\n prolog: 'LexicalEditorTheme__tokenComment',\n property: 'LexicalEditorTheme__tokenProperty',\n punctuation: 'LexicalEditorTheme__tokenPunctuation',\n regex: 'LexicalEditorTheme__tokenVariable',\n selector: 'LexicalEditorTheme__tokenSelector',\n string: 'LexicalEditorTheme__tokenSelector',\n symbol: 'LexicalEditorTheme__tokenProperty',\n tag: 'LexicalEditorTheme__tokenProperty',\n url: 'LexicalEditorTheme__tokenOperator',\n variable: 'LexicalEditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'LexicalEditorTheme__embedBlock',\n focus: 'LexicalEditorTheme__embedBlockFocus',\n },\n hashtag: 'LexicalEditorTheme__hashtag',\n heading: {\n h1: 'LexicalEditorTheme__h1',\n h2: 'LexicalEditorTheme__h2',\n h3: 'LexicalEditorTheme__h3',\n h4: 'LexicalEditorTheme__h4',\n h5: 'LexicalEditorTheme__h5',\n h6: 'LexicalEditorTheme__h6',\n },\n hr: 'LexicalEditorTheme__hr',\n indent: 'LexicalEditorTheme__indent',\n inlineImage: 'LexicalEditor__inline-image',\n link: 'LexicalEditorTheme__link',\n list: {\n checklist: 'LexicalEditorTheme__checklist',\n listitem: 'LexicalEditorTheme__listItem',\n listitemChecked: 'LexicalEditorTheme__listItemChecked',\n listitemUnchecked: 'LexicalEditorTheme__listItemUnchecked',\n nested: {\n listitem: 'LexicalEditorTheme__nestedListItem',\n },\n olDepth: [\n 'LexicalEditorTheme__ol1',\n 'LexicalEditorTheme__ol2',\n 'LexicalEditorTheme__ol3',\n 'LexicalEditorTheme__ol4',\n 'LexicalEditorTheme__ol5',\n ],\n ul: 'LexicalEditorTheme__ul',\n },\n ltr: 'LexicalEditorTheme__ltr',\n mark: 'LexicalEditorTheme__mark',\n markOverlap: 'LexicalEditorTheme__markOverlap',\n paragraph: 'LexicalEditorTheme__paragraph',\n quote: 'LexicalEditorTheme__quote',\n relationship: 'LexicalEditorTheme__relationship',\n rtl: 'LexicalEditorTheme__rtl',\n table: 'LexicalEditorTheme__table',\n tableAddColumns: 'LexicalEditorTheme__tableAddColumns',\n tableAddRows: 'LexicalEditorTheme__tableAddRows',\n tableCell: 'LexicalEditorTheme__tableCell',\n tableCellActionButton: 'LexicalEditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'LexicalEditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'LexicalEditorTheme__tableCellEditing',\n tableCellHeader: 'LexicalEditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'LexicalEditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'LexicalEditorTheme__tableCellResizer',\n tableCellSelected: 'LexicalEditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'LexicalEditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'LexicalEditorTheme__tableCellResizeRuler',\n tableSelected: 'LexicalEditorTheme__tableSelected',\n text: {\n bold: 'LexicalEditorTheme__textBold',\n code: 'LexicalEditorTheme__textCode',\n italic: 'LexicalEditorTheme__textItalic',\n strikethrough: 'LexicalEditorTheme__textStrikethrough',\n subscript: 'LexicalEditorTheme__textSubscript',\n superscript: 'LexicalEditorTheme__textSuperscript',\n underline: 'LexicalEditorTheme__textUnderline',\n underlineStrikethrough: 'LexicalEditorTheme__textUnderlineStrikethrough',\n },\n upload: 'editor-upload',\n}\n"],"names":["LexicalEditorTheme","block","blockCursor","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","hr","indent","inlineImage","link","list","checklist","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","relationship","rtl","table","tableAddColumns","tableAddRows","tableCell","tableCellActionButton","tableCellActionButtonContainer","tableCellEditing","tableCellHeader","tableCellPrimarySelected","tableCellResizer","tableCellSelected","tableCellSortedIndicator","tableResizeRuler","tableSelected","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,OAAO,qBAAoB;AAE3B,OAAO,MAAMA,qBAAyC;IACpDC,OAAO;IACPC,aAAa;IACbC,gBAAgB;IAChBC,MAAM;IACNC,eAAe;QACbC,QAAQ;QACRC,MAAM;QACNC,SAAS;QACTC,SAAS;QACTC,OAAO;QACPC,MAAM;QACNC,OAAO;QACP,cAAc;QACdC,SAAS;QACTC,UAAU;QACVC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,UAAU;QACVC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,WAAW;QACXC,QAAQ;QACRC,UAAU;QACVC,QAAQ;QACRC,UAAU;QACVC,aAAa;QACbC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,UAAU;IACZ;IACAC,YAAY;QACVC,MAAM;QACNC,OAAO;IACT;IACAC,SAAS;IACTC,SAAS;QACPC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACN;IACAC,IAAI;IACJC,QAAQ;IACRC,aAAa;IACbC,MAAM;IACNC,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,iBAAiB;QACjBC,mBAAmB;QACnBC,QAAQ;YACNH,UAAU;QACZ;QACAI,SAAS;YACP;YACA;YACA;YACA;YACA;SACD;QACDC,IAAI;IACN;IACAC,KAAK;IACLC,MAAM;IACNC,aAAa;IACbC,WAAW;IACXC,OAAO;IACPC,cAAc;IACdC,KAAK;IACLC,OAAO;IACPC,iBAAiB;IACjBC,cAAc;IACdC,WAAW;IACXC,uBAAuB;IACvBC,gCAAgC;IAChCC,kBAAkB;IAClBC,iBAAiB;IACjBC,0BAA0B;IAC1BC,kBAAkB;IAClBC,mBAAmB;IACnBC,0BAA0B;IAC1BC,kBAAkB;IAClBC,eAAe;IACfC,MAAM;QACJC,MAAM;QACN5E,MAAM;QACN6E,QAAQ;QACRC,eAAe;QACfC,WAAW;QACXC,aAAa;QACbC,WAAW;QACXC,wBAAwB;IAC1B;IACAC,QAAQ;AACV,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/theme/EditorTheme.tsx"],"sourcesContent":["import type { EditorThemeClasses } from 'lexical'\n\nimport './EditorTheme.scss'\n\nexport const LexicalEditorTheme: EditorThemeClasses = {\n block: 'LexicalEditorTheme__block',\n blockCursor: 'LexicalEditorTheme__blockCursor',\n characterLimit: 'LexicalEditorTheme__characterLimit',\n code: 'LexicalEditorTheme__code',\n codeHighlight: {\n atrule: 'LexicalEditorTheme__tokenAttr',\n attr: 'LexicalEditorTheme__tokenAttr',\n boolean: 'LexicalEditorTheme__tokenProperty',\n builtin: 'LexicalEditorTheme__tokenSelector',\n cdata: 'LexicalEditorTheme__tokenComment',\n char: 'LexicalEditorTheme__tokenSelector',\n class: 'LexicalEditorTheme__tokenFunction',\n 'class-name': 'LexicalEditorTheme__tokenFunction',\n comment: 'LexicalEditorTheme__tokenComment',\n constant: 'LexicalEditorTheme__tokenProperty',\n deleted: 'LexicalEditorTheme__tokenProperty',\n doctype: 'LexicalEditorTheme__tokenComment',\n entity: 'LexicalEditorTheme__tokenOperator',\n function: 'LexicalEditorTheme__tokenFunction',\n important: 'LexicalEditorTheme__tokenVariable',\n inserted: 'LexicalEditorTheme__tokenSelector',\n keyword: 'LexicalEditorTheme__tokenAttr',\n namespace: 'LexicalEditorTheme__tokenVariable',\n number: 'LexicalEditorTheme__tokenProperty',\n operator: 'LexicalEditorTheme__tokenOperator',\n prolog: 'LexicalEditorTheme__tokenComment',\n property: 'LexicalEditorTheme__tokenProperty',\n punctuation: 'LexicalEditorTheme__tokenPunctuation',\n regex: 'LexicalEditorTheme__tokenVariable',\n selector: 'LexicalEditorTheme__tokenSelector',\n string: 'LexicalEditorTheme__tokenSelector',\n symbol: 'LexicalEditorTheme__tokenProperty',\n tag: 'LexicalEditorTheme__tokenProperty',\n url: 'LexicalEditorTheme__tokenOperator',\n variable: 'LexicalEditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'LexicalEditorTheme__embedBlock',\n focus: 'LexicalEditorTheme__embedBlockFocus',\n },\n hashtag: 'LexicalEditorTheme__hashtag',\n heading: {\n h1: 'LexicalEditorTheme__h1',\n h2: 'LexicalEditorTheme__h2',\n h3: 'LexicalEditorTheme__h3',\n h4: 'LexicalEditorTheme__h4',\n h5: 'LexicalEditorTheme__h5',\n h6: 'LexicalEditorTheme__h6',\n },\n hr: 'LexicalEditorTheme__hr',\n indent: 'LexicalEditorTheme__indent',\n inlineImage: 'LexicalEditor__inline-image',\n link: 'LexicalEditorTheme__link',\n list: {\n checklist: 'LexicalEditorTheme__checklist',\n listitem: 'LexicalEditorTheme__listItem',\n listitemChecked: 'LexicalEditorTheme__listItemChecked',\n listitemUnchecked: 'LexicalEditorTheme__listItemUnchecked',\n nested: {\n listitem: 'LexicalEditorTheme__nestedListItem',\n },\n olDepth: [\n 'LexicalEditorTheme__ol1',\n 'LexicalEditorTheme__ol2',\n 'LexicalEditorTheme__ol3',\n 'LexicalEditorTheme__ol4',\n 'LexicalEditorTheme__ol5',\n ],\n ul: 'LexicalEditorTheme__ul',\n },\n ltr: 'LexicalEditorTheme__ltr',\n mark: 'LexicalEditorTheme__mark',\n markOverlap: 'LexicalEditorTheme__markOverlap',\n paragraph: 'LexicalEditorTheme__paragraph',\n quote: 'LexicalEditorTheme__quote',\n relationship: 'LexicalEditorTheme__relationship',\n rtl: 'LexicalEditorTheme__rtl',\n table: 'LexicalEditorTheme__table',\n tableAddColumns: 'LexicalEditorTheme__tableAddColumns',\n tableAddRows: 'LexicalEditorTheme__tableAddRows',\n tableCell: 'LexicalEditorTheme__tableCell',\n tableCellActionButton: 'LexicalEditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'LexicalEditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'LexicalEditorTheme__tableCellEditing',\n tableCellHeader: 'LexicalEditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'LexicalEditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'LexicalEditorTheme__tableCellResizer',\n tableCellSelected: 'LexicalEditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'LexicalEditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'LexicalEditorTheme__tableCellResizeRuler',\n tableSelected: 'LexicalEditorTheme__tableSelected',\n text: {\n bold: 'LexicalEditorTheme__textBold',\n code: 'LexicalEditorTheme__textCode',\n italic: 'LexicalEditorTheme__textItalic',\n strikethrough: 'LexicalEditorTheme__textStrikethrough',\n subscript: 'LexicalEditorTheme__textSubscript',\n superscript: 'LexicalEditorTheme__textSuperscript',\n underline: 'LexicalEditorTheme__textUnderline',\n underlineStrikethrough: 'LexicalEditorTheme__textUnderlineStrikethrough',\n },\n upload: 'editor-upload',\n}\n"],"names":["LexicalEditorTheme","block","blockCursor","characterLimit","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","base","focus","hashtag","heading","h1","h2","h3","h4","h5","h6","hr","indent","inlineImage","link","list","checklist","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ul","ltr","mark","markOverlap","paragraph","quote","relationship","rtl","table","tableAddColumns","tableAddRows","tableCell","tableCellActionButton","tableCellActionButtonContainer","tableCellEditing","tableCellHeader","tableCellPrimarySelected","tableCellResizer","tableCellSelected","tableCellSortedIndicator","tableResizeRuler","tableSelected","text","bold","italic","strikethrough","subscript","superscript","underline","underlineStrikethrough","upload"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,OAAO,MAAMA,qBAAyC;IACpDC,OAAO;IACPC,aAAa;IACbC,gBAAgB;IAChBC,MAAM;IACNC,eAAe;QACbC,QAAQ;QACRC,MAAM;QACNC,SAAS;QACTC,SAAS;QACTC,OAAO;QACPC,MAAM;QACNC,OAAO;QACP,cAAc;QACdC,SAAS;QACTC,UAAU;QACVC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,UAAU;QACVC,WAAW;QACXC,UAAU;QACVC,SAAS;QACTC,WAAW;QACXC,QAAQ;QACRC,UAAU;QACVC,QAAQ;QACRC,UAAU;QACVC,aAAa;QACbC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,QAAQ;QACRC,KAAK;QACLC,KAAK;QACLC,UAAU;IACZ;IACAC,YAAY;QACVC,MAAM;QACNC,OAAO;IACT;IACAC,SAAS;IACTC,SAAS;QACPC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;QACJC,IAAI;IACN;IACAC,IAAI;IACJC,QAAQ;IACRC,aAAa;IACbC,MAAM;IACNC,MAAM;QACJC,WAAW;QACXC,UAAU;QACVC,iBAAiB;QACjBC,mBAAmB;QACnBC,QAAQ;YACNH,UAAU;QACZ;QACAI,SAAS;YACP;YACA;YACA;YACA;YACA;SACD;QACDC,IAAI;IACN;IACAC,KAAK;IACLC,MAAM;IACNC,aAAa;IACbC,WAAW;IACXC,OAAO;IACPC,cAAc;IACdC,KAAK;IACLC,OAAO;IACPC,iBAAiB;IACjBC,cAAc;IACdC,WAAW;IACXC,uBAAuB;IACvBC,gCAAgC;IAChCC,kBAAkB;IAClBC,iBAAiB;IACjBC,0BAA0B;IAC1BC,kBAAkB;IAClBC,mBAAmB;IACnBC,0BAA0B;IAC1BC,kBAAkB;IAClBC,eAAe;IACfC,MAAM;QACJC,MAAM;QACN5E,MAAM;QACN6E,QAAQ;QACRC,eAAe;QACfC,WAAW;QACXC,aAAa;QACbC,WAAW;QACXC,wBAAwB;IAC1B;IACAC,QAAQ;AACV,EAAC"}
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ContentEditable } from '@lexical/react/LexicalContentEditable.js';
3
3
  import * as React from 'react';
4
- import './ContentEditable.scss';
5
4
  export function LexicalContentEditable({ className }) {
6
5
  return /*#__PURE__*/ _jsx(ContentEditable, {
7
6
  className: className ?? 'ContentEditable__root'
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/ui/ContentEditable.tsx"],"sourcesContent":["import type { JSX } from 'react'\n\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport * as React from 'react'\n\nimport './ContentEditable.scss'\n\nexport function LexicalContentEditable({ className }: { className?: string }): JSX.Element {\n return <ContentEditable className={className ?? 'ContentEditable__root'} />\n}\n"],"names":["ContentEditable","React","LexicalContentEditable","className"],"rangeMappings":";;;;;;;;","mappings":";AAEA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,YAAYC,WAAW,QAAO;AAE9B,OAAO,yBAAwB;AAE/B,OAAO,SAASC,uBAAuB,EAAEC,SAAS,EAA0B;IAC1E,qBAAO,KAACH;QAAgBG,WAAWA,aAAa;;AAClD"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/ui/ContentEditable.tsx"],"sourcesContent":["import type { JSX } from 'react'\n\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable.js'\nimport * as React from 'react'\n\nimport './ContentEditable.scss'\n\nexport function LexicalContentEditable({ className }: { className?: string }): JSX.Element {\n return <ContentEditable className={className ?? 'ContentEditable__root'} />\n}\n"],"names":["ContentEditable","React","LexicalContentEditable","className"],"rangeMappings":";;;;;;;","mappings":";AAEA,SAASA,eAAe,QAAQ,2CAA0C;AAC1E,YAAYC,WAAW,QAAO;AAI9B,OAAO,SAASC,uBAAuB,EAAEC,SAAS,EAA0B;IAC1E,qBAAO,KAACH;QAAgBG,WAAWA,aAAa;;AAClD"}
@@ -1,4 +1,4 @@
1
- import type { RichTextAdapter } from 'payload/types';
1
+ import type { RichTextAdapter } from 'payload';
2
2
  import type { ResolvedServerFeatureMap } from './field/features/types.js';
3
3
  export declare const getGenerateComponentMap: (args: {
4
4
  resolvedFeatureMap: ResolvedServerFeatureMap;
@@ -1 +1 @@
1
- {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAKpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAGzE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CA2GzC,CAAA"}
1
+ {"version":3,"file":"generateComponentMap.d.ts","sourceRoot":"","sources":["../src/generateComponentMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAGzE,eAAO,MAAM,uBAAuB,SAC3B;IACL,kBAAkB,EAAE,wBAAwB,CAAA;CAC7C,KAAG,eAAe,CAAC,sBAAsB,CA2GzC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { GeneratedFeatureProviderComponent } from './types.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n, schemaPath }) => {\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientComponent\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <WithServerSideProps\n Component={Component}\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n disableAddingID: true,\n fieldSchema: fields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientComponent:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","React","getGenerateComponentMap","args","WithServerSideProps","config","i18n","schemaPath","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","map","featureKey","resolvedFeature","ClientComponent","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","serverFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,OAAOC,WAAW,QAAO;AAKzB,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAChD,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACT,KAAKU,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,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EAlC,aAAaW,GAAG,CAAC,CAAC,QAAQ,EAAEE,WAAW,QAAQ,EAAEe,UAAU,CAAC,EAAEE;oBAChE;gBACF;YACF;YAEA,IAAI,CAACf,iBAAiB;gBACpB,OAAO;YACT;YAEA,OAAO;gBACLA,iBACEC,wBAAwB,OAAOA,yBAAyB,yBACtD,eAACD;oBACE,GAAGC,oBAAoB;oBACxBH,YAAYC,gBAAgBU,GAAG;oBAC/BA,KAAKV,gBAAgBU,GAAG;oBACxBd,OAAOI,gBAAgBJ,KAAK;mCAG9B,KAACK;oBACCF,YAAYC,gBAAgBU,GAAG;oBAE/Bd,OAAOI,gBAAgBJ,KAAK;mBADvBI,gBAAgBU,GAAG;gBAI9BA,KAAKV,gBAAgBU,GAAG;gBACxBd,OAAOI,gBAAgBJ,KAAK;YAC9B;QACF,GACCyB,MAAM,CAAC,CAACC,UAAYA,YAAY;QAGrC,OAAOpC;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { GeneratedFeatureProviderComponent } from './types.js'\n\nexport const getGenerateComponentMap =\n (args: {\n resolvedFeatureMap: ResolvedServerFeatureMap\n }): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n, schemaPath }) => {\n const componentMap = new Map()\n\n // turn args.resolvedFeatureMap into an array of [key, value] pairs, ordered by value.order, lowest order first:\n const resolvedFeatureMapArray = Array.from(args.resolvedFeatureMap.entries()).sort(\n (a, b) => a[1].order - b[1].order,\n )\n\n componentMap.set(\n `features`,\n resolvedFeatureMapArray\n .map(([featureKey, resolvedFeature]) => {\n const ClientComponent = resolvedFeature.ClientComponent\n const clientComponentProps = resolvedFeature.clientFeatureProps\n\n /**\n * Handle Feature Component Maps\n */\n if (\n 'generateComponentMap' in resolvedFeature &&\n typeof resolvedFeature.generateComponentMap === 'function'\n ) {\n const components = resolvedFeature.generateComponentMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaPath,\n })\n\n for (const componentKey in components) {\n const Component = components[componentKey]\n\n if (Component) {\n componentMap.set(\n `feature.${featureKey}.components.${componentKey}`,\n <WithServerSideProps\n Component={Component}\n componentKey={componentKey}\n featureKey={resolvedFeature.key}\n key={`${resolvedFeature.key}-${componentKey}`}\n />,\n )\n }\n }\n }\n\n /**\n * Handle Feature Schema Maps (rendered fields)\n */\n if (\n 'generateSchemaMap' in resolvedFeature &&\n typeof resolvedFeature.generateSchemaMap === 'function'\n ) {\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap: new Map(),\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n disableAddingID: true,\n fieldSchema: fields,\n i18n,\n parentPath: `${schemaPath}.feature.${featureKey}.fields.${schemaKey}`,\n readOnly: false,\n })\n\n componentMap.set(`feature.${featureKey}.fields.${schemaKey}`, mappedFields)\n }\n }\n }\n\n if (!ClientComponent) {\n return null\n }\n\n return {\n ClientComponent:\n clientComponentProps && typeof clientComponentProps === 'object' ? (\n <ClientComponent\n {...clientComponentProps}\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ) : (\n <ClientComponent\n featureKey={resolvedFeature.key}\n key={resolvedFeature.key}\n order={resolvedFeature.order}\n />\n ),\n key: resolvedFeature.key,\n order: resolvedFeature.order,\n } as GeneratedFeatureProviderComponent\n })\n .filter((feature) => feature !== null),\n )\n\n return componentMap\n }\n"],"names":["mapFields","React","getGenerateComponentMap","args","WithServerSideProps","config","i18n","schemaPath","componentMap","Map","resolvedFeatureMapArray","Array","from","resolvedFeatureMap","entries","sort","a","b","order","set","map","featureKey","resolvedFeature","ClientComponent","clientComponentProps","clientFeatureProps","generateComponentMap","components","props","serverFeatureProps","componentKey","Component","key","generateSchemaMap","schemas","schemaMap","schemaKey","fields","mappedFields","disableAddingID","fieldSchema","parentPath","readOnly","filter","feature"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,OAAOC,WAAW,QAAO;AAKzB,OAAO,MAAMC,0BACX,CAACC,OAGD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE;QAChD,MAAMC,eAAe,IAAIC;QAEzB,gHAAgH;QAChH,MAAMC,0BAA0BC,MAAMC,IAAI,CAACT,KAAKU,kBAAkB,CAACC,OAAO,IAAIC,IAAI,CAChF,CAACC,GAAGC,IAAMD,CAAC,CAAC,EAAE,CAACE,KAAK,GAAGD,CAAC,CAAC,EAAE,CAACC,KAAK;QAGnCV,aAAaW,GAAG,CACd,CAAC,QAAQ,CAAC,EACVT,wBACGU,GAAG,CAAC,CAAC,CAACC,YAAYC,gBAAgB;YACjC,MAAMC,kBAAkBD,gBAAgBC,eAAe;YACvD,MAAMC,uBAAuBF,gBAAgBG,kBAAkB;YAE/D;;WAEC,GACD,IACE,0BAA0BH,mBAC1B,OAAOA,gBAAgBI,oBAAoB,KAAK,YAChD;gBACA,MAAMC,aAAaL,gBAAgBI,oBAAoB,CAAC;oBACtDrB;oBACAC;oBACAsB,OAAON,gBAAgBO,kBAAkB;oBACzCtB;gBACF;gBAEA,IAAK,MAAMuB,gBAAgBH,WAAY;oBACrC,MAAMI,YAAYJ,UAAU,CAACG,aAAa;oBAE1C,IAAIC,WAAW;wBACbvB,aAAaW,GAAG,CACd,CAAC,QAAQ,EAAEE,WAAW,YAAY,EAAES,aAAa,CAAC,gBAClD,KAAC1B;4BACC2B,WAAWA;4BACXD,cAAcA;4BACdT,YAAYC,gBAAgBU,GA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2
2
  import type { ResolvedServerFeatureMap } from './field/features/types.js';
3
3
  export declare const getGenerateSchemaMap: (args: {
4
4
  resolvedFeatureMap: ResolvedServerFeatureMap;
@@ -1 +1 @@
1
- {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../src/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAEpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAyB5F,CAAA"}
1
+ {"version":3,"file":"generateSchemaMap.d.ts","sourceRoot":"","sources":["../src/generateSchemaMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,eAAO,MAAM,oBAAoB,SACxB;IAAE,kBAAkB,EAAE,wBAAwB,CAAA;CAAE,KAAG,eAAe,CAAC,mBAAmB,CAyB5F,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload/types'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"names":["getGenerateSchemaMap","args","config","i18n","schemaMap","schemaPath","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","serverFeatureProps","schemaKey","fields","set"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAIA,OAAO,MAAMA,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAE;QACtC,KAAK,MAAM,CAACC,YAAYC,gBAAgB,IAAIN,KAAKO,kBAAkB,CAACC,OAAO,GAAI;YAC7E,IACE,CAAE,CAAA,uBAAuBF,eAAc,KACvC,OAAOA,gBAAgBG,iBAAiB,KAAK,YAC7C;gBACA;YACF;YACA,MAAMC,UAAUJ,gBAAgBG,iBAAiB,CAAC;gBAChDR;gBACAC;gBACAS,OAAOL,gBAAgBM,kBAAkB;gBACzCT;gBACAC;YACF;YAEA,IAAIM,SAAS;gBACX,KAAK,MAAM,CAACG,WAAWC,OAAO,IAAIJ,QAAQF,OAAO,GAAI;oBACnDL,UAAUY,GAAG,CAAC,CAAC,EAAEX,WAAW,SAAS,EAAEC,WAAW,CAAC,EAAEQ,UAAU,CAAC,EAAEC;gBACpE;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { RichTextAdapter } from 'payload'\n\nimport type { ResolvedServerFeatureMap } from './field/features/types.js'\n\nexport const getGenerateSchemaMap =\n (args: { resolvedFeatureMap: ResolvedServerFeatureMap }): RichTextAdapter['generateSchemaMap'] =>\n ({ config, i18n, schemaMap, schemaPath }) => {\n for (const [featureKey, resolvedFeature] of args.resolvedFeatureMap.entries()) {\n if (\n !('generateSchemaMap' in resolvedFeature) ||\n typeof resolvedFeature.generateSchemaMap !== 'function'\n ) {\n continue\n }\n const schemas = resolvedFeature.generateSchemaMap({\n config,\n i18n,\n props: resolvedFeature.serverFeatureProps,\n schemaMap,\n schemaPath,\n })\n\n if (schemas) {\n for (const [schemaKey, fields] of schemas.entries()) {\n schemaMap.set(`${schemaPath}.feature.${featureKey}.${schemaKey}`, fields)\n }\n }\n }\n\n return schemaMap\n }\n"],"names":["getGenerateSchemaMap","args","config","i18n","schemaMap","schemaPath","featureKey","resolvedFeature","resolvedFeatureMap","entries","generateSchemaMap","schemas","props","serverFeatureProps","schemaKey","fields","set"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAIA,OAAO,MAAMA,uBACX,CAACC,OACD,CAAC,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAE;QACtC,KAAK,MAAM,CAACC,YAAYC,gBAAgB,IAAIN,KAAKO,kBAAkB,CAACC,OAAO,GAAI;YAC7E,IACE,CAAE,CAAA,uBAAuBF,eAAc,KACvC,OAAOA,gBAAgBG,iBAAiB,KAAK,YAC7C;gBACA;YACF;YACA,MAAMC,UAAUJ,gBAAgBG,iBAAiB,CAAC;gBAChDR;gBACAC;gBACAS,OAAOL,gBAAgBM,kBAAkB;gBACzCT;gBACAC;YACF;YAEA,IAAIM,SAAS;gBACX,KAAK,MAAM,CAACG,WAAWC,OAAO,IAAIJ,QAAQF,OAAO,GAAI;oBACnDL,UAAUY,GAAG,CAAC,CAAC,EAAEX,WAAW,SAAS,EAAEC,WAAW,CAAC,EAAEQ,UAAU,CAAC,EAAEC;gBACpE;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}
package/dist/index.d.ts CHANGED
@@ -17,7 +17,6 @@ export { TreeViewFeature } from './field/features/debug/treeView/feature.server.
17
17
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
18
18
  export { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js';
19
19
  export { ItalicFeature } from './field/features/format/italic/feature.server.js';
20
- export { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js';
21
20
  export { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js';
22
21
  export { SubscriptFeature } from './field/features/format/subscript/feature.server.js';
23
22
  export { SuperscriptFeature } from './field/features/format/superscript/feature.server.js';
@@ -50,9 +49,6 @@ export { SlateToLexicalFeature } from './field/features/migrations/slateToLexica
50
49
  export { ParagraphFeature } from './field/features/paragraph/feature.server.js';
51
50
  export { RelationshipFeature, type RelationshipFeatureProps, } from './field/features/relationship/feature.server.js';
52
51
  export { $createRelationshipNode, $isRelationshipNode, type RelationshipData, RelationshipNode, type SerializedRelationshipNode, } from './field/features/relationship/nodes/RelationshipNode.js';
53
- export { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js';
54
- export { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js';
55
- export { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js';
56
52
  export { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js';
57
53
  export { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js';
58
54
  export type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js';
@@ -61,8 +57,6 @@ export type { AfterChangeNodeHook, AfterChangeNodeHookArgs, AfterReadNodeHook, A
61
57
  export { UploadFeature } from './field/features/upload/feature.server.js';
62
58
  export type { UploadFeatureProps } from './field/features/upload/feature.server.js';
63
59
  export { $createUploadNode, $isUploadNode, type SerializedUploadNode, type UploadData, UploadNode, } from './field/features/upload/nodes/UploadNode.js';
64
- export { type EditorConfigContextType, EditorConfigProvider, useEditorConfigContext, } from './field/lexical/config/client/EditorConfigProvider.js';
65
- export { sanitizeClientEditorConfig, sanitizeClientFeatures, } from './field/lexical/config/client/sanitize.js';
66
60
  export { defaultEditorConfig, defaultEditorFeatures, defaultEditorLexicalConfig, } from './field/lexical/config/server/default.js';
67
61
  export { loadFeatures, sortFeaturesForOptimalLoading, } from './field/lexical/config/server/loader.js';
68
62
  export { sanitizeServerEditorConfig, sanitizeServerFeatures, } from './field/lexical/config/server/sanitize.js';
@@ -71,20 +65,7 @@ export { getEnabledNodes } from './field/lexical/nodes/index.js';
71
65
  export { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js';
72
66
  export type { AdapterProps };
73
67
  export type { SlashMenuGroup, SlashMenuItem, } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
74
- export { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js';
75
- export { cloneDeep } from './field/lexical/utils/cloneDeep.js';
76
- export { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js';
77
- export { getSelectedNode } from './field/lexical/utils/getSelectedNode.js';
78
- export { isHTMLElement } from './field/lexical/utils/guard.js';
79
- export { invariant } from './field/lexical/utils/invariant.js';
80
- export { joinClasses } from './field/lexical/utils/joinClasses.js';
81
- export { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js';
82
68
  export { DETAIL_TYPE_TO_DETAIL, DOUBLE_LINE_BREAK, ELEMENT_FORMAT_TO_TYPE, ELEMENT_TYPE_TO_FORMAT, IS_ALL_FORMATTING, LTR_REGEX, NON_BREAKING_SPACE, NodeFormat, RTL_REGEX, TEXT_MODE_TO_TYPE, TEXT_TYPE_TO_FORMAT, TEXT_TYPE_TO_MODE, } from './field/lexical/utils/nodeFormat.js';
83
- export { Point, isPoint } from './field/lexical/utils/point.js';
84
- export { Rect } from './field/lexical/utils/rect.js';
85
- export { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js';
86
- export { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js';
87
- export { addSwipeDownListener, addSwipeLeftListener, addSwipeRightListener, addSwipeUpListener, } from './field/lexical/utils/swipe.js';
88
69
  export { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js';
89
70
  export { defaultRichTextValue } from './populateGraphQL/defaultValue.js';
90
71
  export type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAElB,8BAA8B,EAC/B,MAAM,YAAY,CAAA;AAuBnB,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,kBAAkB,GAAG,8BAA8B,CAotBxF;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAA;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAA;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,2CAA2C,CAAA;AAClG,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,KAAK,WAAW,EAChB,SAAS,EACT,KAAK,mBAAmB,GACzB,MAAM,6CAA6C,CAAA;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAA;AAC3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAA;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAA;AAEjG,OAAO,EAAE,qBAAqB,EAAE,MAAM,iEAAiE,CAAA;AACvG,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,qDAAqD,CAAA;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,qDAAqD,CAAA;AACxF,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EACL,yBAAyB,EACzB,WAAW,GACZ,MAAM,iDAAiD,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAA;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAA;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAA;AAC5E,OAAO,EAAE,iBAAiB,E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ist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { withMergedProps } from '@payloadcms/ui/elements/withMergedProps';
2
- import { afterChangeTraverseFields, afterReadTraverseFields, beforeChangeTraverseFields, beforeValidateTraverseFields, withNullableJSONSchemaType } from 'payload/utilities';
3
- import { RichTextCell } from './cell/index.js';
4
- import { RichTextField } from './field/index.js';
2
+ import { afterChangeTraverseFields, afterReadTraverseFields, beforeChangeTraverseFields, beforeValidateTraverseFields, withNullableJSONSchemaType } from 'payload';
3
+ // eslint-disable-next-line payload/no-imports-from-exports-dir
4
+ import { RichTextCell, RichTextField } from './exports/client/index.js';
5
5
  import { defaultEditorConfig, defaultEditorFeatures } from './field/lexical/config/server/default.js';
6
6
  import { loadFeatures } from './field/lexical/config/server/loader.js';
7
7
  import { sanitizeServerEditorConfig, sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js';
@@ -614,7 +614,6 @@ export { TreeViewFeature } from './field/features/debug/treeView/feature.server.
614
614
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
615
615
  export { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js';
616
616
  export { ItalicFeature } from './field/features/format/italic/feature.server.js';
617
- export { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js';
618
617
  export { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js';
619
618
  export { SubscriptFeature } from './field/features/format/subscript/feature.server.js';
620
619
  export { SuperscriptFeature } from './field/features/format/superscript/feature.server.js';
@@ -645,35 +644,17 @@ export { SlateToLexicalFeature } from './field/features/migrations/slateToLexica
645
644
  export { ParagraphFeature } from './field/features/paragraph/feature.server.js';
646
645
  export { RelationshipFeature } from './field/features/relationship/feature.server.js';
647
646
  export { $createRelationshipNode, $isRelationshipNode, RelationshipNode } from './field/features/relationship/nodes/RelationshipNode.js';
648
- export { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js';
649
- export { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js';
650
- export { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js';
651
647
  export { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js';
652
648
  export { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js';
653
649
  export { createNode } from './field/features/typeUtilities.js';
654
650
  export { UploadFeature } from './field/features/upload/feature.server.js';
655
651
  export { $createUploadNode, $isUploadNode, UploadNode } from './field/features/upload/nodes/UploadNode.js';
656
- export { EditorConfigProvider, useEditorConfigContext } from './field/lexical/config/client/EditorConfigProvider.js';
657
- export { sanitizeClientEditorConfig, sanitizeClientFeatures } from './field/lexical/config/client/sanitize.js';
658
652
  export { defaultEditorConfig, defaultEditorFeatures, defaultEditorLexicalConfig } from './field/lexical/config/server/default.js';
659
653
  export { loadFeatures, sortFeaturesForOptimalLoading } from './field/lexical/config/server/loader.js';
660
654
  export { sanitizeServerEditorConfig, sanitizeServerFeatures } from './field/lexical/config/server/sanitize.js';
661
655
  export { getEnabledNodes } from './field/lexical/nodes/index.js';
662
656
  export { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js';
663
- export { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js';
664
- export { cloneDeep } from './field/lexical/utils/cloneDeep.js';
665
- export { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js';
666
- export { getSelectedNode } from './field/lexical/utils/getSelectedNode.js';
667
- export { isHTMLElement } from './field/lexical/utils/guard.js';
668
- export { invariant } from './field/lexical/utils/invariant.js';
669
- export { joinClasses } from './field/lexical/utils/joinClasses.js';
670
- export { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js';
671
657
  export { DETAIL_TYPE_TO_DETAIL, DOUBLE_LINE_BREAK, ELEMENT_FORMAT_TO_TYPE, ELEMENT_TYPE_TO_FORMAT, IS_ALL_FORMATTING, LTR_REGEX, NON_BREAKING_SPACE, NodeFormat, RTL_REGEX, TEXT_MODE_TO_TYPE, TEXT_TYPE_TO_FORMAT, TEXT_TYPE_TO_MODE } from './field/lexical/utils/nodeFormat.js';
672
- export { Point, isPoint } from './field/lexical/utils/point.js';
673
- export { Rect } from './field/lexical/utils/rect.js';
674
- export { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js';
675
- export { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js';
676
- export { addSwipeDownListener, addSwipeLeftListener, addSwipeRightListener, addSwipeUpListener } from './field/lexical/utils/swipe.js';
677
658
  export { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js';
678
659
  export { defaultRichTextValue } from './populateGraphQL/defaultValue.js';
679
660