@frontify/guideline-blocks-settings 0.27.0 → 0.28.1

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 (485) hide show
  1. package/.eslintrc.js +1 -1
  2. package/CHANGELOG.md +21 -0
  3. package/README.md +24 -5
  4. package/dist/_virtual/_commonjsHelpers.es.js +7 -0
  5. package/dist/_virtual/_commonjsHelpers.es.js.map +1 -0
  6. package/dist/_virtual/index.es.js +5 -0
  7. package/dist/_virtual/index.es.js.map +1 -0
  8. package/dist/_virtual/index.es2.js +5 -0
  9. package/dist/_virtual/index.es2.js.map +1 -0
  10. package/dist/_virtual/index.es3.js +5 -0
  11. package/dist/_virtual/index.es3.js.map +1 -0
  12. package/dist/_virtual/jsx-runtime.es.js +5 -0
  13. package/dist/_virtual/jsx-runtime.es.js.map +1 -0
  14. package/dist/_virtual/react-dom.development.es.js +5 -0
  15. package/dist/_virtual/react-dom.development.es.js.map +1 -0
  16. package/dist/_virtual/react-dom.production.min.es.js +5 -0
  17. package/dist/_virtual/react-dom.production.min.es.js.map +1 -0
  18. package/dist/_virtual/react-jsx-runtime.development.es.js +5 -0
  19. package/dist/_virtual/react-jsx-runtime.development.es.js.map +1 -0
  20. package/dist/_virtual/react-jsx-runtime.production.min.es.js +5 -0
  21. package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +1 -0
  22. package/dist/_virtual/react.development.es.js +5 -0
  23. package/dist/_virtual/react.development.es.js.map +1 -0
  24. package/dist/_virtual/react.production.min.es.js +5 -0
  25. package/dist/_virtual/react.production.min.es.js.map +1 -0
  26. package/dist/_virtual/scheduler.development.es.js +5 -0
  27. package/dist/_virtual/scheduler.development.es.js.map +1 -0
  28. package/dist/_virtual/scheduler.production.min.es.js +5 -0
  29. package/dist/_virtual/scheduler.production.min.es.js.map +1 -0
  30. package/dist/components/Attachments/AttachmentItem.es.js +180 -0
  31. package/dist/components/Attachments/AttachmentItem.es.js.map +1 -0
  32. package/dist/components/Attachments/Attachments.es.js +145 -0
  33. package/dist/components/Attachments/Attachments.es.js.map +1 -0
  34. package/dist/components/BlockInjectButton/BlockInjectButton.es.js +150 -0
  35. package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -0
  36. package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +73 -0
  37. package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -0
  38. package/dist/components/BlockItemWrapper/Toolbar.es.js +113 -0
  39. package/dist/components/BlockItemWrapper/Toolbar.es.js.map +1 -0
  40. package/dist/components/BlockItemWrapper/constants.es.js +6 -0
  41. package/dist/components/BlockItemWrapper/constants.es.js.map +1 -0
  42. package/dist/components/DownloadButton/DownloadButton.es.js +39 -0
  43. package/dist/components/DownloadButton/DownloadButton.es.js.map +1 -0
  44. package/dist/components/RichTextEditor/RichTextEditor.es.js +42 -0
  45. package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -0
  46. package/dist/components/RichTextEditor/SerializedText.es.js +13 -0
  47. package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -0
  48. package/dist/components/RichTextEditor/constants.es.js +5 -0
  49. package/dist/components/RichTextEditor/constants.es.js.map +1 -0
  50. package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js +34 -0
  51. package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -0
  52. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +54 -0
  53. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -0
  54. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js +12 -0
  55. package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js.map +1 -0
  56. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +17 -0
  57. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -0
  58. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +30 -0
  59. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -0
  60. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +16 -0
  61. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -0
  62. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +37 -0
  63. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -0
  64. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js +25 -0
  65. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js.map +1 -0
  66. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js +20 -0
  67. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js.map +1 -0
  68. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js +26 -0
  69. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js.map +1 -0
  70. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +69 -0
  71. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -0
  72. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +105 -0
  73. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -0
  74. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js +20 -0
  75. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js.map +1 -0
  76. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js +32 -0
  77. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js.map +1 -0
  78. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +58 -0
  79. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +1 -0
  80. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js +19 -0
  81. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +1 -0
  82. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js +26 -0
  83. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +1 -0
  84. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +43 -0
  85. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +1 -0
  86. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js +18 -0
  87. package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js.map +1 -0
  88. package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +62 -0
  89. package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -0
  90. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js +13 -0
  91. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +1 -0
  92. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +25 -0
  93. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +1 -0
  94. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +35 -0
  95. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -0
  96. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +86 -0
  97. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -0
  98. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +24 -0
  99. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -0
  100. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js +19 -0
  101. package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +1 -0
  102. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js +13 -0
  103. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +1 -0
  104. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +11 -0
  105. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +1 -0
  106. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js +10 -0
  107. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js.map +1 -0
  108. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js +75 -0
  109. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js.map +1 -0
  110. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js +18 -0
  111. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +1 -0
  112. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js +17 -0
  113. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js.map +1 -0
  114. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js +14 -0
  115. package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +1 -0
  116. package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +53 -0
  117. package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -0
  118. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +19 -0
  119. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -0
  120. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +37 -0
  121. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -0
  122. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +53 -0
  123. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +1 -0
  124. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +29 -0
  125. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +1 -0
  126. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +8 -0
  127. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -0
  128. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +80 -0
  129. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -0
  130. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +40 -0
  131. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +1 -0
  132. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +93 -0
  133. package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -0
  134. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +25 -0
  135. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -0
  136. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +27 -0
  137. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -0
  138. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +12 -0
  139. package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +1 -0
  140. package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js +5 -0
  141. package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js.map +1 -0
  142. package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +39 -0
  143. package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -0
  144. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +18 -0
  145. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -0
  146. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.es.js +5 -0
  147. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.es.js.map +1 -0
  148. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js +17 -0
  149. package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js.map +1 -0
  150. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +45 -0
  151. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -0
  152. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +45 -0
  153. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -0
  154. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +45 -0
  155. package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -0
  156. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +46 -0
  157. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -0
  158. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +39 -0
  159. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -0
  160. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +39 -0
  161. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -0
  162. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +39 -0
  163. package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -0
  164. package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js +40 -0
  165. package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js.map +1 -0
  166. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +46 -0
  167. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -0
  168. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +46 -0
  169. package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -0
  170. package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +41 -0
  171. package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -0
  172. package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +48 -0
  173. package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -0
  174. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js +68 -0
  175. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js.map +1 -0
  176. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js +55 -0
  177. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js.map +1 -0
  178. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js +62 -0
  179. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js.map +1 -0
  180. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js +61 -0
  181. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js.map +1 -0
  182. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js +34 -0
  183. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js.map +1 -0
  184. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js +26 -0
  185. package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js.map +1 -0
  186. package/dist/components/RichTextEditor/plugins/styles.es.js +168 -0
  187. package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -0
  188. package/dist/components/RichTextEditor/serializer/nodes/button.es.js +16 -0
  189. package/dist/components/RichTextEditor/serializer/nodes/button.es.js.map +1 -0
  190. package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js +19 -0
  191. package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js.map +1 -0
  192. package/dist/components/RichTextEditor/serializer/nodes/default.es.js +17 -0
  193. package/dist/components/RichTextEditor/serializer/nodes/default.es.js.map +1 -0
  194. package/dist/components/RichTextEditor/serializer/nodes/link.es.js +15 -0
  195. package/dist/components/RichTextEditor/serializer/nodes/link.es.js.map +1 -0
  196. package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js +12 -0
  197. package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js.map +1 -0
  198. package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js +61 -0
  199. package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js.map +1 -0
  200. package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js +25 -0
  201. package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js.map +1 -0
  202. package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js +8 -0
  203. package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js.map +1 -0
  204. package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js +13 -0
  205. package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js.map +1 -0
  206. package/dist/helpers/addHttps.es.js +14 -0
  207. package/dist/helpers/addHttps.es.js.map +1 -0
  208. package/dist/helpers/convertToRichTextValue.es.js +6 -0
  209. package/dist/helpers/convertToRichTextValue.es.js.map +1 -0
  210. package/dist/helpers/customCoordinatesGetterFactory.es.js +32 -0
  211. package/dist/helpers/customCoordinatesGetterFactory.es.js.map +1 -0
  212. package/dist/helpers/hasRichTextValue.es.js +15 -0
  213. package/dist/helpers/hasRichTextValue.es.js.map +1 -0
  214. package/dist/helpers/isDownloadable.es.js +6 -0
  215. package/dist/helpers/isDownloadable.es.js.map +1 -0
  216. package/dist/helpers/mapColorPalettes.es.js +16 -0
  217. package/dist/helpers/mapColorPalettes.es.js.map +1 -0
  218. package/dist/hooks/useAttachments.es.js +31 -0
  219. package/dist/hooks/useAttachments.es.js.map +1 -0
  220. package/dist/hooks/useDndSensors.es.js +20 -0
  221. package/dist/hooks/useDndSensors.es.js.map +1 -0
  222. package/dist/index.cjs.js +252 -1
  223. package/dist/index.cjs.js.map +1 -1
  224. package/dist/index.d.ts +816 -1
  225. package/dist/index.es.js +172 -3
  226. package/dist/index.es.js.map +1 -1
  227. package/dist/index.umd.js +252 -1
  228. package/dist/index.umd.js.map +1 -1
  229. package/dist/settings/background.es.js +22 -0
  230. package/dist/settings/background.es.js.map +1 -0
  231. package/dist/settings/border.es.js +61 -0
  232. package/dist/settings/border.es.js.map +1 -0
  233. package/dist/settings/borderRadius.es.js +56 -0
  234. package/dist/settings/borderRadius.es.js.map +1 -0
  235. package/dist/settings/borderRadiusExtended.es.js +64 -0
  236. package/dist/settings/borderRadiusExtended.es.js.map +1 -0
  237. package/dist/settings/defaultValues.es.js +19 -0
  238. package/dist/settings/defaultValues.es.js.map +1 -0
  239. package/dist/settings/gutter.es.js +56 -0
  240. package/dist/settings/gutter.es.js.map +1 -0
  241. package/dist/settings/margin.es.js +53 -0
  242. package/dist/settings/margin.es.js.map +1 -0
  243. package/dist/settings/marginExtended.es.js +65 -0
  244. package/dist/settings/marginExtended.es.js.map +1 -0
  245. package/dist/settings/padding.es.js +53 -0
  246. package/dist/settings/padding.es.js.map +1 -0
  247. package/dist/settings/paddingExtended.es.js +65 -0
  248. package/dist/settings/paddingExtended.es.js.map +1 -0
  249. package/dist/settings/securityDownloadable.es.js +19 -0
  250. package/dist/settings/securityDownloadable.es.js.map +1 -0
  251. package/dist/settings/securityGlobalControl.es.js +33 -0
  252. package/dist/settings/securityGlobalControl.es.js.map +1 -0
  253. package/dist/settings/types.es.js +48 -0
  254. package/dist/settings/types.es.js.map +1 -0
  255. package/dist/style.css +1 -0
  256. package/dist/utilities/color/getReadableColor.es.js +14 -0
  257. package/dist/utilities/color/getReadableColor.es.js.map +1 -0
  258. package/dist/utilities/color/isDark.es.js +10 -0
  259. package/dist/utilities/color/isDark.es.js.map +1 -0
  260. package/dist/utilities/color/setAlpha.es.js +6 -0
  261. package/dist/utilities/color/setAlpha.es.js.map +1 -0
  262. package/dist/utilities/color/toColorObject.es.js +9 -0
  263. package/dist/utilities/color/toColorObject.es.js.map +1 -0
  264. package/dist/utilities/color/toHex8String.es.js +7 -0
  265. package/dist/utilities/color/toHex8String.es.js.map +1 -0
  266. package/dist/utilities/color/toHexString.es.js +7 -0
  267. package/dist/utilities/color/toHexString.es.js.map +1 -0
  268. package/dist/utilities/color/toRgbaString.es.js +7 -0
  269. package/dist/utilities/color/toRgbaString.es.js.map +1 -0
  270. package/dist/utilities/color/toShortRgba.es.js +11 -0
  271. package/dist/utilities/color/toShortRgba.es.js.map +1 -0
  272. package/dist/utilities/moveItemInArray.es.js +12 -0
  273. package/dist/utilities/moveItemInArray.es.js.map +1 -0
  274. package/dist/utilities/react/getBackgroundColorStyles.es.js +8 -0
  275. package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -0
  276. package/dist/utilities/react/getBorderStyles.es.js +12 -0
  277. package/dist/utilities/react/getBorderStyles.es.js.map +1 -0
  278. package/dist/utilities/react/getRadiusStyles.es.js +8 -0
  279. package/dist/utilities/react/getRadiusStyles.es.js.map +1 -0
  280. package/dist/utilities/react/joinClassNames.es.js +5 -0
  281. package/dist/utilities/react/joinClassNames.es.js.map +1 -0
  282. package/package.json +46 -10
  283. package/postcss.config.js +8 -0
  284. package/setupTests.ts +13 -0
  285. package/src/components/Attachments/AttachmentItem.tsx +257 -0
  286. package/src/components/Attachments/Attachments.spec.ct.tsx +151 -0
  287. package/src/components/Attachments/Attachments.tsx +221 -0
  288. package/src/components/Attachments/index.ts +4 -0
  289. package/src/components/Attachments/types.ts +30 -0
  290. package/src/components/BlockInjectButton/BlockInjectButton.spec.ct.tsx +48 -0
  291. package/src/components/BlockInjectButton/BlockInjectButton.tsx +212 -0
  292. package/src/components/BlockInjectButton/index.ts +4 -0
  293. package/src/components/BlockInjectButton/types.ts +18 -0
  294. package/src/components/BlockItemWrapper/BlockItemWrapper.spec.ct.tsx +146 -0
  295. package/src/components/BlockItemWrapper/BlockItemWrapper.tsx +76 -0
  296. package/src/components/BlockItemWrapper/Toolbar.tsx +128 -0
  297. package/src/components/BlockItemWrapper/constants.ts +4 -0
  298. package/src/components/BlockItemWrapper/index.ts +5 -0
  299. package/src/components/BlockItemWrapper/types.ts +46 -0
  300. package/src/components/DownloadButton/DownloadButton.spec.ct.tsx +20 -0
  301. package/src/components/DownloadButton/DownloadButton.tsx +36 -0
  302. package/src/components/DownloadButton/index.ts +3 -0
  303. package/src/components/DownloadButton/types.ts +5 -0
  304. package/src/components/RichTextEditor/RichTextEditor.spec.ct.tsx +204 -0
  305. package/src/components/RichTextEditor/RichTextEditor.tsx +62 -0
  306. package/src/components/RichTextEditor/SerializedText.tsx +25 -0
  307. package/src/components/RichTextEditor/constants.ts +3 -0
  308. package/src/components/RichTextEditor/index.ts +6 -0
  309. package/src/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.tsx +53 -0
  310. package/src/components/RichTextEditor/pluginPresets/index.ts +3 -0
  311. package/src/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.tsx +74 -0
  312. package/src/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.ts +11 -0
  313. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.tsx +20 -0
  314. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.tsx +56 -0
  315. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.tsx +19 -0
  316. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.tsx +42 -0
  317. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.tsx +37 -0
  318. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.tsx +22 -0
  319. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.tsx +30 -0
  320. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.tsx +81 -0
  321. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/types.ts +13 -0
  322. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.ts +143 -0
  323. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.tsx +31 -0
  324. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.ts +46 -0
  325. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/index.ts +12 -0
  326. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.ts +113 -0
  327. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.ts +21 -0
  328. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.ts +30 -0
  329. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.ts +71 -0
  330. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.ts +22 -0
  331. package/src/components/RichTextEditor/plugins/ButtonPlugin/components/index.ts +3 -0
  332. package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +116 -0
  333. package/src/components/RichTextEditor/plugins/ButtonPlugin/index.ts +7 -0
  334. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/index.ts +8 -0
  335. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.ts +17 -0
  336. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.ts +40 -0
  337. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.ts +68 -0
  338. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.ts +198 -0
  339. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.ts +40 -0
  340. package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.ts +30 -0
  341. package/src/components/RichTextEditor/plugins/ButtonPlugin/types.ts +13 -0
  342. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.ts +28 -0
  343. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.ts +14 -0
  344. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.ts +18 -0
  345. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/index.ts +8 -0
  346. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.ts +77 -0
  347. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.ts +23 -0
  348. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.ts +30 -0
  349. package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.ts +45 -0
  350. package/src/components/RichTextEditor/plugins/ButtonPlugin/withButton.ts +106 -0
  351. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.tsx +26 -0
  352. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.tsx +43 -0
  353. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/index.ts +4 -0
  354. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.ts +113 -0
  355. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.tsx +45 -0
  356. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.tsx +5 -0
  357. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.tsx +105 -0
  358. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/index.ts +4 -0
  359. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/types.ts +16 -0
  360. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.ts +73 -0
  361. package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.ts +136 -0
  362. package/src/components/RichTextEditor/plugins/LinkPlugin/LinkButton.tsx +38 -0
  363. package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx +36 -0
  364. package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.ts +11 -0
  365. package/src/components/RichTextEditor/plugins/LinkPlugin/id.ts +3 -0
  366. package/src/components/RichTextEditor/plugins/LinkPlugin/index.ts +48 -0
  367. package/src/components/RichTextEditor/plugins/LinkPlugin/types.ts +12 -0
  368. package/src/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.ts +30 -0
  369. package/src/components/RichTextEditor/plugins/LinkPlugin/utils/index.ts +4 -0
  370. package/src/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.spec.ts +35 -0
  371. package/src/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.ts +3 -0
  372. package/src/components/RichTextEditor/plugins/LinkPlugin/utils/url.spec.ts +75 -0
  373. package/src/components/RichTextEditor/plugins/LinkPlugin/utils/url.ts +21 -0
  374. package/src/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.tsx +61 -0
  375. package/src/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.tsx +61 -0
  376. package/src/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.tsx +62 -0
  377. package/src/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.tsx +61 -0
  378. package/src/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.tsx +58 -0
  379. package/src/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.tsx +58 -0
  380. package/src/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.tsx +59 -0
  381. package/src/components/RichTextEditor/plugins/TextStylePlugins/helpers.tsx +44 -0
  382. package/src/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.tsx +61 -0
  383. package/src/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.tsx +61 -0
  384. package/src/components/RichTextEditor/plugins/TextStylePlugins/index.ts +15 -0
  385. package/src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx +58 -0
  386. package/src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx +62 -0
  387. package/src/components/RichTextEditor/plugins/index.ts +6 -0
  388. package/src/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.tsx +80 -0
  389. package/src/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.tsx +97 -0
  390. package/src/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.spec.ct.tsx +138 -0
  391. package/src/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.tsx +80 -0
  392. package/src/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.tsx +83 -0
  393. package/src/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.tsx +68 -0
  394. package/src/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.tsx +37 -0
  395. package/src/components/RichTextEditor/plugins/shared/LinkSelector/index.ts +3 -0
  396. package/src/components/RichTextEditor/plugins/styles.ts +179 -0
  397. package/src/components/RichTextEditor/serializer/index.ts +3 -0
  398. package/src/components/RichTextEditor/serializer/nodes/button.ts +25 -0
  399. package/src/components/RichTextEditor/serializer/nodes/checkItemNode.ts +29 -0
  400. package/src/components/RichTextEditor/serializer/nodes/default.ts +52 -0
  401. package/src/components/RichTextEditor/serializer/nodes/link.ts +25 -0
  402. package/src/components/RichTextEditor/serializer/nodes/mentionHtmlNode.ts +17 -0
  403. package/src/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.ts +134 -0
  404. package/src/components/RichTextEditor/serializer/serializeToHtml.ts +49 -0
  405. package/src/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.ts +21 -0
  406. package/src/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.ts +32 -0
  407. package/src/components/RichTextEditor/types.ts +23 -0
  408. package/src/components/index.ts +7 -0
  409. package/src/helpers/addHttps.spec.ts +42 -0
  410. package/src/helpers/addHttps.ts +15 -0
  411. package/src/helpers/convertToRichTextValue.spec.ts +32 -0
  412. package/src/helpers/convertToRichTextValue.ts +6 -0
  413. package/src/helpers/customCoordinatesGetterFactory.spec.ts +69 -0
  414. package/src/helpers/customCoordinatesGetterFactory.ts +39 -0
  415. package/src/helpers/hasRichTextValue.spec.ts +63 -0
  416. package/src/helpers/hasRichTextValue.ts +29 -0
  417. package/src/helpers/index.ts +8 -0
  418. package/src/helpers/isDownloadable.spec.ts +47 -0
  419. package/src/helpers/isDownloadable.ts +7 -0
  420. package/src/helpers/mapColorPalettes.spec.ts +146 -0
  421. package/src/helpers/mapColorPalettes.ts +22 -0
  422. package/src/hooks/index.ts +4 -0
  423. package/src/hooks/useAttachments.spec.ts +79 -0
  424. package/src/hooks/useAttachments.ts +46 -0
  425. package/src/hooks/useDndSensors.spec.ts +40 -0
  426. package/src/hooks/useDndSensors.ts +23 -0
  427. package/src/index.ts +8 -0
  428. package/src/settings/background.spec.ts +173 -0
  429. package/src/settings/background.ts +49 -0
  430. package/src/settings/border.spec.ts +76 -0
  431. package/src/settings/border.ts +90 -0
  432. package/src/settings/borderRadius.spec.ts +30 -0
  433. package/src/settings/borderRadius.ts +73 -0
  434. package/src/settings/borderRadiusExtended.spec.ts +52 -0
  435. package/src/settings/borderRadiusExtended.ts +84 -0
  436. package/src/settings/defaultValues.ts +21 -0
  437. package/src/settings/gutter.spec.ts +60 -0
  438. package/src/settings/gutter.ts +75 -0
  439. package/src/settings/index.ts +14 -0
  440. package/src/settings/margin.spec.ts +42 -0
  441. package/src/settings/margin.ts +72 -0
  442. package/src/settings/marginExtended.spec.ts +45 -0
  443. package/src/settings/marginExtended.ts +91 -0
  444. package/src/settings/padding.spec.ts +42 -0
  445. package/src/settings/padding.ts +73 -0
  446. package/src/settings/paddingExtended.spec.ts +45 -0
  447. package/src/settings/paddingExtended.ts +91 -0
  448. package/src/settings/security.spec.ts +87 -0
  449. package/src/settings/security.ts +61 -0
  450. package/src/settings/securityDownloadable.spec.ts +46 -0
  451. package/src/settings/securityDownloadable.ts +33 -0
  452. package/src/settings/securityGlobalControl.ts +42 -0
  453. package/src/settings/types.ts +128 -0
  454. package/src/utilities/color/getReadableColor.spec.ts +32 -0
  455. package/src/utilities/color/getReadableColor.ts +34 -0
  456. package/src/utilities/color/index.ts +10 -0
  457. package/src/utilities/color/isDark.spec.ts +33 -0
  458. package/src/utilities/color/isDark.ts +29 -0
  459. package/src/utilities/color/setAlpha.spec.ts +28 -0
  460. package/src/utilities/color/setAlpha.ts +14 -0
  461. package/src/utilities/color/toColorObject.spec.ts +19 -0
  462. package/src/utilities/color/toColorObject.ts +16 -0
  463. package/src/utilities/color/toHex8String.spec.ts +17 -0
  464. package/src/utilities/color/toHex8String.ts +14 -0
  465. package/src/utilities/color/toHexString.spec.ts +17 -0
  466. package/src/utilities/color/toHexString.ts +10 -0
  467. package/src/utilities/color/toRgbaString.spec.ts +12 -0
  468. package/src/utilities/color/toRgbaString.ts +14 -0
  469. package/src/utilities/color/toShortRgba.spec.ts +16 -0
  470. package/src/utilities/color/toShortRgba.ts +35 -0
  471. package/src/utilities/index.ts +5 -0
  472. package/src/utilities/moveItemInArray.spec.ts +17 -0
  473. package/src/utilities/moveItemInArray.ts +21 -0
  474. package/src/utilities/react/getBackgroundColorStyles.spec.ts +18 -0
  475. package/src/utilities/react/getBackgroundColorStyles.ts +11 -0
  476. package/src/utilities/react/getBorderStyles.spec.ts +39 -0
  477. package/src/utilities/react/getBorderStyles.ts +21 -0
  478. package/src/utilities/react/getRadiusStyles.spec.ts +25 -0
  479. package/src/utilities/react/getRadiusStyles.ts +8 -0
  480. package/src/utilities/react/index.ts +6 -0
  481. package/src/utilities/react/joinClassNames.spec.ts +18 -0
  482. package/src/utilities/react/joinClassNames.ts +10 -0
  483. package/tailwind.config.js +27 -0
  484. package/tsconfig.json +3 -1
  485. package/vite.config.ts +11 -1
package/dist/index.d.ts CHANGED
@@ -1,33 +1,117 @@
1
- import type { AppBridgeBlock } from '@frontify/app-bridge';
1
+ import type { AnyObject } from '@udecode/plate';
2
+ import { AppBridgeBlock } from '@frontify/app-bridge';
3
+ import { Asset } from '@frontify/app-bridge';
2
4
  import type { AssetInputBlock as AssetInputBlock_2 } from '@frontify/sidebar-settings';
3
5
  import type { BaseBlock as BaseBlock_2 } from '@frontify/sidebar-settings';
4
6
  import type { Bundle as Bundle_2 } from '@frontify/sidebar-settings';
5
7
  import type { ChecklistBlock as ChecklistBlock_2 } from '@frontify/sidebar-settings';
6
8
  import type { ChoicesType as ChoicesType_2 } from '@frontify/sidebar-settings';
9
+ import { Color } from '@frontify/fondue';
10
+ import { Color as Color_2 } from '@frontify/sidebar-settings';
7
11
  import type { ColorInputBlock as ColorInputBlock_2 } from '@frontify/sidebar-settings';
12
+ import { ColorPalette } from '@frontify/app-bridge';
13
+ import { CSSProperties } from 'react';
8
14
  import type { DropdownBlock as DropdownBlock_2 } from '@frontify/sidebar-settings';
9
15
  import type { DynamicSettingBlock as DynamicSettingBlock_2 } from '@frontify/sidebar-settings';
10
16
  import type { DynamicSupportedBlock as DynamicSupportedBlock_2 } from '@frontify/sidebar-settings';
11
17
  import type { FC } from 'react';
18
+ import type { FileType } from '@frontify/app-bridge';
12
19
  import type { FontInputBlock as FontInputBlock_2 } from '@frontify/sidebar-settings';
13
20
  import type { InputBlock as InputBlock_2 } from '@frontify/sidebar-settings';
21
+ import { InsertNodesOptions } from '@udecode/plate';
22
+ import type { JSX as JSX_2 } from 'react/jsx-runtime';
23
+ import { KeyboardCoordinateGetter } from '@dnd-kit/core';
14
24
  import type { LegacyAssetInputBlock as LegacyAssetInputBlock_2 } from '@frontify/sidebar-settings';
15
25
  import type { LinkChooserBlock as LinkChooserBlock_2 } from '@frontify/sidebar-settings';
26
+ import { MarkupElement } from '@frontify/fondue';
27
+ import { MenuItemStyle } from '@frontify/fondue';
16
28
  import type { MultiInputBlock as MultiInputBlock_2 } from '@frontify/sidebar-settings';
17
29
  import type { NotificationBlock as NotificationBlock_2 } from '@frontify/sidebar-settings';
30
+ import { Palette } from '@frontify/fondue';
31
+ import { PlateEditor } from '@udecode/plate';
32
+ import type { PlatePlugin } from '@udecode/plate';
33
+ import { Plugin as Plugin_2 } from '@frontify/fondue';
34
+ import { PluginComposer } from '@frontify/fondue';
35
+ import { PluginProps } from '@frontify/fondue';
36
+ import type { PropsWithChildren } from 'react';
37
+ import type { RangeBeforeOptions } from '@udecode/plate';
38
+ import type { ReactNode } from 'react';
18
39
  import type { SectionHeadingBlock as SectionHeadingBlock_2 } from '@frontify/sidebar-settings';
19
40
  import type { SegmentedControlsBlock as SegmentedControlsBlock_2 } from '@frontify/sidebar-settings';
41
+ import type { SensorDescriptor } from '@dnd-kit/core';
42
+ import type { SensorOptions } from '@dnd-kit/core';
20
43
  import type { SettingBlock as SettingBlock_2 } from '@frontify/sidebar-settings';
21
44
  import type { SimpleSettingBlock as SimpleSettingBlock_2 } from '@frontify/sidebar-settings';
22
45
  import type { SwitchBlock as SwitchBlock_2 } from '@frontify/sidebar-settings';
23
46
  import type { TemplateInputBlock as TemplateInputBlock_2 } from '@frontify/sidebar-settings';
24
47
  import type { TextareaBlock as TextareaBlock_2 } from '@frontify/sidebar-settings';
48
+ import { TextStyleRenderElementProps } from '@frontify/fondue';
49
+ import { TLinkElement } from '@udecode/plate';
50
+ import { TText } from '@udecode/plate';
51
+ import { UnwrapNodesOptions } from '@udecode/plate';
52
+ import { Value } from '@udecode/plate';
25
53
  import type { ValueOrPromisedValue as ValueOrPromisedValue_2 } from '@frontify/sidebar-settings';
54
+ import { WithOverride } from '@udecode/plate';
55
+ import { WrapNodesOptions } from '@udecode/plate';
56
+
57
+ export declare const addHttps: (url: string) => string;
58
+
59
+ export declare const AllTextStylePlugins: (Heading1Plugin | Heading2Plugin | Heading3Plugin | Heading4Plugin | Custom1Plugin | Custom2Plugin | Custom3Plugin | QuotePlugin | ParagraphPlugin | ImageCaptionPlugin | ImageTitlePlugin)[];
60
+
61
+ export declare const AllTextStyles: TextStyles[];
26
62
 
27
63
  export declare type AssetInputBlock = AssetInputBlock_2<AppBridgeBlock>;
28
64
 
65
+ export declare type AttachmentItemProps = SortableAttachmentItemProps & {
66
+ isDragging?: boolean;
67
+ transformStyle?: Record<string, unknown>;
68
+ draggableProps?: Record<string, unknown>;
69
+ isOverlay?: boolean;
70
+ };
71
+
72
+ export declare const Attachments: ({ items, onDelete, onReplaceWithBrowse, onReplaceWithUpload, onBrowse, onUpload, onSorted, appBridge, }: AttachmentsProps) => JSX_2.Element | null;
73
+
74
+ export declare type AttachmentsProps = {
75
+ items?: Asset[];
76
+ appBridge: AppBridgeBlock;
77
+ onReplaceWithUpload: (attachmentToReplace: Asset, newAsset: Asset) => Promise<void>;
78
+ onReplaceWithBrowse: (attachmentToReplace: Asset, newAsset: Asset) => Promise<void>;
79
+ onDelete: (attachmentToDelete: Asset) => void;
80
+ onUpload: (uploadedAttachments: Asset[]) => Promise<void>;
81
+ onBrowse: (browserAttachments: Asset[]) => void;
82
+ onSorted: (sortedAttachments: Asset[]) => void;
83
+ };
84
+
85
+ /**
86
+ * Returns background settings: background switch, background color
87
+ *
88
+ * @param options Options for the settings
89
+ * @param options.id Custom suffix for the setting ids
90
+ * @param options.defaultValue Default value for the background switch
91
+ * @param options.defaultColor Default value for the background color
92
+ * @param options.preventDefaultColor Whether the background color should be empty by default
93
+ * @param options.switchLabel Label for the background switch
94
+ * @returns {SettingBlock} Returns background settings
95
+ */
96
+ declare type BackgroundSettingsType = {
97
+ id?: string;
98
+ defaultValue?: boolean;
99
+ defaultColor?: Color;
100
+ preventDefaultColor?: boolean;
101
+ switchLabel?: string;
102
+ };
103
+
29
104
  export declare type BaseBlock<T = undefined> = BaseBlock_2<AppBridgeBlock, T>;
30
105
 
106
+ declare type BaseToolbarItem = {
107
+ icon: JSX.Element;
108
+ tooltip?: string;
109
+ };
110
+
111
+ export declare const BlockButtonStyles: Record<string, CSSProperties & {
112
+ hover?: CSSProperties;
113
+ }>;
114
+
31
115
  export declare type BlockConfigExport = {
32
116
  /**
33
117
  * Block component to render.
@@ -61,6 +145,36 @@ export declare type BlockConfigExport = {
61
145
  }) => Promise<void>);
62
146
  };
63
147
 
148
+ export declare const BlockInjectButton: ({ onDrop, label, icon, secondaryLabel, isLoading, fillParentContainer, onAssetChooseClick, onUploadClick, withMenu, onClick, validFileType, verticalLayout, }: BlockInjectButtonProps) => JSX_2.Element;
149
+
150
+ export declare type BlockInjectButtonProps = {
151
+ isLoading?: boolean;
152
+ label?: string;
153
+ validFileType?: keyof typeof FileType;
154
+ secondaryLabel?: string;
155
+ icon?: JSX.Element;
156
+ onDrop?: (files: FileList) => void;
157
+ fillParentContainer?: boolean;
158
+ onUploadClick?: () => void;
159
+ onAssetChooseClick?: () => void;
160
+ withMenu?: boolean;
161
+ onClick?: () => void;
162
+ verticalLayout?: boolean;
163
+ };
164
+
165
+ export declare const BlockItemWrapper: ({ children, toolbarFlyoutItems, toolbarItems, shouldHideWrapper, shouldHideComponent, isDragging, shouldFillContainer, outlineOffset, shouldBeShown, }: PropsWithChildren<BlockItemWrapperProps>) => string | number | boolean | JSX_2.Element | Iterable<ReactNode> | null | undefined;
166
+
167
+ export declare type BlockItemWrapperProps = {
168
+ shouldHideWrapper?: boolean;
169
+ shouldHideComponent?: boolean;
170
+ toolbarItems: (ToolbarItem | undefined)[];
171
+ toolbarFlyoutItems: FlyoutToolbarItem[][];
172
+ isDragging?: boolean;
173
+ shouldFillContainer?: boolean;
174
+ outlineOffset?: number;
175
+ shouldBeShown?: boolean;
176
+ };
177
+
64
178
  export declare type BlockProps = {
65
179
  /**
66
180
  * The Frontify App Bridge provides an interface to the Frontify app internals.
@@ -79,14 +193,180 @@ export declare type BlockSettingsStructureExport = {
79
193
  [customSectionName: string]: SettingBlock[];
80
194
  };
81
195
 
196
+ export declare const BlockStyles: Record<string, CSSProperties & {
197
+ hover?: CSSProperties;
198
+ }>;
199
+
200
+ /**
201
+ * Returns border radius settings: border radius switch, radius slider, custom radius input
202
+ *
203
+ * @param options Options for the settings
204
+ * @param options.id Custom suffix for the setting ids
205
+ * @param options.dependentSettingId Id of setting which the border radius is dependent on
206
+ * @returns {SettingBlock} Returns border settings
207
+ */
208
+ declare type BorderRadiusSettingsType = {
209
+ id?: string;
210
+ dependentSettingId?: string;
211
+ radiusStyleMap?: Record<Radius, string>;
212
+ defaultRadius?: Radius;
213
+ };
214
+
215
+ /**
216
+ * Returns border radius settings: border radius switch, radius slider, custom radius inputs for every corner
217
+ *
218
+ * @param options Options for the settings
219
+ * @param options.id Custom suffix for the setting ids
220
+ * @param options.dependentSettingId Id of setting which the border radius is dependent on
221
+ * @returns {SettingBlock} Returns border settings
222
+ */
223
+ declare type BorderRadiusSettingsType_2 = {
224
+ id?: string;
225
+ dependentSettingId?: string;
226
+ defaultValue?: Radius;
227
+ };
228
+
229
+ export declare type BorderSettings = {
230
+ hasBorder: boolean;
231
+ borderStyle: BorderStyle;
232
+ borderWidth: string;
233
+ borderColor: Color_2;
234
+ };
235
+
236
+ /**
237
+ * Returns border settings: border switch, border style, border width, border color
238
+ *
239
+ * @param options Options for the settings
240
+ * @param options.id Custom suffix for the setting ids
241
+ * @param options.switchLabel Label for the border switch
242
+ * @param options.defaultValue Default value for the border switch
243
+ * @returns {SettingBlock} Returns border settings
244
+ */
245
+ declare type BorderSettingsType = {
246
+ id?: string;
247
+ defaultValue?: boolean;
248
+ defaultColor?: Color_2;
249
+ switchLabel?: string;
250
+ };
251
+
252
+ export declare enum BorderStyle {
253
+ Solid = "Solid",
254
+ Dashed = "Dashed",
255
+ Dotted = "Dotted"
256
+ }
257
+
258
+ export declare const borderStyleMap: Record<BorderStyle, string>;
259
+
82
260
  export declare type Bundle = Bundle_2<AppBridgeBlock>;
83
261
 
262
+ export declare const BUTTON_PLUGIN = "button-plugin";
263
+
264
+ export declare interface ButtonPlugin {
265
+ forceSubmit?: boolean;
266
+ /**
267
+ * Allow custom config for rangeBeforeOptions.
268
+ * @example default
269
+ * {
270
+ * matchString: ' ',
271
+ * skipInvalid: true,
272
+ * afterMatch: true,
273
+ * }
274
+ */
275
+ rangeBeforeOptions?: RangeBeforeOptions;
276
+ /**
277
+ * Hotkeys to trigger floating button.
278
+ * @default 'command+k, ctrl+k'
279
+ */
280
+ triggerFloatingButtonHotkeys: string;
281
+ /**
282
+ * Callback to validate an url.
283
+ * @default isUrl
284
+ */
285
+ isUrl: (text: string) => boolean;
286
+ /**
287
+ * Callback to optionally get the href for a url
288
+ * @returns href: an optional link to be used that is different from the text content (example https://google.com for google.com)
289
+ */
290
+ getUrlHref?: (url: string) => string | undefined;
291
+ /**
292
+ * On keyboard shortcut or toolbar mousedown, get the link url by calling this promise. The
293
+ * default behavior is to use the browser's native `prompt`.
294
+ */
295
+ getLinkUrl?: (prevUrl: string | null) => Promise<string | null>;
296
+ }
297
+
298
+ export declare class ButtonPlugin extends Plugin_2 {
299
+ styles: CSSProperties;
300
+ private appBridge;
301
+ constructor({ styles, ...props }: ButtonPluginProps);
302
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
303
+ }
304
+
305
+ export declare type ButtonPluginProps = Omit<PluginProps, 'styles'> & {
306
+ styles?: Record<string, CSSProperties & {
307
+ hover?: CSSProperties;
308
+ }>;
309
+ } & {
310
+ appBridge: AppBridgeBlock;
311
+ };
312
+
313
+ declare type ButtonToolbarItem = BaseToolbarItem & {
314
+ onClick: () => void;
315
+ };
316
+
84
317
  export declare type ChecklistBlock = ChecklistBlock_2<AppBridgeBlock>;
85
318
 
86
319
  export declare type ChoicesType = ChoicesType_2<AppBridgeBlock>;
87
320
 
88
321
  export declare type ColorInputBlock = ColorInputBlock_2<AppBridgeBlock>;
89
322
 
323
+ export declare const convertToRteValue: (textStyle?: string, text?: string, align?: 'center' | 'right' | 'left' | 'justify') => string;
324
+
325
+ export declare const createButtonNode: <V extends Value>(editor: PlateEditor<V>, { url, text, buttonStyle, target, children }: CreateButtonNodeOptions) => TButtonElement;
326
+
327
+ export declare interface CreateButtonNodeOptions {
328
+ url: string;
329
+ text?: string;
330
+ buttonStyle?: RichTextButtonStyle;
331
+ target?: string;
332
+ children?: TText[];
333
+ }
334
+
335
+ /**
336
+ * Enables support for hyperlinks.
337
+ */
338
+ export declare const createButtonPlugin: (appBridge: AppBridgeBlock) => PlatePlugin<AnyObject, Value, PlateEditor<Value>>;
339
+
340
+ export declare const createLinkPlugin: (appBridge: AppBridgeBlock) => PlatePlugin<AnyObject, Value, PlateEditor<Value>>;
341
+
342
+ export declare const createParagraphPlugin: (styles: CSSProperties) => PlatePlugin<AnyObject, Value, PlateEditor<Value>>;
343
+
344
+ export declare const createQuotePlugin: (styles: CSSProperties) => PlatePlugin<AnyObject, Value, PlateEditor<Value>>;
345
+
346
+ export declare class Custom1Plugin extends Plugin_2 {
347
+ styles: CSSProperties;
348
+ constructor({ styles, ...props }?: PluginProps);
349
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
350
+ }
351
+
352
+ export declare class Custom2Plugin extends Plugin_2 {
353
+ styles: CSSProperties;
354
+ constructor({ styles, ...props }?: PluginProps);
355
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
356
+ }
357
+
358
+ export declare class Custom3Plugin extends Plugin_2 {
359
+ styles: CSSProperties;
360
+ constructor({ styles, ...props }?: PluginProps);
361
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
362
+ }
363
+
364
+ export declare const customCoordinatesGetterFactory: (columnGap: number, rowGap: number) => KeyboardCoordinateGetter;
365
+
366
+ export declare const DEFAULT_DRAG_TOOLTIP = "Drag or press \u21B5 to move";
367
+
368
+ export declare const DEFAULT_DRAGGING_TOOLTIP = "Move with \u2191\u2193\u2190\u2192 and confirm with \u21B5";
369
+
90
370
  /**
91
371
  * Type helper to make it easier to export a theme, accepts a direct {@link BlockConfigExport} object.
92
372
  */
@@ -98,24 +378,354 @@ export declare const defineBlock: (config: BlockConfigExport) => BlockConfigExpo
98
378
  */
99
379
  export declare const defineSettings: <T extends BlockSettingsStructureExport | (() => Promise<BlockSettingsStructureExport>) | (() => BlockSettingsStructureExport)>(settingsStructure: T) => T;
100
380
 
381
+ export declare const DownloadButton: ({ onDownload }: DownloadButtonProps) => JSX_2.Element;
382
+
383
+ declare type DownloadButtonProps = {
384
+ onDownload: () => void;
385
+ };
386
+
387
+ declare type DraghandleToolbarItem = BaseToolbarItem & {
388
+ draggableProps: Record<string, unknown>;
389
+ setActivatorNodeRef?: (node: HTMLElement | null) => void;
390
+ };
391
+
101
392
  export declare type DropdownBlock = DropdownBlock_2<AppBridgeBlock>;
102
393
 
103
394
  export declare type DynamicSettingBlock<Block extends DynamicSupportedBlock = DynamicSupportedBlock> = DynamicSettingBlock_2<AppBridgeBlock, Block>;
104
395
 
105
396
  export declare type DynamicSupportedBlock = DynamicSupportedBlock_2<AppBridgeBlock>;
106
397
 
398
+ export declare const ELEMENT_BUTTON = "button";
399
+
400
+ declare type FlyoutToolbarItem = {
401
+ title: string;
402
+ onClick: () => void;
403
+ icon: JSX.Element;
404
+ style?: MenuItemStyle;
405
+ };
406
+
107
407
  export declare type FontInputBlock = FontInputBlock_2<AppBridgeBlock>;
108
408
 
409
+ export declare const getBackgroundColorStyles: (backgroundColor: Color) => CSSProperties;
410
+
411
+ export declare const getBackgroundSettings: (options?: BackgroundSettingsType) => SettingBlock;
412
+
413
+ export declare const getBorderRadiusSettings: (options?: BorderRadiusSettingsType) => SettingBlock;
414
+
415
+ export declare const getBorderRadiusSlider: (id: string, defaultValue?: Radius) => SettingBlock;
416
+
417
+ export declare const getBorderSettings: (options?: BorderSettingsType) => SettingBlock;
418
+
419
+ export declare const getBorderStyles: (style?: BorderStyle, borderWidth?: string, color?: Color) => CSSProperties;
420
+
421
+ export declare const getDefaultPluginsWithLinkChooser: (appBridge: AppBridgeBlock) => PluginComposer;
422
+
423
+ export declare const getExtendedBorderRadiusSettings: (options?: BorderRadiusSettingsType_2) => SettingBlock;
424
+
425
+ export declare const getGutterSettings: (options?: GutterSettingsType) => SettingBlock;
426
+
427
+ /**
428
+ * Returns margin settings: margin switch, margin slider, custom margin input for every direction
429
+ *
430
+ * @param options Options for the settings
431
+ * @param options.id Custom suffix for the setting ids
432
+ * @returns {SettingBlock} Returns margin settings
433
+ */
434
+ export declare const getMarginExtendedSettings: (options?: MarginSettingsType_2) => SettingBlock;
435
+
436
+ export declare const getMarginSettings: (options?: MarginSettingsType) => SettingBlock;
437
+
438
+ /**
439
+ * Returns margin settings: margin switch, margin slider, custom margin input
440
+ *
441
+ * @param {string} id Custom suffix for the setting ids
442
+ * @returns {SettingBlock} Returns margin settings
443
+ */
444
+ export declare const getMarginSlider: (id: string) => SettingBlock;
445
+
446
+ /**
447
+ * Returns padding settings: padding switch, padding slider, custom padding input for every direction
448
+ *
449
+ * @param options Options for the settings
450
+ * @param options.id Custom suffix for the setting ids
451
+ * @returns {SettingBlock} Returns padding settings
452
+ */
453
+ export declare const getPaddingExtendedSettings: (options?: PaddingSettingsType_2) => SettingBlock;
454
+
455
+ export declare const getPaddingSettings: (options?: PaddingSettingsType) => SettingBlock;
456
+
457
+ /**
458
+ * Returns padding settings: padding switch, padding slider, custom padding input
459
+ *
460
+ * @param options Options for the settings
461
+ * @param options.id Custom suffix for the setting ids
462
+ * @returns {SettingBlock} Returns padding settings
463
+ */
464
+ export declare const getPaddingSlider: (id: string) => SettingBlock;
465
+
466
+ export declare const getRadiusStyles: (radiusChoice: Radius, hasRadius?: boolean, radiusValue?: number) => CSSProperties;
467
+
468
+ export declare const getReadableColor: (textColor: unknown, backgroundColor: unknown) => string;
469
+
470
+ export declare const getSecurityDownloadableSetting: (options?: SecurityDownloadableSettingType) => SettingBlock;
471
+
472
+ export declare const getSecurityGlobalControlId: (id?: string) => string;
473
+
474
+ /**
475
+ * Returns segment controls for global security settings.
476
+ *
477
+ * @param {string} id custom id for the setting block
478
+ *
479
+ * @returns {SettingBlock} Returns
480
+ */
481
+ export declare const getSecurityGlobalControlSetting: (id?: string) => SettingBlock[];
482
+
483
+ export declare const getUrlFromEditor: (editor: PlateEditor) => string;
484
+
485
+ /**
486
+ * Returns gutter settings: gutter switch, gutter choices or gutter custom input
487
+ *
488
+ * @param options Options for the settings
489
+ * @param options.id Custom id for the gutters switch
490
+ * @param options.dependentSettingId Id of the dependent setting
491
+ * @param options.spacingChoiceId Id of the spacing choice
492
+ * @param options.defaultValueChoices Default value for the spacing choice
493
+ * @returns {SettingBlock} Returns the gutter settings
494
+ */
495
+ declare type GutterSettingsType = {
496
+ id?: string;
497
+ dependentSettingId?: string;
498
+ spacingChoiceId?: string;
499
+ spacingCustomId?: string;
500
+ defaultValueChoices?: GutterSpacing;
501
+ };
502
+
503
+ export declare enum GutterSpacing {
504
+ Auto = "Auto",
505
+ S = "S",
506
+ M = "M",
507
+ L = "L"
508
+ }
509
+
510
+ export declare const gutterSpacingStyleMap: Record<GutterSpacing, string>;
511
+
512
+ export declare const hasRichTextValue: (string?: string) => boolean;
513
+
514
+ export declare class Heading1Plugin extends Plugin_2 {
515
+ styles: CSSProperties;
516
+ constructor({ styles, ...props }?: PluginProps);
517
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
518
+ }
519
+
520
+ export declare class Heading2Plugin extends Plugin_2 {
521
+ styles: CSSProperties;
522
+ constructor({ styles, ...props }?: PluginProps);
523
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
524
+ }
525
+
526
+ export declare class Heading3Plugin extends Plugin_2 {
527
+ styles: CSSProperties;
528
+ constructor({ styles, ...props }?: PluginProps);
529
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
530
+ }
531
+
532
+ export declare class Heading4Plugin extends Plugin_2 {
533
+ styles: CSSProperties;
534
+ constructor({ styles, ...props }?: PluginProps);
535
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
536
+ }
537
+
538
+ export declare class ImageCaptionPlugin extends Plugin_2 {
539
+ styles: CSSProperties;
540
+ constructor({ styles, ...props }?: PluginProps);
541
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
542
+ }
543
+
544
+ export declare class ImageTitlePlugin extends Plugin_2 {
545
+ styles: CSSProperties;
546
+ constructor({ styles, ...props }?: PluginProps);
547
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
548
+ }
549
+
109
550
  export declare type InputBlock = InputBlock_2<AppBridgeBlock>;
110
551
 
552
+ export declare const insertButton: <V extends Value>(editor: PlateEditor<V>, createButtonNodeOptions: CreateButtonNodeOptions, options?: InsertNodesOptions<V> | undefined) => void;
553
+
554
+ export declare const isDark: (color: unknown, threshold?: number) => boolean;
555
+
556
+ export declare const isDownloadable: (security: Security, downloadable: boolean, globalAssetDownloadEnabled: boolean) => boolean;
557
+
558
+ /**
559
+ * Cleans and joins an array of inputs with possible undefined or boolean values.
560
+ *
561
+ * @param {Array} classNames Array of class names
562
+ * @returns Clean string to be used for class name.
563
+ */
564
+ export declare const joinClassNames: (classNames: (string | undefined | boolean)[]) => string;
565
+
111
566
  export declare type LegacyAssetInputBlock = LegacyAssetInputBlock_2<AppBridgeBlock>;
112
567
 
113
568
  export declare type LinkChooserBlock = LinkChooserBlock_2<AppBridgeBlock>;
114
569
 
570
+ export declare class LinkPlugin extends Plugin_2 {
571
+ private appBridge;
572
+ styles: CSSProperties;
573
+ constructor(props?: LinkPluginProps, styles?: CSSProperties & {
574
+ hover?: CSSProperties | undefined;
575
+ });
576
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
577
+ }
578
+
579
+ export declare type LinkPluginProps = PluginProps & {
580
+ appBridge: AppBridgeBlock;
581
+ };
582
+
583
+ export declare const mapAppBridgeColorPalettesToFonduePalettes: (colorPalettes: ColorPalette[]) => Palette[];
584
+
585
+ export declare const mapAppBridgeColorPaletteToFonduePalette: (colorPalette: ColorPalette) => Palette;
586
+
587
+ export declare enum Margin {
588
+ None = "None",
589
+ Small = "Small",
590
+ Medium = "Medium",
591
+ Large = "Large"
592
+ }
593
+
594
+ export declare type MarginExtendedSettings = {
595
+ hasExtendedCustomMargin: boolean;
596
+ extendedMarginChoice: Margin;
597
+ extendedMarginTop: string;
598
+ extendedMarginRight: string;
599
+ extendedMarginBottom: string;
600
+ extendedMarginLeft: string;
601
+ };
602
+
603
+ export declare type MarginSettings = {
604
+ marginChoice: Margin;
605
+ hasCustomMarginValue: boolean;
606
+ marginValue: string;
607
+ };
608
+
609
+ declare type MarginSettingsType = {
610
+ id?: string;
611
+ marginStyleMap?: Record<Margin, string>;
612
+ };
613
+
614
+ declare type MarginSettingsType_2 = {
615
+ id?: string;
616
+ };
617
+
618
+ export declare const marginStyleMap: Record<Margin, string>;
619
+
620
+ /**
621
+ * Moves an item from the 'from' position to the 'to' position and updates the array
622
+ *
623
+ * @param {Array} array Array of items
624
+ * @param {Number} from Initial index of the item
625
+ * @param {Number} to New index of the item
626
+ * @returns {Array} New array with the item moved to the new position
627
+ */
628
+ export declare const moveItemInArray: <T>(array: T[], from: number, to: number) => T[];
629
+
115
630
  export declare type MultiInputBlock = MultiInputBlock_2<AppBridgeBlock>;
116
631
 
117
632
  export declare type NotificationBlock = NotificationBlock_2<AppBridgeBlock>;
118
633
 
634
+ export declare enum Padding {
635
+ None = "None",
636
+ Small = "Small",
637
+ Medium = "Medium",
638
+ Large = "Large"
639
+ }
640
+
641
+ export declare type PaddingExtendedSettings = {
642
+ hasExtendedCustomPadding: boolean;
643
+ extendedPaddingChoice: Padding;
644
+ extendedPaddingTop: string;
645
+ extendedPaddingRight: string;
646
+ extendedPaddingBottom: string;
647
+ extendedPaddingLeft: string;
648
+ };
649
+
650
+ export declare type PaddingSettings = {
651
+ paddingChoice: Padding;
652
+ hasCustomPaddingValue: boolean;
653
+ paddingValue: string;
654
+ };
655
+
656
+ declare type PaddingSettingsType = {
657
+ id?: string;
658
+ paddingStyleMap?: Record<Padding, string>;
659
+ };
660
+
661
+ declare type PaddingSettingsType_2 = {
662
+ id?: string;
663
+ };
664
+
665
+ export declare const paddingStyleMap: Record<Padding, string>;
666
+
667
+ export declare const PARAGRAPH_CLASSES = "tw-m-0 tw-px-0 tw-py-0";
668
+
669
+ export declare class ParagraphMarkupElement extends MarkupElement {
670
+ constructor(id?: TextStyles, node?: ({ element, attributes, children, styles }: TextStyleRenderElementProps) => JSX_2.Element);
671
+ }
672
+
673
+ export declare const ParagraphMarkupElementNode: ({ element, attributes, children, styles }: TextStyleRenderElementProps) => JSX_2.Element;
674
+
675
+ export declare class ParagraphPlugin extends Plugin_2 {
676
+ styles: CSSProperties;
677
+ constructor({ styles, ...props }?: PluginProps);
678
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
679
+ }
680
+
681
+ export declare const QuoteMarkupElementNode: ({ element, attributes, children, styles }: TextStyleRenderElementProps) => JSX_2.Element;
682
+
683
+ export declare class QuotePlugin extends Plugin_2 {
684
+ styles: CSSProperties;
685
+ constructor({ styles, ...props }?: PluginProps);
686
+ plugins(): PlatePlugin<AnyObject, Value, PlateEditor<Value>>[];
687
+ }
688
+
689
+ export declare enum Radius {
690
+ None = "None",
691
+ Small = "Small",
692
+ Medium = "Medium",
693
+ Large = "Large"
694
+ }
695
+
696
+ export declare type RadiusExtendedSettings = {
697
+ hasExtendedCustomRadius: boolean;
698
+ extendedRadiusChoice: Radius;
699
+ extendedRadiusTopLeft: string;
700
+ extendedRadiusTopRight: string;
701
+ extendedRadiusBottomLeft: string;
702
+ extendedRadiusBottomRight: string;
703
+ };
704
+
705
+ export declare type RadiusSettings = {
706
+ hasRadius: boolean;
707
+ radiusValue: string;
708
+ radiusChoice: Radius;
709
+ };
710
+
711
+ export declare const radiusStyleMap: Record<Radius, string>;
712
+
713
+ export declare type RichTextButtonStyle = 'primary' | 'secondary' | 'tertiary';
714
+
715
+ export declare const RichTextEditor: ({ id, isEditing, value, columns, gap, placeholder, plugins, onTextChange, showSerializedText, }: RichTextEditorProps) => JSX_2.Element;
716
+
717
+ declare type RichTextEditorProps = {
718
+ id?: string;
719
+ isEditing: boolean;
720
+ value?: string;
721
+ placeholder?: string;
722
+ columns?: number;
723
+ gap?: string;
724
+ plugins?: PluginComposer;
725
+ showSerializedText?: boolean;
726
+ onTextChange?: (value: string) => void;
727
+ };
728
+
119
729
  export declare type SectionHeadingBlock = SectionHeadingBlock_2<AppBridgeBlock>;
120
730
 
121
731
  export declare enum Sections {
@@ -127,20 +737,225 @@ export declare enum Sections {
127
737
  Targets = "targets"
128
738
  }
129
739
 
740
+ export declare enum Security {
741
+ Global = "Global",
742
+ Custom = "Custom"
743
+ }
744
+
745
+ /**
746
+ * Returns the downloadable security settings.
747
+ *
748
+ * @param {string} id custom id for the setting block
749
+ * @param {string} globalControlId custom id for the global control setting block
750
+ *
751
+ * @returns {SettingBlock} Returns downloadable security settings.
752
+ */
753
+ declare type SecurityDownloadableSettingType = {
754
+ id?: string;
755
+ globalControlId?: string;
756
+ };
757
+
130
758
  export declare type SegmentedControlsBlock = SegmentedControlsBlock_2<AppBridgeBlock>;
131
759
 
760
+ /**
761
+ * Sets alpha value and returns rgba string.
762
+ *
763
+ * @param {string} color Rgb or hex string.
764
+ * @returns {String} To be used as css value.
765
+ */
766
+ export declare const setAlpha: (alpha: number, color?: string) => string;
767
+
132
768
  export declare type SettingBlock = SettingBlock_2<AppBridgeBlock>;
133
769
 
770
+ declare type ShortNotationColor = {
771
+ r: number;
772
+ g: number;
773
+ b: number;
774
+ a?: number;
775
+ };
776
+
134
777
  export declare type SimpleSettingBlock = SimpleSettingBlock_2<AppBridgeBlock>;
135
778
 
779
+ export declare type SortableAttachmentItemProps = {
780
+ item: Asset;
781
+ isEditing: boolean;
782
+ onDelete: () => void;
783
+ isLoading?: boolean;
784
+ onReplaceWithBrowse: () => void;
785
+ onReplaceWithUpload: (uploadedAsset: Asset) => void;
786
+ };
787
+
788
+ export declare const submitFloatingButton: <V extends Value>(editor: PlateEditor<V>) => true | undefined;
789
+
136
790
  export declare type SwitchBlock = SwitchBlock_2<AppBridgeBlock>;
137
791
 
792
+ export declare type TButtonElement = TLinkElement & {
793
+ chosenLink?: {
794
+ searchResult?: {
795
+ link?: string;
796
+ };
797
+ };
798
+ };
799
+
138
800
  export declare type TemplateInputBlock = TemplateInputBlock_2<AppBridgeBlock>;
139
801
 
140
802
  export declare type TextareaBlock = TextareaBlock_2<AppBridgeBlock>;
141
803
 
804
+ export declare const TextStylePluginsWithoutImage: (Heading1Plugin | Heading2Plugin | Heading3Plugin | Heading4Plugin | Custom1Plugin | Custom2Plugin | Custom3Plugin | QuotePlugin | ParagraphPlugin)[];
805
+
806
+ export declare const enum TextStyles {
807
+ heading1 = "heading1",
808
+ heading2 = "heading2",
809
+ heading3 = "heading3",
810
+ heading4 = "heading4",
811
+ custom1 = "custom1",
812
+ custom2 = "custom2",
813
+ custom3 = "custom3",
814
+ quote = "quote",
815
+ imageCaption = "imageCaption",
816
+ imageTitle = "imageTitle",
817
+ p = "p"
818
+ }
819
+
820
+ export declare const TextStylesWithoutImage: TextStyles[];
821
+
822
+ export declare const THEME_PREFIX = "--f-theme-settings-";
823
+
824
+ /**
825
+ * Maps color strings to color objects.
826
+ *
827
+ * @param {String} String representing color
828
+ * @returns {Color} Color object
829
+ */
830
+ export declare const toColorObject: (colorString: string) => Color;
831
+
832
+ /**
833
+ * Maps color object of rgba values to hex alpha string.
834
+ *
835
+ * @param {Object} Color object
836
+ * @returns {String} To be used as css value.
837
+ */
838
+ export declare const toHex8String: (color: Color) => string;
839
+
840
+ /**
841
+ * Maps color object of rgba values to hex alpha string.
842
+ */
843
+ export declare const toHexString: (color: Color) => string;
844
+
845
+ export declare type ToolbarItem = DraghandleToolbarItem | ButtonToolbarItem;
846
+
847
+ export declare type ToolbarProps = {
848
+ items: ToolbarItem[];
849
+ flyoutItems: FlyoutToolbarItem[][];
850
+ isFlyoutOpen: boolean;
851
+ setIsFlyoutOpen: (isOpen: boolean) => void;
852
+ isDragging?: boolean;
853
+ isFlyoutDisabled?: boolean;
854
+ };
855
+
856
+ /**
857
+ * Maps color object of rgba values to rgba string.
858
+ *
859
+ * @param {Object} Color object
860
+ * @returns {String} To be used as css value.
861
+ */
862
+ export declare const toRgbaString: (color: Color) => string;
863
+
864
+ /**
865
+ * Maps color object from long to short rgba notation.
866
+ *
867
+ * @param {Object} Color object
868
+ * @returns {Object} ShortNotationColor object
869
+ */
870
+ export declare const toShortRgba: (color: unknown) => ShortNotationColor;
871
+
872
+ export declare const triggerFloatingButton: <V extends Value>(editor: PlateEditor<V>, { focused, }?: {
873
+ focused?: boolean | undefined;
874
+ }) => void;
875
+
876
+ export declare const triggerFloatingButtonEdit: <V extends Value>(editor: PlateEditor<V>) => void;
877
+
878
+ /**
879
+ * Trigger floating button.
880
+ *
881
+ * Do not trigger when:
882
+ * - selection is across blocks
883
+ * - selection has more than one leaf node
884
+ * - lowest selection is not text
885
+ * - selection has a button node
886
+ */
887
+ export declare const triggerFloatingButtonInsert: <V extends Value>(editor: PlateEditor<V>, { focused, }?: {
888
+ focused?: boolean | undefined;
889
+ }) => void;
890
+
891
+ /**
892
+ * Unwrap button node.
893
+ */
894
+ export declare const unwrapButton: <V extends Value>(editor: PlateEditor<V>, options?: UnwrapNodesOptions & {
895
+ split?: boolean;
896
+ }) => boolean;
897
+
898
+ /**
899
+ * If selection in a button or is not url:
900
+ * - insert text with url, exit
901
+ * If selection is expanded or `update` in a button:
902
+ * - remove button node, get button text
903
+ * Then:
904
+ * - insert button node
905
+ */
906
+ export declare const upsertButton: <V extends Value>(editor: PlateEditor<V>, { url, text, buttonStyle, target, insertTextInButton, insertNodesOptions, isUrl, }: UpsertButtonOptions<V>) => true | undefined;
907
+
908
+ export declare type UpsertButtonOptions<V extends Value = Value> = CreateButtonNodeOptions & {
909
+ /**
910
+ * If true, insert text when selection is in url.
911
+ */
912
+ insertTextInButton?: boolean;
913
+ insertNodesOptions?: InsertNodesOptions<V>;
914
+ unwrapNodesOptions?: UnwrapNodesOptions<V>;
915
+ wrapNodesOptions?: WrapNodesOptions<V>;
916
+ isUrl?: (url: string) => boolean;
917
+ };
918
+
919
+ /**
920
+ * If the text is different than the button above text, replace button children by a new text.
921
+ * The new text has the same marks than the first text replaced.
922
+ */
923
+ export declare const upsertButtonText: <V extends Value>(editor: PlateEditor<V>, { text }: UpsertButtonOptions<V>) => void;
924
+
925
+ export declare const useAttachments: (appBridge: AppBridgeBlock, assetId: string) => {
926
+ onAddAttachments: (newAssets: Asset[]) => Promise<void>;
927
+ onAttachmentDelete: (assetToDelete: Asset) => Promise<void>;
928
+ onAttachmentReplace: (attachmentToReplace: Asset, newAsset: Asset) => Promise<void>;
929
+ onAttachmentsSorted: (assets: Asset[]) => Promise<void>;
930
+ attachments: Asset[];
931
+ };
932
+
933
+ export declare const useDndSensors: (columnGap?: number, rowGap?: number) => SensorDescriptor<SensorOptions>[];
934
+
142
935
  export declare type ValueOrPromisedValue<T> = ValueOrPromisedValue_2<AppBridgeBlock, T>;
143
936
 
937
+ /**
938
+ * Insert space after a url to wrap a button.
939
+ * Lookup from the block start to the cursor to check if there is an url.
940
+ * If not found, lookup before the cursor for a space character to check the url.
941
+ *
942
+ * On insert data:
943
+ * Paste a string inside a button element will edit its children text but not its url.
944
+ *
945
+ */
946
+ export declare const withButton: WithOverride;
947
+
948
+ /**
949
+ * Wrap a button node with split.
950
+ */
951
+ export declare const wrapButton: <V extends Value>(editor: PlateEditor<V>, { url, buttonStyle, target, ...options }: WrapButtonOptions<V>) => void;
952
+
953
+ export declare interface WrapButtonOptions<V extends Value = Value> extends WrapNodesOptions<V> {
954
+ url: string;
955
+ buttonStyle?: RichTextButtonStyle;
956
+ target?: string;
957
+ }
958
+
144
959
 
145
960
  export * from "@frontify/sidebar-settings";
146
961