@payloadcms/richtext-lexical 3.84.1 → 4.0.0-internal.38b7f1d

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 (619) hide show
  1. package/dist/exports/client/Field-PJW7KUJG.js +2 -0
  2. package/dist/exports/client/Field-PJW7KUJG.js.map +7 -0
  3. package/dist/exports/client/RelationshipComponent-5RONAYJM.js +2 -0
  4. package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +7 -0
  5. package/dist/exports/client/bundled.css +1 -1
  6. package/dist/exports/client/chunk-44G3K3W7.js +2 -0
  7. package/dist/exports/client/chunk-44G3K3W7.js.map +7 -0
  8. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  9. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  10. package/dist/exports/client/component-53Y3RYR5.js +2 -0
  11. package/dist/exports/client/component-53Y3RYR5.js.map +7 -0
  12. package/dist/exports/client/componentInline-PM4PLNUK.js +2 -0
  13. package/dist/exports/client/index.d.ts +0 -2
  14. package/dist/exports/client/index.d.ts.map +1 -1
  15. package/dist/exports/client/index.js +30 -30
  16. package/dist/exports/client/index.js.map +4 -4
  17. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  18. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  19. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  20. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  21. package/dist/features/blockquote/server/index.js +0 -39
  22. package/dist/features/blockquote/server/index.js.map +1 -1
  23. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  24. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  25. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  26. package/dist/features/blocks/client/component/index.css +178 -0
  27. package/dist/features/blocks/client/component/index.d.ts +1 -1
  28. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  29. package/dist/features/blocks/client/component/index.js +88 -16
  30. package/dist/features/blocks/client/component/index.js.map +1 -1
  31. package/dist/features/blocks/client/componentInline/index.css +85 -0
  32. package/dist/features/blocks/client/componentInline/index.d.ts +1 -1
  33. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  34. package/dist/features/blocks/client/componentInline/index.js +29 -6
  35. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  36. package/dist/features/blocks/client/index.d.ts.map +1 -1
  37. package/dist/features/blocks/client/index.js +0 -2
  38. package/dist/features/blocks/client/index.js.map +1 -1
  39. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  40. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  41. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +3 -0
  42. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  43. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  44. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  45. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  46. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  47. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  48. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +40 -0
  49. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  50. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  51. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  52. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  53. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  54. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  55. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  56. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  57. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  58. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  59. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  60. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  61. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  62. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  63. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  64. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  65. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  66. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  67. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  68. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  69. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  70. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  71. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  72. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  73. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  74. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  75. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  76. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  77. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  78. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  79. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  80. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  81. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  82. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  83. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  84. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  85. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  86. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  87. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  88. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  89. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  90. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  91. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  92. package/dist/features/experimental_table/server/index.js +0 -102
  93. package/dist/features/experimental_table/server/index.js.map +1 -1
  94. package/dist/features/heading/server/index.d.ts.map +1 -1
  95. package/dist/features/heading/server/index.js +0 -39
  96. package/dist/features/heading/server/index.js.map +1 -1
  97. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  98. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  99. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  100. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  101. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  102. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  103. package/dist/features/horizontalRule/server/index.js +0 -8
  104. package/dist/features/horizontalRule/server/index.js.map +1 -1
  105. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  106. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  107. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  108. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +112 -0
  109. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  110. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  111. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  112. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  113. package/dist/features/link/server/index.d.ts.map +1 -1
  114. package/dist/features/link/server/index.js +0 -71
  115. package/dist/features/link/server/index.js.map +1 -1
  116. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  117. package/dist/features/lists/checklist/server/index.js +0 -7
  118. package/dist/features/lists/checklist/server/index.js.map +1 -1
  119. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  120. package/dist/features/lists/orderedList/server/index.js +0 -7
  121. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  122. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  123. package/dist/features/lists/unorderedList/server/index.js +0 -7
  124. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  125. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  126. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  127. package/dist/features/relationship/client/components/RelationshipComponent.js +27 -2
  128. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  129. package/dist/features/relationship/client/components/index.css +112 -0
  130. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  131. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  132. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  133. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  134. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  135. package/dist/features/toolbars/inline/client/Toolbar/index.css +43 -0
  136. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  137. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  138. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  139. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  140. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  141. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  142. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  143. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  144. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  145. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  146. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +4 -0
  147. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  148. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +214 -0
  149. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  150. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  151. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  152. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  153. package/dist/features/toolbars/types.d.ts +4 -0
  154. package/dist/features/toolbars/types.d.ts.map +1 -1
  155. package/dist/features/toolbars/types.js.map +1 -1
  156. package/dist/features/typesServer.d.ts +0 -17
  157. package/dist/features/typesServer.d.ts.map +1 -1
  158. package/dist/features/typesServer.js.map +1 -1
  159. package/dist/features/upload/client/component/index.css +218 -0
  160. package/dist/features/upload/client/component/index.d.ts +1 -1
  161. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  162. package/dist/features/upload/client/component/index.js +86 -63
  163. package/dist/features/upload/client/component/index.js.map +1 -1
  164. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  165. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  166. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  167. package/dist/features/upload/server/index.d.ts.map +1 -1
  168. package/dist/features/upload/server/index.js +0 -78
  169. package/dist/features/upload/server/index.js.map +1 -1
  170. package/dist/field/Diff/converters/listitem/index.css +44 -0
  171. package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
  172. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  173. package/dist/field/Diff/converters/listitem/index.js +1 -0
  174. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  175. package/dist/field/Diff/converters/relationship/index.css +68 -0
  176. package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
  177. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  178. package/dist/field/Diff/converters/relationship/index.js +1 -0
  179. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  180. package/dist/field/Diff/converters/unknown/index.css +37 -0
  181. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  182. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  183. package/dist/field/Diff/converters/unknown/index.js +1 -0
  184. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  185. package/dist/field/Diff/converters/upload/index.css +112 -0
  186. package/dist/field/Diff/converters/upload/index.d.ts +1 -1
  187. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  188. package/dist/field/Diff/converters/upload/index.js +1 -0
  189. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  190. package/dist/field/Diff/index.css +101 -0
  191. package/dist/field/Diff/index.d.ts +1 -1
  192. package/dist/field/Diff/index.d.ts.map +1 -1
  193. package/dist/field/Diff/index.js +1 -0
  194. package/dist/field/Diff/index.js.map +1 -1
  195. package/dist/field/Field.d.ts +2 -2
  196. package/dist/field/Field.d.ts.map +1 -1
  197. package/dist/field/Field.js +11 -9
  198. package/dist/field/Field.js.map +1 -1
  199. package/dist/field/ViewSelector.css +32 -0
  200. package/dist/field/ViewSelector.d.ts +1 -1
  201. package/dist/field/ViewSelector.d.ts.map +1 -1
  202. package/dist/field/ViewSelector.js +1 -0
  203. package/dist/field/ViewSelector.js.map +1 -1
  204. package/dist/field/bundled.css +1 -1
  205. package/dist/field/index.css +60 -0
  206. package/dist/index.d.ts +0 -10
  207. package/dist/index.d.ts.map +1 -1
  208. package/dist/index.js +11 -10
  209. package/dist/index.js.map +1 -1
  210. package/dist/lexical/LexicalEditor.css +50 -0
  211. package/dist/lexical/LexicalEditor.d.ts +1 -1
  212. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  213. package/dist/lexical/LexicalEditor.js +1 -0
  214. package/dist/lexical/LexicalEditor.js.map +1 -1
  215. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  216. package/dist/lexical/config/server/loader.js +12 -9
  217. package/dist/lexical/config/server/loader.js.map +1 -1
  218. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  219. package/dist/lexical/config/server/sanitize.js +0 -6
  220. package/dist/lexical/config/server/sanitize.js.map +1 -1
  221. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  222. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  223. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  224. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  225. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  226. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  227. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  228. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  229. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  230. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  231. package/dist/lexical/plugins/SlashMenu/index.css +65 -0
  232. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  233. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  234. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  235. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  236. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  237. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  238. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  239. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  240. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  241. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  242. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  243. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  244. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +15 -8
  245. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  246. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  247. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  248. package/dist/lexical/theme/EditorTheme.css +359 -0
  249. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  250. package/dist/lexical/theme/EditorTheme.js +1 -0
  251. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  252. package/dist/lexical/ui/ContentEditable.css +95 -0
  253. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  254. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  255. package/dist/lexical/ui/ContentEditable.js +1 -0
  256. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  257. package/dist/lexical/ui/icons/Add/index.d.ts +4 -1
  258. package/dist/lexical/ui/icons/Add/index.d.ts.map +1 -1
  259. package/dist/lexical/ui/icons/Add/index.js +19 -12
  260. package/dist/lexical/ui/icons/Add/index.js.map +1 -1
  261. package/dist/lexical/ui/icons/Add/index.svg +2 -3
  262. package/dist/lexical/ui/icons/Add/light.svg +2 -3
  263. package/dist/lexical/ui/icons/AlignCenter/index.d.ts +3 -1
  264. package/dist/lexical/ui/icons/AlignCenter/index.d.ts.map +1 -1
  265. package/dist/lexical/ui/icons/AlignCenter/index.js +15 -19
  266. package/dist/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  267. package/dist/lexical/ui/icons/AlignJustify/index.d.ts +3 -1
  268. package/dist/lexical/ui/icons/AlignJustify/index.d.ts.map +1 -1
  269. package/dist/lexical/ui/icons/AlignJustify/index.js +15 -19
  270. package/dist/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  271. package/dist/lexical/ui/icons/AlignLeft/index.d.ts +3 -1
  272. package/dist/lexical/ui/icons/AlignLeft/index.d.ts.map +1 -1
  273. package/dist/lexical/ui/icons/AlignLeft/index.js +15 -19
  274. package/dist/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  275. package/dist/lexical/ui/icons/AlignRight/index.d.ts +3 -1
  276. package/dist/lexical/ui/icons/AlignRight/index.d.ts.map +1 -1
  277. package/dist/lexical/ui/icons/AlignRight/index.js +15 -19
  278. package/dist/lexical/ui/icons/AlignRight/index.js.map +1 -1
  279. package/dist/lexical/ui/icons/Block/index.d.ts +3 -1
  280. package/dist/lexical/ui/icons/Block/index.d.ts.map +1 -1
  281. package/dist/lexical/ui/icons/Block/index.js +13 -28
  282. package/dist/lexical/ui/icons/Block/index.js.map +1 -1
  283. package/dist/lexical/ui/icons/Blockquote/index.d.ts +3 -1
  284. package/dist/lexical/ui/icons/Blockquote/index.d.ts.map +1 -1
  285. package/dist/lexical/ui/icons/Blockquote/index.js +9 -6
  286. package/dist/lexical/ui/icons/Blockquote/index.js.map +1 -1
  287. package/dist/lexical/ui/icons/Bold/index.d.ts +3 -1
  288. package/dist/lexical/ui/icons/Bold/index.d.ts.map +1 -1
  289. package/dist/lexical/ui/icons/Bold/index.js +13 -8
  290. package/dist/lexical/ui/icons/Bold/index.js.map +1 -1
  291. package/dist/lexical/ui/icons/Checklist/index.d.ts +4 -1
  292. package/dist/lexical/ui/icons/Checklist/index.d.ts.map +1 -1
  293. package/dist/lexical/ui/icons/Checklist/index.js +17 -18
  294. package/dist/lexical/ui/icons/Checklist/index.js.map +1 -1
  295. package/dist/lexical/ui/icons/Code/index.d.ts +3 -1
  296. package/dist/lexical/ui/icons/Code/index.d.ts.map +1 -1
  297. package/dist/lexical/ui/icons/Code/index.js +15 -13
  298. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  299. package/dist/lexical/ui/icons/CodeBlock/index.d.ts +4 -1
  300. package/dist/lexical/ui/icons/CodeBlock/index.d.ts.map +1 -1
  301. package/dist/lexical/ui/icons/CodeBlock/index.js +18 -7
  302. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  303. package/dist/lexical/ui/icons/Collapse/index.d.ts +3 -1
  304. package/dist/lexical/ui/icons/Collapse/index.d.ts.map +1 -1
  305. package/dist/lexical/ui/icons/Collapse/index.js +10 -8
  306. package/dist/lexical/ui/icons/Collapse/index.js.map +1 -1
  307. package/dist/lexical/ui/icons/DraggableBlock/index.svg +7 -7
  308. package/dist/lexical/ui/icons/DraggableBlock/light.svg +7 -7
  309. package/dist/lexical/ui/icons/Expand/index.d.ts +5 -0
  310. package/dist/lexical/ui/icons/Expand/index.d.ts.map +1 -0
  311. package/dist/lexical/ui/icons/Expand/index.js +22 -0
  312. package/dist/lexical/ui/icons/Expand/index.js.map +1 -0
  313. package/dist/lexical/ui/icons/H1/index.d.ts +3 -1
  314. package/dist/lexical/ui/icons/H1/index.d.ts.map +1 -1
  315. package/dist/lexical/ui/icons/H1/index.js +9 -6
  316. package/dist/lexical/ui/icons/H1/index.js.map +1 -1
  317. package/dist/lexical/ui/icons/H2/index.d.ts +3 -1
  318. package/dist/lexical/ui/icons/H2/index.d.ts.map +1 -1
  319. package/dist/lexical/ui/icons/H2/index.js +9 -6
  320. package/dist/lexical/ui/icons/H2/index.js.map +1 -1
  321. package/dist/lexical/ui/icons/H3/index.d.ts +3 -1
  322. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  323. package/dist/lexical/ui/icons/H3/index.js +9 -6
  324. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  325. package/dist/lexical/ui/icons/H4/index.d.ts +3 -1
  326. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  327. package/dist/lexical/ui/icons/H4/index.js +9 -6
  328. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  329. package/dist/lexical/ui/icons/H5/index.d.ts +3 -1
  330. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  331. package/dist/lexical/ui/icons/H5/index.js +9 -6
  332. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  333. package/dist/lexical/ui/icons/H6/index.d.ts +3 -1
  334. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  335. package/dist/lexical/ui/icons/H6/index.js +9 -6
  336. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  337. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts +3 -1
  338. package/dist/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -1
  339. package/dist/lexical/ui/icons/HorizontalRule/index.js +11 -11
  340. package/dist/lexical/ui/icons/HorizontalRule/index.js.map +1 -1
  341. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts +3 -1
  342. package/dist/lexical/ui/icons/IndentDecrease/index.d.ts.map +1 -1
  343. package/dist/lexical/ui/icons/IndentDecrease/index.js +18 -22
  344. package/dist/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  345. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts +3 -1
  346. package/dist/lexical/ui/icons/IndentIncrease/index.d.ts.map +1 -1
  347. package/dist/lexical/ui/icons/IndentIncrease/index.js +15 -22
  348. package/dist/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  349. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts +3 -1
  350. package/dist/lexical/ui/icons/InlineBlocks/index.d.ts.map +1 -1
  351. package/dist/lexical/ui/icons/InlineBlocks/index.js +9 -6
  352. package/dist/lexical/ui/icons/InlineBlocks/index.js.map +1 -1
  353. package/dist/lexical/ui/icons/Italic/index.d.ts +3 -1
  354. package/dist/lexical/ui/icons/Italic/index.d.ts.map +1 -1
  355. package/dist/lexical/ui/icons/Italic/index.js +13 -8
  356. package/dist/lexical/ui/icons/Italic/index.js.map +1 -1
  357. package/dist/lexical/ui/icons/Link/index.d.ts +4 -1
  358. package/dist/lexical/ui/icons/Link/index.d.ts.map +1 -1
  359. package/dist/lexical/ui/icons/Link/index.js +14 -9
  360. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  361. package/dist/lexical/ui/icons/Meatballs/index.d.ts +4 -1
  362. package/dist/lexical/ui/icons/Meatballs/index.d.ts.map +1 -1
  363. package/dist/lexical/ui/icons/Meatballs/index.js +19 -15
  364. package/dist/lexical/ui/icons/Meatballs/index.js.map +1 -1
  365. package/dist/lexical/ui/icons/OrderedList/index.d.ts +4 -1
  366. package/dist/lexical/ui/icons/OrderedList/index.d.ts.map +1 -1
  367. package/dist/lexical/ui/icons/OrderedList/index.js +19 -25
  368. package/dist/lexical/ui/icons/OrderedList/index.js.map +1 -1
  369. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  370. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  371. package/dist/lexical/ui/icons/Page/index.js +21 -0
  372. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  373. package/dist/lexical/ui/icons/Relationship/index.d.ts +3 -1
  374. package/dist/lexical/ui/icons/Relationship/index.d.ts.map +1 -1
  375. package/dist/lexical/ui/icons/Relationship/index.js +13 -25
  376. package/dist/lexical/ui/icons/Relationship/index.js.map +1 -1
  377. package/dist/lexical/ui/icons/Strikethrough/index.d.ts +3 -1
  378. package/dist/lexical/ui/icons/Strikethrough/index.d.ts.map +1 -1
  379. package/dist/lexical/ui/icons/Strikethrough/index.js +13 -13
  380. package/dist/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  381. package/dist/lexical/ui/icons/Subscript/index.d.ts +3 -1
  382. package/dist/lexical/ui/icons/Subscript/index.d.ts.map +1 -1
  383. package/dist/lexical/ui/icons/Subscript/index.js +10 -7
  384. package/dist/lexical/ui/icons/Subscript/index.js.map +1 -1
  385. package/dist/lexical/ui/icons/Superscript/index.d.ts +3 -1
  386. package/dist/lexical/ui/icons/Superscript/index.d.ts.map +1 -1
  387. package/dist/lexical/ui/icons/Superscript/index.js +10 -7
  388. package/dist/lexical/ui/icons/Superscript/index.js.map +1 -1
  389. package/dist/lexical/ui/icons/Table/index.d.ts +4 -1
  390. package/dist/lexical/ui/icons/Table/index.d.ts.map +1 -1
  391. package/dist/lexical/ui/icons/Table/index.js +20 -15
  392. package/dist/lexical/ui/icons/Table/index.js.map +1 -1
  393. package/dist/lexical/ui/icons/Text/index.d.ts +4 -1
  394. package/dist/lexical/ui/icons/Text/index.d.ts.map +1 -1
  395. package/dist/lexical/ui/icons/Text/index.js +17 -8
  396. package/dist/lexical/ui/icons/Text/index.js.map +1 -1
  397. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  398. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  399. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  400. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  401. package/dist/lexical/ui/icons/Underline/index.d.ts +3 -1
  402. package/dist/lexical/ui/icons/Underline/index.d.ts.map +1 -1
  403. package/dist/lexical/ui/icons/Underline/index.js +16 -14
  404. package/dist/lexical/ui/icons/Underline/index.js.map +1 -1
  405. package/dist/lexical/ui/icons/UnorderedList/index.d.ts +3 -1
  406. package/dist/lexical/ui/icons/UnorderedList/index.d.ts.map +1 -1
  407. package/dist/lexical/ui/icons/UnorderedList/index.js +13 -40
  408. package/dist/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  409. package/dist/lexical/ui/icons/Upload/index.d.ts +3 -1
  410. package/dist/lexical/ui/icons/Upload/index.d.ts.map +1 -1
  411. package/dist/lexical/ui/icons/Upload/index.js +15 -22
  412. package/dist/lexical/ui/icons/Upload/index.js.map +1 -1
  413. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  414. package/dist/utilities/buildEditorState.js +13 -0
  415. package/dist/utilities/buildEditorState.js.map +1 -1
  416. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  417. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  418. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  419. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  420. package/package.json +10 -15
  421. package/dist/exports/client/Component-DOSSWC76.js +0 -2
  422. package/dist/exports/client/Component-DOSSWC76.js.map +0 -7
  423. package/dist/exports/client/Component-MBLHTKDK.js +0 -2
  424. package/dist/exports/client/Component-MBLHTKDK.js.map +0 -7
  425. package/dist/exports/client/Field-4UEGQMIN.js +0 -2
  426. package/dist/exports/client/Field-4UEGQMIN.js.map +0 -7
  427. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  428. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  429. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  430. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  431. package/dist/exports/client/chunk-YWIZCGSY.js +0 -2
  432. package/dist/exports/client/chunk-YWIZCGSY.js.map +0 -7
  433. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  434. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  435. package/dist/exports/client/componentInline-CBBUBQ7P.js +0 -2
  436. package/dist/exports/server/migrate.d.ts +0 -16
  437. package/dist/exports/server/migrate.d.ts.map +0 -1
  438. package/dist/exports/server/migrate.js +0 -16
  439. package/dist/exports/server/migrate.js.map +0 -1
  440. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  441. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  442. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  443. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  444. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  445. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  446. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  447. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  448. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  449. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  450. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  451. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  452. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  453. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  454. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  455. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  456. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  457. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  458. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  459. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  460. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  461. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  462. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  463. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  464. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  465. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  466. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  467. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  468. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  469. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  470. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  471. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  472. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  473. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  474. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  475. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  476. package/dist/features/lists/htmlConverter.d.ts +0 -5
  477. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  478. package/dist/features/lists/htmlConverter.js +0 -81
  479. package/dist/features/lists/htmlConverter.js.map +0 -1
  480. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts +0 -3
  481. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  482. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js +0 -22
  483. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +0 -1
  484. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts +0 -3
  485. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.d.ts.map +0 -1
  486. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js +0 -33
  487. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +0 -1
  488. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts +0 -3
  489. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.d.ts.map +0 -1
  490. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js +0 -24
  491. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +0 -1
  492. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts +0 -3
  493. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  494. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js +0 -25
  495. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +0 -1
  496. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts +0 -3
  497. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.d.ts.map +0 -1
  498. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js +0 -22
  499. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +0 -1
  500. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts +0 -3
  501. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  502. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js +0 -28
  503. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +0 -1
  504. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts +0 -3
  505. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  506. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js +0 -22
  507. package/dist/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +0 -1
  508. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts +0 -3
  509. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.d.ts.map +0 -1
  510. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js +0 -9
  511. package/dist/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +0 -1
  512. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts +0 -19
  513. package/dist/features/migrations/lexicalPluginToLexical/converter/index.d.ts.map +0 -1
  514. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js +0 -78
  515. package/dist/features/migrations/lexicalPluginToLexical/converter/index.js.map +0 -1
  516. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts +0 -23
  517. package/dist/features/migrations/lexicalPluginToLexical/converter/types.d.ts.map +0 -1
  518. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js +0 -2
  519. package/dist/features/migrations/lexicalPluginToLexical/converter/types.js.map +0 -1
  520. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts +0 -2
  521. package/dist/features/migrations/lexicalPluginToLexical/feature.client.d.ts.map +0 -1
  522. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js +0 -10
  523. package/dist/features/migrations/lexicalPluginToLexical/feature.client.js.map +0 -1
  524. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts +0 -10
  525. package/dist/features/migrations/lexicalPluginToLexical/feature.server.d.ts.map +0 -1
  526. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js +0 -49
  527. package/dist/features/migrations/lexicalPluginToLexical/feature.server.js.map +0 -1
  528. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  529. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  530. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  531. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  532. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  533. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  534. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js +0 -74
  535. package/dist/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  536. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts +0 -3
  537. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.d.ts.map +0 -1
  538. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js +0 -23
  539. package/dist/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +0 -1
  540. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts +0 -3
  541. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.d.ts.map +0 -1
  542. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js +0 -24
  543. package/dist/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +0 -1
  544. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts +0 -3
  545. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.d.ts.map +0 -1
  546. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js +0 -33
  547. package/dist/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +0 -1
  548. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts +0 -3
  549. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.d.ts.map +0 -1
  550. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js +0 -30
  551. package/dist/features/migrations/slateToLexical/converter/converters/link/converter.js.map +0 -1
  552. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts +0 -3
  553. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.d.ts.map +0 -1
  554. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js +0 -26
  555. package/dist/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +0 -1
  556. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts +0 -3
  557. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.d.ts.map +0 -1
  558. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js +0 -26
  559. package/dist/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +0 -1
  560. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts +0 -3
  561. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.d.ts.map +0 -1
  562. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js +0 -15
  563. package/dist/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +0 -1
  564. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts +0 -3
  565. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.d.ts.map +0 -1
  566. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js +0 -27
  567. package/dist/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +0 -1
  568. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts +0 -3
  569. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.d.ts.map +0 -1
  570. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js +0 -26
  571. package/dist/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +0 -1
  572. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts +0 -3
  573. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.d.ts.map +0 -1
  574. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js +0 -18
  575. package/dist/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +0 -1
  576. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts +0 -3
  577. package/dist/features/migrations/slateToLexical/converter/defaultConverters.d.ts.map +0 -1
  578. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js +0 -12
  579. package/dist/features/migrations/slateToLexical/converter/defaultConverters.js.map +0 -1
  580. package/dist/features/migrations/slateToLexical/converter/index.d.ts +0 -19
  581. package/dist/features/migrations/slateToLexical/converter/index.d.ts.map +0 -1
  582. package/dist/features/migrations/slateToLexical/converter/index.js +0 -130
  583. package/dist/features/migrations/slateToLexical/converter/index.js.map +0 -1
  584. package/dist/features/migrations/slateToLexical/converter/types.d.ts +0 -16
  585. package/dist/features/migrations/slateToLexical/converter/types.d.ts.map +0 -1
  586. package/dist/features/migrations/slateToLexical/converter/types.js +0 -2
  587. package/dist/features/migrations/slateToLexical/converter/types.js.map +0 -1
  588. package/dist/features/migrations/slateToLexical/feature.client.d.ts +0 -2
  589. package/dist/features/migrations/slateToLexical/feature.client.d.ts.map +0 -1
  590. package/dist/features/migrations/slateToLexical/feature.client.js +0 -10
  591. package/dist/features/migrations/slateToLexical/feature.client.js.map +0 -1
  592. package/dist/features/migrations/slateToLexical/feature.server.d.ts +0 -40
  593. package/dist/features/migrations/slateToLexical/feature.server.d.ts.map +0 -1
  594. package/dist/features/migrations/slateToLexical/feature.server.js +0 -68
  595. package/dist/features/migrations/slateToLexical/feature.server.js.map +0 -1
  596. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts +0 -9
  597. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.d.ts.map +0 -1
  598. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js +0 -15
  599. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +0 -1
  600. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts +0 -33
  601. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.d.ts.map +0 -1
  602. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js +0 -74
  603. package/dist/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +0 -1
  604. package/dist/lexical/ui/icons/AI/index.d.ts +0 -3
  605. package/dist/lexical/ui/icons/AI/index.d.ts.map +0 -1
  606. package/dist/lexical/ui/icons/AI/index.js +0 -34
  607. package/dist/lexical/ui/icons/AI/index.js.map +0 -1
  608. package/dist/lexical/ui/icons/Caret/index.svg +0 -3
  609. package/dist/lexical/ui/icons/Edit/index.svg +0 -10
  610. package/dist/lexical/ui/icons/Remove/index.svg +0 -4
  611. package/dist/utilities/migrateSlateToLexical/index.d.ts +0 -15
  612. package/dist/utilities/migrateSlateToLexical/index.d.ts.map +0 -1
  613. package/dist/utilities/migrateSlateToLexical/index.js +0 -152
  614. package/dist/utilities/migrateSlateToLexical/index.js.map +0 -1
  615. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts +0 -10
  616. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.d.ts.map +0 -1
  617. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js +0 -85
  618. package/dist/utilities/migrateSlateToLexical/migrateDocumentFieldsRecursively.js.map +0 -1
  619. /package/dist/exports/client/{componentInline-CBBUBQ7P.js.map → componentInline-PM4PLNUK.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["escapeHTML","sanitizeFields","createServerFeature","convertLexicalNodesToHTML","createNode","createLinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","internalDocToHref","nodes","converters","html","converter","currentDepth","depth","draft","node","overrideAccess","parent","req","showHiddenFields","childrenText","lexicalNodes","children","href","url","linkType","doc","value","String","id","newTab","nodeTypes","getType","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport escapeHTML from 'escape-html'\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\nimport type { SerializedLinkNode } from '../nodes/types.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { convertLexicalNodesToHTML } from '../../converters/lexicalToHtml_deprecated/converter/index.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { createLinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Resolves an internal link node to a URL string for use in the markdown converter.\n * Internal links store a doc reference rather than a URL, so without this the markdown\n * output will have an empty href: `[link text]()`.\n */\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [\n createLinkMarkdownTransformer({ internalDocToHref: props.internalDocToHref }),\n ],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n href =\n typeof node.fields.doc?.value !== 'object'\n ? String(node.fields.doc?.value)\n : String(node.fields.doc?.value?.id)\n }\n\n return `<a href=\"${href}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>${childrenText}</a>`\n },\n nodeTypes: [AutoLinkNode.getType()],\n },\n },\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n converters: {\n html: {\n converter: async ({\n converters,\n currentDepth,\n depth,\n draft,\n node,\n overrideAccess,\n parent,\n req,\n showHiddenFields,\n }) => {\n const childrenText = await convertLexicalNodesToHTML({\n converters,\n currentDepth,\n depth,\n draft,\n lexicalNodes: node.children,\n overrideAccess,\n parent: {\n ...node,\n parent,\n },\n req,\n showHiddenFields,\n })\n\n const href: string =\n node.fields.linkType === 'custom'\n ? escapeHTML(node.fields.url)\n : (node.fields.doc?.value as string)\n\n return `<a href=\"${href}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>${childrenText}</a>`\n },\n nodeTypes: [LinkNode.getType()],\n },\n },\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ].filter(Boolean) as Array<NodeWithHooks>,\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,OAAOA,UAAA,MAAgB;AACvB,SAASC,cAAc,QAAQ;AAM/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,UAAU,QAAQ;AAC3B,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,YAAY,QAAQ;AAC7B,SAASC,QAAQ,QAAQ;AACzB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,IAAI,QAAQ;AACrB,SAASC,oBAAoB,QAAQ;AACrC,SAASC,cAAc,QAAQ;AA4D/B,OAAO,MAAMC,WAAA,GAAcV,mBAAA,CAIzB;EACAW,OAAA,EAAS,MAAAA,CAAO;IAAEC,MAAA,EAAQC,OAAO;IAAEC,MAAM;IAAEC,iBAAiB;IAAEC;EAAK,CAAE;IACnE,IAAI,CAACA,KAAA,EAAO;MACVA,KAAA,GAAQ,CAAC;IACX;IACA,MAAMC,kBAAA,GAAqBJ,OAAA,CAAQK,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAK,EAAE;IAEvE,MAAMC,kBAAA,GAAqBd,oBAAA,CACzBQ,KAAA,CAAMO,MAAM,GAAGP,KAAA,CAAMO,MAAM,GAAG,MAC9BV,OAAA,EACAG,KAAA,CAAMQ,kBAAkB,EACxBR,KAAA,CAAMS,mBAAmB,EACzBT,KAAA,CAAMU,QAAQ;IAGhB,MAAMC,eAAA,GAAkB,MAAM5B,cAAA,CAAe;MAC3Ca,MAAA,EAAQC,OAAA;MACRU,MAAA,EAAQD,kBAAA;MACRP,iBAAA;MACAa,+BAAA,EAAiCd,MAAA;MAC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3,"file":"index.js","names":["sanitizeFields","createServerFeature","createNode","createLinkMarkdownTransformer","AutoLinkNode","LinkNode","linkPopulationPromiseHOC","i18n","transformExtraFields","linkValidation","LinkFeature","feature","config","_config","isRoot","parentIsLocalized","props","validRelationships","collections","map","c","slug","_transformedFields","fields","enabledCollections","disabledCollections","maxDepth","sanitizedFields","requireFieldLevelRichTextEditor","sanitizedFieldsWithoutText","filter","field","name","linkTypeField","linkURLField","defaultLinkType","defaultValue","undefined","defaultLinkURL","ClientFeature","clientFeatureProps","disableAutoLinks","generateSchemaMap","Array","isArray","length","schemaMap","Map","set","markdownTransformers","internalDocToHref","nodes","node","validations","getSubFields","getSubFieldsData","graphQLPopulationPromises","Boolean","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/link/server/index.ts"],"sourcesContent":["import type {\n CollectionSlug,\n Config,\n Field,\n FieldAffectingData,\n FieldSchemaMap,\n SanitizedConfig,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport type { NodeWithHooks } from '../../typesServer.js'\nimport type { ClientProps } from '../client/index.js'\nimport type { SerializedLinkNode } from '../nodes/types.js'\n\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { createLinkMarkdownTransformer } from '../markdownTransformer.js'\nimport { AutoLinkNode } from '../nodes/AutoLinkNode.js'\nimport { LinkNode } from '../nodes/LinkNode.js'\nimport { linkPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { transformExtraFields } from './transformExtraFields.js'\nimport { linkValidation } from './validate.js'\n\nexport type ExclusiveLinkCollectionsProps =\n | {\n /**\n * The collections that should be disabled for internal linking. Overrides the `enableRichTextLink` property in the collection config.\n * When this property is set, `enabledCollections` will not be available.\n **/\n disabledCollections?: CollectionSlug[]\n\n // Ensures that enabledCollections is not available when disabledCollections is set\n enabledCollections?: never\n }\n | {\n // Ensures that disabledCollections is not available when enabledCollections is set\n disabledCollections?: never\n\n /**\n * The collections that should be enabled for internal linking. Overrides the `enableRichTextLink` property in the collection config\n * When this property is set, `disabledCollections` will not be available.\n **/\n enabledCollections?: CollectionSlug[]\n }\n\nexport type LinkFeatureServerProps = {\n /**\n * Disables the automatic creation of links from URLs pasted into the editor, as well\n * as auto link nodes.\n *\n * If set to 'creationOnly', only the creation of new auto link nodes will be disabled.\n * Existing auto link nodes will still be editable.\n *\n * @default false\n */\n disableAutoLinks?: 'creationOnly' | true\n /**\n * A function or array defining additional fields for the link feature. These will be\n * displayed in the link editor drawer.\n */\n fields?:\n | ((args: {\n config: SanitizedConfig\n defaultFields: FieldAffectingData[]\n }) => (Field | FieldAffectingData)[])\n | Field[]\n /**\n * Resolves an internal link node to a URL string for use in the markdown converter.\n * Internal links store a doc reference rather than a URL, so without this the markdown\n * output will have an empty href: `[link text]()`.\n */\n internalDocToHref?: (args: { linkNode: SerializedLinkNode }) => string\n /**\n * Sets a maximum population depth for the internal doc default field of link, regardless of the remaining depth when the field is reached.\n * This behaves exactly like the maxDepth properties of relationship and upload fields.\n *\n * {@link https://payloadcms.com/docs/getting-started/concepts#field-level-max-depth}\n */\n maxDepth?: number\n} & ExclusiveLinkCollectionsProps\n\nexport const LinkFeature = createServerFeature<\n LinkFeatureServerProps,\n LinkFeatureServerProps,\n ClientProps\n>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props }) => {\n if (!props) {\n props = {}\n }\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const _transformedFields = transformExtraFields(\n props.fields ? props.fields : null,\n _config,\n props.enabledCollections,\n props.disabledCollections,\n props.maxDepth,\n )\n\n const sanitizedFields = await sanitizeFields({\n config: _config as unknown as Config,\n fields: _transformedFields,\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n props.fields = sanitizedFields\n\n // the text field is not included in the node data.\n // Thus, for tasks like validation, we do not want to pass it a text field in the schema which will never have data.\n // Otherwise, it will cause a validation error (field is required).\n const sanitizedFieldsWithoutText = sanitizedFields.filter(\n (field) => !('name' in field) || field.name !== 'text',\n )\n\n let linkTypeField: Field | null = null\n let linkURLField: Field | null = null\n\n for (const field of sanitizedFields) {\n if ('name' in field && field.name === 'linkType') {\n linkTypeField = field\n }\n\n if ('name' in field && field.name === 'url') {\n linkURLField = field\n }\n }\n\n const defaultLinkType = linkTypeField\n ? 'defaultValue' in linkTypeField && typeof linkTypeField.defaultValue === 'string'\n ? linkTypeField.defaultValue\n : 'custom'\n : undefined\n\n const defaultLinkURL = linkURLField\n ? 'defaultValue' in linkURLField && typeof linkURLField.defaultValue === 'string'\n ? linkURLField.defaultValue\n : 'https://'\n : undefined\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#LinkFeatureClient',\n clientFeatureProps: {\n defaultLinkType,\n defaultLinkURL,\n disableAutoLinks: props.disableAutoLinks,\n disabledCollections: props.disabledCollections,\n enabledCollections: props.enabledCollections,\n } as ClientProps,\n generateSchemaMap: () => {\n if (!sanitizedFields || !Array.isArray(sanitizedFields) || sanitizedFields.length === 0) {\n return null\n }\n\n const schemaMap: FieldSchemaMap = new Map()\n schemaMap.set('fields', {\n fields: sanitizedFields,\n })\n\n return schemaMap\n },\n i18n,\n markdownTransformers: [\n createLinkMarkdownTransformer({ internalDocToHref: props.internalDocToHref }),\n ],\n nodes: [\n props?.disableAutoLinks === true\n ? null\n : createNode({\n node: AutoLinkNode,\n // Since AutoLinkNodes are just internal links, they need no hooks or graphQL population promises\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n createNode({\n getSubFields: () => {\n return sanitizedFieldsWithoutText\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [linkPopulationPromiseHOC(props)],\n node: LinkNode,\n validations: [linkValidation(props, sanitizedFieldsWithoutText)],\n }),\n ].filter(Boolean) as Array<NodeWithHooks>,\n sanitizedServerFeatureProps: props,\n }\n },\n key: 'link',\n})\n"],"mappings":"AASA,SAASA,cAAc,QAAQ;AAM/B,SAAS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B,UAAA,CAAW;QACToD,YAAA,EAAcA,CAAA;UACZ,OAAOzB,0BAAA;QACT;QACA0B,gBAAA,EAAkBA,CAAC;UAAEH;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAM7B,MAAA;QACf;QACAiC,yBAAA,EAA2B,CAAClD,wBAAA,CAAyBU,KAAA,EAAO;QAC5DoC,IAAA,EAAM/C,QAAA;QACNgD,WAAA,EAAa,CAAC5C,cAAA,CAAeO,KAAA,EAAOa,0BAAA;MACtC,GACD,CAACC,MAAM,CAAC2B,OAAA;MACTC,2BAAA,EAA6B1C;IAC/B;EACF;EACA2C,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB,kGAyB3B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/checklist/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,gBAAgB,kGAmB3B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
2
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
3
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
4
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
6
5
  import { CHECK_LIST } from '../markdownTransformers.js';
7
6
  import { i18n } from './i18n.js';
@@ -14,14 +13,8 @@ export const ChecklistFeature = createServerFeature({
14
13
  i18n,
15
14
  markdownTransformers: [CHECK_LIST],
16
15
  nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap) ? [createNode({
17
- converters: {
18
- html: ListHTMLConverter
19
- },
20
16
  node: ListNode
21
17
  }), createNode({
22
- converters: {
23
- html: ListItemHTMLConverter
24
- },
25
18
  node: ListItemNode
26
19
  })] : []
27
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","shouldRegisterListBaseNodes","CHECK_LIST","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { CHECK_LIST } from '../markdownTransformers.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,UAAU,QAAQ;AAC3B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBP,mBAAA,CAAoB;EAClDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,UAAA,CAAW;MAClCO,KAAA,EAAOR,2BAAA,CAA4B,aAAaK,kBAAA,IAC5C,CACER,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMZ;QACR;QACAa,IAAA,EAAMhB;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMX;QACR;QACAY,IAAA,EAAMjB;MACR,GACD,GACD;IACN;EACF;EACAkB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","shouldRegisterListBaseNodes","CHECK_LIST","i18n","ChecklistFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","node","key"],"sources":["../../../../../src/features/lists/checklist/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { CHECK_LIST } from '../markdownTransformers.js'\nimport { i18n } from './i18n.js'\n\nexport const ChecklistFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#ChecklistFeatureClient',\n i18n,\n markdownTransformers: [CHECK_LIST],\n nodes: shouldRegisterListBaseNodes('checklist', featureProviderMap)\n ? [\n createNode({\n node: ListNode,\n }),\n createNode({\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'checklist',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,UAAU,QAAQ;AAC3B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,gBAAA,GAAmBL,mBAAA,CAAoB;EAClDM,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,UAAA,CAAW;MAClCO,KAAA,EAAOR,2BAAA,CAA4B,aAAaK,kBAAA,IAC5C,CACEN,UAAA,CAAW;QACTU,IAAA,EAAMZ;MACR,IACAE,UAAA,CAAW;QACTU,IAAA,EAAMb;MACR,GACD,GACD;IACN;EACF;EACAc,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,kGAyB7B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,kBAAkB,kGAmB7B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
2
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
3
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
4
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
6
5
  import { ORDERED_LIST } from '../markdownTransformer.js';
7
6
  import { i18n } from './i18n.js';
@@ -14,14 +13,8 @@ export const OrderedListFeature = createServerFeature({
14
13
  i18n,
15
14
  markdownTransformers: [ORDERED_LIST],
16
15
  nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap) ? [createNode({
17
- converters: {
18
- html: ListHTMLConverter
19
- },
20
16
  node: ListNode
21
17
  }), createNode({
22
- converters: {
23
- html: ListItemHTMLConverter
24
- },
25
18
  node: ListItemNode
26
19
  })] : []
27
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","shouldRegisterListBaseNodes","ORDERED_LIST","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { ORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAC7B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBP,mBAAA,CAAoB;EACpDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,YAAA,CAAa;MACpCO,KAAA,EAAOR,2BAAA,CAA4B,WAAWK,kBAAA,IAC1C,CACER,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMZ;QACR;QACAa,IAAA,EAAMhB;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMX;QACR;QACAY,IAAA,EAAMjB;MACR,GACD,GACD;IACN;EACF;EACAkB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","shouldRegisterListBaseNodes","ORDERED_LIST","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { ORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n node: ListNode,\n }),\n createNode({\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAC7B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBL,mBAAA,CAAoB;EACpDM,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,YAAA,CAAa;MACpCO,KAAA,EAAOR,2BAAA,CAA4B,WAAWK,kBAAA,IAC1C,CACEN,UAAA,CAAW;QACTU,IAAA,EAAMZ;MACR,IACAE,UAAA,CAAW;QACTU,IAAA,EAAMb;MACR,GACD,GACD;IACN;EACF;EACAc,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,kGAqB/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,kGAe/B,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
2
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
3
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
4
  import { UNORDERED_LIST } from '../markdownTransformer.js';
6
5
  import { i18n } from './i18n.js';
7
6
  export const UnorderedListFeature = createServerFeature({
@@ -10,14 +9,8 @@ export const UnorderedListFeature = createServerFeature({
10
9
  i18n,
11
10
  markdownTransformers: [UNORDERED_LIST],
12
11
  nodes: [createNode({
13
- converters: {
14
- html: ListHTMLConverter
15
- },
16
12
  node: ListNode
17
13
  }), createNode({
18
- converters: {
19
- html: ListItemHTMLConverter
20
- },
21
14
  node: ListItemNode
22
15
  })]
23
16
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","UNORDERED_LIST","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBN,mBAAA,CAAoB;EACtDO,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACL,cAAA,CAAe;IACtCM,KAAA,EAAO,CACLT,UAAA,CAAW;MACTU,UAAA,EAAY;QACVC,IAAA,EAAMV;MACR;MACAW,IAAA,EAAMd;IACR,IACAE,UAAA,CAAW;MACTU,UAAA,EAAY;QACVC,IAAA,EAAMT;MACR;MACAU,IAAA,EAAMf;IACR;EAEJ;EACAgB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","UNORDERED_LIST","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n node: ListNode,\n }),\n createNode({\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBJ,mBAAA,CAAoB;EACtDK,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACL,cAAA,CAAe;IACtCM,KAAA,EAAO,CACLP,UAAA,CAAW;MACTQ,IAAA,EAAMV;IACR,IACAE,UAAA,CAAW;MACTQ,IAAA,EAAMX;IACR;EAEJ;EACAY,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { ElementFormatType } from 'lexical';
2
2
  import React from 'react';
3
3
  import type { RelationshipData } from '../../server/nodes/RelationshipNode.js';
4
- import './index.scss';
4
+ import './index.css';
5
5
  type Props = {
6
6
  className: string;
7
7
  data: RelationshipData;
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAQhD,OAAO,KAAoD,MAAM,OAAO,CAAA;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAE9E,OAAO,cAAc,CAAA;AAQrB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2GjD,CAAA"}
1
+ {"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAQhD,OAAO,KAA+D,MAAM,OAAO,CAAA;AAEnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAE9E,OAAO,aAAa,CAAA;AAQpB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqIjD,CAAA"}
@@ -5,9 +5,10 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
5
5
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
6
6
  import { getTranslation } from '@payloadcms/translations';
7
7
  import { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui';
8
- import { $getNodeByKey } from 'lexical';
8
+ import { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical';
9
9
  import { formatAdminURL } from 'payload/shared';
10
- import React, { useCallback, useReducer, useRef, useState } from 'react';
10
+ import React, { useCallback, useEffect, useReducer, useRef, useState } from 'react';
11
+ import './index.css';
11
12
  import { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js';
12
13
  import { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js';
13
14
  const initialParams = {
@@ -28,6 +29,7 @@ export const RelationshipComponent = props => {
28
29
  const relationshipElemRef = useRef(null);
29
30
  const [editor] = useLexicalComposerContext();
30
31
  const isEditable = useLexicalEditable();
32
+ const [isSelected, setIsSelected] = useState(false);
31
33
  const {
32
34
  config: {
33
35
  routes: {
@@ -64,6 +66,29 @@ export const RelationshipComponent = props => {
64
66
  id: value,
65
67
  collectionSlug: relatedCollection.slug
66
68
  });
69
+ useEffect(() => {
70
+ return editor.registerUpdateListener(({
71
+ editorState
72
+ }) => {
73
+ editorState.read(() => {
74
+ const selection = $getSelection();
75
+ if ($isNodeSelection(selection)) {
76
+ setIsSelected(selection.has(nodeKey));
77
+ } else if ($isRangeSelection(selection)) {
78
+ const nodes = selection.getNodes();
79
+ setIsSelected(nodes.some(node => node.getKey() === nodeKey));
80
+ } else {
81
+ setIsSelected(false);
82
+ }
83
+ });
84
+ });
85
+ }, [editor, nodeKey]);
86
+ useEffect(() => {
87
+ const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`);
88
+ if (outerEl) {
89
+ outerEl.classList.toggle(`${baseClass}--selected`, isSelected);
90
+ }
91
+ }, [isSelected, baseClass]);
67
92
  const removeRelationship = useCallback(() => {
68
93
  editor.update(() => {
69
94
  $getNodeByKey(nodeKey)?.remove();
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","formatAdminURL","React","useCallback","useReducer","useRef","useState","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","initialParams","depth","RelationshipComponent","props","className","baseClass","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isEditable","config","routes","api","serverURL","getEntityConfig","relatedCollection","collectionSlug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","apiRoute","path","slug","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","removeRelationship","update","remove","updateRelationship","_jsxs","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","buttonStyle","disabled","el","icon","onClick","dispatchCommand","replace","round","tooltip","e","preventDefault","onSave"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport './index.scss'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAG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,SAAkB;oBAChCC,IAAA,GAAOA,IAAI,CAACa,iBAAA,EAAmB0B,KAAA,EAAOC,UAAA,IAAc,KAAK,GAAGtC;;;QAIlEK,UAAA,iBACCyB,KAAA,CAAC;MAAIlC,SAAA,EAAW,GAAGC,SAAA,WAAoB;8BACrCoC,IAAA,CAACtD,MAAA;QACC4D,WAAA,EAAY;QACZ3C,SAAA,EAAW,GAAGC,SAAA,cAAuB;QACrC2C,QAAA,EAAU,CAACnC,UAAA;QACXoC,EAAA,EAAG;QACHC,IAAA,EAAK;QACLC,OAAA,EAASA,CAAA;UACP,IAAI1C,OAAA,EAAS;YACXG,MAAA,CAAOwC,eAAe,CAACrD,uCAAA,EAAyC;cAC9DsD,OAAA,EAAS;gBAAE5C;cAAQ;YACrB;UACF;QACF;QACA6C,KAAK;QACLC,OAAA,EAASjC,CAAA,CAAE;uBAEbmB,IAAA,CAACtD,MAAA;QACC4D,WAAA,EAAY;QACZ3C,SAAA,EAAW,GAAGC,SAAA,gBAAyB;QACvC2C,QAAA,EAAU,CAACnC,UAAA;QACXqC,IAAA,EAAK;QACLC,OAAA,EAAUK,CAAA;UACRA,CAAA,CAAEC,cAAc;UAChBvB,kBAAA;QACF;QACAoB,KAAK;QACLC,OAAA,EAASjC,CAAA,CAAE;;QAKhB,CAAC,CAACd,KAAA,iBAASiC,IAAA,CAACV,cAAA;MAAe2B,MAAA,EAAQrB;;;AAG1C","ignoreList":[]}
1
+ {"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","$isRangeSelection","formatAdminURL","React","useCallback","useEffect","useReducer","useRef","useState","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","initialParams","depth","RelationshipComponent","props","className","baseClass","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isEditable","isSelected","setIsSelected","config","routes","api","serverURL","getEntityConfig","relatedCollection","collectionSlug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","apiRoute","path","slug","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","registerUpdateListener","editorState","read","selection","has","nodes","getNodes","some","node","getKey","outerEl","current","closest","classList","toggle","removeRelationship","update","remove","updateRelationship","_jsxs","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","buttonStyle","disabled","el","icon","onClick","dispatchCommand","replace","round","tooltip","e","preventDefault","onSave"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport './index.css'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const [isSelected, setIsSelected] = useState(false)\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey!))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],"mappings":"AAAA;;;AAGA,SAASA,yBAAyB,QAAQ;AAC1C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,cAAc,QAAQ;AAC/B,SAASC,MAAM,EAAEC,SAAS,EAAEC,aAAa,EAAEC,cAAc,QAAQ;AACjE,SAASC,aAAa,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,iBAAiB,QAAQ;AAClF,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,IAASC,WAAW,EAAEC,SAAS,EAAEC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ;AAI5E,OAAO;AACP,SAASC,wBAAwB,QAAQ;AACzC,SAASC,uCAAuC,QAAQ;AAExD,MAAMC,aAAA,GAAgB;EACpBC,KAAA,EAAO;AACT;AASA,OAAO,MAAMC,qBAAA,GAA0CC,KAAA;EACrD,MAAM;IACJC,SAAA,EAAWC,SAAS;IACpBC,IAAA,EAAM;MAAEC,UAAU;MAAEC;IAAK,CAAE;IAC3BC;EAAO,CACR,GAAGN,KAAA;EAEJ,IAAI,OAAOK,KAAA,KAAU,UAAU;IAC7B,MAAM,IAAIE,KAAA,CACR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AEC,QAAA,GAC7B/E,cAAA,CAAeuC,iBAAA,CAAkBuC,MAAM,EAAEC,QAAA,EAAUtC,IAAA,IACnDF,iBAAA,CAAkBU;QACxB;uBAEF2B,IAAA,CAACxB,qBAAA;QAAsB9B,SAAA,EAAW,GAAGC,SAAA,sBAA+B;kBAClE,aAAAqD,IAAA,CAAC;UAAEtD,SAAA,EAAW,GAAGC,SAAA,SAAkB;oBAChCC,IAAA,GAAOA,IAAI,CAACe,iBAAA,EAAmByC,KAAA,EAAOC,UAAA,IAAc,KAAK,GAAGvD;;;QAIlEK,UAAA,iBACC0C,KAAA,CAAC;MAAInD,SAAA,EAAW,GAAGC,SAAA,WAAoB;8BACrCqD,IAAA,CAAC3E,MAAA;QACCiF,WAAA,EAAY;QACZ5D,SAAA,EAAW,GAAGC,SAAA,cAAuB;QACrC4D,QAAA,EAAU,CAACpD,UAAA;QACXqD,EAAA,EAAG;QACHC,IAAA,EAAK;QACLC,OAAA,EAASA,CAAA;UACP,IAAI3D,OAAA,EAAS;YACXG,MAAA,CAAOyD,eAAe,CAACtE,uCAAA,EAAyC;cAC9DuE,OAAA,EAAS;gBAAE7D;cAAQ;YACrB;UACF;QACF;QACA8D,KAAK;QACLC,OAAA,EAAShD,CAAA,CAAE;uBAEbkC,IAAA,CAAC3E,MAAA;QACCiF,WAAA,EAAY;QACZ5D,SAAA,EAAW,GAAGC,SAAA,gBAAyB;QACvC4D,QAAA,EAAU,CAACpD,UAAA;QACXsD,IAAA,EAAK;QACLC,OAAA,EAAUK,CAAA;UACRA,CAAA,CAAEC,cAAc;UAChBvB,kBAAA;QACF;QACAoB,KAAK;QACLC,OAAA,EAAShD,CAAA,CAAE;;QAKhB,CAAC,CAAChB,KAAA,iBAASkD,IAAA,CAACzB,cAAA;MAAe0C,MAAA,EAAQrB;;;AAG1C","ignoreList":[]}
@@ -0,0 +1,112 @@
1
+ @layer payload-default {
2
+ .LexicalEditorTheme__relationship {
3
+ --relationship-width: 15rem;
4
+ --relationship-max-width: 20rem;
5
+ display: flex;
6
+ width: var(--relationship-width);
7
+ max-width: var(--relationship-max-width);
8
+ padding: var(--spacer-2-5);
9
+ align-items: center;
10
+ gap: var(--spacer-2);
11
+ background: var(--color-bg);
12
+ border: 1px solid var(--color-border);
13
+ border-radius: var(--radius-medium);
14
+ font-family: var(--font-body);
15
+ margin-block: var(--spacer-2);
16
+ color: var(--color-text);
17
+
18
+ &:hover {
19
+ outline: var(--stroke-width-small) solid var(--color-border-selected);
20
+ outline-offset: calc(var(--stroke-width-small) * -1);
21
+ }
22
+ }
23
+
24
+ .LexicalEditorTheme__relationship--selected {
25
+ outline: var(--stroke-width-small) solid var(--color-border-selected);
26
+ outline-offset: calc(var(--stroke-width-small) * -1);
27
+ }
28
+
29
+ .LexicalEditorTheme__relationship__contents {
30
+ display: flex;
31
+ align-items: center;
32
+ gap: var(--spacer-2);
33
+ flex: 1 0 0;
34
+ justify-content: space-between;
35
+ min-width: 0;
36
+ }
37
+
38
+ .LexicalEditorTheme__relationship__wrap {
39
+ flex: 1 0 0;
40
+ min-width: 0;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .LexicalEditorTheme__relationship__label {
45
+ font-family: var(--text-body-small-font-family);
46
+ font-size: var(--text-body-small-font-size);
47
+ font-weight: var(--text-body-small-font-weight);
48
+ line-height: var(--text-body-small-line-height);
49
+ letter-spacing: var(--text-body-small-letter-spacing);
50
+ color: var(--color-text-secondary);
51
+ margin: 0;
52
+ white-space: nowrap;
53
+ text-overflow: ellipsis;
54
+ overflow: hidden;
55
+ }
56
+
57
+ .LexicalEditorTheme__relationship__title {
58
+ font-family: var(--text-body-medium-strong-font-family);
59
+ font-size: var(--text-body-medium-strong-font-size);
60
+ font-weight: var(--font-weight-strong);
61
+ line-height: var(--text-body-medium-strong-line-height);
62
+ letter-spacing: var(--text-body-medium-letter-spacing);
63
+ color: var(--color-text);
64
+ margin: 0;
65
+ white-space: nowrap;
66
+ text-overflow: ellipsis;
67
+ overflow: hidden;
68
+ }
69
+
70
+ .LexicalEditorTheme__relationship__doc-drawer-toggler {
71
+ text-decoration: none;
72
+ pointer-events: all;
73
+ display: block;
74
+ overflow: hidden;
75
+
76
+ & > * {
77
+ margin: 0;
78
+ }
79
+ }
80
+
81
+ .LexicalEditorTheme__relationship__swapButton.btn,
82
+ .LexicalEditorTheme__relationship__removeButton.btn {
83
+ margin: 0;
84
+ width: var(--spacer-4);
85
+ height: var(--spacer-4);
86
+ min-width: var(--spacer-4);
87
+ min-height: var(--spacer-4);
88
+ padding: 0;
89
+ }
90
+
91
+ .LexicalEditorTheme__relationship__doc-drawer-toggler,
92
+ .LexicalEditorTheme__relationship__swapButton {
93
+ &:disabled {
94
+ color: var(--color-text-disabled);
95
+ pointer-events: none;
96
+ }
97
+ }
98
+
99
+ .LexicalEditorTheme__relationship__actions {
100
+ display: flex;
101
+ align-items: center;
102
+ flex-shrink: 0;
103
+ gap: var(--spacer-2);
104
+ }
105
+
106
+ .LexicalEditorTheme__relationship__removeButton.btn {
107
+ &:disabled {
108
+ color: var(--color-text-disabled);
109
+ pointer-events: none;
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,87 @@
1
+ @layer payload-default {
2
+ .fixed-toolbar.fixed-toolbar--hide {
3
+ visibility: hidden;
4
+ pointer-events: none;
5
+ user-select: none;
6
+ }
7
+
8
+ .fixed-toolbar {
9
+ display: flex;
10
+ flex-wrap: wrap;
11
+ align-items: center;
12
+ padding: 0 var(--spacer-2);
13
+ gap: var(--spacer-2);
14
+ vertical-align: middle;
15
+ position: sticky;
16
+ z-index: 2;
17
+ top: var(--doc-controls-height);
18
+ border: var(--stroke-width-small) solid var(--lexical-border-color);
19
+ border-collapse: unset;
20
+ border-radius: var(--radius-medium) var(--radius-medium) 0 0;
21
+ transform: translateY(var(--stroke-width-small));
22
+
23
+ min-height: var(--spacer-6);
24
+
25
+ &:before,
26
+ &:after {
27
+ content: ' ';
28
+ position: absolute;
29
+ top: 0;
30
+ right: 0;
31
+ bottom: 0;
32
+ left: 0;
33
+ border-radius: inherit;
34
+ }
35
+
36
+ &:before {
37
+ background: var(--color-bg);
38
+ opacity: 0.75;
39
+ }
40
+
41
+ &:after {
42
+ backdrop-filter: blur(8px);
43
+ }
44
+
45
+ + .editor-container {
46
+ border-radius: 0 0 var(--radius-medium) var(--radius-medium) !important;
47
+
48
+ > .editor-scroller > .editor {
49
+ > .ContentEditable__root {
50
+ padding-top: var(--spacer-2);
51
+ }
52
+ }
53
+
54
+ > .editor-scroller > .editor > div > .LexicalEditorTheme__placeholder {
55
+ top: var(--spacer-4);
56
+ }
57
+ }
58
+ }
59
+
60
+ .fixed-toolbar__group {
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ align-items: center;
64
+ gap: var(--spacer-2);
65
+ align-self: stretch;
66
+ z-index: 1;
67
+
68
+ .divider {
69
+ width: var(--stroke-width-small);
70
+ align-self: stretch;
71
+ background-color: var(--lexical-border-color);
72
+ }
73
+ }
74
+
75
+ .rich-text-lexical--show-gutter {
76
+ .fixed-toolbar {
77
+ + .editor-container {
78
+ > .editor-scroller > .editor {
79
+ > .ContentEditable__root::before {
80
+ top: var(--spacer-4) !important;
81
+ height: calc(100% - var(--spacer-4) - 8px) !important;
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
@@ -1,5 +1,5 @@
1
1
  import type { PluginComponent } from '../../../../typesClient.js';
2
2
  import type { FixedToolbarFeatureProps } from '../../server/index.js';
3
- import './index.scss';
3
+ import './index.css';
4
4
  export declare const FixedToolbarPlugin: PluginComponent<FixedToolbarFeatureProps>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAMrE,OAAO,cAAc,CAAA;AA2PrB,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/features/toolbars/fixed/client/Toolbar/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAMrE,OAAO,aAAa,CAAA;AA2PpB,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}
@@ -11,6 +11,7 @@ import { useEditorConfigContext } from '../../../../../lexical/config/client/Edi
11
11
  import { ToolbarButton } from '../../../shared/ToolbarButton/index.js';
12
12
  import { ToolbarDropdown } from '../../../shared/ToolbarDropdown/index.js';
13
13
  import { useToolbarStates } from '../../../shared/useToolbarStates.js';
14
+ import './index.css';
14
15
  function ButtonGroupItem({
15
16
  active,
16
17
  anchorElem,