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

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 (532) hide show
  1. package/dist/cell/rscEntry.d.ts +1 -1
  2. package/dist/cell/rscEntry.d.ts.map +1 -1
  3. package/dist/cell/rscEntry.js.map +1 -1
  4. package/dist/exports/client/{Field-PJW7KUJG.js → Field-G5Z2HM5Y.js} +2 -2
  5. package/dist/exports/client/Field-G5Z2HM5Y.js.map +7 -0
  6. package/dist/exports/client/{RelationshipComponent-5RONAYJM.js → RelationshipComponent-YCPAKOL7.js} +2 -2
  7. package/dist/exports/client/RelationshipComponent-YCPAKOL7.js.map +7 -0
  8. package/dist/exports/client/bundled.css +1 -1
  9. package/dist/exports/client/{chunk-QJ5EETIB.js → chunk-6QWQ7JV4.js} +2 -2
  10. package/dist/exports/client/{chunk-FTT5KJ6W.js → chunk-LH634DPU.js} +1 -1
  11. package/dist/exports/client/chunk-LH634DPU.js.map +7 -0
  12. package/dist/exports/client/{chunk-BZZVLW4U.js → chunk-RJ5MAOKZ.js} +1 -1
  13. package/dist/exports/client/chunk-RJ5MAOKZ.js.map +7 -0
  14. package/dist/exports/client/{chunk-44G3K3W7.js → chunk-UAKNDD6R.js} +2 -2
  15. package/dist/exports/client/chunk-UAKNDD6R.js.map +7 -0
  16. package/dist/exports/client/component-HKTAZ77E.js +2 -0
  17. package/dist/exports/client/component-HKTAZ77E.js.map +7 -0
  18. package/dist/exports/client/componentInline-D3A6OW76.js +2 -0
  19. package/dist/exports/client/index.js +16 -16
  20. package/dist/exports/client/index.js.map +4 -4
  21. package/dist/exports/react/index.d.ts +1 -1
  22. package/dist/exports/react/index.d.ts.map +1 -1
  23. package/dist/exports/react/index.js.map +1 -1
  24. package/dist/features/align/client/toolbarAlignGroup.d.ts.map +1 -1
  25. package/dist/features/blockquote/server/index.d.ts +1 -4
  26. package/dist/features/blockquote/server/index.d.ts.map +1 -1
  27. package/dist/features/blockquote/server/index.js +2 -0
  28. package/dist/features/blockquote/server/index.js.map +1 -1
  29. package/dist/features/blockquote/server/schema.d.ts +8 -0
  30. package/dist/features/blockquote/server/schema.d.ts.map +1 -0
  31. package/dist/features/blockquote/server/schema.js +15 -0
  32. package/dist/features/blockquote/server/schema.js.map +1 -0
  33. package/dist/features/blocks/client/component/index.d.ts +2 -2
  34. package/dist/features/blocks/client/component/index.d.ts.map +1 -1
  35. package/dist/features/blocks/client/component/index.js +2 -2
  36. package/dist/features/blocks/client/component/index.js.map +1 -1
  37. package/dist/features/blocks/client/componentInline/components/InlineBlockContainer.d.ts.map +1 -1
  38. package/dist/features/blocks/client/componentInline/index.d.ts +2 -2
  39. package/dist/features/blocks/client/componentInline/index.d.ts.map +1 -1
  40. package/dist/features/blocks/client/componentInline/index.js +2 -2
  41. package/dist/features/blocks/client/componentInline/index.js.map +1 -1
  42. package/dist/features/blocks/client/markdown/markdownTransformer.d.ts.map +1 -1
  43. package/dist/features/blocks/client/markdown/markdownTransformer.js +4 -4
  44. package/dist/features/blocks/client/markdown/markdownTransformer.js.map +1 -1
  45. package/dist/features/blocks/client/nodes/BlocksNode.d.ts +2 -2
  46. package/dist/features/blocks/client/nodes/BlocksNode.d.ts.map +1 -1
  47. package/dist/features/blocks/client/nodes/BlocksNode.js.map +1 -1
  48. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts +2 -2
  49. package/dist/features/blocks/client/nodes/InlineBlocksNode.d.ts.map +1 -1
  50. package/dist/features/blocks/client/nodes/InlineBlocksNode.js.map +1 -1
  51. package/dist/features/blocks/client/plugin/index.d.ts +1 -1
  52. package/dist/features/blocks/client/plugin/index.d.ts.map +1 -1
  53. package/dist/features/blocks/client/plugin/index.js.map +1 -1
  54. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts +1 -2
  55. package/dist/features/blocks/server/graphQLPopulationPromise.d.ts.map +1 -1
  56. package/dist/features/blocks/server/graphQLPopulationPromise.js.map +1 -1
  57. package/dist/features/blocks/server/index.d.ts +1 -0
  58. package/dist/features/blocks/server/index.d.ts.map +1 -1
  59. package/dist/features/blocks/server/index.js +20 -66
  60. package/dist/features/blocks/server/index.js.map +1 -1
  61. package/dist/features/blocks/server/markdown/markdownTransformer.d.ts.map +1 -1
  62. package/dist/features/blocks/server/markdown/markdownTransformer.js +4 -4
  63. package/dist/features/blocks/server/markdown/markdownTransformer.js.map +1 -1
  64. package/dist/features/blocks/server/nodes/BlocksNode.d.ts +1 -18
  65. package/dist/features/blocks/server/nodes/BlocksNode.d.ts.map +1 -1
  66. package/dist/features/blocks/server/nodes/BlocksNode.js.map +1 -1
  67. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts +2 -10
  68. package/dist/features/blocks/server/nodes/InlineBlocksNode.d.ts.map +1 -1
  69. package/dist/features/blocks/server/nodes/InlineBlocksNode.js.map +1 -1
  70. package/dist/features/blocks/server/schema.d.ts +45 -0
  71. package/dist/features/blocks/server/schema.d.ts.map +1 -0
  72. package/dist/features/blocks/server/schema.js +136 -0
  73. package/dist/features/blocks/server/schema.js.map +1 -0
  74. package/dist/features/blocks/server/validate.d.ts +1 -2
  75. package/dist/features/blocks/server/validate.d.ts.map +1 -1
  76. package/dist/features/blocks/server/validate.js.map +1 -1
  77. package/dist/features/converters/htmlToLexical/index.d.ts +1 -1
  78. package/dist/features/converters/htmlToLexical/index.d.ts.map +1 -1
  79. package/dist/features/converters/htmlToLexical/index.js.map +1 -1
  80. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts +1 -1
  81. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.d.ts.map +1 -1
  82. package/dist/features/converters/lexicalToHtml/async/converters/blockquote.js.map +1 -1
  83. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts +1 -1
  84. package/dist/features/converters/lexicalToHtml/async/converters/heading.d.ts.map +1 -1
  85. package/dist/features/converters/lexicalToHtml/async/converters/heading.js.map +1 -1
  86. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts +1 -1
  87. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.d.ts.map +1 -1
  88. package/dist/features/converters/lexicalToHtml/async/converters/horizontalRule.js.map +1 -1
  89. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts +1 -1
  90. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.d.ts.map +1 -1
  91. package/dist/features/converters/lexicalToHtml/async/converters/linebreak.js.map +1 -1
  92. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts +1 -1
  93. package/dist/features/converters/lexicalToHtml/async/converters/link.d.ts.map +1 -1
  94. package/dist/features/converters/lexicalToHtml/async/converters/link.js.map +1 -1
  95. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts +1 -1
  96. package/dist/features/converters/lexicalToHtml/async/converters/list.d.ts.map +1 -1
  97. package/dist/features/converters/lexicalToHtml/async/converters/list.js.map +1 -1
  98. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts +1 -1
  99. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.d.ts.map +1 -1
  100. package/dist/features/converters/lexicalToHtml/async/converters/paragraph.js.map +1 -1
  101. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts +1 -1
  102. package/dist/features/converters/lexicalToHtml/async/converters/tab.d.ts.map +1 -1
  103. package/dist/features/converters/lexicalToHtml/async/converters/tab.js.map +1 -1
  104. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts +1 -1
  105. package/dist/features/converters/lexicalToHtml/async/converters/table.d.ts.map +1 -1
  106. package/dist/features/converters/lexicalToHtml/async/converters/table.js +1 -1
  107. package/dist/features/converters/lexicalToHtml/async/converters/table.js.map +1 -1
  108. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts +1 -1
  109. package/dist/features/converters/lexicalToHtml/async/converters/text.d.ts.map +1 -1
  110. package/dist/features/converters/lexicalToHtml/async/converters/text.js.map +1 -1
  111. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts +1 -1
  112. package/dist/features/converters/lexicalToHtml/async/converters/upload.d.ts.map +1 -1
  113. package/dist/features/converters/lexicalToHtml/async/converters/upload.js.map +1 -1
  114. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts +1 -1
  115. package/dist/features/converters/lexicalToHtml/async/defaultConverters.d.ts.map +1 -1
  116. package/dist/features/converters/lexicalToHtml/async/defaultConverters.js.map +1 -1
  117. package/dist/features/converters/lexicalToHtml/async/types.d.ts +2 -1
  118. package/dist/features/converters/lexicalToHtml/async/types.d.ts.map +1 -1
  119. package/dist/features/converters/lexicalToHtml/async/types.js.map +1 -1
  120. package/dist/features/converters/lexicalToHtml/shared/cssColors.d.ts.map +1 -1
  121. package/dist/features/converters/lexicalToHtml/shared/findConverterForNode.js.map +1 -1
  122. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts +1 -1
  123. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.d.ts.map +1 -1
  124. package/dist/features/converters/lexicalToHtml/sync/converters/blockquote.js.map +1 -1
  125. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts +1 -1
  126. package/dist/features/converters/lexicalToHtml/sync/converters/heading.d.ts.map +1 -1
  127. package/dist/features/converters/lexicalToHtml/sync/converters/heading.js.map +1 -1
  128. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts +1 -1
  129. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.d.ts.map +1 -1
  130. package/dist/features/converters/lexicalToHtml/sync/converters/horizontalRule.js.map +1 -1
  131. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts +1 -1
  132. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.d.ts.map +1 -1
  133. package/dist/features/converters/lexicalToHtml/sync/converters/linebreak.js.map +1 -1
  134. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts +1 -1
  135. package/dist/features/converters/lexicalToHtml/sync/converters/link.d.ts.map +1 -1
  136. package/dist/features/converters/lexicalToHtml/sync/converters/link.js.map +1 -1
  137. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts +1 -1
  138. package/dist/features/converters/lexicalToHtml/sync/converters/list.d.ts.map +1 -1
  139. package/dist/features/converters/lexicalToHtml/sync/converters/list.js.map +1 -1
  140. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts +1 -1
  141. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.d.ts.map +1 -1
  142. package/dist/features/converters/lexicalToHtml/sync/converters/paragraph.js.map +1 -1
  143. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts +1 -1
  144. package/dist/features/converters/lexicalToHtml/sync/converters/tab.d.ts.map +1 -1
  145. package/dist/features/converters/lexicalToHtml/sync/converters/tab.js.map +1 -1
  146. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts +1 -1
  147. package/dist/features/converters/lexicalToHtml/sync/converters/table.d.ts.map +1 -1
  148. package/dist/features/converters/lexicalToHtml/sync/converters/table.js +1 -1
  149. package/dist/features/converters/lexicalToHtml/sync/converters/table.js.map +1 -1
  150. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts +1 -1
  151. package/dist/features/converters/lexicalToHtml/sync/converters/text.d.ts.map +1 -1
  152. package/dist/features/converters/lexicalToHtml/sync/converters/text.js.map +1 -1
  153. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts +1 -1
  154. package/dist/features/converters/lexicalToHtml/sync/converters/upload.d.ts.map +1 -1
  155. package/dist/features/converters/lexicalToHtml/sync/converters/upload.js.map +1 -1
  156. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts +1 -1
  157. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.d.ts.map +1 -1
  158. package/dist/features/converters/lexicalToHtml/sync/defaultConverters.js.map +1 -1
  159. package/dist/features/converters/lexicalToHtml/sync/types.d.ts +2 -1
  160. package/dist/features/converters/lexicalToHtml/sync/types.d.ts.map +1 -1
  161. package/dist/features/converters/lexicalToHtml/sync/types.js.map +1 -1
  162. package/dist/features/converters/lexicalToJSX/Component/index.d.ts +4 -2
  163. package/dist/features/converters/lexicalToJSX/Component/index.d.ts.map +1 -1
  164. package/dist/features/converters/lexicalToJSX/Component/index.js.map +1 -1
  165. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts +1 -1
  166. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.d.ts.map +1 -1
  167. package/dist/features/converters/lexicalToJSX/converter/converters/blockquote.js.map +1 -1
  168. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts +1 -1
  169. package/dist/features/converters/lexicalToJSX/converter/converters/heading.d.ts.map +1 -1
  170. package/dist/features/converters/lexicalToJSX/converter/converters/heading.js.map +1 -1
  171. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts +1 -1
  172. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.d.ts.map +1 -1
  173. package/dist/features/converters/lexicalToJSX/converter/converters/horizontalRule.js.map +1 -1
  174. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts +1 -1
  175. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.d.ts.map +1 -1
  176. package/dist/features/converters/lexicalToJSX/converter/converters/linebreak.js.map +1 -1
  177. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts +1 -1
  178. package/dist/features/converters/lexicalToJSX/converter/converters/link.d.ts.map +1 -1
  179. package/dist/features/converters/lexicalToJSX/converter/converters/link.js.map +1 -1
  180. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts +1 -1
  181. package/dist/features/converters/lexicalToJSX/converter/converters/list.d.ts.map +1 -1
  182. package/dist/features/converters/lexicalToJSX/converter/converters/list.js.map +1 -1
  183. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts +1 -1
  184. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.d.ts.map +1 -1
  185. package/dist/features/converters/lexicalToJSX/converter/converters/paragraph.js.map +1 -1
  186. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts +1 -1
  187. package/dist/features/converters/lexicalToJSX/converter/converters/tab.d.ts.map +1 -1
  188. package/dist/features/converters/lexicalToJSX/converter/converters/tab.js.map +1 -1
  189. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts +1 -1
  190. package/dist/features/converters/lexicalToJSX/converter/converters/table.d.ts.map +1 -1
  191. package/dist/features/converters/lexicalToJSX/converter/converters/table.js.map +1 -1
  192. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts +1 -1
  193. package/dist/features/converters/lexicalToJSX/converter/converters/text.d.ts.map +1 -1
  194. package/dist/features/converters/lexicalToJSX/converter/converters/text.js.map +1 -1
  195. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts +1 -1
  196. package/dist/features/converters/lexicalToJSX/converter/converters/upload.d.ts.map +1 -1
  197. package/dist/features/converters/lexicalToJSX/converter/converters/upload.js.map +1 -1
  198. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts +1 -1
  199. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.d.ts.map +1 -1
  200. package/dist/features/converters/lexicalToJSX/converter/defaultConverters.js.map +1 -1
  201. package/dist/features/converters/lexicalToJSX/converter/index.d.ts +1 -1
  202. package/dist/features/converters/lexicalToJSX/converter/index.d.ts.map +1 -1
  203. package/dist/features/converters/lexicalToJSX/converter/index.js.map +1 -1
  204. package/dist/features/converters/lexicalToJSX/converter/types.d.ts +1 -1
  205. package/dist/features/converters/lexicalToJSX/converter/types.d.ts.map +1 -1
  206. package/dist/features/converters/lexicalToJSX/converter/types.js.map +1 -1
  207. package/dist/features/converters/lexicalToMarkdown/index.d.ts.map +1 -1
  208. package/dist/features/converters/lexicalToPlaintext/convertLexicalToPlaintext.spec.js.map +1 -1
  209. package/dist/features/converters/lexicalToPlaintext/shared/findConverterForNode.js.map +1 -1
  210. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts +1 -1
  211. package/dist/features/converters/lexicalToPlaintext/sync/types.d.ts.map +1 -1
  212. package/dist/features/converters/lexicalToPlaintext/sync/types.js.map +1 -1
  213. package/dist/features/converters/markdownToLexical/index.d.ts +1 -1
  214. package/dist/features/converters/markdownToLexical/index.d.ts.map +1 -1
  215. package/dist/features/converters/markdownToLexical/index.js.map +1 -1
  216. package/dist/features/experimental_table/client/plugins/TableActionMenuPlugin/index.css +4 -4
  217. package/dist/features/experimental_table/client/plugins/TablePlugin/TableGridPopup/index.css +1 -1
  218. package/dist/features/experimental_table/server/index.d.ts +1 -6
  219. package/dist/features/experimental_table/server/index.d.ts.map +1 -1
  220. package/dist/features/experimental_table/server/index.js +4 -0
  221. package/dist/features/experimental_table/server/index.js.map +1 -1
  222. package/dist/features/experimental_table/server/schema.d.ts +27 -0
  223. package/dist/features/experimental_table/server/schema.d.ts.map +1 -0
  224. package/dist/features/experimental_table/server/schema.js +104 -0
  225. package/dist/features/experimental_table/server/schema.js.map +1 -0
  226. package/dist/features/format/shared/toolbarFormatGroup.d.ts.map +1 -1
  227. package/dist/features/heading/server/index.d.ts +2 -4
  228. package/dist/features/heading/server/index.d.ts.map +1 -1
  229. package/dist/features/heading/server/index.js +2 -0
  230. package/dist/features/heading/server/index.js.map +1 -1
  231. package/dist/features/heading/server/schema.d.ts +10 -0
  232. package/dist/features/heading/server/schema.d.ts.map +1 -0
  233. package/dist/features/heading/server/schema.js +37 -0
  234. package/dist/features/heading/server/schema.js.map +1 -0
  235. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts +1 -1
  236. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.d.ts.map +1 -1
  237. package/dist/features/horizontalRule/client/nodes/HorizontalRuleNode.js.map +1 -1
  238. package/dist/features/horizontalRule/server/index.d.ts +1 -0
  239. package/dist/features/horizontalRule/server/index.d.ts.map +1 -1
  240. package/dist/features/horizontalRule/server/index.js +2 -0
  241. package/dist/features/horizontalRule/server/index.js.map +1 -1
  242. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts +1 -5
  243. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.d.ts.map +1 -1
  244. package/dist/features/horizontalRule/server/nodes/HorizontalRuleNode.js.map +1 -1
  245. package/dist/features/horizontalRule/server/schema.d.ts +7 -0
  246. package/dist/features/horizontalRule/server/schema.d.ts.map +1 -0
  247. package/dist/features/horizontalRule/server/schema.js +25 -0
  248. package/dist/features/horizontalRule/server/schema.js.map +1 -0
  249. package/dist/features/indent/client/toolbarIndentGroup.d.ts.map +1 -1
  250. package/dist/features/link/client/index.d.ts.map +1 -1
  251. package/dist/features/link/client/index.js.map +1 -1
  252. package/dist/features/link/client/plugins/autoLink/index.d.ts +1 -1
  253. package/dist/features/link/client/plugins/autoLink/index.d.ts.map +1 -1
  254. package/dist/features/link/client/plugins/autoLink/index.js.map +1 -1
  255. package/dist/features/link/client/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  256. package/dist/features/link/client/plugins/floatingLinkEditor/index.css +2 -2
  257. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts +1 -1
  258. package/dist/features/link/client/plugins/floatingLinkEditor/types.d.ts.map +1 -1
  259. package/dist/features/link/client/plugins/floatingLinkEditor/types.js.map +1 -1
  260. package/dist/features/link/client/plugins/link/index.js.map +1 -1
  261. package/dist/features/link/markdownTransformer.d.ts +1 -1
  262. package/dist/features/link/markdownTransformer.d.ts.map +1 -1
  263. package/dist/features/link/markdownTransformer.js.map +1 -1
  264. package/dist/features/link/markdownTransformer.spec.js.map +1 -1
  265. package/dist/features/link/nodes/AutoLinkNode.d.ts +3 -3
  266. package/dist/features/link/nodes/AutoLinkNode.d.ts.map +1 -1
  267. package/dist/features/link/nodes/AutoLinkNode.js +2 -1
  268. package/dist/features/link/nodes/AutoLinkNode.js.map +1 -1
  269. package/dist/features/link/nodes/LinkNode.d.ts +3 -3
  270. package/dist/features/link/nodes/LinkNode.d.ts.map +1 -1
  271. package/dist/features/link/nodes/LinkNode.js +2 -1
  272. package/dist/features/link/nodes/LinkNode.js.map +1 -1
  273. package/dist/features/link/server/baseFields.d.ts.map +1 -1
  274. package/dist/features/link/server/baseFields.js.map +1 -1
  275. package/dist/features/link/server/graphQLPopulationPromise.d.ts +1 -1
  276. package/dist/features/link/server/graphQLPopulationPromise.d.ts.map +1 -1
  277. package/dist/features/link/server/graphQLPopulationPromise.js.map +1 -1
  278. package/dist/features/link/server/index.d.ts +2 -1
  279. package/dist/features/link/server/index.d.ts.map +1 -1
  280. package/dist/features/link/server/index.js +3 -0
  281. package/dist/features/link/server/index.js.map +1 -1
  282. package/dist/features/link/server/schema.d.ts +32 -0
  283. package/dist/features/link/server/schema.d.ts.map +1 -0
  284. package/dist/features/link/server/schema.js +166 -0
  285. package/dist/features/link/server/schema.js.map +1 -0
  286. package/dist/features/link/server/validate.d.ts +1 -1
  287. package/dist/features/link/server/validate.d.ts.map +1 -1
  288. package/dist/features/link/server/validate.js.map +1 -1
  289. package/dist/features/lists/checklist/server/index.d.ts.map +1 -1
  290. package/dist/features/lists/checklist/server/index.js +3 -0
  291. package/dist/features/lists/checklist/server/index.js.map +1 -1
  292. package/dist/features/lists/orderedList/server/index.d.ts.map +1 -1
  293. package/dist/features/lists/orderedList/server/index.js +3 -0
  294. package/dist/features/lists/orderedList/server/index.js.map +1 -1
  295. package/dist/features/lists/plugin/index.d.ts +0 -9
  296. package/dist/features/lists/plugin/index.d.ts.map +1 -1
  297. package/dist/features/lists/plugin/index.js.map +1 -1
  298. package/dist/features/lists/shared/markdown.d.ts.map +1 -1
  299. package/dist/features/lists/shared/schema.d.ts +18 -0
  300. package/dist/features/lists/shared/schema.d.ts.map +1 -0
  301. package/dist/features/lists/shared/schema.js +62 -0
  302. package/dist/features/lists/shared/schema.js.map +1 -0
  303. package/dist/features/lists/unorderedList/server/index.d.ts.map +1 -1
  304. package/dist/features/lists/unorderedList/server/index.js +3 -0
  305. package/dist/features/lists/unorderedList/server/index.js.map +1 -1
  306. package/dist/features/relationship/client/components/RelationshipComponent.d.ts +1 -1
  307. package/dist/features/relationship/client/components/RelationshipComponent.d.ts.map +1 -1
  308. package/dist/features/relationship/client/components/RelationshipComponent.js +2 -2
  309. package/dist/features/relationship/client/components/RelationshipComponent.js.map +1 -1
  310. package/dist/features/relationship/client/components/index.css +2 -2
  311. package/dist/features/relationship/client/drawer/index.d.ts.map +1 -1
  312. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts +1 -1
  313. package/dist/features/relationship/client/nodes/RelationshipNode.d.ts.map +1 -1
  314. package/dist/features/relationship/client/nodes/RelationshipNode.js.map +1 -1
  315. package/dist/features/relationship/client/plugins/index.d.ts +1 -1
  316. package/dist/features/relationship/client/plugins/index.d.ts.map +1 -1
  317. package/dist/features/relationship/client/plugins/index.js.map +1 -1
  318. package/dist/features/relationship/client/utils/useEnabledRelationships.d.ts.map +1 -1
  319. package/dist/features/relationship/client/utils/useEnabledRelationships.js +9 -40
  320. package/dist/features/relationship/client/utils/useEnabledRelationships.js.map +1 -1
  321. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts +1 -1
  322. package/dist/features/relationship/server/graphQLPopulationPromise.d.ts.map +1 -1
  323. package/dist/features/relationship/server/graphQLPopulationPromise.js.map +1 -1
  324. package/dist/features/relationship/server/index.d.ts +1 -0
  325. package/dist/features/relationship/server/index.d.ts.map +1 -1
  326. package/dist/features/relationship/server/index.js +2 -0
  327. package/dist/features/relationship/server/index.js.map +1 -1
  328. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts +1 -10
  329. package/dist/features/relationship/server/nodes/RelationshipNode.d.ts.map +1 -1
  330. package/dist/features/relationship/server/nodes/RelationshipNode.js.map +1 -1
  331. package/dist/features/relationship/server/schema.d.ts +28 -0
  332. package/dist/features/relationship/server/schema.d.ts.map +1 -0
  333. package/dist/features/relationship/server/schema.js +83 -0
  334. package/dist/features/relationship/server/schema.js.map +1 -0
  335. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts +23 -0
  336. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.d.ts.map +1 -0
  337. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js +34 -0
  338. package/dist/features/relationship/shared/filterEnabledRelationshipCollections.js.map +1 -0
  339. package/dist/features/shared/toolbar/addDropdownGroup.d.ts.map +1 -1
  340. package/dist/features/shared/toolbar/featureButtonsGroup.d.ts.map +1 -1
  341. package/dist/features/shared/toolbar/textDropdownGroup.d.ts.map +1 -1
  342. package/dist/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  343. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  344. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js +1 -2
  345. package/dist/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  346. package/dist/features/toolbars/shared/ToolbarDropdown/index.css +4 -4
  347. package/dist/features/toolbars/shared/ToolbarDropdown/index.d.ts.map +1 -1
  348. package/dist/features/toolbars/types.d.ts +1 -1
  349. package/dist/features/toolbars/types.d.ts.map +1 -1
  350. package/dist/features/toolbars/types.js.map +1 -1
  351. package/dist/features/typesClient.d.ts +1 -1
  352. package/dist/features/typesClient.d.ts.map +1 -1
  353. package/dist/features/typesClient.js.map +1 -1
  354. package/dist/features/typesServer.d.ts +18 -41
  355. package/dist/features/typesServer.d.ts.map +1 -1
  356. package/dist/features/typesServer.js.map +1 -1
  357. package/dist/features/upload/client/component/index.css +14 -18
  358. package/dist/features/upload/client/component/index.d.ts +1 -1
  359. package/dist/features/upload/client/component/index.d.ts.map +1 -1
  360. package/dist/features/upload/client/component/index.js +4 -4
  361. package/dist/features/upload/client/component/index.js.map +1 -1
  362. package/dist/features/upload/client/drawer/index.d.ts.map +1 -1
  363. package/dist/features/upload/client/nodes/UploadNode.d.ts +1 -1
  364. package/dist/features/upload/client/nodes/UploadNode.d.ts.map +1 -1
  365. package/dist/features/upload/client/nodes/UploadNode.js.map +1 -1
  366. package/dist/features/upload/client/plugin/index.d.ts +1 -1
  367. package/dist/features/upload/client/plugin/index.d.ts.map +1 -1
  368. package/dist/features/upload/client/plugin/index.js.map +1 -1
  369. package/dist/features/upload/server/graphQLPopulationPromise.d.ts +1 -1
  370. package/dist/features/upload/server/graphQLPopulationPromise.d.ts.map +1 -1
  371. package/dist/features/upload/server/graphQLPopulationPromise.js.map +1 -1
  372. package/dist/features/upload/server/index.d.ts +1 -0
  373. package/dist/features/upload/server/index.d.ts.map +1 -1
  374. package/dist/features/upload/server/index.js +3 -2
  375. package/dist/features/upload/server/index.js.map +1 -1
  376. package/dist/features/upload/server/nodes/UploadNode.d.ts +1 -55
  377. package/dist/features/upload/server/nodes/UploadNode.d.ts.map +1 -1
  378. package/dist/features/upload/server/nodes/UploadNode.js.map +1 -1
  379. package/dist/features/upload/server/nodes/conversions.d.ts.map +1 -1
  380. package/dist/features/upload/server/nodes/conversions.js.map +1 -1
  381. package/dist/features/upload/server/schema.d.ts +52 -0
  382. package/dist/features/upload/server/schema.d.ts.map +1 -0
  383. package/dist/features/upload/server/schema.js +113 -0
  384. package/dist/features/upload/server/schema.js.map +1 -0
  385. package/dist/features/upload/server/validate.d.ts +1 -1
  386. package/dist/features/upload/server/validate.d.ts.map +1 -1
  387. package/dist/features/upload/server/validate.js.map +1 -1
  388. package/dist/field/Diff/converters/link.d.ts +1 -1
  389. package/dist/field/Diff/converters/link.d.ts.map +1 -1
  390. package/dist/field/Diff/converters/link.js.map +1 -1
  391. package/dist/field/Diff/converters/listitem/index.css +44 -8
  392. package/dist/field/Diff/converters/listitem/index.d.ts +1 -1
  393. package/dist/field/Diff/converters/listitem/index.d.ts.map +1 -1
  394. package/dist/field/Diff/converters/listitem/index.js.map +1 -1
  395. package/dist/field/Diff/converters/relationship/index.css +76 -36
  396. package/dist/field/Diff/converters/relationship/index.d.ts +1 -1
  397. package/dist/field/Diff/converters/relationship/index.d.ts.map +1 -1
  398. package/dist/field/Diff/converters/relationship/index.js +10 -28
  399. package/dist/field/Diff/converters/relationship/index.js.map +1 -1
  400. package/dist/field/Diff/converters/unknown/index.js.map +1 -1
  401. package/dist/field/Diff/converters/upload/index.css +106 -43
  402. package/dist/field/Diff/converters/upload/index.d.ts +1 -1
  403. package/dist/field/Diff/converters/upload/index.d.ts.map +1 -1
  404. package/dist/field/Diff/converters/upload/index.js +6 -2
  405. package/dist/field/Diff/converters/upload/index.js.map +1 -1
  406. package/dist/field/Diff/index.css +116 -61
  407. package/dist/field/Diff/index.js.map +1 -1
  408. package/dist/field/Field.d.ts +1 -1
  409. package/dist/field/Field.d.ts.map +1 -1
  410. package/dist/field/Field.js +3 -4
  411. package/dist/field/Field.js.map +1 -1
  412. package/dist/field/RenderLexical/index.d.ts +2 -2
  413. package/dist/field/RenderLexical/index.d.ts.map +1 -1
  414. package/dist/field/RenderLexical/index.js.map +1 -1
  415. package/dist/field/RichTextViewProvider.d.ts +1 -1
  416. package/dist/field/RichTextViewProvider.d.ts.map +1 -1
  417. package/dist/field/RichTextViewProvider.js.map +1 -1
  418. package/dist/field/bundled.css +1 -1
  419. package/dist/field/index.d.ts +1 -1
  420. package/dist/field/index.d.ts.map +1 -1
  421. package/dist/field/index.js.map +1 -1
  422. package/dist/field/rscEntry.d.ts +1 -1
  423. package/dist/field/rscEntry.d.ts.map +1 -1
  424. package/dist/field/rscEntry.js.map +1 -1
  425. package/dist/hooks.d.ts +6 -0
  426. package/dist/hooks.d.ts.map +1 -0
  427. package/dist/hooks.js +548 -0
  428. package/dist/hooks.js.map +1 -0
  429. package/dist/index.d.ts +11 -8
  430. package/dist/index.d.ts.map +1 -1
  431. package/dist/index.js +9 -618
  432. package/dist/index.js.map +1 -1
  433. package/dist/lexical/LexicalProvider.d.ts +1 -1
  434. package/dist/lexical/LexicalProvider.d.ts.map +1 -1
  435. package/dist/lexical/LexicalProvider.js.map +1 -1
  436. package/dist/lexical/config/client/EditorConfigProvider.d.ts +1 -1
  437. package/dist/lexical/config/client/EditorConfigProvider.d.ts.map +1 -1
  438. package/dist/lexical/config/client/EditorConfigProvider.js.map +1 -1
  439. package/dist/lexical/config/client/loader.d.ts +1 -1
  440. package/dist/lexical/config/client/loader.d.ts.map +1 -1
  441. package/dist/lexical/config/client/loader.js.map +1 -1
  442. package/dist/lexical/config/client/sanitize.d.ts +1 -1
  443. package/dist/lexical/config/client/sanitize.d.ts.map +1 -1
  444. package/dist/lexical/config/client/sanitize.js.map +1 -1
  445. package/dist/lexical/config/server/sanitize.d.ts.map +1 -1
  446. package/dist/lexical/config/server/sanitize.js +9 -11
  447. package/dist/lexical/config/server/sanitize.js.map +1 -1
  448. package/dist/lexical/config/types.d.ts +1 -1
  449. package/dist/lexical/config/types.d.ts.map +1 -1
  450. package/dist/lexical/config/types.js.map +1 -1
  451. package/dist/lexical/nodes/index.d.ts +1 -1
  452. package/dist/lexical/nodes/index.d.ts.map +1 -1
  453. package/dist/lexical/nodes/index.js.map +1 -1
  454. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts +1 -1
  455. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.d.ts.map +1 -1
  456. package/dist/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js.map +1 -1
  457. package/dist/lexical/plugins/handles/DraggableBlockPlugin/debounce.d.ts.map +1 -1
  458. package/dist/lexical/plugins/handles/utils/calculateDistanceFromScrollerElem.d.ts.map +1 -1
  459. package/dist/lexical/theme/EditorTheme.css +4 -4
  460. package/dist/lexical/utils/markdown/createBlockNode.d.ts.map +1 -1
  461. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts +1 -1
  462. package/dist/populateGraphQL/populateLexicalPopulationPromises.d.ts.map +1 -1
  463. package/dist/populateGraphQL/populateLexicalPopulationPromises.js.map +1 -1
  464. package/dist/populateGraphQL/recursivelyPopulateFieldsForGraphQL.d.ts.map +1 -1
  465. package/dist/types/builtInNodes.d.ts +14 -0
  466. package/dist/types/builtInNodes.d.ts.map +1 -0
  467. package/dist/types/builtInNodes.js +203 -0
  468. package/dist/types/builtInNodes.js.map +1 -0
  469. package/dist/{types.d.ts → types/index.d.ts} +9 -10
  470. package/dist/types/index.d.ts.map +1 -0
  471. package/dist/types/index.js +2 -0
  472. package/dist/types/index.js.map +1 -0
  473. package/dist/types/jsonSchemaHelpers.d.ts +28 -0
  474. package/dist/types/jsonSchemaHelpers.d.ts.map +1 -0
  475. package/dist/types/jsonSchemaHelpers.js +54 -0
  476. package/dist/types/jsonSchemaHelpers.js.map +1 -0
  477. package/dist/types/nodeTypes.d.ts +86 -0
  478. package/dist/types/nodeTypes.d.ts.map +1 -0
  479. package/dist/types/nodeTypes.js +6 -0
  480. package/dist/types/nodeTypes.js.map +1 -0
  481. package/dist/types/schema.d.ts +6 -0
  482. package/dist/types/schema.d.ts.map +1 -0
  483. package/dist/types/schema.js +73 -0
  484. package/dist/types/schema.js.map +1 -0
  485. package/dist/utilities/buildEditorState.d.ts +1 -1
  486. package/dist/utilities/buildEditorState.d.ts.map +1 -1
  487. package/dist/utilities/buildEditorState.js.map +1 -1
  488. package/dist/utilities/buildInitialState.js.map +1 -1
  489. package/dist/utilities/createClientFeature.d.ts +1 -1
  490. package/dist/utilities/createClientFeature.d.ts.map +1 -1
  491. package/dist/utilities/createClientFeature.js.map +1 -1
  492. package/dist/utilities/editorConfigFactory.d.ts +1 -1
  493. package/dist/utilities/editorConfigFactory.d.ts.map +1 -1
  494. package/dist/utilities/editorConfigFactory.js.map +1 -1
  495. package/dist/utilities/fieldsDrawer/useLexicalDocumentDrawer.d.ts.map +1 -1
  496. package/dist/utilities/fieldsDrawer/useLexicalDrawer.d.ts.map +1 -1
  497. package/dist/utilities/fieldsDrawer/useLexicalListDrawer.d.ts.map +1 -1
  498. package/dist/utilities/generateImportMap.d.ts +1 -1
  499. package/dist/utilities/generateImportMap.d.ts.map +1 -1
  500. package/dist/utilities/generateImportMap.js.map +1 -1
  501. package/dist/utilities/generateSchemaMap.d.ts.map +1 -1
  502. package/dist/utilities/getDefaultSanitizedEditorConfig.d.ts.map +1 -1
  503. package/dist/utilities/initLexicalFeatures.d.ts +1 -1
  504. package/dist/utilities/initLexicalFeatures.d.ts.map +1 -1
  505. package/dist/utilities/initLexicalFeatures.js.map +1 -1
  506. package/dist/utilities/recurseNodeTree.d.ts.map +1 -1
  507. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.d.ts.map +1 -1
  508. package/dist/utilities/upgradeLexicalData/upgradeDocumentFieldsRecursively.js.map +1 -1
  509. package/dist/utilities/useLexicalFeature.d.ts.map +1 -1
  510. package/dist/validate/index.d.ts.map +1 -1
  511. package/package.json +13 -13
  512. package/dist/exports/client/Field-PJW7KUJG.js.map +0 -7
  513. package/dist/exports/client/RelationshipComponent-5RONAYJM.js.map +0 -7
  514. package/dist/exports/client/chunk-44G3K3W7.js.map +0 -7
  515. package/dist/exports/client/chunk-BZZVLW4U.js.map +0 -7
  516. package/dist/exports/client/chunk-FTT5KJ6W.js.map +0 -7
  517. package/dist/exports/client/component-53Y3RYR5.js +0 -2
  518. package/dist/exports/client/component-53Y3RYR5.js.map +0 -7
  519. package/dist/exports/client/componentInline-PM4PLNUK.js +0 -2
  520. package/dist/features/link/nodes/types.d.ts +0 -27
  521. package/dist/features/link/nodes/types.d.ts.map +0 -1
  522. package/dist/features/link/nodes/types.js +0 -2
  523. package/dist/features/link/nodes/types.js.map +0 -1
  524. package/dist/nodeTypes.d.ts +0 -74
  525. package/dist/nodeTypes.d.ts.map +0 -1
  526. package/dist/nodeTypes.js +0 -5
  527. package/dist/nodeTypes.js.map +0 -1
  528. package/dist/types.d.ts.map +0 -1
  529. package/dist/types.js +0 -2
  530. package/dist/types.js.map +0 -1
  531. /package/dist/exports/client/{chunk-QJ5EETIB.js.map → chunk-6QWQ7JV4.js.map} +0 -0
  532. /package/dist/exports/client/{componentInline-PM4PLNUK.js.map → componentInline-D3A6OW76.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"conversions.js","names":["ObjectID","isGoogleDocCheckboxImg","img","parentElement","tagName","previousSibling","getAttribute","$convertUploadElement","domNode","$createNode","hasAttribute","formID","node","data","pending","src","id","relationTo","fields","value","default","toHexString"],"sources":["../../../../../src/features/upload/server/nodes/conversions.ts"],"sourcesContent":["// This file contains functions used to convert dom elements to upload or pending upload lexical nodes. It requires the actual node\n// creation functions to be passed in to stay compatible with both client and server code.\nimport type { DOMConversionOutput } from 'lexical'\n\nimport ObjectID from 'bson-objectid'\n\nimport type { $createUploadNode } from '../../client/nodes/UploadNode.js'\nimport type { $createUploadServerNode, Internal_UploadData } from './UploadNode.js'\n\nexport function isGoogleDocCheckboxImg(img: HTMLImageElement): boolean {\n return (\n img.parentElement != null &&\n img.parentElement.tagName === 'LI' &&\n img.previousSibling === null &&\n img.getAttribute('aria-roledescription') === 'checkbox'\n )\n}\n\nexport function $convertUploadElement(\n domNode: HTMLImageElement,\n $createNode: typeof $createUploadNode | typeof $createUploadServerNode,\n): DOMConversionOutput | null {\n if (domNode.hasAttribute('data-lexical-pending-upload-form-id')) {\n const formID = domNode.getAttribute('data-lexical-pending-upload-form-id')\n\n if (formID != null) {\n const node = $createNode({\n data: {\n pending: {\n formID,\n src: domNode.getAttribute('src') || '',\n },\n } as Internal_UploadData,\n })\n return { node }\n }\n }\n if (\n domNode.hasAttribute('data-lexical-upload-relation-to') &&\n domNode.hasAttribute('data-lexical-upload-id')\n ) {\n const id = domNode.getAttribute('data-lexical-upload-id')\n const relationTo = domNode.getAttribute('data-lexical-upload-relation-to')\n\n if (id != null && relationTo != null) {\n const node = $createNode({\n data: {\n fields: {},\n relationTo,\n value: id,\n },\n })\n return { node }\n }\n }\n\n // Create pending UploadNode. Auto-Upload functionality will then be handled by the node transform\n const node = $createNode({\n data: {\n pending: {\n formID: new ObjectID.default().toHexString(),\n src: domNode.getAttribute('src') || '',\n },\n } as Internal_UploadData,\n })\n\n return { node }\n}\n"],"mappings":"AAAA;AACA;AAGA,OAAOA,QAAA,MAAc;AAKrB,OAAO,S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ogleDocCheckboxImg","img","parentElement","tagName","previousSibling","getAttribute","$convertUploadElement","domNode","$createNode","hasAttribute","formID","node","data","pending","src","id","relationTo","fields","value","default","toHexString"],"sources":["../../../../../src/features/upload/server/nodes/conversions.ts"],"sourcesContent":["// This file contains functions used to convert dom elements to upload or pending upload lexical nodes. It requires the actual node\n// creation functions to be passed in to stay compatible with both client and server code.\nimport type { DOMConversionOutput } from 'lexical'\n\nimport ObjectID from 'bson-objectid'\n\nimport type { $createUploadNode } from '../../client/nodes/UploadNode.js'\nimport type { Internal_UploadData } from '../schema.js'\nimport type { $createUploadServerNode } from './UploadNode.js'\n\nexport function isGoogleDocCheckboxImg(img: HTMLImageElement): boolean {\n return (\n img.parentElement != null &&\n img.parentElement.tagName === 'LI' &&\n img.previousSibling === null &&\n img.getAttribute('aria-roledescription') === 'checkbox'\n )\n}\n\nexport function $convertUploadElement(\n domNode: HTMLImageElement,\n $createNode: typeof $createUploadNode | typeof $createUploadServerNode,\n): DOMConversionOutput | null {\n if (domNode.hasAttribute('data-lexical-pending-upload-form-id')) {\n const formID = domNode.getAttribute('data-lexical-pending-upload-form-id')\n\n if (formID != null) {\n const node = $createNode({\n data: {\n pending: {\n formID,\n src: domNode.getAttribute('src') || '',\n },\n } as Internal_UploadData,\n })\n return { node }\n }\n }\n if (\n domNode.hasAttribute('data-lexical-upload-relation-to') &&\n domNode.hasAttribute('data-lexical-upload-id')\n ) {\n const id = domNode.getAttribute('data-lexical-upload-id')\n const relationTo = domNode.getAttribute('data-lexical-upload-relation-to')\n\n if (id != null && relationTo != null) {\n const node = $createNode({\n data: {\n fields: {},\n relationTo,\n value: id,\n },\n })\n return { node }\n }\n }\n\n // Create pending UploadNode. Auto-Upload functionality will then be handled by the node transform\n const node = $createNode({\n data: {\n pending: {\n formID: new ObjectID.default().toHexString(),\n src: domNode.getAttribute('src') || '',\n },\n } as Internal_UploadData,\n })\n\n return { node }\n}\n"],"mappings":"AAAA;AACA;AAGA,OAAOA,QAAA,MAAc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 import type { DataFromCollectionSlug, JsonObject, TypedUploadCollection, UploadCollectionSlug } from 'payload';
2
+ import type { LexicalElementFormat } from '../../../types/nodeTypes.js';
3
+ import type { JSONSchemaFn } from '../../typesServer.js';
4
+ import type { UploadFeatureProps } from './index.js';
5
+ export type UploadData<TFields extends JsonObject = JsonObject> = {
6
+ [TCollectionSlug in UploadCollectionSlug]: {
7
+ fields: TFields;
8
+ /** ID of this upload node — NOT the linked document's ID. */
9
+ id: string;
10
+ relationTo: TCollectionSlug;
11
+ /** Either the document ID or the full populated document. */
12
+ value: DataFromCollectionSlug<TCollectionSlug> | number | string;
13
+ };
14
+ }[UploadCollectionSlug];
15
+ /** @internal Adds a pending state to `UploadData`. */
16
+ export type Internal_UploadData<TFields extends JsonObject = JsonObject> = {
17
+ pending?: {
18
+ /** Bulk upload form ID. */
19
+ formID: string;
20
+ /** `src` of the image DOM element. */
21
+ src: string;
22
+ };
23
+ } & UploadData<TFields>;
24
+ /**
25
+ * More precise variant of {@link UploadData}. Replaces `UploadData` in v4.
26
+ * @internal
27
+ * @todo Replace UploadData with UploadDataImproved in 4.0
28
+ */
29
+ export type UploadDataImproved<TFields extends JsonObject = JsonObject> = {
30
+ [TCollectionSlug in UploadCollectionSlug]: {
31
+ fields: TFields;
32
+ id: string;
33
+ relationTo: TCollectionSlug;
34
+ value: number | string | TypedUploadCollection[TCollectionSlug];
35
+ };
36
+ }[UploadCollectionSlug];
37
+ export type SerializedUploadNode<TSlugs extends UploadCollectionSlug = UploadCollectionSlug> = {
38
+ [TSlug in TSlugs]: {
39
+ relationTo: TSlug;
40
+ value: DataFromCollectionSlug<TSlug> | number | string;
41
+ };
42
+ }[TSlugs] & {
43
+ fields: {
44
+ [k: string]: unknown;
45
+ };
46
+ format: LexicalElementFormat;
47
+ id: string;
48
+ type: 'upload';
49
+ version: number;
50
+ };
51
+ export declare const createUploadNodeJSONSchema: (props: undefined | UploadFeatureProps) => JSONSchemaFn;
52
+ //# sourceMappingURL=schema.d.ts.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E;CACF,CAAC,oBAAoB,CAAC,CAAA;AAEvB,MAAM,MAAM,oBAAoB,CAAC,MAAM,SAAS,oBAAoB,GAAG,oBAAoB,IAAI;KAC5F,KAAK,IAAI,MAAM,GAAG;QACjB,UAAU,EAAE,KAAK,CAAA;QACjB,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,GAAG,MAAM,GAAG,MAAM,CAAA;KACvD;CACF,CAAC,MAAM,CAAC,GAAG;IACV,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;IAChC,MAAM,EAAE,oBAAoB,CAAA;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAgBD,eAAO,MAAM,0BAA0B,GACpC,OAAO,SAAS,GAAG,kBAAkB,KAAG,YAuExC,CAAA"}
@@ -0,0 +1,113 @@
1
+ import { fieldsToJSONSchema, flattenAllFields } from 'payload';
2
+ import { formatSchema } from '../../../types/jsonSchemaHelpers.js';
3
+ import { filterEnabledRelationshipCollections } from '../../relationship/shared/filterEnabledRelationshipCollections.js';
4
+ /** MUST stay byte-for-byte in sync with the runtime `SerializedUploadNode` declared above. */
5
+ const SERIALIZED_UPLOAD_NODE_TS = `export type SerializedUploadNode<TSlugs extends keyof Config['collections']> = {
6
+ type: 'upload';
7
+ format: LexicalElementFormat;
8
+ id: string;
9
+ version: number;
10
+ fields: { [k: string]: unknown };
11
+ } & {
12
+ [TSlug in TSlugs]: {
13
+ relationTo: TSlug;
14
+ value: number | string | Config['collections'][TSlug];
15
+ };
16
+ }[TSlugs];`;
17
+ export const createUploadNodeJSONSchema = props => ({
18
+ collectionIDFieldTypes,
19
+ config,
20
+ i18n,
21
+ interfaceNameDefinitions,
22
+ typeStringDefinitions
23
+ }) => {
24
+ typeStringDefinitions.add(SERIALIZED_UPLOAD_NODE_TS);
25
+ const enabledCollections = config?.collections ? filterEnabledRelationshipCollections(config.collections, {
26
+ disabledCollections: props?.disabledCollections,
27
+ enabledCollections: props?.enabledCollections,
28
+ uploads: true
29
+ }) : [];
30
+ const collectionVariants = enabledCollections.map(collection => {
31
+ const slug = collection.slug;
32
+ const idType = collectionIDFieldTypes[slug] ?? 'string';
33
+ const extraFields = props?.collections?.[slug]?.fields ?? [];
34
+ const flattenedExtra = flattenAllFields({
35
+ fields: extraFields
36
+ });
37
+ const extraFieldsSchema = flattenedExtra.length > 0 && config ? fieldsToJSONSchema({
38
+ collectionIDFieldTypes,
39
+ config,
40
+ fields: flattenedExtra,
41
+ i18n,
42
+ interfaceNameDefinitions,
43
+ typeStringDefinitions
44
+ }) : {
45
+ properties: {},
46
+ required: []
47
+ };
48
+ return {
49
+ type: 'object',
50
+ additionalProperties: false,
51
+ properties: {
52
+ id: {
53
+ type: 'string'
54
+ },
55
+ type: {
56
+ type: 'string',
57
+ const: 'upload'
58
+ },
59
+ fields: {
60
+ type: 'object',
61
+ additionalProperties: false,
62
+ properties: extraFieldsSchema.properties,
63
+ required: extraFieldsSchema.required
64
+ },
65
+ format: formatSchema,
66
+ relationTo: {
67
+ type: 'string',
68
+ const: slug
69
+ },
70
+ value: {
71
+ oneOf: [{
72
+ type: idType
73
+ }, {
74
+ $ref: `#/definitions/${slug}`
75
+ }]
76
+ },
77
+ version: {
78
+ type: 'integer'
79
+ }
80
+ },
81
+ required: ['fields', 'format', 'id', 'relationTo', 'type', 'value', 'version']
82
+ };
83
+ });
84
+ let schema;
85
+ if (collectionVariants.length === 0) {
86
+ // Fallback when no enabled upload collections.
87
+ schema = {
88
+ type: 'object',
89
+ additionalProperties: true,
90
+ properties: {
91
+ type: {
92
+ type: 'string',
93
+ const: 'upload'
94
+ },
95
+ version: {
96
+ type: 'integer'
97
+ }
98
+ },
99
+ required: ['type', 'version']
100
+ };
101
+ } else {
102
+ const slugUnion = enabledCollections.map(c => `'${c.slug}'`).join(' | ');
103
+ const baseSchema = collectionVariants.length === 1 ? collectionVariants[0] : {
104
+ oneOf: collectionVariants
105
+ };
106
+ schema = {
107
+ ...baseSchema,
108
+ tsType: `SerializedUploadNode<${slugUnion}>`
109
+ };
110
+ }
111
+ return schema;
112
+ };
113
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":["fieldsToJSONSchema","flattenAllFields","formatSchema","filterEnabledRelationshipCollections","SERIALIZED_UPLOAD_NODE_TS","createUploadNodeJSONSchema","props","collectionIDFieldTypes","config","i18n","interfaceNameDefinitions","typeStringDefinitions","add","enabledCollections","collections","disabledCollections","uploads","collectionVariants","map","collection","slug","idType","extraFields","fields","flattenedExtra","extraFieldsSchema","length","properties","required","type","additionalProperties","id","const","format","relationTo","value","oneOf","$ref","version","schema","slugUnion","c","join","baseSchema","tsType"],"sources":["../../../../src/features/upload/server/schema.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type {\n DataFromCollectionSlug,\n JsonObject,\n TypedUploadCollection,\n UploadCollectionSlug,\n} from 'payload'\n\nimport { fieldsToJSONSchema, flattenAllFields } from 'payload'\n\nimport type { LexicalElementFormat } from '../../../types/nodeTypes.js'\nimport type { JSONSchemaFn } from '../../typesServer.js'\nimport type { UploadFeatureProps } from './index.js'\n\nimport { formatSchema } from '../../../types/jsonSchemaHelpers.js'\nimport { filterEnabledRelationshipCollections } from '../../relationship/shared/filterEnabledRelationshipCollections.js'\n\nexport type UploadData<TFields extends JsonObject = JsonObject> = {\n [TCollectionSlug in UploadCollectionSlug]: {\n fields: TFields\n /** ID of this upload node — NOT the linked document's ID. */\n id: string\n relationTo: TCollectionSlug\n /** Either the document ID or the full populated document. */\n value: DataFromCollectionSlug<TCollectionSlug> | number | string\n }\n}[UploadCollectionSlug]\n\n/** @internal Adds a pending state to `UploadData`. */\nexport type Internal_UploadData<TFields extends JsonObject = JsonObject> = {\n pending?: {\n /** Bulk upload form ID. */\n formID: string\n /** `src` of the image DOM element. */\n src: string\n }\n} & UploadData<TFields>\n\n/**\n * More precise variant of {@link UploadData}. Replaces `UploadData` in v4.\n * @internal\n * @todo Replace UploadData with UploadDataImproved in 4.0\n */\nexport type UploadDataImproved<TFields extends JsonObject = JsonObject> = {\n [TCollectionSlug in UploadCollectionSlug]: {\n fields: TFields\n id: string\n relationTo: TCollectionSlug\n value: number | string | TypedUploadCollection[TCollectionSlug]\n }\n}[UploadCollectionSlug]\n\nexport type SerializedUploadNode<TSlugs extends UploadCollectionSlug = UploadCollectionSlug> = {\n [TSlug in TSlugs]: {\n relationTo: TSlug\n value: DataFromCollectionSlug<TSlug> | number | string\n }\n}[TSlugs] & {\n fields: { [k: string]: unknown }\n format: LexicalElementFormat\n id: string\n type: 'upload'\n version: number\n}\n\n/** MUST stay byte-for-byte in sync with the runtime `SerializedUploadNode` declared above. */\nconst SERIALIZED_UPLOAD_NODE_TS = `export type SerializedUploadNode<TSlugs extends keyof Config['collections']> = {\n type: 'upload';\n format: LexicalElementFormat;\n id: string;\n version: number;\n fields: { [k: string]: unknown };\n} & {\n [TSlug in TSlugs]: {\n relationTo: TSlug;\n value: number | string | Config['collections'][TSlug];\n };\n}[TSlugs];`\n\nexport const createUploadNodeJSONSchema =\n (props: undefined | UploadFeatureProps): JSONSchemaFn =>\n ({ collectionIDFieldTypes, config, i18n, interfaceNameDefinitions, typeStringDefinitions }) => {\n typeStringDefinitions.add(SERIALIZED_UPLOAD_NODE_TS)\n const enabledCollections = config?.collections\n ? filterEnabledRelationshipCollections(config.collections, {\n disabledCollections: props?.disabledCollections,\n enabledCollections: props?.enabledCollections,\n uploads: true,\n })\n : []\n\n const collectionVariants: JSONSchema4[] = enabledCollections.map((collection) => {\n const slug = collection.slug\n const idType: 'number' | 'string' = collectionIDFieldTypes[slug] ?? 'string'\n const extraFields = props?.collections?.[slug]?.fields ?? []\n const flattenedExtra = flattenAllFields({ fields: extraFields })\n const extraFieldsSchema =\n flattenedExtra.length > 0 && config\n ? fieldsToJSONSchema({\n collectionIDFieldTypes,\n config,\n fields: flattenedExtra,\n i18n,\n interfaceNameDefinitions,\n typeStringDefinitions,\n })\n : { properties: {}, required: [] }\n\n return {\n type: 'object',\n additionalProperties: false,\n properties: {\n id: { type: 'string' },\n type: { type: 'string', const: 'upload' },\n fields: {\n type: 'object',\n additionalProperties: false,\n properties: extraFieldsSchema.properties,\n required: extraFieldsSchema.required,\n },\n format: formatSchema,\n relationTo: { type: 'string', const: slug },\n value: {\n oneOf: [{ type: idType }, { $ref: `#/definitions/${slug}` }],\n },\n version: { type: 'integer' },\n },\n required: ['fields', 'format', 'id', 'relationTo', 'type', 'value', 'version'],\n }\n })\n\n let schema: JSONSchema4\n if (collectionVariants.length === 0) {\n // Fallback when no enabled upload collections.\n schema = {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: { type: 'string', const: 'upload' },\n version: { type: 'integer' },\n },\n required: ['type', 'version'],\n }\n } else {\n const slugUnion = enabledCollections.map((c) => `'${c.slug}'`).join(' | ')\n const baseSchema: JSONSchema4 =\n collectionVariants.length === 1 ? collectionVariants[0]! : { oneOf: collectionVariants }\n schema = { ...baseSchema, tsType: `SerializedUploadNode<${slugUnion}>` }\n }\n\n return schema\n }\n"],"mappings":"AAQA,SAASA,kBAAkB,EAAEC,gBAAgB,QAAQ;AAMrD,SAASC,YAAY,QAAQ;AAC7B,SAASC,oCAAoC,QAAQ;AAkDrD;AACA,MAAMC,yBAAA,GAA4B;;;;;;;;;;;WAWvB;AAEX,OAAO,MAAMC,0BAAA,GACVC,KAAA,IACD,CAAC;EAAEC,sBAAsB;EAAEC,MAAM;EAAEC,IAAI;EAAEC,wBAAwB;EAAEC;AAAqB,CAAE;EACxFA,qBAAA,CAAsBC,GAAG,CAACR,yBAAA;EAC1B,MAAMS,kBAAA,GAAqBL,MAAA,EAAQM,WAAA,GAC/BX,oCAAA,CAAqCK,MAAA,CAAOM,WAAW,EAAE;IACvDC,mBAAA,EAAqBT,KAAA,EAAOS,mBAAA;IAC5BF,kBAAA,EAAoBP,KAA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U,CAAC,UAAU,UAAU,MAAM,cAAc,QAAQ,SAAS;IACtE;EACF;EAEA,IAAIW,MAAA;EACJ,IAAItB,kBAAA,CAAmBS,MAAM,KAAK,GAAG;IACnC;IACAa,MAAA,GAAS;MACPV,IAAA,EAAM;MACNC,oBAAA,EAAsB;MACtBH,UAAA,EAAY;QACVE,IAAA,EAAM;UAAEA,IAAA,EAAM;UAAUG,KAAA,EAAO;QAAS;QACxCM,OAAA,EAAS;UAAET,IAAA,EAAM;QAAU;MAC7B;MACAD,QAAA,EAAU,CAAC,QAAQ;IACrB;EACF,OAAO;IACL,MAAMY,SAAA,GAAY3B,kBAAA,CAAmBK,GAAG,CAAEuB,CAAA,IAAM,IAAIA,CAAA,CAAErB,IAAI,GAAG,EAAEsB,IAAI,CAAC;IACpE,MAAMC,UAAA,GACJ1B,kBAAA,CAAmBS,MAAM,KAAK,IAAIT,kBAAkB,CAAC,EAAE,GAAI;MAAEmB,KAAA,EAAOnB;IAAmB;IACzFsB,MAAA,GAAS;MAAE,GAAGI,UAAU;MAAEC,MAAA,EAAQ,wBAAwBJ,SAAA;IAAa;EACzE;EAEA,OAAOD,MAAA;AACT","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type { NodeValidation } from '../../typesServer.js';
2
2
  import type { UploadFeatureProps } from './index.js';
3
- import type { SerializedUploadNode } from './nodes/UploadNode.js';
3
+ import type { SerializedUploadNode } from './schema.js';
4
4
  export declare const uploadValidation: (props: UploadFeatureProps) => NodeValidation<SerializedUploadNode>;
5
5
  //# sourceMappingURL=validate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/upload/server/validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,eAAO,MAAM,gBAAgB,UACpB,kBAAkB,KACxB,cAAc,CAAC,oBAAoB,CAqErC,CAAA"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/features/upload/server/validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,gBAAgB,GAC3B,OAAO,kBAAkB,KACxB,cAAc,CAAC,oBAAoB,CAqErC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","names":["fieldSchemasToFormState","isValidID","uploadValidation","props","node","validation","options","id","data","operation","preferences","req","payload","t","idType","collections","relationTo","customIDType","db","defaultIDType","nodeID","value","Object","keys","length","collection","fields","result","collectionSlug","documentData","fieldSchemaMap","undefined","initialBlockData","permissions","renderAllFields","schemaPath","errorPathsSet","Set","fieldKey","fieldState","errorPaths","errorPath","add","Array","from","join"],"sources":["../../../../src/features/upload/server/validate.ts"],"sourcesContent":["import { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\nimport { isValidID } from 'payload'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { UploadFeatureProps } from './index.js'\nimport type { SerializedUploadNode } from './nodes/UploadNode.js'\n\nexport const uploadValidation = (\n props: UploadFeatureProps,\n): NodeValidation<SerializedUploadNode> => {\n return async ({\n node,\n validation: {\n options: {\n id,\n data,\n operation,\n preferences,\n req,\n req: { payload, t },\n },\n },\n }) => {\n const idType = payload.collections[node.relationTo]?.customIDType || payload.db.defaultIDType\n // @ts-expect-error - Fix in Payload v4\n const nodeID = node?.value?.id || node?.value // for backwards-compatibility\n\n if (!isValidID(nodeID, idType)) {\n return t('validation:validUploadID')\n }\n\n if (!props?.collections) {\n return true\n }\n\n if (Object.keys(props?.collections).length === 0) {\n return true\n }\n\n const collection = props?.collections[node.relationTo]\n\n if (!collection?.fields?.length) {\n return true\n }\n\n const result = await fieldSchemasToFormState({\n id,\n collectionSlug: node.relationTo,\n data: node?.fields ?? {},\n documentData: data,\n fields: collection.fields,\n fieldSchemaMap: undefined,\n initialBlockData: node?.fields ?? {},\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n permissions: {},\n preferences,\n renderAllFields: false,\n req,\n schemaPath: '',\n })\n\n const errorPathsSet = new Set<string>()\n for (const fieldKey in result) {\n const fieldState = result[fieldKey]\n if (fieldState?.errorPaths?.length) {\n for (const errorPath of fieldState.errorPaths) {\n errorPathsSet.add(errorPath)\n }\n }\n }\n const errorPaths = Array.from(errorPathsSet)\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ;AACxC,SAASC,SAAS,QAAQ;AAM1B,OAAO,MAAMC,gBAAA,GACXC,KAAA;EAEA,OAAO,OAAO;IACZC,IAAI;IACJC,UAAA,EAAY;MACVC,OAAA,EAAS;QACPC,EAAE;QACFC,IAAI;QACJC,SAAS;QACTC,WAAW;QACXC,GAAG;QACHA,GAAA,EAAK;UAAEC,OAAO;UAAEC;QAAC;MAAE;IACpB;EACF,CACF;IACC,MAAMC,MAAA,GAASF,OAAA,CAAQG,WAAW,CAACX,IAAA,CAAKY,UAAU,CAAC,EAAEC,YAAA,IAAgBL,OAAA,CAAQM,EAAE,CAACC,aAAa;IAC7F;IACA,MAAMC,MAAA,GAAShB,IAAA,EAAMiB,KAAA,EAAOd,EAAA,IAAMH,IAAA,EAAMiB,KAAA,CAAM;AAAA;IAE9C,IAAI,CAACpB,SAAA,CAAUmB,MAAA,EAAQN,MAAA,GAAS;MAC9B,OAAOD,CAAA,CAAE;IACX;IAEA,IAAI,CAACV,KAAA,EAAOY,WAAA,EAAa;MACvB,OAAO;IACT;IAEA,IAAIO,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file":"validate.js","names":["fieldSchemasToFormState","isValidID","uploadValidation","props","node","validation","options","id","data","operation","preferences","req","payload","t","idType","collections","relationTo","customIDType","db","defaultIDType","nodeID","value","Object","keys","length","collection","fields","result","collectionSlug","documentData","fieldSchemaMap","undefined","initialBlockData","permissions","renderAllFields","schemaPath","errorPathsSet","Set","fieldKey","fieldState","errorPaths","errorPath","add","Array","from","join"],"sources":["../../../../src/features/upload/server/validate.ts"],"sourcesContent":["import { fieldSchemasToFormState } from '@payloadcms/ui/forms/fieldSchemasToFormState'\nimport { isValidID } from 'payload'\n\nimport type { NodeValidation } from '../../typesServer.js'\nimport type { UploadFeatureProps } from './index.js'\nimport type { SerializedUploadNode } from './schema.js'\n\nexport const uploadValidation = (\n props: UploadFeatureProps,\n): NodeValidation<SerializedUploadNode> => {\n return async ({\n node,\n validation: {\n options: {\n id,\n data,\n operation,\n preferences,\n req,\n req: { payload, t },\n },\n },\n }) => {\n const idType = payload.collections[node.relationTo]?.customIDType || payload.db.defaultIDType\n // @ts-expect-error - Fix in Payload v4\n const nodeID = node?.value?.id || node?.value // for backwards-compatibility\n\n if (!isValidID(nodeID, idType)) {\n return t('validation:validUploadID')\n }\n\n if (!props?.collections) {\n return true\n }\n\n if (Object.keys(props?.collections).length === 0) {\n return true\n }\n\n const collection = props?.collections[node.relationTo]\n\n if (!collection?.fields?.length) {\n return true\n }\n\n const result = await fieldSchemasToFormState({\n id,\n collectionSlug: node.relationTo,\n data: node?.fields ?? {},\n documentData: data,\n fields: collection.fields,\n fieldSchemaMap: undefined,\n initialBlockData: node?.fields ?? {},\n operation: operation === 'create' || operation === 'update' ? operation : 'update',\n permissions: {},\n preferences,\n renderAllFields: false,\n req,\n schemaPath: '',\n })\n\n const errorPathsSet = new Set<string>()\n for (const fieldKey in result) {\n const fieldState = result[fieldKey]\n if (fieldState?.errorPaths?.length) {\n for (const errorPath of fieldState.errorPaths) {\n errorPathsSet.add(errorPath)\n }\n }\n }\n const errorPaths = Array.from(errorPathsSet)\n\n if (errorPaths.length) {\n return 'The following fields are invalid: ' + errorPaths.join(', ')\n }\n\n return true\n }\n}\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ;AACxC,SAASC,SAAS,QAAQ;AAM1B,OAAO,MAAMC,gBAAA,GACXC,KAAA;EAEA,OAAO,OAAO;IACZC,IAAI;IACJC,UAAA,EAAY;MACVC,OAAA,EAAS;QACPC,EAAE;QACFC,IAAI;QACJC,SAAS;QACTC,WAAW;QACXC,GAAG;QACHA,GAAA,EAAK;UAAEC,OAAO;UAAEC;QAAC;MAAE;IACpB;EACF,CACF;IACC,MAAMC,MAAA,GAASF,OAAA,CAAQG,WAAW,CAACX,IAAA,CAAKY,UAAU,CAAC,EAAEC,YAAA,IAAgBL,OAAA,CAAQM,EAAE,CAACC,aAAa;IAC7F;IACA,MAAMC,MAAA,GAAShB,IAAA,EAAMiB,KAAA,EAAOd,EAAA,IAAMH,IAAA,EAAMiB,KAAA,CAAM;AAAA;IAE9C,IAAI,CAACpB,SAAA,CAAUmB,MAAA,EAAQN,MAAA,GAAS;MAC9B,OAAOD,CAAA,CAAE;IACX;IAEA,IAAI,CAACV,KAAA,EAAOY,WAAA,EAAa;MACvB,OAAO;IACT;IAEA,IAAIO,MAAA,CAAOC,IAAI,CAACpB,KAAA,EAAOY,WAAA,EAAaS,MAAM,KAAK,GAAG;MAChD,OAAO;IACT;IAEA,MAAMC,UAAA,GAAatB,KAAA,EAAOY,WAAW,CAACX,IAAA,CAAKY,UAAU,CAAC;IAEtD,IAAI,CAACS,UAAA,EAAYC,MAAA,EAAQF,MAAA,EAAQ;MAC/B,OAAO;IACT;IAEA,MAAMG,MAAA,GAAS,MAAM3B,uBAAA,CAAwB;MAC3CO,EAAA;MACAqB,cAAA,EAAgBxB,IAAA,CAAKY,UAAU;MAC/BR,IAAA,EAAMJ,IAAA,EAAMsB,MAAA,IAAU,CAAC;MACvBG,YAAA,EAAcrB,IAAA;MACdkB,MAAA,EAAQD,UAAA,CAAWC,MAAM;MACzBI,cAAA,EAAgBC,SAAA;MAChBC,gBAAA,EAAkB5B,IAAA,EAAMsB,MAAA,IAAU,CAAC;MACnCjB,SAAA,EAAWA,SAAA,KAAc,YAAYA,SAAA,KAAc,WAAWA,SAAA,GAAY;MAC1EwB,WAAA,EAAa,CAAC;MACdvB,WAAA;MACAwB,eAAA,EAAiB;MACjBvB,GAAA;MACAwB,UAAA,EAAY;IACd;IAEA,MAAMC,aAAA,GAAgB,IAAIC,GAAA;IAC1B,KAAK,MAAMC,QAAA,IAAYX,MAAA,EAAQ;MAC7B,MAAMY,UAAA,GAAaZ,MAAM,CAACW,QAAA,CAAS;MACnC,IAAIC,UAAA,EAAYC,UAAA,EAAYhB,MAAA,EAAQ;QAClC,KAAK,MAAMiB,SAAA,IAAaF,UAAA,CAAWC,UAAU,EAAE;UAC7CJ,aAAA,CAAcM,GAAG,CAACD,SAAA;QACpB;MACF;IACF;IACA,MAAMD,UAAA,GAAaG,KAAA,CAAMC,IAAI,CAACR,aAAA;IAE9B,IAAII,UAAA,CAAWhB,MAAM,EAAE;MACrB,OAAO,uCAAuCgB,UAAA,CAAWK,IAAI,CAAC;IAChE;IAEA,OAAO;EACT;AACF","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import type { HTMLConvertersAsync, HTMLPopulateFn } from '../../../features/converters/lexicalToHtml/async/types.js';
2
- import type { SerializedAutoLinkNode, SerializedLinkNode } from '../../../nodeTypes.js';
2
+ import type { SerializedAutoLinkNode, SerializedLinkNode } from '../../../types/nodeTypes.js';
3
3
  export declare const LinkDiffHTMLConverterAsync: (args: {
4
4
  internalDocToHref?: (args: {
5
5
  linkNode: SerializedLinkNode;
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/field/Diff/converters/link.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAEvF,eAAO,MAAM,0BAA0B,EAAE,CAAC,IAAI,EAAE;IAC9C,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,kBAAkB,CAAA;QAC5B,QAAQ,CAAC,EAAE,cAAc,CAAA;KAC1B,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;CAC/B,KAAK,mBAAmB,CAAC,sBAAsB,GAAG,kBAAkB,CAkDnE,CAAA"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/field/Diff/converters/link.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAE7F,eAAO,MAAM,0BAA0B,EAAE,CAAC,IAAI,EAAE;IAC9C,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,kBAAkB,CAAA;QAC5B,QAAQ,CAAC,EAAE,cAAc,CAAA;KAC1B,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;CAC/B,KAAK,mBAAmB,CAAC,sBAAsB,GAAG,kBAAkB,CAkDnE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","names":["createHash","escapeHTML","sanitizeUrl","LinkDiffHTMLConverterAsync","internalDocToHref","autolink","node","nodesToHTML","providedStyleTag","children","nodes","join","nodeFieldsHash","update","JSON","stringify","fields","digest","href","url","newTab","link","populate","linkType","linkNode","console","error","safeHref"],"sources":["../../../../src/field/Diff/converters/link.ts"],"sourcesContent":["import { createHash } from 'crypto'\nimport escapeHTML from 'escape-html'\nimport { sanitizeUrl } from 'payload/shared'\n\nimport type {\n HTMLConvertersAsync,\n HTMLPopulateFn,\n} from '../../../features/converters/lexicalToHtml/async/types.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from '../../../nodeTypes.js'\n\nexport const LinkDiffHTMLConverterAsync: (args: {\n internalDocToHref?: (args: {\n linkNode: SerializedLinkNode\n populate?: HTMLPopulateFn\n }) => Promise<string> | string\n}) => HTMLConvertersAsync<SerializedAutoLinkNode | SerializedLinkNode> = ({\n internalDocToHref,\n}) => ({\n autolink: async ({ node, nodesToHTML, providedStyleTag }) => {\n const children = (\n await nodesToHTML({\n nodes: node.children,\n })\n ).join('')\n\n // hash fields to ensure they are diffed if they change\n const nodeFieldsHash = createHash('sha256').update(JSON.stringify(node.fields)).digest('hex')\n\n const href = escapeHTML(sanitizeUrl(node.fields.url ?? ''))\n\n return `<a${providedStyleTag} data-fields-hash=\"${nodeFieldsHash}\" data-enable-match=\"true\" href=\"${href}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>\n ${children}\n </a>`\n },\n link: async ({ node, nodesToHTML, populate, providedStyleTag }) => {\n const children = (\n await nodesToHTML({\n nodes: node.children,\n })\n ).join('')\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n if (internalDocToHref) {\n href = await internalDocToHref({ linkNode: node, populate })\n } else {\n // eslint-disable-next-line no-console\n console.error(\n 'Lexical => HTML converter: Link converter: found internal link, but internalDocToHref is not provided',\n )\n href = '#' // fallback\n }\n }\n\n // hash fields to ensure they are diffed if they change\n const nodeFieldsHash = createHash('sha256')\n .update(JSON.stringify(node.fields ?? {}))\n .digest('hex')\n\n const safeHref = escapeHTML(sanitizeUrl(href))\n\n return `<a${providedStyleTag} data-fields-hash=\"${nodeFieldsHash}\" data-enable-match=\"true\" href=\"${safeHref}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>\n ${children}\n </a>`\n },\n})\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,UAAA,MAAgB;AACvB,SAASC,WAAW,QAAQ;AAQ5B,OAAO,MAAMC,0B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IAAI,CAAC,IACtCC,MAAM,CAAC;IAEV,MAAMU,QAAA,GAAW1B,UAAA,CAAWC,WAAA,CAAYgB,IAAA;IAExC,OAAO,KAAKV,gBAAA,sBAAsCI,cAAA,oCAAkDe,QAAA,IAAYrB,IAAA,CAAKU,MAAM,CAACI,MAAM,GAAG,+CAA+C;UAC9KX,QAAA;WACC;EACT;AACF","ignoreList":[]}
1
+ {"version":3,"file":"link.js","names":["createHash","escapeHTML","sanitizeUrl","LinkDiffHTMLConverterAsync","internalDocToHref","autolink","node","nodesToHTML","providedStyleTag","children","nodes","join","nodeFieldsHash","update","JSON","stringify","fields","digest","href","url","newTab","link","populate","linkType","linkNode","console","error","safeHref"],"sources":["../../../../src/field/Diff/converters/link.ts"],"sourcesContent":["import { createHash } from 'crypto'\nimport escapeHTML from 'escape-html'\nimport { sanitizeUrl } from 'payload/shared'\n\nimport type {\n HTMLConvertersAsync,\n HTMLPopulateFn,\n} from '../../../features/converters/lexicalToHtml/async/types.js'\nimport type { SerializedAutoLinkNode, SerializedLinkNode } from '../../../types/nodeTypes.js'\n\nexport const LinkDiffHTMLConverterAsync: (args: {\n internalDocToHref?: (args: {\n linkNode: SerializedLinkNode\n populate?: HTMLPopulateFn\n }) => Promise<string> | string\n}) => HTMLConvertersAsync<SerializedAutoLinkNode | SerializedLinkNode> = ({\n internalDocToHref,\n}) => ({\n autolink: async ({ node, nodesToHTML, providedStyleTag }) => {\n const children = (\n await nodesToHTML({\n nodes: node.children,\n })\n ).join('')\n\n // hash fields to ensure they are diffed if they change\n const nodeFieldsHash = createHash('sha256').update(JSON.stringify(node.fields)).digest('hex')\n\n const href = escapeHTML(sanitizeUrl(node.fields.url ?? ''))\n\n return `<a${providedStyleTag} data-fields-hash=\"${nodeFieldsHash}\" data-enable-match=\"true\" href=\"${href}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>\n ${children}\n </a>`\n },\n link: async ({ node, nodesToHTML, populate, providedStyleTag }) => {\n const children = (\n await nodesToHTML({\n nodes: node.children,\n })\n ).join('')\n\n let href: string = node.fields.url ?? ''\n if (node.fields.linkType === 'internal') {\n if (internalDocToHref) {\n href = await internalDocToHref({ linkNode: node, populate })\n } else {\n // eslint-disable-next-line no-console\n console.error(\n 'Lexical => HTML converter: Link converter: found internal link, but internalDocToHref is not provided',\n )\n href = '#' // fallback\n }\n }\n\n // hash fields to ensure they are diffed if they change\n const nodeFieldsHash = createHash('sha256')\n .update(JSON.stringify(node.fields ?? {}))\n .digest('hex')\n\n const safeHref = escapeHTML(sanitizeUrl(href))\n\n return `<a${providedStyleTag} data-fields-hash=\"${nodeFieldsHash}\" data-enable-match=\"true\" href=\"${safeHref}\"${node.fields.newTab ? ' rel=\"noopener noreferrer\" target=\"_blank\"' : ''}>\n ${children}\n </a>`\n },\n})\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ;AAC3B,OAAOC,UAAA,MAAgB;AACvB,SAASC,WAAW,QAAQ;AAQ5B,OAAO,MAAMC,0BAAA,GAK4DA,CAAC;EACxEC;AAAiB,CAClB,MAAM;EACLC,QAAA,EAAU,MAAAA,CAAO;IAAEC,IAAI;IAAEC,WAAW;IAAEC;EAAgB,CAAE;IACtD,MAAMC,QAAA,GAAW,CACf,MAAMF,WAAA,CAAY;MAChBG,KAAA,EAAOJ,IAAA,CAAKG;IACd,EAAC,EACDE,IAAI,CAAC;IAEP;IACA,MAAMC,cAAA,GAAiBZ,UAAA,CAAW,UAAUa,MAAM,CAACC,IAAA,CAAKC,SAAS,CAACT,IAAA,CAAKU,MAAM,GAAGC,MAAM,CAAC;IAEvF,MAAMC,IAAA,GAAOjB,UAAA,CAAWC,WAAA,CAAYI,IAAA,CAAKU,MAAM,CAACG,GAAG,IAAI;IAEvD,OAAO,KAAKX,gBAAA,sBAAsCI,cAAA,oCAAkDM,IAAA,IAAQZ,IAAA,CAAKU,MAAM,CAACI,MAAM,GAAG,+CAA+C;UAC1KX,QAAA;WACC;EACT;EACAY,IAAA,EAAM,MAAAA,CAAO;IAAEf,IAAI;IAAEC,WAAW;IAAEe,QAAQ;IAAEd;EAAgB,CAAE;IAC5D,MAAMC,QAAA,GAAW,CACf,MAAMF,WAAA,CAAY;MAChBG,KAAA,EAAOJ,IAAA,CAAKG;IACd,EAAC,EACDE,IAAI,CAAC;IAEP,IAAIO,IAAA,GAAeZ,IAAA,CAAKU,MAAM,CAACG,GAAG,IAAI;IACtC,IAAIb,IAAA,CAAKU,MAAM,CAACO,QAAQ,KAAK,YAAY;MACvC,IAAInB,iBAAA,EAAmB;QACrBc,IAAA,GAAO,MAAMd,iBAAA,CAAkB;UAAEoB,QAAA,EAAUlB,IAAA;UAAMgB;QAAS;MAC5D,OAAO;QACL;QACAG,OAAA,CAAQC,KAAK,CACX;QAEFR,IAAA,GAAO,KAAI;MACb;IACF;IAEA;IACA,MAAMN,cAAA,GAAiBZ,UAAA,CAAW,UAC/Ba,MAAM,CAACC,IAAA,CAAKC,SAAS,CAACT,IAAA,CAAKU,MAAM,IAAI,CAAC,IACtCC,MAAM,CAAC;IAEV,MAAMU,QAAA,GAAW1B,UAAA,CAAWC,WAAA,CAAYgB,IAAA;IAExC,OAAO,KAAKV,gBAAA,sBAAsCI,cAAA,oCAAkDe,QAAA,IAAYrB,IAAA,CAAKU,MAAM,CAACI,MAAM,GAAG,+CAA+C;UAC9KX,QAAA;WACC;EACT;AACF","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  @layer payload-default {
2
2
  .lexical-diff {
3
3
  ul.list-check {
4
- padding-left: 0;
4
+ padding-inline-start: 0;
5
5
  }
6
6
 
7
7
  .checkboxItem {
@@ -16,7 +16,7 @@
16
16
  .checkboxItem__icon {
17
17
  width: var(--spacer-3);
18
18
  height: var(--spacer-3);
19
- margin-right: var(--spacer-2);
19
+ margin-inline-end: var(--spacer-2);
20
20
  border: var(--stroke-width-small) solid var(--color-text);
21
21
  border-radius: var(--radius-medium);
22
22
  display: flex;
@@ -24,12 +24,10 @@
24
24
  justify-content: center;
25
25
  pointer-events: none;
26
26
 
27
- .icon--check {
28
- height: var(--spacer-2-5);
29
- }
30
-
31
27
  &[data-match-type='create'] {
32
- border-color: var(--diff-create-pill-color);
28
+ background-color: var(--color-bg-brand-tertiary);
29
+ border-color: var(--color-border-brand-strong);
30
+ color: var(--color-text-brand);
33
31
  }
34
32
 
35
33
  &[data-match-type='delete'] {
@@ -37,8 +35,46 @@
37
35
  }
38
36
  }
39
37
 
38
+ /* Override HTMLDiff generic [data-match-type] styles - specificity must beat 0,4,1 from HTMLDiff */
39
+ .checkboxItem__icon.checkboxItem__icon[data-enable-match='true'][data-match-type='create'],
40
+ .checkboxItem__icon.checkboxItem__icon[data-enable-match='true'][data-match-type='delete'] {
41
+ border-radius: var(--radius-medium);
42
+ padding: 0;
43
+ }
44
+
45
+ .checkboxItem__icon.checkboxItem__icon[data-enable-match='true'][data-match-type='create'] {
46
+ background-color: var(--color-bg-brand-tertiary);
47
+ color: var(--color-text-brand);
48
+ }
49
+
50
+ .checkboxItem__icon.checkboxItem__icon[data-enable-match='true'][data-match-type='delete'] {
51
+ background-color: transparent;
52
+ color: var(--diff-delete-pill-color);
53
+ }
54
+
40
55
  .checkboxItem--nested {
41
- margin-left: var(--spacer-4);
56
+ margin-inline-start: var(--spacer-4);
57
+ }
58
+
59
+ /* Match editor's hierarchical ordered list numbering (1, A, a, I, i) */
60
+ ol.list-number {
61
+ list-style-type: decimal;
62
+ }
63
+
64
+ ol.list-number ol.list-number {
65
+ list-style-type: upper-alpha;
66
+ }
67
+
68
+ ol.list-number ol.list-number ol.list-number {
69
+ list-style-type: lower-alpha;
70
+ }
71
+
72
+ ol.list-number ol.list-number ol.list-number ol.list-number {
73
+ list-style-type: upper-roman;
74
+ }
75
+
76
+ ol.list-number ol.list-number ol.list-number ol.list-number ol.list-number {
77
+ list-style-type: lower-roman;
42
78
  }
43
79
  }
44
80
  }
@@ -1,5 +1,5 @@
1
1
  import type { HTMLConvertersAsync } from '../../../../features/converters/lexicalToHtml/async/types.js';
2
- import type { SerializedListItemNode } from '../../../../nodeTypes.js';
2
+ import type { SerializedListItemNode } from '../../../../types/nodeTypes.js';
3
3
  import './index.css';
4
4
  export declare const ListItemDiffHTMLConverterAsync: HTMLConvertersAsync<SerializedListItemNode>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/Diff/converters/listitem/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEtE,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,8BAA8B,EAAE,mBAAmB,CAAC,sBAAsB,CA+DtF,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/Diff/converters/listitem/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,aAAa,CAAA;AAEpB,eAAO,MAAM,8BAA8B,EAAE,mBAAmB,CAAC,sBAAsB,CA+DtF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CheckIcon","ListItemDiffHTMLConverterAsync","listitem","node","nodesToHTML","parent","providedCSSString","hasSubLists","children","some","child","type","nodes","join","listType","ReactDOMServer","default","JSX","_jsx","checked","className","role","tabIndex","value","dangerouslySetInnerHTML","__html","_jsxs","html","renderToStaticMarkup","styleIndex","indexOf","classIndex","classEndIndex","substring","classNameWithStyle","htmlWithStyle","replace"],"sources":["../../../../../src/field/Diff/converters/listitem/index.tsx"],"sourcesContent":["import { CheckIcon } from '@payloadcms/ui/rsc'\n\nimport type { HTMLConvertersAsync } from '../../../../features/converters/lexicalToHtml/async/types.js'\nimport type { SerializedListItemNode } from '../../../../nodeTypes.js'\n\nimport './index.css'\n\nexport const ListItemDiffHTMLConverterAsync: HTMLConvertersAsync<SerializedListItemNode> = {\n listitem: async ({ node, nodesToHTML, parent, providedCSSString }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const children = (\n await nodesToHTML({\n nodes: node.children,\n })\n ).join('')\n\n if ('listType' in parent && parent?.listType === 'check') {\n const ReactDOMServer = (await import('react-dom/server')).default\n\n const JSX = (\n <li\n aria-checked={node.checked ? true : false}\n className={`checkboxItem ${node.checked ? 'checkboxItem--checked' : 'checkboxItem--unchecked'}${\n hasSubLists ? ' checkboxItem--nested' : ''\n }`}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"checkbox\"\n tabIndex={-1}\n value={node.value}\n >\n {hasSubLists ? (\n // When sublists exist, just render them safely as HTML\n <div dangerouslySetInnerHTML={{ __html: children }} />\n ) : (\n // Otherwise, show our custom styled checkbox\n <div className=\"checkboxItem__wrapper\">\n <div\n className=\"checkboxItem__icon\"\n data-checked={node.checked}\n data-enable-match=\"true\"\n >\n {node.checked && <CheckIcon />}\n </div>\n <span className=\"checkboxItem__label\">{children}</span>\n </div>\n )}\n </li>\n )\n\n const html = ReactDOMServer.renderToStaticMarkup(JSX)\n\n // Add style=\"list-style-type: none;${providedCSSString}\" to html\n const styleIndex = html.indexOf('class=\"list-item-checkbox')\n const classIndex = html.indexOf('class=\"list-item-checkbox', styleIndex)\n const classEndIndex = html.indexOf('\"', classIndex + 6)\n const className = html.substring(classIndex, classEndIndex)\n const classNameWithStyle = `${className} style=\"list-style-type: none;${providedCSSString}\"`\n const htmlWithStyle = html.replace(className, classNameWithStyle)\n\n return htmlWithStyle\n } else {\n return `<li\n class=\"${hasSubLists ? 'nestedListItem' : ''}\"\n style=\"${hasSubLists ? `list-style-type: none;${providedCSSString}` : providedCSSString}\"\n value=\"${node.value}\"\n data-enable-match=\"true\"\n >${children}</li>`\n }\n },\n}\n"],"mapp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AaF,IAAA,CAAKG,OAAO,CAAC;MAChC,MAAMC,UAAA,GAAaJ,IAAA,CAAKG,OAAO,CAAC,6BAA6BD,UAAA;MAC7D,MAAMG,aAAA,GAAgBL,IAAA,CAAKG,OAAO,CAAC,KAAKC,UAAA,GAAa;MACrD,MAAMX,SAAA,GAAYO,IAAA,CAAKM,SAAS,CAACF,UAAA,EAAYC,aAAA;MAC7C,MAAME,kBAAA,GAAqB,GAAGd,SAAA,iCAA0Cd,iBAAA,GAAoB;MAC5F,MAAM6B,aAAA,GAAgBR,IAAA,CAAKS,OAAO,CAAChB,SAAA,EAAWc,kBAAA;MAE9C,OAAOC,aAAA;IACT,OAAO;MACL,OAAO;mBACM5B,WAAA,GAAc,mBAAmB;mBACjCA,WAAA,GAAc,yBAAyBD,iBAAA,EAAmB,GAAGA,iBAAA;mBAC7DH,IAAA,CAAKoB,KAAK;;WAElBf,QAAA,OAAe;IACtB;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["CheckIcon","ListItemDiffHTMLConverterAsync","listitem","node","nodesToHTML","parent","providedCSSString","hasSubLists","children","some","child","type","nodes","join","listType","ReactDOMServer","default","JSX","_jsx","checked","className","role","tabIndex","value","dangerouslySetInnerHTML","__html","_jsxs","html","renderToStaticMarkup","styleIndex","indexOf","classIndex","classEndIndex","substring","classNameWithStyle","htmlWithStyle","replace"],"sources":["../../../../../src/field/Diff/converters/listitem/index.tsx"],"sourcesContent":["import { CheckIcon } from '@payloadcms/ui/rsc'\n\nimport type { HTMLConvertersAsync } from '../../../../features/converters/lexicalToHtml/async/types.js'\nimport type { SerializedListItemNode } from '../../../../types/nodeTypes.js'\n\nimport './index.css'\n\nexport const ListItemDiffHTMLConverterAsync: HTMLConvertersAsync<SerializedListItemNode> = {\n listitem: async ({ node, nodesToHTML, parent, providedCSSString }) => {\n const hasSubLists = node.children.some((child) => child.type === 'list')\n\n const children = (\n await nodesToHTML({\n nodes: node.children,\n })\n ).join('')\n\n if ('listType' in parent && parent?.listType === 'check') {\n const ReactDOMServer = (await import('react-dom/server')).default\n\n const JSX = (\n <li\n aria-checked={node.checked ? true : false}\n className={`checkboxItem ${node.checked ? 'checkboxItem--checked' : 'checkboxItem--unchecked'}${\n hasSubLists ? ' checkboxItem--nested' : ''\n }`}\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n role=\"checkbox\"\n tabIndex={-1}\n value={node.value}\n >\n {hasSubLists ? (\n // When sublists exist, just render them safely as HTML\n <div dangerouslySetInnerHTML={{ __html: children }} />\n ) : (\n // Otherwise, show our custom styled checkbox\n <div className=\"checkboxItem__wrapper\">\n <div\n className=\"checkboxItem__icon\"\n data-checked={node.checked}\n data-enable-match=\"true\"\n >\n {node.checked && <CheckIcon />}\n </div>\n <span className=\"checkboxItem__label\">{children}</span>\n </div>\n )}\n </li>\n )\n\n const html = ReactDOMServer.renderToStaticMarkup(JSX)\n\n // Add style=\"list-style-type: none;${providedCSSString}\" to html\n const styleIndex = html.indexOf('class=\"list-item-checkbox')\n const classIndex = html.indexOf('class=\"list-item-checkbox', styleIndex)\n const classEndIndex = html.indexOf('\"', classIndex + 6)\n const className = html.substring(classIndex, classEndIndex)\n const classNameWithStyle = `${className} style=\"list-style-type: none;${providedCSSString}\"`\n const htmlWithStyle = html.replace(className, classNameWithStyle)\n\n return htmlWithStyle\n } else {\n return `<li\n class=\"${hasSubLists ? 'nestedListItem' : ''}\"\n style=\"${hasSubLists ? `list-style-type: none;${providedCSSString}` : providedCSSString}\"\n value=\"${node.value}\"\n data-enable-match=\"true\"\n >${children}</li>`\n }\n },\n}\n"],"mappings":";AAAA,SAASA,SAAS,QAAQ;AAK1B,OAAO;AAEP,OAAO,MAAMC,8BAAA,GAA8E;EACzFC,QAAA,EAAU,MAAAA,CAAO;IAAEC,IAAI;IAAEC,WAAW;IAAEC,MAAM;IAAEC;EAAiB,CAAE;IAC/D,MAAMC,WAAA,GAAcJ,IAAA,CAAKK,QAAQ,CAACC,IAAI,CAAE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C,aAAA;MAC7C,MAAME,kBAAA,GAAqB,GAAGd,SAAA,iCAA0Cd,iBAAA,GAAoB;MAC5F,MAAM6B,aAAA,GAAgBR,IAAA,CAAKS,OAAO,CAAChB,SAAA,EAAWc,kBAAA;MAE9C,OAAOC,aAAA;IACT,OAAO;MACL,OAAO;mBACM5B,WAAA,GAAc,mBAAmB;mBACjCA,WAAA,GAAc,yBAAyBD,iBAAA,EAAmB,GAAGA,iBAAA;mBAC7DH,IAAA,CAAKoB,KAAK;;WAElBf,QAAA,OAAe;IACtB;EACF;AACF","ignoreList":[]}
@@ -1,68 +1,108 @@
1
1
  @layer payload-default {
2
2
  .lexical-diff .lexical-relationship-diff {
3
- box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
4
- min-width: calc(var(--spacer-5) * 5);
5
3
  max-width: fit-content;
6
-
7
- display: flex;
4
+ display: inline-flex;
8
5
  align-items: center;
9
- background-color: var(--color-bg);
6
+ background-color: var(--color-bg-brand-tertiary);
7
+ outline: var(--stroke-width-small) solid var(--color-border-brand);
8
+ outline-offset: calc(var(--stroke-width-small) * -1);
10
9
  border-radius: var(--radius-medium);
11
- border: var(--stroke-width-small) solid var(--color-border);
12
10
  position: relative;
13
- font-family: var(--font-body);
14
- margin-block: calc(var(--spacer-1) * 2.5);
15
- max-height: calc(var(--spacer-5) * 2.5);
16
- padding: var(--spacer-2-5);
11
+ z-index: 2;
12
+ font-family: var(--text-body-medium-font-family);
13
+ font-size: var(--text-body-medium-font-size);
14
+ font-weight: var(--text-body-medium-font-weight);
15
+ line-height: var(--text-body-medium-line-height);
16
+ margin-block: var(--spacer-2);
17
+ padding: var(--spacer-1);
17
18
 
18
19
  &[data-match-type='create'] {
19
- border-color: var(--diff-create-pill-border);
20
- color: var(--diff-create-parent-color);
20
+ background-color: var(--diff-create-parent-bg);
21
+ outline-color: var(--diff-create-pill-border);
21
22
 
22
- .lexical-relationship-diff__collectionLabel {
23
- color: var(--diff-create-link-color);
23
+ .lexical-relationship-diff__pill {
24
+ background-color: var(--color-bg-brand);
25
+ color: var(--color-text-onbrand);
24
26
  }
25
27
 
26
- .lexical-relationship-diff__title * {
28
+ .lexical-relationship-diff__info {
27
29
  color: var(--diff-create-parent-color);
28
30
  }
29
31
  }
30
32
 
31
33
  &[data-match-type='delete'] {
32
- border-color: var(--diff-delete-pill-border);
33
- color: var(--diff-delete-parent-color);
34
+ background-color: var(--diff-delete-parent-bg);
35
+ outline-color: var(--diff-delete-pill-border);
34
36
  text-decoration-line: none;
35
- background-color: var(--diff-delete-pill-bg);
36
37
 
37
- .lexical-relationship-diff__collectionLabel {
38
- color: var(--diff-delete-link-color);
38
+ .lexical-relationship-diff__pill {
39
+ background-color: var(--color-bg-danger);
40
+ color: var(--color-text-oncomponent);
41
+
42
+ * {
43
+ text-decoration-line: none;
44
+ color: var(--color-text-oncomponent);
45
+ background-color: transparent;
46
+ }
39
47
  }
40
48
 
41
- * {
42
- text-decoration-line: none;
43
- color: var(--diff-delete-parent-color);
49
+ .lexical-relationship-diff__info {
50
+ color: var(--color-text-danger);
51
+ text-decoration-line: line-through;
44
52
  }
45
53
  }
46
54
  }
47
55
 
48
- .lexical-diff .lexical-relationship-diff__card {
49
- display: flex;
50
- flex-direction: column;
51
- width: 100%;
52
- flex-grow: 1;
53
- align-items: flex-start;
54
- justify-content: space-between;
56
+ /* Override HTMLDiff generic [data-match-type] styles - specificity must beat 0,4,1 from HTMLDiff */
57
+ .html-diff
58
+ .lexical-relationship-diff.lexical-relationship-diff[data-enable-match='true'][data-match-type='create'],
59
+ .html-diff
60
+ .lexical-relationship-diff.lexical-relationship-diff[data-enable-match='true'][data-match-type='delete'] {
61
+ border-radius: var(--radius-medium);
62
+ padding: var(--spacer-1);
63
+ text-decoration-line: none;
64
+ }
65
+
66
+ .html-diff
67
+ .lexical-relationship-diff.lexical-relationship-diff[data-enable-match='true'][data-match-type='create'] {
68
+ background-color: var(--diff-create-parent-bg);
69
+ outline-color: var(--diff-create-pill-border);
70
+ color: var(--diff-create-parent-color);
55
71
  }
56
72
 
57
- .lexical-diff .lexical-relationship-diff__title {
58
- display: flex;
59
- flex-direction: row;
60
- font-weight: 600;
73
+ .html-diff
74
+ .lexical-relationship-diff.lexical-relationship-diff[data-enable-match='true'][data-match-type='delete'] {
75
+ background-color: var(--diff-delete-parent-bg);
76
+ outline-color: var(--diff-delete-pill-border);
61
77
  }
62
78
 
63
- .lexical-diff .lexical-relationship-diff__collectionLabel {
79
+ .lexical-diff .lexical-relationship-diff__pill {
80
+ display: inline-flex;
81
+ align-items: center;
82
+ border-radius: var(--radius-medium);
83
+ padding-inline: var(--spacer-1);
84
+ background-color: var(--color-bg-brand);
85
+ color: var(--color-text-onbrand);
86
+ white-space: nowrap;
87
+ flex-shrink: 0;
88
+ }
89
+
90
+ .lexical-diff .lexical-relationship-diff__info {
91
+ padding-inline: var(--spacer-1);
92
+ font-weight: var(--text-body-medium-font-weight);
93
+ color: var(--color-text-brand);
94
+ white-space: nowrap;
64
95
  overflow: hidden;
65
96
  text-overflow: ellipsis;
66
- white-space: nowrap;
97
+ }
98
+
99
+ @media (max-width: 768px) {
100
+ .lexical-diff .html-diff .lexical-relationship-diff {
101
+ max-width: unset;
102
+ display: flex;
103
+ border-radius: 0;
104
+ outline: none;
105
+ margin: 0;
106
+ }
67
107
  }
68
108
  }
@@ -2,7 +2,7 @@ import type { PayloadRequest } from 'payload';
2
2
  import { type I18nClient } from '@payloadcms/translations';
3
3
  import './index.css';
4
4
  import type { HTMLConvertersAsync } from '../../../../features/converters/lexicalToHtml/async/types.js';
5
- import type { SerializedRelationshipNode } from '../../../../nodeTypes.js';
5
+ import type { SerializedRelationshipNode } from '../../../../types/nodeTypes.js';
6
6
  export declare const RelationshipDiffHTMLConverterAsync: (args: {
7
7
  i18n: I18nClient;
8
8
  req: PayloadRequest;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/Diff/converters/relationship/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,cAAc,EAAc,MAAM,SAAS,CAAA;AAEnE,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1E,OAAO,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AACvG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAA;AAI1E,eAAO,MAAM,kCAAkC,EAAE,CAAC,IAAI,EAAE;IACtD,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,KAAK,mBAAmB,CAAC,0BAA0B,CAsEnD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/field/Diff/converters/relationship/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,cAAc,EAAc,MAAM,SAAS,CAAA;AAEnE,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1E,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAA;AACvG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AAIhF,eAAO,MAAM,kCAAkC,EAAE,CAAC,IAAI,EAAE;IACtD,IAAI,EAAE,UAAU,CAAA;IAChB,GAAG,EAAE,cAAc,CAAA;CACpB,KAAK,mBAAmB,CAAC,0BAA0B,CAoDnD,CAAA"}