@payloadcms/richtext-lexical 3.0.0-beta.25 → 3.0.0-beta.26

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 (176) hide show
  1. package/dist/exports/components.d.ts +5 -0
  2. package/dist/exports/components.d.ts.map +1 -1
  3. package/dist/exports/components.js +5 -0
  4. package/dist/exports/components.js.map +1 -1
  5. package/dist/field/features/blockquote/feature.client.d.ts +1 -1
  6. package/dist/field/features/blockquote/feature.client.js +2 -2
  7. package/dist/field/features/blockquote/feature.client.js.map +1 -1
  8. package/dist/field/features/blockquote/feature.server.d.ts +1 -1
  9. package/dist/field/features/blockquote/feature.server.js +3 -3
  10. package/dist/field/features/blockquote/feature.server.js.map +1 -1
  11. package/dist/field/features/blocks/feature.server.d.ts +2 -5
  12. package/dist/field/features/blocks/feature.server.d.ts.map +1 -1
  13. package/dist/field/features/blocks/feature.server.js +2 -2
  14. package/dist/field/features/blocks/feature.server.js.map +1 -1
  15. package/dist/field/features/blocks/plugin/index.d.ts +3 -2
  16. package/dist/field/features/blocks/plugin/index.d.ts.map +1 -1
  17. package/dist/field/features/blocks/plugin/index.js +2 -2
  18. package/dist/field/features/blocks/plugin/index.js.map +1 -1
  19. package/dist/field/features/debug/testRecorder/plugin/index.d.ts +2 -2
  20. package/dist/field/features/debug/testRecorder/plugin/index.d.ts.map +1 -1
  21. package/dist/field/features/debug/testRecorder/plugin/index.js.map +1 -1
  22. package/dist/field/features/debug/treeView/plugin/index.d.ts +2 -2
  23. package/dist/field/features/debug/treeView/plugin/index.d.ts.map +1 -1
  24. package/dist/field/features/debug/treeView/plugin/index.js +2 -2
  25. package/dist/field/features/debug/treeView/plugin/index.js.map +1 -1
  26. package/dist/field/features/horizontalRule/plugin/index.d.ts +2 -1
  27. package/dist/field/features/horizontalRule/plugin/index.d.ts.map +1 -1
  28. package/dist/field/features/horizontalRule/plugin/index.js +2 -2
  29. package/dist/field/features/horizontalRule/plugin/index.js.map +1 -1
  30. package/dist/field/features/link/drawer/baseFields.d.ts +2 -2
  31. package/dist/field/features/link/drawer/baseFields.d.ts.map +1 -1
  32. package/dist/field/features/link/drawer/baseFields.js +2 -1
  33. package/dist/field/features/link/drawer/baseFields.js.map +1 -1
  34. package/dist/field/features/link/drawer/types.d.ts +2 -2
  35. package/dist/field/features/link/drawer/types.d.ts.map +1 -1
  36. package/dist/field/features/link/drawer/types.js.map +1 -1
  37. package/dist/field/features/link/feature.client.d.ts.map +1 -1
  38. package/dist/field/features/link/feature.client.js +11 -1
  39. package/dist/field/features/link/feature.client.js.map +1 -1
  40. package/dist/field/features/link/feature.server.d.ts +10 -3
  41. package/dist/field/features/link/feature.server.d.ts.map +1 -1
  42. package/dist/field/features/link/feature.server.js +3 -3
  43. package/dist/field/features/link/feature.server.js.map +1 -1
  44. package/dist/field/features/link/plugins/autoLink/index.d.ts +3 -2
  45. package/dist/field/features/link/plugins/autoLink/index.d.ts.map +1 -1
  46. package/dist/field/features/link/plugins/autoLink/index.js +2 -2
  47. package/dist/field/features/link/plugins/autoLink/index.js.map +1 -1
  48. package/dist/field/features/link/plugins/clickableLink/index.d.ts +3 -2
  49. package/dist/field/features/link/plugins/clickableLink/index.d.ts.map +1 -1
  50. package/dist/field/features/link/plugins/clickableLink/index.js +2 -2
  51. package/dist/field/features/link/plugins/clickableLink/index.js.map +1 -1
  52. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.d.ts.map +1 -1
  53. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js +75 -68
  54. package/dist/field/features/link/plugins/floatingLinkEditor/LinkEditor/index.js.map +1 -1
  55. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts +3 -4
  56. package/dist/field/features/link/plugins/floatingLinkEditor/index.d.ts.map +1 -1
  57. package/dist/field/features/link/plugins/floatingLinkEditor/index.js.map +1 -1
  58. package/dist/field/features/link/plugins/floatingLinkEditor/index.scss +2 -2
  59. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts +3 -3
  60. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.d.ts.map +1 -1
  61. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js +2 -2
  62. package/dist/field/features/link/plugins/floatingLinkEditor/utilities.js.map +1 -1
  63. package/dist/field/features/link/plugins/link/index.d.ts +3 -1
  64. package/dist/field/features/link/plugins/link/index.d.ts.map +1 -1
  65. package/dist/field/features/link/plugins/link/index.js +2 -2
  66. package/dist/field/features/link/plugins/link/index.js.map +1 -1
  67. package/dist/field/features/link/validate.js.map +1 -1
  68. package/dist/field/features/lists/checklist/plugin/index.d.ts +2 -2
  69. package/dist/field/features/lists/checklist/plugin/index.d.ts.map +1 -1
  70. package/dist/field/features/lists/checklist/plugin/index.js +2 -2
  71. package/dist/field/features/lists/checklist/plugin/index.js.map +1 -1
  72. package/dist/field/features/lists/plugin/index.d.ts +2 -2
  73. package/dist/field/features/lists/plugin/index.d.ts.map +1 -1
  74. package/dist/field/features/lists/plugin/index.js +2 -2
  75. package/dist/field/features/lists/plugin/index.js.map +1 -1
  76. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.d.ts +1 -1
  77. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js +1 -1
  78. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/client.js.map +1 -1
  79. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js +2 -2
  80. package/dist/field/features/migrations/slateToLexical/converter/converters/blockquote/index.js.map +1 -1
  81. package/dist/field/features/relationship/feature.client.d.ts.map +1 -1
  82. package/dist/field/features/relationship/feature.client.js +1 -5
  83. package/dist/field/features/relationship/feature.client.js.map +1 -1
  84. package/dist/field/features/relationship/feature.server.d.ts +10 -1
  85. package/dist/field/features/relationship/feature.server.d.ts.map +1 -1
  86. package/dist/field/features/relationship/feature.server.js +2 -2
  87. package/dist/field/features/relationship/feature.server.js.map +1 -1
  88. package/dist/field/features/relationship/nodes/components/RelationshipComponent.d.ts.map +1 -1
  89. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js +4 -2
  90. package/dist/field/features/relationship/nodes/components/RelationshipComponent.js.map +1 -1
  91. package/dist/field/features/relationship/plugins/index.d.ts +2 -2
  92. package/dist/field/features/relationship/plugins/index.d.ts.map +1 -1
  93. package/dist/field/features/relationship/plugins/index.js +6 -6
  94. package/dist/field/features/relationship/plugins/index.js.map +1 -1
  95. package/dist/field/features/relationship/populationPromise.d.ts +2 -1
  96. package/dist/field/features/relationship/populationPromise.d.ts.map +1 -1
  97. package/dist/field/features/relationship/populationPromise.js +25 -21
  98. package/dist/field/features/relationship/populationPromise.js.map +1 -1
  99. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts +2 -4
  100. package/dist/field/features/toolbars/fixed/Toolbar/index.d.ts.map +1 -1
  101. package/dist/field/features/toolbars/fixed/Toolbar/index.js +2 -2
  102. package/dist/field/features/toolbars/fixed/Toolbar/index.js.map +1 -1
  103. package/dist/field/features/toolbars/fixed/Toolbar/index.scss +2 -2
  104. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts +2 -4
  105. package/dist/field/features/toolbars/inline/Toolbar/index.d.ts.map +1 -1
  106. package/dist/field/features/toolbars/inline/Toolbar/index.js +25 -7
  107. package/dist/field/features/toolbars/inline/Toolbar/index.js.map +1 -1
  108. package/dist/field/features/toolbars/inline/Toolbar/index.scss +1 -1
  109. package/dist/field/features/toolbars/shared/ToolbarButton/index.d.ts.map +1 -1
  110. package/dist/field/features/toolbars/shared/ToolbarButton/index.js +12 -3
  111. package/dist/field/features/toolbars/shared/ToolbarButton/index.js.map +1 -1
  112. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.d.ts.map +1 -1
  113. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js +11 -3
  114. package/dist/field/features/toolbars/shared/ToolbarDropdown/DropDown.js.map +1 -1
  115. package/dist/field/features/types.d.ts +20 -12
  116. package/dist/field/features/types.d.ts.map +1 -1
  117. package/dist/field/features/types.js.map +1 -1
  118. package/dist/field/features/upload/component/index.d.ts.map +1 -1
  119. package/dist/field/features/upload/component/index.js +6 -2
  120. package/dist/field/features/upload/component/index.js.map +1 -1
  121. package/dist/field/features/upload/feature.server.d.ts +10 -3
  122. package/dist/field/features/upload/feature.server.d.ts.map +1 -1
  123. package/dist/field/features/upload/feature.server.js +2 -2
  124. package/dist/field/features/upload/feature.server.js.map +1 -1
  125. package/dist/field/features/upload/nodes/UploadNode.d.ts.map +1 -1
  126. package/dist/field/features/upload/nodes/UploadNode.js +18 -2
  127. package/dist/field/features/upload/nodes/UploadNode.js.map +1 -1
  128. package/dist/field/features/upload/plugin/index.d.ts +3 -2
  129. package/dist/field/features/upload/plugin/index.d.ts.map +1 -1
  130. package/dist/field/features/upload/plugin/index.js +2 -2
  131. package/dist/field/features/upload/plugin/index.js.map +1 -1
  132. package/dist/field/features/upload/populationPromise.d.ts.map +1 -1
  133. package/dist/field/features/upload/populationPromise.js +2 -1
  134. package/dist/field/features/upload/populationPromise.js.map +1 -1
  135. package/dist/field/features/upload/validate.d.ts.map +1 -1
  136. package/dist/field/features/upload/validate.js +3 -0
  137. package/dist/field/features/upload/validate.js.map +1 -1
  138. package/dist/field/lexical/EditorPlugin.d.ts +1 -0
  139. package/dist/field/lexical/EditorPlugin.d.ts.map +1 -1
  140. package/dist/field/lexical/EditorPlugin.js +6 -3
  141. package/dist/field/lexical/EditorPlugin.js.map +1 -1
  142. package/dist/field/lexical/LexicalEditor.d.ts.map +1 -1
  143. package/dist/field/lexical/LexicalEditor.js +5 -0
  144. package/dist/field/lexical/LexicalEditor.js.map +1 -1
  145. package/dist/field/lexical/config/client/sanitize.d.ts.map +1 -1
  146. package/dist/field/lexical/config/client/sanitize.js +1 -0
  147. package/dist/field/lexical/config/client/sanitize.js.map +1 -1
  148. package/dist/field/lexical/config/server/default.js +2 -2
  149. package/dist/field/lexical/config/server/default.js.map +1 -1
  150. package/dist/field/lexical/config/server/loader.d.ts +2 -1
  151. package/dist/field/lexical/config/server/loader.d.ts.map +1 -1
  152. package/dist/field/lexical/config/server/loader.js +2 -1
  153. package/dist/field/lexical/config/server/loader.js.map +1 -1
  154. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts +1 -1
  155. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.d.ts.map +1 -1
  156. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js +2 -2
  157. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/getNodeCloseToPoint.js.map +1 -1
  158. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.d.ts.map +1 -1
  159. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js +6 -3
  160. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.js.map +1 -1
  161. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/index.scss +8 -0
  162. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.d.ts.map +1 -1
  163. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js +25 -6
  164. package/dist/field/lexical/plugins/handles/DraggableBlockPlugin/setTargetLine.js.map +1 -1
  165. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts +11 -1
  166. package/dist/field/lexical/utils/setFloatingElemPosition.d.ts.map +1 -1
  167. package/dist/field/lexical/utils/setFloatingElemPosition.js +3 -2
  168. package/dist/field/lexical/utils/setFloatingElemPosition.js.map +1 -1
  169. package/dist/index.d.ts +3 -4
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +3 -3
  172. package/dist/index.js.map +1 -1
  173. package/dist/types.d.ts +2 -1
  174. package/dist/types.d.ts.map +1 -1
  175. package/dist/types.js.map +1 -1
  176. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/lexical/utils/setFloatingElemPosition.ts"],"sourcesContent":["const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\n// TODO: needs refactoring\n// This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.\n// So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).\n// This is used for positioning the floating toolbar (anchor: richtext editor) and its caret (anchor: floating toolbar)\nexport function setFloatingElemPosition(\n targetRect: ClientRect | null,\n floatingElem: HTMLElement,\n anchorElem: HTMLElement,\n horizontalPosition: 'center' | 'left' = 'left',\n verticalGap: number = VERTICAL_GAP,\n horizontalOffset: number = HORIZONTAL_OFFSET,\n specialHandlingForCaret = false,\n anchorFlippedOffset = 0, // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n): number {\n // Returns the top offset if the target was flipped\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - floatingElemRect.height - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (horizontalPosition === 'center') {\n // Calculate left to position floatingElem to the horizontal middle of targetRect\n left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2\n }\n\n let addedToTop = 0\n if (top < editorScrollerRect.top && !specialHandlingForCaret) {\n addedToTop = floatingElemRect.height + targetRect.height + verticalGap * 2\n\n top += addedToTop\n }\n\n if (horizontalPosition === 'center') {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n } else if (left < editorScrollerRect.left) {\n left = editorScrollerRect.left + horizontalOffset\n }\n } else {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n }\n\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n\n if (specialHandlingForCaret && anchorFlippedOffset !== 0) {\n // Floating select toolbar was flipped (positioned below text rather than above). Thus, the caret now needs to be positioned\n // on the other side and rotated.\n top -= anchorElementRect.bottom - anchorFlippedOffset + floatingElemRect.height - 3\n // top += anchorFlippedOffset - anchorElementRect.height - floatingElemRect.height + 2\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else {\n top -= anchorElementRect.top\n\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n }\n\n return addedToTop\n}\n"],"names":["VERTICAL_GAP","HORIZONTAL_OFFSET","setFloatingElemPosition","targetRect","floatingElem","anchorElem","horizontalPosition","verticalGap","horizontalOffset","specialHandlingForCaret","anchorFlippedOffset","scrollerElem","parentElement","style","opacity","transform","floatingElemRect","getBoundingClientRect","anchorElementRect","editorScrollerRect","top","height","left","width","addedToTop","right","bottom"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,MAAMA,eAAe;AACrB,MAAMC,oBAAoB;AAE1B,0BAA0B;AAC1B,iJAAiJ;AACjJ,4JAA4J;AAC5J,uHAAuH;AACvH,OAAO,SAASC,wBACdC,UAA6B,EAC7BC,YAAyB,EACzBC,UAAuB,EACvBC,qBAAwC,MAAM,EAC9CC,cAAsBP,YAAY,EAClCQ,mBAA2BP,iBAAiB,EAC5CQ,0BAA0B,KAAK,EAC/BC,sBAAsB,CAAC;IAEvB,mDAAmD;IACnD,MAAMC,eAAeN,WAAWO,aAAa;IAE7C,IAAIT,eAAe,QAAQQ,gBAAgB,MAAM;QAC/CP,aAAaS,KAAK,CAACC,OAAO,GAAG;QAC7BV,aAAaS,KAAK,CAACE,SAAS,GAAG;QAC/B;IACF;IAEA,MAAMC,mBAAmBZ,aAAaa,qBAAqB;IAC3D,MAAMC,oBAAoBb,WAAWY,qBAAqB;IAC1D,MAAME,qBAAqBR,aAAaM,qBAAqB;IAE7D,IAAIG,MAAMjB,WAAWiB,GAAG,GA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AC;IACjE;IAEA,OAAOI;AACT"}
1
+ {"version":3,"sources":["../../../../src/field/lexical/utils/setFloatingElemPosition.ts"],"sourcesContent":["const VERTICAL_GAP = 10\nconst HORIZONTAL_OFFSET = 5\n\n// TODO: needs refactoring\n// This is supposed to position the floatingElem based on the parent (anchorElem) and the target (targetRect) which is usually the selected text.\n// So basically, it positions the floatingElem either below or above the target (targetRect) and aligns it to the left or center of the target (targetRect).\n// This is used for positioning the floating toolbar (anchor: richtext editor) and its caret (anchor: floating toolbar)\nexport function setFloatingElemPosition(args: {\n alwaysDisplayOnTop?: boolean\n anchorElem: HTMLElement\n anchorFlippedOffset?: number // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem: HTMLElement\n horizontalOffset?: number\n horizontalPosition?: 'center' | 'left'\n specialHandlingForCaret?: boolean\n targetRect: ClientRect | null\n verticalGap?: number\n}): number {\n const {\n alwaysDisplayOnTop = false,\n anchorElem,\n anchorFlippedOffset = 0, // Offset which was added to the anchor (for caret, floating toolbar) if it was flipped\n floatingElem,\n horizontalOffset = HORIZONTAL_OFFSET,\n horizontalPosition = 'left',\n specialHandlingForCaret = false,\n targetRect,\n verticalGap = VERTICAL_GAP,\n } = args\n // Returns the top offset if the target was flipped\n const scrollerElem = anchorElem.parentElement\n\n if (targetRect === null || scrollerElem == null) {\n floatingElem.style.opacity = '0'\n floatingElem.style.transform = 'translate(-10000px, -10000px)'\n return\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect()\n const anchorElementRect = anchorElem.getBoundingClientRect()\n const editorScrollerRect = scrollerElem.getBoundingClientRect()\n\n let top = targetRect.top - floatingElemRect.height - verticalGap\n let left = targetRect.left - horizontalOffset\n\n if (horizontalPosition === 'center') {\n // Calculate left to position floatingElem to the horizontal middle of targetRect\n left = targetRect.left + targetRect.width / 2 - floatingElemRect.width / 2\n }\n\n let addedToTop = 0\n if (!alwaysDisplayOnTop && top < editorScrollerRect.top && !specialHandlingForCaret) {\n addedToTop = floatingElemRect.height + targetRect.height + verticalGap * 2\n\n top += addedToTop\n }\n\n if (horizontalPosition === 'center') {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n } else if (left < editorScrollerRect.left) {\n left = editorScrollerRect.left + horizontalOffset\n }\n } else {\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset\n }\n }\n\n left -= anchorElementRect.left\n\n floatingElem.style.opacity = '1'\n\n if (specialHandlingForCaret && anchorFlippedOffset !== 0) {\n // Floating select toolbar was flipped (positioned below text rather than above). Thus, the caret now needs to be positioned\n // on the other side and rotated.\n top -= anchorElementRect.bottom - anchorFlippedOffset + floatingElemRect.height - 3\n // top += anchorFlippedOffset - anchorElementRect.height - floatingElemRect.height + 2\n floatingElem.style.transform = `translate(${left}px, ${top}px) rotate(180deg)`\n } else {\n top -= anchorElementRect.top\n\n floatingElem.style.transform = `translate(${left}px, ${top}px)`\n }\n\n return addedToTop\n}\n"],"names":["VERTICAL_GAP","HORIZONTAL_OFFSET","setFloatingElemPosition","args","alwaysDisplayOnTop","anchorElem","anchorFlippedOffset","floatingElem","horizontalOffset","horizontalPosition","specialHandlingForCaret","targetRect","verticalGap","scrollerElem","parentElement","style","opacity","transform","floatingElemRect","getBoundingClientRect","anchorElementRect","editorScrollerRect","top","height","left","width","addedToTop","right","bottom"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,MAAMA,eAAe;AACrB,MAAMC,oBAAoB;AAE1B,0BAA0B;AAC1B,iJAAiJ;AACjJ,4JAA4J;AAC5J,uHAAuH;AACvH,OAAO,SAASC,wBAAwBC,IAUvC;IACC,MAAM,EACJC,qBAAqB,KAAK,EAC1BC,UAAU,EACVC,sBAAsB,CAAC,EACvBC,YAAY,EACZC,mBAAmBP,iBAAiB,EACpCQ,qBAAqB,MAAM,EAC3BC,0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AaQ,KAAK,CAACC,OAAO,GAAG;IAE7B,IAAIN,2BAA2BJ,wBAAwB,GAAG;QACxD,4HAA4H;QAC5H,iCAAiC;QACjCgB,OAAOF,kBAAkBQ,MAAM,GAAGtB,sBAAsBY,iBAAiBK,MAAM,GAAG;QAClF,sFAAsF;QACtFhB,aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,kBAAkB,CAAC;IAChF,OAAO;QACLA,OAAOF,kBAAkBE,GAAG;QAE5Bf,aAAaQ,KAAK,CAACE,SAAS,GAAG,CAAC,UAAU,EAAEO,KAAK,IAAI,EAAEF,IAAI,GAAG,CAAC;IACjE;IAEA,OAAOI;AACT"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapterProvider } from './types.js';
2
2
  export declare function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider;
3
3
  export { AlignFeature } from './field/features/align/feature.server.js';
4
- export { BlockQuoteFeature } from './field/features/blockquote/feature.server.js';
5
- export { BlocksFeature, type BlocksFeatureProps, type LexicalBlock, } from './field/features/blocks/feature.server.js';
4
+ export { BlockquoteFeature } from './field/features/blockquote/feature.server.js';
5
+ export { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js';
6
6
  export { $createBlockNode, $isBlockNode, type BlockFields, BlockNode, type SerializedBlockNode, } from './field/features/blocks/nodes/BlocksNode.js';
7
7
  export { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js';
8
8
  export { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js';
@@ -12,7 +12,6 @@ export { convertLexicalNodesToHTML, convertLexicalToHTML, } from './field/featur
12
12
  export type { HTMLConverter } from './field/features/converters/html/converter/types.js';
13
13
  export { HTMLConverterFeature, type HTMLConverterFeatureProps, } from './field/features/converters/html/feature.server.js';
14
14
  export { consolidateHTMLConverters, lexicalHTML, } from './field/features/converters/html/field/index.js';
15
- export { createClientComponent } from './field/features/createClientComponent.js';
16
15
  export { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js';
17
16
  export { TreeViewFeature } from './field/features/debug/treeView/feature.server.js';
18
17
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
@@ -58,7 +57,7 @@ export { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.ser
58
57
  export { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js';
59
58
  export type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js';
60
59
  export { createNode } from './field/features/typeUtilities.js';
61
- export type { ClientComponentProps, ClientFeature, ClientFeatureProviderMap, FeatureProviderClient, FeatureProviderProviderClient, FeatureProviderProviderServer, FeatureProviderServer, FieldNodeHook, FieldNodeHookArgs, NodeValidation, NodeWithHooks, PopulationPromise, ResolvedClientFeature, ResolvedClientFeatureMap, ResolvedServerFeature, ResolvedServerFeatureMap, SanitizedClientFeatures, SanitizedPlugin, SanitizedServerFeatures, ServerFeature, ServerFeatureProviderMap, } from './field/features/types.js';
60
+ export type { ClientComponentProps, ClientFeature, ClientFeatureProviderMap, FeatureProviderClient, FeatureProviderProviderClient, FeatureProviderProviderServer, FeatureProviderServer, FieldNodeHook, FieldNodeHookArgs, NodeValidation, NodeWithHooks, PluginComponent, PluginComponentWithAnchor, PopulationPromise, ResolvedClientFeature, ResolvedClientFeatureMap, ResolvedServerFeature, ResolvedServerFeatureMap, SanitizedClientFeatures, SanitizedPlugin, SanitizedServerFeatures, ServerFeature, ServerFeatureProviderMap, } from './field/features/types.js';
62
61
  export { UploadFeature } from './field/features/upload/feature.server.js';
63
62
  export type { UploadFeatureProps } from './field/features/upload/feature.server.js';
64
63
  export { $createUploadNode, $isUploadNode, type SerializedUploadNode, type UploadData, UploadNode, } from './field/features/upload/nodes/UploadNode.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"m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CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAA;AACnF,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAA;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAA;AAC1F,OAAO,EAAE,oCAAoC,EAAE,MAAM,+DAA+D,CAAA;AACpH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAEjE,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { populateLexicalPopulationPromises } from './populate/populateLexicalPop
12
12
  import { richTextValidateHOC } from './validate/index.js';
13
13
  let defaultSanitizedServerEditorConfig = null;
14
14
  export function lexicalEditor(props) {
15
- return async ({ config })=>{
15
+ return async ({ config, isRoot })=>{
16
16
  let resolvedFeatureMap;
17
17
  let finalSanitizedEditorConfig// For server only
18
18
  ;
@@ -32,6 +32,7 @@ export function lexicalEditor(props) {
32
32
  const lexical = props.lexical;
33
33
  resolvedFeatureMap = await loadFeatures({
34
34
  config,
35
+ isRoot,
35
36
  unSanitizedEditorConfig: {
36
37
  features,
37
38
  lexical: lexical ? lexical : defaultEditorConfig.lexical
@@ -279,7 +280,7 @@ export function lexicalEditor(props) {
279
280
  };
280
281
  }
281
282
  export { AlignFeature } from './field/features/align/feature.server.js';
282
- export { BlockQuoteFeature } from './field/features/blockquote/feature.server.js';
283
+ export { BlockquoteFeature } from './field/features/blockquote/feature.server.js';
283
284
  export { BlocksFeature } from './field/features/blocks/feature.server.js';
284
285
  export { $createBlockNode, $isBlockNode, BlockNode } from './field/features/blocks/nodes/BlocksNode.js';
285
286
  export { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js';
@@ -289,7 +290,6 @@ export { defaultHTMLConverters } from './field/features/converters/html/converte
289
290
  export { convertLexicalNodesToHTML, convertLexicalToHTML } from './field/features/converters/html/converter/index.js';
290
291
  export { HTMLConverterFeature } from './field/features/converters/html/feature.server.js';
291
292
  export { consolidateHTMLConverters, lexicalHTML } from './field/features/converters/html/field/index.js';
292
- export { createClientComponent } from './field/features/createClientComponent.js';
293
293
  export { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js';
294
294
  export { TreeViewFeature } from './field/features/debug/treeView/feature.server.js';
295
295
  export { BoldFeature } from './field/features/format/bold/feature.server.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapterProvider } from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { populateLexicalPopulationPromises } from './populate/populateLexicalPopulationPromises.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config }) => {\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n }\n\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n let features: FeatureProviderServer<unknown, unknown>[] =\n props.features && typeof props.features === 'function'\n ? props.features({ defaultFeatures: cloneDeep(defaultEditorFeatures) })\n : (props.features as FeatureProviderServer<unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n editorConfig: finalSanitizedEditorConfig,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n /* hooks: {\n afterChange: finalSanitizedEditorConfig.features.hooks.afterChange,\n afterRead: finalSanitizedEditorConfig.features.hooks.afterRead,\n beforeChange: finalSanitizedEditorConfig.features.hooks.beforeChange,\n beforeDuplicate: finalSanitizedEditorConfig.features.hooks.beforeDuplicate,\n beforeValidate: finalSanitizedEditorConfig.features.hooks.beforeValidate,\n },*/\n /* // TODO: Figure out docWithLocales / originalSiblingDoc => node matching. Can't use indexes, as the order of nodes could technically change between hooks.\n hooks: {\n afterChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n afterRead: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeDuplicate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeDuplicateHooks = finalSanitizedEditorConfig.features.hooks.beforeDuplicate\n if (beforeDuplicateHooks?.has(node.type)) {\n for (const hook of beforeDuplicateHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeValidate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n /**\n * We cannot pass the originalNode here, as there is no way to map one node to a previous one, as a previous originalNode might be in a different position\n */ /*\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n },*/\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n populationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockQuoteFeature } from './field/features/blockquote/feature.server.js'\nexport {\n BlocksFeature,\n type BlocksFeatureProps,\n type LexicalBlock,\n} from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { createClientComponent } from './field/features/createClientComponent.js'\nexport { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\nexport {\n HeadingFeature,\n type HeadingFeatureProps,\n} from './field/features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './field/features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\n\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { ChecklistFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js'\nexport { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js'\n\nexport { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js'\nexport { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js'\nexport { createNode } from './field/features/typeUtilities.js'\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n FieldNodeHook,\n FieldNodeHookArgs,\n NodeValidation,\n NodeWithHooks,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\n\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\n\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","populateLexicalPopulationPromises","richTextValidateHOC","defaultSanitizedServerEditorConfig","lexicalEditor","props","config","resolvedFeatureMap","finalSanitizedEditorConfig","features","lexical","defaultFeatures","unSanitizedEditorConfig","CellComponent","Component","toMergeIntoProps","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","field","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromises","context","currentDepth","depth","draft","fieldPromises","findMany","flattenLocales","overrideAccess","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","validate","AlignFeature","BlockQuoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","createClientComponent","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","toolbarFormatGroupWithItems","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","toolbarAddDropdownGroupWithItems","toolbarFeatureButtonsGroupWithItems","toolbarTextDropdownGroupWithItems","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,eAAe,QAAQ,0CAAyC;AACzE,SAASC,0BAA0B,QAAQ,oBAAmB;AAM9D,SAASC,YAAY,QAAQ,kBAAiB;AAC9C,SAASC,aAAa,QAAQ,mBAAkB;AAChD,SACEC,mBAAmB,EACnBC,qBAAqB,QAChB,2CAA0C;AACjD,SAASC,YAAY,QAAQ,0CAAyC;A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mB,EACnBC,iBAAiB,QACZ,sCAAqC;AAC5C,SAASC,KAAK,EAAEC,OAAO,QAAQ,iCAAgC;AAC/D,SAASC,IAAI,QAAQ,gCAA+B;AACpD,SAASC,uBAAuB,QAAQ,mDAAkD;AAC1F,SAASC,oCAAoC,QAAQ,gEAA+D;AACpH,SACEC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,kBAAkB,QACb,iCAAgC;AACvC,SAASC,WAAW,EAAEC,WAAW,QAAQ,+BAA8B;AACvE,SAASC,oBAAoB,QAAQ,6BAA4B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSONSchema4 } from 'json-schema'\nimport type { EditorConfig as LexicalEditorConfig } from 'lexical'\n\nimport { withMergedProps } from '@payloadcms/ui/elements/withMergedProps'\nimport { withNullableJSONSchemaType } from 'payload/utilities'\n\nimport type { FeatureProviderServer, ResolvedServerFeatureMap } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\nimport type { AdapterProps, LexicalEditorProps, LexicalRichTextAdapterProvider } from './types.js'\n\nimport { RichTextCell } from './cell/index.js'\nimport { RichTextField } from './field/index.js'\nimport {\n defaultEditorConfig,\n defaultEditorFeatures,\n} from './field/lexical/config/server/default.js'\nimport { loadFeatures } from './field/lexical/config/server/loader.js'\nimport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nimport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nimport { getGenerateComponentMap } from './generateComponentMap.js'\nimport { getGenerateSchemaMap } from './generateSchemaMap.js'\nimport { populateLexicalPopulationPromises } from './populate/populateLexicalPopulationPromises.js'\nimport { richTextValidateHOC } from './validate/index.js'\n\nlet defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null\n\nexport function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {\n return async ({ config, isRoot }) => {\n let resolvedFeatureMap: ResolvedServerFeatureMap\n\n let finalSanitizedEditorConfig: SanitizedServerEditorConfig // For server only\n if (!props || (!props.features && !props.lexical)) {\n if (!defaultSanitizedServerEditorConfig) {\n defaultSanitizedServerEditorConfig = await sanitizeServerEditorConfig(\n defaultEditorConfig,\n config,\n )\n }\n\n finalSanitizedEditorConfig = cloneDeep(defaultSanitizedServerEditorConfig)\n\n resolvedFeatureMap = finalSanitizedEditorConfig.resolvedFeatureMap\n } else {\n let features: FeatureProviderServer<unknown, unknown>[] =\n props.features && typeof props.features === 'function'\n ? props.features({ defaultFeatures: cloneDeep(defaultEditorFeatures) })\n : (props.features as FeatureProviderServer<unknown, unknown>[])\n if (!features) {\n features = cloneDeep(defaultEditorFeatures)\n }\n\n const lexical: LexicalEditorConfig = props.lexical\n\n resolvedFeatureMap = await loadFeatures({\n config,\n isRoot,\n unSanitizedEditorConfig: {\n features,\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n },\n })\n\n finalSanitizedEditorConfig = {\n features: sanitizeServerFeatures(resolvedFeatureMap),\n lexical: lexical ? lexical : defaultEditorConfig.lexical,\n resolvedFeatureMap,\n }\n }\n\n return {\n CellComponent: withMergedProps({\n Component: RichTextCell,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n FieldComponent: withMergedProps({\n Component: RichTextField,\n toMergeIntoProps: { lexicalEditorConfig: finalSanitizedEditorConfig.lexical },\n }),\n editorConfig: finalSanitizedEditorConfig,\n generateComponentMap: getGenerateComponentMap({\n resolvedFeatureMap,\n }),\n generateSchemaMap: getGenerateSchemaMap({\n resolvedFeatureMap,\n }),\n /* hooks: {\n afterChange: finalSanitizedEditorConfig.features.hooks.afterChange,\n afterRead: finalSanitizedEditorConfig.features.hooks.afterRead,\n beforeChange: finalSanitizedEditorConfig.features.hooks.beforeChange,\n beforeDuplicate: finalSanitizedEditorConfig.features.hooks.beforeDuplicate,\n beforeValidate: finalSanitizedEditorConfig.features.hooks.beforeValidate,\n },*/\n /* // TODO: Figure out docWithLocales / originalSiblingDoc => node matching. Can't use indexes, as the order of nodes could technically change between hooks.\n hooks: {\n afterChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterChangeHooks = finalSanitizedEditorConfig.features.hooks.afterChange\n if (afterChangeHooks?.has(node.type)) {\n for (const hook of afterChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n afterRead: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const afterReadHooks = finalSanitizedEditorConfig.features.hooks.afterRead\n if (afterReadHooks?.has(node.type)) {\n for (const hook of afterReadHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeChange: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeChangeHooks = finalSanitizedEditorConfig.features.hooks.beforeChange\n if (beforeChangeHooks?.has(node.type)) {\n for (const hook of beforeChangeHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeDuplicate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeDuplicateHooks = finalSanitizedEditorConfig.features.hooks.beforeDuplicate\n if (beforeDuplicateHooks?.has(node.type)) {\n for (const hook of beforeDuplicateHooks.get(node.type)) {\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n beforeValidate: [\n async ({ context, findMany, operation, overrideAccess, req, value }) => {\n await recurseNodesAsync({\n callback: async (node) => {\n const beforeValidateHooks = finalSanitizedEditorConfig.features.hooks.beforeValidate\n if (beforeValidateHooks?.has(node.type)) {\n for (const hook of beforeValidateHooks.get(node.type)) {\n /**\n * We cannot pass the originalNode here, as there is no way to map one node to a previous one, as a previous originalNode might be in a different position\n */ /*\n node = await hook({ context, findMany, node, operation, overrideAccess, req })\n }\n }\n },\n nodes: (value as SerializedEditorState)?.root?.children ?? [],\n })\n\n return value\n },\n ],\n },*/\n outputSchema: ({\n collectionIDFieldTypes,\n config,\n field,\n interfaceNameDefinitions,\n isRequired,\n }) => {\n let outputSchema: JSONSchema4 = {\n // This schema matches the SerializedEditorState type so far, that it's possible to cast SerializedEditorState to this schema without any errors.\n // In the future, we should\n // 1) allow recursive children\n // 2) Pass in all the different types for every node added to the editorconfig. This can be done with refs in the schema.\n type: withNullableJSONSchemaType('object', isRequired),\n properties: {\n root: {\n type: 'object',\n additionalProperties: false,\n properties: {\n type: {\n type: 'string',\n },\n children: {\n type: 'array',\n items: {\n type: 'object',\n additionalProperties: true,\n properties: {\n type: {\n type: 'string',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['type', 'version'],\n },\n },\n direction: {\n oneOf: [\n {\n enum: ['ltr', 'rtl'],\n },\n {\n type: 'null',\n },\n ],\n },\n format: {\n type: 'string',\n enum: ['left', 'start', 'center', 'right', 'end', 'justify', ''], // ElementFormatType, since the root node is an element\n },\n indent: {\n type: 'integer',\n },\n version: {\n type: 'integer',\n },\n },\n required: ['children', 'direction', 'format', 'indent', 'type', 'version'],\n },\n },\n required: ['root'],\n }\n for (const modifyOutputSchema of finalSanitizedEditorConfig.features.generatedTypes\n .modifyOutputSchemas) {\n outputSchema = modifyOutputSchema({\n collectionIDFieldTypes,\n config,\n currentSchema: outputSchema,\n field,\n interfaceNameDefinitions,\n isRequired,\n })\n }\n\n return outputSchema\n },\n populationPromises({\n context,\n currentDepth,\n depth,\n draft,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n }) {\n // check if there are any features with nodes which have populationPromises for this field\n if (finalSanitizedEditorConfig?.features?.populationPromises?.size) {\n populateLexicalPopulationPromises({\n context,\n currentDepth,\n depth,\n draft,\n editorPopulationPromises: finalSanitizedEditorConfig.features.populationPromises,\n field,\n fieldPromises,\n findMany,\n flattenLocales,\n overrideAccess,\n populationPromises,\n req,\n showHiddenFields,\n siblingDoc,\n })\n }\n },\n validate: richTextValidateHOC({\n editorConfig: finalSanitizedEditorConfig,\n }),\n }\n }\n}\n\nexport { AlignFeature } from './field/features/align/feature.server.js'\nexport { BlockquoteFeature } from './field/features/blockquote/feature.server.js'\nexport { BlocksFeature, type BlocksFeatureProps } from './field/features/blocks/feature.server.js'\nexport {\n $createBlockNode,\n $isBlockNode,\n type BlockFields,\n BlockNode,\n type SerializedBlockNode,\n} from './field/features/blocks/nodes/BlocksNode.js'\n\nexport { LinebreakHTMLConverter } from './field/features/converters/html/converter/converters/linebreak.js'\nexport { ParagraphHTMLConverter } from './field/features/converters/html/converter/converters/paragraph.js'\nexport { TextHTMLConverter } from './field/features/converters/html/converter/converters/text.js'\n\nexport { defaultHTMLConverters } from './field/features/converters/html/converter/defaultConverters.js'\nexport {\n convertLexicalNodesToHTML,\n convertLexicalToHTML,\n} from './field/features/converters/html/converter/index.js'\nexport type { HTMLConverter } from './field/features/converters/html/converter/types.js'\nexport {\n HTMLConverterFeature,\n type HTMLConverterFeatureProps,\n} from './field/features/converters/html/feature.server.js'\nexport {\n consolidateHTMLConverters,\n lexicalHTML,\n} from './field/features/converters/html/field/index.js'\nexport { TestRecorderFeature } from './field/features/debug/testRecorder/feature.server.js'\nexport { TreeViewFeature } from './field/features/debug/treeView/feature.server.js'\nexport { BoldFeature } from './field/features/format/bold/feature.server.js'\nexport { InlineCodeFeature } from './field/features/format/inlineCode/feature.server.js'\n\nexport { ItalicFeature } from './field/features/format/italic/feature.server.js'\nexport { toolbarFormatGroupWithItems } from './field/features/format/shared/toolbarFormatGroup.js'\nexport { StrikethroughFeature } from './field/features/format/strikethrough/feature.server.js'\nexport { SubscriptFeature } from './field/features/format/subscript/feature.server.js'\nexport { SuperscriptFeature } from './field/features/format/superscript/feature.server.js'\nexport { UnderlineFeature } from './field/features/format/underline/feature.server.js'\nexport {\n HeadingFeature,\n type HeadingFeatureProps,\n} from './field/features/heading/feature.server.js'\nexport { HorizontalRuleFeature } from './field/features/horizontalRule/feature.server.js'\n\nexport { IndentFeature } from './field/features/indent/feature.server.js'\nexport { LinkFeature, type LinkFeatureServerProps } from './field/features/link/feature.server.js'\n\nexport {\n $createAutoLinkNode,\n $isAutoLinkNode,\n AutoLinkNode,\n} from './field/features/link/nodes/AutoLinkNode.js'\nexport {\n $createLinkNode,\n $isLinkNode,\n LinkNode,\n TOGGLE_LINK_COMMAND,\n} from './field/features/link/nodes/LinkNode.js'\nexport type {\n LinkFields,\n SerializedAutoLinkNode,\n SerializedLinkNode,\n} from './field/features/link/nodes/types.js'\nexport { ChecklistFeature } from './field/features/lists/checklist/feature.server.js'\nexport { OrderedListFeature } from './field/features/lists/orderedList/feature.server.js'\nexport { UnorderedListFeature } from './field/features/lists/unorderedList/feature.server.js'\nexport { LexicalPluginToLexicalFeature } from './field/features/migrations/lexicalPluginToLexical/feature.server.js'\nexport { SlateBlockquoteConverter } from './field/features/migrations/slateToLexical/converter/converters/blockquote/index.js'\nexport { SlateHeadingConverter } from './field/features/migrations/slateToLexical/converter/converters/heading/index.js'\nexport { SlateIndentConverter } from './field/features/migrations/slateToLexical/converter/converters/indent/index.js'\nexport { SlateLinkConverter } from './field/features/migrations/slateToLexical/converter/converters/link/index.js'\nexport { SlateListItemConverter } from './field/features/migrations/slateToLexical/converter/converters/listItem/index.js'\nexport { SlateOrderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/orderedList/index.js'\nexport { SlateRelationshipConverter } from './field/features/migrations/slateToLexical/converter/converters/relationship/index.js'\nexport { SlateUnknownConverter } from './field/features/migrations/slateToLexical/converter/converters/unknown/index.js'\nexport { SlateUnorderedListConverter } from './field/features/migrations/slateToLexical/converter/converters/unorderedList/index.js'\nexport { SlateUploadConverter } from './field/features/migrations/slateToLexical/converter/converters/upload/index.js'\nexport { defaultSlateConverters } from './field/features/migrations/slateToLexical/converter/defaultConverters.js'\n\nexport {\n convertSlateNodesToLexical,\n convertSlateToLexical,\n} from './field/features/migrations/slateToLexical/converter/index.js'\nexport type {\n SlateNode,\n SlateNodeConverter,\n} from './field/features/migrations/slateToLexical/converter/types.js'\nexport { SlateToLexicalFeature } from './field/features/migrations/slateToLexical/feature.server.js'\n\nexport { ParagraphFeature } from './field/features/paragraph/feature.server.js'\nexport {\n RelationshipFeature,\n type RelationshipFeatureProps,\n} from './field/features/relationship/feature.server.js'\nexport {\n $createRelationshipNode,\n $isRelationshipNode,\n type RelationshipData,\n RelationshipNode,\n type SerializedRelationshipNode,\n} from './field/features/relationship/nodes/RelationshipNode.js'\nexport { toolbarAddDropdownGroupWithItems } from './field/features/shared/toolbar/addDropdownGroup.js'\nexport { toolbarFeatureButtonsGroupWithItems } from './field/features/shared/toolbar/featureButtonsGroup.js'\n\nexport { toolbarTextDropdownGroupWithItems } from './field/features/shared/toolbar/textDropdownGroup.js'\nexport { FixedToolbarFeature } from './field/features/toolbars/fixed/feature.server.js'\nexport { InlineToolbarFeature } from './field/features/toolbars/inline/feature.server.js'\n\nexport type { ToolbarGroup, ToolbarGroupItem } from './field/features/toolbars/types.js'\nexport { createNode } from './field/features/typeUtilities.js'\nexport type {\n ClientComponentProps,\n ClientFeature,\n ClientFeatureProviderMap,\n FeatureProviderClient,\n FeatureProviderProviderClient,\n FeatureProviderProviderServer,\n FeatureProviderServer,\n FieldNodeHook,\n FieldNodeHookArgs,\n NodeValidation,\n NodeWithHooks,\n PluginComponent,\n PluginComponentWithAnchor,\n PopulationPromise,\n ResolvedClientFeature,\n ResolvedClientFeatureMap,\n ResolvedServerFeature,\n ResolvedServerFeatureMap,\n SanitizedClientFeatures,\n SanitizedPlugin,\n SanitizedServerFeatures,\n ServerFeature,\n ServerFeatureProviderMap,\n} from './field/features/types.js'\n\nexport { UploadFeature } from './field/features/upload/feature.server.js'\n\nexport type { UploadFeatureProps } from './field/features/upload/feature.server.js'\nexport {\n $createUploadNode,\n $isUploadNode,\n type SerializedUploadNode,\n type UploadData,\n UploadNode,\n} from './field/features/upload/nodes/UploadNode.js'\n\nexport {\n EditorConfigProvider,\n useEditorConfigContext,\n} from './field/lexical/config/client/EditorConfigProvider.js'\nexport {\n sanitizeClientEditorConfig,\n sanitizeClientFeatures,\n} from './field/lexical/config/client/sanitize.js'\nexport {\n defaultEditorConfig,\n defaultEditorFeatures,\n defaultEditorLexicalConfig,\n} from './field/lexical/config/server/default.js'\nexport {\n loadFeatures,\n sortFeaturesForOptimalLoading,\n} from './field/lexical/config/server/loader.js'\n\nexport {\n sanitizeServerEditorConfig,\n sanitizeServerFeatures,\n} from './field/lexical/config/server/sanitize.js'\nexport type {\n ClientEditorConfig,\n SanitizedClientEditorConfig,\n SanitizedServerEditorConfig,\n ServerEditorConfig,\n} from './field/lexical/config/types.js'\n\nexport { getEnabledNodes } from './field/lexical/nodes/index.js'\nexport { ENABLE_SLASH_MENU_COMMAND } from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/index.js'\nexport type { AdapterProps }\n\nexport type {\n SlashMenuGroup,\n SlashMenuItem,\n} from './field/lexical/plugins/SlashMenu/LexicalTypeaheadMenuPlugin/types.js'\nexport { CAN_USE_DOM } from './field/lexical/utils/canUseDOM.js'\nexport { cloneDeep } from './field/lexical/utils/cloneDeep.js'\nexport { getDOMRangeRect } from './field/lexical/utils/getDOMRangeRect.js'\nexport { getSelectedNode } from './field/lexical/utils/getSelectedNode.js'\nexport { isHTMLElement } from './field/lexical/utils/guard.js'\nexport { invariant } from './field/lexical/utils/invariant.js'\nexport { joinClasses } from './field/lexical/utils/joinClasses.js'\nexport { createBlockNode } from './field/lexical/utils/markdown/createBlockNode.js'\nexport {\n DETAIL_TYPE_TO_DETAIL,\n DOUBLE_LINE_BREAK,\n ELEMENT_FORMAT_TO_TYPE,\n ELEMENT_TYPE_TO_FORMAT,\n IS_ALL_FORMATTING,\n LTR_REGEX,\n NON_BREAKING_SPACE,\n NodeFormat,\n RTL_REGEX,\n TEXT_MODE_TO_TYPE,\n TEXT_TYPE_TO_FORMAT,\n TEXT_TYPE_TO_MODE,\n} from './field/lexical/utils/nodeFormat.js'\nexport { Point, isPoint } from './field/lexical/utils/point.js'\nexport { Rect } from './field/lexical/utils/rect.js'\nexport { setFloatingElemPosition } from './field/lexical/utils/setFloatingElemPosition.js'\nexport { setFloatingElemPositionForLinkEditor } from './field/lexical/utils/setFloatingElemPositionForLinkEditor.js'\nexport {\n addSwipeDownListener,\n addSwipeLeftListener,\n addSwipeRightListener,\n addSwipeUpListener,\n} from './field/lexical/utils/swipe.js'\nexport { sanitizeUrl, validateUrl } from './field/lexical/utils/url.js'\nexport { defaultRichTextValue } from './populate/defaultValue.js'\n\nexport type { LexicalEditorProps, LexicalRichTextAdapter } from './types.js'\n"],"names":["withMergedProps","withNullableJSONSchemaType","RichTextCell","RichTextField","defaultEditorConfig","defaultEditorFeatures","loadFeatures","sanitizeServerEditorConfig","sanitizeServerFeatures","cloneDeep","getGenerateComponentMap","getGenerateSchemaMap","populateLexicalPopulationPromises","richTextValidateHOC","defaultSanitizedServerEditorConfig","lexicalEditor","props","config","isRoot","resolvedFeatureMap","finalSanitizedEditorConfig","features","lexical","defaultFeatures","unSanitizedEditorConfig","CellComponent","Component","toMergeIntoProps","lexicalEditorConfig","FieldComponent","editorConfig","generateComponentMap","generateSchemaMap","outputSchema","collectionIDFieldTypes","field","interfaceNameDefinitions","isRequired","type","properties","root","additionalProperties","children","items","version","required","direction","oneOf","enum","format","indent","modifyOutputSchema","generatedTypes","modifyOutputSchemas","currentSchema","populationPromises","context","currentDepth","depth","draft","fieldPromises","findMany","flattenLocales","overrideAccess","req","showHiddenFields","siblingDoc","size","editorPopulationPromises","validate","AlignFeature","BlockquoteFeature","BlocksFeature","$createBlockNode","$isBlockNode","BlockNode","LinebreakHTMLConverter","ParagraphHTMLConverter","TextHTMLConverter","defaultHTMLConverters","convertLexicalNodesToHTML","convertLexicalToHTML","HTMLConverterFeature","consolidateHTMLConverters","lexicalHTML","TestRecorderFeature","TreeViewFeature","BoldFeature","InlineCodeFeature","ItalicFeature","toolbarFormatGroupWithItems","StrikethroughFeature","SubscriptFeature","SuperscriptFeature","UnderlineFeature","HeadingFeature","HorizontalRuleFeature","IndentFeature","LinkFeature","$createAutoLinkNode","$isAutoLinkNode","AutoLinkNode","$createLinkNode","$isLinkNode","LinkNode","TOGGLE_LINK_COMMAND","ChecklistFeature","OrderedListFeature","UnorderedListFeature","LexicalPluginToLexicalFeature","SlateBlockquoteConverter","SlateHeadingConverter","SlateIndentConverter","SlateLinkConverter","SlateListItemConverter","SlateOrderedListConverter","SlateRelationshipConverter","SlateUnknownConverter","SlateUnorderedListConverter","SlateUploadConverter","defaultSlateConverters","convertSlateNodesToLexical","convertSlateToLexical","SlateToLexicalFeature","ParagraphFeature","RelationshipFeature","$createRelationshipNode","$isRelationshipNode","RelationshipNode","toolbarAddDropdownGroupWithItems","toolbarFeatureButtonsGroupWithItems","toolbarTextDropdownGroupWithItems","FixedToolbarFeature","InlineToolbarFeature","createNode","UploadFeature","$createUploadNode","$isUploadNode","UploadNode","EditorConfigProvider","useEditorConfigContext","sanitizeClientEditorConfig","sanitizeClientFeatures","defaultEditorLexicalConfig","sortFeaturesForOptimalLoading","getEnabledNodes","ENABLE_SLASH_MENU_COMMAND","CAN_USE_DOM","getDOMRangeRect","getSelectedNode","isHTMLElement","invariant","joinClasses","createBlockNode","DETAIL_TYPE_TO_DETAIL","DOUBLE_LINE_BREAK","ELEMENT_FORMAT_TO_TYPE","ELEMENT_TYPE_TO_FORMAT","IS_ALL_FORMATTING","LTR_REGEX","NON_BREAKING_SPACE","NodeFormat","RTL_REGEX","TEXT_MODE_TO_TYPE","TEXT_TYPE_TO_FORMAT","TEXT_TYPE_TO_MODE","Point","isPoint","Rect","setFloatingElemPosition","setFloatingElemPositionForLinkEditor","addSwipeDownListener","addSwipeLeftListener","addSwipeRightListener","addSwipeUpListener","sanitizeUrl","validateUrl","defaultRichTextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAGA,SAASA,eAAe,QAAQ,0CAAyC;AACzE,SAASC,0BAA0B,QAAQ,oBAAmB;AAM9D,SAASC,YAAY,QAAQ,kBAAiB;AAC9C,SAASC,aAAa,QAAQ,mBAAkB;AAChD,SACEC,mBAAmB,EACnBC,qBAAqB,QAChB,2CAA0C;AACjD,SAASC,YAAY,QAAQ,0CAAyC;AACtE,SACEC,0BAA0B,EAC1BC,sBAAsB,QACjB,4CAA2C;AAClD,SAASC,SAAS,QAAQ,qCAAoC;AAC9D,SAASC,uBAAuB,QAAQ,4BAA2B;AACnE,SAASC,oBAAoB,QAAQ,yBAAwB;AAC7D,SAASC,iCAAiC,QAAQ,kDAAiD;AACnG,SAASC,mBAAmB,QAAQ,sBAAqB;AAEzD,IAAIC,qCAAkE;AAEtE,OAAO,SAASC,cAAcC,KAA0B;IACtD,OAAO,OAAO,EAAEC,MAAM,EAAEC,MAAM,EAAE;QAC9B,IAAIC;QAEJ,IAAIC,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 +18,9 @@ export type LexicalRichTextAdapterProvider =
18
18
  /**
19
19
  * This is being called during the payload sanitization process
20
20
  */
21
- ({ config }: {
21
+ ({ config, isRoot, }: {
22
22
  config: SanitizedConfig;
23
+ isRoot?: boolean;
23
24
  }) => Promise<LexicalRichTextAdapter>;
24
25
  export type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {
25
26
  fieldTypes: FieldTypes;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACzF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAElF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EACL,CAAC,CAAC,EACA,eAAe,GAChB,EAAE;QACD,eAAe,EAAE,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;KACnD,KAAK,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GACxC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;IACrC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,qBAAqB,EAAE,YAAY,EAAE,GAAG,CAAC,GAAG;IAC/F,YAAY,EAAE,2BAA2B,CAAA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AqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;KACnD,KAAK,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GACxC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;IACrC,OAAO,CAAC,EAAE,mBAAmB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,qBAAqB,EAAE,YAAY,EAAE,GAAG,CAAC,GAAG;IAC/F,YAAY,EAAE,2BAA2B,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,8BAA8B;AACxC;;GAEG;AACH,CAAC,EACC,MAAM,EACN,MAAM,GACP,EAAE;IACD,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAAA;AAEvC,MAAM,MAAM,UAAU,GAAG,kBAAkB,CAAC,qBAAqB,EAAE,YAAY,EAAE,YAAY,CAAC,GAAG;IAC/F,UAAU,EAAE,UAAU,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,gBAAgB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,2BAA2B,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical'\nimport type { FieldPermissions } from 'payload/auth'\nimport type { FieldTypes, SanitizedConfig } from 'payload/config'\nimport type { RichTextAdapter, RichTextFieldProps } from 'payload/types'\nimport type React from 'react'\n\nimport type { FeatureProviderServer } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\n\nexport type LexicalEditorProps = {\n features?:\n | (({\n defaultFeatures,\n }: {\n defaultFeatures: FeatureProviderServer<any, any>[]\n }) => FeatureProviderServer<any, any>[])\n | FeatureProviderServer<any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type LexicalRichTextAdapterProvider =\n /**\n * This is being called during the payload sanitization process\n */\n ({ config }: { config: SanitizedConfig }) => Promise<LexicalRichTextAdapter>\n\nexport type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {\n fieldTypes: FieldTypes\n indexPath: string\n path?: string\n permissions: FieldPermissions\n}\n\nexport type AdapterProps = {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type GeneratedFeatureProviderComponent = {\n ClientComponent: React.ReactNode\n key: string\n order: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AAyCA,WAIC"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EditorConfig as LexicalEditorConfig, SerializedEditorState } from 'lexical'\nimport type { FieldPermissions } from 'payload/auth'\nimport type { FieldTypes, SanitizedConfig } from 'payload/config'\nimport type { RichTextAdapter, RichTextFieldProps } from 'payload/types'\nimport type React from 'react'\n\nimport type { FeatureProviderServer } from './field/features/types.js'\nimport type { SanitizedServerEditorConfig } from './field/lexical/config/types.js'\n\nexport type LexicalEditorProps = {\n features?:\n | (({\n defaultFeatures,\n }: {\n defaultFeatures: FeatureProviderServer<any, any>[]\n }) => FeatureProviderServer<any, any>[])\n | FeatureProviderServer<any, any>[]\n lexical?: LexicalEditorConfig\n}\n\nexport type LexicalRichTextAdapter = RichTextAdapter<SerializedEditorState, AdapterProps, any> & {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type LexicalRichTextAdapterProvider =\n /**\n * This is being called during the payload sanitization process\n */\n ({\n config,\n isRoot,\n }: {\n config: SanitizedConfig\n isRoot?: boolean\n }) => Promise<LexicalRichTextAdapter>\n\nexport type FieldProps = RichTextFieldProps<SerializedEditorState, AdapterProps, AdapterProps> & {\n fieldTypes: FieldTypes\n indexPath: string\n path?: string\n permissions: FieldPermissions\n}\n\nexport type AdapterProps = {\n editorConfig: SanitizedServerEditorConfig\n}\n\nexport type GeneratedFeatureProviderComponent = {\n ClientComponent: React.ReactNode\n key: string\n order: number\n}\n"],"names":[],"rangeMappings":"","mappings":"AA+CA,WAIC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/richtext-lexical",
3
- "version": "3.0.0-beta.25",
3
+ "version": "3.0.0-beta.26",
4
4
  "description": "The officially supported Lexical richtext adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -56,19 +56,19 @@
56
56
  "@types/node": "20.12.5",
57
57
  "@types/react": "18.2.74",
58
58
  "@types/react-dom": "18.2.24",
59
- "@payloadcms/eslint-config": "1.1.1",
60
- "@payloadcms/next": "3.0.0-beta.25",
61
- "@payloadcms/translations": "3.0.0-beta.25",
62
- "@payloadcms/ui": "3.0.0-beta.25",
63
- "payload": "3.0.0-beta.25"
59
+ "@payloadcms/next": "3.0.0-beta.26",
60
+ "@payloadcms/ui": "3.0.0-beta.26",
61
+ "@payloadcms/translations": "3.0.0-beta.26",
62
+ "payload": "3.0.0-beta.26",
63
+ "@payloadcms/eslint-config": "1.1.1"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
67
67
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
68
- "@payloadcms/next": "3.0.0-beta.25",
69
- "@payloadcms/translations": "3.0.0-beta.25",
70
- "@payloadcms/ui": "3.0.0-beta.25",
71
- "payload": "3.0.0-beta.25"
68
+ "@payloadcms/translations": "3.0.0-beta.26",
69
+ "@payloadcms/next": "3.0.0-beta.26",
70
+ "@payloadcms/ui": "3.0.0-beta.26",
71
+ "payload": "3.0.0-beta.26"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=18.20.2"