@payloadcms/richtext-lexical 4.0.0-internal.a0ef1b8 → 4.0.0-internal.a2d053c

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 (870) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/exports/client/Field-334JNLRF.js +2 -0
  3. package/dist/exports/client/Field-334JNLRF.js.map +7 -0
  4. package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js → RelationshipComponent-TVK6I4W4.js} +2 -2
  5. package/dist/exports/client/chunk-BEKGION5.js +2 -0
  6. package/dist/exports/client/chunk-BEKGION5.js.map +7 -0
  7. package/dist/exports/client/{chunk-WSAPGI3Z.js → chunk-EA5BHQ2T.js} +1 -1
  8. package/dist/exports/client/{chunk-WSAPGI3Z.js.map → chunk-EA5BHQ2T.js.map} +1 -1
  9. package/dist/exports/client/chunk-FAJJXXCW.js +2 -0
  10. package/dist/exports/client/chunk-FAJJXXCW.js.map +7 -0
  11. package/dist/exports/client/{chunk-5VIL27GI.js → chunk-IYBYNEKX.js} +1 -1
  12. package/dist/exports/client/{chunk-5VIL27GI.js.map → chunk-IYBYNEKX.js.map} +1 -1
  13. package/dist/exports/client/chunk-SE5IITBK.js +2 -0
  14. package/dist/exports/client/chunk-SE5IITBK.js.map +7 -0
  15. package/dist/exports/client/component-QENB4QTS.js +2 -0
  16. package/dist/exports/client/component-QENB4QTS.js.map +7 -0
  17. package/dist/exports/client/componentInline-AU7IBNY7.js +2 -0
  18. package/dist/exports/client/index.d.ts +1 -3
  19. package/dist/exports/client/index.d.ts.map +1 -1
  20. package/dist/exports/client/index.js +23 -24
  21. package/dist/exports/client/index.js.map +4 -4
  22. package/dist/features/align/client/index.js.map +1 -1
  23. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  24. package/dist/features/blockquote/client/index.js +2 -2
  25. package/dist/features/blockquote/client/index.js.map +1 -1
  26. package/dist/features/blockquote/server/index.js +2 -2
  27. package/dist/features/blockquote/server/index.js.map +1 -1
  28. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  29. package/dist/features/blocks/client/component/BlockReordering/index.d.ts +11 -0
  30. package/dist/features/blocks/client/component/BlockReordering/index.d.ts.map +1 -0
  31. package/dist/features/blocks/client/component/BlockReordering/index.js +18 -0
  32. package/dist/features/blocks/client/component/BlockReordering/index.js.map +1 -0
  33. package/dist/features/blocks/client/component/components/BlockCollapsible.js.map +1 -1
  34. package/dist/features/blocks/client/component/components/BlockEditButton.js.map +1 -1
  35. package/dist/features/blocks/client/component/components/BlockRemoveButton.js.map +1 -1
  36. package/dist/features/blocks/client/component/index.css +2 -2
  37. package/dist/features/blocks/client/component/index.d.ts +0 -6
  38. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  39. package/dist/features/blocks/client/component/index.js +199 -108
  40. package/dist/features/blocks/client/component/index.js.map +1 -1
  41. package/dist/features/blocks/client/component/useBlockReordering.d.ts +16 -0
  42. package/dist/features/blocks/client/component/useBlockReordering.d.ts.map +1 -0
  43. package/dist/features/blocks/client/component/useBlockReordering.js +178 -0
  44. package/dist/features/blocks/client/component/useBlockReordering.js.map +1 -0
  45. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  46. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.js.map +1 -1
  47. package/dist/features/blocks/client/componentInline/components/InlineBlockEditButton.js.map +1 -1
  48. package/dist/features/blocks/client/componentInline/components/InlineBlockLabel.js.map +1 -1
  49. package/dist/features/blocks/client/componentInline/components/InlineBlockRemoveButton.js.map +1 -1
  50. package/dist/features/blocks/client/componentInline/index.css +8 -9
  51. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  52. package/dist/features/blocks/client/componentInline/index.js +34 -31
  53. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  54. package/dist/features/blocks/client/getBlockImageComponent.d.ts +1 -1
  55. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts +9 -0
  56. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.d.ts.map +1 -0
  57. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js +95 -0
  58. package/dist/features/blocks/client/getCachedFormStateIfDataMatches.js.map +1 -0
  59. package/dist/features/blocks/client/index.d.ts.map +1 -1
  60. package/dist/features/blocks/client/index.js +4 -2
  61. package/dist/features/blocks/client/index.js.map +1 -1
  62. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  63. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  64. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  65. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  66. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  67. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  68. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  69. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  70. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  71. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  72. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  73. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  74. package/dist/features/blocks/client/nodes/BlocksNode.js +0 -10
  75. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  76. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  77. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  78. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +121 -78
  79. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  80. package/dist/features/blocks/premade/CodeBlock/Component/Code.js +142 -87
  81. package/dist/features/blocks/premade/CodeBlock/Component/Code.js.map +1 -1
  82. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +1 -1
  83. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +2 -4
  84. package/dist/features/blocks/premade/CodeBlock/Component/index.css +5 -5
  85. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  86. package/dist/features/blocks/server/index.d.ts.map +1 -1
  87. package/dist/features/blocks/server/index.js +6 -8
  88. package/dist/features/blocks/server/index.js.map +1 -1
  89. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  90. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  91. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  92. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  93. package/dist/features/blocks/server/nodes/BlocksNode.js +1 -12
  94. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  95. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  96. package/dist/features/blocks/server/nodes/InlineBlocksNode.js +2 -2
  97. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  98. package/dist/features/blocks/server/schema.d.ts +2 -0
  99. package/dist/features/blocks/server/schema.d.ts.map +1 -1
  100. package/dist/features/blocks/server/schema.js +10 -11
  101. package/dist/features/blocks/server/schema.js.map +1 -1
  102. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  103. package/dist/features/blocks/server/validate.js +1 -1
  104. package/dist/features/blocks/server/validate.js.map +1 -1
  105. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/converters/heading.js +1 -1
  107. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/list.js +4 -3
  110. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/upload.js +3 -3
  112. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  113. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.d.ts.map +1 -1
  115. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js +3 -2
  116. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  117. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js +1 -1
  118. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  120. package/dist/features/converters/lexicalToHtml/sync/converters/list.js +4 -3
  121. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js +3 -3
  123. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  126. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js +2 -1
  128. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  129. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  130. package/dist/features/converters/lexicalToJSX/converter/converters/list.js +2 -1
  131. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  132. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  133. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js +4 -5
  134. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  135. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  136. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  137. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  138. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  139. package/dist/features/converters/markdownToLexical/index.js +5 -2
  140. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  141. package/dist/features/converters/utilities/payloadPopulateFn.d.ts.map +1 -1
  142. package/dist/features/converters/utilities/payloadPopulateFn.js +4 -2
  143. package/dist/features/converters/utilities/payloadPopulateFn.js.map +1 -1
  144. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  145. package/dist/features/debug/jsxConverter/client/plugin/style.css +2 -2
  146. package/dist/features/debug/testRecorder/client/plugin/index.css +0 -1
  147. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  148. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  149. package/dist/features/format/bold/feature.client.js +1 -1
  150. package/dist/features/format/bold/feature.client.js.map +1 -1
  151. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  152. package/dist/features/format/bold/feature.server.js +1 -1
  153. package/dist/features/format/bold/feature.server.js.map +1 -1
  154. package/dist/features/format/inlineCode/feature.client.js +1 -1
  155. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  156. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  157. package/dist/features/format/inlineCode/feature.server.js +1 -1
  158. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  159. package/dist/features/format/italic/feature.client.js +1 -1
  160. package/dist/features/format/italic/feature.client.js.map +1 -1
  161. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  162. package/dist/features/format/italic/feature.server.js +1 -1
  163. package/dist/features/format/italic/feature.server.js.map +1 -1
  164. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  165. package/dist/features/format/strikethrough/feature.client.js +1 -1
  166. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  167. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  168. package/dist/features/format/strikethrough/feature.server.js +1 -1
  169. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  170. package/dist/features/heading/client/index.js +2 -2
  171. package/dist/features/heading/client/index.js.map +1 -1
  172. package/dist/features/heading/constants.d.ts +2 -0
  173. package/dist/features/heading/constants.d.ts.map +1 -0
  174. package/dist/features/heading/constants.js +2 -0
  175. package/dist/features/heading/constants.js.map +1 -0
  176. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  177. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  178. package/dist/features/heading/markdownTransformer.js +6 -19
  179. package/dist/features/heading/markdownTransformer.js.map +1 -1
  180. package/dist/features/heading/server/index.d.ts.map +1 -1
  181. package/dist/features/heading/server/index.js +7 -3
  182. package/dist/features/heading/server/index.js.map +1 -1
  183. package/dist/features/heading/server/schema.d.ts.map +1 -1
  184. package/dist/features/heading/server/validate.d.ts +6 -0
  185. package/dist/features/heading/server/validate.d.ts.map +1 -0
  186. package/dist/features/heading/server/validate.js +15 -0
  187. package/dist/features/heading/server/validate.js.map +1 -0
  188. package/dist/features/horizontalRule/client/index.js +2 -2
  189. package/dist/features/horizontalRule/client/index.js.map +1 -1
  190. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  191. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  192. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  193. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  194. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +12 -2
  195. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  196. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js +18 -1
  197. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  198. package/dist/features/horizontalRule/client/plugin/index.css +2 -2
  199. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  200. package/dist/features/horizontalRule/server/index.js +2 -2
  201. package/dist/features/horizontalRule/server/index.js.map +1 -1
  202. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  203. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  204. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  205. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  206. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -1
  207. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  208. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js +3 -3
  209. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  210. package/dist/features/horizontalRule/server/schema.d.ts +1 -0
  211. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -1
  212. package/dist/features/horizontalRule/server/schema.js +6 -5
  213. package/dist/features/horizontalRule/server/schema.js.map +1 -1
  214. package/dist/features/indent/client/IndentPlugin.d.ts.map +1 -1
  215. package/dist/features/indent/client/IndentPlugin.js +122 -1
  216. package/dist/features/indent/client/IndentPlugin.js.map +1 -1
  217. package/dist/features/indent/client/index.d.ts.map +1 -1
  218. package/dist/features/indent/client/index.js +0 -2
  219. package/dist/features/indent/client/index.js.map +1 -1
  220. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  221. package/dist/features/indent/server/i18n.d.ts.map +1 -1
  222. package/dist/features/indent/server/i18n.js +74 -37
  223. package/dist/features/indent/server/i18n.js.map +1 -1
  224. package/dist/features/link/client/index.js +2 -2
  225. package/dist/features/link/client/index.js.map +1 -1
  226. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  227. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  228. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  229. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +20 -9
  230. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  231. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +7 -13
  232. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  233. package/dist/features/link/markdownTransformer.d.ts +4 -4
  234. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  235. package/dist/features/link/markdownTransformer.js +4 -4
  236. package/dist/features/link/markdownTransformer.js.map +1 -1
  237. package/dist/features/link/nodes/AutoLinkNode.d.ts +1 -1
  238. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  239. package/dist/features/link/nodes/AutoLinkNode.js +2 -10
  240. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  241. package/dist/features/link/nodes/LinkNode.d.ts +1 -1
  242. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  243. package/dist/features/link/nodes/LinkNode.js +2 -15
  244. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  245. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  246. package/dist/features/link/server/baseFields.js.map +1 -1
  247. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  248. package/dist/features/link/server/index.js +4 -4
  249. package/dist/features/link/server/index.js.map +1 -1
  250. package/dist/features/link/server/schema.d.ts.map +1 -1
  251. package/dist/features/link/server/schema.js +4 -2
  252. package/dist/features/link/server/schema.js.map +1 -1
  253. package/dist/features/link/server/validate.d.ts.map +1 -1
  254. package/dist/features/link/server/validate.js +1 -1
  255. package/dist/features/link/server/validate.js.map +1 -1
  256. package/dist/features/lists/checklist/client/index.js +1 -1
  257. package/dist/features/lists/checklist/client/index.js.map +1 -1
  258. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  259. package/dist/features/lists/checklist/server/index.js +6 -3
  260. package/dist/features/lists/checklist/server/index.js.map +1 -1
  261. package/dist/features/lists/orderedList/client/index.js +1 -1
  262. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  263. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  264. package/dist/features/lists/orderedList/server/index.js +6 -3
  265. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  266. package/dist/features/lists/shared/constants.d.ts +2 -0
  267. package/dist/features/lists/shared/constants.d.ts.map +1 -0
  268. package/dist/features/lists/shared/constants.js +2 -0
  269. package/dist/features/lists/shared/constants.js.map +1 -0
  270. package/dist/features/lists/shared/schema.d.ts.map +1 -1
  271. package/dist/features/lists/shared/schema.js.map +1 -1
  272. package/dist/features/lists/shared/validate.d.ts +5 -0
  273. package/dist/features/lists/shared/validate.d.ts.map +1 -0
  274. package/dist/features/lists/shared/validate.js +15 -0
  275. package/dist/features/lists/shared/validate.js.map +1 -0
  276. package/dist/features/lists/unorderedList/client/index.js +1 -1
  277. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  278. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  279. package/dist/features/lists/unorderedList/server/index.js +6 -3
  280. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  281. package/dist/features/relationship/client/components/index.css +3 -6
  282. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  283. package/dist/features/relationship/client/drawer/index.js.map +1 -1
  284. package/dist/features/relationship/client/index.d.ts +2 -2
  285. package/dist/features/relationship/client/index.d.ts.map +1 -1
  286. package/dist/features/relationship/client/index.js.map +1 -1
  287. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  288. package/dist/features/relationship/client/nodes/RelationshipNode.js +0 -3
  289. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  290. package/dist/features/relationship/client/plugins/index.d.ts +2 -2
  291. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  292. package/dist/features/relationship/client/plugins/index.js +27 -31
  293. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  294. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts +2 -4
  295. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  296. package/dist/features/relationship/client/utils/useEnabledRelationships.js +53 -20
  297. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  298. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +2 -2
  299. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  300. package/dist/features/relationship/server/graphQLPopulationPromise.js +2 -2
  301. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  302. package/dist/features/relationship/server/index.d.ts +8 -1
  303. package/dist/features/relationship/server/index.d.ts.map +1 -1
  304. package/dist/features/relationship/server/index.js +28 -11
  305. package/dist/features/relationship/server/index.js.map +1 -1
  306. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  307. package/dist/features/relationship/server/nodes/RelationshipNode.js +1 -5
  308. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  309. package/dist/features/relationship/server/schema.d.ts +6 -5
  310. package/dist/features/relationship/server/schema.d.ts.map +1 -1
  311. package/dist/features/relationship/server/schema.js +31 -17
  312. package/dist/features/relationship/server/schema.js.map +1 -1
  313. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +1 -6
  314. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -1
  315. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +1 -5
  316. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -1
  317. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  318. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  319. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  320. package/dist/features/table/client/index.d.ts.map +1 -0
  321. package/dist/features/{experimental_table → table}/client/index.js +2 -2
  322. package/dist/features/table/client/index.js.map +1 -0
  323. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts +8 -0
  324. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.d.ts.map +1 -0
  325. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js +19 -0
  326. package/dist/features/table/client/plugins/TableActionMenuPlugin/computeSelectionCount.js.map +1 -0
  327. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.css +1 -2
  328. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -0
  329. package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.js +17 -44
  330. package/dist/features/table/client/plugins/TableActionMenuPlugin/index.js.map +1 -0
  331. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -0
  332. package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.js +47 -24
  333. package/dist/features/table/client/plugins/TableCellResizerPlugin/index.js.map +1 -0
  334. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +1 -0
  335. package/dist/features/table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -0
  336. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.css +0 -3
  337. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  338. package/dist/features/table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  339. package/dist/features/table/client/plugins/TablePlugin/index.d.ts.map +1 -0
  340. package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.js +54 -18
  341. package/dist/features/table/client/plugins/TablePlugin/index.js.map +1 -0
  342. package/dist/features/table/client/utils/debounce.d.ts.map +1 -0
  343. package/dist/features/table/client/utils/debounce.js.map +1 -0
  344. package/dist/features/table/client/utils/useDebounce.d.ts.map +1 -0
  345. package/dist/features/table/client/utils/useDebounce.js.map +1 -0
  346. package/dist/features/table/markdownTransformer.d.ts +5 -0
  347. package/dist/features/table/markdownTransformer.d.ts.map +1 -0
  348. package/dist/features/{experimental_table → table}/markdownTransformer.js +6 -3
  349. package/dist/features/table/markdownTransformer.js.map +1 -0
  350. package/dist/features/table/server/index.d.ts +3 -0
  351. package/dist/features/table/server/index.d.ts.map +1 -0
  352. package/dist/features/{experimental_table → table}/server/index.js +6 -6
  353. package/dist/features/table/server/index.js.map +1 -0
  354. package/dist/features/table/server/schema.d.ts.map +1 -0
  355. package/dist/features/table/server/schema.js.map +1 -0
  356. package/dist/features/textState/defaultColors.js +1 -1
  357. package/dist/features/textState/defaultColors.js.map +1 -1
  358. package/dist/features/textState/feature.client.js +1 -1
  359. package/dist/features/textState/feature.client.js.map +1 -1
  360. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts +8 -0
  361. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.d.ts.map +1 -0
  362. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js +80 -0
  363. package/dist/features/toolbars/fixed/client/Toolbar/horizontalWheelScroll.js.map +1 -0
  364. package/dist/features/toolbars/fixed/client/Toolbar/index.css +80 -8
  365. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  366. package/dist/features/toolbars/fixed/client/Toolbar/index.js +145 -71
  367. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  368. package/dist/features/toolbars/inline/client/Toolbar/index.css +2 -14
  369. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  370. package/dist/features/toolbars/inline/client/Toolbar/index.js +84 -37
  371. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  372. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  373. package/dist/features/toolbars/shared/ToolbarButton/index.js +27 -2
  374. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  375. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  376. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +199 -81
  377. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  378. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +23 -25
  379. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  380. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +22 -6
  381. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  382. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts +5 -0
  383. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.d.ts.map +1 -0
  384. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js +109 -0
  385. package/dist/features/toolbars/shared/useToolbarKeyboardNavigation.js.map +1 -0
  386. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  387. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  388. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  389. package/dist/features/typesClient.d.ts +1 -1
  390. package/dist/features/typesClient.d.ts.map +1 -1
  391. package/dist/features/typesClient.js.map +1 -1
  392. package/dist/features/typesServer.d.ts +19 -14
  393. package/dist/features/typesServer.d.ts.map +1 -1
  394. package/dist/features/typesServer.js.map +1 -1
  395. package/dist/features/upload/client/component/index.css +9 -11
  396. package/dist/features/upload/client/component/index.js +2 -1
  397. package/dist/features/upload/client/component/index.js.map +1 -1
  398. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  399. package/dist/features/upload/client/drawer/index.js.map +1 -1
  400. package/dist/features/upload/client/index.d.ts +3 -2
  401. package/dist/features/upload/client/index.d.ts.map +1 -1
  402. package/dist/features/upload/client/index.js.map +1 -1
  403. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  404. package/dist/features/upload/client/nodes/UploadNode.js +0 -7
  405. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  406. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  407. package/dist/features/upload/client/plugin/index.js +53 -56
  408. package/dist/features/upload/client/plugin/index.js.map +1 -1
  409. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +2 -2
  410. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  411. package/dist/features/upload/server/graphQLPopulationPromise.js +1 -1
  412. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  413. package/dist/features/upload/server/index.d.ts +7 -3
  414. package/dist/features/upload/server/index.d.ts.map +1 -1
  415. package/dist/features/upload/server/index.js +22 -18
  416. package/dist/features/upload/server/index.js.map +1 -1
  417. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  418. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  419. package/dist/features/upload/server/markdownTransformer.js +1 -1
  420. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  421. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  422. package/dist/features/upload/server/nodes/UploadNode.js +1 -9
  423. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  424. package/dist/features/upload/server/schema.d.ts +6 -18
  425. package/dist/features/upload/server/schema.d.ts.map +1 -1
  426. package/dist/features/upload/server/schema.js +34 -16
  427. package/dist/features/upload/server/schema.js.map +1 -1
  428. package/dist/features/upload/server/validate.d.ts +2 -2
  429. package/dist/features/upload/server/validate.d.ts.map +1 -1
  430. package/dist/features/upload/server/validate.js +4 -1
  431. package/dist/features/upload/server/validate.js.map +1 -1
  432. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  433. package/dist/field/Diff/converters/listitem/index.js +2 -1
  434. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  435. package/dist/field/Diff/converters/relationship/index.css +0 -1
  436. package/dist/field/Diff/converters/unknown/index.css +1 -2
  437. package/dist/field/Diff/converters/upload/index.css +0 -1
  438. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  439. package/dist/field/Diff/index.css +0 -2
  440. package/dist/field/Diff/index.d.ts +3 -2
  441. package/dist/field/Diff/index.d.ts.map +1 -1
  442. package/dist/field/Diff/index.js +3 -2
  443. package/dist/field/Diff/index.js.map +1 -1
  444. package/dist/field/Field.d.ts.map +1 -1
  445. package/dist/field/Field.js +26 -16
  446. package/dist/field/Field.js.map +1 -1
  447. package/dist/field/RenderLexical/index.d.ts +3 -1
  448. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  449. package/dist/field/RenderLexical/index.js +23 -23
  450. package/dist/field/RenderLexical/index.js.map +1 -1
  451. package/dist/field/ViewSelector.css +1 -1
  452. package/dist/field/ViewSelector.d.ts.map +1 -1
  453. package/dist/field/ViewSelector.js +13 -4
  454. package/dist/field/ViewSelector.js.map +1 -1
  455. package/dist/field/bundled.css +1 -1
  456. package/dist/field/index.css +7 -5
  457. package/dist/field/index.js.map +1 -1
  458. package/dist/field/rscEntry.d.ts +2 -2
  459. package/dist/field/rscEntry.d.ts.map +1 -1
  460. package/dist/field/rscEntry.js.map +1 -1
  461. package/dist/i18n.d.ts.map +1 -1
  462. package/dist/i18n.js +112 -0
  463. package/dist/i18n.js.map +1 -1
  464. package/dist/index.d.ts +6 -6
  465. package/dist/index.d.ts.map +1 -1
  466. package/dist/index.js +33 -54
  467. package/dist/index.js.map +1 -1
  468. package/dist/lexical/LexicalEditor.css +30 -19
  469. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  470. package/dist/lexical/LexicalEditor.js +62 -99
  471. package/dist/lexical/LexicalEditor.js.map +1 -1
  472. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  473. package/dist/lexical/LexicalProvider.js +7 -22
  474. package/dist/lexical/LexicalProvider.js.map +1 -1
  475. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  476. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  477. package/dist/lexical/config/server/loader.d.ts +1 -1
  478. package/dist/lexical/config/server/loader.d.ts.map +1 -1
  479. package/dist/lexical/config/server/loader.js +2 -2
  480. package/dist/lexical/config/server/loader.js.map +1 -1
  481. package/dist/lexical/config/server/sanitize.d.ts +1 -1
  482. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  483. package/dist/lexical/config/server/sanitize.js +2 -2
  484. package/dist/lexical/config/server/sanitize.js.map +1 -1
  485. package/dist/lexical/plugins/ClipboardPlugin/index.js.map +1 -1
  486. package/dist/lexical/plugins/DecoratorPlugin/index.css +1 -1
  487. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  488. package/dist/lexical/plugins/DecoratorPlugin/index.js +24 -21
  489. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  490. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +18 -25
  491. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  492. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +27 -14
  493. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  494. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  495. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  496. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  497. package/dist/lexical/plugins/NodeViewOverridePlugin/index.d.ts.map +1 -1
  498. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js +21 -0
  499. package/dist/lexical/plugins/NodeViewOverridePlugin/index.js.map +1 -1
  500. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts +0 -1
  501. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.d.ts.map +1 -1
  502. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js +236 -108
  503. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/LexicalMenu.js.map +1 -1
  504. package/dist/lexical/plugins/SlashMenu/index.css +1 -7
  505. package/dist/lexical/plugins/SlashMenu/useMenuTriggerMatch.js.map +1 -1
  506. package/dist/lexical/plugins/TextPlugin/index.js.map +1 -1
  507. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +2 -1
  508. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +2 -2
  509. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  510. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  511. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +21 -3
  512. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  513. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +140 -38
  514. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  515. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts +7 -0
  516. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.d.ts.map +1 -0
  517. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js +15 -0
  518. package/dist/lexical/plugins/handles/DraggableBlockPlugin/moveBlock.js.map +1 -0
  519. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts +7 -0
  520. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.d.ts.map +1 -0
  521. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js +62 -0
  522. package/dist/lexical/plugins/handles/DraggableBlockPlugin/useKeyboardReordering.js.map +1 -0
  523. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  524. package/dist/lexical/plugins/handles/utils/setHandlePosition.d.ts.map +1 -1
  525. package/dist/lexical/plugins/handles/utils/setHandlePosition.js +2 -0
  526. package/dist/lexical/plugins/handles/utils/setHandlePosition.js.map +1 -1
  527. package/dist/lexical/theme/EditorTheme.css +18 -21
  528. package/dist/lexical/ui/ContentEditable.css +22 -17
  529. package/dist/lexical/ui/ContentEditable.d.ts +2 -1
  530. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  531. package/dist/lexical/ui/ContentEditable.js +32 -11
  532. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  533. package/dist/lexical/ui/icons/H3/index.d.ts.map +1 -1
  534. package/dist/lexical/ui/icons/H3/index.js +13 -6
  535. package/dist/lexical/ui/icons/H3/index.js.map +1 -1
  536. package/dist/lexical/ui/icons/H4/index.d.ts.map +1 -1
  537. package/dist/lexical/ui/icons/H4/index.js +13 -6
  538. package/dist/lexical/ui/icons/H4/index.js.map +1 -1
  539. package/dist/lexical/ui/icons/H5/index.d.ts.map +1 -1
  540. package/dist/lexical/ui/icons/H5/index.js +13 -6
  541. package/dist/lexical/ui/icons/H5/index.js.map +1 -1
  542. package/dist/lexical/ui/icons/H6/index.d.ts.map +1 -1
  543. package/dist/lexical/ui/icons/H6/index.js +13 -6
  544. package/dist/lexical/ui/icons/H6/index.js.map +1 -1
  545. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  546. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  547. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  548. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  549. package/dist/lexical/utils/markdown/createBlockNode.d.ts +2 -2
  550. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  551. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  552. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  553. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  554. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  555. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  556. package/dist/lexical/utils/nodeFormat.d.ts.map +1 -1
  557. package/dist/lexical/utils/nodeFormat.js +0 -2
  558. package/dist/lexical/utils/nodeFormat.js.map +1 -1
  559. package/dist/lexical/utils/point.d.ts.map +1 -1
  560. package/dist/lexical/utils/rect.d.ts.map +1 -1
  561. package/dist/lexical/utils/url.d.ts.map +1 -1
  562. package/dist/lexical/utils/url.js +1 -1
  563. package/dist/lexical/utils/url.js.map +1 -1
  564. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  565. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  566. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  567. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  568. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts +2 -0
  569. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.d.ts.map +1 -0
  570. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js +2 -0
  571. package/dist/lexical-proxy/@lexical-react/ExtensionComponent.js.map +1 -0
  572. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts +2 -0
  573. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.d.ts.map +1 -0
  574. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js +2 -0
  575. package/dist/lexical-proxy/@lexical-react/LexicalExtensionComposer.js.map +1 -0
  576. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts +2 -0
  577. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.d.ts.map +1 -0
  578. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js +2 -0
  579. package/dist/lexical-proxy/@lexical-react/LexicalExtensionEditorComposer.js.map +1 -0
  580. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts +2 -0
  581. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.d.ts.map +1 -0
  582. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js +2 -0
  583. package/dist/lexical-proxy/@lexical-react/LexicalSelectionAlwaysOnDisplay.js.map +1 -0
  584. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts +2 -0
  585. package/dist/lexical-proxy/@lexical-react/ReactExtension.d.ts.map +1 -0
  586. package/dist/lexical-proxy/@lexical-react/ReactExtension.js +2 -0
  587. package/dist/lexical-proxy/@lexical-react/ReactExtension.js.map +1 -0
  588. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts +2 -0
  589. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.d.ts.map +1 -0
  590. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js +2 -0
  591. package/dist/lexical-proxy/@lexical-react/ReactPluginHostExtension.js.map +1 -0
  592. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts +2 -0
  593. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.d.ts.map +1 -0
  594. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js +2 -0
  595. package/dist/lexical-proxy/@lexical-react/ReactProviderExtension.js.map +1 -0
  596. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts +2 -0
  597. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.d.ts.map +1 -0
  598. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js +2 -0
  599. package/dist/lexical-proxy/@lexical-react/TreeViewExtension.js.map +1 -0
  600. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts +2 -0
  601. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.d.ts.map +1 -0
  602. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js +2 -0
  603. package/dist/lexical-proxy/@lexical-react/useExtensionComponent.js.map +1 -0
  604. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts +2 -0
  605. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.d.ts.map +1 -0
  606. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js +2 -0
  607. package/dist/lexical-proxy/@lexical-react/useExtensionSignalValue.js.map +1 -0
  608. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts +2 -0
  609. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.d.ts.map +1 -0
  610. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js +2 -0
  611. package/dist/lexical-proxy/@lexical-react/useLexicalAriaLiveRegion.js.map +1 -0
  612. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts +2 -0
  613. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.d.ts.map +1 -0
  614. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js +2 -0
  615. package/dist/lexical-proxy/@lexical-react/useLexicalFocusManagerRef.js.map +1 -0
  616. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts +2 -0
  617. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.d.ts.map +1 -0
  618. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js +2 -0
  619. package/dist/lexical-proxy/@lexical-react/useLexicalFocusTrapRef.js.map +1 -0
  620. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts +2 -0
  621. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.d.ts.map +1 -0
  622. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js +2 -0
  623. package/dist/lexical-proxy/@lexical-react/useLexicalRovingTabIndexRef.js.map +1 -0
  624. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts +2 -0
  625. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.d.ts.map +1 -0
  626. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js +2 -0
  627. package/dist/lexical-proxy/@lexical-react/useLexicalSlotRef.js.map +1 -0
  628. package/dist/populateGraphQL/populate.js.map +1 -1
  629. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  630. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  631. package/dist/presets/llmInstructions.d.ts +2 -0
  632. package/dist/presets/llmInstructions.d.ts.map +1 -0
  633. package/dist/presets/llmInstructions.js +13 -0
  634. package/dist/presets/llmInstructions.js.map +1 -0
  635. package/dist/types/builtInNodes.d.ts +1 -1
  636. package/dist/types/builtInNodes.d.ts.map +1 -1
  637. package/dist/types/builtInNodes.js +8 -3
  638. package/dist/types/builtInNodes.js.map +1 -1
  639. package/dist/types/index.d.ts +4 -7
  640. package/dist/types/index.d.ts.map +1 -1
  641. package/dist/types/index.js.map +1 -1
  642. package/dist/types/jsonSchemaHelpers.d.ts +5 -1
  643. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -1
  644. package/dist/types/jsonSchemaHelpers.js +7 -2
  645. package/dist/types/jsonSchemaHelpers.js.map +1 -1
  646. package/dist/types/nodeTypes.d.ts +6 -1
  647. package/dist/types/nodeTypes.d.ts.map +1 -1
  648. package/dist/types/nodeTypes.js.map +1 -1
  649. package/dist/types/schema.d.ts.map +1 -1
  650. package/dist/types/schema.js +12 -5
  651. package/dist/types/schema.js.map +1 -1
  652. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  653. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  654. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  655. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  656. package/dist/utilities/buildEditorState.js.map +1 -1
  657. package/dist/utilities/buildInitialState.d.ts +3 -2
  658. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  659. package/dist/utilities/buildInitialState.js +1 -0
  660. package/dist/utilities/buildInitialState.js.map +1 -1
  661. package/dist/utilities/createServerFeature.d.ts +1 -1
  662. package/dist/utilities/createServerFeature.d.ts.map +1 -1
  663. package/dist/utilities/createServerFeature.js +2 -2
  664. package/dist/utilities/createServerFeature.js.map +1 -1
  665. package/dist/utilities/editorConfigFactory.d.ts +6 -6
  666. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  667. package/dist/utilities/editorConfigFactory.js +9 -9
  668. package/dist/utilities/editorConfigFactory.js.map +1 -1
  669. package/dist/utilities/fieldsDrawer/Drawer.js +36 -36
  670. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  671. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  672. package/dist/utilities/fieldsDrawer/DrawerContent.js +6 -9
  673. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  674. package/dist/utilities/fieldsDrawer/index.css +4 -4
  675. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +1 -1
  676. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -1
  677. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -1
  678. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  679. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  680. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  681. package/dist/utilities/fieldsDrawer/useLexicalDrawer.js.map +1 -1
  682. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  683. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.js.map +1 -1
  684. package/dist/utilities/generateImportMap.d.ts +3 -3
  685. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  686. package/dist/utilities/generateImportMap.js +3 -7
  687. package/dist/utilities/generateImportMap.js.map +1 -1
  688. package/dist/utilities/generateSchemaMap.d.ts +1 -1
  689. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  690. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts +2 -2
  691. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  692. package/dist/utilities/getDefaultSanitizedEditorConfig.js +6 -17
  693. package/dist/utilities/getDefaultSanitizedEditorConfig.js.map +1 -1
  694. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  695. package/dist/utilities/initLexicalFeatures.js +38 -4
  696. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  697. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  698. package/dist/utilities/upgradeLexicalData/index.js +6 -3
  699. package/dist/utilities/upgradeLexicalData/index.js.map +1 -1
  700. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  701. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  702. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  703. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  704. package/dist/utilities/useLexicalFeature.js +15 -6
  705. package/dist/utilities/useLexicalFeature.js.map +1 -1
  706. package/dist/utilities/useRunDeprioritized.js.map +1 -1
  707. package/dist/validate/hasText.d.ts +2 -2
  708. package/dist/validate/hasText.d.ts.map +1 -1
  709. package/dist/validate/hasText.js.map +1 -1
  710. package/dist/validate/index.d.ts +1 -1
  711. package/dist/validate/index.d.ts.map +1 -1
  712. package/package.json +124 -59
  713. package/dist/@types/assets.d.js +0 -2
  714. package/dist/@types/assets.d.js.map +0 -1
  715. package/dist/dependencyChecker.spec.js +0 -16
  716. package/dist/dependencyChecker.spec.js.map +0 -1
  717. package/dist/exports/client/Field-VYBSMSRY.js +0 -2
  718. package/dist/exports/client/Field-VYBSMSRY.js.map +0 -7
  719. package/dist/exports/client/bundled.css +0 -1
  720. package/dist/exports/client/chunk-LH634DPU.js +0 -12
  721. package/dist/exports/client/chunk-LH634DPU.js.map +0 -7
  722. package/dist/exports/client/chunk-UD4DQ4AK.js +0 -2
  723. package/dist/exports/client/chunk-UD4DQ4AK.js.map +0 -7
  724. package/dist/exports/client/chunk-ZYXHC5CY.js +0 -2
  725. package/dist/exports/client/chunk-ZYXHC5CY.js.map +0 -7
  726. package/dist/exports/client/component-PHZQBOJE.js +0 -2
  727. package/dist/exports/client/component-PHZQBOJE.js.map +0 -7
  728. package/dist/exports/client/componentInline-R3EPNYWF.js +0 -2
  729. package/dist/exports/server/rsc.browser.d.ts +0 -11
  730. package/dist/exports/server/rsc.browser.d.ts.map +0 -1
  731. package/dist/exports/server/rsc.browser.js +0 -10
  732. package/dist/exports/server/rsc.browser.js.map +0 -1
  733. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  734. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  735. package/dist/features/blockquote/markdownTransformer.js +0 -33
  736. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  737. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts +0 -11
  738. package/dist/features/blocks/client/component/removeEmptyArrayValues.d.ts.map +0 -1
  739. package/dist/features/blocks/client/component/removeEmptyArrayValues.js +0 -20
  740. package/dist/features/blocks/client/component/removeEmptyArrayValues.js.map +0 -1
  741. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js +0 -180
  742. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +0 -1
  743. package/dist/features/experimental_table/client/index.d.ts.map +0 -1
  744. package/dist/features/experimental_table/client/index.js.map +0 -1
  745. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +0 -1
  746. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +0 -1
  747. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +0 -1
  748. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +0 -1
  749. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.d.ts.map +0 -1
  750. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +0 -1
  751. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +0 -1
  752. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +0 -1
  753. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +0 -1
  754. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +0 -1
  755. package/dist/features/experimental_table/client/utils/debounce.d.ts.map +0 -1
  756. package/dist/features/experimental_table/client/utils/debounce.js.map +0 -1
  757. package/dist/features/experimental_table/client/utils/useDebounce.d.ts.map +0 -1
  758. package/dist/features/experimental_table/client/utils/useDebounce.js.map +0 -1
  759. package/dist/features/experimental_table/markdownTransformer.d.ts +0 -5
  760. package/dist/features/experimental_table/markdownTransformer.d.ts.map +0 -1
  761. package/dist/features/experimental_table/markdownTransformer.js.map +0 -1
  762. package/dist/features/experimental_table/server/index.d.ts +0 -3
  763. package/dist/features/experimental_table/server/index.d.ts.map +0 -1
  764. package/dist/features/experimental_table/server/index.js.map +0 -1
  765. package/dist/features/experimental_table/server/schema.d.ts.map +0 -1
  766. package/dist/features/experimental_table/server/schema.js.map +0 -1
  767. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  768. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  769. package/dist/features/format/bold/markdownTransformers.js +0 -23
  770. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  771. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  772. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  773. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  774. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  775. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  776. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  777. package/dist/features/format/italic/markdownTransformers.js +0 -12
  778. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  779. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  780. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  781. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  782. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  783. package/dist/features/link/markdownTransformer.spec.js +0 -195
  784. package/dist/features/link/markdownTransformer.spec.js.map +0 -1
  785. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  786. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  787. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  788. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  789. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  790. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  791. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  792. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  793. package/dist/features/lists/shared/markdown.d.ts +0 -6
  794. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  795. package/dist/features/lists/shared/markdown.js +0 -57
  796. package/dist/features/lists/shared/markdown.js.map +0 -1
  797. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  798. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  799. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  800. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  801. package/dist/field/clientEntry.d.ts +0 -29
  802. package/dist/field/clientEntry.d.ts.map +0 -1
  803. package/dist/field/clientEntry.js +0 -86
  804. package/dist/field/clientEntry.js.map +0 -1
  805. package/dist/lexical/utils/guard.d.ts +0 -5
  806. package/dist/lexical/utils/guard.d.ts.map +0 -1
  807. package/dist/lexical/utils/guard.js +0 -9
  808. package/dist/lexical/utils/guard.js.map +0 -1
  809. package/dist/lexical/utils/url.spec.js +0 -114
  810. package/dist/lexical/utils/url.spec.js.map +0 -1
  811. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  812. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  813. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  814. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  815. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  816. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  817. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  818. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  819. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  820. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  821. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  822. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  823. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  824. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  825. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  826. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  827. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  828. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  829. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  830. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  831. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  832. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  833. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  834. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  835. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  836. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  837. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  838. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  839. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  840. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  841. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  842. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  843. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  844. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  845. package/dist/packages/@lexical/markdown/index.js +0 -39
  846. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  847. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  848. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  849. package/dist/packages/@lexical/markdown/utils.js +0 -267
  850. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  851. package/dist/utilities/jsx/jsx.spec.js +0 -178
  852. package/dist/utilities/jsx/jsx.spec.js.map +0 -1
  853. /package/dist/exports/client/{RelationshipComponent-YCPAKOL7.js.map → RelationshipComponent-TVK6I4W4.js.map} +0 -0
  854. /package/dist/exports/client/{componentInline-R3EPNYWF.js.map → componentInline-AU7IBNY7.js.map} +0 -0
  855. /package/dist/features/{experimental_table → table}/client/index.d.ts +0 -0
  856. /package/dist/features/{experimental_table → table}/client/plugins/TableActionMenuPlugin/index.d.ts +0 -0
  857. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.css +0 -0
  858. /package/dist/features/{experimental_table → table}/client/plugins/TableCellResizerPlugin/index.d.ts +0 -0
  859. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.d.ts +0 -0
  860. /package/dist/features/{experimental_table → table}/client/plugins/TableHoverActionsPlugin/index.js +0 -0
  861. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.d.ts +0 -0
  862. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/TableGridPopup/index.js +0 -0
  863. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.css +0 -0
  864. /package/dist/features/{experimental_table → table}/client/plugins/TablePlugin/index.d.ts +0 -0
  865. /package/dist/features/{experimental_table → table}/client/utils/debounce.d.ts +0 -0
  866. /package/dist/features/{experimental_table → table}/client/utils/debounce.js +0 -0
  867. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.d.ts +0 -0
  868. /package/dist/features/{experimental_table → table}/client/utils/useDebounce.js +0 -0
  869. /package/dist/features/{experimental_table → table}/server/schema.d.ts +0 -0
  870. /package/dist/features/{experimental_table → table}/server/schema.js +0 -0
@@ -1,100 +1,155 @@
1
1
  'use client';
2
2
 
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
4
5
  import { CodeField, useFormFields } from '@payloadcms/ui';
5
6
  import React, { useId, useMemo } from 'react';
6
7
  import { defaultLanguages } from './defaultLanguages.js';
7
- export const CodeComponent = ({
8
- autoComplete,
9
- field,
10
- forceRender,
11
- languages = defaultLanguages,
12
- path,
13
- permissions,
14
- readOnly,
15
- renderedBlocks,
16
- schemaPath,
17
- typescript,
18
- validate
19
- }) => {
20
- const languageField = useFormFields(([fields]) => fields['language']);
21
- const language = languageField?.value || languageField?.initialValue || 'typescript';
22
- // unique id per component instance to ensure Monaco creates a distinct model
23
- // for each TypeScript code block. Using React's useId is SSR-safe and builtin.
8
+ export const CodeComponent = t0 => {
9
+ const $ = _c(22);
10
+ const {
11
+ autoComplete,
12
+ field,
13
+ forceRender,
14
+ languages: t1,
15
+ path,
16
+ permissions,
17
+ readOnly,
18
+ renderedBlocks,
19
+ schemaPath,
20
+ typescript,
21
+ validate
22
+ } = t0;
23
+ const languages = t1 === undefined ? defaultLanguages : t1;
24
+ const languageField = useFormFields(_temp);
25
+ const language = languageField?.value || languageField?.initialValue || "typescript";
24
26
  const instanceId = useId();
25
27
  const label = languages[language];
26
- const props = useMemo(() => ({
27
- ...field,
28
- type: 'code',
29
- admin: {
28
+ let t2;
29
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
30
+ t2 = {};
31
+ $[0] = t2;
32
+ } else {
33
+ t2 = $[0];
34
+ }
35
+ const t3 = language === "ts" ? `file-${field.name}-${instanceId}.tsx` : undefined;
36
+ let t4;
37
+ if ($[1] !== t3) {
38
+ t4 = {
39
+ defaultPath: t3
40
+ };
41
+ $[1] = t3;
42
+ $[2] = t4;
43
+ } else {
44
+ t4 = $[2];
45
+ }
46
+ let t5;
47
+ if ($[3] !== field.admin || $[4] !== language || $[5] !== t4) {
48
+ t5 = {
30
49
  ...field.admin,
31
- editorOptions: {},
32
- editorProps: {
33
- // If typescript is set, @monaco-editor/react needs to set the URI to a .ts or .tsx file when it calls createModel().
34
- // Provide a unique defaultPath per instance so Monaco doesn't reuse the same model
35
- // across multiple code block instances. We use field.name + instanceId for debugability.
36
- defaultPath: language === 'ts' ? `file-${field.name}-${instanceId}.tsx` : undefined
37
- },
50
+ editorOptions: t2,
51
+ editorProps: t4,
38
52
  language
39
- }
40
- }), [field, language, instanceId]);
53
+ };
54
+ $[3] = field.admin;
55
+ $[4] = language;
56
+ $[5] = t4;
57
+ $[6] = t5;
58
+ } else {
59
+ t5 = $[6];
60
+ }
61
+ let t6;
62
+ if ($[7] !== field || $[8] !== t5) {
63
+ t6 = {
64
+ ...field,
65
+ type: "code",
66
+ admin: t5
67
+ };
68
+ $[7] = field;
69
+ $[8] = t5;
70
+ $[9] = t6;
71
+ } else {
72
+ t6 = $[9];
73
+ }
74
+ const props = t6;
41
75
  const key = `${field.name}-${language}-${label}`;
42
- return props && /*#__PURE__*/_jsx(CodeField, {
43
- autoComplete: autoComplete,
44
- field: props,
45
- forceRender: forceRender,
46
- onMount: (_editor, monaco) => {
47
- monaco.editor.defineTheme('vs-dark', {
48
- base: 'vs-dark',
49
- colors: {
50
- 'editor.background': '#222222'
51
- },
52
- inherit: true,
53
- rules: []
54
- });
55
- monaco.editor.defineTheme('vs', {
56
- base: 'vs',
57
- colors: {
58
- 'editor.background': '#f5f5f5'
59
- },
60
- inherit: true,
61
- rules: []
62
- });
63
- monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
64
- allowNonTsExtensions: true,
65
- // Set module resolution to NodeJs to enable autocompletion
66
- allowJs: true,
67
- allowSyntheticDefaultImports: true,
68
- esModuleInterop: true,
69
- jsx: monaco.languages.typescript.JsxEmit.React,
70
- moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
71
- noEmit: true,
72
- paths: typescript?.paths,
73
- reactNamespace: 'React',
74
- target: monaco.languages.typescript.ScriptTarget[typescript?.target ?? 'ESNext'],
75
- typeRoots: typescript?.typeRoots ?? ['node_modules/@types']
76
- });
77
- monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
78
- noSemanticValidation: typescript?.enableSemanticValidation ? false : true,
79
- noSyntaxValidation: false
80
- });
81
- const run = async () => {
82
- if (typescript?.fetchTypes && Array.isArray(typescript.fetchTypes) && typescript.fetchTypes.length > 0) {
83
- await Promise.all(typescript.fetchTypes.map(async type => {
84
- const types = await fetch(type.url);
85
- const typesText = await types.text();
86
- monaco.languages.typescript.typescriptDefaults.addExtraLib(typesText, type.filePath);
87
- }));
88
- }
89
- };
90
- void run();
91
- },
92
- path: path,
93
- permissions: permissions,
94
- readOnly: readOnly,
95
- renderedBlocks: renderedBlocks,
96
- schemaPath: schemaPath,
97
- validate: validate
98
- }, key);
76
+ let t7;
77
+ if ($[10] !== autoComplete || $[11] !== forceRender || $[12] !== key || $[13] !== path || $[14] !== permissions || $[15] !== props || $[16] !== readOnly || $[17] !== renderedBlocks || $[18] !== schemaPath || $[19] !== typescript || $[20] !== validate) {
78
+ t7 = props && _jsx(CodeField, {
79
+ autoComplete,
80
+ field: props,
81
+ forceRender,
82
+ onMount: (_editor, monaco) => {
83
+ monaco.editor.defineTheme("vs-dark", {
84
+ base: "vs-dark",
85
+ colors: {
86
+ "editor.background": "#222222"
87
+ },
88
+ inherit: true,
89
+ rules: []
90
+ });
91
+ monaco.editor.defineTheme("vs", {
92
+ base: "vs",
93
+ colors: {
94
+ "editor.background": "#f5f5f5"
95
+ },
96
+ inherit: true,
97
+ rules: []
98
+ });
99
+ monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
100
+ allowNonTsExtensions: true,
101
+ allowJs: true,
102
+ allowSyntheticDefaultImports: true,
103
+ esModuleInterop: true,
104
+ jsx: monaco.languages.typescript.JsxEmit.React,
105
+ moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
106
+ noEmit: true,
107
+ paths: typescript?.paths,
108
+ reactNamespace: "React",
109
+ target: monaco.languages.typescript.ScriptTarget[typescript?.target ?? "ESNext"],
110
+ typeRoots: typescript?.typeRoots ?? ["node_modules/@types"]
111
+ });
112
+ monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({
113
+ noSemanticValidation: typescript?.enableSemanticValidation ? false : true,
114
+ noSyntaxValidation: false
115
+ });
116
+ const run = async () => {
117
+ if (typescript?.fetchTypes && Array.isArray(typescript.fetchTypes) && typescript.fetchTypes.length > 0) {
118
+ await Promise.all(typescript.fetchTypes.map(async type => {
119
+ const types = await fetch(type.url);
120
+ const typesText = await types.text();
121
+ monaco.languages.typescript.typescriptDefaults.addExtraLib(typesText, type.filePath);
122
+ }));
123
+ }
124
+ };
125
+ run();
126
+ },
127
+ path,
128
+ permissions,
129
+ readOnly,
130
+ renderedBlocks,
131
+ schemaPath,
132
+ validate
133
+ }, key);
134
+ $[10] = autoComplete;
135
+ $[11] = forceRender;
136
+ $[12] = key;
137
+ $[13] = path;
138
+ $[14] = permissions;
139
+ $[15] = props;
140
+ $[16] = readOnly;
141
+ $[17] = renderedBlocks;
142
+ $[18] = schemaPath;
143
+ $[19] = typescript;
144
+ $[20] = validate;
145
+ $[21] = t7;
146
+ } else {
147
+ t7 = $[21];
148
+ }
149
+ return t7;
99
150
  };
151
+ function _temp(t0) {
152
+ const [fields] = t0;
153
+ return fields.language;
154
+ }
100
155
  //# sourceMappingURL=Code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","names":["CodeField","useFormFields","React","useId","useMemo","defaultLanguages","CodeComponent","autoComplete","field","forceRender","languages","path","permissions","readOnly","renderedBlocks","schemaPath","typescript","validate","languageField","fields","language","value","initialValue","instanceId","label","props","type","admin","editorOptions","editorProps","defaultPath","name","undefined","key","_jsx","onMount","_editor","monaco","editor","defineTheme","base","colors","inherit","rules","typescriptDefaults","setCompilerOptions","allowNonTsExtensions","allowJs","allowSyntheticDefaultImports","esModuleInterop","jsx","JsxEmit","moduleResolution","ModuleResolutionKind","NodeJs","noEmit","paths","reactNamespace","target","ScriptTarget","typeRoots","setDiagnosticsOptions","noSemanticValidation","enableSemanticValidation","noSyntaxValidation","run","fetchTypes","Array","isArray","length","Promise","all","map","types","fetch","url","typesText","text","addExtraLib","filePath"],"sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Code.tsx"],"sourcesContent":["'use client'\n\nimport type { CodeFieldClient, CodeFieldClientProps } from 'payload'\n\nimport { CodeField, useFormFields } from '@payloadcms/ui'\nimport React, { useId, useMemo } from 'react'\n\nimport { defaultLanguages } from './defaultLanguages.js'\n\nexport type AdditionalCodeComponentProps = {\n /**\n * @default first key of the `languages` prop\n */\n defaultLanguage?: string\n /**\n * @default all languages supported by Monaco Editor\n */\n languages?: Record<string, string>\n /**\n * Override the name of the block.\n *\n * @default 'Code'\n */\n slug?: string\n /**\n * Configure typescript settings for the editor\n */\n typescript?: {\n /**\n * By default, the editor will not perform semantic validation. This means that\n * while syntax errors will be highlighted, other issues like missing imports or incorrect\n * types will not be.\n *\n * @default false\n */\n enableSemanticValidation?: boolean\n /**\n * Additional types to fetch and include in the editor for autocompletion.\n *\n * For example, to include types for payload, you would set this to\n *\n * [{ url: 'https://unpkg.com/payload@latest/dist/index.d.ts', filePath: 'file:///node_modules/payload/index.d.ts' }]\n */\n fetchTypes?: Array<{\n filePath: string\n url: string\n }>\n /**\n * @default undefined\n */\n paths?: Record<string, string[]>\n /**\n * @default \"ESNext\"\n */\n target?: string\n /**\n * @default ['node_modules/@types']\n */\n typeRoots?: string[]\n }\n}\n\nexport const CodeComponent: React.FC<AdditionalCodeComponentProps & CodeFieldClientProps> = ({\n autoComplete,\n field,\n forceRender,\n languages = defaultLanguages,\n path,\n permissions,\n readOnly,\n renderedBlocks,\n schemaPath,\n typescript,\n validate,\n}) => {\n const languageField = useFormFields(([fields]) => fields['language'])\n\n const language: string =\n (languageField?.value as string) || (languageField?.initialValue as string) || 'typescript'\n\n // unique id per component instance to ensure Monaco creates a distinct model\n // for each TypeScript code block. Using React's useId is SSR-safe and builtin.\n const instanceId = useId()\n\n const label = languages[language]\n\n const props: CodeFieldClient = useMemo<CodeFieldClient>(\n () => ({\n ...field,\n type: 'code',\n admin: {\n ...field.admin,\n editorOptions: {},\n editorProps: {\n // If typescript is set, @monaco-editor/react needs to set the URI to a .ts or .tsx file when it calls createModel().\n // Provide a unique defaultPath per instance so Monaco doesn't reuse the same model\n // across multiple code block instances. We use field.name + instanceId for debugability.\n defaultPath: language === 'ts' ? `file-${field.name}-${instanceId}.tsx` : undefined,\n },\n language,\n },\n }),\n [field, language, instanceId],\n )\n\n const key = `${field.name}-${language}-${label}`\n\n return (\n props && (\n <CodeField\n autoComplete={autoComplete}\n field={props}\n forceRender={forceRender}\n key={key}\n onMount={(_editor, monaco) => {\n monaco.editor.defineTheme('vs-dark', {\n base: 'vs-dark',\n colors: {\n 'editor.background': '#222222',\n },\n inherit: true,\n rules: [],\n })\n\n monaco.editor.defineTheme('vs', {\n base: 'vs',\n colors: {\n 'editor.background': '#f5f5f5',\n },\n inherit: true,\n rules: [],\n })\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n allowNonTsExtensions: true,\n // Set module resolution to NodeJs to enable autocompletion\n allowJs: true,\n allowSyntheticDefaultImports: true,\n esModuleInterop: true,\n jsx: monaco.languages.typescript.JsxEmit.React,\n moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,\n noEmit: true,\n paths: typescript?.paths,\n reactNamespace: 'React',\n target: monaco.languages.typescript.ScriptTarget[\n typescript?.target ?? ('ESNext' as any)\n ] as any,\n typeRoots: typescript?.typeRoots ?? ['node_modules/@types'],\n })\n\n monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({\n noSemanticValidation: typescript?.enableSemanticValidation ? false : true,\n noSyntaxValidation: false,\n })\n\n const run = async () => {\n if (\n typescript?.fetchTypes &&\n Array.isArray(typescript.fetchTypes) &&\n typescript.fetchTypes.length > 0\n ) {\n await Promise.all(\n typescript.fetchTypes.map(async (type) => {\n const types = await fetch(type.url)\n const typesText = await types.text()\n monaco.languages.typescript.typescriptDefaults.addExtraLib(\n typesText,\n type.filePath,\n )\n }),\n )\n }\n }\n void run()\n }}\n path={path}\n permissions={permissions}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AWkD,UAAU,KACnClD,UAAA,CAAWkD,UAAU,CAACG,MAAM,GAAG,GAC/B;UACA,MAAMC,OAAA,CAAQC,GAAG,CACfvD,UAAA,CAAWkD,UAAU,CAACM,GAAG,CAAC,MAAO9C,IAAA;YAC/B,MAAM+C,KAAA,GAAQ,MAAMC,KAAA,CAAMhD,IAAA,CAAKiD,GAAG;YAClC,MAAMC,SAAA,GAAY,MAAMH,KAAA,CAAMI,IAAI;YAClCxC,MAAA,CAAO3B,SAAS,CAACM,UAAU,CAAC4B,kBAAkB,CAACkC,WAAW,CACxDF,SAAA,EACAlD,IAAA,CAAKqD,QAAQ;UAEjB;QAEJ;MACF;MACA,KAAKd,GAAA;IACP;IACAtD,IAAA,EAAMA,IAAA;IACNC,WAAA,EAAaA,WAAA;IACbC,QAAA,EAAUA,QAAA;IACVC,cAAA,EAAgBA,cAAA;IAChBC,UAAA,EAAYA,UAAA;IACZE,QAAA,EAAUA;KAlELgB,GAAA;AAsEb","ignoreList":[]}
1
+ {"version":3,"file":"Code.js","names":["c","_c","CodeField","useFormFields","React","useId","useMemo","defaultLanguages","CodeComponent","t0","$","autoComplete","field","forceRender","languages","t1","path","permissions","readOnly","renderedBlocks","schemaPath","typescript","validate","undefined","languageField","_temp","language","value","initialValue","instanceId","label","t2","Symbol","for","t3","name","t4","defaultPath","t5","admin","editorOptions","editorProps","t6","type","props","key","t7","_jsx","onMount","_editor","monaco","editor","defineTheme","base","colors","inherit","rules","typescriptDefaults","setCompilerOptions","allowNonTsExtensions","allowJs","allowSyntheticDefaultImports","esModuleInterop","jsx","JsxEmit","moduleResolution","ModuleResolutionKind","NodeJs","noEmit","paths","reactNamespace","target","ScriptTarget","typeRoots","setDiagnosticsOptions","noSemanticValidation","enableSemanticValidation","noSyntaxValidation","run","fetchTypes","Array","isArray","length","Promise","all","map","types","fetch","url","typesText","text","addExtraLib","filePath","fields"],"sources":["../../../../../../src/features/blocks/premade/CodeBlock/Component/Code.tsx"],"sourcesContent":["'use client'\n\nimport type { CodeFieldClient, CodeFieldClientProps } from 'payload'\n\nimport { CodeField, useFormFields } from '@payloadcms/ui'\nimport React, { useId, useMemo } from 'react'\n\nimport { defaultLanguages } from './defaultLanguages.js'\n\nexport type AdditionalCodeComponentProps = {\n /**\n * @default first key of the `languages` prop\n */\n defaultLanguage?: string\n /**\n * @default all languages supported by Monaco Editor\n */\n languages?: Record<string, string>\n /**\n * Override the name of the block.\n *\n * @default 'Code'\n */\n slug?: string\n /**\n * Configure typescript settings for the editor\n */\n typescript?: {\n /**\n * By default, the editor will not perform semantic validation. This means that\n * while syntax errors will be highlighted, other issues like missing imports or incorrect\n * types will not be.\n *\n * @default false\n */\n enableSemanticValidation?: boolean\n /**\n * Additional types to fetch and include in the editor for autocompletion.\n *\n * For example, to include types for payload, you would set this to\n *\n * [{ url: 'https://unpkg.com/payload@latest/dist/index.d.ts', filePath: 'file:///node_modules/payload/index.d.ts' }]\n */\n fetchTypes?: Array<{\n filePath: string\n url: string\n }>\n /**\n * @default undefined\n */\n paths?: Record<string, string[]>\n /**\n * @default \"ESNext\"\n */\n target?: string\n /**\n * @default ['node_modules/@types']\n */\n typeRoots?: string[]\n }\n}\n\nexport const CodeComponent: React.FC<AdditionalCodeComponentProps & CodeFieldClientProps> = ({\n autoComplete,\n field,\n forceRender,\n languages = defaultLanguages,\n path,\n permissions,\n readOnly,\n renderedBlocks,\n schemaPath,\n typescript,\n validate,\n}) => {\n const languageField = useFormFields(([fields]) => fields['language'])\n\n const language: string =\n (languageField?.value as string) || (languageField?.initialValue as string) || 'typescript'\n\n // unique id per component instance to ensure Monaco creates a distinct model\n // for each TypeScript code block. Using React's useId is SSR-safe and builtin.\n const instanceId = useId()\n\n const label = languages[language]\n\n const props: CodeFieldClient = useMemo<CodeFieldClient>(\n () => ({\n ...field,\n type: 'code',\n admin: {\n ...field.admin,\n editorOptions: {},\n editorProps: {\n // If typescript is set, @monaco-editor/react needs to set the URI to a .ts or .tsx file when it calls createModel().\n // Provide a unique defaultPath per instance so Monaco doesn't reuse the same model\n // across multiple code block instances. We use field.name + instanceId for debugability.\n defaultPath: language === 'ts' ? `file-${field.name}-${instanceId}.tsx` : undefined,\n },\n language,\n },\n }),\n [field, language, instanceId],\n )\n\n const key = `${field.name}-${language}-${label}`\n\n return (\n props && (\n <CodeField\n autoComplete={autoComplete}\n field={props}\n forceRender={forceRender}\n key={key}\n onMount={(_editor, monaco) => {\n monaco.editor.defineTheme('vs-dark', {\n base: 'vs-dark',\n colors: {\n 'editor.background': '#222222',\n },\n inherit: true,\n rules: [],\n })\n\n monaco.editor.defineTheme('vs', {\n base: 'vs',\n colors: {\n 'editor.background': '#f5f5f5',\n },\n inherit: true,\n rules: [],\n })\n monaco.languages.typescript.typescriptDefaults.setCompilerOptions({\n allowNonTsExtensions: true,\n // Set module resolution to NodeJs to enable autocompletion\n allowJs: true,\n allowSyntheticDefaultImports: true,\n esModuleInterop: true,\n jsx: monaco.languages.typescript.JsxEmit.React,\n moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,\n noEmit: true,\n paths: typescript?.paths,\n reactNamespace: 'React',\n target: monaco.languages.typescript.ScriptTarget[\n typescript?.target ?? ('ESNext' as any)\n ] as any,\n typeRoots: typescript?.typeRoots ?? ['node_modules/@types'],\n })\n\n monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({\n noSemanticValidation: typescript?.enableSemanticValidation ? false : true,\n noSyntaxValidation: false,\n })\n\n const run = async () => {\n if (\n typescript?.fetchTypes &&\n Array.isArray(typescript.fetchTypes) &&\n typescript.fetchTypes.length > 0\n ) {\n await Promise.all(\n typescript.fetchTypes.map(async (type) => {\n const types = await fetch(type.url)\n const typesText = await types.text()\n monaco.languages.typescript.typescriptDefaults.addExtraLib(\n typesText,\n type.filePath,\n )\n }),\n )\n }\n }\n void run()\n }}\n path={path}\n permissions={permissions}\n readOnly={readOnly}\n renderedBlocks={renderedBlocks}\n schemaPath={schemaPath}\n validate={validate}\n />\n )\n )\n}\n"],"mapp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/B1D,UAAA,CAAA0D,UAAqB,CAAAG,MAAO,GAAG;YAE/B,MAAMC,OAAA,CAAAC,GAAW,CACf/D,UAAA,CAAA0D,UAAqB,CAAAM,GAAI,CAAC,MAAA1C,IAAA;cACxB,MAAA2C,KAAA,GAAc,MAAMC,KAAA,CAAM5C,IAAA,CAAA6C,GAAQ;cAClC,MAAAC,SAAA,GAAkB,MAAMH,KAAA,CAAAI,IAAU;cAClCxC,MAAA,CAAApC,SAAgB,CAAAO,UAAW,CAAAoC,kBAAmB,CAAAkC,WAAY,CACxDF,SAAA,EACA9C,IAAA,CAAAiD,QAAa;YAAA,CAEjB;UAAA;QAEJ,CACF;QACKd,GAAA;MAAA,CACP;MAAA9D,IAAA;MAAAC,WAAA;MAAAC,QAAA;MAAAC,cAAA;MAAAC,UAAA;MAAAE;OA5DKuB,GAAA;IAAAnC,CAAA,OAAAC,YAAA;IAAAD,CAAA,OAAAG,WAAA;IAAAH,CAAA,OAAAmC,GAAA;IAAAnC,CAAA,OAAAM,IAAA;IAAAN,CAAA,OAAAO,WAAA;IAAAP,CAAA,OAAAkC,KAAA;IAAAlC,CAAA,OAAAQ,QAAA;IAAAR,CAAA,OAAAS,cAAA;IAAAT,CAAA,OAAAU,UAAA;IAAAV,CAAA,OAAAW,UAAA;IAAAX,CAAA,OAAAY,QAAA;IAAAZ,CAAA,OAAAoC,EAAA;EAAA;IAAAA,EAAA,GAAApC,CAAA;EAAA;EAAA,OALToC,EAKS;AAAA,CAsEb;AAzH4F,SAAArB,MAAAhB,EAAA;EAarD,OAAAoF,MAAA,IAAApF,EAAQ;EAAA,OAAKoF,MAAM,CAAAnE,QAAY;AAAA","ignoreList":[]}
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  &:focus-visible {
23
- outline: 1px solid var(--color-border-brand-strong);
23
+ outline: var(--stroke-width-small) solid var(--color-border-brand-strong);
24
24
  outline-offset: calc(var(--stroke-width-small) / -1);
25
25
  }
26
26
  }
@@ -7,7 +7,7 @@
7
7
  justify-content: center;
8
8
  box-sizing: border-box;
9
9
  position: absolute;
10
- left: 50%;
10
+ inset-inline-start: 50%;
11
11
  transform: translateX(-50%);
12
12
  height: var(--spacer-4);
13
13
  bottom: calc(var(--spacer-2-5) * -1);
@@ -20,9 +20,7 @@
20
20
  line-height: var(--text-body-medium-line-height);
21
21
  white-space: nowrap;
22
22
 
23
- box-shadow:
24
- 0px 0px 0.5px 0px rgba(0, 0, 0, 0.18),
25
- 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
23
+ box-shadow: var(--elevation-100-canvas);
26
24
 
27
25
  &:hover {
28
26
  background: var(--color-bg-secondary-hover);
@@ -11,15 +11,15 @@
11
11
  pointer-events: none;
12
12
  background: linear-gradient(
13
13
  to bottom,
14
- rgb(0 0 0 / 0%) 0%,
14
+ transparent 0%,
15
15
  var(--color-bg) 90%,
16
16
  var(--color-bg) 100%
17
17
  );
18
18
  position: absolute;
19
19
  height: 100px;
20
20
  top: 50px;
21
- left: 0;
22
- right: 0;
21
+ inset-inline-start: 0;
22
+ inset-inline-end: 0;
23
23
  }
24
24
 
25
25
  > div {
@@ -128,7 +128,7 @@
128
128
  color: var(--color-text-secondary);
129
129
  font-size: var(--text-body-medium-font-size);
130
130
  line-height: var(--text-body-medium-line-height);
131
- padding-left: var(--spacer-1);
131
+ padding-inline-start: var(--spacer-1);
132
132
 
133
133
  & path {
134
134
  fill-opacity: 1;
@@ -167,5 +167,5 @@
167
167
 
168
168
  /* Add left padding to Monaco line numbers area */
169
169
  .payload-richtext-code-block .monaco-editor .margin {
170
- padding-left: var(--spacer-2);
170
+ padding-inline-start: var(--spacer-2);
171
171
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAIjF,eAAO,MAAM,yBAAyB,GACpC,QAAQ,KAAK,EAAE,KACd,iBAAiB,CAAC,mBAAmB,GAAG,yBAAyB,CAiDnE,CAAA"}
1
+ {"version":3,"file":"graphQLPopulationPromise.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/graphQLPopulationPromise.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAIjF,eAAO,MAAM,yBAAyB,WAC5B,KAAK,EAAE,KACd,iBAAiB,CAAC,mBAAmB,GAAG,yBAAyB,CAiDnE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/blocks/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EAEL,SAAS,EAGT,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAehB,YAAY,EACV,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,CAAA;IACxC,YAAY,CAAC,EAAE,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,CAAA;CAC/C,CAAA;AAED,eAAO,MAAM,aAAa,iHAqMxB,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAA;AACxD;;GAEG;AACH,MAAM,MAA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EG;AACH,MAAM,MAAM,6BAA6B,GAAG,kBAAkB,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAA;AACnE;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,kBAAkB,CAAA"}
@@ -10,32 +10,30 @@ import { ServerInlineBlockNode } from './nodes/InlineBlocksNode.js';
10
10
  import { createBlockNodeJSONSchema, createInlineBlockNodeJSONSchema } from './schema.js';
11
11
  import { blockValidationHOC } from './validate.js';
12
12
  export const BlocksFeature = createServerFeature({
13
- feature: async ({
13
+ feature: ({
14
14
  config: _config,
15
15
  isRoot,
16
16
  parentIsLocalized,
17
17
  props: _props
18
18
  }) => {
19
19
  const validRelationships = _config.collections.map(c => c.slug) || [];
20
- const sanitized = await sanitizeFields({
20
+ const sanitized = sanitizeFields({
21
21
  config: _config,
22
22
  fields: [{
23
23
  name: 'lexical_blocks',
24
24
  type: 'blocks',
25
- blockReferences: _props.blocks ?? [],
26
- blocks: []
25
+ blocks: _props.blocks ?? []
27
26
  }, {
28
27
  name: 'lexical_inline_blocks',
29
28
  type: 'blocks',
30
- blockReferences: _props.inlineBlocks ?? [],
31
- blocks: []
29
+ blocks: _props.inlineBlocks ?? []
32
30
  }],
33
31
  parentIsLocalized,
34
32
  requireFieldLevelRichTextEditor: isRoot,
35
33
  validRelationships
36
34
  });
37
35
  const blockConfigs = [];
38
- for (const _block of sanitized[0].blockReferences ?? sanitized[0].blocks) {
36
+ for (const _block of sanitized[0].blocks) {
39
37
  const block = typeof _block === 'string' ? _config?.blocks?.find(b => b.slug === _block) : _block;
40
38
  if (!block) {
41
39
  throw new Error(`Block not found for slug: ${typeof _block === 'string' ? _block : _block?.slug}`);
@@ -47,7 +45,7 @@ export const BlocksFeature = createServerFeature({
47
45
  });
48
46
  }
49
47
  const inlineBlockConfigs = [];
50
- for (const _block of sanitized[1].blockReferences ?? sanitized[1].blocks) {
48
+ for (const _block of sanitized[1].blocks) {
51
49
  const block = typeof _block === 'string' ? _config?.blocks?.find(b => b.slug === _block) : _block;
52
50
  if (!block) {
53
51
  throw new Error(`Block not found for slug: ${typeof _block === 'string' ? _block : _block?.slug}`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["sanitizeFields","applyBaseFilterToFields","createServerFeature","createNode","blockPopulationPromiseHOC","i18n","getBlockMarkdownTransformers","ServerBlockNode","ServerInlineBlockNode","createBlockNodeJSONSchema","createInlineBlockNodeJSONSchema","blockValidationHOC","BlocksFeature","feature","config","_config","isRoot","parentIsLocalized","props","_props","validRelationships","collections","map","c","slug","sanitized","fields","name","type","blockReferences","blocks","inlineBlocks","requireFieldLevelRichTextEditor","blockConfigs","_block","block","find","b","Error","push","inlineBlockConfigs","ClientFeature","generateSchemaMap","schemaMap","Map","length","blockFields","admin","components","unshift","Block","BlockLabel","Label","set","markdownTransformers","nodes","jsonSchema","undefined","getSubFields","node","blockType","getSubFieldsData","graphQLPopulationPromises","validations","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/blocks/server/index.ts"],"sourcesContent":["import type {\n Block,\n BlocksField,\n BlockSlug,\n Config,\n FieldSchemaMap,\n UIFieldClientProps,\n UIFieldServerProps,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport { applyBaseFilterToFields } from '../../../utilities/applyBaseFilterToFields.js'\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { blockPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { getBlockMarkdownTransformers } from './markdown/markdownTransformer.js'\nimport { ServerBlockNode } from './nodes/BlocksNode.js'\nimport { ServerInlineBlockNode } from './nodes/InlineBlocksNode.js'\nimport { createBlockNodeJSONSchema, createInlineBlockNodeJSONSchema } from './schema.js'\nimport { blockValidationHOC } from './validate.js'\n\nexport type {\n BlockFields,\n BlockFieldsOptionalID,\n InlineBlockFields,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from './schema.js'\n\nexport type BlocksFeatureProps = {\n blocks?: (Block | BlockSlug)[] | Block[]\n inlineBlocks?: (Block | BlockSlug)[] | Block[]\n}\n\nexport const BlocksFeature = createServerFeature<BlocksFeatureProps, BlocksFeatureProps>({\n feature: async ({ config: _config, isRoot, parentIsLocalized, props: _props }) => {\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const sanitized = await sanitizeFields({\n config: _config as unknown as Config,\n fields: [\n {\n name: 'lexical_blocks',\n type: 'blocks',\n blockReferences: _props.blocks ?? [],\n blocks: [],\n },\n {\n name: 'lexical_inline_blocks',\n type: 'blocks',\n blockReferences: _props.inlineBlocks ?? [],\n blocks: [],\n },\n ],\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n\n const blockConfigs: Block[] = []\n for (const _block of (sanitized[0] as BlocksField).blockReferences ??\n (sanitized[0] as BlocksField).blocks) {\n const block =\n typeof _block === 'string' ? _config?.blocks?.find((b) => b.slug === _block) : _block\n if (!block) {\n throw new Error(\n `Block not found for slug: ${typeof _block === 'string' ? _block : _block?.slug}`,\n )\n }\n // Apply baseFilter to relationship fields in the block\n blockConfigs.push({\n ...block,\n fields: applyBaseFilterToFields(block.fields, _config),\n })\n }\n\n const inlineBlockConfigs: Block[] = []\n for (const _block of (sanitized[1] as BlocksField).blockReferences ??\n (sanitized[1] as BlocksField).blocks) {\n const block =\n typeof _block === 'string' ? _config?.blocks?.find((b) => b.slug === _block) : _block\n if (!block) {\n throw new Error(\n `Block not found for slug: ${typeof _block === 'string' ? _block : _block?.slug}`,\n )\n }\n // Apply baseFilter to relationship fields in the block\n inlineBlockConfigs.push({\n ...block,\n fields: applyBaseFilterToFields(block.fields, _config),\n })\n }\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#BlocksFeatureClient',\n generateSchemaMap: ({ config }) => {\n /**\n * Add sub-fields to the schemaMap. E.g. if you have an array field as part of the block, and it runs addRow, it will request these\n * sub-fields from the component map. Thus, we need to put them in the component map here.\n */\n const schemaMap: FieldSchemaMap = new Map()\n\n if (blockConfigs?.length) {\n for (const block of blockConfigs) {\n const blockFields = [...block.fields]\n\n if (block?.admin?.components) {\n blockFields.unshift({\n name: `_components`,\n type: 'ui',\n admin: {\n components: {\n Block: block.admin?.components?.Block,\n BlockLabel: block.admin?.components?.Label,\n },\n },\n })\n }\n schemaMap.set(`lexical_blocks.${block.slug}.fields`, {\n fields: blockFields,\n })\n schemaMap.set(`lexical_blocks.${block.slug}`, {\n name: `lexical_blocks_${block.slug}`,\n type: 'blocks',\n blocks: [block],\n })\n }\n }\n\n if (inlineBlockConfigs?.length) {\n // To generate block schemaMap which generates things like the componentMap for admin.Label\n for (const block of inlineBlockConfigs) {\n const blockFields = [...block.fields]\n\n if (block?.admin?.components) {\n blockFields.unshift({\n name: `_components`,\n type: 'ui',\n admin: {\n components: {\n Block: block.admin?.components?.Block,\n BlockLabel: block.admin?.components?.Label,\n },\n },\n })\n }\n\n schemaMap.set(`lexical_inline_blocks.${block.slug}.fields`, {\n fields: blockFields,\n })\n\n schemaMap.set(`lexical_inline_blocks.${block.slug}`, {\n name: `lexical_inline_blocks_${block.slug}`,\n type: 'blocks',\n blocks: [block],\n })\n }\n }\n\n return schemaMap\n },\n i18n,\n markdownTransformers: getBlockMarkdownTransformers({\n blocks: blockConfigs,\n inlineBlocks: inlineBlockConfigs,\n }),\n\n nodes: [\n createNode({\n jsonSchema: blockConfigs.length ? createBlockNodeJSONSchema(blockConfigs) : undefined,\n // @ts-expect-error - TODO: fix this\n getSubFields: ({ node }) => {\n if (!node) {\n if (!blockConfigs.length) {\n return []\n }\n return [\n {\n name: 'lexical_blocks',\n type: 'blocks',\n blocks: blockConfigs,\n },\n ]\n }\n\n const blockType = node.fields.blockType\n const block = blockConfigs.find((block) => block.slug === blockType)\n return block?.fields\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [blockPopulationPromiseHOC(blockConfigs)],\n node: ServerBlockNode,\n validations: [blockValidationHOC(blockConfigs)],\n }),\n createNode({\n jsonSchema: inlineBlockConfigs.length\n ? createInlineBlockNodeJSONSchema(inlineBlockConfigs)\n : undefined,\n // @ts-expect-error - TODO: fix this\n getSubFields: ({ node }) => {\n if (!node) {\n if (!inlineBlockConfigs.length) {\n return []\n }\n return [\n {\n name: 'lexical_inline_blocks',\n type: 'blocks',\n blocks: inlineBlockConfigs,\n },\n ]\n }\n\n const blockType = node.fields.blockType\n const block = inlineBlockConfigs.find((block) => block.slug === blockType)\n return block?.fields\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [blockPopulationPromiseHOC(inlineBlockConfigs)],\n node: ServerInlineBlockNode,\n validations: [blockValidationHOC(inlineBlockConfigs)],\n }),\n ],\n sanitizedServerFeatureProps: _props,\n }\n },\n key: 'blocks',\n})\n\n/**\n * Props for the client components provided to `admin.components.Block` of lexical blocks.\n */\nexport type LexicalBlockClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Block` of lexical blocks.\n */\nexport type LexicalBlockServerProps = UIFieldServerProps\n\n/**\n * Props for the client components provided to `admin.components.Label` of lexical blocks.\n */\nexport type LexicalBlockLabelClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Label` of lexical blocks.\n */\nexport type LexicalBlockLabelServerProps = UIFieldServerProps\n\n/**\n * Props for the client components provided to `admin.components.Block` of lexical inline blocks.\n */\nexport type LexicalInlineBlockClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Block` of lexical inline blocks.\n */\nexport type LexicalInlineBlockServerProps = UIFieldServerProps\n\n/**\n * Props for the client components provided to `admin.components.Label` of lexical inline blocks.\n */\nexport type LexicalInlineBlockLabelClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Label` of lexical inline blocks.\n */\nexport type LexicalInlineBlockLabelServerProps = UIFieldServerProps\n"],"mappings":"AAUA,SAASA,cAAc,QAAQ;AAE/B,SAASC,uBAAuB,QA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AAE;YACX;YACA,OAAO,CACL;cACElB,IAAA,EAAM;cACNC,IAAA,EAAM;cACNE,MAAA,EAAQU;YACV,EACD;UACH;UAEA,MAAMoB,SAAA,GAAYD,IAAA,CAAKjC,MAAM,CAACkC,SAAS;UACvC,MAAMzB,KAAA,GAAQK,kBAAA,CAAmBJ,IAAI,CAAED,KAAA,IAAUA,KAAA,CAAMX,IAAI,KAAKoC,SAAA;UAChE,OAAOzB,KAAA,EAAOT,MAAA;QAChB;QACAmC,gBAAA,EAAkBA,CAAC;UAAEF;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAMjC,MAAA;QACf;QACAoC,yBAAA,EAA2B,CAAC1D,yBAAA,CAA0BoC,kBAAA,EAAoB;QAC1EmB,IAAA,EAAMnD,qBAAA;QACNuD,WAAA,EAAa,CAACpD,kBAAA,CAAmB6B,kBAAA;MACnC,GACD;MACDwB,2BAAA,EAA6B7C;IAC/B;EACF;EACA8C,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["sanitizeFields","applyBaseFilterToFields","createServerFeature","createNode","blockPopulationPromiseHOC","i18n","getBlockMarkdownTransformers","ServerBlockNode","ServerInlineBlockNode","createBlockNodeJSONSchema","createInlineBlockNodeJSONSchema","blockValidationHOC","BlocksFeature","feature","config","_config","isRoot","parentIsLocalized","props","_props","validRelationships","collections","map","c","slug","sanitized","fields","name","type","blocks","inlineBlocks","requireFieldLevelRichTextEditor","blockConfigs","_block","block","find","b","Error","push","inlineBlockConfigs","ClientFeature","generateSchemaMap","schemaMap","Map","length","blockFields","admin","components","unshift","Block","BlockLabel","Label","set","markdownTransformers","nodes","jsonSchema","undefined","getSubFields","node","blockType","getSubFieldsData","graphQLPopulationPromises","validations","sanitizedServerFeatureProps","key"],"sources":["../../../../src/features/blocks/server/index.ts"],"sourcesContent":["import type {\n Block,\n BlocksField,\n BlockSlug,\n Config,\n FieldSchemaMap,\n UIFieldClientProps,\n UIFieldServerProps,\n} from 'payload'\n\nimport { sanitizeFields } from 'payload'\n\nimport { applyBaseFilterToFields } from '../../../utilities/applyBaseFilterToFields.js'\nimport { createServerFeature } from '../../../utilities/createServerFeature.js'\nimport { createNode } from '../../typeUtilities.js'\nimport { blockPopulationPromiseHOC } from './graphQLPopulationPromise.js'\nimport { i18n } from './i18n.js'\nimport { getBlockMarkdownTransformers } from './markdown/markdownTransformer.js'\nimport { ServerBlockNode } from './nodes/BlocksNode.js'\nimport { ServerInlineBlockNode } from './nodes/InlineBlocksNode.js'\nimport { createBlockNodeJSONSchema, createInlineBlockNodeJSONSchema } from './schema.js'\nimport { blockValidationHOC } from './validate.js'\n\nexport type {\n BlockFields,\n BlockFieldsOptionalID,\n InlineBlockFields,\n SerializedBlockNode,\n SerializedInlineBlockNode,\n} from './schema.js'\n\nexport type BlocksFeatureProps = {\n blocks?: (Block | BlockSlug)[] | Block[]\n inlineBlocks?: (Block | BlockSlug)[] | Block[]\n}\n\nexport const BlocksFeature = createServerFeature<BlocksFeatureProps, BlocksFeatureProps>({\n feature: ({ config: _config, isRoot, parentIsLocalized, props: _props }) => {\n const validRelationships = _config.collections.map((c) => c.slug) || []\n\n const sanitized = sanitizeFields({\n config: _config as unknown as Config,\n fields: [\n {\n name: 'lexical_blocks',\n type: 'blocks',\n blocks: _props.blocks ?? [],\n },\n {\n name: 'lexical_inline_blocks',\n type: 'blocks',\n blocks: _props.inlineBlocks ?? [],\n },\n ],\n parentIsLocalized,\n requireFieldLevelRichTextEditor: isRoot,\n validRelationships,\n })\n\n const blockConfigs: Block[] = []\n for (const _block of (sanitized[0] as BlocksField).blocks) {\n const block =\n typeof _block === 'string' ? _config?.blocks?.find((b) => b.slug === _block) : _block\n if (!block) {\n throw new Error(\n `Block not found for slug: ${typeof _block === 'string' ? _block : _block?.slug}`,\n )\n }\n // Apply baseFilter to relationship fields in the block\n blockConfigs.push({\n ...block,\n fields: applyBaseFilterToFields(block.fields, _config),\n })\n }\n\n const inlineBlockConfigs: Block[] = []\n for (const _block of (sanitized[1] as BlocksField).blocks) {\n const block =\n typeof _block === 'string' ? _config?.blocks?.find((b) => b.slug === _block) : _block\n if (!block) {\n throw new Error(\n `Block not found for slug: ${typeof _block === 'string' ? _block : _block?.slug}`,\n )\n }\n // Apply baseFilter to relationship fields in the block\n inlineBlockConfigs.push({\n ...block,\n fields: applyBaseFilterToFields(block.fields, _config),\n })\n }\n\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#BlocksFeatureClient',\n generateSchemaMap: ({ config }) => {\n /**\n * Add sub-fields to the schemaMap. E.g. if you have an array field as part of the block, and it runs addRow, it will request these\n * sub-fields from the component map. Thus, we need to put them in the component map here.\n */\n const schemaMap: FieldSchemaMap = new Map()\n\n if (blockConfigs?.length) {\n for (const block of blockConfigs) {\n const blockFields = [...block.fields]\n\n if (block?.admin?.components) {\n blockFields.unshift({\n name: `_components`,\n type: 'ui',\n admin: {\n components: {\n Block: block.admin?.components?.Block,\n BlockLabel: block.admin?.components?.Label,\n },\n },\n })\n }\n schemaMap.set(`lexical_blocks.${block.slug}.fields`, {\n fields: blockFields,\n })\n schemaMap.set(`lexical_blocks.${block.slug}`, {\n name: `lexical_blocks_${block.slug}`,\n type: 'blocks',\n blocks: [block],\n })\n }\n }\n\n if (inlineBlockConfigs?.length) {\n // To generate block schemaMap which generates things like the componentMap for admin.Label\n for (const block of inlineBlockConfigs) {\n const blockFields = [...block.fields]\n\n if (block?.admin?.components) {\n blockFields.unshift({\n name: `_components`,\n type: 'ui',\n admin: {\n components: {\n Block: block.admin?.components?.Block,\n BlockLabel: block.admin?.components?.Label,\n },\n },\n })\n }\n\n schemaMap.set(`lexical_inline_blocks.${block.slug}.fields`, {\n fields: blockFields,\n })\n\n schemaMap.set(`lexical_inline_blocks.${block.slug}`, {\n name: `lexical_inline_blocks_${block.slug}`,\n type: 'blocks',\n blocks: [block],\n })\n }\n }\n\n return schemaMap\n },\n i18n,\n markdownTransformers: getBlockMarkdownTransformers({\n blocks: blockConfigs,\n inlineBlocks: inlineBlockConfigs,\n }),\n\n nodes: [\n createNode({\n jsonSchema: blockConfigs.length ? createBlockNodeJSONSchema(blockConfigs) : undefined,\n // @ts-expect-error - TODO: fix this\n getSubFields: ({ node }) => {\n if (!node) {\n if (!blockConfigs.length) {\n return []\n }\n return [\n {\n name: 'lexical_blocks',\n type: 'blocks',\n blocks: blockConfigs,\n },\n ]\n }\n\n const blockType = node.fields.blockType\n const block = blockConfigs.find((block) => block.slug === blockType)\n return block?.fields\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [blockPopulationPromiseHOC(blockConfigs)],\n node: ServerBlockNode,\n validations: [blockValidationHOC(blockConfigs)],\n }),\n createNode({\n jsonSchema: inlineBlockConfigs.length\n ? createInlineBlockNodeJSONSchema(inlineBlockConfigs)\n : undefined,\n // @ts-expect-error - TODO: fix this\n getSubFields: ({ node }) => {\n if (!node) {\n if (!inlineBlockConfigs.length) {\n return []\n }\n return [\n {\n name: 'lexical_inline_blocks',\n type: 'blocks',\n blocks: inlineBlockConfigs,\n },\n ]\n }\n\n const blockType = node.fields.blockType\n const block = inlineBlockConfigs.find((block) => block.slug === blockType)\n return block?.fields\n },\n getSubFieldsData: ({ node }) => {\n return node?.fields\n },\n graphQLPopulationPromises: [blockPopulationPromiseHOC(inlineBlockConfigs)],\n node: ServerInlineBlockNode,\n validations: [blockValidationHOC(inlineBlockConfigs)],\n }),\n ],\n sanitizedServerFeatureProps: _props,\n }\n },\n key: 'blocks',\n})\n\n/**\n * Props for the client components provided to `admin.components.Block` of lexical blocks.\n */\nexport type LexicalBlockClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Block` of lexical blocks.\n */\nexport type LexicalBlockServerProps = UIFieldServerProps\n\n/**\n * Props for the client components provided to `admin.components.Label` of lexical blocks.\n */\nexport type LexicalBlockLabelClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Label` of lexical blocks.\n */\nexport type LexicalBlockLabelServerProps = UIFieldServerProps\n\n/**\n * Props for the client components provided to `admin.components.Block` of lexical inline blocks.\n */\nexport type LexicalInlineBlockClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Block` of lexical inline blocks.\n */\nexport type LexicalInlineBlockServerProps = UIFieldServerProps\n\n/**\n * Props for the client components provided to `admin.components.Label` of lexical inline blocks.\n */\nexport type LexicalInlineBlockLabelClientProps = UIFieldClientProps\n/**\n * Props for the server components provided to `admin.components.Label` of lexical inline blocks.\n */\nexport type LexicalInlineBlockLabelServerProps = UIFieldServerProps\n"],"mappings":"AAUA,SAASA,cAAc,QAAQ;AAE/B,SAASC,uBAAuB,QAAQ;AACxC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,yBAAyB,QAAQ;AAC1C,SAASC,IAAI,QAAQ;AACrB,SAASC,4BAA4B,QAAQ;AAC7C,SAASC,eAAe,QAAQ;AAChC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,yBAAyB,EAAEC,+BAA+B,QAAQ;AAC3E,SAASC,kBAAkB,QAAQ;AAenC,OAAO,MAAMC,aAAA,GAAgBV,mBAAA,CAA4D;EACvFW,OAAA,EAASA,CAAC;IAAEC,MAAA,EAAQC,OAAO;IAAEC,MAAM;IAAEC,iBAAiB;IAAEC,KAAA,EAAOC;EAAM,CAAE;IACrE,MAAMC,kBAAA,GAAqBL,OAAA,CAAQM,WAAW,CAACC,GAAG,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAK,EAAE;IAEvE,MAAMC,SAAA,GAAYzB,cAAA,CAAe;MAC/Bc,MAAA,EAAQC,OAAA;MACRW,MAAA,EAAQ,CACN;QACEC,IAAA,EAAM;QACNC,IAAA,EAAM;QACNC,MAAA,EAAQV,MAAA,CAAOU,MAAM,IAAI;MAC3B,GACA;QACEF,IAAA,EAAM;QACNC,IAAA,EAAM;QACNC,MAAA,EAAQV,MAAA,CAAOW,YAAY,IAAI;MACjC,EACD;MACDb,iBAAA;MACA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IACA7B,UAAA,CAAW;QACToD,UAAA,EAAYhB,kBAAA,CAAmBK,MAAM,GACjClC,+BAAA,CAAgC6B,kBAAA,IAChCiB,SAAA;QACJ;QACAC,YAAA,EAAcA,CAAC;UAAEC;QAAI,CAAE;UACrB,IAAI,CAACA,IAAA,EAAM;YACT,IAAI,CAACnB,kBAAA,CAAmBK,MAAM,EAAE;cAC9B,OAAO,EAAE;YACX;YACA,OAAO,CACL;cACEjB,IAAA,EAAM;cACNC,IAAA,EAAM;cACNC,MAAA,EAAQU;YACV,EACD;UACH;UAEA,MAAMoB,SAAA,GAAYD,IAAA,CAAKhC,MAAM,CAACiC,SAAS;UACvC,MAAMzB,KAAA,GAAQK,kBAAA,CAAmBJ,IAAI,CAAED,KAAA,IAAUA,KAAA,CAAMV,IAAI,KAAKmC,SAAA;UAChE,OAAOzB,KAAA,EAAOR,MAAA;QAChB;QACAkC,gBAAA,EAAkBA,CAAC;UAAEF;QAAI,CAAE;UACzB,OAAOA,IAAA,EAAMhC,MAAA;QACf;QACAmC,yBAAA,EAA2B,CAACzD,yBAAA,CAA0BmC,kBAAA,EAAoB;QAC1EmB,IAAA,EAAMlD,qBAAA;QACNsD,WAAA,EAAa,CAACnD,kBAAA,CAAmB4B,kBAAA;MACnC,GACD;MACDwB,2BAAA,EAA6B5C;IAC/B;EACF;EACA6C,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import type { Block } from 'payload';
2
+ import { type MultilineElementTransformer, type TextMatchTransformer, type Transformer } from '@lexical/markdown';
2
3
  import type { NodeWithHooks } from '../../../typesServer.js';
3
- import { type MultilineElementTransformer, type TextMatchTransformer, type Transformer } from '../../../../packages/@lexical/markdown/index.js';
4
4
  export declare function createTagRegexes(tagName: string): {
5
5
  regExpEnd: RegExp;
6
6
  regExpStart: RegExp;
@@ -1 +1 @@
1
- {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/server/markdown/markdownTransformer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAG5D,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,WAAW,EACjB,MAAM,iDAAiD,CAAA;AAaxD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM;;;EAiB/C;AACD,eAAO,MAAM,4BAA4B,GAAI,2BAG1C;IACD,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,EAAE,KAAK,EAAE,CAAA;CACtB,KAAG,CAAC,CAAC,KAAK,EAAE;IACX,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC9B,eAAe,EAAE,WAAW,EAAE,CAAA;CAC/B,KAAK,2BAA2B,GAAG,oBAAoB,CAAC,EA+BxD,CAAA"}
1
+ {"version":3,"file":"markdownTransformer.d.ts","sourceRoot":"","sources":["../../../../../src/features/blocks/server/markdown/markdownTransformer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAA;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAe5D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM;IAc5C,SAAS;IACT,WAAW;EAEd;AACD,eAAO,MAAM,4BAA4B,8BAGtC;IACD,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,YAAY,EAAE,KAAK,EAAE,CAAA;CACtB,KAAG,CAAC,CAAC,KAAK,EAAE;IACX,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;IAC9B,eAAe,EAAE,WAAW,EAAE,CAAA;CAC/B,KAAK,2BAA2B,GAAG,oBAAoB,CAAC,EA+BxD,CAAA"}