@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.
- package/.eslintrc.js +1 -1
- package/CHANGELOG.md +21 -0
- package/README.md +24 -5
- package/dist/_virtual/_commonjsHelpers.es.js +7 -0
- package/dist/_virtual/_commonjsHelpers.es.js.map +1 -0
- package/dist/_virtual/index.es.js +5 -0
- package/dist/_virtual/index.es.js.map +1 -0
- package/dist/_virtual/index.es2.js +5 -0
- package/dist/_virtual/index.es2.js.map +1 -0
- package/dist/_virtual/index.es3.js +5 -0
- package/dist/_virtual/index.es3.js.map +1 -0
- package/dist/_virtual/jsx-runtime.es.js +5 -0
- package/dist/_virtual/jsx-runtime.es.js.map +1 -0
- package/dist/_virtual/react-dom.development.es.js +5 -0
- package/dist/_virtual/react-dom.development.es.js.map +1 -0
- package/dist/_virtual/react-dom.production.min.es.js +5 -0
- package/dist/_virtual/react-dom.production.min.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +1 -0
- package/dist/_virtual/react.development.es.js +5 -0
- package/dist/_virtual/react.development.es.js.map +1 -0
- package/dist/_virtual/react.production.min.es.js +5 -0
- package/dist/_virtual/react.production.min.es.js.map +1 -0
- package/dist/_virtual/scheduler.development.es.js +5 -0
- package/dist/_virtual/scheduler.development.es.js.map +1 -0
- package/dist/_virtual/scheduler.production.min.es.js +5 -0
- package/dist/_virtual/scheduler.production.min.es.js.map +1 -0
- package/dist/components/Attachments/AttachmentItem.es.js +180 -0
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -0
- package/dist/components/Attachments/Attachments.es.js +145 -0
- package/dist/components/Attachments/Attachments.es.js.map +1 -0
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js +150 -0
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +73 -0
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar.es.js +113 -0
- package/dist/components/BlockItemWrapper/Toolbar.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/constants.es.js +6 -0
- package/dist/components/BlockItemWrapper/constants.es.js.map +1 -0
- package/dist/components/DownloadButton/DownloadButton.es.js +39 -0
- package/dist/components/DownloadButton/DownloadButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.es.js +42 -0
- package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -0
- package/dist/components/RichTextEditor/SerializedText.es.js +13 -0
- package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -0
- package/dist/components/RichTextEditor/constants.es.js +5 -0
- package/dist/components/RichTextEditor/constants.es.js.map +1 -0
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js +34 -0
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +54 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js +12 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +17 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +30 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +16 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +37 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js +20 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js +26 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +69 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +105 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js +20 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js +32 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +58 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js +19 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js +26 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +43 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js +18 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +62 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js +13 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +35 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +86 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +24 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js +19 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js +13 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +11 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js +10 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js +75 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js +18 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js +17 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js +14 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +53 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +19 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +37 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js +53 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js +29 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +8 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +80 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js +40 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +93 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +27 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +12 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js +5 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +18 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.es.js +5 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js +17 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/url.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +46 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +39 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js +40 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +46 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +46 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +41 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +48 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js +68 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js +55 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js +62 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js +61 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js +34 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js +26 -0
- package/dist/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/styles.es.js +168 -0
- package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/button.es.js +16 -0
- package/dist/components/RichTextEditor/serializer/nodes/button.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js +19 -0
- package/dist/components/RichTextEditor/serializer/nodes/checkItemNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js +17 -0
- package/dist/components/RichTextEditor/serializer/nodes/default.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js +15 -0
- package/dist/components/RichTextEditor/serializer/nodes/link.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js +12 -0
- package/dist/components/RichTextEditor/serializer/nodes/mentionHtmlNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js +61 -0
- package/dist/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js +25 -0
- package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js +8 -0
- package/dist/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.es.js.map +1 -0
- package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js +13 -0
- package/dist/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.es.js.map +1 -0
- package/dist/helpers/addHttps.es.js +14 -0
- package/dist/helpers/addHttps.es.js.map +1 -0
- package/dist/helpers/convertToRichTextValue.es.js +6 -0
- package/dist/helpers/convertToRichTextValue.es.js.map +1 -0
- package/dist/helpers/customCoordinatesGetterFactory.es.js +32 -0
- package/dist/helpers/customCoordinatesGetterFactory.es.js.map +1 -0
- package/dist/helpers/hasRichTextValue.es.js +15 -0
- package/dist/helpers/hasRichTextValue.es.js.map +1 -0
- package/dist/helpers/isDownloadable.es.js +6 -0
- package/dist/helpers/isDownloadable.es.js.map +1 -0
- package/dist/helpers/mapColorPalettes.es.js +16 -0
- package/dist/helpers/mapColorPalettes.es.js.map +1 -0
- package/dist/hooks/useAttachments.es.js +31 -0
- package/dist/hooks/useAttachments.es.js.map +1 -0
- package/dist/hooks/useDndSensors.es.js +20 -0
- package/dist/hooks/useDndSensors.es.js.map +1 -0
- package/dist/index.cjs.js +252 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +816 -1
- package/dist/index.es.js +172 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +252 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/settings/background.es.js +22 -0
- package/dist/settings/background.es.js.map +1 -0
- package/dist/settings/border.es.js +61 -0
- package/dist/settings/border.es.js.map +1 -0
- package/dist/settings/borderRadius.es.js +56 -0
- package/dist/settings/borderRadius.es.js.map +1 -0
- package/dist/settings/borderRadiusExtended.es.js +64 -0
- package/dist/settings/borderRadiusExtended.es.js.map +1 -0
- package/dist/settings/defaultValues.es.js +19 -0
- package/dist/settings/defaultValues.es.js.map +1 -0
- package/dist/settings/gutter.es.js +56 -0
- package/dist/settings/gutter.es.js.map +1 -0
- package/dist/settings/margin.es.js +53 -0
- package/dist/settings/margin.es.js.map +1 -0
- package/dist/settings/marginExtended.es.js +65 -0
- package/dist/settings/marginExtended.es.js.map +1 -0
- package/dist/settings/padding.es.js +53 -0
- package/dist/settings/padding.es.js.map +1 -0
- package/dist/settings/paddingExtended.es.js +65 -0
- package/dist/settings/paddingExtended.es.js.map +1 -0
- package/dist/settings/securityDownloadable.es.js +19 -0
- package/dist/settings/securityDownloadable.es.js.map +1 -0
- package/dist/settings/securityGlobalControl.es.js +33 -0
- package/dist/settings/securityGlobalControl.es.js.map +1 -0
- package/dist/settings/types.es.js +48 -0
- package/dist/settings/types.es.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/utilities/color/getReadableColor.es.js +14 -0
- package/dist/utilities/color/getReadableColor.es.js.map +1 -0
- package/dist/utilities/color/isDark.es.js +10 -0
- package/dist/utilities/color/isDark.es.js.map +1 -0
- package/dist/utilities/color/setAlpha.es.js +6 -0
- package/dist/utilities/color/setAlpha.es.js.map +1 -0
- package/dist/utilities/color/toColorObject.es.js +9 -0
- package/dist/utilities/color/toColorObject.es.js.map +1 -0
- package/dist/utilities/color/toHex8String.es.js +7 -0
- package/dist/utilities/color/toHex8String.es.js.map +1 -0
- package/dist/utilities/color/toHexString.es.js +7 -0
- package/dist/utilities/color/toHexString.es.js.map +1 -0
- package/dist/utilities/color/toRgbaString.es.js +7 -0
- package/dist/utilities/color/toRgbaString.es.js.map +1 -0
- package/dist/utilities/color/toShortRgba.es.js +11 -0
- package/dist/utilities/color/toShortRgba.es.js.map +1 -0
- package/dist/utilities/moveItemInArray.es.js +12 -0
- package/dist/utilities/moveItemInArray.es.js.map +1 -0
- package/dist/utilities/react/getBackgroundColorStyles.es.js +8 -0
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -0
- package/dist/utilities/react/getBorderStyles.es.js +12 -0
- package/dist/utilities/react/getBorderStyles.es.js.map +1 -0
- package/dist/utilities/react/getRadiusStyles.es.js +8 -0
- package/dist/utilities/react/getRadiusStyles.es.js.map +1 -0
- package/dist/utilities/react/joinClassNames.es.js +5 -0
- package/dist/utilities/react/joinClassNames.es.js.map +1 -0
- package/package.json +46 -10
- package/postcss.config.js +8 -0
- package/setupTests.ts +13 -0
- package/src/components/Attachments/AttachmentItem.tsx +257 -0
- package/src/components/Attachments/Attachments.spec.ct.tsx +151 -0
- package/src/components/Attachments/Attachments.tsx +221 -0
- package/src/components/Attachments/index.ts +4 -0
- package/src/components/Attachments/types.ts +30 -0
- package/src/components/BlockInjectButton/BlockInjectButton.spec.ct.tsx +48 -0
- package/src/components/BlockInjectButton/BlockInjectButton.tsx +212 -0
- package/src/components/BlockInjectButton/index.ts +4 -0
- package/src/components/BlockInjectButton/types.ts +18 -0
- package/src/components/BlockItemWrapper/BlockItemWrapper.spec.ct.tsx +146 -0
- package/src/components/BlockItemWrapper/BlockItemWrapper.tsx +76 -0
- package/src/components/BlockItemWrapper/Toolbar.tsx +128 -0
- package/src/components/BlockItemWrapper/constants.ts +4 -0
- package/src/components/BlockItemWrapper/index.ts +5 -0
- package/src/components/BlockItemWrapper/types.ts +46 -0
- package/src/components/DownloadButton/DownloadButton.spec.ct.tsx +20 -0
- package/src/components/DownloadButton/DownloadButton.tsx +36 -0
- package/src/components/DownloadButton/index.ts +3 -0
- package/src/components/DownloadButton/types.ts +5 -0
- package/src/components/RichTextEditor/RichTextEditor.spec.ct.tsx +204 -0
- package/src/components/RichTextEditor/RichTextEditor.tsx +62 -0
- package/src/components/RichTextEditor/SerializedText.tsx +25 -0
- package/src/components/RichTextEditor/constants.ts +3 -0
- package/src/components/RichTextEditor/index.ts +6 -0
- package/src/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.tsx +53 -0
- package/src/components/RichTextEditor/pluginPresets/index.ts +3 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.tsx +74 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.ts +11 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.tsx +20 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.tsx +56 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.tsx +19 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.tsx +42 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.tsx +37 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.tsx +22 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.tsx +30 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.tsx +81 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/types.ts +13 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.ts +143 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.tsx +31 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.ts +46 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/index.ts +12 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.ts +113 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.ts +21 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.ts +30 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.ts +71 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.ts +22 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/index.ts +3 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +116 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/index.ts +7 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/index.ts +8 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.ts +17 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.ts +40 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.ts +68 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.ts +198 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.ts +40 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.ts +30 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/types.ts +13 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.ts +28 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.ts +14 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.ts +18 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/index.ts +8 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.ts +77 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.ts +23 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.ts +30 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.ts +45 -0
- package/src/components/RichTextEditor/plugins/ButtonPlugin/withButton.ts +106 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.tsx +26 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.tsx +43 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/index.ts +4 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.ts +113 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.tsx +45 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.tsx +5 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.tsx +105 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/index.ts +4 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/types.ts +16 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.ts +73 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.ts +136 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkButton.tsx +38 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx +36 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.ts +11 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/id.ts +3 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/index.ts +48 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/types.ts +12 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.ts +30 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/index.ts +4 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.spec.ts +35 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/relativeUrlRegex.ts +3 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/url.spec.ts +75 -0
- package/src/components/RichTextEditor/plugins/LinkPlugin/utils/url.ts +21 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.tsx +61 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.tsx +61 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.tsx +62 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.tsx +61 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.tsx +58 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.tsx +58 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.tsx +59 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/helpers.tsx +44 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.tsx +61 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.tsx +61 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/index.ts +15 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx +58 -0
- package/src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx +62 -0
- package/src/components/RichTextEditor/plugins/index.ts +6 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLink.tsx +80 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/DocumentLinks.tsx +97 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.spec.ct.tsx +138 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/LinkSelector.tsx +80 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/PageLink.tsx +83 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/PageLinks.tsx +68 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/SectionLink.tsx +37 -0
- package/src/components/RichTextEditor/plugins/shared/LinkSelector/index.ts +3 -0
- package/src/components/RichTextEditor/plugins/styles.ts +179 -0
- package/src/components/RichTextEditor/serializer/index.ts +3 -0
- package/src/components/RichTextEditor/serializer/nodes/button.ts +25 -0
- package/src/components/RichTextEditor/serializer/nodes/checkItemNode.ts +29 -0
- package/src/components/RichTextEditor/serializer/nodes/default.ts +52 -0
- package/src/components/RichTextEditor/serializer/nodes/link.ts +25 -0
- package/src/components/RichTextEditor/serializer/nodes/mentionHtmlNode.ts +17 -0
- package/src/components/RichTextEditor/serializer/serializeNodesToHtmlRecursive.ts +134 -0
- package/src/components/RichTextEditor/serializer/serializeToHtml.ts +49 -0
- package/src/components/RichTextEditor/serializer/utlis/reactCssPropsToCss.ts +21 -0
- package/src/components/RichTextEditor/serializer/utlis/serializeLeafToHtml.ts +32 -0
- package/src/components/RichTextEditor/types.ts +23 -0
- package/src/components/index.ts +7 -0
- package/src/helpers/addHttps.spec.ts +42 -0
- package/src/helpers/addHttps.ts +15 -0
- package/src/helpers/convertToRichTextValue.spec.ts +32 -0
- package/src/helpers/convertToRichTextValue.ts +6 -0
- package/src/helpers/customCoordinatesGetterFactory.spec.ts +69 -0
- package/src/helpers/customCoordinatesGetterFactory.ts +39 -0
- package/src/helpers/hasRichTextValue.spec.ts +63 -0
- package/src/helpers/hasRichTextValue.ts +29 -0
- package/src/helpers/index.ts +8 -0
- package/src/helpers/isDownloadable.spec.ts +47 -0
- package/src/helpers/isDownloadable.ts +7 -0
- package/src/helpers/mapColorPalettes.spec.ts +146 -0
- package/src/helpers/mapColorPalettes.ts +22 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useAttachments.spec.ts +79 -0
- package/src/hooks/useAttachments.ts +46 -0
- package/src/hooks/useDndSensors.spec.ts +40 -0
- package/src/hooks/useDndSensors.ts +23 -0
- package/src/index.ts +8 -0
- package/src/settings/background.spec.ts +173 -0
- package/src/settings/background.ts +49 -0
- package/src/settings/border.spec.ts +76 -0
- package/src/settings/border.ts +90 -0
- package/src/settings/borderRadius.spec.ts +30 -0
- package/src/settings/borderRadius.ts +73 -0
- package/src/settings/borderRadiusExtended.spec.ts +52 -0
- package/src/settings/borderRadiusExtended.ts +84 -0
- package/src/settings/defaultValues.ts +21 -0
- package/src/settings/gutter.spec.ts +60 -0
- package/src/settings/gutter.ts +75 -0
- package/src/settings/index.ts +14 -0
- package/src/settings/margin.spec.ts +42 -0
- package/src/settings/margin.ts +72 -0
- package/src/settings/marginExtended.spec.ts +45 -0
- package/src/settings/marginExtended.ts +91 -0
- package/src/settings/padding.spec.ts +42 -0
- package/src/settings/padding.ts +73 -0
- package/src/settings/paddingExtended.spec.ts +45 -0
- package/src/settings/paddingExtended.ts +91 -0
- package/src/settings/security.spec.ts +87 -0
- package/src/settings/security.ts +61 -0
- package/src/settings/securityDownloadable.spec.ts +46 -0
- package/src/settings/securityDownloadable.ts +33 -0
- package/src/settings/securityGlobalControl.ts +42 -0
- package/src/settings/types.ts +128 -0
- package/src/utilities/color/getReadableColor.spec.ts +32 -0
- package/src/utilities/color/getReadableColor.ts +34 -0
- package/src/utilities/color/index.ts +10 -0
- package/src/utilities/color/isDark.spec.ts +33 -0
- package/src/utilities/color/isDark.ts +29 -0
- package/src/utilities/color/setAlpha.spec.ts +28 -0
- package/src/utilities/color/setAlpha.ts +14 -0
- package/src/utilities/color/toColorObject.spec.ts +19 -0
- package/src/utilities/color/toColorObject.ts +16 -0
- package/src/utilities/color/toHex8String.spec.ts +17 -0
- package/src/utilities/color/toHex8String.ts +14 -0
- package/src/utilities/color/toHexString.spec.ts +17 -0
- package/src/utilities/color/toHexString.ts +10 -0
- package/src/utilities/color/toRgbaString.spec.ts +12 -0
- package/src/utilities/color/toRgbaString.ts +14 -0
- package/src/utilities/color/toShortRgba.spec.ts +16 -0
- package/src/utilities/color/toShortRgba.ts +35 -0
- package/src/utilities/index.ts +5 -0
- package/src/utilities/moveItemInArray.spec.ts +17 -0
- package/src/utilities/moveItemInArray.ts +21 -0
- package/src/utilities/react/getBackgroundColorStyles.spec.ts +18 -0
- package/src/utilities/react/getBackgroundColorStyles.ts +11 -0
- package/src/utilities/react/getBorderStyles.spec.ts +39 -0
- package/src/utilities/react/getBorderStyles.ts +21 -0
- package/src/utilities/react/getRadiusStyles.spec.ts +25 -0
- package/src/utilities/react/getRadiusStyles.ts +8 -0
- package/src/utilities/react/index.ts +6 -0
- package/src/utilities/react/joinClassNames.spec.ts +18 -0
- package/src/utilities/react/joinClassNames.ts +10 -0
- package/tailwind.config.js +27 -0
- package/tsconfig.json +3 -1
- package/vite.config.ts +11 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,117 @@
|
|
|
1
|
-
import type {
|
|
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
|
|