@payloadcms/richtext-lexical 4.0.0-internal.d28e9fb → 4.0.0-internal.fa345ef

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 (949) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/cell/rscEntry.d.ts +1 -1
  3. package/dist/cell/rscEntry.d.ts.map +1 -1
  4. package/dist/cell/rscEntry.js +5 -5
  5. package/dist/cell/rscEntry.js.map +1 -1
  6. package/dist/exports/client/Field-XH5C4HFU.js +2 -0
  7. package/dist/exports/client/Field-XH5C4HFU.js.map +7 -0
  8. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js +2 -0
  9. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  10. package/dist/exports/client/bundled.css +1 -1
  11. package/dist/exports/client/chunk-5VIL27GI.js +2 -0
  12. package/dist/exports/client/chunk-5VIL27GI.js.map +7 -0
  13. package/dist/exports/client/chunk-ESITTE3C.js +2 -0
  14. package/dist/exports/client/chunk-ESITTE3C.js.map +7 -0
  15. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  16. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  17. package/dist/exports/client/chunk-UD4DQ4AK.js +2 -0
  18. package/dist/exports/client/chunk-UD4DQ4AK.js.map +7 -0
  19. package/dist/exports/client/chunk-WSAPGI3Z.js +2 -0
  20. package/dist/exports/client/chunk-WSAPGI3Z.js.map +7 -0
  21. package/dist/exports/client/chunk-X3D4LZS7.js +2 -0
  22. package/dist/exports/client/chunk-X3D4LZS7.js.map +7 -0
  23. package/dist/exports/client/component-PHZQBOJE.js +2 -0
  24. package/dist/exports/client/component-PHZQBOJE.js.map +7 -0
  25. package/dist/exports/client/componentInline-H24N7GUG.js +2 -0
  26. package/dist/exports/client/index.d.ts +0 -1
  27. package/dist/exports/client/index.d.ts.map +1 -1
  28. package/dist/exports/client/index.js +27 -28
  29. package/dist/exports/client/index.js.map +4 -4
  30. package/dist/exports/react/index.d.ts +1 -1
  31. package/dist/exports/react/index.d.ts.map +1 -1
  32. package/dist/exports/react/index.js.map +1 -1
  33. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  34. package/dist/features/align/client/toolbarAlignGroup.js +1 -0
  35. package/dist/features/align/client/toolbarAlignGroup.js.map +1 -1
  36. package/dist/features/blockquote/client/index.js +2 -2
  37. package/dist/features/blockquote/client/index.js.map +1 -1
  38. package/dist/features/blockquote/server/index.d.ts +1 -4
  39. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  40. package/dist/features/blockquote/server/index.js +4 -41
  41. package/dist/features/blockquote/server/index.js.map +1 -1
  42. package/dist/features/blockquote/server/schema.d.ts +8 -0
  43. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  44. package/dist/features/blockquote/server/schema.js +15 -0
  45. package/dist/features/blockquote/server/schema.js.map +1 -0
  46. package/dist/features/blocks/client/component/BlockContent.d.ts +10 -0
  47. package/dist/features/blocks/client/component/BlockContent.d.ts.map +1 -1
  48. package/dist/features/blocks/client/component/BlockContent.js.map +1 -1
  49. package/dist/features/blocks/client/component/index.css +178 -0
  50. package/dist/features/blocks/client/component/index.d.ts +4 -3
  51. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  52. package/dist/features/blocks/client/component/index.js +89 -24
  53. package/dist/features/blocks/client/component/index.js.map +1 -1
  54. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  55. package/dist/features/blocks/client/componentInline/index.css +85 -0
  56. package/dist/features/blocks/client/componentInline/index.d.ts +4 -3
  57. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  58. package/dist/features/blocks/client/componentInline/index.js +33 -12
  59. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  60. package/dist/features/blocks/client/index.d.ts.map +1 -1
  61. package/dist/features/blocks/client/index.js +4 -4
  62. package/dist/features/blocks/client/index.js.map +1 -1
  63. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts +1 -1
  64. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.d.ts.map +1 -1
  65. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js +1 -1
  66. package/dist/features/blocks/client/markdown/getLexicalToMarkdown.js.map +1 -1
  67. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts +1 -1
  68. package/dist/features/blocks/client/markdown/getMarkdownToLexical.d.ts.map +1 -1
  69. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js +5 -2
  70. package/dist/features/blocks/client/markdown/getMarkdownToLexical.js.map +1 -1
  71. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts +1 -2
  72. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  73. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  74. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  75. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  76. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  77. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  78. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  79. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  80. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  81. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  82. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  83. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  84. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts +1 -1
  85. package/dist/features/blocks/premade/CodeBlock/Component/Block.d.ts.map +1 -1
  86. package/dist/features/blocks/premade/CodeBlock/Component/Block.js +4 -0
  87. package/dist/features/blocks/premade/CodeBlock/Component/Block.js.map +1 -1
  88. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.css +26 -0
  89. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts +1 -1
  90. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.d.ts.map +1 -1
  91. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js +4 -1
  92. package/dist/features/blocks/premade/CodeBlock/Component/Collapse/index.js.map +1 -1
  93. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.css +38 -0
  94. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts +1 -1
  95. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.d.ts.map +1 -1
  96. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js +7 -8
  97. package/dist/features/blocks/premade/CodeBlock/Component/FloatingCollapse/index.js.map +1 -1
  98. package/dist/features/blocks/premade/CodeBlock/Component/index.css +171 -0
  99. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  100. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  101. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  102. package/dist/features/blocks/server/index.d.ts +1 -0
  103. package/dist/features/blocks/server/index.d.ts.map +1 -1
  104. package/dist/features/blocks/server/index.js +24 -72
  105. package/dist/features/blocks/server/index.js.map +1 -1
  106. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts +1 -1
  107. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  108. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  109. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  110. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  111. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  112. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  113. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  114. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  115. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  116. package/dist/features/blocks/server/schema.d.ts +45 -0
  117. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  118. package/dist/features/blocks/server/schema.js +140 -0
  119. package/dist/features/blocks/server/schema.js.map +1 -0
  120. package/dist/features/blocks/server/validate.d.ts +1 -2
  121. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  122. package/dist/features/blocks/server/validate.js.map +1 -1
  123. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  124. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  125. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  126. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  127. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  129. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  130. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  131. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  132. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  133. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  134. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  135. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  136. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  137. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  138. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  139. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  140. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  141. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  142. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  143. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  144. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  145. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  146. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  147. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  148. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  149. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  151. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  152. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  153. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  154. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  155. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  157. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  158. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  159. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  160. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  161. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  162. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  163. package/dist/features/converters/lexicalToHtml/async/types.d.ts +15 -16
  164. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  165. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  166. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  167. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  168. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  169. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  170. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  171. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  172. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  173. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  174. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  175. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  176. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  177. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  178. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  179. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  180. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  181. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  182. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  183. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  184. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  185. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  186. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  187. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  188. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  189. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  190. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  191. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  192. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  193. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  194. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  195. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  196. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  197. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  198. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  199. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  200. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  201. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  202. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  203. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  204. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  205. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +15 -16
  206. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  207. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  208. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +6 -4
  209. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  210. package/dist/features/converters/lexicalToJSX/Component/index.js +5 -4
  211. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  212. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  213. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  214. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  215. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  216. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  217. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  218. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  219. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  220. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  221. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  222. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  223. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  224. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  225. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  226. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  227. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  228. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  229. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  230. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  231. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  232. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  233. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  234. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  235. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  236. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  237. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  238. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  239. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  240. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  241. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  242. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  243. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  244. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  245. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  246. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  247. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  248. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  249. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  250. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  251. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +13 -15
  252. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  253. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  254. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  255. package/dist/features/converters/lexicalToMarkdown/index.js +1 -1
  256. package/dist/features/converters/lexicalToMarkdown/index.js.map +1 -1
  257. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  258. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  259. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +13 -15
  260. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  261. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  262. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  263. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  264. package/dist/features/converters/markdownToLexical/index.js +5 -2
  265. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  266. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts +1 -1
  267. package/dist/features/debug/jsxConverter/client/plugin/index.d.ts.map +1 -1
  268. package/dist/features/debug/jsxConverter/client/plugin/index.js +1 -0
  269. package/dist/features/debug/jsxConverter/client/plugin/index.js.map +1 -1
  270. package/dist/features/debug/jsxConverter/client/plugin/style.css +9 -0
  271. package/dist/features/debug/testRecorder/client/plugin/index.css +51 -0
  272. package/dist/features/debug/testRecorder/client/plugin/index.d.ts +1 -1
  273. package/dist/features/debug/testRecorder/client/plugin/index.d.ts.map +1 -1
  274. package/dist/features/debug/testRecorder/client/plugin/index.js +1 -0
  275. package/dist/features/debug/testRecorder/client/plugin/index.js.map +1 -1
  276. package/dist/features/debug/treeView/client/plugin/index.css +81 -0
  277. package/dist/features/debug/treeView/client/plugin/index.d.ts +1 -1
  278. package/dist/features/debug/treeView/client/plugin/index.d.ts.map +1 -1
  279. package/dist/features/debug/treeView/client/plugin/index.js +1 -0
  280. package/dist/features/debug/treeView/client/plugin/index.js.map +1 -1
  281. package/dist/features/experimental_table/client/index.js +2 -2
  282. package/dist/features/experimental_table/client/index.js.map +1 -1
  283. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +91 -0
  284. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts +1 -1
  285. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.d.ts.map +1 -1
  286. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js +3 -2
  287. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.js.map +1 -1
  288. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.css +11 -0
  289. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts +1 -1
  290. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.d.ts.map +1 -1
  291. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js +1 -0
  292. package/dist/features/experimental_table/client/plugins/TableCellResizerPlugin/index.js.map +1 -1
  293. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js +1 -1
  294. package/dist/features/experimental_table/client/plugins/TableHoverActionsPlugin/index.js.map +1 -1
  295. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +166 -0
  296. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts +17 -0
  297. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.d.ts.map +1 -0
  298. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js +219 -0
  299. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.js.map +1 -0
  300. package/dist/features/experimental_table/client/plugins/TablePlugin/index.css +235 -0
  301. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts +1 -1
  302. package/dist/features/experimental_table/client/plugins/TablePlugin/index.d.ts.map +1 -1
  303. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js +95 -104
  304. package/dist/features/experimental_table/client/plugins/TablePlugin/index.js.map +1 -1
  305. package/dist/features/experimental_table/markdownTransformer.d.ts +2 -2
  306. package/dist/features/experimental_table/markdownTransformer.d.ts.map +1 -1
  307. package/dist/features/experimental_table/markdownTransformer.js +6 -3
  308. package/dist/features/experimental_table/markdownTransformer.js.map +1 -1
  309. package/dist/features/experimental_table/server/index.d.ts +1 -6
  310. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  311. package/dist/features/experimental_table/server/index.js +6 -104
  312. package/dist/features/experimental_table/server/index.js.map +1 -1
  313. package/dist/features/experimental_table/server/schema.d.ts +27 -0
  314. package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
  315. package/dist/features/experimental_table/server/schema.js +107 -0
  316. package/dist/features/experimental_table/server/schema.js.map +1 -0
  317. package/dist/features/format/bold/feature.client.js +1 -1
  318. package/dist/features/format/bold/feature.client.js.map +1 -1
  319. package/dist/features/format/bold/feature.server.d.ts.map +1 -1
  320. package/dist/features/format/bold/feature.server.js +1 -1
  321. package/dist/features/format/bold/feature.server.js.map +1 -1
  322. package/dist/features/format/inlineCode/feature.client.js +1 -1
  323. package/dist/features/format/inlineCode/feature.client.js.map +1 -1
  324. package/dist/features/format/inlineCode/feature.server.d.ts.map +1 -1
  325. package/dist/features/format/inlineCode/feature.server.js +1 -1
  326. package/dist/features/format/inlineCode/feature.server.js.map +1 -1
  327. package/dist/features/format/italic/feature.client.js +1 -1
  328. package/dist/features/format/italic/feature.client.js.map +1 -1
  329. package/dist/features/format/italic/feature.server.d.ts.map +1 -1
  330. package/dist/features/format/italic/feature.server.js +1 -1
  331. package/dist/features/format/italic/feature.server.js.map +1 -1
  332. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  333. package/dist/features/format/strikethrough/feature.client.js +1 -1
  334. package/dist/features/format/strikethrough/feature.client.js.map +1 -1
  335. package/dist/features/format/strikethrough/feature.server.d.ts.map +1 -1
  336. package/dist/features/format/strikethrough/feature.server.js +1 -1
  337. package/dist/features/format/strikethrough/feature.server.js.map +1 -1
  338. package/dist/features/heading/client/index.js +2 -2
  339. package/dist/features/heading/client/index.js.map +1 -1
  340. package/dist/features/heading/markdownTransformer.d.ts +2 -2
  341. package/dist/features/heading/markdownTransformer.d.ts.map +1 -1
  342. package/dist/features/heading/markdownTransformer.js +6 -19
  343. package/dist/features/heading/markdownTransformer.js.map +1 -1
  344. package/dist/features/heading/server/index.d.ts +2 -4
  345. package/dist/features/heading/server/index.d.ts.map +1 -1
  346. package/dist/features/heading/server/index.js +4 -41
  347. package/dist/features/heading/server/index.js.map +1 -1
  348. package/dist/features/heading/server/schema.d.ts +10 -0
  349. package/dist/features/heading/server/schema.d.ts.map +1 -0
  350. package/dist/features/heading/server/schema.js +37 -0
  351. package/dist/features/heading/server/schema.js.map +1 -0
  352. package/dist/features/horizontalRule/client/index.js +2 -2
  353. package/dist/features/horizontalRule/client/index.js.map +1 -1
  354. package/dist/features/horizontalRule/client/markdownTransformer.d.ts +2 -2
  355. package/dist/features/horizontalRule/client/markdownTransformer.d.ts.map +1 -1
  356. package/dist/features/horizontalRule/client/markdownTransformer.js +1 -1
  357. package/dist/features/horizontalRule/client/markdownTransformer.js.map +1 -1
  358. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  359. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  360. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  361. package/dist/features/horizontalRule/client/plugin/index.css +25 -0
  362. package/dist/features/horizontalRule/client/plugin/index.d.ts +1 -1
  363. package/dist/features/horizontalRule/client/plugin/index.d.ts.map +1 -1
  364. package/dist/features/horizontalRule/client/plugin/index.js +73 -4
  365. package/dist/features/horizontalRule/client/plugin/index.js.map +1 -1
  366. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  367. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  368. package/dist/features/horizontalRule/server/index.js +4 -10
  369. package/dist/features/horizontalRule/server/index.js.map +1 -1
  370. package/dist/features/horizontalRule/server/markdownTransformer.d.ts +2 -2
  371. package/dist/features/horizontalRule/server/markdownTransformer.d.ts.map +1 -1
  372. package/dist/features/horizontalRule/server/markdownTransformer.js +1 -1
  373. package/dist/features/horizontalRule/server/markdownTransformer.js.map +1 -1
  374. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
  375. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  376. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  377. package/dist/features/horizontalRule/server/schema.d.ts +7 -0
  378. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  379. package/dist/features/horizontalRule/server/schema.js +25 -0
  380. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  381. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  382. package/dist/features/link/client/index.d.ts.map +1 -1
  383. package/dist/features/link/client/index.js +2 -2
  384. package/dist/features/link/client/index.js.map +1 -1
  385. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  386. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  387. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  388. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  389. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js +28 -8
  390. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  391. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +108 -0
  392. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts +1 -1
  393. package/dist/features/link/client/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  394. package/dist/features/link/client/plugins/floatingLinkEditor/index.js +1 -0
  395. package/dist/features/link/client/plugins/floatingLinkEditor/index.js.map +1 -1
  396. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  397. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  398. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  399. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  400. package/dist/features/link/markdownTransformer.d.ts +5 -5
  401. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  402. package/dist/features/link/markdownTransformer.js +2 -2
  403. package/dist/features/link/markdownTransformer.js.map +1 -1
  404. package/dist/features/link/markdownTransformer.spec.js +10 -10
  405. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  406. package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
  407. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  408. package/dist/features/link/nodes/AutoLinkNode.js +2 -1
  409. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  410. package/dist/features/link/nodes/LinkNode.d.ts +3 -3
  411. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  412. package/dist/features/link/nodes/LinkNode.js +2 -1
  413. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  414. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  415. package/dist/features/link/server/baseFields.js.map +1 -1
  416. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  417. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  418. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  419. package/dist/features/link/server/index.d.ts +2 -1
  420. package/dist/features/link/server/index.d.ts.map +1 -1
  421. package/dist/features/link/server/index.js +5 -73
  422. package/dist/features/link/server/index.js.map +1 -1
  423. package/dist/features/link/server/schema.d.ts +32 -0
  424. package/dist/features/link/server/schema.d.ts.map +1 -0
  425. package/dist/features/link/server/schema.js +171 -0
  426. package/dist/features/link/server/schema.js.map +1 -0
  427. package/dist/features/link/server/validate.d.ts +1 -1
  428. package/dist/features/link/server/validate.d.ts.map +1 -1
  429. package/dist/features/link/server/validate.js.map +1 -1
  430. package/dist/features/lists/checklist/client/index.js +1 -1
  431. package/dist/features/lists/checklist/client/index.js.map +1 -1
  432. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  433. package/dist/features/lists/checklist/server/index.js +4 -8
  434. package/dist/features/lists/checklist/server/index.js.map +1 -1
  435. package/dist/features/lists/orderedList/client/index.js +1 -1
  436. package/dist/features/lists/orderedList/client/index.js.map +1 -1
  437. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  438. package/dist/features/lists/orderedList/server/index.js +4 -8
  439. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  440. package/dist/features/lists/plugin/index.d.ts +0 -9
  441. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  442. package/dist/features/lists/plugin/index.js.map +1 -1
  443. package/dist/features/lists/shared/schema.d.ts +18 -0
  444. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  445. package/dist/features/lists/shared/schema.js +62 -0
  446. package/dist/features/lists/shared/schema.js.map +1 -0
  447. package/dist/features/lists/unorderedList/client/index.js +1 -1
  448. package/dist/features/lists/unorderedList/client/index.js.map +1 -1
  449. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  450. package/dist/features/lists/unorderedList/server/index.js +4 -8
  451. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  452. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +2 -2
  453. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  454. package/dist/features/relationship/client/components/RelationshipComponent.js +29 -4
  455. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  456. package/dist/features/relationship/client/components/index.css +112 -0
  457. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  458. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  459. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  460. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  461. package/dist/features/relationship/client/plugins/index.d.ts +1 -1
  462. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  463. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  464. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  465. package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
  466. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  467. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
  468. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  469. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  470. package/dist/features/relationship/server/index.d.ts +1 -0
  471. package/dist/features/relationship/server/index.d.ts.map +1 -1
  472. package/dist/features/relationship/server/index.js +2 -0
  473. package/dist/features/relationship/server/index.js.map +1 -1
  474. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  475. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  476. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  477. package/dist/features/relationship/server/schema.d.ts +28 -0
  478. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  479. package/dist/features/relationship/server/schema.js +97 -0
  480. package/dist/features/relationship/server/schema.js.map +1 -0
  481. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
  482. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  483. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
  484. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  485. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  486. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  487. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  488. package/dist/features/textState/feature.client.js +1 -1
  489. package/dist/features/textState/feature.client.js.map +1 -1
  490. package/dist/features/toolbars/fixed/client/Toolbar/index.css +87 -0
  491. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts +1 -1
  492. package/dist/features/toolbars/fixed/client/Toolbar/index.d.ts.map +1 -1
  493. package/dist/features/toolbars/fixed/client/Toolbar/index.js +1 -0
  494. package/dist/features/toolbars/fixed/client/Toolbar/index.js.map +1 -1
  495. package/dist/features/toolbars/inline/client/Toolbar/index.css +32 -0
  496. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts +1 -1
  497. package/dist/features/toolbars/inline/client/Toolbar/index.d.ts.map +1 -1
  498. package/dist/features/toolbars/inline/client/Toolbar/index.js +1 -0
  499. package/dist/features/toolbars/inline/client/Toolbar/index.js.map +1 -1
  500. package/dist/features/toolbars/shared/ToolbarButton/index.css +57 -0
  501. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts +1 -1
  502. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  503. package/dist/features/toolbars/shared/ToolbarButton/index.js +80 -74
  504. package/dist/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  505. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  506. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +5 -2
  507. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  508. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +210 -0
  509. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts +1 -1
  510. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  511. package/dist/features/toolbars/shared/ToolbarDropdown/index.js +11 -7
  512. package/dist/features/toolbars/shared/ToolbarDropdown/index.js.map +1 -1
  513. package/dist/features/toolbars/shared/useToolbarStates.d.ts.map +1 -1
  514. package/dist/features/toolbars/shared/useToolbarStates.js +3 -1
  515. package/dist/features/toolbars/shared/useToolbarStates.js.map +1 -1
  516. package/dist/features/toolbars/types.d.ts +5 -1
  517. package/dist/features/toolbars/types.d.ts.map +1 -1
  518. package/dist/features/toolbars/types.js.map +1 -1
  519. package/dist/features/typesClient.d.ts +2 -2
  520. package/dist/features/typesClient.d.ts.map +1 -1
  521. package/dist/features/typesClient.js.map +1 -1
  522. package/dist/features/typesServer.d.ts +19 -59
  523. package/dist/features/typesServer.d.ts.map +1 -1
  524. package/dist/features/typesServer.js.map +1 -1
  525. package/dist/features/upload/client/component/index.css +214 -0
  526. package/dist/features/upload/client/component/index.d.ts +2 -2
  527. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  528. package/dist/features/upload/client/component/index.js +86 -63
  529. package/dist/features/upload/client/component/index.js.map +1 -1
  530. package/dist/features/upload/client/component/pending/index.d.ts +0 -1
  531. package/dist/features/upload/client/component/pending/index.d.ts.map +1 -1
  532. package/dist/features/upload/client/component/pending/index.js.map +1 -1
  533. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  534. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  535. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  536. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  537. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  538. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  539. package/dist/features/upload/client/plugin/index.js +5 -5
  540. package/dist/features/upload/client/plugin/index.js.map +1 -1
  541. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
  542. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  543. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  544. package/dist/features/upload/server/index.d.ts +1 -0
  545. package/dist/features/upload/server/index.d.ts.map +1 -1
  546. package/dist/features/upload/server/index.js +5 -82
  547. package/dist/features/upload/server/index.js.map +1 -1
  548. package/dist/features/upload/server/markdownTransformer.d.ts +2 -2
  549. package/dist/features/upload/server/markdownTransformer.d.ts.map +1 -1
  550. package/dist/features/upload/server/markdownTransformer.js +1 -1
  551. package/dist/features/upload/server/markdownTransformer.js.map +1 -1
  552. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  553. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  554. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  555. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  556. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  557. package/dist/features/upload/server/schema.d.ts +52 -0
  558. package/dist/features/upload/server/schema.d.ts.map +1 -0
  559. package/dist/features/upload/server/schema.js +149 -0
  560. package/dist/features/upload/server/schema.js.map +1 -0
  561. package/dist/features/upload/server/validate.d.ts +1 -1
  562. package/dist/features/upload/server/validate.d.ts.map +1 -1
  563. package/dist/features/upload/server/validate.js.map +1 -1
  564. package/dist/field/Diff/converters/link.d.ts +1 -1
  565. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  566. package/dist/field/Diff/converters/link.js.map +1 -1
  567. package/dist/field/Diff/converters/listitem/index.css +80 -0
  568. package/dist/field/Diff/converters/listitem/index.d.ts +2 -2
  569. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  570. package/dist/field/Diff/converters/listitem/index.js +1 -0
  571. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  572. package/dist/field/Diff/converters/relationship/index.css +108 -0
  573. package/dist/field/Diff/converters/relationship/index.d.ts +2 -2
  574. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  575. package/dist/field/Diff/converters/relationship/index.js +11 -28
  576. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  577. package/dist/field/Diff/converters/unknown/index.css +37 -0
  578. package/dist/field/Diff/converters/unknown/index.d.ts +1 -1
  579. package/dist/field/Diff/converters/unknown/index.d.ts.map +1 -1
  580. package/dist/field/Diff/converters/unknown/index.js +1 -0
  581. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  582. package/dist/field/Diff/converters/upload/index.css +175 -0
  583. package/dist/field/Diff/converters/upload/index.d.ts +2 -2
  584. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  585. package/dist/field/Diff/converters/upload/index.js +7 -2
  586. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  587. package/dist/field/Diff/index.css +156 -0
  588. package/dist/field/Diff/index.d.ts +1 -1
  589. package/dist/field/Diff/index.d.ts.map +1 -1
  590. package/dist/field/Diff/index.js +1 -0
  591. package/dist/field/Diff/index.js.map +1 -1
  592. package/dist/field/Field.d.ts +3 -3
  593. package/dist/field/Field.d.ts.map +1 -1
  594. package/dist/field/Field.js +13 -12
  595. package/dist/field/Field.js.map +1 -1
  596. package/dist/field/RenderLexical/index.d.ts +2 -2
  597. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  598. package/dist/field/RenderLexical/index.js.map +1 -1
  599. package/dist/field/RichTextViewProvider.d.ts +1 -1
  600. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  601. package/dist/field/RichTextViewProvider.js.map +1 -1
  602. package/dist/field/ViewSelector.css +32 -0
  603. package/dist/field/ViewSelector.d.ts +1 -1
  604. package/dist/field/ViewSelector.d.ts.map +1 -1
  605. package/dist/field/ViewSelector.js +1 -0
  606. package/dist/field/ViewSelector.js.map +1 -1
  607. package/dist/field/bundled.css +1 -1
  608. package/dist/field/index.css +60 -0
  609. package/dist/field/index.d.ts +1 -1
  610. package/dist/field/index.d.ts.map +1 -1
  611. package/dist/field/index.js +1 -1
  612. package/dist/field/index.js.map +1 -1
  613. package/dist/field/rscEntry.d.ts +1 -1
  614. package/dist/field/rscEntry.d.ts.map +1 -1
  615. package/dist/field/rscEntry.js +2 -0
  616. package/dist/field/rscEntry.js.map +1 -1
  617. package/dist/hooks.d.ts +6 -0
  618. package/dist/hooks.d.ts.map +1 -0
  619. package/dist/hooks.js +548 -0
  620. package/dist/hooks.js.map +1 -0
  621. package/dist/index.d.ts +13 -19
  622. package/dist/index.d.ts.map +1 -1
  623. package/dist/index.js +12 -629
  624. package/dist/index.js.map +1 -1
  625. package/dist/lexical/LexicalEditor.css +50 -0
  626. package/dist/lexical/LexicalEditor.d.ts +1 -1
  627. package/dist/lexical/LexicalEditor.d.ts.map +1 -1
  628. package/dist/lexical/LexicalEditor.js +1 -0
  629. package/dist/lexical/LexicalEditor.js.map +1 -1
  630. package/dist/lexical/LexicalProvider.d.ts +1 -1
  631. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  632. package/dist/lexical/LexicalProvider.js.map +1 -1
  633. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  634. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  635. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  636. package/dist/lexical/config/client/loader.d.ts +1 -1
  637. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  638. package/dist/lexical/config/client/loader.js +5 -1
  639. package/dist/lexical/config/client/loader.js.map +1 -1
  640. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  641. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  642. package/dist/lexical/config/client/sanitize.js.map +1 -1
  643. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  644. package/dist/lexical/config/server/sanitize.js +9 -17
  645. package/dist/lexical/config/server/sanitize.js.map +1 -1
  646. package/dist/lexical/config/types.d.ts +1 -1
  647. package/dist/lexical/config/types.d.ts.map +1 -1
  648. package/dist/lexical/config/types.js.map +1 -1
  649. package/dist/lexical/nodes/index.d.ts +1 -1
  650. package/dist/lexical/nodes/index.d.ts.map +1 -1
  651. package/dist/lexical/nodes/index.js.map +1 -1
  652. package/dist/lexical/plugins/DecoratorPlugin/index.css +11 -0
  653. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts +1 -1
  654. package/dist/lexical/plugins/DecoratorPlugin/index.d.ts.map +1 -1
  655. package/dist/lexical/plugins/DecoratorPlugin/index.js +1 -0
  656. package/dist/lexical/plugins/DecoratorPlugin/index.js.map +1 -1
  657. package/dist/lexical/plugins/InsertParagraphAtEnd/index.css +52 -0
  658. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts +1 -1
  659. package/dist/lexical/plugins/InsertParagraphAtEnd/index.d.ts.map +1 -1
  660. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js +1 -0
  661. package/dist/lexical/plugins/InsertParagraphAtEnd/index.js.map +1 -1
  662. package/dist/lexical/plugins/MarkdownShortcut/index.d.ts.map +1 -1
  663. package/dist/lexical/plugins/MarkdownShortcut/index.js +1 -1
  664. package/dist/lexical/plugins/MarkdownShortcut/index.js.map +1 -1
  665. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  666. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  667. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  668. package/dist/lexical/plugins/SlashMenu/index.css +61 -0
  669. package/dist/lexical/plugins/SlashMenu/index.d.ts +1 -1
  670. package/dist/lexical/plugins/SlashMenu/index.d.ts.map +1 -1
  671. package/dist/lexical/plugins/SlashMenu/index.js +2 -0
  672. package/dist/lexical/plugins/SlashMenu/index.js.map +1 -1
  673. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.css +40 -0
  674. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts +1 -1
  675. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.d.ts.map +1 -1
  676. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js +1 -0
  677. package/dist/lexical/plugins/handles/AddBlockHandlePlugin/index.js.map +1 -1
  678. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  679. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.css +84 -0
  680. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts +1 -1
  681. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  682. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js +16 -9
  683. package/dist/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  684. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +1 -1
  685. package/dist/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  686. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  687. package/dist/lexical/theme/EditorTheme.css +358 -0
  688. package/dist/lexical/theme/EditorTheme.d.ts.map +1 -1
  689. package/dist/lexical/theme/EditorTheme.js +1 -0
  690. package/dist/lexical/theme/EditorTheme.js.map +1 -1
  691. package/dist/lexical/ui/ContentEditable.css +95 -0
  692. package/dist/lexical/ui/ContentEditable.d.ts +1 -1
  693. package/dist/lexical/ui/ContentEditable.d.ts.map +1 -1
  694. package/dist/lexical/ui/ContentEditable.js +1 -0
  695. package/dist/lexical/ui/ContentEditable.js.map +1 -1
  696. package/dist/lexical/ui/icons/Code/index.js +1 -1
  697. package/dist/lexical/ui/icons/Code/index.js.map +1 -1
  698. package/dist/lexical/ui/icons/CodeBlock/index.js +1 -1
  699. package/dist/lexical/ui/icons/CodeBlock/index.js.map +1 -1
  700. package/dist/lexical/ui/icons/Link/index.js +1 -1
  701. package/dist/lexical/ui/icons/Link/index.js.map +1 -1
  702. package/dist/lexical/ui/icons/Page/index.d.ts +5 -0
  703. package/dist/lexical/ui/icons/Page/index.d.ts.map +1 -0
  704. package/dist/lexical/ui/icons/Page/index.js +21 -0
  705. package/dist/lexical/ui/icons/Page/index.js.map +1 -0
  706. package/dist/lexical/ui/icons/Trash/index.d.ts +10 -0
  707. package/dist/lexical/ui/icons/Trash/index.d.ts.map +1 -0
  708. package/dist/lexical/ui/icons/Trash/index.js +29 -0
  709. package/dist/lexical/ui/icons/Trash/index.js.map +1 -0
  710. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts +17 -0
  711. package/dist/lexical/utils/markdown/convertFromMarkdownString.d.ts.map +1 -0
  712. package/dist/lexical/utils/markdown/convertFromMarkdownString.js +27 -0
  713. package/dist/lexical/utils/markdown/convertFromMarkdownString.js.map +1 -0
  714. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js +88 -0
  715. package/dist/lexical/utils/markdown/convertFromMarkdownString.spec.js.map +1 -0
  716. package/dist/lexical/utils/markdown/createBlockNode.d.ts +1 -1
  717. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  718. package/dist/lexical/utils/markdown/createBlockNode.js.map +1 -1
  719. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts +25 -0
  720. package/dist/lexical/utils/markdown/normalizeMarkdown.d.ts.map +1 -0
  721. package/dist/lexical/utils/markdown/normalizeMarkdown.js +91 -0
  722. package/dist/lexical/utils/markdown/normalizeMarkdown.js.map +1 -0
  723. package/dist/lexical-proxy/@lexical-markdown.d.ts +1 -1
  724. package/dist/lexical-proxy/@lexical-markdown.d.ts.map +1 -1
  725. package/dist/lexical-proxy/@lexical-markdown.js +1 -1
  726. package/dist/lexical-proxy/@lexical-markdown.js.map +1 -1
  727. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  728. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  729. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  730. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  731. package/dist/types/builtInNodes.d.ts +14 -0
  732. package/dist/types/builtInNodes.d.ts.map +1 -0
  733. package/dist/types/builtInNodes.js +203 -0
  734. package/dist/types/builtInNodes.js.map +1 -0
  735. package/dist/{types.d.ts → types/index.d.ts} +25 -26
  736. package/dist/types/index.d.ts.map +1 -0
  737. package/dist/types/index.js +2 -0
  738. package/dist/types/index.js.map +1 -0
  739. package/dist/types/jsonSchemaHelpers.d.ts +30 -0
  740. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  741. package/dist/types/jsonSchemaHelpers.js +58 -0
  742. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  743. package/dist/types/nodeTypes.d.ts +128 -0
  744. package/dist/types/nodeTypes.d.ts.map +1 -0
  745. package/dist/types/nodeTypes.js +6 -0
  746. package/dist/types/nodeTypes.js.map +1 -0
  747. package/dist/types/schema.d.ts +6 -0
  748. package/dist/types/schema.d.ts.map +1 -0
  749. package/dist/types/schema.js +90 -0
  750. package/dist/types/schema.js.map +1 -0
  751. package/dist/utilities/applyBaseFilterToFields.d.ts.map +1 -1
  752. package/dist/utilities/applyBaseFilterToFields.js +1 -2
  753. package/dist/utilities/applyBaseFilterToFields.js.map +1 -1
  754. package/dist/utilities/buildEditorState.d.ts +18 -4
  755. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  756. package/dist/utilities/buildEditorState.js +8 -0
  757. package/dist/utilities/buildEditorState.js.map +1 -1
  758. package/dist/utilities/buildInitialState.d.ts +2 -1
  759. package/dist/utilities/buildInitialState.d.ts.map +1 -1
  760. package/dist/utilities/buildInitialState.js.map +1 -1
  761. package/dist/utilities/createClientFeature.d.ts +1 -1
  762. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  763. package/dist/utilities/createClientFeature.js.map +1 -1
  764. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  765. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  766. package/dist/utilities/editorConfigFactory.js.map +1 -1
  767. package/dist/utilities/fieldsDrawer/Drawer.d.ts.map +1 -1
  768. package/dist/utilities/fieldsDrawer/Drawer.js +19 -10
  769. package/dist/utilities/fieldsDrawer/Drawer.js.map +1 -1
  770. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts +4 -1
  771. package/dist/utilities/fieldsDrawer/DrawerContent.d.ts.map +1 -1
  772. package/dist/utilities/fieldsDrawer/DrawerContent.js +8 -7
  773. package/dist/utilities/fieldsDrawer/DrawerContent.js.map +1 -1
  774. package/dist/utilities/fieldsDrawer/index.css +12 -0
  775. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts +29 -0
  776. package/dist/utilities/fieldsDrawer/useDrawerSubmit.d.ts.map +1 -0
  777. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js +97 -0
  778. package/dist/utilities/fieldsDrawer/useDrawerSubmit.js.map +1 -0
  779. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts +1 -0
  780. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  781. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js +34 -18
  782. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.js.map +1 -1
  783. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  784. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  785. package/dist/utilities/generateImportMap.d.ts +1 -1
  786. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  787. package/dist/utilities/generateImportMap.js.map +1 -1
  788. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  789. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  790. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  791. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  792. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  793. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  794. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  795. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js +1 -1
  796. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  797. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  798. package/dist/validate/index.d.ts.map +1 -1
  799. package/package.json +27 -31
  800. package/dist/exports/client/Field-NXLXFFLW.js +0 -2
  801. package/dist/exports/client/Field-NXLXFFLW.js.map +0 -7
  802. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js +0 -2
  803. package/dist/exports/client/RelationshipComponent-BG3DPV3T.js.map +0 -7
  804. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  805. package/dist/exports/client/chunk-DZDHVMML.js +0 -2
  806. package/dist/exports/client/chunk-DZDHVMML.js.map +0 -7
  807. package/dist/exports/client/chunk-F26IQ5RE.js +0 -2
  808. package/dist/exports/client/chunk-F26IQ5RE.js.map +0 -7
  809. package/dist/exports/client/chunk-FTT5KJ6W.js +0 -12
  810. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  811. package/dist/exports/client/chunk-INBEEENE.js +0 -2
  812. package/dist/exports/client/chunk-INBEEENE.js.map +0 -7
  813. package/dist/exports/client/chunk-QJ5EETIB.js +0 -2
  814. package/dist/exports/client/chunk-QJ5EETIB.js.map +0 -7
  815. package/dist/exports/client/component-XIHC3W6W.js +0 -2
  816. package/dist/exports/client/component-XIHC3W6W.js.map +0 -7
  817. package/dist/exports/client/componentInline-LCHKRXOV.js +0 -2
  818. package/dist/features/blockquote/markdownTransformer.d.ts +0 -3
  819. package/dist/features/blockquote/markdownTransformer.d.ts.map +0 -1
  820. package/dist/features/blockquote/markdownTransformer.js +0 -33
  821. package/dist/features/blockquote/markdownTransformer.js.map +0 -1
  822. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts +0 -4
  823. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.d.ts.map +0 -1
  824. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js +0 -7
  825. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/linebreak.js.map +0 -1
  826. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts +0 -4
  827. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.d.ts.map +0 -1
  828. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js +0 -38
  829. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/paragraph.js.map +0 -1
  830. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts +0 -4
  831. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.d.ts.map +0 -1
  832. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js +0 -9
  833. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/tab.js.map +0 -1
  834. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts +0 -4
  835. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.d.ts.map +0 -1
  836. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js +0 -33
  837. package/dist/features/converters/lexicalToHtml_deprecated/converter/converters/text.js.map +0 -1
  838. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts +0 -6
  839. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.d.ts.map +0 -1
  840. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js +0 -9
  841. package/dist/features/converters/lexicalToHtml_deprecated/converter/defaultConverters.js.map +0 -1
  842. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts +0 -70
  843. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.d.ts.map +0 -1
  844. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js +0 -104
  845. package/dist/features/converters/lexicalToHtml_deprecated/converter/index.js.map +0 -1
  846. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts +0 -27
  847. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.d.ts.map +0 -1
  848. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js +0 -2
  849. package/dist/features/converters/lexicalToHtml_deprecated/converter/types.js.map +0 -1
  850. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts +0 -39
  851. package/dist/features/converters/lexicalToHtml_deprecated/field/index.d.ts.map +0 -1
  852. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js +0 -122
  853. package/dist/features/converters/lexicalToHtml_deprecated/field/index.js.map +0 -1
  854. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts +0 -12
  855. package/dist/features/converters/lexicalToHtml_deprecated/index.d.ts.map +0 -1
  856. package/dist/features/converters/lexicalToHtml_deprecated/index.js +0 -11
  857. package/dist/features/converters/lexicalToHtml_deprecated/index.js.map +0 -1
  858. package/dist/features/format/bold/markdownTransformers.d.ts +0 -6
  859. package/dist/features/format/bold/markdownTransformers.d.ts.map +0 -1
  860. package/dist/features/format/bold/markdownTransformers.js +0 -23
  861. package/dist/features/format/bold/markdownTransformers.js.map +0 -1
  862. package/dist/features/format/inlineCode/markdownTransformers.d.ts +0 -3
  863. package/dist/features/format/inlineCode/markdownTransformers.d.ts.map +0 -1
  864. package/dist/features/format/inlineCode/markdownTransformers.js +0 -6
  865. package/dist/features/format/inlineCode/markdownTransformers.js.map +0 -1
  866. package/dist/features/format/italic/markdownTransformers.d.ts +0 -4
  867. package/dist/features/format/italic/markdownTransformers.d.ts.map +0 -1
  868. package/dist/features/format/italic/markdownTransformers.js +0 -12
  869. package/dist/features/format/italic/markdownTransformers.js.map +0 -1
  870. package/dist/features/format/strikethrough/markdownTransformers.d.ts +0 -3
  871. package/dist/features/format/strikethrough/markdownTransformers.d.ts.map +0 -1
  872. package/dist/features/format/strikethrough/markdownTransformers.js +0 -6
  873. package/dist/features/format/strikethrough/markdownTransformers.js.map +0 -1
  874. package/dist/features/link/nodes/types.d.ts +0 -27
  875. package/dist/features/link/nodes/types.d.ts.map +0 -1
  876. package/dist/features/link/nodes/types.js +0 -2
  877. package/dist/features/link/nodes/types.js.map +0 -1
  878. package/dist/features/lists/checklist/markdownTransformers.d.ts +0 -3
  879. package/dist/features/lists/checklist/markdownTransformers.d.ts.map +0 -1
  880. package/dist/features/lists/checklist/markdownTransformers.js +0 -12
  881. package/dist/features/lists/checklist/markdownTransformers.js.map +0 -1
  882. package/dist/features/lists/htmlConverter.d.ts +0 -5
  883. package/dist/features/lists/htmlConverter.d.ts.map +0 -1
  884. package/dist/features/lists/htmlConverter.js +0 -81
  885. package/dist/features/lists/htmlConverter.js.map +0 -1
  886. package/dist/features/lists/orderedList/markdownTransformer.d.ts +0 -3
  887. package/dist/features/lists/orderedList/markdownTransformer.d.ts.map +0 -1
  888. package/dist/features/lists/orderedList/markdownTransformer.js +0 -12
  889. package/dist/features/lists/orderedList/markdownTransformer.js.map +0 -1
  890. package/dist/features/lists/shared/markdown.d.ts +0 -6
  891. package/dist/features/lists/shared/markdown.d.ts.map +0 -1
  892. package/dist/features/lists/shared/markdown.js +0 -57
  893. package/dist/features/lists/shared/markdown.js.map +0 -1
  894. package/dist/features/lists/unorderedList/markdownTransformer.d.ts +0 -3
  895. package/dist/features/lists/unorderedList/markdownTransformer.d.ts.map +0 -1
  896. package/dist/features/lists/unorderedList/markdownTransformer.js +0 -12
  897. package/dist/features/lists/unorderedList/markdownTransformer.js.map +0 -1
  898. package/dist/lexical/utils/guard.d.ts +0 -5
  899. package/dist/lexical/utils/guard.d.ts.map +0 -1
  900. package/dist/lexical/utils/guard.js +0 -9
  901. package/dist/lexical/utils/guard.js.map +0 -1
  902. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts +0 -2
  903. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.d.ts.map +0 -1
  904. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js +0 -2
  905. package/dist/lexical-proxy/@lexical-react/LexicalContextMenuPlugin.js.map +0 -1
  906. package/dist/nodeTypes.d.ts +0 -74
  907. package/dist/nodeTypes.d.ts.map +0 -1
  908. package/dist/nodeTypes.js +0 -5
  909. package/dist/nodeTypes.js.map +0 -1
  910. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts +0 -14
  911. package/dist/packages/@lexical/markdown/MarkdownExport.d.ts.map +0 -1
  912. package/dist/packages/@lexical/markdown/MarkdownExport.js +0 -213
  913. package/dist/packages/@lexical/markdown/MarkdownExport.js.map +0 -1
  914. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts +0 -19
  915. package/dist/packages/@lexical/markdown/MarkdownImport.d.ts.map +0 -1
  916. package/dist/packages/@lexical/markdown/MarkdownImport.js +0 -198
  917. package/dist/packages/@lexical/markdown/MarkdownImport.js.map +0 -1
  918. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts +0 -11
  919. package/dist/packages/@lexical/markdown/MarkdownShortcuts.d.ts.map +0 -1
  920. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js +0 -304
  921. package/dist/packages/@lexical/markdown/MarkdownShortcuts.js.map +0 -1
  922. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts +0 -147
  923. package/dist/packages/@lexical/markdown/MarkdownTransformers.d.ts.map +0 -1
  924. package/dist/packages/@lexical/markdown/MarkdownTransformers.js +0 -268
  925. package/dist/packages/@lexical/markdown/MarkdownTransformers.js.map +0 -1
  926. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts +0 -22
  927. package/dist/packages/@lexical/markdown/importTextFormatTransformer.d.ts.map +0 -1
  928. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js +0 -91
  929. package/dist/packages/@lexical/markdown/importTextFormatTransformer.js.map +0 -1
  930. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts +0 -21
  931. package/dist/packages/@lexical/markdown/importTextMatchTransformer.d.ts.map +0 -1
  932. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js +0 -54
  933. package/dist/packages/@lexical/markdown/importTextMatchTransformer.js.map +0 -1
  934. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts +0 -18
  935. package/dist/packages/@lexical/markdown/importTextTransformers.d.ts.map +0 -1
  936. package/dist/packages/@lexical/markdown/importTextTransformers.js +0 -54
  937. package/dist/packages/@lexical/markdown/importTextTransformers.js.map +0 -1
  938. package/dist/packages/@lexical/markdown/index.d.ts +0 -29
  939. package/dist/packages/@lexical/markdown/index.d.ts.map +0 -1
  940. package/dist/packages/@lexical/markdown/index.js +0 -39
  941. package/dist/packages/@lexical/markdown/index.js.map +0 -1
  942. package/dist/packages/@lexical/markdown/utils.d.ts +0 -34
  943. package/dist/packages/@lexical/markdown/utils.d.ts.map +0 -1
  944. package/dist/packages/@lexical/markdown/utils.js +0 -267
  945. package/dist/packages/@lexical/markdown/utils.js.map +0 -1
  946. package/dist/types.d.ts.map +0 -1
  947. package/dist/types.js +0 -2
  948. package/dist/types.js.map +0 -1
  949. /package/dist/exports/client/{componentInline-LCHKRXOV.js.map → componentInline-H24N7GUG.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { ORDERED_LIST } from '@lexical/markdown';
2
3
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
4
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
+ import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
5
6
  import { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js';
6
- import { ORDERED_LIST } from '../markdownTransformer.js';
7
7
  import { i18n } from './i18n.js';
8
8
  export const OrderedListFeature = createServerFeature({
9
9
  feature: ({
@@ -14,14 +14,10 @@ export const OrderedListFeature = createServerFeature({
14
14
  i18n,
15
15
  markdownTransformers: [ORDERED_LIST],
16
16
  nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap) ? [createNode({
17
- converters: {
18
- html: ListHTMLConverter
19
- },
17
+ jsonSchema: listNodeJSONSchema,
20
18
  node: ListNode
21
19
  }), createNode({
22
- converters: {
23
- html: ListItemHTMLConverter
24
- },
20
+ jsonSchema: listItemNodeJSONSchema,
25
21
  node: ListItemNode
26
22
  })] : []
27
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","shouldRegisterListBaseNodes","ORDERED_LIST","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { ORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,YAAY,QAAQ;AAC7B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBP,mBAAA,CAAoB;EACpDQ,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACN,YAAA,CAAa;MACpCO,KAAA,EAAOR,2BAAA,CAA4B,WAAWK,kBAAA,IAC1C,CACER,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMZ;QACR;QACAa,IAAA,EAAMhB;MACR,IACAE,UAAA,CAAW;QACTY,UAAA,EAAY;UACVC,IAAA,EAAMX;QACR;QACAY,IAAA,EAAMjB;MACR,GACD,GACD;IACN;EACF;EACAkB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","ORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","shouldRegisterListBaseNodes","i18n","OrderedListFeature","feature","featureProviderMap","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/orderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { ORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { shouldRegisterListBaseNodes } from '../../shared/shouldRegisterListBaseNodes.js'\nimport { i18n } from './i18n.js'\n\nexport const OrderedListFeature = createServerFeature({\n feature: ({ featureProviderMap }) => {\n return {\n ClientFeature: '@payloadcms/richtext-lexical/client#OrderedListFeatureClient',\n i18n,\n markdownTransformers: [ORDERED_LIST],\n nodes: shouldRegisterListBaseNodes('ordered', featureProviderMap)\n ? [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ]\n : [],\n }\n },\n key: 'orderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,YAAY,QAAQ;AAE7B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,kBAAA,GAAqBN,mBAAA,CAAoB;EACpDO,OAAA,EAASA,CAAC;IAAEC;EAAkB,CAAE;IAC9B,OAAO;MACLC,aAAA,EAAe;MACfJ,IAAA;MACAK,oBAAA,EAAsB,CAACX,YAAA,CAAa;MACpCY,KAAA,EAAOP,2BAAA,CAA4B,WAAWI,kBAAA,IAC1C,CACEP,UAAA,CAAW;QACTW,UAAA,EAAYT,kBAAA;QACZU,IAAA,EAAMf;MACR,IACAG,UAAA,CAAW;QACTW,UAAA,EAAYV,sBAAA;QACZW,IAAA,EAAMhB;MACR,GACD,GACD;IACN;EACF;EACAiB,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,12 +1,3 @@
1
- import type { SerializedListItemNode as _SerializedListItemNode, SerializedListNode as _SerializedListNode } from '@lexical/list';
2
- import type { SerializedLexicalNode } from 'lexical';
3
- import type { StronglyTypedElementNode } from '../../../nodeTypes.js';
4
1
  import type { PluginComponent } from '../../typesClient.js';
5
- export type SerializedListItemNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {
6
- checked?: boolean;
7
- } & StronglyTypedElementNode<_SerializedListItemNode, 'listitem', T>;
8
- export type SerializedListNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {
9
- checked?: boolean;
10
- } & StronglyTypedElementNode<_SerializedListNode, 'list', T>;
11
2
  export declare const LexicalListPlugin: PluginComponent<undefined>;
12
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/plugin/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,IAAI,uBAAuB,EACjD,kBAAkB,IAAI,mBAAmB,EAC1C,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAKpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IAC5F,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,uBAAuB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAA;AAEpE,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,IAAI;IACxF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;AAE5D,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,SAAS,CAExD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/plugin/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAAC,SAAS,CAExD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListPlugin","React","LexicalListPlugin","_jsx"],"sources":["../../../../src/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport type {\n SerializedListItemNode as _SerializedListItemNode,\n SerializedListNode as _SerializedListNode,\n} from '@lexical/list'\nimport type { SerializedLexicalNode } from 'lexical'\n\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { StronglyTypedElementNode } from '../../../nodeTypes.js'\nimport type { PluginComponent } from '../../typesClient.js'\n\nexport type SerializedListItemNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n checked?: boolean\n} & StronglyTypedElementNode<_SerializedListItemNode, 'listitem', T>\n\nexport type SerializedListNode<T extends SerializedLexicalNode = SerializedLexicalNode> = {\n checked?: boolean\n} & StronglyTypedElementNode<_SerializedListNode, 'list', T>\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n"],"mappings":"AAAA;;;AAOA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,KAAA,MAAW;AAalB,OAAO,MAAMC,iBAAA,GAAgDA,CAAA;EAC3D,oBAAOC,IAAA,CAACH,UAAA;AACV","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListPlugin","React","LexicalListPlugin","_jsx"],"sources":["../../../../src/features/lists/plugin/index.tsx"],"sourcesContent":["'use client'\nimport { ListPlugin } from '@lexical/react/LexicalListPlugin.js'\nimport React from 'react'\n\nimport type { PluginComponent } from '../../typesClient.js'\n\nexport const LexicalListPlugin: PluginComponent<undefined> = () => {\n return <ListPlugin />\n}\n"],"mappings":"AAAA;;;AACA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,KAAA,MAAW;AAIlB,OAAO,MAAMC,iBAAA,GAAgDA,CAAA;EAC3D,oBAAOC,IAAA,CAACH,UAAA;AACV","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ import type { SerializedLexicalNode } from 'lexical';
2
+ import type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js';
3
+ import type { JSONSchemaFn } from '../../typesServer.js';
4
+ export interface SerializedListItemNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode> extends SerializedLexicalElementBase<TChildren> {
5
+ checked?: boolean;
6
+ type: 'listitem';
7
+ value: number;
8
+ }
9
+ export interface SerializedListNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode> extends SerializedLexicalElementBase<TChildren> {
10
+ checked?: boolean;
11
+ listType: 'bullet' | 'check' | 'number';
12
+ start: number;
13
+ tag: 'ol' | 'ul';
14
+ type: 'list';
15
+ }
16
+ export declare const listNodeJSONSchema: JSONSchemaFn;
17
+ export declare const listItemNodeJSONSchema: JSONSchemaFn;
18
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/features/lists/shared/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,WAAW,sBAAsB,CACrC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB,CAAC,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CACjG,SAAQ,4BAA4B,CAAC,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAkBD,eAAO,MAAM,kBAAkB,EAAE,YAiBhC,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,YAepC,CAAA"}
@@ -0,0 +1,62 @@
1
+ /** MUST stay byte-for-byte in sync with the runtime `SerializedListNode` declared above. */const SERIALIZED_LIST_NODE_TS = `export interface SerializedListNode<TChildren> extends SerializedLexicalElementBase<TChildren> {
2
+ type: 'list';
3
+ checked?: boolean;
4
+ listType: 'number' | 'bullet' | 'check';
5
+ start: number;
6
+ tag: 'ul' | 'ol';
7
+ }`;
8
+ /** MUST stay byte-for-byte in sync with the runtime `SerializedListItemNode` declared above. */
9
+ const SERIALIZED_LIST_ITEM_NODE_TS = `export interface SerializedListItemNode<TChildren> extends SerializedLexicalElementBase<TChildren> {
10
+ type: 'listitem';
11
+ checked?: boolean;
12
+ value: number;
13
+ }`;
14
+ export const listNodeJSONSchema = ({
15
+ elementNodeSchema,
16
+ nodeUnionName,
17
+ typeStringDefinitions
18
+ }) => {
19
+ typeStringDefinitions.add(SERIALIZED_LIST_NODE_TS);
20
+ return elementNodeSchema({
21
+ nodeType: 'list',
22
+ properties: {
23
+ checked: {
24
+ type: 'boolean'
25
+ },
26
+ listType: {
27
+ type: 'string',
28
+ enum: ['number', 'bullet', 'check']
29
+ },
30
+ start: {
31
+ type: 'integer'
32
+ },
33
+ tag: {
34
+ type: 'string',
35
+ enum: ['ul', 'ol']
36
+ }
37
+ },
38
+ required: ['listType', 'start', 'tag'],
39
+ tsType: `SerializedListNode<${nodeUnionName}>`
40
+ });
41
+ };
42
+ export const listItemNodeJSONSchema = ({
43
+ elementNodeSchema,
44
+ nodeUnionName,
45
+ typeStringDefinitions
46
+ }) => {
47
+ typeStringDefinitions.add(SERIALIZED_LIST_ITEM_NODE_TS);
48
+ return elementNodeSchema({
49
+ nodeType: 'listitem',
50
+ properties: {
51
+ checked: {
52
+ type: 'boolean'
53
+ },
54
+ value: {
55
+ type: 'integer'
56
+ }
57
+ },
58
+ required: ['value'],
59
+ tsType: `SerializedListItemNode<${nodeUnionName}>`
60
+ });
61
+ };
62
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":["SERIALIZED_LIST_NODE_TS","SERIALIZED_LIST_ITEM_NODE_TS","listNodeJSONSchema","elementNodeSchema","nodeUnionName","typeStringDefinitions","add","nodeType","properties","checked","type","listType","enum","start","tag","required","tsType","listItemNodeJSONSchema","value"],"sources":["../../../../src/features/lists/shared/schema.ts"],"sourcesContent":["import type { SerializedLexicalNode } from 'lexical'\n\nimport type { SerializedLexicalElementBase } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\n\nexport interface SerializedListItemNode<\n TChildren extends SerializedLexicalNode = SerializedLexicalNode,\n> extends SerializedLexicalElementBase<TChildren> {\n checked?: boolean\n type: 'listitem'\n value: number\n}\n\nexport interface SerializedListNode<TChildren extends SerializedLexicalNode = SerializedLexicalNode>\n extends SerializedLexicalElementBase<TChildren> {\n checked?: boolean\n listType: 'bullet' | 'check' | 'number'\n start: number\n tag: 'ol' | 'ul'\n type: 'list'\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedListNode` declared above. */\nconst SERIALIZED_LIST_NODE_TS = `export interface SerializedListNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'list';\n checked?: boolean;\n listType: 'number' | 'bullet' | 'check';\n start: number;\n tag: 'ul' | 'ol';\n}`\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedListItemNode` declared above. */\nconst SERIALIZED_LIST_ITEM_NODE_TS = `export interface SerializedListItemNode<TChildren> extends SerializedLexicalElementBase<TChildren> {\n type: 'listitem';\n checked?: boolean;\n value: number;\n}`\n\nexport const listNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(SERIALIZED_LIST_NODE_TS)\n return elementNodeSchema({\n nodeType: 'list',\n properties: {\n checked: { type: 'boolean' },\n listType: { type: 'string', enum: ['number', 'bullet', 'check'] },\n start: { type: 'integer' },\n tag: { type: 'string', enum: ['ul', 'ol'] },\n },\n required: ['listType', 'start', 'tag'],\n tsType: `SerializedListNode<${nodeUnionName}>`,\n })\n}\n\nexport const listItemNodeJSONSchema: JSONSchemaFn = ({\n elementNodeSchema,\n nodeUnionName,\n typeStringDefinitions,\n}) => {\n typeStringDefinitions.add(SERIALIZED_LIST_ITEM_NODE_TS)\n return elementNodeSchema({\n nodeType: 'listitem',\n properties: {\n checked: { type: 'boolean' },\n value: { type: 'integer' },\n },\n required: ['value'],\n tsType: `SerializedListItemNode<${nodeUnionName}>`,\n })\n}\n"],"mappings":"AAsBA,4FACA,MAAMA,uBAAA,GAA0B;;;;;;EAM9B;AAEF;AACA,MAAMC,4BAAA,GAA+B;;;;EAInC;AAEF,OAAO,MAAMC,kBAAA,GAAmCA,CAAC;EAC/CC,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACN,uBAAA;EAC1B,OAAOG,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,IAAA,EAAM;MAAU;MAC3BC,QAAA,EAAU;QAAED,IAAA,EAAM;QAAUE,IAAA,EAAM,CAAC,UAAU,UAAU;MAAS;MAChEC,KAAA,EAAO;QAAEH,IAAA,EAAM;MAAU;MACzBI,GAAA,EAAK;QAAEJ,IAAA,EAAM;QAAUE,IAAA,EAAM,CAAC,MAAM;MAAM;IAC5C;IACAG,QAAA,EAAU,CAAC,YAAY,SAAS,MAAM;IACtCC,MAAA,EAAQ,sBAAsBZ,aAAA;EAChC;AACF;AAEA,OAAO,MAAMa,sBAAA,GAAuCA,CAAC;EACnDd,iBAAiB;EACjBC,aAAa;EACbC;AAAqB,CACtB;EACCA,qBAAA,CAAsBC,GAAG,CAACL,4BAAA;EAC1B,OAAOE,iBAAA,CAAkB;IACvBI,QAAA,EAAU;IACVC,UAAA,EAAY;MACVC,OAAA,EAAS;QAAEC,IAAA,EAAM;MAAU;MAC3BQ,KAAA,EAAO;QAAER,IAAA,EAAM;MAAU;IAC3B;IACAK,QAAA,EAAU,CAAC,QAAQ;IACnBC,MAAA,EAAQ,0BAA0BZ,aAAA;EACpC;AACF","ignoreList":[]}
@@ -1,13 +1,13 @@
1
1
  'use client';
2
2
 
3
3
  import { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list';
4
+ import { UNORDERED_LIST } from '@lexical/markdown';
4
5
  import { $isRangeSelection } from 'lexical';
5
6
  import { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js';
6
7
  import { createClientFeature } from '../../../../utilities/createClientFeature.js';
7
8
  import { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js';
8
9
  import { LexicalListPlugin } from '../../plugin/index.js';
9
10
  import { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js';
10
- import { UNORDERED_LIST } from '../markdownTransformer.js';
11
11
  const toolbarGroups = [toolbarTextDropdownGroupWithItems([{
12
12
  ChildComponent: UnorderedListIcon,
13
13
  isActive: ({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","$isRangeSelection","UnorderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","UNORDERED_LIST","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","UnorderedListFeatureClient","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nexport const UnorderedListFeatureClient = createClientFeature({\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACnF,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,cAAc,QAAQ;AAE/B,MAAMC,aAAA,GAAgC,CACpCJ,iCAAA,CAAkC,CAChC;EACEK,cAAA,EAAgBP,iBAAA;EAChBQ,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACV,iBAAA,CAAkBU,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIhB,WAAA,CAAYe,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,UAAU;QACxD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAInB,WAAA,CAAYkB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,UAAU;QAC5D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAInB,WAAA,CAAYoB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,UAAU;QACxE;MACF;MAEA,OAAO;IACT;IACA,OAAO;EACT;EACAI,GAAA,EAAK;EACLC,KAAA,EAAOA,CAAC;IAAEC;EAAI,CAAE;IACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;EAChB;EACAC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;EACxD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6BxB,mBAAA,CAAoB;EAC5DyB,oBAAA,EAAsB,CAACrB,cAAA,CAAe;EACtCsB,KAAA,EAAO,CAAC7B,QAAA,EAAUD,YAAA,CAAa;EAC/B+B,OAAA,EAAS,CACP;IACEC,SAAA,EAAW1B,iBAAA;IACX2B,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACN5B,2BAAA,CAA4B,CAC1B;MACE6B,IAAA,EAAMjC,iBAAA;MACNgB,GAAA,EAAK;MACLkB,QAAA,EAAU,CAAC,kBAAkB,KAAK;MAClCjB,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;MACxD;IACF,EACD;EAEL;EACAY,YAAA,EAAc;IACZH,MAAA,EAAQ1B;EACV;EACA8B,aAAA,EAAe;IACbJ,MAAA,EAAQ1B;EACV;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["$isListNode","INSERT_UNORDERED_LIST_COMMAND","ListItemNode","ListNode","UNORDERED_LIST","$isRangeSelection","UnorderedListIcon","createClientFeature","toolbarTextDropdownGroupWithItems","LexicalListPlugin","slashMenuListGroupWithItems","toolbarGroups","ChildComponent","isActive","selection","node","getNodes","getListType","parent","getParent","parentParent","key","label","i18n","t","onSelect","editor","dispatchCommand","undefined","order","UnorderedListFeatureClient","markdownTransformers","nodes","plugins","Component","position","slashMenu","groups","Icon","keywords","toolbarFixed","toolbarInline"],"sources":["../../../../../src/features/lists/unorderedList/client/index.tsx"],"sourcesContent":["'use client'\n\nimport { $isListNode, INSERT_UNORDERED_LIST_COMMAND, ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\nimport { $isRangeSelection } from 'lexical'\n\nimport type { ToolbarGroup } from '../../../toolbars/types.js'\n\nimport { UnorderedListIcon } from '../../../../lexical/ui/icons/UnorderedList/index.js'\nimport { createClientFeature } from '../../../../utilities/createClientFeature.js'\nimport { toolbarTextDropdownGroupWithItems } from '../../../shared/toolbar/textDropdownGroup.js'\nimport { LexicalListPlugin } from '../../plugin/index.js'\nimport { slashMenuListGroupWithItems } from '../../shared/slashMenuListGroup.js'\n\nconst toolbarGroups: ToolbarGroup[] = [\n toolbarTextDropdownGroupWithItems([\n {\n ChildComponent: UnorderedListIcon,\n isActive: ({ selection }) => {\n if (!$isRangeSelection(selection)) {\n return false\n }\n for (const node of selection.getNodes()) {\n if ($isListNode(node) && node.getListType() === 'bullet') {\n continue\n }\n\n const parent = node.getParent()\n\n if ($isListNode(parent) && parent.getListType() === 'bullet') {\n continue\n }\n\n const parentParent = parent?.getParent()\n // Example scenario: Node = textNode, parent = listItemNode, parentParent = listNode\n if ($isListNode(parentParent) && parentParent.getListType() === 'bullet') {\n continue\n }\n\n return false\n }\n return true\n },\n key: 'unorderedList',\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n order: 11,\n },\n ]),\n]\n\nexport const UnorderedListFeatureClient = createClientFeature({\n markdownTransformers: [UNORDERED_LIST],\n nodes: [ListNode, ListItemNode],\n plugins: [\n {\n Component: LexicalListPlugin,\n position: 'normal',\n },\n ],\n slashMenu: {\n groups: [\n slashMenuListGroupWithItems([\n {\n Icon: UnorderedListIcon,\n key: 'unorderedList',\n keywords: ['unordered list', 'ul'],\n label: ({ i18n }) => {\n return i18n.t('lexical:unorderedList:label')\n },\n onSelect: ({ editor }) => {\n editor.dispatchCommand(INSERT_UNORDERED_LIST_COMMAND, undefined)\n },\n },\n ]),\n ],\n },\n toolbarFixed: {\n groups: toolbarGroups,\n },\n toolbarInline: {\n groups: toolbarGroups,\n },\n})\n"],"mappings":"AAAA;;AAEA,SAASA,WAAW,EAAEC,6BAA6B,EAAEC,YAAY,EAAEC,QAAQ,QAAQ;AACnF,SAASC,cAAc,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ;AAIlC,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,iCAAiC,QAAQ;AAClD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,2BAA2B,QAAQ;AAE5C,MAAMC,aAAA,GAAgC,CACpCH,iCAAA,CAAkC,CAChC;EACEI,cAAA,EAAgBN,iBAAA;EAChBO,QAAA,EAAUA,CAAC;IAAEC;EAAS,CAAE;IACtB,IAAI,CAACT,iBAAA,CAAkBS,SAAA,GAAY;MACjC,OAAO;IACT;IACA,KAAK,MAAMC,IAAA,IAAQD,SAAA,CAAUE,QAAQ,IAAI;MACvC,IAAIhB,WAAA,CAAYe,IAAA,KAASA,IAAA,CAAKE,WAAW,OAAO,UAAU;QACxD;MACF;MAEA,MAAMC,MAAA,GAASH,IAAA,CAAKI,SAAS;MAE7B,IAAInB,WAAA,CAAYkB,MAAA,KAAWA,MAAA,CAAOD,WAAW,OAAO,UAAU;QAC5D;MACF;MAEA,MAAMG,YAAA,GAAeF,MAAA,EAAQC,SAAA;MAC7B;MACA,IAAInB,WAAA,CAAYoB,YAAA,KAAiBA,YAAA,CAAaH,WAAW,OAAO,UAAU;QACxE;MACF;MAEA,OAAO;IACT;IACA,OAAO;EACT;EACAI,GAAA,EAAK;EACLC,KAAA,EAAOA,CAAC;IAAEC;EAAI,CAAE;IACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;EAChB;EACAC,QAAA,EAAUA,CAAC;IAAEC;EAAM,CAAE;IACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;EACxD;EACAC,KAAA,EAAO;AACT,EACD,EACF;AAED,OAAO,MAAMC,0BAAA,GAA6BvB,mBAAA,CAAoB;EAC5DwB,oBAAA,EAAsB,CAAC3B,cAAA,CAAe;EACtC4B,KAAA,EAAO,CAAC7B,QAAA,EAAUD,YAAA,CAAa;EAC/B+B,OAAA,EAAS,CACP;IACEC,SAAA,EAAWzB,iBAAA;IACX0B,QAAA,EAAU;EACZ,EACD;EACDC,SAAA,EAAW;IACTC,MAAA,EAAQ,CACN3B,2BAAA,CAA4B,CAC1B;MACE4B,IAAA,EAAMhC,iBAAA;MACNe,GAAA,EAAK;MACLkB,QAAA,EAAU,CAAC,kBAAkB,KAAK;MAClCjB,KAAA,EAAOA,CAAC;QAAEC;MAAI,CAAE;QACd,OAAOA,IAAA,CAAKC,CAAC,CAAC;MAChB;MACAC,QAAA,EAAUA,CAAC;QAAEC;MAAM,CAAE;QACnBA,MAAA,CAAOC,eAAe,CAAC1B,6BAAA,EAA+B2B,SAAA;MACxD;IACF,EACD;EAEL;EACAY,YAAA,EAAc;IACZH,MAAA,EAAQ1B;EACV;EACA8B,aAAA,EAAe;IACbJ,MAAA,EAAQ1B;EACV;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,kGAqB/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,kGAiB/B,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import { ListItemNode, ListNode } from '@lexical/list';
2
+ import { UNORDERED_LIST } from '@lexical/markdown';
2
3
  import { createServerFeature } from '../../../../utilities/createServerFeature.js';
3
4
  import { createNode } from '../../../typeUtilities.js';
4
- import { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js';
5
- import { UNORDERED_LIST } from '../markdownTransformer.js';
5
+ import { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js';
6
6
  import { i18n } from './i18n.js';
7
7
  export const UnorderedListFeature = createServerFeature({
8
8
  feature: {
@@ -10,14 +10,10 @@ export const UnorderedListFeature = createServerFeature({
10
10
  i18n,
11
11
  markdownTransformers: [UNORDERED_LIST],
12
12
  nodes: [createNode({
13
- converters: {
14
- html: ListHTMLConverter
15
- },
13
+ jsonSchema: listNodeJSONSchema,
16
14
  node: ListNode
17
15
  }), createNode({
18
- converters: {
19
- html: ListItemHTMLConverter
20
- },
16
+ jsonSchema: listItemNodeJSONSchema,
21
17
  node: ListItemNode
22
18
  })]
23
19
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ListItemNode","ListNode","createServerFeature","createNode","ListHTMLConverter","ListItemHTMLConverter","UNORDERED_LIST","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","converters","html","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { ListHTMLConverter, ListItemHTMLConverter } from '../../htmlConverter.js'\nimport { UNORDERED_LIST } from '../markdownTransformer.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n converters: {\n html: ListHTMLConverter as any, // ListHTMLConverter uses a different generic type than ListNode[exportJSON], thus we need to cast as any\n },\n node: ListNode,\n }),\n createNode({\n converters: {\n html: ListItemHTMLConverter as any,\n },\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AAEvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ;AACzD,SAASC,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBN,mBAAA,CAAoB;EACtDO,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACL,cAAA,CAAe;IACtCM,KAAA,EAAO,CACLT,UAAA,CAAW;MACTU,UAAA,EAAY;QACVC,IAAA,EAAMV;MACR;MACAW,IAAA,EAAMd;IACR,IACAE,UAAA,CAAW;MACTU,UAAA,EAAY;QACVC,IAAA,EAAMT;MACR;MACAU,IAAA,EAAMf;IACR;EAEJ;EACAgB,GAAA,EAAK;AACP","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["ListItemNode","ListNode","UNORDERED_LIST","createServerFeature","createNode","listItemNodeJSONSchema","listNodeJSONSchema","i18n","UnorderedListFeature","feature","ClientFeature","markdownTransformers","nodes","jsonSchema","node","key"],"sources":["../../../../../src/features/lists/unorderedList/server/index.ts"],"sourcesContent":["import { ListItemNode, ListNode } from '@lexical/list'\nimport { UNORDERED_LIST } from '@lexical/markdown'\n\nimport { createServerFeature } from '../../../../utilities/createServerFeature.js'\nimport { createNode } from '../../../typeUtilities.js'\nimport { listItemNodeJSONSchema, listNodeJSONSchema } from '../../shared/schema.js'\nimport { i18n } from './i18n.js'\n\nexport const UnorderedListFeature = createServerFeature({\n feature: {\n ClientFeature: '@payloadcms/richtext-lexical/client#UnorderedListFeatureClient',\n i18n,\n markdownTransformers: [UNORDERED_LIST],\n nodes: [\n createNode({\n jsonSchema: listNodeJSONSchema,\n node: ListNode,\n }),\n createNode({\n jsonSchema: listItemNodeJSONSchema,\n node: ListItemNode,\n }),\n ],\n },\n key: 'unorderedList',\n})\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,QAAQ,QAAQ;AACvC,SAASC,cAAc,QAAQ;AAE/B,SAASC,mBAAmB,QAAQ;AACpC,SAASC,UAAU,QAAQ;AAC3B,SAASC,sBAAsB,EAAEC,kBAAkB,QAAQ;AAC3D,SAASC,IAAI,QAAQ;AAErB,OAAO,MAAMC,oBAAA,GAAuBL,mBAAA,CAAoB;EACtDM,OAAA,EAAS;IACPC,aAAA,EAAe;IACfH,IAAA;IACAI,oBAAA,EAAsB,CAACT,cAAA,CAAe;IACtCU,KAAA,EAAO,CACLR,UAAA,CAAW;MACTS,UAAA,EAAYP,kBAAA;MACZQ,IAAA,EAAMb;IACR,IACAG,UAAA,CAAW;MACTS,UAAA,EAAYR,sBAAA;MACZS,IAAA,EAAMd;IACR;EAEJ;EACAe,GAAA,EAAK;AACP","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { ElementFormatType } from 'lexical';
2
2
  import React from 'react';
3
- import type { RelationshipData } from '../../server/nodes/RelationshipNode.js';
4
- import './index.scss';
3
+ import type { RelationshipData } from '../../server/schema.js';
4
+ import './index.css';
5
5
  type Props = {
6
6
  className: string;
7
7
  data: RelationshipData;
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAQhD,OAAO,KAAoD,MAAM,OAAO,CAAA;AAExE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAE9E,OAAO,cAAc,CAAA;AAQrB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2GjD,CAAA"}
1
+ {"version":3,"file":"RelationshipComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAQhD,OAAO,KAA+D,MAAM,OAAO,CAAA;AAEnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,aAAa,CAAA;AAQpB,KAAK,KAAK,GAAG;IACX,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqIjD,CAAA"}
@@ -5,9 +5,10 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext
5
5
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
6
6
  import { getTranslation } from '@payloadcms/translations';
7
7
  import { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui';
8
- import { $getNodeByKey } from 'lexical';
8
+ import { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical';
9
9
  import { formatAdminURL } from 'payload/shared';
10
- import React, { useCallback, useReducer, useRef, useState } from 'react';
10
+ import React, { useCallback, useEffect, useReducer, useRef, useState } from 'react';
11
+ import './index.css';
11
12
  import { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js';
12
13
  import { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js';
13
14
  const initialParams = {
@@ -28,6 +29,7 @@ export const RelationshipComponent = props => {
28
29
  const relationshipElemRef = useRef(null);
29
30
  const [editor] = useLexicalComposerContext();
30
31
  const isEditable = useLexicalEditable();
32
+ const [isSelected, setIsSelected] = useState(false);
31
33
  const {
32
34
  config: {
33
35
  routes: {
@@ -64,6 +66,29 @@ export const RelationshipComponent = props => {
64
66
  id: value,
65
67
  collectionSlug: relatedCollection.slug
66
68
  });
69
+ useEffect(() => {
70
+ return editor.registerUpdateListener(({
71
+ editorState
72
+ }) => {
73
+ editorState.read(() => {
74
+ const selection = $getSelection();
75
+ if ($isNodeSelection(selection)) {
76
+ setIsSelected(selection.has(nodeKey));
77
+ } else if ($isRangeSelection(selection)) {
78
+ const nodes = selection.getNodes();
79
+ setIsSelected(nodes.some(node => node.getKey() === nodeKey));
80
+ } else {
81
+ setIsSelected(false);
82
+ }
83
+ });
84
+ });
85
+ }, [editor, nodeKey]);
86
+ useEffect(() => {
87
+ const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`);
88
+ if (outerEl) {
89
+ outerEl.classList.toggle(`${baseClass}--selected`, isSelected);
90
+ }
91
+ }, [isSelected, baseClass]);
67
92
  const removeRelationship = useCallback(() => {
68
93
  editor.update(() => {
69
94
  $getNodeByKey(nodeKey)?.remove();
@@ -98,7 +123,7 @@ export const RelationshipComponent = props => {
98
123
  }), isEditable && /*#__PURE__*/_jsxs("div", {
99
124
  className: `${baseClass}__actions`,
100
125
  children: [/*#__PURE__*/_jsx(Button, {
101
- buttonStyle: "icon-label",
126
+ buttonStyle: "ghost",
102
127
  className: `${baseClass}__swapButton`,
103
128
  disabled: !isEditable,
104
129
  el: "button",
@@ -115,7 +140,7 @@ export const RelationshipComponent = props => {
115
140
  round: true,
116
141
  tooltip: t('fields:swapRelationship')
117
142
  }), /*#__PURE__*/_jsx(Button, {
118
- buttonStyle: "icon-label",
143
+ buttonStyle: "ghost",
119
144
  className: `${baseClass}__removeButton`,
120
145
  disabled: !isEditable,
121
146
  icon: "x",
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","formatAdminURL","React","useCallback","useReducer","useRef","useState","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","initialParams","depth","RelationshipComponent","props","className","baseClass","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isEditable","config","routes","api","serverURL","getEntityConfig","relatedCollection","collectionSlug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","apiRoute","path","slug","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","removeRelationship","update","remove","updateRelationship","_jsxs","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","buttonStyle","disabled","el","icon","onClick","dispatchCommand","replace","round","tooltip","e","preventDefault","onSave"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/nodes/RelationshipNode.js'\n\nimport './index.scss'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"icon-label\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"RelationshipComponent.js","names":["useLexicalComposerContext","useLexicalEditable","getTranslation","Button","useConfig","usePayloadAPI","useTranslation","$getNodeByKey","$getSelection","$isNodeSelection","$isRangeSelection","formatAdminURL","React","useCallback","useEffect","useReducer","useRef","useState","useLexicalDocumentDrawer","INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND","initialParams","depth","RelationshipComponent","props","className","baseClass","data","relationTo","value","nodeKey","Error","relationshipElemRef","editor","isEditable","isSelected","setIsSelected","config","routes","api","serverURL","getEntityConfig","relatedCollection","collectionSlug","i18n","t","cacheBust","dispatchCacheBust","state","setParams","apiRoute","path","slug","closeDocumentDrawer","DocumentDrawer","DocumentDrawerToggler","id","registerUpdateListener","editorState","read","selection","has","nodes","getNodes","some","node","getKey","outerEl","current","closest","classList","toggle","removeRelationship","update","remove","updateRelationship","_jsxs","contentEditable","ref","_jsx","label","labels","singular","admin","useAsTitle","buttonStyle","disabled","el","icon","onClick","dispatchCommand","replace","round","tooltip","e","preventDefault","onSave"],"sources":["../../../../../src/features/relationship/client/components/RelationshipComponent.tsx"],"sourcesContent":["'use client'\nimport type { ElementFormatType } from 'lexical'\n\nimport { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext.js'\nimport { useLexicalEditable } from '@lexical/react/useLexicalEditable'\nimport { getTranslation } from '@payloadcms/translations'\nimport { Button, useConfig, usePayloadAPI, useTranslation } from '@payloadcms/ui'\nimport { $getNodeByKey, $getSelection, $isNodeSelection, $isRangeSelection } from 'lexical'\nimport { formatAdminURL } from 'payload/shared'\nimport React, { useCallback, useEffect, useReducer, useRef, useState } from 'react'\n\nimport type { RelationshipData } from '../../server/schema.js'\n\nimport './index.css'\nimport { useLexicalDocumentDrawer } from '../../../../utilities/fieldsDrawer/useLexicalDocumentDrawer.js'\nimport { INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND } from '../drawer/commands.js'\n\nconst initialParams = {\n depth: 0,\n}\n\ntype Props = {\n className: string\n data: RelationshipData\n format?: ElementFormatType\n nodeKey?: string\n}\n\nexport const RelationshipComponent: React.FC<Props> = (props) => {\n const {\n className: baseClass,\n data: { relationTo, value },\n nodeKey,\n } = props\n\n if (typeof value === 'object') {\n throw new Error(\n 'Relationship value should be a string or number. The Lexical Relationship component should not receive the populated value object.',\n )\n }\n\n const relationshipElemRef = useRef<HTMLDivElement | null>(null)\n\n const [editor] = useLexicalComposerContext()\n const isEditable = useLexicalEditable()\n const [isSelected, setIsSelected] = useState(false)\n const {\n config: {\n routes: { api },\n serverURL,\n },\n getEntityConfig,\n } = useConfig()\n\n const [relatedCollection] = useState(() => getEntityConfig({ collectionSlug: relationTo }))\n\n const { i18n, t } = useTranslation()\n const [cacheBust, dispatchCacheBust] = useReducer((state) => state + 1, 0)\n const [{ data }, { setParams }] = usePayloadAPI(\n formatAdminURL({ apiRoute: api, path: `/${relatedCollection.slug}/${value}`, serverURL }),\n { initialParams },\n )\n\n const { closeDocumentDrawer, DocumentDrawer, DocumentDrawerToggler } = useLexicalDocumentDrawer({\n id: value,\n collectionSlug: relatedCollection.slug,\n })\n\n useEffect(() => {\n return editor.registerUpdateListener(({ editorState }) => {\n editorState.read(() => {\n const selection = $getSelection()\n\n if ($isNodeSelection(selection)) {\n setIsSelected(selection.has(nodeKey!))\n } else if ($isRangeSelection(selection)) {\n const nodes = selection.getNodes()\n setIsSelected(nodes.some((node) => node.getKey() === nodeKey))\n } else {\n setIsSelected(false)\n }\n })\n })\n }, [editor, nodeKey])\n\n useEffect(() => {\n const outerEl = relationshipElemRef.current?.closest(`.${baseClass}`)\n\n if (outerEl) {\n outerEl.classList.toggle(`${baseClass}--selected`, isSelected)\n }\n }, [isSelected, baseClass])\n\n const removeRelationship = useCallback(() => {\n editor.update(() => {\n $getNodeByKey(nodeKey!)?.remove()\n })\n }, [editor, nodeKey])\n\n const updateRelationship = React.useCallback(() => {\n setParams({\n ...initialParams,\n cacheBust, // do this to get the usePayloadAPI to re-fetch the data even though the URL string hasn't changed\n })\n\n closeDocumentDrawer()\n dispatchCacheBust()\n }, [cacheBust, setParams, closeDocumentDrawer])\n\n return (\n <div className={`${baseClass}__contents`} contentEditable={false} ref={relationshipElemRef}>\n <div className={`${baseClass}__wrap`}>\n <p className={`${baseClass}__label`}>\n {t('fields:labelRelationship', {\n label: relatedCollection.labels?.singular\n ? getTranslation(relatedCollection.labels?.singular, i18n)\n : relatedCollection.slug,\n })}\n </p>\n <DocumentDrawerToggler className={`${baseClass}__doc-drawer-toggler`}>\n <p className={`${baseClass}__title`}>\n {data ? data[relatedCollection?.admin?.useAsTitle || 'id'] : value}\n </p>\n </DocumentDrawerToggler>\n </div>\n {isEditable && (\n <div className={`${baseClass}__actions`}>\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__swapButton`}\n disabled={!isEditable}\n el=\"button\"\n icon=\"swap\"\n onClick={() => {\n if (nodeKey) {\n editor.dispatchCommand(INSERT_RELATIONSHIP_WITH_DRAWER_COMMAND, {\n replace: { nodeKey },\n })\n }\n }}\n round\n tooltip={t('fields:swapRelationship')}\n />\n <Button\n buttonStyle=\"ghost\"\n className={`${baseClass}__removeButton`}\n disabled={!isEditable}\n icon=\"x\"\n onClick={(e) => {\n e.preventDefault()\n removeRelationship()\n }}\n round\n tooltip={t('fields:removeRelationship')}\n />\n </div>\n )}\n\n {!!value && <DocumentDrawer onSave={updateRelationship} />}\n </div>\n )\n}\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,112 @@
1
+ @layer payload-default {
2
+ .LexicalEditorTheme__relationship {
3
+ --relationship-width: 15rem;
4
+ --relationship-max-width: 20rem;
5
+ display: flex;
6
+ width: var(--relationship-width);
7
+ max-width: var(--relationship-max-width);
8
+ padding: var(--spacer-2-5);
9
+ align-items: center;
10
+ gap: var(--spacer-2);
11
+ background: var(--color-bg);
12
+ border: var(--stroke-width-small) solid var(--color-border);
13
+ border-radius: var(--radius-medium);
14
+ font-family: var(--font-body);
15
+ margin-block: var(--spacer-2);
16
+ color: var(--color-text);
17
+
18
+ &:hover {
19
+ outline: var(--stroke-width-small) solid var(--color-border-selected);
20
+ outline-offset: calc(var(--stroke-width-small) * -1);
21
+ }
22
+ }
23
+
24
+ .LexicalEditorTheme__relationship--selected {
25
+ outline: var(--stroke-width-small) solid var(--color-border-selected);
26
+ outline-offset: calc(var(--stroke-width-small) * -1);
27
+ }
28
+
29
+ .LexicalEditorTheme__relationship__contents {
30
+ display: flex;
31
+ align-items: center;
32
+ gap: var(--spacer-2);
33
+ flex: 1 0 0;
34
+ justify-content: space-between;
35
+ min-width: 0;
36
+ }
37
+
38
+ .LexicalEditorTheme__relationship__wrap {
39
+ flex: 1 0 0;
40
+ min-width: 0;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .LexicalEditorTheme__relationship__label {
45
+ font-family: var(--text-body-small-font-family);
46
+ font-size: var(--text-body-small-font-size);
47
+ font-weight: var(--text-body-small-font-weight);
48
+ line-height: var(--text-body-small-line-height);
49
+ letter-spacing: var(--text-body-small-letter-spacing);
50
+ color: var(--color-text-secondary);
51
+ margin: 0;
52
+ white-space: nowrap;
53
+ text-overflow: ellipsis;
54
+ overflow: hidden;
55
+ }
56
+
57
+ .LexicalEditorTheme__relationship__title {
58
+ font-family: var(--text-body-medium-strong-font-family);
59
+ font-size: var(--text-body-medium-strong-font-size);
60
+ font-weight: var(--text-body-medium-strong-font-weight);
61
+ line-height: var(--text-body-medium-strong-line-height);
62
+ letter-spacing: var(--text-body-medium-letter-spacing);
63
+ color: var(--color-text);
64
+ margin: 0;
65
+ white-space: nowrap;
66
+ text-overflow: ellipsis;
67
+ overflow: hidden;
68
+ }
69
+
70
+ .LexicalEditorTheme__relationship__doc-drawer-toggler {
71
+ text-decoration: none;
72
+ pointer-events: all;
73
+ display: block;
74
+ overflow: hidden;
75
+
76
+ & > * {
77
+ margin: 0;
78
+ }
79
+ }
80
+
81
+ .LexicalEditorTheme__relationship__swapButton.btn,
82
+ .LexicalEditorTheme__relationship__removeButton.btn {
83
+ margin: 0;
84
+ width: var(--spacer-4);
85
+ height: var(--spacer-4);
86
+ min-width: var(--spacer-4);
87
+ min-height: var(--spacer-4);
88
+ padding: 0;
89
+ }
90
+
91
+ .LexicalEditorTheme__relationship__doc-drawer-toggler,
92
+ .LexicalEditorTheme__relationship__swapButton {
93
+ &:disabled {
94
+ color: var(--color-text-disabled);
95
+ pointer-events: none;
96
+ }
97
+ }
98
+
99
+ .LexicalEditorTheme__relationship__actions {
100
+ display: flex;
101
+ align-items: center;
102
+ flex-shrink: 0;
103
+ gap: var(--spacer-2);
104
+ }
105
+
106
+ .LexicalEditorTheme__relationship__removeButton.btn {
107
+ &:disabled {
108
+ color: var(--color-text-disabled);
109
+ pointer-events: none;
110
+ }
111
+ }
112
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,+BAAgC,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,OAAO,KAA2C,MAAM,OAAO,CAAA;AAiC/D,KAAK,KAAK,GAAG;IACX,sBAAsB,EAAE,cAAc,EAAE,CAAA;CACzC,CAAA;AA6DD,eAAO,MAAM,kBAAkB,GAAI,4BAA4B,KAAK,KAAG,KAAK,CAAC,SAM5E,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import type { JSX } from 'react';
2
2
  import { type DOMConversionMap, type EditorConfig, type LexicalEditor, type LexicalNode } from 'lexical';
3
- import type { RelationshipData, SerializedRelationshipNode } from '../../server/nodes/RelationshipNode.js';
3
+ import type { RelationshipData, SerializedRelationshipNode } from '../../server/schema.js';
4
4
  import { RelationshipServerNode } from '../../server/nodes/RelationshipNode.js';
5
5
  export declare class RelationshipNode extends RelationshipServerNode {
6
6
  static clone(node: RelationshipServerNode): RelationshipServerNode;
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EACV,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,wCAAwC,CAAA;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAsB/E,qBAAa,gBAAiB,SAAQ,sBAAsB;WAC1C,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB;WAI3D,OAAO,IAAI,MAAM;WAIjB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;WAiBpD,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB;IAc/E,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAWlE,UAAU,IAAI,0BAA0B;CAGlD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
1
+ {"version":3,"file":"RelationshipNode.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAE1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAA;AAsB/E,qBAAa,gBAAiB,SAAQ,sBAAsB;WAC1C,KAAK,CAAC,IAAI,EAAE,sBAAsB,GAAG,sBAAsB;WAI3D,OAAO,IAAI,MAAM;WAIjB,SAAS,IAAI,gBAAgB,CAAC,cAAc,CAAC,GAAG,IAAI;WAiBpD,UAAU,CAAC,cAAc,EAAE,0BAA0B,GAAG,gBAAgB;IAc/E,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO;IAWlE,UAAU,IAAI,0BAA0B;CAGlD;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAMhF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,gBAAgB,GAAG,SAAS,GACtD,IAAI,IAAI,gBAAgB,CAE1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipNode.js","names":["$applyNodeReplacement","React","RelationshipServerNode","RelationshipComponent","lazy","then","module","default","$relationshipElementToNode","domNode","id","getAttribute","relationTo","node","$createRelationshipNode","value","RelationshipNode","clone","getType","importDOM","div","hasAttribute","conversion","priority","importJSON","serializedNode","version","importedData","setFormat","format","decorate","editor","config","_jsx","className","theme","relationship","data","__data","__format","nodeKey","getKey","exportJSON","$isRelationshipNode"],"sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"sourcesContent":["'use client'\nimport type { JSX } from 'react'\n\nimport {\n $applyNodeReplacement,\n type DOMConversionMap,\n type DOMConversionOutput,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n} from 'lexical'\nimport * as React from 'react'\n\nimport type {\n RelationshipData,\n SerializedRelationshipNode,\n} from '../../server/nodes/RelationshipNode.js'\n\nimport { RelationshipServerNode } from '../../server/nodes/RelationshipNode.js'\n\nconst RelationshipComponent = React.lazy(() =>\n import('../components/RelationshipComponent.js').then((module) => ({\n default: module.RelationshipComponent,\n })),\n)\n\nfunction $relationshipElementToNode(domNode: HTMLDivElement): DOMConversionOutput | null {\n const id = domNode.getAttribute('data-lexical-relationship-id')\n const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo')\n\n if (id != null && relationTo != null) {\n const node = $createRelationshipNode({\n relationTo,\n value: id,\n })\n return { node }\n }\n return null\n}\n\nexport class RelationshipNode extends RelationshipServerNode {\n static override clone(node: RelationshipServerNode): RelationshipServerNode {\n return super.clone(node)\n }\n\n static override getType(): string {\n return super.getType()\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {\n div: (domNode: HTMLDivElement) => {\n if (\n !domNode.hasAttribute('data-lexical-relationship-relationTo') ||\n !domNode.hasAttribute('data-lexical-relationship-id')\n ) {\n return null\n }\n return {\n conversion: $relationshipElementToNode,\n priority: 2,\n }\n },\n }\n }\n\n static override importJSON(serializedNode: SerializedRelationshipNode): RelationshipNode {\n if (serializedNode.version === 1 && (serializedNode?.value as unknown as { id: string })?.id) {\n serializedNode.value = (serializedNode.value as unknown as { id: string }).id\n }\n\n const importedData: RelationshipData = {\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n const node = $createRelationshipNode(importedData)\n node.setFormat(serializedNode.format)\n return node\n }\n\n override decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return (\n <RelationshipComponent\n className={config.theme.relationship ?? 'LexicalEditorTheme__relationship'}\n data={this.__data}\n format={this.__format}\n nodeKey={this.getKey()}\n />\n )\n }\n\n override exportJSON(): SerializedRelationshipNode {\n return super.exportJSON()\n }\n}\n\nexport function $createRelationshipNode(data: RelationshipData): RelationshipNode {\n return $applyNodeReplacement(\n new RelationshipNode({\n data,\n }),\n )\n}\n\nexport function $isRelationshipNode(\n node: LexicalNode | null | RelationshipNode | undefined,\n): node is RelationshipNode {\n return node instanceof RelationshipNode\n}\n"],"mappings":"AAAA;;;AAGA,SACEA,qBAAqB,QAMhB;AACP,YAAYC,KAAA,MAAW;AAOvB,SAASC,sBAAsB,QAAQ;AAEvC,MAAMC,qBAAA,gBAAwBF,KAAA,CAAMG,IAAI,CAAC,MACvC,MAAM,CAAC,0CAA0CC,IAAI,CAAEC,MAAA,KAAY;EACjEC,OAAA,EAASD,MAAA,CAAOH;AAClB;AAGF,SAASK,2BAA2BC,OAAuB;EACzD,MAAMC,EAAA,GAAKD,OAAA,CAAQE,YAAY,CAAC;EAChC,MAAMC,UAAA,GAAaH,OAAA,CAAQE,YAAY,CAAC;EAExC,IAAID,EAAA,IAAM,QAAQE,UAAA,IAAc,MAAM;IACpC,MAAMC,IAAA,GAAOC,uBAAA,CAAwB;MACnCF,UAAA;MACAG,KAAA,EAAOL;IACT;IACA,OAAO;MAAEG;IAAK;EAChB;EACA,OAAO;AACT;AAEA,OAAO,MAAMG,gBAAA,SAAyBd,sBAAA;EACpC,OAAgBe,MAAMJ,IAA4B,EAA0B;IAC1E,OAAO,KAAK,CAACI,KAAA,CAAMJ,IAAA;EACrB;EAEA,OAAgBK,QAAA,EAAkB;IAChC,OAAO,KAAK,CAACA,OAAA;EACf;EAEA,OAAgBC,UAAA,EAAqD;IACnE,OAAO;MACLC,GAAA,EAAMX,OAAA;QACJ,IACE,CAACA,OAAA,CAAQY,YAAY,CAAC,2CACtB,CAACZ,OAAA,CAAQY,YAAY,CAAC,iCACtB;UACA,OAAO;QACT;QACA,OAAO;UACLC,UAAA,EAAYd,0BAAA;UACZe,QAAA,EAAU;QACZ;MACF;IACF;EACF;EAEA,OAAgBC,WAAWC,cAA0C,EAAoB;IACvF,IAAIA,cAAA,CAAeC,OAAO,KAAK,KAAMD,cAAA,EAAgBV,KAAA,EAAqCL,EAAA,EAAI;MAC5Fe,cAAA,CAAeV,KAAK,GAAGU,cAAC,CAAeV,KAAK,CAA+BL,EAAE;IAC/E;IAEA,MAAMiB,YAAA,GAAiC;MACrCf,UAAA,EAAYa,cAAA,CAAeb,UAAU;MACrCG,KAAA,EAAOU,cAAA,CAAeV;IACxB;IACA,MAAMF,IAAA,GAAOC,uBAAA,CAAwBa,YAAA;IACrCd,IAAA,CAAKe,SAAS,CAACH,cAAA,CAAeI,MAAM;IACpC,OAAOhB,IAAA;EACT;EAESiB,SAASC,MAAqB,EAAEC,MAAoB,EAAe;IAC1E,oBACEC,IAAA,CAAC9B,qBAAA;MACC+B,SAAA,EAAWF,MAAA,CAAOG,KAAK,CAACC,YAAY,IAAI;MACxCC,IAAA,EAAM,IAAI,CAACC,MAAM;MACjBT,MAAA,EAAQ,IAAI,CAACU,QAAQ;MACrBC,OAAA,EAAS,IAAI,CAACC,MAAM;;EAG1B;EAESC,WAAA,EAAyC;IAChD,OAAO,KAAK,CAACA,UAAA;EACf;AACF;AAEA,OAAO,SAAS5B,wBAAwBuB,IAAsB;EAC5D,OAAOrC,qBAAA,CACL,IAAIgB,gBAAA,CAAiB;IACnBqB;EACF;AAEJ;AAEA,OAAO,SAASM,oBACd9B,IAAuD;EAEvD,OAAOA,IAAA,YAAgBG,gBAAA;AACzB","ignoreList":[]}
1
+ {"version":3,"file":"RelationshipNode.js","names":["$applyNodeReplacement","React","RelationshipServerNode","RelationshipComponent","lazy","then","module","default","$relationshipElementToNode","domNode","id","getAttribute","relationTo","node","$createRelationshipNode","value","RelationshipNode","clone","getType","importDOM","div","hasAttribute","conversion","priority","importJSON","serializedNode","version","importedData","setFormat","format","decorate","editor","config","_jsx","className","theme","relationship","data","__data","__format","nodeKey","getKey","exportJSON","$isRelationshipNode"],"sources":["../../../../../src/features/relationship/client/nodes/RelationshipNode.tsx"],"sourcesContent":["'use client'\nimport type { JSX } from 'react'\n\nimport {\n $applyNodeReplacement,\n type DOMConversionMap,\n type DOMConversionOutput,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n} from 'lexical'\nimport * as React from 'react'\n\nimport type { RelationshipData, SerializedRelationshipNode } from '../../server/schema.js'\n\nimport { RelationshipServerNode } from '../../server/nodes/RelationshipNode.js'\n\nconst RelationshipComponent = React.lazy(() =>\n import('../components/RelationshipComponent.js').then((module) => ({\n default: module.RelationshipComponent,\n })),\n)\n\nfunction $relationshipElementToNode(domNode: HTMLDivElement): DOMConversionOutput | null {\n const id = domNode.getAttribute('data-lexical-relationship-id')\n const relationTo = domNode.getAttribute('data-lexical-relationship-relationTo')\n\n if (id != null && relationTo != null) {\n const node = $createRelationshipNode({\n relationTo,\n value: id,\n })\n return { node }\n }\n return null\n}\n\nexport class RelationshipNode extends RelationshipServerNode {\n static override clone(node: RelationshipServerNode): RelationshipServerNode {\n return super.clone(node)\n }\n\n static override getType(): string {\n return super.getType()\n }\n\n static override importDOM(): DOMConversionMap<HTMLDivElement> | null {\n return {\n div: (domNode: HTMLDivElement) => {\n if (\n !domNode.hasAttribute('data-lexical-relationship-relationTo') ||\n !domNode.hasAttribute('data-lexical-relationship-id')\n ) {\n return null\n }\n return {\n conversion: $relationshipElementToNode,\n priority: 2,\n }\n },\n }\n }\n\n static override importJSON(serializedNode: SerializedRelationshipNode): RelationshipNode {\n if (serializedNode.version === 1 && (serializedNode?.value as unknown as { id: string })?.id) {\n serializedNode.value = (serializedNode.value as unknown as { id: string }).id\n }\n\n const importedData: RelationshipData = {\n relationTo: serializedNode.relationTo,\n value: serializedNode.value,\n }\n const node = $createRelationshipNode(importedData)\n node.setFormat(serializedNode.format)\n return node\n }\n\n override decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {\n return (\n <RelationshipComponent\n className={config.theme.relationship ?? 'LexicalEditorTheme__relationship'}\n data={this.__data}\n format={this.__format}\n nodeKey={this.getKey()}\n />\n )\n }\n\n override exportJSON(): SerializedRelationshipNode {\n return super.exportJSON()\n }\n}\n\nexport function $createRelationshipNode(data: RelationshipData): RelationshipNode {\n return $applyNodeReplacement(\n new RelationshipNode({\n data,\n }),\n )\n}\n\nexport function $isRelationshipNode(\n node: LexicalNode | null | RelationshipNode | undefined,\n): node is RelationshipNode {\n return node instanceof RelationshipNode\n}\n"],"mappings":"AAAA;;;AAGA,SACEA,qBAAqB,QAMhB;AACP,YAAYC,KAAA,MAAW;AAIvB,SAASC,sBAAsB,QAAQ;AAEvC,MAAMC,qBAAA,gBAAwBF,KAAA,CAAMG,IAAI,CAAC,MACvC,MAAM,CAAC,0CAA0CC,IAAI,CAAEC,MAAA,KAAY;EACjEC,OAAA,EAASD,MAAA,CAAOH;AAClB;AAGF,SAASK,2BAA2BC,OAAuB;EACzD,MAAMC,EAAA,GAAKD,OAAA,CAAQE,YAAY,CAAC;EAChC,MAAMC,UAAA,GAAaH,OAAA,CAAQE,YAAY,CAAC;EAExC,IAAID,EAAA,IAAM,QAAQE,UAAA,IAAc,MAAM;IACpC,MAAMC,IAAA,GAAOC,uBAAA,CAAwB;MACnCF,UAAA;MACAG,KAAA,EAAOL;IACT;IACA,OAAO;MAAEG;IAAK;EAChB;EACA,OAAO;AACT;AAEA,OAAO,MAAMG,gBAAA,SAAyBd,sBAAA;EACpC,OAAgBe,MAAMJ,IAA4B,EAA0B;IAC1E,OAAO,KAAK,CAACI,KAAA,CAAMJ,IAAA;EACrB;EAEA,OAAgBK,QAAA,EAAkB;IAChC,OAAO,KAAK,CAACA,OAAA;EACf;EAEA,OAAgBC,UAAA,EAAqD;IACnE,OAAO;MACLC,GAAA,EAAMX,OAAA;QACJ,IACE,CAACA,OAAA,CAAQY,YAAY,CAAC,2CACtB,CAACZ,OAAA,CAAQY,YAAY,CAAC,iCACtB;UACA,OAAO;QACT;QACA,OAAO;UACLC,UAAA,EAAYd,0BAAA;UACZe,QAAA,EAAU;QACZ;MACF;IACF;EACF;EAEA,OAAgBC,WAAWC,cAA0C,EAAoB;IACvF,IAAIA,cAAA,CAAeC,OAAO,KAAK,KAAMD,cAAA,EAAgBV,KAAA,EAAqCL,EAAA,EAAI;MAC5Fe,cAAA,CAAeV,KAAK,GAAGU,cAAC,CAAeV,KAAK,CAA+BL,EAAE;IAC/E;IAEA,MAAMiB,YAAA,GAAiC;MACrCf,UAAA,EAAYa,cAAA,CAAeb,UAAU;MACrCG,KAAA,EAAOU,cAAA,CAAeV;IACxB;IACA,MAAMF,IAAA,GAAOC,uBAAA,CAAwBa,YAAA;IACrCd,IAAA,CAAKe,SAAS,CAACH,cAAA,CAAeI,MAAM;IACpC,OAAOhB,IAAA;EACT;EAESiB,SAASC,MAAqB,EAAEC,MAAoB,EAAe;IAC1E,oBACEC,IAAA,CAAC9B,qBAAA;MACC+B,SAAA,EAAWF,MAAA,CAAOG,KAAK,CAACC,YAAY,IAAI;MACxCC,IAAA,EAAM,IAAI,CAACC,MAAM;MACjBT,MAAA,EAAQ,IAAI,CAACU,QAAQ;MACrBC,OAAA,EAAS,IAAI,CAACC,MAAM;;EAG1B;EAESC,WAAA,EAAyC;IAChD,OAAO,KAAK,CAACA,UAAA;EACf;AACF;AAEA,OAAO,SAAS5B,wBAAwBuB,IAAsB;EAC5D,OAAOrC,qBAAA,CACL,IAAIgB,gBAAA,CAAiB;IACnBqB;EACF;AAEJ;AAEA,OAAO,SAASM,oBACd9B,IAAuD;EAEvD,OAAOA,IAAA,YAAgBG,gBAAA;AACzB","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import type { LexicalCommand } from 'lexical';
2
2
  import type { PluginComponent } from '../../../typesClient.js';
3
3
  import type { RelationshipFeatureProps } from '../../server/index.js';
4
- import type { RelationshipData } from '../../server/nodes/RelationshipNode.js';
4
+ import type { RelationshipData } from '../../server/schema.js';
5
5
  export declare const INSERT_RELATIONSHIP_COMMAND: LexicalCommand<RelationshipData>;
6
6
  export declare const RelationshipPlugin: PluginComponent<RelationshipFeatureProps>;
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAc7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAA;AAM9E,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,gBAAgB,CAExE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/relationship/client/plugins/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAc7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAM9D,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,gBAAgB,CAExE,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,wBAAwB,CAuCxE,CAAA"}