@payloadcms/richtext-lexical 3.0.0-alpha.60 → 3.0.0-alpha.62

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 (365) hide show
  1. package/dist/cell/index.js.map +1 -1
  2. package/dist/exports/components.js.map +1 -1
  3. package/dist/field/Field.js.map +1 -1
  4. package/dist/field/features/align/feature.client.js.map +1 -1
  5. package/dist/field/features/align/feature.server.js.map +1 -1
  6. package/dist/field/features/align/floatingSelectToolbarAlignDropdownSection.js.map +1 -1
  7. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  8. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  9. package/dist/field/features/blockquote/markdownTransformer.js.map +1 -1
  10. package/dist/field/features/blocks/component/BlockContent.js.map +1 -1
  11. package/dist/field/features/blocks/component/FormSavePlugin.js.map +1 -1
  12. package/dist/field/features/blocks/component/index.d.ts.map +1 -1
  13. package/dist/field/features/blocks/component/index.js +5 -2
  14. package/dist/field/features/blocks/component/index.js.map +1 -1
  15. package/dist/field/features/blocks/component/removeEmptyArrayValues.js.map +1 -1
  16. package/dist/field/features/blocks/drawer/index.js.map +1 -1
  17. package/dist/field/features/blocks/feature.client.js.map +1 -1
  18. package/dist/field/features/blocks/feature.server.d.ts +4 -3
  19. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  20. package/dist/field/features/blocks/feature.server.js +16 -30
  21. package/dist/field/features/blocks/feature.server.js.map +1 -1
  22. package/dist/field/features/blocks/nodes/BlocksNode.js.map +1 -1
  23. package/dist/field/features/blocks/plugin/commands.js.map +1 -1
  24. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  25. package/dist/field/features/blocks/populationPromise.js.map +1 -1
  26. package/dist/field/features/blocks/validate.js.map +1 -1
  27. package/dist/field/features/common/floatingSelectToolbarFeaturesButtonsSection/index.js.map +1 -1
  28. package/dist/field/features/common/floatingSelectToolbarTextDropdownSection/index.js.map +1 -1
  29. package/dist/field/features/converters/html/converter/converters/linebreak.js.map +1 -1
  30. package/dist/field/features/converters/html/converter/converters/paragraph.js.map +1 -1
  31. package/dist/field/features/converters/html/converter/converters/text.js.map +1 -1
  32. package/dist/field/features/converters/html/converter/defaultConverters.js.map +1 -1
  33. package/dist/field/features/converters/html/converter/index.d.ts.map +1 -1
  34. package/dist/field/features/converters/html/converter/index.js +22 -17
  35. package/dist/field/features/converters/html/converter/index.js.map +1 -1
  36. package/dist/field/features/converters/html/converter/types.js.map +1 -1
  37. package/dist/field/features/converters/html/feature.server.js.map +1 -1
  38. package/dist/field/features/converters/html/field/index.d.ts +8 -2
  39. package/dist/field/features/converters/html/field/index.d.ts.map +1 -1
  40. package/dist/field/features/converters/html/field/index.js +6 -3
  41. package/dist/field/features/converters/html/field/index.js.map +1 -1
  42. package/dist/field/features/createClientComponent.js.map +1 -1
  43. package/dist/field/features/createFeaturePropComponent.js.map +1 -1
  44. package/dist/field/features/debug/testrecorder/feature.client.js.map +1 -1
  45. package/dist/field/features/debug/testrecorder/feature.server.js.map +1 -1
  46. package/dist/field/features/debug/testrecorder/plugin/index.js.map +1 -1
  47. package/dist/field/features/debug/treeview/feature.client.js.map +1 -1
  48. package/dist/field/features/debug/treeview/feature.server.js.map +1 -1
  49. package/dist/field/features/debug/treeview/plugin/index.js.map +1 -1
  50. package/dist/field/features/format/bold/feature.client.js.map +1 -1
  51. package/dist/field/features/format/bold/feature.server.js.map +1 -1
  52. package/dist/field/features/format/bold/markdownTransformers.js.map +1 -1
  53. package/dist/field/features/format/common/floatingSelectToolbarSection.js.map +1 -1
  54. package/dist/field/features/format/inlinecode/feature.client.js.map +1 -1
  55. package/dist/field/features/format/inlinecode/feature.server.js.map +1 -1
  56. package/dist/field/features/format/inlinecode/markdownTransformers.js.map +1 -1
  57. package/dist/field/features/format/italic/feature.client.js.map +1 -1
  58. package/dist/field/features/format/italic/feature.server.js.map +1 -1
  59. package/dist/field/features/format/italic/markdownTransformers.js.map +1 -1
  60. package/dist/field/features/format/strikethrough/feature.client.js.map +1 -1
  61. package/dist/field/features/format/strikethrough/feature.server.js.map +1 -1
  62. package/dist/field/features/format/strikethrough/markdownTransformers.js.map +1 -1
  63. package/dist/field/features/format/subscript/feature.client.js.map +1 -1
  64. package/dist/field/features/format/subscript/feature.server.js.map +1 -1
  65. package/dist/field/features/format/superscript/feature.client.js.map +1 -1
  66. package/dist/field/features/format/superscript/feature.server.js.map +1 -1
  67. package/dist/field/features/format/underline/feature.client.js.map +1 -1
  68. package/dist/field/features/format/underline/feature.server.js.map +1 -1
  69. package/dist/field/features/heading/feature.client.js.map +1 -1
  70. package/dist/field/features/heading/feature.server.js.map +1 -1
  71. package/dist/field/features/heading/markdownTransformer.js.map +1 -1
  72. package/dist/field/features/horizontalrule/component/index.d.ts +10 -0
  73. package/dist/field/features/horizontalrule/component/index.d.ts.map +1 -0
  74. package/dist/field/features/horizontalrule/component/index.js +64 -0
  75. package/dist/field/features/horizontalrule/component/index.js.map +1 -0
  76. package/dist/field/features/horizontalrule/feature.client.d.ts +3 -0
  77. package/dist/field/features/horizontalrule/feature.client.d.ts.map +1 -0
  78. package/dist/field/features/horizontalrule/feature.client.js +53 -0
  79. package/dist/field/features/horizontalrule/feature.client.js.map +1 -0
  80. package/dist/field/features/horizontalrule/feature.server.d.ts +3 -0
  81. package/dist/field/features/horizontalrule/feature.server.d.ts.map +1 -0
  82. package/dist/field/features/horizontalrule/feature.server.js +36 -0
  83. package/dist/field/features/horizontalrule/feature.server.js.map +1 -0
  84. package/dist/field/features/horizontalrule/markdownTransformer.d.ts +3 -0
  85. package/dist/field/features/horizontalrule/markdownTransformer.d.ts.map +1 -0
  86. package/dist/field/features/horizontalrule/markdownTransformer.js +23 -0
  87. package/dist/field/features/horizontalrule/markdownTransformer.js.map +1 -0
  88. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts +55 -0
  89. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.d.ts.map +1 -0
  90. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js +89 -0
  91. package/dist/field/features/horizontalrule/nodes/HorizontalRuleNode.js.map +1 -0
  92. package/dist/field/features/horizontalrule/plugin/index.d.ts +6 -0
  93. package/dist/field/features/horizontalrule/plugin/index.d.ts.map +1 -0
  94. package/dist/field/features/horizontalrule/plugin/index.js +34 -0
  95. package/dist/field/features/horizontalrule/plugin/index.js.map +1 -0
  96. package/dist/field/features/horizontalrule/plugin/index.scss +20 -0
  97. package/dist/field/features/indent/feature.client.js.map +1 -1
  98. package/dist/field/features/indent/feature.server.js.map +1 -1
  99. package/dist/field/features/indent/floatingSelectToolbarIndentSection.js.map +1 -1
  100. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  101. package/dist/field/features/link/drawer/baseFields.js +8 -19
  102. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  103. package/dist/field/features/link/drawer/index.js +3 -2
  104. package/dist/field/features/link/drawer/index.js.map +1 -1
  105. package/dist/field/features/link/drawer/types.js.map +1 -1
  106. package/dist/field/features/link/feature.client.js.map +1 -1
  107. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  108. package/dist/field/features/link/feature.server.js +17 -10
  109. package/dist/field/features/link/feature.server.js.map +1 -1
  110. package/dist/field/features/link/nodes/AutoLinkNode.js.map +1 -1
  111. package/dist/field/features/link/nodes/LinkNode.js +2 -2
  112. package/dist/field/features/link/nodes/LinkNode.js.map +1 -1
  113. package/dist/field/features/link/nodes/types.js.map +1 -1
  114. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  115. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  116. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/commands.js.map +1 -1
  117. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  118. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +15 -6
  119. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  120. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  121. package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts +2 -0
  122. package/dist/field/features/link/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  123. package/dist/field/features/link/plugins/floatingLinkEditor/types.js.map +1 -1
  124. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  125. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +2 -1
  126. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  127. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  128. package/dist/field/features/link/populationPromise.js.map +1 -1
  129. package/dist/field/features/lists/checklist/feature.client.js.map +1 -1
  130. package/dist/field/features/lists/checklist/feature.server.js.map +1 -1
  131. package/dist/field/features/lists/checklist/markdownTransformers.js.map +1 -1
  132. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  133. package/dist/field/features/lists/common/markdown.js.map +1 -1
  134. package/dist/field/features/lists/htmlConverter.d.ts.map +1 -1
  135. package/dist/field/features/lists/htmlConverter.js +12 -4
  136. package/dist/field/features/lists/htmlConverter.js.map +1 -1
  137. package/dist/field/features/lists/orderedlist/feature.client.js.map +1 -1
  138. package/dist/field/features/lists/orderedlist/feature.server.js.map +1 -1
  139. package/dist/field/features/lists/orderedlist/markdownTransformer.js.map +1 -1
  140. package/dist/field/features/lists/plugin/index.js.map +1 -1
  141. package/dist/field/features/lists/unorderedlist/feature.client.js.map +1 -1
  142. package/dist/field/features/lists/unorderedlist/feature.server.js.map +1 -1
  143. package/dist/field/features/lists/unorderedlist/markdownTransformer.js.map +1 -1
  144. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/client.js.map +1 -1
  145. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/converter.js.map +1 -1
  146. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/heading/index.js.map +1 -1
  147. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/client.js.map +1 -1
  148. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/converter.js.map +1 -1
  149. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/link/index.js.map +1 -1
  150. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/client.js.map +1 -1
  151. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/converter.js.map +1 -1
  152. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/list/index.js.map +1 -1
  153. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/client.js.map +1 -1
  154. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/converter.js.map +1 -1
  155. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/listItem/index.js.map +1 -1
  156. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/client.js.map +1 -1
  157. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/converter.js.map +1 -1
  158. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/quote/index.js.map +1 -1
  159. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/client.js.map +1 -1
  160. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/converter.js.map +1 -1
  161. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/unknown/index.js.map +1 -1
  162. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/client.js.map +1 -1
  163. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/converter.js.map +1 -1
  164. package/dist/field/features/migrations/lexicalPluginToLexical/converter/converters/upload/index.js.map +1 -1
  165. package/dist/field/features/migrations/lexicalPluginToLexical/converter/defaultConverters.js.map +1 -1
  166. package/dist/field/features/migrations/lexicalPluginToLexical/converter/index.js.map +1 -1
  167. package/dist/field/features/migrations/lexicalPluginToLexical/converter/types.js.map +1 -1
  168. package/dist/field/features/migrations/lexicalPluginToLexical/feature.client.js.map +1 -1
  169. package/dist/field/features/migrations/lexicalPluginToLexical/feature.server.js.map +1 -1
  170. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  171. package/dist/field/features/migrations/lexicalPluginToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  172. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  173. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/converter.js.map +1 -1
  174. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  175. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/client.js.map +1 -1
  176. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/converter.js.map +1 -1
  177. package/dist/field/features/migrations/slateToLexical/converter/converters/heading/index.js.map +1 -1
  178. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/client.js.map +1 -1
  179. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/converter.js.map +1 -1
  180. package/dist/field/features/migrations/slateToLexical/converter/converters/indent/index.js.map +1 -1
  181. package/dist/field/features/migrations/slateToLexical/converter/converters/link/client.js.map +1 -1
  182. package/dist/field/features/migrations/slateToLexical/converter/converters/link/converter.js.map +1 -1
  183. package/dist/field/features/migrations/slateToLexical/converter/converters/link/index.js.map +1 -1
  184. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/client.js.map +1 -1
  185. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/converter.js.map +1 -1
  186. package/dist/field/features/migrations/slateToLexical/converter/converters/listItem/index.js.map +1 -1
  187. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/client.js.map +1 -1
  188. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/converter.js.map +1 -1
  189. package/dist/field/features/migrations/slateToLexical/converter/converters/orderedList/index.js.map +1 -1
  190. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/client.js.map +1 -1
  191. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/converter.js.map +1 -1
  192. package/dist/field/features/migrations/slateToLexical/converter/converters/relationship/index.js.map +1 -1
  193. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/client.js.map +1 -1
  194. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/converter.js.map +1 -1
  195. package/dist/field/features/migrations/slateToLexical/converter/converters/unknown/index.js.map +1 -1
  196. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/client.js.map +1 -1
  197. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/converter.js.map +1 -1
  198. package/dist/field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js.map +1 -1
  199. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/client.js.map +1 -1
  200. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/converter.js.map +1 -1
  201. package/dist/field/features/migrations/slateToLexical/converter/converters/upload/index.js.map +1 -1
  202. package/dist/field/features/migrations/slateToLexical/converter/defaultConverters.js.map +1 -1
  203. package/dist/field/features/migrations/slateToLexical/converter/index.js.map +1 -1
  204. package/dist/field/features/migrations/slateToLexical/converter/types.js.map +1 -1
  205. package/dist/field/features/migrations/slateToLexical/feature.client.js.map +1 -1
  206. package/dist/field/features/migrations/slateToLexical/feature.server.js.map +1 -1
  207. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/Component.js.map +1 -1
  208. package/dist/field/features/migrations/slateToLexical/nodes/unknownConvertedNode/index.js.map +1 -1
  209. package/dist/field/features/paragraph/feature.client.js.map +1 -1
  210. package/dist/field/features/paragraph/feature.server.js.map +1 -1
  211. package/dist/field/features/relationship/drawer/commands.js.map +1 -1
  212. package/dist/field/features/relationship/drawer/index.js.map +1 -1
  213. package/dist/field/features/relationship/feature.client.js.map +1 -1
  214. package/dist/field/features/relationship/feature.server.js.map +1 -1
  215. package/dist/field/features/relationship/nodes/RelationshipNode.js.map +1 -1
  216. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  217. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  218. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  219. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js +1 -1
  220. package/dist/field/features/relationship/utils/EnabledRelationshipsCondition.js.map +1 -1
  221. package/dist/field/features/types.d.ts +4 -3
  222. package/dist/field/features/types.d.ts.map +1 -1
  223. package/dist/field/features/types.js.map +1 -1
  224. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js +3 -2
  225. package/dist/field/features/upload/component/ExtraFieldsDrawer/index.js.map +1 -1
  226. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  227. package/dist/field/features/upload/component/index.js +2 -2
  228. package/dist/field/features/upload/component/index.js.map +1 -1
  229. package/dist/field/features/upload/drawer/commands.js.map +1 -1
  230. package/dist/field/features/upload/drawer/index.js.map +1 -1
  231. package/dist/field/features/upload/feature.client.js.map +1 -1
  232. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  233. package/dist/field/features/upload/feature.server.js +28 -9
  234. package/dist/field/features/upload/feature.server.js.map +1 -1
  235. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  236. package/dist/field/features/upload/plugin/index.js.map +1 -1
  237. package/dist/field/features/upload/populationPromise.js.map +1 -1
  238. package/dist/field/features/upload/validate.d.ts.map +1 -1
  239. package/dist/field/features/upload/validate.js +4 -6
  240. package/dist/field/features/upload/validate.js.map +1 -1
  241. package/dist/field/index.js.map +1 -1
  242. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  243. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  244. package/dist/field/lexical/LexicalProvider.js.map +1 -1
  245. package/dist/field/lexical/config/client/EditorConfigProvider.js.map +1 -1
  246. package/dist/field/lexical/config/client/default.js.map +1 -1
  247. package/dist/field/lexical/config/client/loader.js.map +1 -1
  248. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  249. package/dist/field/lexical/config/server/default.d.ts.map +1 -1
  250. package/dist/field/lexical/config/server/default.js +3 -1
  251. package/dist/field/lexical/config/server/default.js.map +1 -1
  252. package/dist/field/lexical/config/server/loader.js.map +1 -1
  253. package/dist/field/lexical/config/server/sanitize.js.map +1 -1
  254. package/dist/field/lexical/config/types.js.map +1 -1
  255. package/dist/field/lexical/nodes/index.js.map +1 -1
  256. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarButton/index.js.map +1 -1
  257. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/DropDown.js.map +1 -1
  258. package/dist/field/lexical/plugins/FloatingSelectToolbar/ToolbarDropdown/index.js.map +1 -1
  259. package/dist/field/lexical/plugins/FloatingSelectToolbar/index.js.map +1 -1
  260. package/dist/field/lexical/plugins/FloatingSelectToolbar/types.js.map +1 -1
  261. package/dist/field/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  262. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  263. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js.map +1 -1
  264. package/dist/field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  265. package/dist/field/lexical/plugins/SlashMenu/index.js.map +1 -1
  266. package/dist/field/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  267. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  268. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js +11 -6
  269. package/dist/field/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  270. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/debounce.js.map +1 -1
  271. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getBoundingRectWithoutTransform.js.map +1 -1
  272. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  273. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/highlightElemOriginalPosition.js.map +1 -1
  274. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  275. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +8 -3
  276. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  277. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  278. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts +9 -0
  279. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.d.ts.map +1 -0
  280. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js +35 -0
  281. package/dist/field/lexical/plugins/handles/utils/doesLineHeightAffectElement.js.map +1 -0
  282. package/dist/field/lexical/plugins/handles/utils/getCollapsedMargins.js.map +1 -1
  283. package/dist/field/lexical/plugins/handles/utils/getTopLevelNodeKeys.js.map +1 -1
  284. package/dist/field/lexical/plugins/handles/utils/isOnHandleElement.js.map +1 -1
  285. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts +1 -1
  286. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  287. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js +17 -7
  288. package/dist/field/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  289. package/dist/field/lexical/theme/EditorTheme.js.map +1 -1
  290. package/dist/field/lexical/theme/EditorTheme.scss +4 -0
  291. package/dist/field/lexical/ui/ContentEditable.js.map +1 -1
  292. package/dist/field/lexical/ui/icons/AI/index.js.map +1 -1
  293. package/dist/field/lexical/ui/icons/AlignCenter/index.js.map +1 -1
  294. package/dist/field/lexical/ui/icons/AlignJustify/index.js.map +1 -1
  295. package/dist/field/lexical/ui/icons/AlignLeft/index.js.map +1 -1
  296. package/dist/field/lexical/ui/icons/AlignRight/index.js.map +1 -1
  297. package/dist/field/lexical/ui/icons/Block/index.js.map +1 -1
  298. package/dist/field/lexical/ui/icons/Blockquote/index.js.map +1 -1
  299. package/dist/field/lexical/ui/icons/Bold/index.js.map +1 -1
  300. package/dist/field/lexical/ui/icons/Checklist/index.js.map +1 -1
  301. package/dist/field/lexical/ui/icons/Code/index.js.map +1 -1
  302. package/dist/field/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  303. package/dist/field/lexical/ui/icons/H1/index.js.map +1 -1
  304. package/dist/field/lexical/ui/icons/H2/index.js.map +1 -1
  305. package/dist/field/lexical/ui/icons/H3/index.js.map +1 -1
  306. package/dist/field/lexical/ui/icons/H4/index.js.map +1 -1
  307. package/dist/field/lexical/ui/icons/H5/index.js.map +1 -1
  308. package/dist/field/lexical/ui/icons/H6/index.js.map +1 -1
  309. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts +3 -0
  310. package/dist/field/lexical/ui/icons/HorizontalRule/index.d.ts.map +1 -0
  311. package/dist/field/lexical/ui/icons/HorizontalRule/index.js +19 -0
  312. package/dist/field/lexical/ui/icons/HorizontalRule/index.js.map +1 -0
  313. package/dist/field/lexical/ui/icons/IndentDecrease/index.js.map +1 -1
  314. package/dist/field/lexical/ui/icons/IndentIncrease/index.js.map +1 -1
  315. package/dist/field/lexical/ui/icons/Italic/index.js.map +1 -1
  316. package/dist/field/lexical/ui/icons/Link/index.js.map +1 -1
  317. package/dist/field/lexical/ui/icons/OrderedList/index.js.map +1 -1
  318. package/dist/field/lexical/ui/icons/Relationship/index.js.map +1 -1
  319. package/dist/field/lexical/ui/icons/Strikethrough/index.js.map +1 -1
  320. package/dist/field/lexical/ui/icons/Subscript/index.js.map +1 -1
  321. package/dist/field/lexical/ui/icons/Superscript/index.js.map +1 -1
  322. package/dist/field/lexical/ui/icons/Text/index.js.map +1 -1
  323. package/dist/field/lexical/ui/icons/Underline/index.js.map +1 -1
  324. package/dist/field/lexical/ui/icons/UnorderedList/index.js.map +1 -1
  325. package/dist/field/lexical/ui/icons/Upload/index.js.map +1 -1
  326. package/dist/field/lexical/utils/canUseDOM.js.map +1 -1
  327. package/dist/field/lexical/utils/cloneDeep.js.map +1 -1
  328. package/dist/field/lexical/utils/environment.js.map +1 -1
  329. package/dist/field/lexical/utils/getDOMRangeRect.js.map +1 -1
  330. package/dist/field/lexical/utils/getSelectedNode.js.map +1 -1
  331. package/dist/field/lexical/utils/guard.js.map +1 -1
  332. package/dist/field/lexical/utils/invariant.js.map +1 -1
  333. package/dist/field/lexical/utils/joinClasses.js.map +1 -1
  334. package/dist/field/lexical/utils/markdown/createBlockNode.js.map +1 -1
  335. package/dist/field/lexical/utils/nodeFormat.js.map +1 -1
  336. package/dist/field/lexical/utils/point.js.map +1 -1
  337. package/dist/field/lexical/utils/rect.js.map +1 -1
  338. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  339. package/dist/field/lexical/utils/setFloatingElemPositionForLinkEditor.js.map +1 -1
  340. package/dist/field/lexical/utils/swipe.js.map +1 -1
  341. package/dist/field/lexical/utils/url.js.map +1 -1
  342. package/dist/generateComponentMap.d.ts.map +1 -1
  343. package/dist/generateComponentMap.js +24 -18
  344. package/dist/generateComponentMap.js.map +1 -1
  345. package/dist/generateSchemaMap.d.ts.map +1 -1
  346. package/dist/generateSchemaMap.js +12 -10
  347. package/dist/generateSchemaMap.js.map +1 -1
  348. package/dist/index.d.ts +1 -1
  349. package/dist/index.d.ts.map +1 -1
  350. package/dist/index.js.map +1 -1
  351. package/dist/populate/defaultValue.js.map +1 -1
  352. package/dist/populate/populate.js.map +1 -1
  353. package/dist/populate/recurseNestedFields.js.map +1 -1
  354. package/dist/populate/richTextRelationshipPromise.js.map +1 -1
  355. package/dist/scss/app.scss +2 -3
  356. package/dist/scss/vars.scss +0 -7
  357. package/dist/types.js.map +1 -1
  358. package/dist/useLexicalFeature.js.map +1 -1
  359. package/dist/validate/index.js.map +1 -1
  360. package/dist/validate/validateNodes.js.map +1 -1
  361. package/package.json +14 -14
  362. package/src/index.ts +5 -1
  363. package/components.d.ts +0 -6
  364. package/components.js +0 -7
  365. package/dist/scss/fonts.scss +0 -75
@@ -0,0 +1,53 @@
1
+ 'use client';
2
+ import { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js';
3
+ import { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js';
4
+ import { createClientComponent } from '../createClientComponent.js';
5
+ import { MarkdownTransformer } from './markdownTransformer.js';
6
+ import { HorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND } from './nodes/HorizontalRuleNode.js';
7
+ import { HorizontalRulePlugin } from './plugin/index.js';
8
+ const HorizontalRuleFeatureClient = (props)=>{
9
+ return {
10
+ clientFeatureProps: props,
11
+ feature: ()=>({
12
+ clientFeatureProps: props,
13
+ markdownTransformers: [
14
+ MarkdownTransformer
15
+ ],
16
+ nodes: [
17
+ HorizontalRuleNode
18
+ ],
19
+ plugins: [
20
+ {
21
+ Component: HorizontalRulePlugin,
22
+ position: 'normal'
23
+ }
24
+ ],
25
+ slashMenu: {
26
+ options: [
27
+ {
28
+ displayName: 'Basic',
29
+ key: 'basic',
30
+ options: [
31
+ new SlashMenuOption(`horizontalrule`, {
32
+ Icon: HorizontalRuleIcon,
33
+ displayName: `Horizontal Rule`,
34
+ keywords: [
35
+ 'hr',
36
+ 'horizontal rule',
37
+ 'line',
38
+ 'separator'
39
+ ],
40
+ onSelect: ({ editor })=>{
41
+ editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined);
42
+ }
43
+ })
44
+ ]
45
+ }
46
+ ]
47
+ }
48
+ })
49
+ };
50
+ };
51
+ export const HorizontalRuleFeatureClientComponent = createClientComponent(HorizontalRuleFeatureClient);
52
+
53
+ //# sourceMappingURL=feature.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/field/features/horizontalrule/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { SlashMenuOption } from '../../lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nimport { HorizontalRuleIcon } from '../../lexical/ui/icons/HorizontalRule/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport { HorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND } from './nodes/HorizontalRuleNode.js'\nimport { HorizontalRulePlugin } from './plugin/index.js'\n\nconst HorizontalRuleFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n markdownTransformers: [MarkdownTransformer],\n nodes: [HorizontalRuleNode],\n plugins: [\n {\n Component: HorizontalRulePlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n options: [\n {\n displayName: 'Basic',\n key: 'basic',\n options: [\n new SlashMenuOption(`horizontalrule`, {\n Icon: HorizontalRuleIcon,\n displayName: `Horizontal Rule`,\n keywords: ['hr', 'horizontal rule', 'line', 'separator'],\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_HORIZONTAL_RULE_COMMAND, undefined)\n },\n }),\n ],\n },\n ],\n },\n }),\n }\n}\n\nexport const HorizontalRuleFeatureClientComponent = createClientComponent(\n HorizontalRuleFeatureClient,\n)\n"],"names":["SlashMenuOption","HorizontalRuleIcon","createClientComponent","MarkdownTransformer","HorizontalRuleNode","INSERT_HORIZONTAL_RULE_COMMAND","HorizontalRulePlugin","HorizontalRuleFeatureClient","props","clientFeatureProps","feature","markdownTransformers","nodes","plugins","Component","position","slashMenu","options","displayName","key","Icon","keywords","onSelect","editor","dispatchCommand","undefined","HorizontalRuleFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAIA,SAASA,eAAe,QAAQ,sEAAqE;AACrG,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SAASC,kBAAkB,EAAEC,8BAA8B,QAAQ,gCAA+B;AAClG,SAASC,oBAAoB,QAAQ,oBAAmB;AAExD,MAAMC,8BAAwE,CAACC;IAC7E,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,sBAAsB;oBAACR;iBAAoB;gBAC3CS,OAAO;oBAACR;iBAAmB;gBAC3BS,SAAS;oBACP;wBACEC,WAAWR;wBACXS,UAAU;oBACZ;iBACD;gBACDC,WAAW;oBACTC,SAAS;wBACP;4BACEC,aAAa;4BACbC,KAAK;4BACLF,SAAS;gCACP,IAAIjB,gBAAgB,CAAC,cAAc,CAAC,EAAE;oCACpCoB,MAAMnB;oCACNiB,aAAa,CAAC,eAAe,CAAC;oCAC9BG,UAAU;wCAAC;wCAAM;wCAAmB;wCAAQ;qCAAY;oCACxDC,UAAU,CAAC,EAAEC,MAAM,EAAE;wCACnBA,OAAOC,eAAe,CAACnB,gCAAgCoB;oCACzD;gCACF;6BACD;wBACH;qBACD;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,uCAAuCxB,sBAClDK,6BACD"}
@@ -0,0 +1,3 @@
1
+ import type { FeatureProviderProviderServer } from '../types.js';
2
+ export declare const HorizontalRuleFeature: FeatureProviderProviderServer<undefined, undefined>;
3
+ //# sourceMappingURL=feature.server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.server.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalrule/feature.server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAOhE,eAAO,MAAM,qBAAqB,EAAE,6BAA6B,CAAC,SAAS,EAAE,SAAS,CA4BrF,CAAA"}
@@ -0,0 +1,36 @@
1
+ import { HorizontalRuleFeatureClientComponent } from './feature.client.js';
2
+ import { MarkdownTransformer } from './markdownTransformer.js';
3
+ import { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js';
4
+ export const HorizontalRuleFeature = (props)=>{
5
+ return {
6
+ feature: ()=>{
7
+ return {
8
+ ClientComponent: HorizontalRuleFeatureClientComponent,
9
+ clientFeatureProps: null,
10
+ markdownTransformers: [
11
+ MarkdownTransformer
12
+ ],
13
+ nodes: [
14
+ {
15
+ converters: {
16
+ html: {
17
+ converter: ()=>{
18
+ return `<hr/>`;
19
+ },
20
+ nodeTypes: [
21
+ HorizontalRuleNode.getType()
22
+ ]
23
+ }
24
+ },
25
+ node: HorizontalRuleNode
26
+ }
27
+ ],
28
+ serverFeatureProps: props
29
+ };
30
+ },
31
+ key: 'horizontalrule',
32
+ serverFeatureProps: props
33
+ };
34
+ };
35
+
36
+ //# sourceMappingURL=feature.server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/field/features/horizontalrule/feature.server.ts"],"sourcesContent":["import type { HTMLConverter } from '../converters/html/converter/types.js'\nimport type { FeatureProviderProviderServer } from '../types.js'\nimport type { SerializedHorizontalRuleNode } from './nodes/HorizontalRuleNode.js'\n\nimport { HorizontalRuleFeatureClientComponent } from './feature.client.js'\nimport { MarkdownTransformer } from './markdownTransformer.js'\nimport { HorizontalRuleNode } from './nodes/HorizontalRuleNode.js'\n\nexport const HorizontalRuleFeature: FeatureProviderProviderServer<undefined, undefined> = (\n props,\n) => {\n return {\n feature: () => {\n return {\n ClientComponent: HorizontalRuleFeatureClientComponent,\n clientFeatureProps: null,\n markdownTransformers: [MarkdownTransformer],\n nodes: [\n {\n converters: {\n html: {\n converter: () => {\n return `<hr/>`\n },\n nodeTypes: [HorizontalRuleNode.getType()],\n } as HTMLConverter<SerializedHorizontalRuleNode>,\n },\n node: HorizontalRuleNode,\n },\n ],\n serverFeatureProps: props,\n }\n },\n key: 'horizontalrule',\n serverFeatureProps: props,\n }\n}\n"],"names":["HorizontalRuleFeatureClientComponent","MarkdownTransformer","HorizontalRuleNode","HorizontalRuleFeature","props","feature","ClientComponent","clientFeatureProps","markdownTransformers","nodes","converters","html","converter","nodeTypes","getType","node","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAASA,oCAAoC,QAAQ,sBAAqB;AAC1E,SAASC,mBAAmB,QAAQ,2BAA0B;AAC9D,SAASC,kBAAkB,QAAQ,gCAA+B;AAElE,OAAO,MAAMC,wBAA6E,CACxFC;IAEA,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBN;gBACjBO,oBAAoB;gBACpBC,sBAAsB;oBAACP;iBAAoB;gBAC3CQ,OAAO;oBACL;wBACEC,YAAY;4BACVC,MAAM;gCACJC,WAAW;oCACT,OAAO,CAAC,KAAK,CAAC;gCAChB;gCACAC,WAAW;oCAACX,mBAAmBY,OAAO;iCAAG;4BAC3C;wBACF;wBACAC,MAAMb;oBACR;iBACD;gBACDc,oBAAoBZ;YACtB;QACF;QACAa,KAAK;QACLD,oBAAoBZ;IACtB;AACF,EAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ElementTransformer } from '@lexical/markdown';
2
+ export declare const MarkdownTransformer: ElementTransformer;
3
+ //# sourceMappingURL=markdownTransformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../src/field/features/horizontalrule/markdownTransformer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAQ3D,eAAO,MAAM,mBAAmB,EAAE,kBAiBjC,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { $createHorizontalRuleNode, $isHorizontalRuleNode, HorizontalRuleNode } from './nodes/HorizontalRuleNode.js';
2
+ export const MarkdownTransformer = {
3
+ type: 'element',
4
+ dependencies: [
5
+ HorizontalRuleNode
6
+ ],
7
+ export: (node, exportChildren)=>{
8
+ if (!$isHorizontalRuleNode(node)) {
9
+ return null;
10
+ }
11
+ return '---';
12
+ },
13
+ // match ---
14
+ regExp: /^---\s*$/,
15
+ replace: (parentNode)=>{
16
+ const node = $createHorizontalRuleNode();
17
+ if (node) {
18
+ parentNode.replace(node);
19
+ }
20
+ }
21
+ };
22
+
23
+ //# sourceMappingURL=markdownTransformer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/field/features/horizontalrule/markdownTransformer.ts"],"sourcesContent":["import type { ElementTransformer } from '@lexical/markdown'\n\nimport {\n $createHorizontalRuleNode,\n $isHorizontalRuleNode,\n HorizontalRuleNode,\n} from './nodes/HorizontalRuleNode.js'\n\nexport const MarkdownTransformer: ElementTransformer = {\n type: 'element',\n dependencies: [HorizontalRuleNode],\n export: (node, exportChildren) => {\n if (!$isHorizontalRuleNode(node)) {\n return null\n }\n return '---'\n },\n // match ---\n regExp: /^---\\s*$/,\n replace: (parentNode) => {\n const node = $createHorizontalRuleNode()\n if (node) {\n parentNode.replace(node)\n }\n },\n}\n"],"names":["$createHorizontalRuleNode","$isHorizontalRuleNode","HorizontalRuleNode","MarkdownTransformer","type","dependencies","export","node","exportChildren","regExp","replace","parentNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,SACEA,yBAAyB,EACzBC,qBAAqB,EACrBC,kBAAkB,QACb,gCAA+B;AAEtC,OAAO,MAAMC,sBAA0C;IACrDC,MAAM;IACNC,cAAc;QAACH;KAAmB;IAClCI,QAAQ,CAACC,MAAMC;QACb,IAAI,CAACP,sBAAsBM,OAAO;YAChC,OAAO;QACT;QACA,OAAO;IACT;IACA,YAAY;IACZE,QAAQ;IACRC,SAAS,CAACC;QACR,MAAMJ,OAAOP;QACb,IAAIO,MAAM;YACRI,WAAWD,OAAO,CAACH;QACrB;IACF;AACF,EAAC"}
@@ -0,0 +1,55 @@
1
+ import type { DOMConversionMap, DOMExportOutput, LexicalCommand, LexicalNode, SerializedLexicalNode } from 'lexical';
2
+ import lexicalImport from 'lexical';
3
+ declare const DecoratorNode: typeof lexicalImport.DecoratorNode;
4
+ import * as React from 'react';
5
+ /**
6
+ * Serialized representation of a horizontal rule node. Serialized = converted to JSON. This is what is stored in the database / in the lexical editor state.
7
+ */
8
+ export type SerializedHorizontalRuleNode = SerializedLexicalNode;
9
+ export declare const INSERT_HORIZONTAL_RULE_COMMAND: LexicalCommand<void>;
10
+ /**
11
+ * This node is a DecoratorNode. DecoratorNodes allow you to render React components in the editor.
12
+ *
13
+ * They need both createDom and decorate functions. createDom => outside of the html. decorate => React Component inside of the html.
14
+ *
15
+ * If we used DecoratorBlockNode instead, we would only need a decorate method
16
+ */
17
+ export declare class HorizontalRuleNode extends DecoratorNode<React.ReactElement> {
18
+ static clone(node: HorizontalRuleNode): HorizontalRuleNode;
19
+ static getType(): string;
20
+ /**
21
+ * Defines what happens if you copy an hr element from another page and paste it into the lexical editor
22
+ *
23
+ * This also determines the behavior of lexical's internal HTML -> Lexical converter
24
+ */
25
+ static importDOM(): DOMConversionMap | null;
26
+ /**
27
+ * The data for this node is stored serialized as JSON. This is the "load function" of that node: it takes the saved data and converts it into a node.
28
+ */
29
+ static importJSON(serializedNode: SerializedHorizontalRuleNode): HorizontalRuleNode;
30
+ /**
31
+ * Determines how the hr element is rendered in the lexical editor. This is only the "initial" / "outer" HTML element.
32
+ */
33
+ createDOM(): HTMLElement;
34
+ /**
35
+ * Allows you to render a React component within whatever createDOM returns.
36
+ */
37
+ decorate(): React.ReactElement;
38
+ /**
39
+ * Opposite of importDOM, this function defines what happens when you copy an hr element from the lexical editor and paste it into another page.
40
+ *
41
+ * This also determines the behavior of lexical's internal Lexical -> HTML converter
42
+ */
43
+ exportDOM(): DOMExportOutput;
44
+ /**
45
+ * Opposite of importJSON. This determines what data is saved in the database / in the lexical editor state.
46
+ */
47
+ exportJSON(): SerializedLexicalNode;
48
+ getTextContent(): string;
49
+ isInline(): false;
50
+ updateDOM(): boolean;
51
+ }
52
+ export declare function $createHorizontalRuleNode(): HorizontalRuleNode;
53
+ export declare function $isHorizontalRuleNode(node: LexicalNode | null | undefined): node is HorizontalRuleNode;
54
+ export {};
55
+ //# sourceMappingURL=HorizontalRuleNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalRuleNode.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/horizontalrule/nodes/HorizontalRuleNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAEhB,eAAe,EACf,cAAc,EACd,WAAW,EACX,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB,OAAO,aAAa,MAAM,SAAS,CAAA;AACnC,QAAA,MAA+B,aAAa,oCAAiC,CAAA;AAC7E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,qBAAqB,CAAA;AAEhE,eAAO,MAAM,8BAA8B,EAAE,cAAc,CAAC,IAAI,CAE/D,CAAA;AAED;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;IACvE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB;IAI1D,MAAM,CAAC,OAAO,IAAI,MAAM;IAIxB;;;;OAIG;IACH,MAAM,CAAC,SAAS,IAAI,gBAAgB,GAAG,IAAI;IAS3C;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,4BAA4B,GAAG,kBAAkB;IAInF;;OAEG;IACH,SAAS,IAAI,WAAW;IAIxB;;OAEG;IACH,QAAQ,IAAI,KAAK,CAAC,YAAY;IAI9B;;;;OAIG;IACH,SAAS,IAAI,eAAe;IAG5B;;OAEG;IACH,UAAU,IAAI,qBAAqB;IAOnC,cAAc,IAAI,MAAM;IAIxB,QAAQ,IAAI,KAAK;IAIjB,SAAS,IAAI,OAAO;CAGrB;AAMD,wBAAgB,yBAAyB,IAAI,kBAAkB,CAE9D;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,IAAI,kBAAkB,CAE5B"}
@@ -0,0 +1,89 @@
1
+ import lexicalImport from 'lexical';
2
+ const { $applyNodeReplacement, DecoratorNode, createCommand } = lexicalImport;
3
+ import * as React from 'react';
4
+ const HorizontalRuleComponent = /*#__PURE__*/ React.lazy(()=>import('../component/index.js').then((module)=>({
5
+ default: module.HorizontalRuleComponent
6
+ })));
7
+ export const INSERT_HORIZONTAL_RULE_COMMAND = createCommand('INSERT_HORIZONTAL_RULE_COMMAND');
8
+ /**
9
+ * This node is a DecoratorNode. DecoratorNodes allow you to render React components in the editor.
10
+ *
11
+ * They need both createDom and decorate functions. createDom => outside of the html. decorate => React Component inside of the html.
12
+ *
13
+ * If we used DecoratorBlockNode instead, we would only need a decorate method
14
+ */ export class HorizontalRuleNode extends DecoratorNode {
15
+ static clone(node) {
16
+ return new HorizontalRuleNode(node.__key);
17
+ }
18
+ static getType() {
19
+ return 'horizontalrule';
20
+ }
21
+ /**
22
+ * Defines what happens if you copy an hr element from another page and paste it into the lexical editor
23
+ *
24
+ * This also determines the behavior of lexical's internal HTML -> Lexical converter
25
+ */ static importDOM() {
26
+ return {
27
+ hr: ()=>({
28
+ conversion: convertHorizontalRuleElement,
29
+ priority: 0
30
+ })
31
+ };
32
+ }
33
+ /**
34
+ * The data for this node is stored serialized as JSON. This is the "load function" of that node: it takes the saved data and converts it into a node.
35
+ */ static importJSON(serializedNode) {
36
+ return $createHorizontalRuleNode();
37
+ }
38
+ /**
39
+ * Determines how the hr element is rendered in the lexical editor. This is only the "initial" / "outer" HTML element.
40
+ */ createDOM() {
41
+ return document.createElement('hr');
42
+ }
43
+ /**
44
+ * Allows you to render a React component within whatever createDOM returns.
45
+ */ decorate() {
46
+ return /*#__PURE__*/ React.createElement(HorizontalRuleComponent, {
47
+ nodeKey: this.__key
48
+ });
49
+ }
50
+ /**
51
+ * Opposite of importDOM, this function defines what happens when you copy an hr element from the lexical editor and paste it into another page.
52
+ *
53
+ * This also determines the behavior of lexical's internal Lexical -> HTML converter
54
+ */ exportDOM() {
55
+ return {
56
+ element: document.createElement('hr')
57
+ };
58
+ }
59
+ /**
60
+ * Opposite of importJSON. This determines what data is saved in the database / in the lexical editor state.
61
+ */ exportJSON() {
62
+ return {
63
+ type: 'horizontalrule',
64
+ version: 1
65
+ };
66
+ }
67
+ getTextContent() {
68
+ return '\n';
69
+ }
70
+ isInline() {
71
+ return false;
72
+ }
73
+ updateDOM() {
74
+ return false;
75
+ }
76
+ }
77
+ function convertHorizontalRuleElement() {
78
+ return {
79
+ node: $createHorizontalRuleNode()
80
+ };
81
+ }
82
+ export function $createHorizontalRuleNode() {
83
+ return $applyNodeReplacement(new HorizontalRuleNode());
84
+ }
85
+ export function $isHorizontalRuleNode(node) {
86
+ return node instanceof HorizontalRuleNode;
87
+ }
88
+
89
+ //# sourceMappingURL=HorizontalRuleNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/horizontalrule/nodes/HorizontalRuleNode.tsx"],"sourcesContent":["import type {\n DOMConversionMap,\n DOMConversionOutput,\n DOMExportOutput,\n LexicalCommand,\n LexicalNode,\n SerializedLexicalNode,\n} from 'lexical'\n\nimport lexicalImport from 'lexical'\nconst { $applyNodeReplacement, DecoratorNode, createCommand } = lexicalImport\nimport * as React from 'react'\n\nconst HorizontalRuleComponent = React.lazy(() =>\n import('../component/index.js').then((module) => ({\n default: module.HorizontalRuleComponent,\n })),\n)\n\n/**\n * Serialized representation of a horizontal rule node. Serialized = converted to JSON. This is what is stored in the database / in the lexical editor state.\n */\nexport type SerializedHorizontalRuleNode = SerializedLexicalNode\n\nexport const INSERT_HORIZONTAL_RULE_COMMAND: LexicalCommand<void> = createCommand(\n 'INSERT_HORIZONTAL_RULE_COMMAND',\n)\n\n/**\n * This node is a DecoratorNode. DecoratorNodes allow you to render React components in the editor.\n *\n * They need both createDom and decorate functions. createDom => outside of the html. decorate => React Component inside of the html.\n *\n * If we used DecoratorBlockNode instead, we would only need a decorate method\n */\nexport class HorizontalRuleNode extends DecoratorNode<React.ReactElement> {\n static clone(node: HorizontalRuleNode): HorizontalRuleNode {\n return new HorizontalRuleNode(node.__key)\n }\n\n static getType(): string {\n return 'horizontalrule'\n }\n\n /**\n * Defines what happens if you copy an hr element from another page and paste it into the lexical editor\n *\n * This also determines the behavior of lexical's internal HTML -> Lexical converter\n */\n static importDOM(): DOMConversionMap | null {\n return {\n hr: () => ({\n conversion: convertHorizontalRuleElement,\n priority: 0,\n }),\n }\n }\n\n /**\n * The data for this node is stored serialized as JSON. This is the \"load function\" of that node: it takes the saved data and converts it into a node.\n */\n static importJSON(serializedNode: SerializedHorizontalRuleNode): HorizontalRuleNode {\n return $createHorizontalRuleNode()\n }\n\n /**\n * Determines how the hr element is rendered in the lexical editor. This is only the \"initial\" / \"outer\" HTML element.\n */\n createDOM(): HTMLElement {\n return document.createElement('hr')\n }\n\n /**\n * Allows you to render a React component within whatever createDOM returns.\n */\n decorate(): React.ReactElement {\n return <HorizontalRuleComponent nodeKey={this.__key} />\n }\n\n /**\n * Opposite of importDOM, this function defines what happens when you copy an hr element from the lexical editor and paste it into another page.\n *\n * This also determines the behavior of lexical's internal Lexical -> HTML converter\n */\n exportDOM(): DOMExportOutput {\n return { element: document.createElement('hr') }\n }\n /**\n * Opposite of importJSON. This determines what data is saved in the database / in the lexical editor state.\n */\n exportJSON(): SerializedLexicalNode {\n return {\n type: 'horizontalrule',\n version: 1,\n }\n }\n\n getTextContent(): string {\n return '\\n'\n }\n\n isInline(): false {\n return false\n }\n\n updateDOM(): boolean {\n return false\n }\n}\n\nfunction convertHorizontalRuleElement(): DOMConversionOutput {\n return { node: $createHorizontalRuleNode() }\n}\n\nexport function $createHorizontalRuleNode(): HorizontalRuleNode {\n return $applyNodeReplacement(new HorizontalRuleNode())\n}\n\nexport function $isHorizontalRuleNode(\n node: LexicalNode | null | undefined,\n): node is HorizontalRuleNode {\n return node instanceof HorizontalRuleNode\n}\n"],"names":["lexicalImport","$applyNodeReplacement","DecoratorNode","createCommand","React","HorizontalRuleComponent","lazy","then","module","default","INSERT_HORIZONTAL_RULE_COMMAND","HorizontalRuleNode","clone","node","__key","getType","importDOM","hr","conversion","convertHorizontalRuleElement","priority","importJSON","serializedNode","$createHorizontalRuleNode","createDOM","document","createElement","decorate","nodeKey","exportDOM","element","exportJSON","type","version","getTextContent","isInline","updateDOM","$isHorizontalRuleNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AASA,OAAOA,mBAAmB,UAAS;AACnC,MAAM,EAAEC,qBAAqB,EAAEC,aAAa,EAAEC,aAAa,EAAE,GAAGH;AAChE,YAAYI,WAAW,QAAO;AAE9B,MAAMC,wCAA0BD,MAAME,IAAI,CAAC,IACzC,MAAM,CAAC,yBAAyBC,IAAI,CAAC,CAACC,SAAY,CAAA;YAChDC,SAASD,OAAOH,uBAAuB;QACzC,CAAA;AAQF,OAAO,MAAMK,iCAAuDP,cAClE,kCACD;AAED;;;;;;CAMC,GACD,OAAO,MAAMQ,2BAA2BT;IACtC,OAAOU,MAAMC,IAAwB,EAAsB;QACzD,OAAO,IAAIF,mBAAmBE,KAAKC,KAAK;IAC1C;IAEA,OAAOC,UAAkB;QACvB,OAAO;IACT;IAEA;;;;GAIC,GACD,OAAOC,YAAqC;QAC1C,OAAO;YACLC,IAAI,IAAO,CAAA;oBACTC,YAAYC;oBACZC,UAAU;gBACZ,CAAA;QACF;IACF;IAEA;;GAEC,GACD,OAAOC,WAAWC,cAA4C,EAAsB;QAClF,OAAOC;IACT;IAEA;;GAEC,GACDC,YAAyB;QACvB,OAAOC,SAASC,aAAa,CAAC;IAChC;IAEA;;GAEC,GACDC,WAA+B;QAC7B,qBAAO,oBAACtB;YAAwBuB,SAAS,IAAI,CAACd,KAAK;;IACrD;IAEA;;;;GAIC,GACDe,YAA6B;QAC3B,OAAO;YAAEC,SAASL,SAASC,aAAa,CAAC;QAAM;IACjD;IACA;;GAEC,GACDK,aAAoC;QAClC,OAAO;YACLC,MAAM;YACNC,SAAS;QACX;IACF;IAEAC,iBAAyB;QACvB,OAAO;IACT;IAEAC,WAAkB;QAChB,OAAO;IACT;IAEAC,YAAqB;QACnB,OAAO;IACT;AACF;AAEA,SAASjB;IACP,OAAO;QAAEN,MAAMU;IAA4B;AAC7C;AAEA,OAAO,SAASA;IACd,OAAOtB,sBAAsB,IAAIU;AACnC;AAEA,OAAO,SAAS0B,sBACdxB,IAAoC;IAEpC,OAAOA,gBAAgBF;AACzB"}
@@ -0,0 +1,6 @@
1
+ import './index.scss';
2
+ /**
3
+ * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.
4
+ */
5
+ export declare function HorizontalRulePlugin(): null;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/horizontalrule/plugin/index.tsx"],"names":[],"mappings":"AAeA,OAAO,cAAc,CAAA;AAErB;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CA2B3C"}
@@ -0,0 +1,34 @@
1
+ 'use client';
2
+ import lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js';
3
+ const { useLexicalComposerContext } = lexicalComposerContextImport;
4
+ import lexicalUtilsImport from '@lexical/utils';
5
+ const { $insertNodeToNearestRoot } = lexicalUtilsImport;
6
+ import lexicalImport from 'lexical';
7
+ const { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } = lexicalImport;
8
+ import { useEffect } from 'react';
9
+ import { $createHorizontalRuleNode, INSERT_HORIZONTAL_RULE_COMMAND } from '../nodes/HorizontalRuleNode.js';
10
+ import './index.scss';
11
+ /**
12
+ * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.
13
+ */ export function HorizontalRulePlugin() {
14
+ const [editor] = useLexicalComposerContext();
15
+ useEffect(()=>{
16
+ return editor.registerCommand(INSERT_HORIZONTAL_RULE_COMMAND, (type)=>{
17
+ const selection = $getSelection();
18
+ if (!$isRangeSelection(selection)) {
19
+ return false;
20
+ }
21
+ const focusNode = selection.focus.getNode();
22
+ if (focusNode !== null) {
23
+ const horizontalRuleNode = $createHorizontalRuleNode();
24
+ $insertNodeToNearestRoot(horizontalRuleNode);
25
+ }
26
+ return true;
27
+ }, COMMAND_PRIORITY_EDITOR);
28
+ }, [
29
+ editor
30
+ ]);
31
+ return null;
32
+ }
33
+
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/field/features/horizontalrule/plugin/index.tsx"],"sourcesContent":["'use client'\n\nimport lexicalComposerContextImport from '@lexical/react/LexicalComposerContext.js'\nconst { useLexicalComposerContext } = lexicalComposerContextImport\nimport lexicalUtilsImport from '@lexical/utils'\nconst { $insertNodeToNearestRoot } = lexicalUtilsImport\n\nimport lexicalImport from 'lexical'\nconst { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } = lexicalImport\nimport { useEffect } from 'react'\n\nimport {\n $createHorizontalRuleNode,\n INSERT_HORIZONTAL_RULE_COMMAND,\n} from '../nodes/HorizontalRuleNode.js'\nimport './index.scss'\n\n/**\n * Registers the INSERT_HORIZONTAL_RULE_COMMAND lexical command and defines the behavior for when it is called.\n */\nexport function HorizontalRulePlugin(): null {\n const [editor] = useLexicalComposerContext()\n\n useEffect(() => {\n return editor.registerCommand(\n INSERT_HORIZONTAL_RULE_COMMAND,\n (type) => {\n const selection = $getSelection()\n\n if (!$isRangeSelection(selection)) {\n return false\n }\n\n const focusNode = selection.focus.getNode()\n\n if (focusNode !== null) {\n const horizontalRuleNode = $createHorizontalRuleNode()\n $insertNodeToNearestRoot(horizontalRuleNode)\n }\n\n return true\n },\n COMMAND_PRIORITY_EDITOR,\n )\n }, [editor])\n\n return null\n}\n"],"names":["lexicalComposerContextImport","useLexicalComposerContext","lexicalUtilsImport","$insertNodeToNearestRoot","lexicalImport","$getSelection","$isRangeSelection","COMMAND_PRIORITY_EDITOR","useEffect","$createHorizontalRuleNode","INSERT_HORIZONTAL_RULE_COMMAND","HorizontalRulePlugin","editor","registerCommand","type","selection","focusNode","focus","getNode","horizontalRuleNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,OAAOA,kCAAkC,2CAA0C;AACnF,MAAM,EAAEC,yBAAyB,EAAE,GAAGD;AACtC,OAAOE,wBAAwB,iBAAgB;AAC/C,MAAM,EAAEC,wBAAwB,EAAE,GAAGD;AAErC,OAAOE,mBAAmB,UAAS;AACnC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,uBAAuB,EAAE,GAAGH;AACtE,SAASI,SAAS,QAAQ,QAAO;AAEjC,SACEC,yBAAyB,EACzBC,8BAA8B,QACzB,iCAAgC;AACvC,OAAO,eAAc;AAErB;;CAEC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAO,GAAGX;IAEjBO,UAAU;QACR,OAAOI,OAAOC,eAAe,CAC3BH,gCACA,CAACI;YACC,MAAMC,YAAYV;YAElB,IAAI,CAACC,kBAAkBS,YAAY;gBACjC,OAAO;YACT;YAEA,MAAMC,YAAYD,UAAUE,KAAK,CAACC,OAAO;YAEzC,IAAIF,cAAc,MAAM;gBACtB,MAAMG,qBAAqBV;gBAC3BN,yBAAyBgB;YAC3B;YAEA,OAAO;QACT,GACAZ;IAEJ,GAAG;QAACK;KAAO;IAEX,OAAO;AACT"}
@@ -0,0 +1,20 @@
1
+ @import '../../../../scss/styles.scss';
2
+
3
+ hr {
4
+ padding: 2px 2px;
5
+ border: none;
6
+ margin: 1rem 0;
7
+ cursor: pointer;
8
+ }
9
+
10
+ hr:after {
11
+ content: '';
12
+ display: block;
13
+ height: 2px;
14
+ background-color: var(--theme-elevation-250);
15
+ }
16
+
17
+ hr.selected {
18
+ outline: 2px solid var(--theme-success-500);
19
+ user-select: none;
20
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/indent/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport lexicalImport from 'lexical'\nconst { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } = lexicalImport\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { IndentSectionWithEntries } from './floatingSelectToolbarIndentSection.js'\n\nconst IndentFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n IndentSectionWithEntries([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() &&\n '__indent' in node.getParent() &&\n node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indent-decrease',\n label: `Decrease Indent`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n ]),\n IndentSectionWithEntries([\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indent-increase',\n label: `Increase Indent`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const IndentFeatureClientComponent = createClientComponent(IndentFeatureClient)\n"],"names":["lexicalImport","INDENT_CONTENT_COMMAND","OUTDENT_CONTENT_COMMAND","IndentDecreaseIcon","IndentIncreaseIcon","createClientComponent","IndentSectionWithEntries","IndentFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","isEnabled","selection","getNodes","length","node","__indent","getParent","key","label","onClick","editor","dispatchCommand","undefined","order","IndentFeatureClientComponent"],"mappings":"AAAA;AAEA,OAAOA,mBAAmB,UAAS;AACnC,MAAM,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAE,GAAGF;AAI5D,SAASG,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,wBAAwB,QAAQ,0CAAyC;AAElF,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRN,yBAAyB;4BACvB;gCACEO,gBAAgBV;gCAChBW,UAAU,IAAM;gCAChBC,WAAW,CAAC,EAAEC,SAAS,EAAE;oCACvB,IAAI,CAACA,aAAa,CAACA,WAAWC,YAAYC,QAAQ;wCAChD,OAAO;oCACT;oCACA,KAAK,MAAMC,QAAQH,UAAUC,QAAQ,GAAI;wCACvC,0DAA0D;wCAC1D,IACE,AAAC,cAAcE,QAAQ,AAACA,KAAKC,QAAQ,GAAc,KAClDD,KAAKE,SAAS,MACb,cAAcF,KAAKE,SAAS,MAC5BF,KAAKE,SAAS,GAAGD,QAAQ,GAAG,GAC9B;4CACA,OAAO;wCACT;oCACF;oCACA,OAAO;gCACT;gCACAE,KAAK;gCACLC,OAAO,CAAC,eAAe,CAAC;gCACxBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACxB,yBAAyByB;gCAClD;gCACAC,OAAO;4BACT;yBACD;wBACDtB,yBAAyB;4BACvB;gCACEO,gBAAgBT;gCAChBU,UAAU,IAAM;gCAChBQ,KAAK;gCACLC,OAAO,CAAC,eAAe,CAAC;gCACxBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACzB,wBAAwB0B;gCACjD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+BxB,sBAAsBE,qBAAoB"}
1
+ {"version":3,"sources":["../../../../src/field/features/indent/feature.client.tsx"],"sourcesContent":["'use client'\n\nimport lexicalImport from 'lexical'\nconst { INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND } = lexicalImport\n\nimport type { FeatureProviderProviderClient } from '../types.js'\n\nimport { IndentDecreaseIcon } from '../../lexical/ui/icons/IndentDecrease/index.js'\nimport { IndentIncreaseIcon } from '../../lexical/ui/icons/IndentIncrease/index.js'\nimport { createClientComponent } from '../createClientComponent.js'\nimport { IndentSectionWithEntries } from './floatingSelectToolbarIndentSection.js'\n\nconst IndentFeatureClient: FeatureProviderProviderClient<undefined> = (props) => {\n return {\n clientFeatureProps: props,\n feature: () => ({\n clientFeatureProps: props,\n floatingSelectToolbar: {\n sections: [\n IndentSectionWithEntries([\n {\n ChildComponent: IndentDecreaseIcon,\n isActive: () => false,\n isEnabled: ({ selection }) => {\n if (!selection || !selection?.getNodes()?.length) {\n return false\n }\n for (const node of selection.getNodes()) {\n // If at least one node is indented, this should be active\n if (\n ('__indent' in node && (node.__indent as number) > 0) ||\n (node.getParent() &&\n '__indent' in node.getParent() &&\n node.getParent().__indent > 0)\n ) {\n return true\n }\n }\n return false\n },\n key: 'indent-decrease',\n label: `Decrease Indent`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, undefined)\n },\n order: 1,\n },\n ]),\n IndentSectionWithEntries([\n {\n ChildComponent: IndentIncreaseIcon,\n isActive: () => false,\n key: 'indent-increase',\n label: `Increase Indent`,\n onClick: ({ editor }) => {\n editor.dispatchCommand(INDENT_CONTENT_COMMAND, undefined)\n },\n order: 2,\n },\n ]),\n ],\n },\n }),\n }\n}\n\nexport const IndentFeatureClientComponent = createClientComponent(IndentFeatureClient)\n"],"names":["lexicalImport","INDENT_CONTENT_COMMAND","OUTDENT_CONTENT_COMMAND","IndentDecreaseIcon","IndentIncreaseIcon","createClientComponent","IndentSectionWithEntries","IndentFeatureClient","props","clientFeatureProps","feature","floatingSelectToolbar","sections","ChildComponent","isActive","isEnabled","selection","getNodes","length","node","__indent","getParent","key","label","onClick","editor","dispatchCommand","undefined","order","IndentFeatureClientComponent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;AAEA,OAAOA,mBAAmB,UAAS;AACnC,MAAM,EAAEC,sBAAsB,EAAEC,uBAAuB,EAAE,GAAGF;AAI5D,SAASG,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,kBAAkB,QAAQ,iDAAgD;AACnF,SAASC,qBAAqB,QAAQ,8BAA6B;AACnE,SAASC,wBAAwB,QAAQ,0CAAyC;AAElF,MAAMC,sBAAgE,CAACC;IACrE,OAAO;QACLC,oBAAoBD;QACpBE,SAAS,IAAO,CAAA;gBACdD,oBAAoBD;gBACpBG,uBAAuB;oBACrBC,UAAU;wBACRN,yBAAyB;4BACvB;gCACEO,gBAAgBV;gCAChBW,UAAU,IAAM;gCAChBC,WAAW,CAAC,EAAEC,SAAS,EAAE;oCACvB,IAAI,CAACA,aAAa,CAACA,WAAWC,YAAYC,QAAQ;wCAChD,OAAO;oCACT;oCACA,KAAK,MAAMC,QAAQH,UAAUC,QAAQ,GAAI;wCACvC,0DAA0D;wCAC1D,IACE,AAAC,cAAcE,QAAQ,AAACA,KAAKC,QAAQ,GAAc,KAClDD,KAAKE,SAAS,MACb,cAAcF,KAAKE,SAAS,MAC5BF,KAAKE,SAAS,GAAGD,QAAQ,GAAG,GAC9B;4CACA,OAAO;wCACT;oCACF;oCACA,OAAO;gCACT;gCACAE,KAAK;gCACLC,OAAO,CAAC,eAAe,CAAC;gCACxBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACxB,yBAAyByB;gCAClD;gCACAC,OAAO;4BACT;yBACD;wBACDtB,yBAAyB;4BACvB;gCACEO,gBAAgBT;gCAChBU,UAAU,IAAM;gCAChBQ,KAAK;gCACLC,OAAO,CAAC,eAAe,CAAC;gCACxBC,SAAS,CAAC,EAAEC,MAAM,EAAE;oCAClBA,OAAOC,eAAe,CAACzB,wBAAwB0B;gCACjD;gCACAC,OAAO;4BACT;yBACD;qBACF;gBACH;YACF,CAAA;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+BxB,sBAAsBE,qBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/indent/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { IndentFeatureClientComponent } from './feature.client.js'\n\nexport const IndentFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: IndentFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'indent',\n serverFeatureProps: props,\n }\n}\n"],"names":["IndentFeatureClientComponent","IndentFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"mappings":"AAEA,SAASA,4BAA4B,QAAQ,sBAAqB;AAElE,OAAO,MAAMC,gBAAqE,CAACC;IACjF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoB;gBACpBC,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/indent/feature.server.ts"],"sourcesContent":["import type { FeatureProviderProviderServer } from '../types.js'\n\nimport { IndentFeatureClientComponent } from './feature.client.js'\n\nexport const IndentFeature: FeatureProviderProviderServer<undefined, undefined> = (props) => {\n return {\n feature: () => {\n return {\n ClientComponent: IndentFeatureClientComponent,\n clientFeatureProps: null,\n serverFeatureProps: props,\n }\n },\n key: 'indent',\n serverFeatureProps: props,\n }\n}\n"],"names":["IndentFeatureClientComponent","IndentFeature","props","feature","ClientComponent","clientFeatureProps","serverFeatureProps","key"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAEA,SAASA,4BAA4B,QAAQ,sBAAqB;AAElE,OAAO,MAAMC,gBAAqE,CAACC;IACjF,OAAO;QACLC,SAAS;YACP,OAAO;gBACLC,iBAAiBJ;gBACjBK,oBAAoB;gBACpBC,oBAAoBJ;YACtB;QACF;QACAK,KAAK;QACLD,oBAAoBJ;IACtB;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/features/indent/floatingSelectToolbarIndentSection.ts"],"sourcesContent":["import type {\n FloatingToolbarSection,\n FloatingToolbarSectionEntry,\n} from '../../lexical/plugins/FloatingSelectToolbar/types.js'\n\nexport const IndentSectionWithEntries = (\n entries: FloatingToolbarSectionEntry[],\n): FloatingToolbarSection => {\n return {\n type: 'buttons',\n entries,\n key: 'indent',\n order: 3,\n }\n}\n"],"names":["IndentSectionWithEntries","entries","type","key","order"],"mappings":"AAKA,OAAO,MAAMA,2BAA2B,CACtCC;IAEA,OAAO;QACLC,MAAM;QACND;QACAE,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/features/indent/floatingSelectToolbarIndentSection.ts"],"sourcesContent":["import type {\n FloatingToolbarSection,\n FloatingToolbarSectionEntry,\n} from '../../lexical/plugins/FloatingSelectToolbar/types.js'\n\nexport const IndentSectionWithEntries = (\n entries: FloatingToolbarSectionEntry[],\n): FloatingToolbarSection => {\n return {\n type: 'buttons',\n entries,\n key: 'indent',\n order: 3,\n }\n}\n"],"names":["IndentSectionWithEntries","entries","type","key","order"],"rangeMappings":";;;;;;;","mappings":"AAKA,OAAO,MAAMA,2BAA2B,CACtCC;IAEA,OAAO;QACLC,MAAM;QACND;QACAE,KAAK;QACLC,OAAO;IACT;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"baseFields.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAyB,MAAM,eAAe,CAAA;AAiBjE,eAAO,MAAM,aAAa,WAChB,MAAM,sBACM,KAAK,GAAG,MAAM,EAAE,uBACf,KAAK,GAAG,MAAM,EAAE,KACpC,KAAK,EAmHP,CAAA"}
1
+ {"version":3,"file":"baseFields.d.ts","sourceRoot":"","sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,KAAK,EAAyB,MAAM,eAAe,CAAA;AAIjE,eAAO,MAAM,aAAa,WAChB,MAAM,sBACM,KAAK,GAAG,MAAM,EAAE,uBACf,KAAK,GAAG,MAAM,EAAE,KACpC,KAAK,EAmHP,CAAA"}
@@ -1,15 +1,4 @@
1
- import { extractTranslations } from 'payload/utilities';
2
1
  import { validateUrl } from '../../../lexical/utils/url.js';
3
- const translations = extractTranslations([
4
- 'fields:textToDisplay',
5
- 'fields:linkType',
6
- 'fields:chooseBetweenCustomTextOrDocument',
7
- 'fields:customURL',
8
- 'fields:internalLink',
9
- 'fields:enterURL',
10
- 'fields:chooseDocumentToLink',
11
- 'fields:openInNewTab'
12
- ]);
13
2
  export const getBaseFields = (config, enabledCollections, disabledCollections)=>{
14
3
  let enabledRelations;
15
4
  /**
@@ -31,7 +20,7 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
31
20
  {
32
21
  name: 'text',
33
22
  type: 'text',
34
- label: translations['fields:textToDisplay'],
23
+ label: ({ t })=>t('fields:textToDisplay'),
35
24
  required: true
36
25
  },
37
26
  {
@@ -50,13 +39,13 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
50
39
  name: 'linkType',
51
40
  type: 'radio',
52
41
  admin: {
53
- description: translations['fields:chooseBetweenCustomTextOrDocument']
42
+ description: ({ t })=>t('fields:chooseBetweenCustomTextOrDocument')
54
43
  },
55
44
  defaultValue: 'custom',
56
- label: translations['fields:linkType'],
45
+ label: ({ t })=>t('fields:linkType'),
57
46
  options: [
58
47
  {
59
- label: translations['fields:customURL'],
48
+ label: ({ t })=>t('fields:customURL'),
60
49
  value: 'custom'
61
50
  }
62
51
  ],
@@ -65,7 +54,7 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
65
54
  {
66
55
  name: 'url',
67
56
  type: 'text',
68
- label: translations['fields:enterURL'],
57
+ label: ({ t })=>t('fields:enterURL'),
69
58
  required: true,
70
59
  validate: (value)=>{
71
60
  if (value && !validateUrl(value)) {
@@ -79,7 +68,7 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
79
68
  // Only display internal link-specific fields / options / conditions if there are enabled relations
80
69
  if (enabledRelations?.length) {
81
70
  baseFields[1].fields[0].options.push({
82
- label: translations['fields:internalLink'],
71
+ label: ({ t })=>t('fields:internalLink'),
83
72
  value: 'internal'
84
73
  });
85
74
  baseFields[1].fields[1].admin = {
@@ -102,7 +91,7 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
102
91
  return false;
103
92
  }
104
93
  } : null,
105
- label: translations['fields:chooseDocumentToLink'],
94
+ label: ({ t })=>t('fields:chooseDocumentToLink'),
106
95
  relationTo: enabledRelations,
107
96
  required: true
108
97
  });
@@ -110,7 +99,7 @@ export const getBaseFields = (config, enabledCollections, disabledCollections)=>
110
99
  baseFields[1].fields.push({
111
100
  name: 'newTab',
112
101
  type: 'checkbox',
113
- label: translations['fields:openInNewTab']
102
+ label: ({ t })=>t('fields:openInNewTab')
114
103
  });
115
104
  return baseFields;
116
105
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"sourcesContent":["import type { User } from 'payload/auth'\nimport type { Config } from 'payload/config'\nimport type { Field, RadioField, TextField } from 'payload/types'\n\nimport { extractTranslations } from 'payload/utilities'\n\nimport { validateUrl } from '../../../lexical/utils/url.js'\n\nconst translations = extractTranslations([\n 'fields:textToDisplay',\n 'fields:linkType',\n 'fields:chooseBetweenCustomTextOrDocument',\n 'fields:customURL',\n 'fields:internalLink',\n 'fields:enterURL',\n 'fields:chooseDocumentToLink',\n 'fields:openInNewTab',\n])\n\nexport const getBaseFields = (\n config: Config,\n enabledCollections: false | string[],\n disabledCollections: false | string[],\n): Field[] => {\n let enabledRelations: string[]\n\n /**\n * Figure out which relations should be enabled (enabledRelations) based on a collection's admin.enableRichTextLink property,\n * or the Link Feature's enabledCollections and disabledCollections properties which override it.\n */\n if (enabledCollections) {\n enabledRelations = enabledCollections\n } else if (disabledCollections) {\n enabledRelations = config.collections\n .filter(({ slug }) => !disabledCollections.includes(slug))\n .map(({ slug }) => slug)\n } else {\n enabledRelations = config.collections\n .filter(({ admin: { enableRichTextLink, hidden } }) => {\n if (typeof hidden !== 'function' && hidden) {\n return false\n }\n return enableRichTextLink\n })\n .map(({ slug }) => slug)\n }\n\n const baseFields = [\n {\n name: 'text',\n type: 'text',\n label: translations['fields:textToDisplay'],\n required: true,\n },\n {\n name: 'fields',\n type: 'group',\n admin: {\n style: {\n borderBottom: 0,\n borderTop: 0,\n margin: 0,\n padding: 0,\n },\n },\n fields: [\n {\n name: 'linkType',\n type: 'radio',\n admin: {\n description: translations['fields:chooseBetweenCustomTextOrDocument'],\n },\n defaultValue: 'custom',\n label: translations['fields:linkType'],\n options: [\n {\n label: translations['fields:customURL'],\n value: 'custom',\n },\n ],\n required: true,\n },\n {\n name: 'url',\n type: 'text',\n label: translations['fields:enterURL'],\n required: true,\n validate: (value: string) => {\n if (value && !validateUrl(value)) {\n return 'Invalid URL'\n }\n },\n },\n ] as Field[],\n },\n ]\n\n // Only display internal link-specific fields / options / conditions if there are enabled relations\n if (enabledRelations?.length) {\n ;(baseFields[1].fields[0] as RadioField).options.push({\n label: translations['fields:internalLink'],\n value: 'internal',\n })\n ;(baseFields[1].fields[1] as TextField).admin = {\n condition: ({ fields }) => fields?.linkType !== 'internal',\n }\n\n baseFields[1].fields.push({\n name: 'doc',\n admin: {\n condition: ({ fields }) => {\n return fields?.linkType === 'internal'\n },\n },\n // when admin.hidden is a function we need to dynamically call hidden with the user to know if the collection should be shown\n type: 'relationship',\n filterOptions:\n !enabledCollections && !disabledCollections\n ? ({ relationTo, user }) => {\n const hidden = config.collections.find(({ slug }) => slug === relationTo).admin.hidden\n if (typeof hidden === 'function' && hidden({ user } as { user: User })) {\n return false\n }\n }\n : null,\n label: translations['fields:chooseDocumentToLink'],\n relationTo: enabledRelations,\n required: true,\n })\n }\n\n baseFields[1].fields.push({\n name: 'newTab',\n type: 'checkbox',\n label: translations['fields:openInNewTab'],\n })\n\n return baseFields as Field[]\n}\n"],"names":["extractTranslations","validateUrl","translations","getBaseFields","config","enabledCollections","disabledCollections","enabledRelations","collections","filter","slug","includes","map","admin","enableRichTextLink","hidden","baseFields","name","type","label","required","style","borderBottom","borderTop","margin","padding","fields","description","defaultValue","options","value","validate","length","push","condition","linkType","filterOptions","relationTo","user","find"],"mappings":"AAIA,SAASA,mBAAmB,QAAQ,oBAAmB;AAEvD,SAASC,WAAW,QAAQ,gCAA+B;AAE3D,MAAMC,eAAeF,oBAAoB;IACvC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,OAAO,MAAMG,gBAAgB,CAC3BC,QACAC,oBACAC;IAEA,IAAIC;IAEJ;;;GAGC,GACD,IAAIF,oBAAoB;QACtBE,mBAAmBF;IACrB,OAAO,IAAIC,qBAAqB;QAC9BC,mBAAmBH,OAAOI,WAAW,CAClCC,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAK,CAACJ,oBAAoBK,QAAQ,CAACD,OACnDE,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB,OAAO;QACLH,mBAAmBH,OAAOI,WAAW,CAClCC,MAAM,CAAC,CAAC,EAAEI,OAAO,EAAEC,kBAAkB,EAAEC,MAAM,EAAE,EAAE;YAChD,IAAI,OAAOA,WAAW,cAAcA,QAAQ;gBAC1C,OAAO;YACT;YACA,OAAOD;QACT,GACCF,GAAG,CAAC,CAAC,EAAEF,IAAI,EAAE,GAAKA;IACvB;IAEA,MAAMM,aAAa;QACjB;YACEC,MAAM;YACNC,MAAM;YACNC,OAAOjB,YAAY,CAAC,uBAAuB;YAC3CkB,UAAU;QACZ;QACA;YACEH,MAAM;YACNC,MAAM;YACNL,OAAO;gBACLQ,OAAO;oBACLC,cAAc;oBACdC,WAAW;oBACXC,QAAQ;oBACRC,SAAS;gBACX;YACF;YACAC,QAAQ;gBACN;oBACET,MAAM;oBACNC,MAAM;oBACNL,OAAO;wBACLc,aAAazB,YAAY,CAAC,2CAA2C;oBACvE;oBACA0B,cAAc;oBACdT,OAAOjB,YAAY,CAAC,kBAAkB;oBACtC2B,SAAS;wBACP;4BACEV,OAAOjB,YAAY,CAAC,mBAAmB;4BACvC4B,OAAO;wBACT;qBACD;oBACDV,UAAU;gBACZ;gBACA;oBACEH,MAAM;oBACNC,MAAM;oBACNC,OAAOjB,YAAY,CAAC,kBAAkB;oBACtCkB,UAAU;oBACVW,UAAU,CAACD;wBACT,IAAIA,SAAS,CAAC7B,YAAY6B,QAAQ;4BAChC,OAAO;wBACT;oBACF;gBACF;aACD;QACH;KACD;IAED,mGAAmG;IACnG,IAAIvB,kBAAkByB,QAAQ;QAC1BhB,UAAU,CAAC,EAAE,CAACU,MAAM,CAAC,EAAE,CAAgBG,OAAO,CAACI,IAAI,CAAC;YACpDd,OAAOjB,YAAY,CAAC,sBAAsB;YAC1C4B,OAAO;QACT;QACEd,UAAU,CAAC,EAAE,CAACU,MAAM,CAAC,EAAE,CAAeb,KAAK,GAAG;YAC9CqB,WAAW,CAAC,EAAER,MAAM,EAAE,GAAKA,QAAQS,aAAa;QAClD;QAEAnB,UAAU,CAAC,EAAE,CAACU,MAAM,CAACO,IAAI,CAAC;YACxBhB,MAAM;YACNJ,OAAO;gBACLqB,WAAW,CAAC,EAAER,MAAM,EAAE;oBACpB,OAAOA,QAAQS,aAAa;gBAC9B;YACF;YACA,6HAA6H;YAC7HjB,MAAM;YACNkB,eACE,CAAC/B,sBAAsB,CAACC,sBACpB,CAAC,EAAE+B,UAAU,EAAEC,IAAI,EAAE;gBACnB,MAAMvB,SAASX,OAAOI,WAAW,CAAC+B,IAAI,CAAC,CAAC,EAAE7B,IAAI,EAAE,GAAKA,SAAS2B,YAAYxB,KAAK,CAACE,MAAM;gBACtF,IAAI,OAAOA,WAAW,cAAcA,OAAO;oBAAEuB;gBAAK,IAAsB;oBACtE,OAAO;gBACT;YACF,IACA;YACNnB,OAAOjB,YAAY,CAAC,8BAA8B;YAClDmC,YAAY9B;YACZa,UAAU;QACZ;IACF;IAEAJ,UAAU,CAAC,EAAE,CAACU,MAAM,CAACO,IAAI,CAAC;QACxBhB,MAAM;QACNC,MAAM;QACNC,OAAOjB,YAAY,CAAC,sBAAsB;IAC5C;IAEA,OAAOc;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/link/drawer/baseFields.ts"],"sourcesContent":["import type { User } from 'payload/auth'\nimport type { Config } from 'payload/config'\nimport type { Field, RadioField, TextField } from 'payload/types'\n\nimport { validateUrl } from '../../../lexical/utils/url.js'\n\nexport const getBaseFields = (\n config: Config,\n enabledCollections: false | string[],\n disabledCollections: false | string[],\n): Field[] => {\n let enabledRelations: string[]\n\n /**\n * Figure out which relations should be enabled (enabledRelations) based on a collection's admin.enableRichTextLink property,\n * or the Link Feature's enabledCollections and disabledCollections properties which override it.\n */\n if (enabledCollections) {\n enabledRelations = enabledCollections\n } else if (disabledCollections) {\n enabledRelations = config.collections\n .filter(({ slug }) => !disabledCollections.includes(slug))\n .map(({ slug }) => slug)\n } else {\n enabledRelations = config.collections\n .filter(({ admin: { enableRichTextLink, hidden } }) => {\n if (typeof hidden !== 'function' && hidden) {\n return false\n }\n return enableRichTextLink\n })\n .map(({ slug }) => slug)\n }\n\n const baseFields = [\n {\n name: 'text',\n type: 'text',\n label: ({ t }) => t('fields:textToDisplay'),\n required: true,\n },\n {\n name: 'fields',\n type: 'group',\n admin: {\n style: {\n borderBottom: 0,\n borderTop: 0,\n margin: 0,\n padding: 0,\n },\n },\n fields: [\n {\n name: 'linkType',\n type: 'radio',\n admin: {\n description: ({ t }) => t('fields:chooseBetweenCustomTextOrDocument'),\n },\n defaultValue: 'custom',\n label: ({ t }) => t('fields:linkType'),\n options: [\n {\n label: ({ t }) => t('fields:customURL'),\n value: 'custom',\n },\n ],\n required: true,\n },\n {\n name: 'url',\n type: 'text',\n label: ({ t }) => t('fields:enterURL'),\n required: true,\n validate: (value: string) => {\n if (value && !validateUrl(value)) {\n return 'Invalid URL'\n }\n },\n },\n ] as Field[],\n },\n ]\n\n // Only display internal link-specific fields / options / conditions if there are enabled relations\n if (enabledRelations?.length) {\n ;(baseFields[1].fields[0] as RadioField).options.push({\n label: ({ t }) => t('fields:internalLink'),\n value: 'internal',\n })\n ;(baseFields[1].fields[1] as TextField).admin = {\n condition: ({ fields }) => fields?.linkType !== 'internal',\n }\n\n baseFields[1].fields.push({\n name: 'doc',\n admin: {\n condition: ({ fields }) => {\n return fields?.linkType === 'internal'\n },\n },\n // when admin.hidden is a function we need to dynamically call hidden with the user to know if the collection should be shown\n type: 'relationship',\n filterOptions:\n !enabledCollections && !disabledCollections\n ? ({ relationTo, user }) => {\n const hidden = config.collections.find(({ slug }) => slug === relationTo).admin.hidden\n if (typeof hidden === 'function' && hidden({ user } as { user: User })) {\n return false\n }\n }\n : null,\n label: ({ t }) => t('fields:chooseDocumentToLink'),\n relationTo: enabledRelations,\n required: true,\n })\n }\n\n baseFields[1].fields.push({\n name: 'newTab',\n type: 'checkbox',\n label: ({ t }) => t('fields:openInNewTab'),\n })\n\n return baseFields as Field[]\n}\n"],"names":["validateUrl","getBaseFields","config","enabledCollections","disabledCollections","enabledRelations","collections","filter","slug","includes","map","admin","enableRichTextLink","hidden","baseFields","name","type","label","t","required","style","borderBottom","borderTop","margin","padding","fields","description","defaultValue","options","value","validate","length","push","condition","linkType","filterOptions","relationTo","user","find"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -84,9 +84,10 @@ export const LinkDrawer = ({ drawerSlug, handleModalSubmit, stateData })=>{
84
84
  }, /*#__PURE__*/ React.createElement(RenderFields, {
85
85
  fieldMap: Array.isArray(fieldMap) ? fieldMap : [],
86
86
  forceRender: true,
87
- path: "",
87
+ path: "" // See Blocks feature path for details as for why this is empty
88
+ ,
88
89
  readOnly: false,
89
- schemaPath: ""
90
+ schemaPath: schemaFieldsPath
90
91
  }), /*#__PURE__*/ React.createElement(FormSubmit, null, t('general:submit'))));
91
92
  };
92
93
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/link/drawer/index.tsx"],"sourcesContent":["import type { FormProps } from '@payloadcms/ui/forms/Form'\nimport type { FormState } from 'payload/types'\n\nimport { Drawer } from '@payloadcms/ui/elements/Drawer'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { Form } from '@payloadcms/ui/forms/Form'\nimport { RenderFields } from '@payloadcms/ui/forms/RenderFields'\nimport { FormSubmit } from '@payloadcms/ui/forms/Submit'\nimport { useConfig } from '@payloadcms/ui/providers/Config'\nimport { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport { getFormState } from '@payloadcms/ui/utilities/getFormState'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport './index.scss'\nimport { type Props } from './types.js'\n\nconst baseClass = 'lexical-link-edit-drawer'\n\nexport const LinkDrawer: React.FC<Props> = ({ drawerSlug, handleModalSubmit, stateData }) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.link.fields.fields`\n const schemaFieldsPath = `${schemaPath}.feature.link.fields`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: stateData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (stateData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, stateData])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n return (\n <Drawer className={baseClass} slug={drawerSlug} title={t('fields:editLink') ?? ''}>\n {initialState !== false && (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleModalSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\"\n readOnly={false}\n schemaPath=\"\"\n />\n\n <FormSubmit>{t('general:submit')}</FormSubmit>\n </Form>\n )}\n </Drawer>\n )\n}\n"],"names":["Drawer","useFieldProps","Form","RenderFields","FormSubmit","useConfig","useDocumentInfo","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","baseClass","LinkDrawer","drawerSlug","handleModalSubmit","stateData","t","id","schemaPath","config","initialState","setInitialState","field","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","fieldMap","get","awaitInitialState","state","apiRoute","routes","api","body","data","operation","serverURL","onChange","formState","prevFormState","className","slug","title","beforeSubmit","disableValidationOnSubmit","fields","Array","isArray","onSubmit","forceRender","path","readOnly"],"mappings":"AAGA,SAASA,MAAM,QAAQ,iCAAgC;AACvD,SAASC,aAAa,QAAQ,0CAAyC;AACvE,SAASC,IAAI,QAAQ,4BAA2B;AAChD,SAASC,YAAY,QAAQ,oCAAmC;AAChE,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,SAASC,eAAe,QAAQ,wCAAuC;AACvE,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,YAAY,QAAQ,wCAAuC;AACpE,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC/D,SAASC,MAAMC,IAAI,QAAQ,OAAM;AAEjC,SAASC,sBAAsB,QAAQ,yDAAwD;AAC/F,OAAO,eAAc;AAGrB,MAAMC,YAAY;AAElB,OAAO,MAAMC,aAA8B,CAAC,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,EAAE;IACtF,MAAM,EAAEC,CAAC,EAAE,GAAGd;IACd,MAAM,EAAEe,EAAE,EAAE,GAAGhB;IACf,MAAM,EAAEiB,UAAU,EAAE,GAAGtB;IACvB,MAAMuB,SAASnB;IACf,MAAM,CAACoB,cAAcC,gBAAgB,GAAGd,SAA4B;IACpE,MAAM,EACJe,OAAO,EAAEC,oBAAoB,EAAE,EAChC,GAAGb;IAEJ,MAAMc,iCAAiC,CAAC,0BAA0B,CAAC;IACnE,MAAMC,mBAAmB,CAAC,EAAEP,WAAW,oBAAoB,CAAC;IAE5D,MAAMQ,WAAWH,qBAAqBI,GAAG,CAACH,gCAAgC,eAAe;;IAEzFlB,UAAU;QACR,MAAMsB,oBAAoB;YACxB,MAAMC,QAAQ,MAAM1B,aAAa;gBAC/B2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;gBAC3BC,MAAM;oBACJhB;oBACAiB,MAAMnB;oBACNoB,WAAW;oBACXjB,YAAYO;gBACd;gBACAW,WAAWjB,OAAOiB,SAAS;YAC7B,GAAG,aAAa;;YAEhBf,gBAAgBQ;QAClB;QAEA,IAAId,WAAW;YACb,KAAKa;QACP;IACF,GAAG;QAACT,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;QAAIF;KAAU;IAEzE,MAAMsB,WAAqChC,YACzC,OAAO,EAAEiC,WAAWC,aAAa,EAAE;QACjC,OAAO,MAAMpC,aAAa;YACxB2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;YAC3BC,MAAM;gBACJhB;gBACAqB,WAAWC;gBACXJ,WAAW;gBACXjB,YAAYO;YACd;YACAW,WAAWjB,OAAOiB,SAAS;QAC7B;IACF,GAEA;QAACjB,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;KAAG;IAG7D,qBACE,oBAACtB;QAAO6C,WAAW7B;QAAW8B,MAAM5B;QAAY6B,OAAO1B,EAAE,sBAAsB;OAC5EI,iBAAiB,uBAChB,oBAACvB;QACC8C,cAAc;YAACN;SAAS;QACxBO,2BAAAA;QACAC,QAAQC,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QAC/CN,cAAcA;QACdiB,UAAU;YAACA;SAAS;QACpBW,UAAUlC;QACVL,MAAMA;qBAEN,oBAACX;QACC4B,UAAUoB,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QACjDuB,aAAAA;QACAC,MAAK;QACLC,UAAU;QACVjC,YAAW;sBAGb,oBAACnB,kBAAYiB,EAAE;AAKzB,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/link/drawer/index.tsx"],"sourcesContent":["import type { FormProps } from '@payloadcms/ui/forms/Form'\nimport type { FormState } from 'payload/types'\n\nimport { Drawer } from '@payloadcms/ui/elements/Drawer'\nimport { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'\nimport { Form } from '@payloadcms/ui/forms/Form'\nimport { RenderFields } from '@payloadcms/ui/forms/RenderFields'\nimport { FormSubmit } from '@payloadcms/ui/forms/Submit'\nimport { useConfig } from '@payloadcms/ui/providers/Config'\nimport { useDocumentInfo } from '@payloadcms/ui/providers/DocumentInfo'\nimport { useTranslation } from '@payloadcms/ui/providers/Translation'\nimport { getFormState } from '@payloadcms/ui/utilities/getFormState'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { v4 as uuid } from 'uuid'\n\nimport { useEditorConfigContext } from '../../../lexical/config/client/EditorConfigProvider.js'\nimport './index.scss'\nimport { type Props } from './types.js'\n\nconst baseClass = 'lexical-link-edit-drawer'\n\nexport const LinkDrawer: React.FC<Props> = ({ drawerSlug, handleModalSubmit, stateData }) => {\n const { t } = useTranslation()\n const { id } = useDocumentInfo()\n const { schemaPath } = useFieldProps()\n const config = useConfig()\n const [initialState, setInitialState] = useState<FormState | false>(false)\n const {\n field: { richTextComponentMap },\n } = useEditorConfigContext()\n\n const componentMapRenderedFieldsPath = `feature.link.fields.fields`\n const schemaFieldsPath = `${schemaPath}.feature.link.fields`\n\n const fieldMap = richTextComponentMap.get(componentMapRenderedFieldsPath) // Field Schema\n\n useEffect(() => {\n const awaitInitialState = async () => {\n const state = await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n data: stateData,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n }) // Form State\n\n setInitialState(state)\n }\n\n if (stateData) {\n void awaitInitialState()\n }\n }, [config.routes.api, config.serverURL, schemaFieldsPath, id, stateData])\n\n const onChange: FormProps['onChange'][0] = useCallback(\n async ({ formState: prevFormState }) => {\n return await getFormState({\n apiRoute: config.routes.api,\n body: {\n id,\n formState: prevFormState,\n operation: 'update',\n schemaPath: schemaFieldsPath,\n },\n serverURL: config.serverURL,\n })\n },\n\n [config.routes.api, config.serverURL, schemaFieldsPath, id],\n )\n\n return (\n <Drawer className={baseClass} slug={drawerSlug} title={t('fields:editLink') ?? ''}>\n {initialState !== false && (\n <Form\n beforeSubmit={[onChange]}\n disableValidationOnSubmit\n fields={Array.isArray(fieldMap) ? fieldMap : []}\n initialState={initialState}\n onChange={[onChange]}\n onSubmit={handleModalSubmit}\n uuid={uuid()}\n >\n <RenderFields\n fieldMap={Array.isArray(fieldMap) ? fieldMap : []}\n forceRender\n path=\"\" // See Blocks feature path for details as for why this is empty\n readOnly={false}\n schemaPath={schemaFieldsPath}\n />\n\n <FormSubmit>{t('general:submit')}</FormSubmit>\n </Form>\n )}\n </Drawer>\n )\n}\n"],"names":["Drawer","useFieldProps","Form","RenderFields","FormSubmit","useConfig","useDocumentInfo","useTranslation","getFormState","React","useCallback","useEffect","useState","v4","uuid","useEditorConfigContext","baseClass","LinkDrawer","drawerSlug","handleModalSubmit","stateData","t","id","schemaPath","config","initialState","setInitialState","field","richTextComponentMap","componentMapRenderedFieldsPath","schemaFieldsPath","fieldMap","get","awaitInitialState","state","apiRoute","routes","api","body","data","operation","serverURL","onChange","formState","prevFormState","className","slug","title","beforeSubmit","disableValidationOnSubmit","fields","Array","isArray","onSubmit","forceRender","path","readOnly"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,MAAM,QAAQ,iCAAgC;AACvD,SAASC,aAAa,QAAQ,0CAAyC;AACvE,SAASC,IAAI,QAAQ,4BAA2B;AAChD,SAASC,YAAY,QAAQ,oCAAmC;AAChE,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,SAASC,eAAe,QAAQ,wCAAuC;AACvE,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,YAAY,QAAQ,wCAAuC;AACpE,OAAOC,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAC/D,SAASC,MAAMC,IAAI,QAAQ,OAAM;AAEjC,SAASC,sBAAsB,QAAQ,yDAAwD;AAC/F,OAAO,eAAc;AAGrB,MAAMC,YAAY;AAElB,OAAO,MAAMC,aAA8B,CAAC,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,SAAS,EAAE;IACtF,MAAM,EAAEC,CAAC,EAAE,GAAGd;IACd,MAAM,EAAEe,EAAE,EAAE,GAAGhB;IACf,MAAM,EAAEiB,UAAU,EAAE,GAAGtB;IACvB,MAAMuB,SAASnB;IACf,MAAM,CAACoB,cAAcC,gBAAgB,GAAGd,SAA4B;IACpE,MAAM,EACJe,OAAO,EAAEC,oBAAoB,EAAE,EAChC,GAAGb;IAEJ,MAAMc,iCAAiC,CAAC,0BAA0B,CAAC;IACnE,MAAMC,mBAAmB,CAAC,EAAEP,WAAW,oBAAoB,CAAC;IAE5D,MAAMQ,WAAWH,qBAAqBI,GAAG,CAACH,gCAAgC,eAAe;;IAEzFlB,UAAU;QACR,MAAMsB,oBAAoB;YACxB,MAAMC,QAAQ,MAAM1B,aAAa;gBAC/B2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;gBAC3BC,MAAM;oBACJhB;oBACAiB,MAAMnB;oBACNoB,WAAW;oBACXjB,YAAYO;gBACd;gBACAW,WAAWjB,OAAOiB,SAAS;YAC7B,GAAG,aAAa;;YAEhBf,gBAAgBQ;QAClB;QAEA,IAAId,WAAW;YACb,KAAKa;QACP;IACF,GAAG;QAACT,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;QAAIF;KAAU;IAEzE,MAAMsB,WAAqChC,YACzC,OAAO,EAAEiC,WAAWC,aAAa,EAAE;QACjC,OAAO,MAAMpC,aAAa;YACxB2B,UAAUX,OAAOY,MAAM,CAACC,GAAG;YAC3BC,MAAM;gBACJhB;gBACAqB,WAAWC;gBACXJ,WAAW;gBACXjB,YAAYO;YACd;YACAW,WAAWjB,OAAOiB,SAAS;QAC7B;IACF,GAEA;QAACjB,OAAOY,MAAM,CAACC,GAAG;QAAEb,OAAOiB,SAAS;QAAEX;QAAkBR;KAAG;IAG7D,qBACE,oBAACtB;QAAO6C,WAAW7B;QAAW8B,MAAM5B;QAAY6B,OAAO1B,EAAE,sBAAsB;OAC5EI,iBAAiB,uBAChB,oBAACvB;QACC8C,cAAc;YAACN;SAAS;QACxBO,2BAAAA;QACAC,QAAQC,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QAC/CN,cAAcA;QACdiB,UAAU;YAACA;SAAS;QACpBW,UAAUlC;QACVL,MAAMA;qBAEN,oBAACX;QACC4B,UAAUoB,MAAMC,OAAO,CAACrB,YAAYA,WAAW,EAAE;QACjDuB,aAAAA;QACAC,MAAK,GAAG,+DAA+D;;QACvEC,UAAU;QACVjC,YAAYO;sBAGd,oBAAC1B,kBAAYiB,EAAE;AAKzB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/features/link/drawer/types.ts"],"sourcesContent":["import type { FormState } from 'payload/types'\n\nimport type { LinkPayload } from '../plugins/floatingLinkEditor/types.js'\n\nexport interface Props {\n drawerSlug: string\n handleModalSubmit: (fields: FormState, data: Record<string, unknown>) => void\n stateData?: LinkPayload\n}\n"],"names":[],"mappings":"AAIA,WAIC"}
1
+ {"version":3,"sources":["../../../../../src/field/features/link/drawer/types.ts"],"sourcesContent":["import type { FormState } from 'payload/types'\n\nimport type { LinkPayload } from '../plugins/floatingLinkEditor/types.js'\n\nexport interface Props {\n drawerSlug: string\n handleModalSubmit: (fields: FormState, data: Record<string, unknown>) => void\n stateData?: LinkPayload\n}\n"],"names":[],"rangeMappings":"","mappings":"AAIA,WAIC"}