@payloadcms/richtext-slate 3.0.0-beta.52 → 3.0.0-beta.54

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 (175) hide show
  1. package/dist/cell/index.js +1 -1
  2. package/dist/cell/index.js.map +1 -1
  3. package/dist/data/defaultValue.js.map +1 -1
  4. package/dist/data/populate.d.ts +1 -1
  5. package/dist/data/populate.d.ts.map +1 -1
  6. package/dist/data/populate.js.map +1 -1
  7. package/dist/data/recurseNestedFields.js.map +1 -1
  8. package/dist/data/richTextRelationshipPromise.js.map +1 -1
  9. package/dist/data/validation.js.map +1 -1
  10. package/dist/field/RichText.d.ts +3 -3
  11. package/dist/field/RichText.d.ts.map +1 -1
  12. package/dist/field/RichText.js +1 -1
  13. package/dist/field/RichText.js.map +1 -1
  14. package/dist/field/createFeatureMap.d.ts.map +1 -1
  15. package/dist/field/createFeatureMap.js.map +1 -1
  16. package/dist/field/elements/Button.js +1 -1
  17. package/dist/field/elements/Button.js.map +1 -1
  18. package/dist/field/elements/EnabledRelationshipsCondition.js +1 -1
  19. package/dist/field/elements/EnabledRelationshipsCondition.js.map +1 -1
  20. package/dist/field/elements/ListButton.js.map +1 -1
  21. package/dist/field/elements/areAllChildrenElements.js.map +1 -1
  22. package/dist/field/elements/blockquote/Blockquote.js.map +1 -1
  23. package/dist/field/elements/blockquote/index.js.map +1 -1
  24. package/dist/field/elements/getCommonBlock.d.ts.map +1 -1
  25. package/dist/field/elements/getCommonBlock.js.map +1 -1
  26. package/dist/field/elements/h1/Heading1.js.map +1 -1
  27. package/dist/field/elements/h1/index.js.map +1 -1
  28. package/dist/field/elements/h2/Heading2.js.map +1 -1
  29. package/dist/field/elements/h2/index.js.map +1 -1
  30. package/dist/field/elements/h3/Heading3.js.map +1 -1
  31. package/dist/field/elements/h3/index.js.map +1 -1
  32. package/dist/field/elements/h4/Heading4.js.map +1 -1
  33. package/dist/field/elements/h4/index.js.map +1 -1
  34. package/dist/field/elements/h5/Heading5.js.map +1 -1
  35. package/dist/field/elements/h5/index.js.map +1 -1
  36. package/dist/field/elements/h6/Heading6.js.map +1 -1
  37. package/dist/field/elements/h6/index.js.map +1 -1
  38. package/dist/field/elements/indent/Button.js.map +1 -1
  39. package/dist/field/elements/indent/Element.js.map +1 -1
  40. package/dist/field/elements/indent/index.js.map +1 -1
  41. package/dist/field/elements/indent/shared.js.map +1 -1
  42. package/dist/field/elements/index.js.map +1 -1
  43. package/dist/field/elements/injectVoid.js.map +1 -1
  44. package/dist/field/elements/isActive.js.map +1 -1
  45. package/dist/field/elements/isBlockElement.d.ts +2 -2
  46. package/dist/field/elements/isBlockElement.d.ts.map +1 -1
  47. package/dist/field/elements/isBlockElement.js.map +1 -1
  48. package/dist/field/elements/isLastSelectedElementEmpty.js.map +1 -1
  49. package/dist/field/elements/isListActive.js.map +1 -1
  50. package/dist/field/elements/isWithinListItem.js.map +1 -1
  51. package/dist/field/elements/li/ListItem.js.map +1 -1
  52. package/dist/field/elements/li/index.js.map +1 -1
  53. package/dist/field/elements/link/Button/index.d.ts.map +1 -1
  54. package/dist/field/elements/link/Button/index.js +1 -1
  55. package/dist/field/elements/link/Button/index.js.map +1 -1
  56. package/dist/field/elements/link/Element/index.js +1 -1
  57. package/dist/field/elements/link/Element/index.js.map +1 -1
  58. package/dist/field/elements/link/LinkDrawer/baseFields.js.map +1 -1
  59. package/dist/field/elements/link/LinkDrawer/index.js +1 -1
  60. package/dist/field/elements/link/LinkDrawer/index.js.map +1 -1
  61. package/dist/field/elements/link/LinkDrawer/types.d.ts +1 -1
  62. package/dist/field/elements/link/LinkDrawer/types.d.ts.map +1 -1
  63. package/dist/field/elements/link/LinkDrawer/types.js.map +1 -1
  64. package/dist/field/elements/link/WithLinks.js.map +1 -1
  65. package/dist/field/elements/link/index.js.map +1 -1
  66. package/dist/field/elements/link/shared.js.map +1 -1
  67. package/dist/field/elements/link/types.js.map +1 -1
  68. package/dist/field/elements/link/utilities.js.map +1 -1
  69. package/dist/field/elements/listTypes.js.map +1 -1
  70. package/dist/field/elements/ol/OrderedList.js.map +1 -1
  71. package/dist/field/elements/ol/index.js.map +1 -1
  72. package/dist/field/elements/relationship/Button/index.d.ts.map +1 -1
  73. package/dist/field/elements/relationship/Button/index.js +1 -1
  74. package/dist/field/elements/relationship/Button/index.js.map +1 -1
  75. package/dist/field/elements/relationship/Element/index.d.ts +1 -1
  76. package/dist/field/elements/relationship/Element/index.d.ts.map +1 -1
  77. package/dist/field/elements/relationship/Element/index.js +1 -1
  78. package/dist/field/elements/relationship/Element/index.js.map +1 -1
  79. package/dist/field/elements/relationship/index.js.map +1 -1
  80. package/dist/field/elements/relationship/plugin.js.map +1 -1
  81. package/dist/field/elements/relationship/shared.js.map +1 -1
  82. package/dist/field/elements/relationship/types.js.map +1 -1
  83. package/dist/field/elements/textAlign/index.js.map +1 -1
  84. package/dist/field/elements/toggle.js.map +1 -1
  85. package/dist/field/elements/toggleList.js.map +1 -1
  86. package/dist/field/elements/types.js.map +1 -1
  87. package/dist/field/elements/ul/UnorderedList.js.map +1 -1
  88. package/dist/field/elements/ul/index.js.map +1 -1
  89. package/dist/field/elements/unwrapList.d.ts.map +1 -1
  90. package/dist/field/elements/unwrapList.js.map +1 -1
  91. package/dist/field/elements/upload/Button/index.d.ts.map +1 -1
  92. package/dist/field/elements/upload/Button/index.js +1 -1
  93. package/dist/field/elements/upload/Button/index.js.map +1 -1
  94. package/dist/field/elements/upload/Element/UploadDrawer/index.d.ts +1 -1
  95. package/dist/field/elements/upload/Element/UploadDrawer/index.d.ts.map +1 -1
  96. package/dist/field/elements/upload/Element/UploadDrawer/index.js +1 -2
  97. package/dist/field/elements/upload/Element/UploadDrawer/index.js.map +1 -1
  98. package/dist/field/elements/upload/Element/index.d.ts +1 -1
  99. package/dist/field/elements/upload/Element/index.d.ts.map +1 -1
  100. package/dist/field/elements/upload/Element/index.js +1 -2
  101. package/dist/field/elements/upload/Element/index.js.map +1 -1
  102. package/dist/field/elements/upload/index.js.map +1 -1
  103. package/dist/field/elements/upload/plugin.js.map +1 -1
  104. package/dist/field/elements/upload/shared.js.map +1 -1
  105. package/dist/field/elements/upload/types.js.map +1 -1
  106. package/dist/field/hotkeys.js.map +1 -1
  107. package/dist/field/icons/AlignCenter/index.js.map +1 -1
  108. package/dist/field/icons/AlignLeft/index.js.map +1 -1
  109. package/dist/field/icons/AlignRight/index.js.map +1 -1
  110. package/dist/field/icons/Blockquote/index.js.map +1 -1
  111. package/dist/field/icons/Bold/index.js.map +1 -1
  112. package/dist/field/icons/Code/index.js.map +1 -1
  113. package/dist/field/icons/IndentLeft/index.js.map +1 -1
  114. package/dist/field/icons/IndentRight/index.js.map +1 -1
  115. package/dist/field/icons/Italic/index.js.map +1 -1
  116. package/dist/field/icons/Link/index.js.map +1 -1
  117. package/dist/field/icons/OrderedList/index.js.map +1 -1
  118. package/dist/field/icons/Relationship/index.js.map +1 -1
  119. package/dist/field/icons/Strikethrough/index.js.map +1 -1
  120. package/dist/field/icons/Underline/index.js.map +1 -1
  121. package/dist/field/icons/UnorderedList/index.js.map +1 -1
  122. package/dist/field/icons/Upload/index.js.map +1 -1
  123. package/dist/field/icons/headings/H1/index.js.map +1 -1
  124. package/dist/field/icons/headings/H2/index.js.map +1 -1
  125. package/dist/field/icons/headings/H3/index.js.map +1 -1
  126. package/dist/field/icons/headings/H4/index.js.map +1 -1
  127. package/dist/field/icons/headings/H5/index.js.map +1 -1
  128. package/dist/field/icons/headings/H6/index.js.map +1 -1
  129. package/dist/field/index.d.ts +1 -1
  130. package/dist/field/index.d.ts.map +1 -1
  131. package/dist/field/index.js +1 -1
  132. package/dist/field/index.js.map +1 -1
  133. package/dist/field/leaves/Button.js.map +1 -1
  134. package/dist/field/leaves/bold/Bold/index.js.map +1 -1
  135. package/dist/field/leaves/bold/index.js.map +1 -1
  136. package/dist/field/leaves/code/Code/index.js.map +1 -1
  137. package/dist/field/leaves/code/index.js.map +1 -1
  138. package/dist/field/leaves/index.js.map +1 -1
  139. package/dist/field/leaves/isActive.js.map +1 -1
  140. package/dist/field/leaves/italic/Italic/index.js.map +1 -1
  141. package/dist/field/leaves/italic/index.js.map +1 -1
  142. package/dist/field/leaves/strikethrough/Strikethrough/index.js.map +1 -1
  143. package/dist/field/leaves/strikethrough/index.js.map +1 -1
  144. package/dist/field/leaves/toggle.js.map +1 -1
  145. package/dist/field/leaves/underline/Underline/index.js.map +1 -1
  146. package/dist/field/leaves/underline/index.js.map +1 -1
  147. package/dist/field/mergeCustomFunctions.js.map +1 -1
  148. package/dist/field/plugins/withEnterBreakOut.js.map +1 -1
  149. package/dist/field/plugins/withHTML.js.map +1 -1
  150. package/dist/field/providers/ElementButtonProvider.d.ts +1 -1
  151. package/dist/field/providers/ElementButtonProvider.d.ts.map +1 -1
  152. package/dist/field/providers/ElementButtonProvider.js.map +1 -1
  153. package/dist/field/providers/ElementProvider.d.ts +1 -1
  154. package/dist/field/providers/ElementProvider.d.ts.map +1 -1
  155. package/dist/field/providers/ElementProvider.js.map +1 -1
  156. package/dist/field/providers/LeafButtonProvider.d.ts +1 -1
  157. package/dist/field/providers/LeafButtonProvider.d.ts.map +1 -1
  158. package/dist/field/providers/LeafButtonProvider.js.map +1 -1
  159. package/dist/field/providers/LeafProvider.d.ts +1 -1
  160. package/dist/field/providers/LeafProvider.d.ts.map +1 -1
  161. package/dist/field/providers/LeafProvider.js.map +1 -1
  162. package/dist/field/types.d.ts +0 -1
  163. package/dist/field/types.d.ts.map +1 -1
  164. package/dist/field/types.js.map +1 -1
  165. package/dist/generateComponentMap.d.ts +1 -1
  166. package/dist/generateComponentMap.js.map +1 -1
  167. package/dist/generateSchemaMap.d.ts +1 -1
  168. package/dist/generateSchemaMap.js.map +1 -1
  169. package/dist/index.js.map +1 -1
  170. package/dist/types.d.ts +0 -1
  171. package/dist/types.d.ts.map +1 -1
  172. package/dist/types.js.map +1 -1
  173. package/dist/utilities/useSlatePlugin.js +1 -1
  174. package/dist/utilities/useSlatePlugin.js.map +1 -1
  175. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/icons/OrderedList/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const OLIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic ordered-list-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"fill\"\n d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"\n />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n)\n"],"names":["React","OLIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBACCL,WAAU;gBACVM,GAAE;;0BAEJ,KAACD;gBAAKC,GAAE;gBAAgBL,MAAK;;;OAEhC"}
1
+ {"version":3,"sources":["../../../../src/field/icons/OrderedList/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const OLIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic ordered-list-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"fill\"\n d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"\n />\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n </svg>\n)\n"],"names":["React","OLIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBACCL,WAAU;gBACVM,GAAE;;0BAEJ,KAACD;gBAAKC,GAAE;gBAAgBL,MAAK;;;OAEhC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/icons/Relationship/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const RelationshipIcon: React.FC = () => (\n <svg className=\"icon icon--relationship\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n className=\"stroke\"\n d=\"M19.0597 14.9691L19.0597 19.0946L6.01681 19.0946L6.01681 6.03028L10.0948 6.03028\"\n strokeWidth=\"2\"\n />\n <path className=\"stroke\" d=\"M19.0597 11.0039L19.0597 6.00387L14.0597 6.00387\" strokeWidth=\"2\" />\n <line className=\"stroke\" strokeWidth=\"2\" x1=\"18.7061\" x2=\"13.0493\" y1=\"6.40767\" y2=\"12.0645\" />\n </svg>\n)\n"],"names":["React","RelationshipIcon","svg","className","viewBox","xmlns","path","d","strokeWidth","line","x1","x2","y1","y2"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,OAAO,MAAMC,mBAA6B,kBACxC,MAACC;QAAIC,WAAU;QAA0BC,SAAQ;QAAYC,OAAM;;0BACjE,KAACC;gBACCH,WAAU;gBACVI,GAAE;gBACFC,aAAY;;0BAEd,KAACF;gBAAKH,WAAU;gBAASI,GAAE;gBAAmDC,aAAY;;0BAC1F,KAACC;gBAAKN,WAAU;gBAASK,aAAY;gBAAIE,IAAG;gBAAUC,IAAG;gBAAUC,IAAG;gBAAUC,IAAG;;;OAEtF"}
1
+ {"version":3,"sources":["../../../../src/field/icons/Relationship/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const RelationshipIcon: React.FC = () => (\n <svg className=\"icon icon--relationship\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n className=\"stroke\"\n d=\"M19.0597 14.9691L19.0597 19.0946L6.01681 19.0946L6.01681 6.03028L10.0948 6.03028\"\n strokeWidth=\"2\"\n />\n <path className=\"stroke\" d=\"M19.0597 11.0039L19.0597 6.00387L14.0597 6.00387\" strokeWidth=\"2\" />\n <line className=\"stroke\" strokeWidth=\"2\" x1=\"18.7061\" x2=\"13.0493\" y1=\"6.40767\" y2=\"12.0645\" />\n </svg>\n)\n"],"names":["React","RelationshipIcon","svg","className","viewBox","xmlns","path","d","strokeWidth","line","x1","x2","y1","y2"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,OAAO,MAAMC,mBAA6B,kBACxC,MAACC;QAAIC,WAAU;QAA0BC,SAAQ;QAAYC,OAAM;;0BACjE,KAACC;gBACCH,WAAU;gBACVI,GAAE;gBACFC,aAAY;;0BAEd,KAACF;gBAAKH,WAAU;gBAASI,GAAE;gBAAmDC,aAAY;;0BAC1F,KAACC;gBAAKN,WAAU;gBAASK,aAAY;gBAAIE,IAAG;gBAAUC,IAAG;gBAAUC,IAAG;gBAAUC,IAAG;;;OAEtF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/icons/Strikethrough/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const StrikethroughIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic strikethrough-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path className=\"fill\" d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\" />\n </svg>\n)\n"],"names":["React","StrikethroughIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,oBAA8B,kBACzC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBAAKL,WAAU;gBAAOM,GAAE;;;OAE5B"}
1
+ {"version":3,"sources":["../../../../src/field/icons/Strikethrough/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const StrikethroughIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic strikethrough-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path className=\"fill\" d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\" />\n </svg>\n)\n"],"names":["React","StrikethroughIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,oBAA8B,kBACzC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBAAKL,WAAU;gBAAOM,GAAE;;;OAE5B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/icons/Underline/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const UnderlineIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic underline-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"\n />\n </svg>\n)\n"],"names":["React","UnderlineIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../src/field/icons/Underline/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const UnderlineIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic underline-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"\n />\n </svg>\n)\n"],"names":["React","UnderlineIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,gBAA0B,kBACrC,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/icons/UnorderedList/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ULIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic unordered-list-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"fill\"\n d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"\n />\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n </svg>\n)\n"],"names":["React","ULIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBACCL,WAAU;gBACVM,GAAE;;0BAEJ,KAACD;gBAAKC,GAAE;gBAAkBL,MAAK;;;OAElC"}
1
+ {"version":3,"sources":["../../../../src/field/icons/UnorderedList/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const ULIcon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic unordered-list-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"fill\"\n d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"\n />\n <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n </svg>\n)\n"],"names":["React","ULIcon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBACCL,WAAU;gBACVM,GAAE;;0BAEJ,KAACD;gBAAKC,GAAE;gBAAkBL,MAAK;;;OAElC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/icons/Upload/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const UploadIcon: React.FC = () => (\n <svg className=\"icon icon--upload\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n className=\"fill\"\n d=\"M20.06,5.12h-15v15h15Zm-2,2v7L15.37,11l-3.27,4.1-2-1.58-3,3.74V7.12Z\"\n />\n <circle className=\"fill\" cx=\"9.69\" cy=\"9.47\" r=\"0.97\" />\n </svg>\n)\n"],"names":["React","UploadIcon","svg","className","viewBox","xmlns","path","d","circle","cx","cy","r"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,OAAO,MAAMC,aAAuB,kBAClC,MAACC;QAAIC,WAAU;QAAoBC,SAAQ;QAAYC,OAAM;;0BAC3D,KAACC;gBACCH,WAAU;gBACVI,GAAE;;0BAEJ,KAACC;gBAAOL,WAAU;gBAAOM,IAAG;gBAAOC,IAAG;gBAAOC,GAAE;;;OAElD"}
1
+ {"version":3,"sources":["../../../../src/field/icons/Upload/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const UploadIcon: React.FC = () => (\n <svg className=\"icon icon--upload\" viewBox=\"0 0 25 25\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n className=\"fill\"\n d=\"M20.06,5.12h-15v15h15Zm-2,2v7L15.37,11l-3.27,4.1-2-1.58-3,3.74V7.12Z\"\n />\n <circle className=\"fill\" cx=\"9.69\" cy=\"9.47\" r=\"0.97\" />\n </svg>\n)\n"],"names":["React","UploadIcon","svg","className","viewBox","xmlns","path","d","circle","cx","cy","r"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,eAAc;AAErB,OAAO,MAAMC,aAAuB,kBAClC,MAACC;QAAIC,WAAU;QAAoBC,SAAQ;QAAYC,OAAM;;0BAC3D,KAACC;gBACCH,WAAU;gBACVI,GAAE;;0BAEJ,KAACC;gBAAOL,WAAU;gBAAOM,IAAG;gBAAOC,IAAG;gBAAOC,GAAE;;;OAElD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/icons/headings/H1/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H1Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h1-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z\"\n />\n </svg>\n)\n"],"names":["React","H1Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../../src/field/icons/headings/H1/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H1Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h1-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z\"\n />\n </svg>\n)\n"],"names":["React","H1Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/icons/headings/H2/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H2Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h2-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8a2 2 0 01-2 2h-2v2h4v2H9v-4a2 2 0 012-2h2V9H9V7h4a2 2 0 012 2v2z\"\n />\n </svg>\n)\n"],"names":["React","H2Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../../src/field/icons/headings/H2/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H2Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h2-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8a2 2 0 01-2 2h-2v2h4v2H9v-4a2 2 0 012-2h2V9H9V7h4a2 2 0 012 2v2z\"\n />\n </svg>\n)\n"],"names":["React","H2Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/icons/headings/H3/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H3Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h3-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M.01 0h24v24h-24z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15a2 2 0 01-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4a2 2 0 012 2v1.5z\"\n />\n </svg>\n)\n"],"names":["React","H3Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAoBL,MAAK;;0BACjC,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../../src/field/icons/headings/H3/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H3Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h3-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M.01 0h24v24h-24z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15a2 2 0 01-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4a2 2 0 012 2v1.5z\"\n />\n </svg>\n)\n"],"names":["React","H3Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAoBL,MAAK;;0BACjC,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/icons/headings/H4/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H4Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h4-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z\"\n />\n </svg>\n)\n"],"names":["React","H4Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../../src/field/icons/headings/H4/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H4Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h4-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z\"\n />\n </svg>\n)\n"],"names":["React","H4Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/icons/headings/H5/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H5Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h5-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2a2 2 0 012 2v2a2 2 0 01-2 2H9v-2h4v-2H9V7h6v2z\"\n />\n </svg>\n)\n"],"names":["React","H5Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../../src/field/icons/headings/H5/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H5Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h5-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2a2 2 0 012 2v2a2 2 0 01-2 2H9v-2h4v-2H9V7h6v2z\"\n />\n </svg>\n)\n"],"names":["React","H5Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/icons/headings/H6/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H6Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h6-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V9a2 2 0 012-2h4v2z\"\n />\n </svg>\n)\n"],"names":["React","H6Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
1
+ {"version":3,"sources":["../../../../../src/field/icons/headings/H6/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const H6Icon: React.FC = () => (\n <svg\n aria-hidden=\"true\"\n className=\"graphic h6-icon\"\n fill=\"currentColor\"\n focusable=\"false\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path\n className=\"fill\"\n d=\"M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V9a2 2 0 012-2h4v2z\"\n />\n </svg>\n)\n"],"names":["React","H6Icon","svg","aria-hidden","className","fill","focusable","viewBox","xmlns","path","d"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAEzB,OAAO,MAAMC,SAAmB,kBAC9B,MAACC;QACCC,eAAY;QACZC,WAAU;QACVC,MAAK;QACLC,WAAU;QACVC,SAAQ;QACRC,OAAM;;0BAEN,KAACC;gBAAKC,GAAE;gBAAgBL,MAAK;;0BAC7B,KAACI;gBACCL,WAAU;gBACVM,GAAE;;;OAGP"}
@@ -1,4 +1,4 @@
1
- import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
1
+ import type { FormFieldBase } from '@payloadcms/ui';
2
2
  import React from 'react';
3
3
  export declare const RichTextField: React.FC<FormFieldBase & {
4
4
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAGjE,OAAO,KAA8C,MAAM,OAAO,CAAA;AAalE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC,aAAa,GAAG;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;CACnD,CAoDF,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/field/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAGnD,OAAO,KAA8C,MAAM,OAAO,CAAA;AAalE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAClC,aAAa,GAAG;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;CACnD,CAoDF,CAAA"}
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui/client';
3
+ import { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui';
4
4
  import React, { Suspense, lazy, useEffect, useState } from 'react';
5
5
  import { createFeatureMap } from './createFeatureMap.js';
6
6
  const RichTextEditor = /*#__PURE__*/ lazy(()=>import('./RichText.js').then((module)=>({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/field/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui/client'\nimport React, { Suspense, lazy, useEffect, useState } from 'react'\n\nimport type { RichTextPlugin } from '../types.js'\nimport type { EnabledFeatures } from './types.js'\n\nimport { createFeatureMap } from './createFeatureMap.js'\n\nconst RichTextEditor = lazy(() =>\n import('./RichText.js').then((module) => ({\n default: module.RichText,\n })),\n)\n\nexport const RichTextField: React.FC<\n FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n> = (props) => {\n const { richTextComponentMap } = props\n\n const { schemaPath } = useFieldProps()\n const clientFunctions = useClientFunctions()\n const [hasLoadedPlugins, setHasLoadedPlugins] = useState(false)\n\n const [features] = useState<EnabledFeatures>(() => {\n return createFeatureMap(richTextComponentMap)\n })\n\n const [plugins, setPlugins] = useState<RichTextPlugin[]>([])\n\n useEffect(() => {\n if (!hasLoadedPlugins) {\n const plugins: RichTextPlugin[] = []\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`slatePlugin.${schemaPath}.`)) {\n plugins.push(plugin)\n }\n })\n\n if (plugins.length === features.plugins.length) {\n setPlugins(plugins)\n setHasLoadedPlugins(true)\n }\n }\n }, [hasLoadedPlugins, clientFunctions, schemaPath, features.plugins.length])\n\n if (!hasLoadedPlugins) {\n return (\n <React.Fragment>\n {Array.isArray(features.plugins) &&\n features.plugins.map((Plugin, i) => {\n return <React.Fragment key={i}>{Plugin}</React.Fragment>\n })}\n </React.Fragment>\n )\n }\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n <RichTextEditor\n {...props}\n elements={features.elements}\n leaves={features.leaves}\n plugins={plugins}\n />\n </Suspense>\n )\n}\n"],"names":["ShimmerEffect","useClientFunctions","useFieldProps","React","Suspense","lazy","useEffect","useState","createFeatureMap","RichTextEditor","then","module","default","RichText","RichTextField","props","richTextComponentMap","schemaPath","clientFunctions","hasLoadedPlugins","setHasLoadedPlugins","features","plugins","setPlugins","Object","entries","forEach","key","plugin","startsWith","push","length","Fragment","Array","isArray","map","Plugin","i","fallback","height","elements","leaves"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,aAAa,QAAQ,wBAAuB;AACxF,OAAOC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAKlE,SAASC,gBAAgB,QAAQ,wBAAuB;AAExD,MAAMC,+BAAiBJ,KAAK,IAC1B,MAAM,CAAC,iBAAiBK,IAAI,CAAC,CAACC,SAAY,CAAA;YACxCC,SAASD,OAAOE,QAAQ;QAC1B,CAAA;AAGF,OAAO,MAAMC,gBAKT,CAACC;IACH,MAAM,EAAEC,oBAAoB,EAAE,GAAGD;IAEjC,MAAM,EAAEE,UAAU,EAAE,GAAGf;IACvB,MAAMgB,kBAAkBjB;IACxB,MAAM,CAACkB,kBAAkBC,oBAAoB,GAAGb,SAAS;IAEzD,MAAM,CAACc,SAAS,GAAGd,SAA0B;QAC3C,OAAOC,iBAAiBQ;IAC1B;IAEA,MAAM,CAACM,SAASC,WAAW,GAAGhB,SAA2B,EAAE;IAE3DD,UAAU;QACR,IAAI,CAACa,kBAAkB;YACrB,MAAMG,UAA4B,EAAE;YAEpCE,OAAOC,OAAO,CAACP,iBAAiBQ,OAAO,CAAC,CAAC,CAACC,KAAKC,OAAO;gBACpD,IAAID,IAAIE,UAAU,CAAC,CAAC,YAAY,EAAEZ,WAAW,CAAC,CAAC,GAAG;oBAChDK,QAAQQ,IAAI,CAACF;gBACf;YACF;YAEA,IAAIN,QAAQS,MAAM,KAAKV,SAASC,OAAO,CAACS,MAAM,EAAE;gBAC9CR,WAAWD;gBACXF,oBAAoB;YACtB;QACF;IACF,GAAG;QAACD;QAAkBD;QAAiBD;QAAYI,SAASC,OAAO,CAACS,MAAM;KAAC;IAE3E,IAAI,CAACZ,kBAAkB;QACrB,qBACE,KAAChB,MAAM6B,QAAQ;sBACZC,MAAMC,OAAO,CAACb,SAASC,OAAO,KAC7BD,SAASC,OAAO,CAACa,GAAG,CAAC,CAACC,QAAQC;gBAC5B,qBAAO,KAAClC,MAAM6B,QAAQ;8BAAUI;mBAAJC;YAC9B;;IAGR;IAEA,qBACE,KAACjC;QAASkC,wBAAU,KAACtC;YAAcuC,QAAO;;kBACxC,cAAA,KAAC9B;YACE,GAAGM,KAAK;YACTyB,UAAUnB,SAASmB,QAAQ;YAC3BC,QAAQpB,SAASoB,MAAM;YACvBnB,SAASA;;;AAIjB,EAAC"}
1
+ {"version":3,"sources":["../../src/field/index.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui'\n\nimport { ShimmerEffect, useClientFunctions, useFieldProps } from '@payloadcms/ui'\nimport React, { Suspense, lazy, useEffect, useState } from 'react'\n\nimport type { RichTextPlugin } from '../types.js'\nimport type { EnabledFeatures } from './types.js'\n\nimport { createFeatureMap } from './createFeatureMap.js'\n\nconst RichTextEditor = lazy(() =>\n import('./RichText.js').then((module) => ({\n default: module.RichText,\n })),\n)\n\nexport const RichTextField: React.FC<\n FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n> = (props) => {\n const { richTextComponentMap } = props\n\n const { schemaPath } = useFieldProps()\n const clientFunctions = useClientFunctions()\n const [hasLoadedPlugins, setHasLoadedPlugins] = useState(false)\n\n const [features] = useState<EnabledFeatures>(() => {\n return createFeatureMap(richTextComponentMap)\n })\n\n const [plugins, setPlugins] = useState<RichTextPlugin[]>([])\n\n useEffect(() => {\n if (!hasLoadedPlugins) {\n const plugins: RichTextPlugin[] = []\n\n Object.entries(clientFunctions).forEach(([key, plugin]) => {\n if (key.startsWith(`slatePlugin.${schemaPath}.`)) {\n plugins.push(plugin)\n }\n })\n\n if (plugins.length === features.plugins.length) {\n setPlugins(plugins)\n setHasLoadedPlugins(true)\n }\n }\n }, [hasLoadedPlugins, clientFunctions, schemaPath, features.plugins.length])\n\n if (!hasLoadedPlugins) {\n return (\n <React.Fragment>\n {Array.isArray(features.plugins) &&\n features.plugins.map((Plugin, i) => {\n return <React.Fragment key={i}>{Plugin}</React.Fragment>\n })}\n </React.Fragment>\n )\n }\n\n return (\n <Suspense fallback={<ShimmerEffect height=\"35vh\" />}>\n <RichTextEditor\n {...props}\n elements={features.elements}\n leaves={features.leaves}\n plugins={plugins}\n />\n </Suspense>\n )\n}\n"],"names":["ShimmerEffect","useClientFunctions","useFieldProps","React","Suspense","lazy","useEffect","useState","createFeatureMap","RichTextEditor","then","module","default","RichText","RichTextField","props","richTextComponentMap","schemaPath","clientFunctions","hasLoadedPlugins","setHasLoadedPlugins","features","plugins","setPlugins","Object","entries","forEach","key","plugin","startsWith","push","length","Fragment","Array","isArray","map","Plugin","i","fallback","height","elements","leaves"],"mappings":"AAAA;;AAIA,SAASA,aAAa,EAAEC,kBAAkB,EAAEC,aAAa,QAAQ,iBAAgB;AACjF,OAAOC,SAASC,QAAQ,EAAEC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,QAAO;AAKlE,SAASC,g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UnB,SAASmB,QAAQ;YAC3BC,QAAQpB,SAASoB,MAAM;YACvBnB,SAASA;;;AAIjB,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/leaves/Button.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { useSlate } from 'slate-react'\n\nimport '../buttons.scss'\nimport { isLeafActive } from './isActive.js'\nimport { toggleLeaf } from './toggle.js'\n\nconst baseClass = 'rich-text__button'\n\nexport const LeafButton = ({ children, format }) => {\n const editor = useSlate()\n\n return (\n <button\n className={[baseClass, isLeafActive(editor, format) && `${baseClass}__button--active`]\n .filter(Boolean)\n .join(' ')}\n onMouseDown={(event) => {\n event.preventDefault()\n toggleLeaf(editor, format)\n }}\n type=\"button\"\n >\n {children}\n </button>\n )\n}\n"],"names":["React","useSlate","isLeafActive","toggleLeaf","baseClass","LeafButton","children","format","editor","button","className","filter","Boolean","join","onMouseDown","event","preventDefault","type"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AACzB,SAASC,QAAQ,QAAQ,cAAa;AAEtC,OAAO,kBAAiB;AACxB,SAASC,YAAY,QAAQ,gBAAe;AAC5C,SAASC,UAAU,QAAQ,cAAa;AAExC,MAAMC,YAAY;AAElB,OAAO,MAAMC,aAAa,CAAC,EAAEC,QAAQ,EAAEC,MAAM,EAAE;IAC7C,MAAMC,SAASP;IAEf,qBACE,KAACQ;QACCC,WAAW;YAACN;YAAWF,aAAaM,QAAQD,WAAW,CAAC,EAAEH,UAAU,gBAAgB,CAAC;SAAC,CACnFO,MAAM,CAACC,SACPC,IAAI,CAAC;QACRC,aAAa,CAACC;YACZA,MAAMC,cAAc;YACpBb,WAAWK,QAAQD;QACrB;QACAU,MAAK;kBAEJX;;AAGP,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/leaves/Button.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\nimport { useSlate } from 'slate-react'\n\nimport '../buttons.scss'\nimport { isLeafActive } from './isActive.js'\nimport { toggleLeaf } from './toggle.js'\n\nconst baseClass = 'rich-text__button'\n\nexport const LeafButton = ({ children, format }) => {\n const editor = useSlate()\n\n return (\n <button\n className={[baseClass, isLeafActive(editor, format) && `${baseClass}__button--active`]\n .filter(Boolean)\n .join(' ')}\n onMouseDown={(event) => {\n event.preventDefault()\n toggleLeaf(editor, format)\n }}\n type=\"button\"\n >\n {children}\n </button>\n )\n}\n"],"names":["React","useSlate","isLeafActive","toggleLeaf","baseClass","LeafButton","children","format","editor","button","className","filter","Boolean","join","onMouseDown","event","preventDefault","type"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AACzB,SAASC,QAAQ,QAAQ,cAAa;AAEtC,OAAO,kBAAiB;AACxB,SAASC,YAAY,QAAQ,gBAAe;AAC5C,SAASC,UAAU,QAAQ,cAAa;AAExC,MAAMC,YAAY;AAElB,OAAO,MAAMC,aAAa,CAAC,EAAEC,QAAQ,EAAEC,MAAM,EAAE;IAC7C,MAAMC,SAASP;IAEf,qBACE,KAACQ;QACCC,WAAW;YAACN;YAAWF,aAAaM,QAAQD,WAAW,CAAC,EAAEH,UAAU,gBAAgB,CAAC;SAAC,CACnFO,MAAM,CAACC,SACPC,IAAI,CAAC;QACRC,aAAa,CAACC;YACZA,MAAMC,cAAc;YACpBb,WAAWK,QAAQD;QACrB;QACAU,MAAK;kBAEJX;;AAGP,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/leaves/bold/Bold/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Bold = () => {\n const { attributes, children } = useLeaf()\n return <strong {...attributes}>{children}</strong>\n}\n"],"names":["React","useLeaf","Bold","attributes","children","strong"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,OAAO;IAClB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAQ,GAAGF,UAAU;kBAAGC;;AAClC,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/leaves/bold/Bold/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Bold = () => {\n const { attributes, children } = useLeaf()\n return <strong {...attributes}>{children}</strong>\n}\n"],"names":["React","useLeaf","Bold","attributes","children","strong"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,OAAO;IAClB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAQ,GAAGF,UAAU;kBAAGC;;AAClC,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/leaves/bold/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { BoldIcon } from '../../icons/Bold/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Bold } from './Bold/index.js'\n\nexport const bold: RichTextCustomLeaf = {\n name: 'bold',\n Button: () => (\n <LeafButton format=\"bold\">\n <BoldIcon />\n </LeafButton>\n ),\n Leaf: Bold,\n}\n"],"names":["React","BoldIcon","LeafButton","Bold","bold","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,QAAQ,QAAQ,4BAA2B;AACpD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,IAAI,QAAQ,kBAAiB;AAEtC,OAAO,MAAMC,OAA2B;IACtCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/leaves/bold/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { BoldIcon } from '../../icons/Bold/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Bold } from './Bold/index.js'\n\nexport const bold: RichTextCustomLeaf = {\n name: 'bold',\n Button: () => (\n <LeafButton format=\"bold\">\n <BoldIcon />\n </LeafButton>\n ),\n Leaf: Bold,\n}\n"],"names":["React","BoldIcon","LeafButton","Bold","bold","name","Button","format","Leaf"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,QAAQ,QAAQ,4BAA2B;AACpD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,IAAI,QAAQ,kBAAiB;AAEtC,OAAO,MAAMC,OAA2B;IACtCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/leaves/code/Code/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Code = () => {\n const { attributes, children } = useLeaf()\n return <code {...attributes}>{children}</code>\n}\n"],"names":["React","useLeaf","Code","attributes","children","code"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,OAAO;IAClB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAM,GAAGF,UAAU;kBAAGC;;AAChC,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/leaves/code/Code/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Code = () => {\n const { attributes, children } = useLeaf()\n return <code {...attributes}>{children}</code>\n}\n"],"names":["React","useLeaf","Code","attributes","children","code"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,OAAO;IAClB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAM,GAAGF,UAAU;kBAAGC;;AAChC,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/leaves/code/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { CodeIcon } from '../../icons/Code/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Code } from './Code/index.js'\n\nexport const code: RichTextCustomLeaf = {\n name: 'code',\n Button: () => (\n <LeafButton format=\"code\">\n <CodeIcon />\n </LeafButton>\n ),\n Leaf: Code,\n}\n"],"names":["React","CodeIcon","LeafButton","Code","code","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,QAAQ,QAAQ,4BAA2B;AACpD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,IAAI,QAAQ,kBAAiB;AAEtC,OAAO,MAAMC,OAA2B;IACtCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/leaves/code/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { CodeIcon } from '../../icons/Code/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Code } from './Code/index.js'\n\nexport const code: RichTextCustomLeaf = {\n name: 'code',\n Button: () => (\n <LeafButton format=\"code\">\n <CodeIcon />\n </LeafButton>\n ),\n Leaf: Code,\n}\n"],"names":["React","CodeIcon","LeafButton","Code","code","name","Button","format","Leaf"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,QAAQ,QAAQ,4BAA2B;AACpD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,IAAI,QAAQ,kBAAiB;AAEtC,OAAO,MAAMC,OAA2B;IACtCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/leaves/index.tsx"],"sourcesContent":["import type { RichTextCustomLeaf } from '../../types.js'\n\nimport { bold } from './bold/index.js'\nimport { code } from './code/index.js'\nimport { italic } from './italic/index.js'\nimport { strikethrough } from './strikethrough/index.js'\nimport { underline } from './underline/index.js'\n\nexport const defaultLeaves: Record<string, RichTextCustomLeaf> = {\n bold,\n code,\n italic,\n strikethrough,\n underline,\n}\n"],"names":["bold","code","italic","strikethrough","underline","defaultLeaves"],"rangeMappings":";;;;;;;;;;;","mappings":"AAEA,SAASA,IAAI,QAAQ,kBAAiB;AACtC,SAASC,IAAI,QAAQ,kBAAiB;AACtC,SAASC,MAAM,QAAQ,oBAAmB;AAC1C,SAASC,aAAa,QAAQ,2BAA0B;AACxD,SAASC,SAAS,QAAQ,uBAAsB;AAEhD,OAAO,MAAMC,gBAAoD;IAC/DL;IACAC;IACAC;IACAC;IACAC;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/leaves/index.tsx"],"sourcesContent":["import type { RichTextCustomLeaf } from '../../types.js'\n\nimport { bold } from './bold/index.js'\nimport { code } from './code/index.js'\nimport { italic } from './italic/index.js'\nimport { strikethrough } from './strikethrough/index.js'\nimport { underline } from './underline/index.js'\n\nexport const defaultLeaves: Record<string, RichTextCustomLeaf> = {\n bold,\n code,\n italic,\n strikethrough,\n underline,\n}\n"],"names":["bold","code","italic","strikethrough","underline","defaultLeaves"],"mappings":"AAEA,SAASA,IAAI,QAAQ,kBAAiB;AACtC,SAASC,IAAI,QAAQ,kBAAiB;AACtC,SAASC,MAAM,QAAQ,oBAAmB;AAC1C,SAASC,aAAa,QAAQ,2BAA0B;AACxD,SAASC,SAAS,QAAQ,uBAAsB;AAEhD,OAAO,MAAMC,gBAAoD;IAC/DL;IACAC;IACAC;IACAC;IACAC;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/leaves/isActive.tsx"],"sourcesContent":["import { Editor } from 'slate'\n\nexport const isLeafActive = (editor, format) => {\n const leaves = Editor.marks(editor)\n return leaves ? leaves[format] === true : false\n}\n"],"names":["Editor","isLeafActive","editor","format","leaves","marks"],"rangeMappings":";;;;","mappings":"AAAA,SAASA,MAAM,QAAQ,QAAO;AAE9B,OAAO,MAAMC,eAAe,CAACC,QAAQC;IACnC,MAAMC,SAASJ,OAAOK,KAAK,CAACH;IAC5B,OAAOE,SAASA,MAAM,CAACD,OAAO,KAAK,OAAO;AAC5C,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/leaves/isActive.tsx"],"sourcesContent":["import { Editor } from 'slate'\n\nexport const isLeafActive = (editor, format) => {\n const leaves = Editor.marks(editor)\n return leaves ? leaves[format] === true : false\n}\n"],"names":["Editor","isLeafActive","editor","format","leaves","marks"],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAO;AAE9B,OAAO,MAAMC,eAAe,CAACC,QAAQC;IACnC,MAAMC,SAASJ,OAAOK,KAAK,CAACH;IAC5B,OAAOE,SAASA,MAAM,CAACD,OAAO,KAAK,OAAO;AAC5C,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/leaves/italic/Italic/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Italic = () => {\n const { attributes, children } = useLeaf()\n return <em {...attributes}>{children}</em>\n}\n"],"names":["React","useLeaf","Italic","attributes","children","em"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,SAAS;IACpB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAI,GAAGF,UAAU;kBAAGC;;AAC9B,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/leaves/italic/Italic/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Italic = () => {\n const { attributes, children } = useLeaf()\n return <em {...attributes}>{children}</em>\n}\n"],"names":["React","useLeaf","Italic","attributes","children","em"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,SAAS;IACpB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAI,GAAGF,UAAU;kBAAGC;;AAC9B,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/leaves/italic/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { ItalicIcon } from '../../icons/Italic/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Italic } from './Italic/index.js'\n\nexport const italic: RichTextCustomLeaf = {\n name: 'italic',\n Button: () => (\n <LeafButton format=\"italic\">\n <ItalicIcon />\n </LeafButton>\n ),\n Leaf: Italic,\n}\n"],"names":["React","ItalicIcon","LeafButton","Italic","italic","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,MAAM,QAAQ,oBAAmB;AAE1C,OAAO,MAAMC,SAA6B;IACxCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/leaves/italic/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { ItalicIcon } from '../../icons/Italic/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Italic } from './Italic/index.js'\n\nexport const italic: RichTextCustomLeaf = {\n name: 'italic',\n Button: () => (\n <LeafButton format=\"italic\">\n <ItalicIcon />\n </LeafButton>\n ),\n Leaf: Italic,\n}\n"],"names":["React","ItalicIcon","LeafButton","Italic","italic","name","Button","format","Leaf"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,UAAU,QAAQ,8BAA6B;AACxD,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,MAAM,QAAQ,oBAAmB;AAE1C,OAAO,MAAMC,SAA6B;IACxCC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/leaves/strikethrough/Strikethrough/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Strikethrough = () => {\n const { attributes, children } = useLeaf()\n return <del {...attributes}>{children}</del>\n}\n"],"names":["React","useLeaf","Strikethrough","attributes","children","del"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,gBAAgB;IAC3B,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAK,GAAGF,UAAU;kBAAGC;;AAC/B,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/leaves/strikethrough/Strikethrough/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Strikethrough = () => {\n const { attributes, children } = useLeaf()\n return <del {...attributes}>{children}</del>\n}\n"],"names":["React","useLeaf","Strikethrough","attributes","children","del"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,gBAAgB;IAC3B,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAK,GAAGF,UAAU;kBAAGC;;AAC/B,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/leaves/strikethrough/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { StrikethroughIcon } from '../../icons/Strikethrough/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Strikethrough } from './Strikethrough/index.js'\n\nexport const strikethrough: RichTextCustomLeaf = {\n name: 'strikethrough',\n Button: () => (\n <LeafButton format=\"strikethrough\">\n <StrikethroughIcon />\n </LeafButton>\n ),\n Leaf: Strikethrough,\n}\n"],"names":["React","StrikethroughIcon","LeafButton","Strikethrough","strikethrough","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,iBAAiB,QAAQ,qCAAoC;AACtE,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,aAAa,QAAQ,2BAA0B;AAExD,OAAO,MAAMC,gBAAoC;IAC/CC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/leaves/strikethrough/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { StrikethroughIcon } from '../../icons/Strikethrough/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Strikethrough } from './Strikethrough/index.js'\n\nexport const strikethrough: RichTextCustomLeaf = {\n name: 'strikethrough',\n Button: () => (\n <LeafButton format=\"strikethrough\">\n <StrikethroughIcon />\n </LeafButton>\n ),\n Leaf: Strikethrough,\n}\n"],"names":["React","StrikethroughIcon","LeafButton","Strikethrough","strikethrough","name","Button","format","Leaf"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,iBAAiB,QAAQ,qCAAoC;AACtE,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,aAAa,QAAQ,2BAA0B;AAExD,OAAO,MAAMC,gBAAoC;IAC/CC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/leaves/toggle.tsx"],"sourcesContent":["import { Editor } from 'slate'\n\nimport { isLeafActive } from './isActive.js'\n\nexport const toggleLeaf = (editor, format) => {\n const isActive = isLeafActive(editor, format)\n\n if (isActive) {\n Editor.removeMark(editor, format)\n } else {\n Editor.addMark(editor, format, true)\n }\n}\n"],"names":["Editor","isLeafActive","toggleLeaf","editor","format","isActive","removeMark","addMark"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,SAASA,MAAM,QAAQ,QAAO;AAE9B,SAASC,YAAY,QAAQ,gBAAe;AAE5C,OAAO,MAAMC,aAAa,CAACC,QAAQC;IACjC,MAAMC,WAAWJ,aAAaE,QAAQC;IAEtC,IAAIC,UAAU;QACZL,OAAOM,UAAU,CAACH,QAAQC;IAC5B,OAAO;QACLJ,OAAOO,OAAO,CAACJ,QAAQC,QAAQ;IACjC;AACF,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/leaves/toggle.tsx"],"sourcesContent":["import { Editor } from 'slate'\n\nimport { isLeafActive } from './isActive.js'\n\nexport const toggleLeaf = (editor, format) => {\n const isActive = isLeafActive(editor, format)\n\n if (isActive) {\n Editor.removeMark(editor, format)\n } else {\n Editor.addMark(editor, format, true)\n }\n}\n"],"names":["Editor","isLeafActive","toggleLeaf","editor","format","isActive","removeMark","addMark"],"mappings":"AAAA,SAASA,MAAM,QAAQ,QAAO;AAE9B,SAASC,YAAY,QAAQ,gBAAe;AAE5C,OAAO,MAAMC,aAAa,CAACC,QAAQC;IACjC,MAAMC,WAAWJ,aAAaE,QAAQC;IAEtC,IAAIC,UAAU;QACZL,OAAOM,UAAU,CAACH,QAAQC;IAC5B,OAAO;QACLJ,OAAOO,OAAO,CAACJ,QAAQC,QAAQ;IACjC;AACF,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/field/leaves/underline/Underline/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Underline = () => {\n const { attributes, children } = useLeaf()\n return <u {...attributes}>{children}</u>\n}\n"],"names":["React","useLeaf","Underline","attributes","children","u"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,YAAY;IACvB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAG,GAAGF,UAAU;kBAAGC;;AAC7B,EAAC"}
1
+ {"version":3,"sources":["../../../../../src/field/leaves/underline/Underline/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport { useLeaf } from '../../../providers/LeafProvider.js'\n\nexport const Underline = () => {\n const { attributes, children } = useLeaf()\n return <u {...attributes}>{children}</u>\n}\n"],"names":["React","useLeaf","Underline","attributes","children","u"],"mappings":"AAAA;;AACA,OAAOA,WAAW,QAAO;AAEzB,SAASC,OAAO,QAAQ,qCAAoC;AAE5D,OAAO,MAAMC,YAAY;IACvB,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IACjC,qBAAO,KAACI;QAAG,GAAGF,UAAU;kBAAGC;;AAC7B,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/field/leaves/underline/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { UnderlineIcon } from '../../icons/Underline/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Underline } from './Underline/index.js'\n\nexport const underline: RichTextCustomLeaf = {\n name: 'underline',\n Button: () => (\n <LeafButton format=\"underline\">\n <UnderlineIcon />\n </LeafButton>\n ),\n Leaf: Underline,\n}\n"],"names":["React","UnderlineIcon","LeafButton","Underline","underline","name","Button","format","Leaf"],"rangeMappings":";;;;;;;;;;;;","mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,aAAa,QAAQ,iCAAgC;AAC9D,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,SAAS,QAAQ,uBAAsB;AAEhD,OAAO,MAAMC,YAAgC;IAC3CC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
1
+ {"version":3,"sources":["../../../../src/field/leaves/underline/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport type { RichTextCustomLeaf } from '../../../types.js'\n\nimport { UnderlineIcon } from '../../icons/Underline/index.js'\nimport { LeafButton } from '../Button.js'\nimport { Underline } from './Underline/index.js'\n\nexport const underline: RichTextCustomLeaf = {\n name: 'underline',\n Button: () => (\n <LeafButton format=\"underline\">\n <UnderlineIcon />\n </LeafButton>\n ),\n Leaf: Underline,\n}\n"],"names":["React","UnderlineIcon","LeafButton","Underline","underline","name","Button","format","Leaf"],"mappings":";AAAA,OAAOA,WAAW,QAAO;AAIzB,SAASC,aAAa,QAAQ,iCAAgC;AAC9D,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,SAAS,QAAQ,uBAAsB;AAEhD,OAAO,MAAMC,YAAgC;IAC3CC,MAAM;IACNC,QAAQ,kBACN,KAACJ;YAAWK,QAAO;sBACjB,cAAA,KAACN;;IAGLO,MAAML;AACR,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/field/mergeCustomFunctions.tsx"],"sourcesContent":["export default (enabledFunctions, builtInFunctions) => {\n const formattedEnabledFunctions = [...enabledFunctions]\n\n if (enabledFunctions.indexOf('ul') > -1 || enabledFunctions.indexOf('ol') > -1) {\n formattedEnabledFunctions.push('li')\n }\n\n return formattedEnabledFunctions.reduce((resultingFunctions, func) => {\n if (typeof func === 'object' && func.name) {\n return {\n ...resultingFunctions,\n [func.name]: func,\n }\n }\n\n if (typeof func === 'string' && builtInFunctions[func]) {\n return {\n ...resultingFunctions,\n [func]: builtInFunctions[func],\n }\n }\n\n return resultingFunctions\n }, {})\n}\n"],"names":["enabledFunctions","builtInFunctions","formattedEnabledFunctions","indexOf","push","reduce","resultingFunctions","func","name"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,eAAe,CAAA,CAACA,kBAAkBC;IAChC,MAAMC,4BAA4B;WAAIF;KAAiB;IAEvD,IAAIA,iBAAiBG,OAAO,CAAC,QAAQ,CAAC,KAAKH,iBAAiBG,OAAO,CAAC,QAAQ,CAAC,GAAG;QAC9ED,0BAA0BE,IAAI,CAAC;IACjC;IAEA,OAAOF,0BAA0BG,MAAM,CAAC,CAACC,oBAAoBC;QAC3D,IAAI,OAAOA,SAAS,YAAYA,KAAKC,IAAI,EAAE;YACzC,OAAO;gBACL,GAAGF,kBAAkB;gBACrB,CAACC,KAAKC,IAAI,CAAC,EAAED;YACf;QACF;QAEA,IAAI,OAAOA,SAAS,YAAYN,gBAAgB,CAACM,KAAK,EAAE;YACtD,OAAO;gBACL,GAAGD,kBAAkB;gBACrB,CAACC,KAAK,EAAEN,gBAAgB,CAACM,KAAK;YAChC;QACF;QAEA,OAAOD;IACT,GAAG,CAAC;AACN,CAAA,EAAC"}
1
+ {"version":3,"sources":["../../src/field/mergeCustomFunctions.tsx"],"sourcesContent":["export default (enabledFunctions, builtInFunctions) => {\n const formattedEnabledFunctions = [...enabledFunctions]\n\n if (enabledFunctions.indexOf('ul') > -1 || enabledFunctions.indexOf('ol') > -1) {\n formattedEnabledFunctions.push('li')\n }\n\n return formattedEnabledFunctions.reduce((resultingFunctions, func) => {\n if (typeof func === 'object' && func.name) {\n return {\n ...resultingFunctions,\n [func.name]: func,\n }\n }\n\n if (typeof func === 'string' && builtInFunctions[func]) {\n return {\n ...resultingFunctions,\n [func]: builtInFunctions[func],\n }\n }\n\n return resultingFunctions\n }, {})\n}\n"],"names":["enabledFunctions","builtInFunctions","formattedEnabledFunctions","indexOf","push","reduce","resultingFunctions","func","name"],"mappings":"AAAA,eAAe,CAAA,CAACA,kBAAkBC;IAChC,MAAMC,4BAA4B;WAAIF;KAAiB;IAEvD,IAAIA,iBAAiBG,OAAO,CAAC,QAAQ,CAAC,KAAKH,iBAAiBG,OAAO,CAAC,QAAQ,CAAC,GAAG;QAC9ED,0BAA0BE,IAAI,CAAC;IACjC;IAEA,OAAOF,0BAA0BG,MAAM,CAAC,CAACC,oBAAoBC;QAC3D,IAAI,OAAOA,SAAS,YAAYA,KAAKC,IAAI,EAAE;YACzC,OAAO;gBACL,GAAGF,kBAAkB;gBACrB,CAACC,KAAKC,IAAI,CAAC,EAAED;YACf;QACF;QAEA,IAAI,OAAOA,SAAS,YAAYN,gBAAgB,CAACM,KAAK,EAAE;YACtD,OAAO;gBACL,GAAGD,kBAAkB;gBACrB,CAACC,KAAK,EAAEN,gBAAgB,CAACM,KAAK;YAChC;QACF;QAEA,OAAOD;IACT,GAAG,CAAC;AACN,CAAA,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/plugins/withEnterBreakOut.ts"],"sourcesContent":["const enterBreakOutTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'link']\n\nexport const withEnterBreakOut = (editor) => {\n const newEditor = editor\n newEditor.shouldBreakOutOnEnter = (element) => enterBreakOutTypes.includes(String(element.type))\n return newEditor\n}\n"],"names":["enterBreakOutTypes","withEnterBreakOut","editor","newEditor","shouldBreakOutOnEnter","element","includes","String","type"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,MAAMA,qBAAqB;IAAC;IAAM;IAAM;IAAM;IAAM;IAAM;IAAM;CAAO;AAEvE,OAAO,MAAMC,oBAAoB,CAACC;IAChC,MAAMC,YAAYD;IAClBC,UAAUC,qBAAqB,GAAG,CAACC,UAAYL,mBAAmBM,QAAQ,CAACC,OAAOF,QAAQG,IAAI;IAC9F,OAAOL;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/plugins/withEnterBreakOut.ts"],"sourcesContent":["const enterBreakOutTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'link']\n\nexport const withEnterBreakOut = (editor) => {\n const newEditor = editor\n newEditor.shouldBreakOutOnEnter = (element) => enterBreakOutTypes.includes(String(element.type))\n return newEditor\n}\n"],"names":["enterBreakOutTypes","withEnterBreakOut","editor","newEditor","shouldBreakOutOnEnter","element","includes","String","type"],"mappings":"AAAA,MAAMA,qBAAqB;IAAC;IAAM;IAAM;IAAM;IAAM;IAAM;IAAM;CAAO;AAEvE,OAAO,MAAMC,oBAAoB,CAACC;IAChC,MAAMC,YAAYD;IAClBC,UAAUC,qBAAqB,GAAG,CAACC,UAAYL,mBAAmBM,QAAQ,CAACC,OAAOF,QAAQG,IAAI;IAC9F,OAAOL;AACT,EAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/plugins/withHTML.tsx"],"sourcesContent":["import { Transforms } from 'slate'\nimport { jsx } from 'slate-hyperscript'\n\nconst ELEMENT_TAGS = {\n A: (el) => ({\n type: 'link',\n newTab: el.getAttribute('target') === '_blank',\n url: el.getAttribute('href'),\n }),\n BLOCKQUOTE: () => ({ type: 'blockquote' }),\n H1: () => ({ type: 'h1' }),\n H2: () => ({ type: 'h2' }),\n H3: () => ({ type: 'h3' }),\n H4: () => ({ type: 'h4' }),\n H5: () => ({ type: 'h5' }),\n H6: () => ({ type: 'h6' }),\n LI: () => ({ type: 'li' }),\n OL: () => ({ type: 'ol' }),\n P: () => ({}),\n PRE: () => ({ type: 'code' }),\n UL: () => ({ type: 'ul' }),\n}\n\nconst TEXT_TAGS = {\n CODE: () => ({ code: true }),\n DEL: () => ({ strikethrough: true }),\n EM: () => ({ italic: true }),\n I: () => ({ italic: true }),\n S: () => ({ strikethrough: true }),\n STRONG: () => ({ bold: true }),\n U: () => ({ underline: true }),\n}\n\nconst deserialize = (el) => {\n if (el.nodeType === 3) {\n return el.textContent\n }\n if (el.nodeType !== 1) {\n return null\n }\n if (el.nodeName === 'BR') {\n return '\\n'\n }\n\n const { nodeName } = el\n let parent = el\n\n if (nodeName === 'PRE' && el.childNodes[0] && el.childNodes[0].nodeName === 'CODE') {\n ;[parent] = el.childNodes\n }\n\n let children = Array.from(parent.childNodes).map(deserialize).flat()\n\n if (children.length === 0) {\n children = [{ text: '' }]\n }\n\n if (el.nodeName === 'BODY') {\n return jsx('fragment', {}, children)\n }\n\n if (ELEMENT_TAGS[nodeName]) {\n const attrs = ELEMENT_TAGS[nodeName](el)\n return jsx('element', attrs, children)\n }\n\n if (TEXT_TAGS[nodeName]) {\n const attrs = TEXT_TAGS[nodeName](el)\n return children.map((child) => jsx('text', attrs, child))\n }\n\n return children\n}\n\nexport const withHTML = (incomingEditor) => {\n const { insertData } = incomingEditor\n\n const editor = incomingEditor\n\n editor.insertData = (data) => {\n if (!data.types.includes('application/x-slate-fragment')) {\n const html = data.getData('text/html')\n\n if (html) {\n const parsed = new DOMParser().parseFromString(html, 'text/html')\n const fragment = deserialize(parsed.body)\n Transforms.insertFragment(editor, fragment)\n return\n }\n }\n\n insertData(data)\n }\n\n return editor\n}\n"],"names":["Transforms","jsx","ELEMENT_TAGS","A","el","type","newTab","getAttribute","url","BLOCKQUOTE","H1","H2","H3","H4","H5","H6","LI","OL","P","PRE","UL","TEXT_TAGS","CODE","code","DEL","strikethrough","EM","italic","I","S","STRONG","bold","U","underline","deserialize","nodeType","textContent","nodeName","parent","childNodes","children","Array","from","map","flat","length","text","attrs","child","withHTML","incomingEditor","insertData","editor","data","types","includes","html","getData","parsed","DOMParser","parseFromString","frag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E,GAAGD;IAEvB,MAAME,SAASF;IAEfE,OAAOD,UAAU,GAAG,CAACE;QACnB,IAAI,CAACA,KAAKC,KAAK,CAACC,QAAQ,CAAC,iCAAiC;YACxD,MAAMC,OAAOH,KAAKI,OAAO,CAAC;YAE1B,IAAID,MAAM;gBACR,MAAME,SAAS,IAAIC,YAAYC,eAAe,CAACJ,MAAM;gBACrD,MAAMK,WAAW3B,YAAYwB,OAAOI,IAAI;gBACxC9D,WAAW+D,cAAc,CAACX,QAAQS;gBAClC;YACF;QACF;QAEAV,WAAWE;IACb;IAEA,OAAOD;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/plugins/withHTML.tsx"],"sourcesContent":["import { Transforms } from 'slate'\nimport { jsx } from 'slate-hyperscript'\n\nconst ELEMENT_TAGS = {\n A: (el) => ({\n type: 'link',\n newTab: el.getAttribute('target') === '_blank',\n url: el.getAttribute('href'),\n }),\n BLOCKQUOTE: () => ({ type: 'blockquote' }),\n H1: () => ({ type: 'h1' }),\n H2: () => ({ type: 'h2' }),\n H3: () => ({ type: 'h3' }),\n H4: () => ({ type: 'h4' }),\n H5: () => ({ type: 'h5' }),\n H6: () => ({ type: 'h6' }),\n LI: () => ({ type: 'li' }),\n OL: () => ({ type: 'ol' }),\n P: () => ({}),\n PRE: () => ({ type: 'code' }),\n UL: () => ({ type: 'ul' }),\n}\n\nconst TEXT_TAGS = {\n CODE: () => ({ code: true }),\n DEL: () => ({ strikethrough: true }),\n EM: () => ({ italic: true }),\n I: () => ({ italic: true }),\n S: () => ({ strikethrough: true }),\n STRONG: () => ({ bold: true }),\n U: () => ({ underline: true }),\n}\n\nconst deserialize = (el) => {\n if (el.nodeType === 3) {\n return el.textContent\n }\n if (el.nodeType !== 1) {\n return null\n }\n if (el.nodeName === 'BR') {\n return '\\n'\n }\n\n const { nodeName } = el\n let parent = el\n\n if (nodeName === 'PRE' && el.childNodes[0] && el.childNodes[0].nodeName === 'CODE') {\n ;[parent] = el.childNodes\n }\n\n let children = Array.from(parent.childNodes).map(deserialize).flat()\n\n if (children.length === 0) {\n children = [{ text: '' }]\n }\n\n if (el.nodeName === 'BODY') {\n return jsx('fragment', {}, children)\n }\n\n if (ELEMENT_TAGS[nodeName]) {\n const attrs = ELEMENT_TAGS[nodeName](el)\n return jsx('element', attrs, children)\n }\n\n if (TEXT_TAGS[nodeName]) {\n const attrs = TEXT_TAGS[nodeName](el)\n return children.map((child) => jsx('text', attrs, child))\n }\n\n return children\n}\n\nexport const withHTML = (incomingEditor) => {\n const { insertData } = incomingEditor\n\n const editor = incomingEditor\n\n editor.insertData = (data) => {\n if (!data.types.includes('application/x-slate-fragment')) {\n const html = data.getData('text/html')\n\n if (html) {\n const parsed = new DOMParser().parseFromString(html, 'text/html')\n const fragment = deserialize(parsed.body)\n Transforms.insertFragment(editor, fragment)\n return\n }\n }\n\n insertData(data)\n }\n\n return editor\n}\n"],"names":["Transforms","jsx","ELEMENT_TAGS","A","el","type","newTab","getAttribute","url","BLOCKQUOTE","H1","H2","H3","H4","H5","H6","LI","OL","P","PRE","UL","TEXT_TAGS","CODE","code","DEL","strikethrough","EM","italic","I","S","STRONG","bold","U","underline","deserialize","nodeType","textContent","nodeName","parent","childNodes","children","Array","from","map","flat","length","text","attrs","child","withHTML","incomingEditor","insertData","editor","data","types","includes","html","getData","parsed","DOMParser","parseFromString","fragment","body","insertFragment"],"mappings":"AAAA,SAASA,UAAU,QAAQ,QAAO;AAClC,SAASC,GAAG,QAAQ,oBAAmB;AAEvC,MAAMC,eAAe;IACnBC,GAAG,CAACC,KAAQ,CAAA;YACVC,MAAM;YACNC,QAAQF,GAAGG,YAAY,CAAC,cAAc;YACtCC,KAAKJ,GAAGG,YAAY,CAAC;QACvB,CAAA;IACAE,YAAY,IAAO,CAAA;YAAEJ,MAAM;QAAa,CAAA;IACxCK,IAAI,IAAO,CAAA;YAAEL,MAAM;QAAK,CAAA;IACxBM,IAAI,IAAO,CAAA;YAAEN,MAAM;QAAK,CAAA;IACxBO,IA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ACC,OAAO,GAAGlC,GAAGmC,UAAU;IAC3B;IAEA,IAAIC,WAAWC,MAAMC,IAAI,CAACJ,OAAOC,UAAU,EAAEI,GAAG,CAACT,aAAaU,IAAI;IAElE,IAAIJ,SAASK,MAAM,KAAK,GAAG;QACzBL,WAAW;YAAC;gBAAEM,MAAM;YAAG;SAAE;IAC3B;IAEA,IAAI1C,GAAGiC,QAAQ,KAAK,QAAQ;QAC1B,OAAOpC,IAAI,YAAY,CAAC,GAAGuC;IAC7B;IAEA,IAAItC,YAAY,CAACmC,SAAS,EAAE;QAC1B,MAAMU,QAAQ7C,YAAY,CAACmC,SAAS,CAACjC;QACrC,OAAOH,IAAI,WAAW8C,OAAOP;IAC/B;IAEA,IAAInB,SAAS,CAACgB,SAAS,EAAE;QACvB,MAAMU,QAAQ1B,SAAS,CAACgB,SAAS,CAACjC;QAClC,OAAOoC,SAASG,GAAG,CAAC,CAACK,QAAU/C,IAAI,QAAQ8C,OAAOC;IACpD;IAEA,OAAOR;AACT;AAEA,OAAO,MAAMS,WAAW,CAACC;IACvB,MAAM,EAAEC,UAAU,EAAE,GAAGD;IAEvB,MAAME,SAASF;IAEfE,OAAOD,UAAU,GAAG,CAACE;QACnB,IAAI,CAACA,KAAKC,KAAK,CAACC,QAAQ,CAAC,iCAAiC;YACxD,MAAMC,OAAOH,KAAKI,OAAO,CAAC;YAE1B,IAAID,MAAM;gBACR,MAAME,SAAS,IAAIC,YAAYC,eAAe,CAACJ,MAAM;gBACrD,MAAMK,WAAW3B,YAAYwB,OAAOI,IAAI;gBACxC9D,WAAW+D,cAAc,CAACX,QAAQS;gBAClC;YACF;QACF;QAEAV,WAAWE;IACb;IAEA,OAAOD;AACT,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
1
+ import type { FormFieldBase } from '@payloadcms/ui';
2
2
  import React from 'react';
3
3
  type ElementButtonContextType = {
4
4
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementButtonProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAQD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAC1C,wBAAwB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAaF,CAAA;AAED,eAAO,MAAM,gBAAgB,gCAG5B,CAAA"}
1
+ {"version":3,"file":"ElementButtonProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAQD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAC1C,wBAAwB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAaF,CAAA;AAED,eAAO,MAAM,gBAAgB,gCAG5B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype ElementButtonContextType = {\n disabled?: boolean\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementButtonContext = React.createContext<ElementButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementButtonProvider: React.FC<\n ElementButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <ElementButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </ElementButtonContext.Provider>\n )\n}\n\nexport const useElementButton = () => {\n const path = React.useContext(ElementButtonContext)\n return path\n}\n"],"names":["React","ElementButtonContext","createContext","fieldProps","path","schemaPath","ElementButtonProvider","props","children","rest","Provider","value","useElementButton","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAYzB,MAAMC,qCAAuBD,MAAME,aAAa,CAA2B;IACzEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,wBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,qBAAqBS,QAAQ;QAC5BC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,mBAAmB;IAC9B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/ElementButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui'\n\nimport React from 'react'\n\ntype ElementButtonContextType = {\n disabled?: boolean\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementButtonContext = React.createContext<ElementButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementButtonProvider: React.FC<\n ElementButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <ElementButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </ElementButtonContext.Provider>\n )\n}\n\nexport const useElementButton = () => {\n const path = React.useContext(ElementButtonContext)\n return path\n}\n"],"names":["React","ElementButtonContext","createContext","fieldProps","path","schemaPath","ElementButtonProvider","props","children","rest","Provider","value","useElementButton","useContext"],"mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAYzB,MAAMC,qCAAuBD,MAAME,aAAa,CAA2B;IACzEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,wBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,qBAAqBS,QAAQ;QAC5BC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,mBAAmB;IAC9B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
1
+ import type { FormFieldBase } from '@payloadcms/ui';
2
2
  import type { Element } from 'slate';
3
3
  import React from 'react';
4
4
  type ElementContextType<T> = {
@@ -1 +1 @@
1
- {"version":3,"file":"ElementProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/ElementProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,EAAE,OA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,IAAI,EAAE,MAAM,CAAA;QACZ,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;KACnD,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAYD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CACpC,kBAAkB,CAAC,OAAO,CAAC,GAAG;IAC5B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAA;CAC5B,CAcF,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,OAAM,kBAAkB,CAAC,CAAC,CAErD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/ElementProvider.tsx"],"sourcesContent":["'use client'\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\ntype ElementContextType<T> = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n element: T\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementContext = React.createContext<ElementContextType<Element>>({\n attributes: {},\n children: null,\n editorRef: null,\n element: {} as Element,\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementProvider: React.FC<\n ElementContextType<Element> & {\n childNodes: React.ReactNode\n }\n> = (props) => {\n const { childNodes, children, ...rest } = props\n\n return (\n <ElementContext.Provider\n value={{\n ...rest,\n children: childNodes,\n }}\n >\n {children}\n </ElementContext.Provider>\n )\n}\n\nexport const useElement = <T,>(): ElementContextType<T> => {\n return React.useContext(ElementContext) as ElementContextType<T>\n}\n"],"names":["React","ElementContext","createContext","attributes","children","editorRef","element","fieldProps","path","schemaPath","ElementProvider","props","childNodes","rest","Provider","value","useElement","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAezB,MAAMC,+BAAiBD,MAAME,aAAa,CAA8B;IACtEC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,SAAS,CAAC;IACVC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,kBAIT,CAACC;IACH,MAAM,EAAEC,UAAU,EAAER,QAAQ,EAAE,GAAGS,MAAM,GAAGF;IAE1C,qBACE,KAACV,eAAea,QAAQ;QACtBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,aAAa;IACxB,OAAOhB,MAAMiB,UAAU,CAAChB;AAC1B,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/ElementProvider.tsx"],"sourcesContent":["'use client'\nimport type { FormFieldBase } from '@payloadcms/ui'\nimport type { Element } from 'slate'\n\nimport React from 'react'\n\ntype ElementContextType<T> = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n element: T\n fieldProps: FormFieldBase & {\n name: string\n richTextComponentMap: Map<string, React.ReactNode>\n }\n path: string\n schemaPath: string\n}\n\nconst ElementContext = React.createContext<ElementContextType<Element>>({\n attributes: {},\n children: null,\n editorRef: null,\n element: {} as Element,\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const ElementProvider: React.FC<\n ElementContextType<Element> & {\n childNodes: React.ReactNode\n }\n> = (props) => {\n const { childNodes, children, ...rest } = props\n\n return (\n <ElementContext.Provider\n value={{\n ...rest,\n children: childNodes,\n }}\n >\n {children}\n </ElementContext.Provider>\n )\n}\n\nexport const useElement = <T,>(): ElementContextType<T> => {\n return React.useContext(ElementContext) as ElementContextType<T>\n}\n"],"names":["React","ElementContext","createContext","attributes","children","editorRef","element","fieldProps","path","schemaPath","ElementProvider","props","childNodes","rest","Provider","value","useElement","useContext"],"mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAezB,MAAMC,+BAAiBD,MAAME,aAAa,CAA8B;IACtEC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,SAAS,CAAC;IACVC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,kBAIT,CAACC;IACH,MAAM,EAAEC,UAAU,EAAER,QAAQ,EAAE,GAAGS,MAAM,GAAGF;IAE1C,qBACE,KAACV,eAAea,QAAQ;QACtBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,aAAa;IACxB,OAAOhB,MAAMiB,UAAU,CAAChB;AAC1B,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
1
+ import type { FormFieldBase } from '@payloadcms/ui';
2
2
  import React from 'react';
3
3
  type LeafButtonContextType = {
4
4
  fieldProps: FormFieldBase & {
@@ -1 +1 @@
1
- {"version":3,"file":"LeafButtonProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAQD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,qBAAqB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAaF,CAAA;AAED,eAAO,MAAM,aAAa,6BAGzB,CAAA"}
1
+ {"version":3,"file":"LeafButtonProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAQD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CACvC,qBAAqB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAaF,CAAA;AAED,eAAO,MAAM,aAAa,6BAGzB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype LeafButtonContextType = {\n fieldProps: FormFieldBase & {\n name: string\n }\n path: string\n schemaPath: string\n}\n\nconst LeafButtonContext = React.createContext<LeafButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const LeafButtonProvider: React.FC<\n LeafButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <LeafButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </LeafButtonContext.Provider>\n )\n}\n\nexport const useLeafButton = () => {\n const path = React.useContext(LeafButtonContext)\n return path\n}\n"],"names":["React","LeafButtonContext","createContext","fieldProps","path","schemaPath","LeafButtonProvider","props","children","rest","Provider","value","useLeafButton","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAUzB,MAAMC,kCAAoBD,MAAME,aAAa,CAAwB;IACnEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,qBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,kBAAkBS,QAAQ;QACzBC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,gBAAgB;IAC3B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/LeafButtonProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui'\n\nimport React from 'react'\n\ntype LeafButtonContextType = {\n fieldProps: FormFieldBase & {\n name: string\n }\n path: string\n schemaPath: string\n}\n\nconst LeafButtonContext = React.createContext<LeafButtonContextType>({\n fieldProps: {} as any,\n path: '',\n schemaPath: '',\n})\n\nexport const LeafButtonProvider: React.FC<\n LeafButtonContextType & {\n children: React.ReactNode\n }\n> = (props) => {\n const { children, ...rest } = props\n\n return (\n <LeafButtonContext.Provider\n value={{\n ...rest,\n }}\n >\n {children}\n </LeafButtonContext.Provider>\n )\n}\n\nexport const useLeafButton = () => {\n const path = React.useContext(LeafButtonContext)\n return path\n}\n"],"names":["React","LeafButtonContext","createContext","fieldProps","path","schemaPath","LeafButtonProvider","props","children","rest","Provider","value","useLeafButton","useContext"],"mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAUzB,MAAMC,kCAAoBD,MAAME,aAAa,CAAwB;IACnEC,YAAY,CAAC;IACbC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,qBAIT,CAACC;IACH,MAAM,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGF;IAE9B,qBACE,KAACN,kBAAkBS,QAAQ;QACzBC,OAAO;YACL,GAAGF,IAAI;QACT;kBAECD;;AAGP,EAAC;AAED,OAAO,MAAMI,gBAAgB;IAC3B,MAAMR,OAAOJ,MAAMa,UAAU,CAACZ;IAC9B,OAAOG;AACT,EAAC"}
@@ -1,4 +1,4 @@
1
- import type { FormFieldBase } from '@payloadcms/ui/fields/shared';
1
+ import type { FormFieldBase } from '@payloadcms/ui';
2
2
  import React from 'react';
3
3
  type LeafContextType = {
4
4
  attributes: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"LeafProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/LeafProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAA;IACjD,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAYD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CACjC,eAAe,GAAG;IAChB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,CAcF,CAAA;AAED,eAAO,MAAM,OAAO,uBAGnB,CAAA"}
1
+ {"version":3,"file":"LeafProvider.d.ts","sourceRoot":"","sources":["../../../src/field/providers/LeafProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAA;IACjD,UAAU,EAAE,aAAa,GAAG;QAC1B,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAYD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CACjC,eAAe,GAAG;IAChB,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,CAcF,CAAA;AAED,eAAO,MAAM,OAAO,uBAGnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/field/providers/LeafProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui/fields/shared'\n\nimport React from 'react'\n\ntype LeafContextType = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n fieldProps: FormFieldBase & {\n name: string\n }\n leaf: string\n path: string\n schemaPath: string\n}\n\nconst LeafContext = React.createContext<LeafContextType>({\n attributes: {},\n children: null,\n editorRef: null,\n fieldProps: {} as any,\n leaf: '',\n path: '',\n schemaPath: '',\n})\n\nexport const LeafProvider: React.FC<\n LeafContextType & {\n result: React.ReactNode\n }\n> = (props) => {\n const { children, result, ...rest } = props\n\n return (\n <LeafContext.Provider\n value={{\n ...rest,\n children: result,\n }}\n >\n {children}\n </LeafContext.Provider>\n )\n}\n\nexport const useLeaf = () => {\n const path = React.useContext(LeafContext)\n return path\n}\n"],"names":["React","LeafContext","createContext","attributes","children","editorRef","fieldProps","leaf","path","schemaPath","LeafProvider","props","result","rest","Provider","value","useLeaf","useContext"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAczB,MAAMC,4BAAcD,MAAME,aAAa,CAAkB;IACvDC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,YAAY,CAAC;IACbC,MAAM;IACNC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,eAIT,CAACC;IACH,MAAM,EAAEP,QAAQ,EAAEQ,MAAM,EAAE,GAAGC,MAAM,GAAGF;IAEtC,qBACE,KAACV,YAAYa,QAAQ;QACnBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,UAAU;IACrB,MAAMR,OAAOR,MAAMiB,UAAU,CAAChB;IAC9B,OAAOO;AACT,EAAC"}
1
+ {"version":3,"sources":["../../../src/field/providers/LeafProvider.tsx"],"sourcesContent":["'use client'\n\nimport type { FormFieldBase } from '@payloadcms/ui'\n\nimport React from 'react'\n\ntype LeafContextType = {\n attributes: Record<string, unknown>\n children: React.ReactNode\n editorRef: React.MutableRefObject<HTMLDivElement>\n fieldProps: FormFieldBase & {\n name: string\n }\n leaf: string\n path: string\n schemaPath: string\n}\n\nconst LeafContext = React.createContext<LeafContextType>({\n attributes: {},\n children: null,\n editorRef: null,\n fieldProps: {} as any,\n leaf: '',\n path: '',\n schemaPath: '',\n})\n\nexport const LeafProvider: React.FC<\n LeafContextType & {\n result: React.ReactNode\n }\n> = (props) => {\n const { children, result, ...rest } = props\n\n return (\n <LeafContext.Provider\n value={{\n ...rest,\n children: result,\n }}\n >\n {children}\n </LeafContext.Provider>\n )\n}\n\nexport const useLeaf = () => {\n const path = React.useContext(LeafContext)\n return path\n}\n"],"names":["React","LeafContext","createContext","attributes","children","editorRef","fieldProps","leaf","path","schemaPath","LeafProvider","props","result","rest","Provider","value","useLeaf","useContext"],"mappings":"AAAA;;AAIA,OAAOA,WAAW,QAAO;AAczB,MAAMC,4BAAcD,MAAME,aAAa,CAAkB;IACvDC,YAAY,CAAC;IACbC,UAAU;IACVC,WAAW;IACXC,YAAY,CAAC;IACbC,MAAM;IACNC,MAAM;IACNC,YAAY;AACd;AAEA,OAAO,MAAMC,eAIT,CAACC;IACH,MAAM,EAAEP,QAAQ,EAAEQ,MAAM,EAAE,GAAGC,MAAM,GAAGF;IAEtC,qBACE,KAACV,YAAYa,QAAQ;QACnBC,OAAO;YACL,GAAGF,IAAI;YACPT,UAAUQ;QACZ;kBAECR;;AAGP,EAAC;AAED,OAAO,MAAMY,UAAU;IACrB,MAAMR,OAAOR,MAAMiB,UAAU,CAAChB;IAC9B,OAAOO;AACT,EAAC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
1
  export type EnabledFeatures = {
3
2
  elements: {
4
3
  [name: string]: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/field/types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE;QACR,CAAC,IAAI,EAAE,MAAM,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;YACvB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;YACxB,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;KACF,CAAA;IACD,MAAM,EAAE;QACN,CAAC,IAAI,EAAE,MAAM,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;YACvB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;YACrB,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;KACF,CAAA;IACD,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;CAC3B,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/field/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE;QACR,CAAC,IAAI,EAAE,MAAM,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;YACvB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;YACxB,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;KACF,CAAA;IACD,MAAM,EAAE;QACN,CAAC,IAAI,EAAE,MAAM,GAAG;YACd,MAAM,EAAE,KAAK,CAAC,SAAS,CAAA;YACvB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;YACrB,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;KACF,CAAA;IACD,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,CAAA;CAC3B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/field/types.ts"],"sourcesContent":["export type EnabledFeatures = {\n elements: {\n [name: string]: {\n Button: React.ReactNode\n Element: React.ReactNode\n name: string\n }\n }\n leaves: {\n [name: string]: {\n Button: React.ReactNode\n Leaf: React.ReactNode\n name: string\n }\n }\n plugins: React.ReactNode[]\n}\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAgBC"}
1
+ {"version":3,"sources":["../../src/field/types.ts"],"sourcesContent":["export type EnabledFeatures = {\n elements: {\n [name: string]: {\n Button: React.ReactNode\n Element: React.ReactNode\n name: string\n }\n }\n leaves: {\n [name: string]: {\n Button: React.ReactNode\n Leaf: React.ReactNode\n name: string\n }\n }\n plugins: React.ReactNode[]\n}\n"],"names":[],"mappings":"AAAA,WAgBC"}
@@ -1,4 +1,4 @@
1
1
  import type { RichTextAdapter } from 'payload';
2
2
  import type { AdapterArguments } from './types.js';
3
- export declare const getGenerateComponentMap: (args: AdapterArguments) => RichTextAdapter['generateComponentMap'];
3
+ export declare const getGenerateComponentMap: (args: AdapterArguments) => RichTextAdapter["generateComponentMap"];
4
4
  //# sourceMappingURL=generateComponentMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { Field, RichTextAdapter } from 'payload'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { AdapterArguments, RichTextCustomElement, RichTextCustomLeaf } from './types.js'\n\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { linkFieldsSchemaPath } from './field/elements/link/shared.js'\nimport { uploadFieldsSchemaPath } from './field/elements/upload/shared.js'\nimport { defaultLeaves as leafTypes } from './field/leaves/index.js'\n\nexport const getGenerateComponentMap =\n (args: AdapterArguments): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n }) => {\n const componentMap = new Map()\n\n ;(args?.admin?.leaves || Object.values(leafTypes)).forEach((leaf) => {\n let leafObject: RichTextCustomLeaf\n\n if (typeof leaf === 'object' && leaf !== null) {\n leafObject = leaf\n } else if (typeof leaf === 'string' && leafTypes[leaf]) {\n leafObject = leafTypes[leaf]\n }\n\n if (leafObject) {\n const LeafButton = leafObject.Button\n const LeafComponent = leafObject.Leaf\n\n componentMap.set(`leaf.button.${leafObject.name}`, <LeafButton />)\n componentMap.set(`leaf.component.${leafObject.name}`, <LeafComponent />)\n\n if (Array.isArray(leafObject.plugins)) {\n leafObject.plugins.forEach((Plugin, i) => {\n componentMap.set(`leaf.plugin.${leafObject.name}.${i}`, <Plugin />)\n })\n }\n }\n })\n ;(args?.admin?.elements || Object.values(elementTypes)).forEach((el) => {\n let element: RichTextCustomElement\n\n if (typeof el === 'object' && el !== null) {\n element = el\n } else if (typeof el === 'string' && elementTypes[el]) {\n element = elementTypes[el]\n }\n\n if (element) {\n const ElementButton = element.Button\n const ElementComponent = element.Element\n\n if (ElementButton) componentMap.set(`element.button.${element.name}`, <ElementButton />)\n componentMap.set(`element.component.${element.name}`, <ElementComponent />)\n\n if (Array.isArray(element.plugins)) {\n element.plugins.forEach((Plugin, i) => {\n componentMap.set(`element.plugin.${element.name}.${i}`, <Plugin />)\n })\n }\n\n switch (element.name) {\n case 'link': {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n fieldSchema: args.admin?.link?.fields as Field[],\n i18n,\n readOnly: false,\n })\n\n componentMap.set(linkFieldsSchemaPath, mappedFields)\n\n break\n }\n\n case 'upload': {\n const uploadEnabledCollections = config.collections.filter(\n ({ admin: { enableRichTextRelationship, hidden }, upload }) => {\n if (hidden === true) {\n return false\n }\n\n return enableRichTextRelationship && Boolean(upload) === true\n },\n )\n\n uploadEnabledCollections.forEach((collection) => {\n if (args?.admin?.upload?.collections[collection.slug]?.fields) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n fieldSchema: args?.admin?.upload?.collections[collection.slug]?.fields,\n i18n,\n readOnly: false,\n })\n\n componentMap.set(`${uploadFieldsSchemaPath}.${collection.slug}`, mappedFields)\n }\n })\n\n break\n }\n\n case 'relationship':\n break\n }\n }\n })\n\n return componentMap\n }\n"],"names":["mapFields","React","elements","elementTypes","linkFieldsSchemaPath","uploadFieldsSchemaPath","defaultLeaves","leafTypes","getGenerateComponentMap","args","WithServerSideProps","config","i18n","componentMap","Map","admin","leaves","Object","values","forEach","leaf","leafObject","LeafButton","Button","LeafComponent","Leaf","set","name","Array","isArray","plugins","Plugin","i","el","element","ElementButton","ElementComponent","Element","mappedFields","fieldSchema","link","fields","readOnly","uploadEnabledCollections","collections","filter","enableRichTextRelationship","hidden","upload","Boolean","collection","slug"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,OAAOC,WAAW,QAAO;AAIzB,SAASC,YAAYC,YAAY,QAAQ,4BAA2B;AACpE,SAASC,oBAAoB,QAAQ,kCAAiC;AACtE,SAASC,sBAAsB,QAAQ,oCAAmC;AAC1E,SAASC,iBAAiBC,SAAS,QAAQ,0BAAyB;AAEpE,OAAO,MAAMC,0BACX,CAACC,OACD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAE;QACpC,MAAMC,eAAe,IAAIC;QAEvBL,CAAAA,MAAMM,OAAOC,UAAUC,OAAOC,MAAM,CAACX,UAAS,EAAGY,OAAO,CAAC,CAACC;YAC1D,IAAIC;YAEJ,IAAI,OAAOD,SAAS,YAAYA,SAAS,MAAM;gBAC7CC,aAAaD;YACf,OAAO,IAAI,OAAOA,SAAS,YAAYb,SAAS,CAACa,KAAK,EAAE;gBACtDC,aA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AAe,EAAEQ,QAAQP,IAAI,CAAC,CAAC,EAAEK,EAAE,CAAC,gBAAE,KAACD;oBAC3D;gBACF;gBAEA,OAAQG,QAAQP,IAAI;oBAClB,KAAK;wBAAQ;4BACX,MAAMW,eAAetC,UAAU;gCAC7BU;gCACAC;gCACA4B,aAAa9B,KAAKM,KAAK,EAAEyB,MAAMC;gCAC/B7B;gCACA8B,UAAU;4BACZ;4BAEA7B,aAAaa,GAAG,CAACtB,sBAAsBkC;4BAEvC;wBACF;oBAEA,KAAK;wBAAU;4BACb,MAAMK,2BAA2BhC,OAAOiC,WAAW,CAACC,MAAM,CACxD,CAAC,EAAE9B,OAAO,EAAE+B,0BAA0B,EAAEC,MAAM,EAAE,EAAEC,MAAM,EAAE;gCACxD,IAAID,WAAW,MAAM;oCACnB,OAAO;gCACT;gCAEA,OAAOD,8BAA8BG,QAAQD,YAAY;4BAC3D;4BAGFL,yBAAyBxB,OAAO,CAAC,CAAC+B;gCAChC,IAAIzC,MAAMM,OAAOiC,QAAQJ,WAAW,CAACM,WAAWC,IAAI,CAAC,EAAEV,QAAQ;oCAC7D,MAAMH,eAAetC,UAAU;wCAC7BU;wCACAC;wCACA4B,aAAa9B,MAAMM,OAAOiC,QAAQJ,WAAW,CAACM,WAAWC,IAAI,CAAC,EAAEV;wCAChE7B;wCACA8B,UAAU;oCACZ;oCAEA7B,aAAaa,GAAG,CAAC,CAAC,EAAErB,uBAAuB,CAAC,EAAE6C,WAAWC,IAAI,CAAC,CAAC,EAAEb;gCACnE;4BACF;4BAEA;wBACF;oBAEA,KAAK;wBACH;gBACJ;YACF;QACF;QAEA,OAAOzB;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateComponentMap.tsx"],"sourcesContent":["import type { Field, RichTextAdapter } from 'payload'\n\nimport { mapFields } from '@payloadcms/ui/utilities/buildComponentMap'\nimport React from 'react'\n\nimport type { AdapterArguments, RichTextCustomElement, RichTextCustomLeaf } from './types.js'\n\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { linkFieldsSchemaPath } from './field/elements/link/shared.js'\nimport { uploadFieldsSchemaPath } from './field/elements/upload/shared.js'\nimport { defaultLeaves as leafTypes } from './field/leaves/index.js'\n\nexport const getGenerateComponentMap =\n (args: AdapterArguments): RichTextAdapter['generateComponentMap'] =>\n ({ WithServerSideProps, config, i18n }) => {\n const componentMap = new Map()\n\n ;(args?.admin?.leaves || Object.values(leafTypes)).forEach((leaf) => {\n let leafObject: RichTextCustomLeaf\n\n if (typeof leaf === 'object' && leaf !== null) {\n leafObject = leaf\n } else if (typeof leaf === 'string' && leafTypes[leaf]) {\n leafObject = leafTypes[leaf]\n }\n\n if (leafObject) {\n const LeafButton = leafObject.Button\n const LeafComponent = leafObject.Leaf\n\n componentMap.set(`leaf.button.${leafObject.name}`, <LeafButton />)\n componentMap.set(`leaf.component.${leafObject.name}`, <LeafComponent />)\n\n if (Array.isArray(leafObject.plugins)) {\n leafObject.plugins.forEach((Plugin, i) => {\n componentMap.set(`leaf.plugin.${leafObject.name}.${i}`, <Plugin />)\n })\n }\n }\n })\n ;(args?.admin?.elements || Object.values(elementTypes)).forEach((el) => {\n let element: RichTextCustomElement\n\n if (typeof el === 'object' && el !== null) {\n element = el\n } else if (typeof el === 'string' && elementTypes[el]) {\n element = elementTypes[el]\n }\n\n if (element) {\n const ElementButton = element.Button\n const ElementComponent = element.Element\n\n if (ElementButton) componentMap.set(`element.button.${element.name}`, <ElementButton />)\n componentMap.set(`element.component.${element.name}`, <ElementComponent />)\n\n if (Array.isArray(element.plugins)) {\n element.plugins.forEach((Plugin, i) => {\n componentMap.set(`element.plugin.${element.name}.${i}`, <Plugin />)\n })\n }\n\n switch (element.name) {\n case 'link': {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n fieldSchema: args.admin?.link?.fields as Field[],\n i18n,\n readOnly: false,\n })\n\n componentMap.set(linkFieldsSchemaPath, mappedFields)\n\n break\n }\n\n case 'upload': {\n const uploadEnabledCollections = config.collections.filter(\n ({ admin: { enableRichTextRelationship, hidden }, upload }) => {\n if (hidden === true) {\n return false\n }\n\n return enableRichTextRelationship && Boolean(upload) === true\n },\n )\n\n uploadEnabledCollections.forEach((collection) => {\n if (args?.admin?.upload?.collections[collection.slug]?.fields) {\n const mappedFields = mapFields({\n WithServerSideProps,\n config,\n fieldSchema: args?.admin?.upload?.collections[collection.slug]?.fields,\n i18n,\n readOnly: false,\n })\n\n componentMap.set(`${uploadFieldsSchemaPath}.${collection.slug}`, mappedFields)\n }\n })\n\n break\n }\n\n case 'relationship':\n break\n }\n }\n })\n\n return componentMap\n }\n"],"names":["mapFields","React","elements","elementTypes","linkFieldsSchemaPath","uploadFieldsSchemaPath","defaultLeaves","leafTypes","getGenerateComponentMap","args","WithServerSideProps","config","i18n","componentMap","Map","admin","leaves","Object","values","forEach","leaf","leafObject","LeafButton","Button","LeafComponent","Leaf","set","name","Array","isArray","plugins","Plugin","i","el","element","ElementButton","ElementComponent","Element","mappedFields","fieldSchema","link","fields","readOnly","uploadEnabledCollections","collections","filter","enableRichTextRelationship","hidden","upload","Boolean","collection","slug"],"mappings":";AAEA,SAASA,SAAS,QAAQ,6CAA4C;AACtE,OAAOC,WAAW,QAAO;AAIzB,SAASC,YAAYC,YAAY,QAAQ,4BAA2B;AACpE,SAASC,oBAAoB,QAAQ,kCAAiC;AACtE,SAASC,sBAAsB,QAAQ,oCAAmC;AAC1E,SAASC,iBAAiBC,SAAS,QAAQ,0BAAyB;AAEpE,OAAO,MAAMC,0BACX,CAACC,OACD,CAAC,EAAEC,mBAAmB,EAAEC,MAAM,EAAEC,IAAI,EAAE;QACpC,MAAMC,eAAe,IAAIC;QAEvBL,CAAAA,MAAMM,OAAOC,UAAUC,OAAOC,MAAM,CAACX,UAAS,EAAGY,OAAO,CAAC,CAACC;YAC1D,IAAIC;YAEJ,IAAI,OAAOD,SAAS,YAAYA,SAAS,MAAM;gBAC7CC,aAAaD;YACf,OAAO,IAAI,OAAOA,SAAS,YAAYb,SAAS,CAACa,K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a,GAAG,CAAC,CAAC,eAAe,EAAEQ,QAAQP,IAAI,CAAC,CAAC,EAAEK,EAAE,CAAC,gBAAE,KAACD;oBAC3D;gBACF;gBAEA,OAAQG,QAAQP,IAAI;oBAClB,KAAK;wBAAQ;4BACX,MAAMW,eAAetC,UAAU;gCAC7BU;gCACAC;gCACA4B,aAAa9B,KAAKM,KAAK,EAAEyB,MAAMC;gCAC/B7B;gCACA8B,UAAU;4BACZ;4BAEA7B,aAAaa,GAAG,CAACtB,sBAAsBkC;4BAEvC;wBACF;oBAEA,KAAK;wBAAU;4BACb,MAAMK,2BAA2BhC,OAAOiC,WAAW,CAACC,MAAM,CACxD,CAAC,EAAE9B,OAAO,EAAE+B,0BAA0B,EAAEC,MAAM,EAAE,EAAEC,MAAM,EAAE;gCACxD,IAAID,WAAW,MAAM;oCACnB,OAAO;gCACT;gCAEA,OAAOD,8BAA8BG,QAAQD,YAAY;4BAC3D;4BAGFL,yBAAyBxB,OAAO,CAAC,CAAC+B;gCAChC,IAAIzC,MAAMM,OAAOiC,QAAQJ,WAAW,CAACM,WAAWC,IAAI,CAAC,EAAEV,QAAQ;oCAC7D,MAAMH,eAAetC,UAAU;wCAC7BU;wCACAC;wCACA4B,aAAa9B,MAAMM,OAAOiC,QAAQJ,WAAW,CAACM,WAAWC,IAAI,CAAC,EAAEV;wCAChE7B;wCACA8B,UAAU;oCACZ;oCAEA7B,aAAaa,GAAG,CAAC,CAAC,EAAErB,uBAAuB,CAAC,EAAE6C,WAAWC,IAAI,CAAC,CAAC,EAAEb;gCACnE;4BACF;4BAEA;wBACF;oBAEA,KAAK;wBACH;gBACJ;YACF;QACF;QAEA,OAAOzB;IACT,EAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { RichTextAdapter } from 'payload';
2
2
  import type { AdapterArguments } from './types.js';
3
- export declare const getGenerateSchemaMap: (args: AdapterArguments) => RichTextAdapter['generateSchemaMap'];
3
+ export declare const getGenerateSchemaMap: (args: AdapterArguments) => RichTextAdapter["generateSchemaMap"];
4
4
  //# sourceMappingURL=generateSchemaMap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { Field, RichTextAdapter } from 'payload'\n\nimport type { AdapterArguments, RichTextCustomElement } from './types.js'\n\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { linkFieldsSchemaPath } from './field/elements/link/shared.js'\nimport { uploadFieldsSchemaPath } from './field/elements/upload/shared.js'\n\nexport const getGenerateSchemaMap =\n (args: AdapterArguments): RichTextAdapter['generateSchemaMap'] =>\n ({ config, schemaMap, schemaPath }) => {\n ;(args?.admin?.elements || Object.values(elementTypes)).forEach((el) => {\n let element: RichTextCustomElement\n\n if (typeof el === 'object' && el !== null) {\n element = el\n } else if (typeof el === 'string' && elementTypes[el]) {\n element = elementTypes[el]\n }\n\n if (element) {\n switch (element.name) {\n case 'link': {\n schemaMap.set(\n `${schemaPath}.${linkFieldsSchemaPath}`,\n args.admin?.link?.fields as Field[],\n )\n\n break\n }\n\n case 'upload': {\n const uploadEnabledCollections = config.collections.filter(\n ({ admin: { enableRichTextRelationship, hidden }, upload }) => {\n if (hidden === true) {\n return false\n }\n\n return enableRichTextRelationship && Boolean(upload) === true\n },\n )\n\n uploadEnabledCollections.forEach((collection) => {\n if (args?.admin?.upload?.collections[collection.slug]?.fields) {\n schemaMap.set(\n `${schemaPath}.${uploadFieldsSchemaPath}.${collection.slug}`,\n args?.admin?.upload?.collections[collection.slug]?.fields,\n )\n }\n })\n\n break\n }\n\n case 'relationship':\n break\n }\n }\n })\n\n return schemaMap\n }\n"],"names":["elements","elementTypes","linkFieldsSchemaPath","uploadFieldsSchemaPath","getGenerateSchemaMap","args","config","schemaMap","schemaPath","admin","Object","values","forEach","el","element","name","set","link","fields","uploadEnabledCollections","collections","filter","enableRichTextRelationship","hidden","upload","Boolean","collection","slug"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAIA,SAAS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;gBACJ;YACF;QACF;QAEA,OAAOX;IACT,EAAC"}
1
+ {"version":3,"sources":["../src/generateSchemaMap.ts"],"sourcesContent":["import type { Field, RichTextAdapter } from 'payload'\n\nimport type { AdapterArguments, RichTextCustomElement } from './types.js'\n\nimport { elements as elementTypes } from './field/elements/index.js'\nimport { linkFieldsSchemaPath } from './field/elements/link/shared.js'\nimport { uploadFieldsSchemaPath } from './field/elements/upload/shared.js'\n\nexport const getGenerateSchemaMap =\n (args: AdapterArguments): RichTextAdapter['generateSchemaMap'] =>\n ({ config, schemaMap, schemaPath }) => {\n ;(args?.admin?.elements || Object.values(elementTypes)).forEach((el) => {\n let element: RichTextCustomElement\n\n if (typeof el === 'object' && el !== null) {\n element = el\n } else if (typeof el === 'string' && elementTypes[el]) {\n element = elementTypes[el]\n }\n\n if (element) {\n switch (element.name) {\n case 'link': {\n schemaMap.set(\n `${schemaPath}.${linkFieldsSchemaPath}`,\n args.admin?.link?.fields as Field[],\n )\n\n break\n }\n\n case 'upload': {\n const uploadEnabledCollections = config.collections.filter(\n ({ admin: { enableRichTextRelationship, hidden }, upload }) => {\n if (hidden === true) {\n return false\n }\n\n return enableRichTextRelationship && Boolean(upload) === true\n },\n )\n\n uploadEnabledCollections.forEach((collection) => {\n if (args?.admin?.upload?.collections[collection.slug]?.fields) {\n schemaMap.set(\n `${schemaPath}.${uploadFieldsSchemaPath}.${collection.slug}`,\n args?.admin?.upload?.collections[collection.slug]?.fields,\n )\n }\n })\n\n break\n }\n\n case 'relationship':\n break\n }\n }\n })\n\n return schemaMap\n }\n"],"names":["elements","elementTypes","linkFieldsSchemaPath","uploadFieldsSchemaPath","getGenerateSchemaMap","args","config","schemaMap","schemaPath","admin","Object","values","forEach","el","element","name","set","link","fields","uploadEnabledCollections","collections","filter","enableRichTextRelationship","hidden","upload","Boolean","collection","slug"],"mappings":"AAIA,SAASA,YAAYC,YAAY,QAAQ,4BAA2B;AACpE,SAASC,oBAAoB,QAAQ,kCAAiC;AACtE,SAAS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