@frontify/guideline-blocks-settings 0.33.4 → 0.34.0
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/dist/components/Attachments/AttachmentItem.es.js +174 -0
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -0
- package/dist/components/Attachments/Attachments.es.js +160 -0
- package/dist/components/Attachments/Attachments.es.js.map +1 -0
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js +29 -0
- package/dist/components/Attachments/AttachmentsButtonTrigger.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 +71 -0
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js +33 -0
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js +26 -0
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js +28 -0
- package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js +35 -0
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js +44 -0
- package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js +25 -0
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/ToolbarFlyoutMenu.es.js +29 -0
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/ToolbarFlyoutMenu.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js +22 -0
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js +12 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js +20 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js +6 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js +11 -0
- package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js +18 -0
- package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js +26 -0
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js +18 -0
- package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.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/Link/LinkInput.es.js +63 -0
- package/dist/components/Link/LinkInput.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/DocumentLink.es.js +68 -0
- package/dist/components/Link/LinkSelector/DocumentLink.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js +60 -0
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/LinkSelector.es.js +86 -0
- package/dist/components/Link/LinkSelector/LinkSelector.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js +7 -0
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/PageLink.es.js +70 -0
- package/dist/components/Link/LinkSelector/PageLink.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/PageLinks.es.js +38 -0
- package/dist/components/Link/LinkSelector/PageLinks.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/SectionLink.es.js +25 -0
- package/dist/components/Link/LinkSelector/SectionLink.es.js.map +1 -0
- package/dist/components/Link/utils/getUrl.es.js +18 -0
- package/dist/components/Link/utils/getUrl.es.js.map +1 -0
- package/dist/components/Link/utils/relativeUrlRegex.es.js +5 -0
- package/dist/components/Link/utils/relativeUrlRegex.es.js.map +1 -0
- package/dist/components/Link/utils/url.es.js +17 -0
- package/dist/components/Link/utils/url.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 +20 -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 +35 -0
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +41 -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 +24 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +26 -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 +28 -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 +48 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.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 +104 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.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 +57 -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 +41 -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 +67 -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 +81 -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 +52 -0
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +32 -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 +35 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.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 +66 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +79 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +22 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +12 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +11 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkToolbarButton.es.js +25 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkToolbarButton.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 +45 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +13 -0
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +50 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +50 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +50 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +51 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +51 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +51 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +51 -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 +51 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +51 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +45 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +53 -0
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -0
- package/dist/components/RichTextEditor/plugins/styles.es.js +167 -0
- package/dist/components/RichTextEditor/plugins/styles.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 +28 -0
- package/dist/helpers/mapColorPalettes.es.js.map +1 -0
- package/dist/hooks/useAttachments.es.js +53 -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 +4 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +1190 -0
- package/dist/index.es.js +217 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +4 -0
- package/dist/index.umd.js.map +1 -0
- 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/styles.css +1 -0
- package/dist/styles.css.es.js +2 -0
- package/dist/styles.css.es.js.map +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 +9 -6
- package/.eslintrc.cjs +0 -27
- package/.prettierrc +0 -7
- package/CHANGELOG.md +0 -787
- package/postcss.config.cjs +0 -8
- package/setupTests.ts +0 -23
- package/src/components/Attachments/AttachmentItem.tsx +0 -247
- package/src/components/Attachments/Attachments.spec.ct.tsx +0 -165
- package/src/components/Attachments/Attachments.tsx +0 -241
- package/src/components/Attachments/AttachmentsButtonTrigger.tsx +0 -30
- package/src/components/Attachments/index.ts +0 -4
- package/src/components/Attachments/types.ts +0 -40
- package/src/components/BlockInjectButton/BlockInjectButton.spec.ct.tsx +0 -48
- package/src/components/BlockInjectButton/BlockInjectButton.tsx +0 -212
- package/src/components/BlockInjectButton/index.ts +0 -4
- package/src/components/BlockInjectButton/types.ts +0 -18
- package/src/components/BlockItemWrapper/BlockItemWrapper.spec.ct.tsx +0 -145
- package/src/components/BlockItemWrapper/BlockItemWrapper.tsx +0 -76
- package/src/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.spec.tsx +0 -96
- package/src/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.tsx +0 -42
- package/src/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.spec.tsx +0 -44
- package/src/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.tsx +0 -24
- package/src/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/index.ts +0 -3
- package/src/components/BlockItemWrapper/Toolbar/BaseToolbarButton.spec.tsx +0 -40
- package/src/components/BlockItemWrapper/Toolbar/BaseToolbarButton.tsx +0 -37
- package/src/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.spec.tsx +0 -89
- package/src/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.tsx +0 -40
- package/src/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/index.ts +0 -3
- package/src/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.spec.tsx +0 -140
- package/src/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.tsx +0 -61
- package/src/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/index.ts +0 -3
- package/src/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.spec.tsx +0 -77
- package/src/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.tsx +0 -30
- package/src/components/BlockItemWrapper/Toolbar/MenuToolbarButton/ToolbarFlyoutMenu.spec.tsx +0 -63
- package/src/components/BlockItemWrapper/Toolbar/MenuToolbarButton/ToolbarFlyoutMenu.tsx +0 -40
- package/src/components/BlockItemWrapper/Toolbar/MenuToolbarButton/index.ts +0 -4
- package/src/components/BlockItemWrapper/Toolbar/Toolbar.spec.tsx +0 -259
- package/src/components/BlockItemWrapper/Toolbar/Toolbar.tsx +0 -36
- package/src/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.spec.tsx +0 -70
- package/src/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.tsx +0 -19
- package/src/components/BlockItemWrapper/Toolbar/ToolbarButton/index.ts +0 -3
- package/src/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.tsx +0 -25
- package/src/components/BlockItemWrapper/Toolbar/ToolbarSegment.tsx +0 -9
- package/src/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.tsx +0 -15
- package/src/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.tsx +0 -25
- package/src/components/BlockItemWrapper/Toolbar/context/index.ts +0 -4
- package/src/components/BlockItemWrapper/Toolbar/helpers.ts +0 -33
- package/src/components/BlockItemWrapper/Toolbar/hooks/index.ts +0 -3
- package/src/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.spec.tsx +0 -59
- package/src/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.ts +0 -24
- package/src/components/BlockItemWrapper/Toolbar/index.ts +0 -10
- package/src/components/BlockItemWrapper/Toolbar/types.ts +0 -18
- package/src/components/BlockItemWrapper/constants.ts +0 -4
- package/src/components/BlockItemWrapper/index.ts +0 -6
- package/src/components/BlockItemWrapper/types.ts +0 -24
- package/src/components/DownloadButton/DownloadButton.spec.ct.tsx +0 -20
- package/src/components/DownloadButton/DownloadButton.tsx +0 -36
- package/src/components/DownloadButton/index.ts +0 -3
- package/src/components/DownloadButton/types.ts +0 -5
- package/src/components/Link/LinkInput.spec.ct.tsx +0 -142
- package/src/components/Link/LinkInput.tsx +0 -86
- package/src/components/Link/LinkSelector/DocumentLink.tsx +0 -81
- package/src/components/Link/LinkSelector/DocumentLinks.tsx +0 -102
- package/src/components/Link/LinkSelector/LinkSelector.spec.ct.tsx +0 -196
- package/src/components/Link/LinkSelector/LinkSelector.tsx +0 -96
- package/src/components/Link/LinkSelector/LoadingIndicator.tsx +0 -11
- package/src/components/Link/LinkSelector/PageLink.tsx +0 -96
- package/src/components/Link/LinkSelector/PageLinks.tsx +0 -71
- package/src/components/Link/LinkSelector/SectionLink.tsx +0 -36
- package/src/components/Link/LinkSelector/index.ts +0 -3
- package/src/components/Link/index.ts +0 -6
- package/src/components/Link/types.ts +0 -6
- package/src/components/Link/utils/getUrl.ts +0 -30
- package/src/components/Link/utils/index.ts +0 -5
- package/src/components/Link/utils/relativeUrlRegex.spec.ts +0 -32
- package/src/components/Link/utils/relativeUrlRegex.ts +0 -3
- package/src/components/Link/utils/url.spec.ts +0 -75
- package/src/components/Link/utils/url.ts +0 -21
- package/src/components/RichTextEditor/RichTextEditor.spec.ct.tsx +0 -231
- package/src/components/RichTextEditor/RichTextEditor.tsx +0 -62
- package/src/components/RichTextEditor/SerializedText.tsx +0 -29
- package/src/components/RichTextEditor/constants.ts +0 -3
- package/src/components/RichTextEditor/index.ts +0 -6
- package/src/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.tsx +0 -55
- package/src/components/RichTextEditor/pluginPresets/index.ts +0 -3
- package/src/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.tsx +0 -74
- package/src/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.ts +0 -11
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.tsx +0 -20
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.tsx +0 -56
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.tsx +0 -19
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.tsx +0 -42
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButton.tsx +0 -37
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonEditButton.tsx +0 -22
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/FloatingButtonUrlInput.tsx +0 -30
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.tsx +0 -81
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/types.ts +0 -13
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.ts +0 -143
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/UnlinkButton.tsx +0 -31
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.ts +0 -46
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/index.ts +0 -12
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.ts +0 -113
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.ts +0 -21
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.ts +0 -30
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.ts +0 -71
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.ts +0 -22
- package/src/components/RichTextEditor/plugins/ButtonPlugin/components/index.ts +0 -3
- package/src/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.ts +0 -118
- package/src/components/RichTextEditor/plugins/ButtonPlugin/index.ts +0 -7
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/index.ts +0 -8
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.ts +0 -17
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.ts +0 -40
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.ts +0 -68
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.ts +0 -198
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.ts +0 -40
- package/src/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.ts +0 -30
- package/src/components/RichTextEditor/plugins/ButtonPlugin/types.ts +0 -13
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.ts +0 -28
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.ts +0 -14
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.ts +0 -18
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/index.ts +0 -8
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.ts +0 -83
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.ts +0 -23
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.ts +0 -30
- package/src/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.ts +0 -45
- package/src/components/RichTextEditor/plugins/ButtonPlugin/withButton.ts +0 -106
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.tsx +0 -26
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.tsx +0 -43
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/index.ts +0 -4
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/useFloatingLinkEdit.ts +0 -113
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/FloatingLink.tsx +0 -45
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.tsx +0 -5
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.tsx +0 -88
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/index.ts +0 -4
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/types.ts +0 -11
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useFloatingLinkInsert.ts +0 -73
- package/src/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.ts +0 -136
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkButton.tsx +0 -38
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.tsx +0 -36
- package/src/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.ts +0 -11
- package/src/components/RichTextEditor/plugins/LinkPlugin/id.ts +0 -3
- package/src/components/RichTextEditor/plugins/LinkPlugin/index.ts +0 -49
- package/src/components/RichTextEditor/plugins/LinkPlugin/types.ts +0 -12
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.tsx +0 -63
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.tsx +0 -63
- package/src/components/RichTextEditor/plugins/TextStylePlugins/helpers.tsx +0 -44
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.tsx +0 -62
- package/src/components/RichTextEditor/plugins/TextStylePlugins/index.ts +0 -15
- package/src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx +0 -58
- package/src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx +0 -63
- package/src/components/RichTextEditor/plugins/index.ts +0 -6
- package/src/components/RichTextEditor/plugins/styles.ts +0 -178
- package/src/components/RichTextEditor/types.ts +0 -23
- package/src/components/index.ts +0 -8
- package/src/helpers/addHttps.spec.ts +0 -42
- package/src/helpers/addHttps.ts +0 -15
- package/src/helpers/convertToRichTextValue.spec.ts +0 -32
- package/src/helpers/convertToRichTextValue.ts +0 -6
- package/src/helpers/customCoordinatesGetterFactory.spec.ts +0 -69
- package/src/helpers/customCoordinatesGetterFactory.ts +0 -39
- package/src/helpers/hasRichTextValue.spec.ts +0 -63
- package/src/helpers/hasRichTextValue.ts +0 -29
- package/src/helpers/index.ts +0 -8
- package/src/helpers/isDownloadable.spec.ts +0 -47
- package/src/helpers/isDownloadable.ts +0 -7
- package/src/helpers/mapColorPalettes.spec.ts +0 -47
- package/src/helpers/mapColorPalettes.ts +0 -65
- package/src/hooks/index.ts +0 -4
- package/src/hooks/useAttachments.spec.tsx +0 -127
- package/src/hooks/useAttachments.tsx +0 -90
- package/src/hooks/useDndSensors.spec.ts +0 -40
- package/src/hooks/useDndSensors.ts +0 -23
- package/src/index.ts +0 -138
- package/src/settings/background.spec.ts +0 -173
- package/src/settings/background.ts +0 -52
- package/src/settings/border.spec.ts +0 -76
- package/src/settings/border.ts +0 -90
- package/src/settings/borderRadius.spec.ts +0 -30
- package/src/settings/borderRadius.ts +0 -73
- package/src/settings/borderRadiusExtended.spec.ts +0 -52
- package/src/settings/borderRadiusExtended.ts +0 -84
- package/src/settings/defaultValues.ts +0 -21
- package/src/settings/gutter.spec.ts +0 -60
- package/src/settings/gutter.ts +0 -75
- package/src/settings/index.ts +0 -14
- package/src/settings/margin.spec.ts +0 -42
- package/src/settings/margin.ts +0 -72
- package/src/settings/marginExtended.spec.ts +0 -45
- package/src/settings/marginExtended.ts +0 -91
- package/src/settings/padding.spec.ts +0 -42
- package/src/settings/padding.ts +0 -73
- package/src/settings/paddingExtended.spec.ts +0 -45
- package/src/settings/paddingExtended.ts +0 -91
- package/src/settings/security.spec.ts +0 -87
- package/src/settings/security.ts +0 -61
- package/src/settings/securityDownloadable.spec.ts +0 -46
- package/src/settings/securityDownloadable.ts +0 -33
- package/src/settings/securityGlobalControl.ts +0 -42
- package/src/settings/types.ts +0 -128
- package/src/styles.css +0 -3
- package/src/utilities/color/getReadableColor.spec.ts +0 -32
- package/src/utilities/color/getReadableColor.ts +0 -34
- package/src/utilities/color/index.ts +0 -10
- package/src/utilities/color/isDark.spec.ts +0 -33
- package/src/utilities/color/isDark.ts +0 -29
- package/src/utilities/color/setAlpha.spec.ts +0 -28
- package/src/utilities/color/setAlpha.ts +0 -14
- package/src/utilities/color/toColorObject.spec.ts +0 -19
- package/src/utilities/color/toColorObject.ts +0 -16
- package/src/utilities/color/toHex8String.spec.ts +0 -17
- package/src/utilities/color/toHex8String.ts +0 -14
- package/src/utilities/color/toHexString.spec.ts +0 -17
- package/src/utilities/color/toHexString.ts +0 -10
- package/src/utilities/color/toRgbaString.spec.ts +0 -12
- package/src/utilities/color/toRgbaString.ts +0 -14
- package/src/utilities/color/toShortRgba.spec.ts +0 -16
- package/src/utilities/color/toShortRgba.ts +0 -35
- package/src/utilities/index.ts +0 -5
- package/src/utilities/moveItemInArray.spec.ts +0 -17
- package/src/utilities/moveItemInArray.ts +0 -21
- package/src/utilities/react/getBackgroundColorStyles.spec.ts +0 -18
- package/src/utilities/react/getBackgroundColorStyles.ts +0 -10
- package/src/utilities/react/getBorderStyles.spec.ts +0 -39
- package/src/utilities/react/getBorderStyles.ts +0 -20
- package/src/utilities/react/getRadiusStyles.spec.ts +0 -25
- package/src/utilities/react/getRadiusStyles.ts +0 -8
- package/src/utilities/react/index.ts +0 -6
- package/src/utilities/react/joinClassNames.spec.ts +0 -18
- package/src/utilities/react/joinClassNames.ts +0 -10
- package/tailwind.config.ts +0 -27
- package/tsconfig.json +0 -24
- package/tsconfig.node.json +0 -12
- package/vite.config.ts +0 -71
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var g = (t, e, l) => e in t ? o(t, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : t[e] = l;
|
|
3
|
+
var m = (t, e, l) => (g(t, typeof e != "symbol" ? e + "" : e, l), l);
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { Plugin as u, MarkupElement as c, merge as p, alignmentClassnames as T, getColumnBreakClasses as y, createPluginFactory as k } from "@frontify/fondue";
|
|
6
|
+
import { TextStyles as a, BlockStyles as x } from "../styles.es.js";
|
|
7
|
+
const I = "textstyle-imageTitle-plugin";
|
|
8
|
+
class N extends u {
|
|
9
|
+
constructor({ styles: l = x.imageTitle, ...s } = {}) {
|
|
10
|
+
super(a.imageTitle, {
|
|
11
|
+
label: "Image Title",
|
|
12
|
+
markupElement: new d(),
|
|
13
|
+
...s
|
|
14
|
+
});
|
|
15
|
+
m(this, "styles", {});
|
|
16
|
+
this.styles = l;
|
|
17
|
+
}
|
|
18
|
+
plugins() {
|
|
19
|
+
return [E(this.styles)];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class d extends c {
|
|
23
|
+
constructor(e = I, l = i) {
|
|
24
|
+
super(e, l);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const i = ({ element: t, attributes: e, children: l, styles: s }) => {
|
|
28
|
+
const n = t.align;
|
|
29
|
+
return /* @__PURE__ */ r(
|
|
30
|
+
"p",
|
|
31
|
+
{
|
|
32
|
+
...e,
|
|
33
|
+
className: p([n && T[n], y(t)]),
|
|
34
|
+
style: s,
|
|
35
|
+
children: l
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}, E = (t) => k({
|
|
39
|
+
key: a.imageTitle,
|
|
40
|
+
isElement: !0,
|
|
41
|
+
component: i,
|
|
42
|
+
deserializeHtml: {
|
|
43
|
+
rules: [{ validClassName: a.imageTitle }]
|
|
44
|
+
}
|
|
45
|
+
})({
|
|
46
|
+
component: (e) => /* @__PURE__ */ r(i, { ...e, styles: t })
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
N as ImageTitlePlugin
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=imageTitlePlugin.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageTitlePlugin.es.js","sources":["../../../../../src/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MarkupElement,\n PlatePlugin,\n Plugin,\n PluginProps,\n TextStyleRenderElementProps,\n alignmentClassnames,\n createPluginFactory,\n getColumnBreakClasses,\n merge,\n} from '@frontify/fondue';\nimport type { CSSProperties } from 'react';\nimport { BlockStyles, TextStyles } from '../styles';\n\nconst ID = 'textstyle-imageTitle-plugin';\n\nexport class ImageTitlePlugin extends Plugin {\n public styles: CSSProperties = {};\n constructor({ styles = BlockStyles.imageTitle, ...props }: PluginProps = {}) {\n super(TextStyles.imageTitle, {\n label: 'Image Title',\n markupElement: new ImageTitleMarkupElement(),\n ...props,\n });\n this.styles = styles;\n }\n\n plugins(): PlatePlugin[] {\n return [createImageTitlePlugin(this.styles)];\n }\n}\n\nclass ImageTitleMarkupElement extends MarkupElement {\n constructor(id = ID, node = ImageTitleMarkupElementNode) {\n super(id, node);\n }\n}\nconst ImageTitleMarkupElementNode = ({ element, attributes, children, styles }: TextStyleRenderElementProps) => {\n const align = element.align as string;\n return (\n <p\n {...attributes}\n className={merge([align && alignmentClassnames[align], getColumnBreakClasses(element)])}\n style={styles}\n >\n {children}\n </p>\n );\n};\n\nconst createImageTitlePlugin = (styles: CSSProperties) =>\n createPluginFactory({\n key: TextStyles.imageTitle,\n isElement: true,\n component: ImageTitleMarkupElementNode,\n deserializeHtml: {\n rules: [{ validClassName: TextStyles.imageTitle }],\n },\n })({\n component: (props: TextStyleRenderElementProps) => <ImageTitleMarkupElementNode {...props} styles={styles} />,\n });\n"],"names":["ID","ImageTitlePlugin","Plugin","styles","BlockStyles","props","TextStyles","ImageTitleMarkupElement","__publicField","createImageTitlePlugin","MarkupElement","id","node","ImageTitleMarkupElementNode","element","attributes","children","align","jsx","merge","alignmentClassnames","getColumnBreakClasses","createPluginFactory"],"mappings":";;;;;;AAgBA,MAAMA,IAAK;AAEJ,MAAMC,UAAyBC,EAAO;AAAA,EAEzC,YAAY,EAAE,QAAAC,IAASC,EAAY,YAAY,GAAGC,EAAuB,IAAA,IAAI;AACzE,UAAMC,EAAW,YAAY;AAAA,MACzB,OAAO;AAAA,MACP,eAAe,IAAIC,EAAwB;AAAA,MAC3C,GAAGF;AAAA,IAAA,CACN;AANE,IAAAG,EAAA,gBAAwB,CAAA;AAO3B,SAAK,SAASL;AAAA,EAClB;AAAA,EAEA,UAAyB;AACrB,WAAO,CAACM,EAAuB,KAAK,MAAM,CAAC;AAAA,EAC/C;AACJ;AAEA,MAAMF,UAAgCG,EAAc;AAAA,EAChD,YAAYC,IAAKX,GAAIY,IAAOC,GAA6B;AACrD,UAAMF,GAAIC,CAAI;AAAA,EAClB;AACJ;AACA,MAAMC,IAA8B,CAAC,EAAE,SAAAC,GAAS,YAAAC,GAAY,UAAAC,GAAU,QAAAb,QAA0C;AAC5G,QAAMc,IAAQH,EAAQ;AAElB,SAAA,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAGH;AAAA,MACJ,WAAWI,EAAM,CAACF,KAASG,EAAoBH,CAAK,GAAGI,EAAsBP,CAAO,CAAC,CAAC;AAAA,MACtF,OAAOX;AAAA,MAEN,UAAAa;AAAA,IAAA;AAAA,EAAA;AAGb,GAEMP,IAAyB,CAACN,MAC5BmB,EAAoB;AAAA,EAChB,KAAKhB,EAAW;AAAA,EAChB,WAAW;AAAA,EACX,WAAWO;AAAA,EACX,iBAAiB;AAAA,IACb,OAAO,CAAC,EAAE,gBAAgBP,EAAW,YAAY;AAAA,EACrD;AACJ,CAAC,EAAE;AAAA,EACC,WAAW,CAACD,wBAAwCQ,GAA6B,EAAA,GAAGR,GAAO,QAAAF,GAAgB;AAC/G,CAAC;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var u = (t, e, r) => e in t ? m(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var p = (t, e, r) => (u(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
+
import { Plugin as g, merge as i, alignmentClassnames as P, getColumnBreakClasses as y, MarkupElement as h, createPluginFactory as k, createParagraphPlugin as x } from "@frontify/fondue";
|
|
6
|
+
import { TextStyles as n, BlockStyles as E } from "../styles.es.js";
|
|
7
|
+
class M extends g {
|
|
8
|
+
constructor({ styles: r = E.p, ...a } = {}) {
|
|
9
|
+
super(n.p, {
|
|
10
|
+
markupElement: new d(),
|
|
11
|
+
label: "Body Text",
|
|
12
|
+
...a
|
|
13
|
+
});
|
|
14
|
+
p(this, "styles", {});
|
|
15
|
+
this.styles = r;
|
|
16
|
+
}
|
|
17
|
+
plugins() {
|
|
18
|
+
return [w(this.styles)];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const S = "tw-m-0 tw-px-0 tw-py-0", s = ({ element: t, attributes: e, children: r, styles: a }) => {
|
|
22
|
+
const l = t.align, c = i([l && P[l], S, y(t)]);
|
|
23
|
+
return /* @__PURE__ */ o("p", { ...e, className: c, style: a, children: r });
|
|
24
|
+
};
|
|
25
|
+
class d extends h {
|
|
26
|
+
constructor(e = n.p, r = s) {
|
|
27
|
+
super(e, r);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const w = (t) => k({
|
|
31
|
+
...x(),
|
|
32
|
+
key: n.p,
|
|
33
|
+
isElement: !0,
|
|
34
|
+
component: s
|
|
35
|
+
})({
|
|
36
|
+
component: (e) => /* @__PURE__ */ o(s, { ...e, styles: t })
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
S as PARAGRAPH_CLASSES,
|
|
40
|
+
d as ParagraphMarkupElement,
|
|
41
|
+
s as ParagraphMarkupElementNode,
|
|
42
|
+
M as ParagraphPlugin,
|
|
43
|
+
w as createParagraphPlugin
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=paragraphPlugin.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraphPlugin.es.js","sources":["../../../../../src/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MarkupElement,\n PlatePlugin,\n Plugin,\n PluginProps,\n TextStyleRenderElementProps,\n alignmentClassnames,\n createParagraphPlugin as createPlateParagraphPlugin,\n createPluginFactory,\n getColumnBreakClasses,\n merge,\n} from '@frontify/fondue';\n\nimport { BlockStyles, TextStyles } from '../styles';\nimport { CSSProperties } from 'react';\n\nexport class ParagraphPlugin extends Plugin {\n public styles = {};\n constructor({ styles = BlockStyles.p, ...props }: PluginProps = {}) {\n super(TextStyles.p, {\n markupElement: new ParagraphMarkupElement(),\n label: 'Body Text',\n ...props,\n });\n this.styles = styles;\n }\n\n plugins(): PlatePlugin[] {\n return [createParagraphPlugin(this.styles)];\n }\n}\n\nexport const PARAGRAPH_CLASSES = 'tw-m-0 tw-px-0 tw-py-0';\n\nexport const ParagraphMarkupElementNode = ({ element, attributes, children, styles }: TextStyleRenderElementProps) => {\n const align = element.align as string;\n const className = merge([align && alignmentClassnames[align], PARAGRAPH_CLASSES, getColumnBreakClasses(element)]);\n return (\n <p {...attributes} className={className} style={styles}>\n {children}\n </p>\n );\n};\n\nexport class ParagraphMarkupElement extends MarkupElement {\n constructor(id = TextStyles.p, node = ParagraphMarkupElementNode) {\n super(id, node);\n }\n}\n\nexport const createParagraphPlugin = (styles: CSSProperties): PlatePlugin =>\n createPluginFactory({\n ...createPlateParagraphPlugin(),\n key: TextStyles.p,\n isElement: true,\n component: ParagraphMarkupElementNode,\n })({\n component: (props: TextStyleRenderElementProps) => <ParagraphMarkupElementNode {...props} styles={styles} />,\n });\n"],"names":["ParagraphPlugin","Plugin","styles","BlockStyles","props","TextStyles","ParagraphMarkupElement","__publicField","createParagraphPlugin","PARAGRAPH_CLASSES","ParagraphMarkupElementNode","element","attributes","children","align","className","merge","alignmentClassnames","getColumnBreakClasses","MarkupElement","id","node","createPluginFactory","createPlateParagraphPlugin"],"mappings":";;;;;;AAkBO,MAAMA,UAAwBC,EAAO;AAAA,EAExC,YAAY,EAAE,QAAAC,IAASC,EAAY,GAAG,GAAGC,EAAuB,IAAA,IAAI;AAChE,UAAMC,EAAW,GAAG;AAAA,MAChB,eAAe,IAAIC,EAAuB;AAAA,MAC1C,OAAO;AAAA,MACP,GAAGF;AAAA,IAAA,CACN;AANE,IAAAG,EAAA,gBAAS,CAAA;AAOZ,SAAK,SAASL;AAAA,EAClB;AAAA,EAEA,UAAyB;AACrB,WAAO,CAACM,EAAsB,KAAK,MAAM,CAAC;AAAA,EAC9C;AACJ;AAEO,MAAMC,IAAoB,0BAEpBC,IAA6B,CAAC,EAAE,SAAAC,GAAS,YAAAC,GAAY,UAAAC,GAAU,QAAAX,QAA0C;AAClH,QAAMY,IAAQH,EAAQ,OAChBI,IAAYC,EAAM,CAACF,KAASG,EAAoBH,CAAK,GAAGL,GAAmBS,EAAsBP,CAAO,CAAC,CAAC;AAChH,2BACK,KAAG,EAAA,GAAGC,GAAY,WAAAG,GAAsB,OAAOb,GAC3C,UAAAW,EACL,CAAA;AAER;AAEO,MAAMP,UAA+Ba,EAAc;AAAA,EACtD,YAAYC,IAAKf,EAAW,GAAGgB,IAAOX,GAA4B;AAC9D,UAAMU,GAAIC,CAAI;AAAA,EAClB;AACJ;AAEa,MAAAb,IAAwB,CAACN,MAClCoB,EAAoB;AAAA,EAChB,GAAGC,EAA2B;AAAA,EAC9B,KAAKlB,EAAW;AAAA,EAChB,WAAW;AAAA,EACX,WAAWK;AACf,CAAC,EAAE;AAAA,EACC,WAAW,CAACN,wBAAwCM,GAA4B,EAAA,GAAGN,GAAO,QAAAF,GAAgB;AAC9G,CAAC;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var c = (t, e, s) => e in t ? m(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var u = (t, e, s) => (c(t, typeof e != "symbol" ? e + "" : e, s), s);
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { Plugin as i, MarkupElement as p, merge as g, alignmentClassnames as k, getColumnBreakClasses as y, createPluginFactory as d } from "@frontify/fondue";
|
|
6
|
+
import { TextStyles as a, BlockStyles as q } from "../styles.es.js";
|
|
7
|
+
const x = "textstyle-quote-plugin";
|
|
8
|
+
class f extends i {
|
|
9
|
+
constructor({ styles: s = q.quote, ...o } = {}) {
|
|
10
|
+
super(a.quote, {
|
|
11
|
+
label: "Quote",
|
|
12
|
+
markupElement: new E(),
|
|
13
|
+
...o
|
|
14
|
+
});
|
|
15
|
+
u(this, "styles", {});
|
|
16
|
+
this.styles = s;
|
|
17
|
+
}
|
|
18
|
+
plugins() {
|
|
19
|
+
return [Q(this.styles)];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class E extends p {
|
|
23
|
+
constructor(e = x, s = l) {
|
|
24
|
+
super(e, s);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const l = ({ element: t, attributes: e, children: s, styles: o }) => {
|
|
28
|
+
const n = t.align;
|
|
29
|
+
return /* @__PURE__ */ r(
|
|
30
|
+
"blockquote",
|
|
31
|
+
{
|
|
32
|
+
...e,
|
|
33
|
+
className: g([n && k[n], y(t)]),
|
|
34
|
+
style: o,
|
|
35
|
+
children: s
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}, Q = (t) => d({
|
|
39
|
+
key: a.quote,
|
|
40
|
+
isElement: !0,
|
|
41
|
+
component: l,
|
|
42
|
+
deserializeHtml: {
|
|
43
|
+
rules: [{ validNodeName: ["blockquote", "BLOCKQUOTE"] }]
|
|
44
|
+
}
|
|
45
|
+
})({
|
|
46
|
+
component: (e) => /* @__PURE__ */ r(l, { ...e, styles: t })
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
l as QuoteMarkupElementNode,
|
|
50
|
+
f as QuotePlugin,
|
|
51
|
+
Q as createQuotePlugin
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=quotePlugin.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotePlugin.es.js","sources":["../../../../../src/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n MarkupElement,\n PlatePlugin,\n Plugin,\n PluginProps,\n TextStyleRenderElementProps,\n alignmentClassnames,\n createPluginFactory,\n getColumnBreakClasses,\n merge,\n} from '@frontify/fondue';\nimport type { CSSProperties } from 'react';\nimport { BlockStyles, TextStyles } from '../styles';\n\nconst ID = 'textstyle-quote-plugin';\n\nexport class QuotePlugin extends Plugin {\n public styles: CSSProperties = {};\n constructor({ styles = BlockStyles.quote, ...props }: PluginProps = {}) {\n super(TextStyles.quote, {\n label: 'Quote',\n markupElement: new QuoteMarkupElement(),\n ...props,\n });\n this.styles = styles;\n }\n\n plugins(): PlatePlugin[] {\n return [createQuotePlugin(this.styles)];\n }\n}\n\nclass QuoteMarkupElement extends MarkupElement {\n constructor(id = ID, node = QuoteMarkupElementNode) {\n super(id, node);\n }\n}\n\nexport const QuoteMarkupElementNode = ({ element, attributes, children, styles }: TextStyleRenderElementProps) => {\n const align = element.align as string;\n return (\n <blockquote\n {...attributes}\n className={merge([align && alignmentClassnames[align], getColumnBreakClasses(element)])}\n style={styles}\n >\n {children}\n </blockquote>\n );\n};\n\nexport const createQuotePlugin = (styles: CSSProperties): PlatePlugin =>\n createPluginFactory({\n key: TextStyles.quote,\n isElement: true,\n component: QuoteMarkupElementNode,\n deserializeHtml: {\n rules: [{ validNodeName: ['blockquote', 'BLOCKQUOTE'] }],\n },\n })({\n component: (props: TextStyleRenderElementProps) => <QuoteMarkupElementNode {...props} styles={styles} />,\n });\n"],"names":["ID","QuotePlugin","Plugin","styles","BlockStyles","props","TextStyles","QuoteMarkupElement","__publicField","createQuotePlugin","MarkupElement","id","node","QuoteMarkupElementNode","element","attributes","children","align","jsx","merge","alignmentClassnames","getColumnBreakClasses","createPluginFactory"],"mappings":";;;;;;AAgBA,MAAMA,IAAK;AAEJ,MAAMC,UAAoBC,EAAO;AAAA,EAEpC,YAAY,EAAE,QAAAC,IAASC,EAAY,OAAO,GAAGC,EAAuB,IAAA,IAAI;AACpE,UAAMC,EAAW,OAAO;AAAA,MACpB,OAAO;AAAA,MACP,eAAe,IAAIC,EAAmB;AAAA,MACtC,GAAGF;AAAA,IAAA,CACN;AANE,IAAAG,EAAA,gBAAwB,CAAA;AAO3B,SAAK,SAASL;AAAA,EAClB;AAAA,EAEA,UAAyB;AACrB,WAAO,CAACM,EAAkB,KAAK,MAAM,CAAC;AAAA,EAC1C;AACJ;AAEA,MAAMF,UAA2BG,EAAc;AAAA,EAC3C,YAAYC,IAAKX,GAAIY,IAAOC,GAAwB;AAChD,UAAMF,GAAIC,CAAI;AAAA,EAClB;AACJ;AAEO,MAAMC,IAAyB,CAAC,EAAE,SAAAC,GAAS,YAAAC,GAAY,UAAAC,GAAU,QAAAb,QAA0C;AAC9G,QAAMc,IAAQH,EAAQ;AAElB,SAAA,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAGH;AAAA,MACJ,WAAWI,EAAM,CAACF,KAASG,EAAoBH,CAAK,GAAGI,EAAsBP,CAAO,CAAC,CAAC;AAAA,MACtF,OAAOX;AAAA,MAEN,UAAAa;AAAA,IAAA;AAAA,EAAA;AAGb,GAEaP,IAAoB,CAACN,MAC9BmB,EAAoB;AAAA,EAChB,KAAKhB,EAAW;AAAA,EAChB,WAAW;AAAA,EACX,WAAWO;AAAA,EACX,iBAAiB;AAAA,IACb,OAAO,CAAC,EAAE,eAAe,CAAC,cAAc,YAAY,GAAG;AAAA,EAC3D;AACJ,CAAC,EAAE;AAAA,EACC,WAAW,CAACR,wBAAwCQ,GAAwB,EAAA,GAAGR,GAAO,QAAAF,GAAgB;AAC1G,CAAC;"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { LINK_PLUGIN as e } from "./LinkPlugin/id.es.js";
|
|
2
|
+
import { BlockButtonStyles as i } from "./ButtonPlugin/utils/styles.es.js";
|
|
3
|
+
var n = /* @__PURE__ */ ((t) => (t.heading1 = "heading1", t.heading2 = "heading2", t.heading3 = "heading3", t.heading4 = "heading4", t.custom1 = "custom1", t.custom2 = "custom2", t.custom3 = "custom3", t.quote = "quote", t.imageCaption = "imageCaption", t.imageTitle = "imageTitle", t.p = "p", t))(n || {});
|
|
4
|
+
const s = {
|
|
5
|
+
heading1: {
|
|
6
|
+
fontSize: "var(--f-theme-settings-heading1-font-size)",
|
|
7
|
+
lineHeight: "var(--f-theme-settings-heading1-line-height)",
|
|
8
|
+
marginTop: "var(--f-theme-settings-heading1-margin-top)",
|
|
9
|
+
marginBottom: "var(--f-theme-settings-heading1-margin-bottom)",
|
|
10
|
+
textDecoration: "var(--f-theme-settings-heading1-text-decoration)",
|
|
11
|
+
fontStyle: "var(--f-theme-settings-heading1-font-style)",
|
|
12
|
+
textTransform: "var(--f-theme-settings-heading1-text-transform)",
|
|
13
|
+
letterSpacing: "var(--f-theme-settings-heading1-letter-spacing)",
|
|
14
|
+
fontWeight: "var(--f-theme-settings-heading1-font-weight)",
|
|
15
|
+
fontFamily: "var(--f-theme-settings-heading1-font-family)",
|
|
16
|
+
color: "var(--f-theme-settings-heading1-color)"
|
|
17
|
+
},
|
|
18
|
+
heading2: {
|
|
19
|
+
fontSize: "var(--f-theme-settings-heading2-font-size)",
|
|
20
|
+
lineHeight: "var(--f-theme-settings-heading2-line-height)",
|
|
21
|
+
marginTop: "var(--f-theme-settings-heading2-margin-top)",
|
|
22
|
+
marginBottom: "var(--f-theme-settings-heading2-margin-bottom)",
|
|
23
|
+
textDecoration: "var(--f-theme-settings-heading2-text-decoration)",
|
|
24
|
+
fontStyle: "var(--f-theme-settings-heading2-font-style)",
|
|
25
|
+
textTransform: "var(--f-theme-settings-heading2-text-transform)",
|
|
26
|
+
letterSpacing: "var(--f-theme-settings-heading2-letter-spacing)",
|
|
27
|
+
fontWeight: "var(--f-theme-settings-heading2-font-weight)",
|
|
28
|
+
fontFamily: "var(--f-theme-settings-heading2-font-family)",
|
|
29
|
+
color: "var(--f-theme-settings-heading2-color)"
|
|
30
|
+
},
|
|
31
|
+
heading3: {
|
|
32
|
+
fontSize: "var(--f-theme-settings-heading3-font-size)",
|
|
33
|
+
lineHeight: "var(--f-theme-settings-heading3-line-height)",
|
|
34
|
+
marginTop: "var(--f-theme-settings-heading3-margin-top)",
|
|
35
|
+
marginBottom: "var(--f-theme-settings-heading3-margin-bottom)",
|
|
36
|
+
textDecoration: "var(--f-theme-settings-heading3-text-decoration)",
|
|
37
|
+
fontStyle: "var(--f-theme-settings-heading3-font-style)",
|
|
38
|
+
textTransform: "var(--f-theme-settings-heading3-text-transform)",
|
|
39
|
+
letterSpacing: "var(--f-theme-settings-heading3-letter-spacing)",
|
|
40
|
+
fontWeight: "var(--f-theme-settings-heading3-font-weight)",
|
|
41
|
+
fontFamily: "var(--f-theme-settings-heading3-font-family)",
|
|
42
|
+
color: "var(--f-theme-settings-heading3-color)"
|
|
43
|
+
},
|
|
44
|
+
heading4: {
|
|
45
|
+
fontSize: "var(--f-theme-settings-heading4-font-size)",
|
|
46
|
+
lineHeight: "var(--f-theme-settings-heading4-line-height)",
|
|
47
|
+
marginTop: "var(--f-theme-settings-heading4-margin-top)",
|
|
48
|
+
marginBottom: "var(--f-theme-settings-heading4-margin-bottom)",
|
|
49
|
+
textDecoration: "var(--f-theme-settings-heading4-text-decoration)",
|
|
50
|
+
fontStyle: "var(--f-theme-settings-heading4-font-style)",
|
|
51
|
+
textTransform: "var(--f-theme-settings-heading4-text-transform)",
|
|
52
|
+
letterSpacing: "var(--f-theme-settings-heading4-letter-spacing)",
|
|
53
|
+
fontWeight: "var(--f-theme-settings-heading4-font-weight)",
|
|
54
|
+
fontFamily: "var(--f-theme-settings-heading4-font-family)",
|
|
55
|
+
color: "var(--f-theme-settings-heading4-color)"
|
|
56
|
+
},
|
|
57
|
+
custom1: {
|
|
58
|
+
fontSize: "var(--f-theme-settings-custom1-font-size)",
|
|
59
|
+
lineHeight: "var(--f-theme-settings-custom1-line-height)",
|
|
60
|
+
marginTop: "var(--f-theme-settings-custom1-margin-top)",
|
|
61
|
+
marginBottom: "var(--f-theme-settings-custom1-margin-bottom)",
|
|
62
|
+
textDecoration: "var(--f-theme-settings-custom1-text-decoration)",
|
|
63
|
+
fontStyle: "var(--f-theme-settings-custom1-font-style)",
|
|
64
|
+
textTransform: "var(--f-theme-settings-custom1-text-transform)",
|
|
65
|
+
letterSpacing: "var(--f-theme-settings-custom1-letter-spacing)",
|
|
66
|
+
fontWeight: "var(--f-theme-settings-custom1-font-weight)",
|
|
67
|
+
fontFamily: "var(--f-theme-settings-custom1-font-family)",
|
|
68
|
+
color: "var(--f-theme-settings-custom1-color)"
|
|
69
|
+
},
|
|
70
|
+
custom2: {
|
|
71
|
+
fontSize: "var(--f-theme-settings-custom2-font-size)",
|
|
72
|
+
lineHeight: "var(--f-theme-settings-custom2-line-height)",
|
|
73
|
+
marginTop: "var(--f-theme-settings-custom2-margin-top)",
|
|
74
|
+
marginBottom: "var(--f-theme-settings-custom2-margin-bottom)",
|
|
75
|
+
textDecoration: "var(--f-theme-settings-custom2-text-decoration)",
|
|
76
|
+
fontStyle: "var(--f-theme-settings-custom2-font-style)",
|
|
77
|
+
textTransform: "var(--f-theme-settings-custom2-text-transform)",
|
|
78
|
+
letterSpacing: "var(--f-theme-settings-custom2-letter-spacing)",
|
|
79
|
+
fontWeight: "var(--f-theme-settings-custom2-font-weight)",
|
|
80
|
+
fontFamily: "var(--f-theme-settings-custom2-font-family)",
|
|
81
|
+
color: "var(--f-theme-settings-custom2-color)"
|
|
82
|
+
},
|
|
83
|
+
custom3: {
|
|
84
|
+
fontSize: "var(--f-theme-settings-custom3-font-size)",
|
|
85
|
+
lineHeight: "var(--f-theme-settings-custom3-line-height)",
|
|
86
|
+
marginTop: "var(--f-theme-settings-custom3-margin-top)",
|
|
87
|
+
marginBottom: "var(--f-theme-settings-custom3-margin-bottom)",
|
|
88
|
+
textDecoration: "var(--f-theme-settings-custom3-text-decoration)",
|
|
89
|
+
fontStyle: "var(--f-theme-settings-custom3-font-style)",
|
|
90
|
+
textTransform: "var(--f-theme-settings-custom3-text-transform)",
|
|
91
|
+
letterSpacing: "var(--f-theme-settings-custom3-letter-spacing)",
|
|
92
|
+
fontWeight: "var(--f-theme-settings-custom3-font-weight)",
|
|
93
|
+
fontFamily: "var(--f-theme-settings-custom3-font-family)",
|
|
94
|
+
color: "var(--f-theme-settings-custom3-color)"
|
|
95
|
+
},
|
|
96
|
+
p: {
|
|
97
|
+
fontSize: "var(--f-theme-settings-body-font-size)",
|
|
98
|
+
lineHeight: "var(--f-theme-settings-body-line-height)",
|
|
99
|
+
marginTop: "var(--f-theme-settings-body-margin-top)",
|
|
100
|
+
marginBottom: "var(--f-theme-settings-body-margin-bottom)",
|
|
101
|
+
textDecoration: "var(--f-theme-settings-body-text-decoration)",
|
|
102
|
+
fontStyle: "var(--f-theme-settings-body-font-style)",
|
|
103
|
+
textTransform: "var(--f-theme-settings-body-text-transform)",
|
|
104
|
+
letterSpacing: "var(--f-theme-settings-body-letter-spacing)",
|
|
105
|
+
fontWeight: "var(--f-theme-settings-body-font-weight)",
|
|
106
|
+
fontFamily: "var(--f-theme-settings-body-font-family)",
|
|
107
|
+
color: "var(--f-theme-settings-body-color)"
|
|
108
|
+
},
|
|
109
|
+
quote: {
|
|
110
|
+
fontSize: "var(--f-theme-settings-quote-font-size)",
|
|
111
|
+
lineHeight: "var(--f-theme-settings-quote-line-height)",
|
|
112
|
+
marginTop: "var(--f-theme-settings-quote-margin-top)",
|
|
113
|
+
marginBottom: "var(--f-theme-settings-quote-margin-bottom)",
|
|
114
|
+
textDecoration: "var(--f-theme-settings-quote-text-decoration)",
|
|
115
|
+
fontStyle: "var(--f-theme-settings-quote-font-style)",
|
|
116
|
+
textTransform: "var(--f-theme-settings-quote-text-transform)",
|
|
117
|
+
letterSpacing: "var(--f-theme-settings-quote-letter-spacing)",
|
|
118
|
+
fontWeight: "var(--f-theme-settings-quote-font-weight)",
|
|
119
|
+
fontFamily: "var(--f-theme-settings-quote-font-family)",
|
|
120
|
+
color: "var(--f-theme-settings-quote-color)"
|
|
121
|
+
},
|
|
122
|
+
imageCaption: {
|
|
123
|
+
fontSize: "var(--f-theme-settings-image-caption-font-size)",
|
|
124
|
+
lineHeight: "var(--f-theme-settings-image-caption-line-height)",
|
|
125
|
+
marginTop: "var(--f-theme-settings-image-caption-margin-top)",
|
|
126
|
+
marginBottom: "var(--f-theme-settings-image-caption-margin-bottom)",
|
|
127
|
+
textDecoration: "var(--f-theme-settings-image-caption-text-decoration)",
|
|
128
|
+
fontStyle: "var(--f-theme-settings-image-caption-font-style)",
|
|
129
|
+
textTransform: "var(--f-theme-settings-image-caption-text-transform)",
|
|
130
|
+
letterSpacing: "var(--f-theme-settings-image-caption-letter-spacing)",
|
|
131
|
+
fontWeight: "var(--f-theme-settings-image-caption-font-weight)",
|
|
132
|
+
fontFamily: "var(--f-theme-settings-image-caption-font-family)",
|
|
133
|
+
color: "var(--f-theme-settings-image-caption-color)"
|
|
134
|
+
},
|
|
135
|
+
imageTitle: {
|
|
136
|
+
fontSize: "var(--f-theme-settings-image-title-font-size)",
|
|
137
|
+
lineHeight: "var(--f-theme-settings-image-title-line-height)",
|
|
138
|
+
marginTop: "var(--f-theme-settings-image-title-margin-top)",
|
|
139
|
+
marginBottom: "var(--f-theme-settings-image-title-margin-bottom)",
|
|
140
|
+
textDecoration: "var(--f-theme-settings-image-title-text-decoration)",
|
|
141
|
+
fontStyle: "var(--f-theme-settings-image-title-font-style)",
|
|
142
|
+
textTransform: "var(--f-theme-settings-image-title-text-transform)",
|
|
143
|
+
letterSpacing: "var(--f-theme-settings-image-title-letter-spacing)",
|
|
144
|
+
fontWeight: "var(--f-theme-settings-image-title-font-weight)",
|
|
145
|
+
fontFamily: "var(--f-theme-settings-image-title-font-family)",
|
|
146
|
+
color: "var(--f-theme-settings-image-title-color)"
|
|
147
|
+
},
|
|
148
|
+
[e]: {
|
|
149
|
+
fontSize: "var(--f-theme-settings-link-font-size)",
|
|
150
|
+
lineHeight: "var(--f-theme-settings-link-line-height)",
|
|
151
|
+
marginTop: "var(--f-theme-settings-link-margin-top)",
|
|
152
|
+
marginBottom: "var(--f-theme-settings-link-margin-bottom)",
|
|
153
|
+
textDecoration: "var(--f-theme-settings-link-text-decoration)",
|
|
154
|
+
fontStyle: "var(--f-theme-settings-link-font-style)",
|
|
155
|
+
textTransform: "var(--f-theme-settings-link-text-transform)",
|
|
156
|
+
letterSpacing: "var(--f-theme-settings-link-letter-spacing)",
|
|
157
|
+
fontWeight: "var(--f-theme-settings-link-font-weight)",
|
|
158
|
+
fontFamily: "var(--f-theme-settings-link-font-family)",
|
|
159
|
+
color: "var(--f-theme-settings-link-color)"
|
|
160
|
+
},
|
|
161
|
+
...i
|
|
162
|
+
};
|
|
163
|
+
export {
|
|
164
|
+
s as BlockStyles,
|
|
165
|
+
n as TextStyles
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=styles.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.es.js","sources":["../../../../src/components/RichTextEditor/plugins/styles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport type { CSSProperties } from 'react';\nimport { LINK_PLUGIN } from './LinkPlugin/id';\nimport { BlockButtonStyles } from './ButtonPlugin';\n\nexport enum TextStyles {\n heading1 = 'heading1',\n heading2 = 'heading2',\n heading3 = 'heading3',\n heading4 = 'heading4',\n custom1 = 'custom1',\n custom2 = 'custom2',\n custom3 = 'custom3',\n quote = 'quote',\n imageCaption = 'imageCaption',\n imageTitle = 'imageTitle',\n p = 'p',\n}\nexport const BlockStyles: Record<string, CSSProperties & { hover?: CSSProperties }> = {\n [TextStyles.heading1]: {\n fontSize: 'var(--f-theme-settings-heading1-font-size)',\n lineHeight: 'var(--f-theme-settings-heading1-line-height)',\n marginTop: 'var(--f-theme-settings-heading1-margin-top)',\n marginBottom: 'var(--f-theme-settings-heading1-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-heading1-text-decoration)',\n fontStyle: 'var(--f-theme-settings-heading1-font-style)',\n textTransform: 'var(--f-theme-settings-heading1-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-heading1-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-heading1-font-weight)',\n fontFamily: 'var(--f-theme-settings-heading1-font-family)',\n color: 'var(--f-theme-settings-heading1-color)',\n },\n [TextStyles.heading2]: {\n fontSize: 'var(--f-theme-settings-heading2-font-size)',\n lineHeight: 'var(--f-theme-settings-heading2-line-height)',\n marginTop: 'var(--f-theme-settings-heading2-margin-top)',\n marginBottom: 'var(--f-theme-settings-heading2-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-heading2-text-decoration)',\n fontStyle: 'var(--f-theme-settings-heading2-font-style)',\n textTransform: 'var(--f-theme-settings-heading2-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-heading2-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-heading2-font-weight)',\n fontFamily: 'var(--f-theme-settings-heading2-font-family)',\n color: 'var(--f-theme-settings-heading2-color)',\n },\n [TextStyles.heading3]: {\n fontSize: 'var(--f-theme-settings-heading3-font-size)',\n lineHeight: 'var(--f-theme-settings-heading3-line-height)',\n marginTop: 'var(--f-theme-settings-heading3-margin-top)',\n marginBottom: 'var(--f-theme-settings-heading3-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-heading3-text-decoration)',\n fontStyle: 'var(--f-theme-settings-heading3-font-style)',\n textTransform: 'var(--f-theme-settings-heading3-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-heading3-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-heading3-font-weight)',\n fontFamily: 'var(--f-theme-settings-heading3-font-family)',\n color: 'var(--f-theme-settings-heading3-color)',\n },\n [TextStyles.heading4]: {\n fontSize: 'var(--f-theme-settings-heading4-font-size)',\n lineHeight: 'var(--f-theme-settings-heading4-line-height)',\n marginTop: 'var(--f-theme-settings-heading4-margin-top)',\n marginBottom: 'var(--f-theme-settings-heading4-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-heading4-text-decoration)',\n fontStyle: 'var(--f-theme-settings-heading4-font-style)',\n textTransform: 'var(--f-theme-settings-heading4-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-heading4-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-heading4-font-weight)',\n fontFamily: 'var(--f-theme-settings-heading4-font-family)',\n color: 'var(--f-theme-settings-heading4-color)',\n },\n [TextStyles.custom1]: {\n fontSize: 'var(--f-theme-settings-custom1-font-size)',\n lineHeight: 'var(--f-theme-settings-custom1-line-height)',\n marginTop: 'var(--f-theme-settings-custom1-margin-top)',\n marginBottom: 'var(--f-theme-settings-custom1-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-custom1-text-decoration)',\n fontStyle: 'var(--f-theme-settings-custom1-font-style)',\n textTransform: 'var(--f-theme-settings-custom1-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-custom1-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-custom1-font-weight)',\n fontFamily: 'var(--f-theme-settings-custom1-font-family)',\n color: 'var(--f-theme-settings-custom1-color)',\n },\n [TextStyles.custom2]: {\n fontSize: 'var(--f-theme-settings-custom2-font-size)',\n lineHeight: 'var(--f-theme-settings-custom2-line-height)',\n marginTop: 'var(--f-theme-settings-custom2-margin-top)',\n marginBottom: 'var(--f-theme-settings-custom2-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-custom2-text-decoration)',\n fontStyle: 'var(--f-theme-settings-custom2-font-style)',\n textTransform: 'var(--f-theme-settings-custom2-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-custom2-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-custom2-font-weight)',\n fontFamily: 'var(--f-theme-settings-custom2-font-family)',\n color: 'var(--f-theme-settings-custom2-color)',\n },\n [TextStyles.custom3]: {\n fontSize: 'var(--f-theme-settings-custom3-font-size)',\n lineHeight: 'var(--f-theme-settings-custom3-line-height)',\n marginTop: 'var(--f-theme-settings-custom3-margin-top)',\n marginBottom: 'var(--f-theme-settings-custom3-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-custom3-text-decoration)',\n fontStyle: 'var(--f-theme-settings-custom3-font-style)',\n textTransform: 'var(--f-theme-settings-custom3-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-custom3-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-custom3-font-weight)',\n fontFamily: 'var(--f-theme-settings-custom3-font-family)',\n color: 'var(--f-theme-settings-custom3-color)',\n },\n [TextStyles.p]: {\n fontSize: 'var(--f-theme-settings-body-font-size)',\n lineHeight: 'var(--f-theme-settings-body-line-height)',\n marginTop: 'var(--f-theme-settings-body-margin-top)',\n marginBottom: 'var(--f-theme-settings-body-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-body-text-decoration)',\n fontStyle: 'var(--f-theme-settings-body-font-style)',\n textTransform: 'var(--f-theme-settings-body-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-body-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-body-font-weight)',\n fontFamily: 'var(--f-theme-settings-body-font-family)',\n color: 'var(--f-theme-settings-body-color)',\n },\n [TextStyles.quote]: {\n fontSize: 'var(--f-theme-settings-quote-font-size)',\n lineHeight: 'var(--f-theme-settings-quote-line-height)',\n marginTop: 'var(--f-theme-settings-quote-margin-top)',\n marginBottom: 'var(--f-theme-settings-quote-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-quote-text-decoration)',\n fontStyle: 'var(--f-theme-settings-quote-font-style)',\n textTransform: 'var(--f-theme-settings-quote-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-quote-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-quote-font-weight)',\n fontFamily: 'var(--f-theme-settings-quote-font-family)',\n color: 'var(--f-theme-settings-quote-color)',\n },\n [TextStyles.imageCaption]: {\n fontSize: 'var(--f-theme-settings-image-caption-font-size)',\n lineHeight: 'var(--f-theme-settings-image-caption-line-height)',\n marginTop: 'var(--f-theme-settings-image-caption-margin-top)',\n marginBottom: 'var(--f-theme-settings-image-caption-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-image-caption-text-decoration)',\n fontStyle: 'var(--f-theme-settings-image-caption-font-style)',\n textTransform: 'var(--f-theme-settings-image-caption-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-image-caption-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-image-caption-font-weight)',\n fontFamily: 'var(--f-theme-settings-image-caption-font-family)',\n color: 'var(--f-theme-settings-image-caption-color)',\n },\n [TextStyles.imageTitle]: {\n fontSize: 'var(--f-theme-settings-image-title-font-size)',\n lineHeight: 'var(--f-theme-settings-image-title-line-height)',\n marginTop: 'var(--f-theme-settings-image-title-margin-top)',\n marginBottom: 'var(--f-theme-settings-image-title-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-image-title-text-decoration)',\n fontStyle: 'var(--f-theme-settings-image-title-font-style)',\n textTransform: 'var(--f-theme-settings-image-title-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-image-title-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-image-title-font-weight)',\n fontFamily: 'var(--f-theme-settings-image-title-font-family)',\n color: 'var(--f-theme-settings-image-title-color)',\n },\n [LINK_PLUGIN]: {\n fontSize: 'var(--f-theme-settings-link-font-size)',\n lineHeight: 'var(--f-theme-settings-link-line-height)',\n marginTop: 'var(--f-theme-settings-link-margin-top)',\n marginBottom: 'var(--f-theme-settings-link-margin-bottom)',\n textDecoration: 'var(--f-theme-settings-link-text-decoration)',\n fontStyle: 'var(--f-theme-settings-link-font-style)',\n textTransform: 'var(--f-theme-settings-link-text-transform)' as CSSProperties['textTransform'],\n letterSpacing: 'var(--f-theme-settings-link-letter-spacing)',\n fontWeight: 'var(--f-theme-settings-link-font-weight)',\n fontFamily: 'var(--f-theme-settings-link-font-family)',\n color: 'var(--f-theme-settings-link-color)',\n },\n ...BlockButtonStyles,\n};\n"],"names":["TextStyles","BlockStyles","LINK_PLUGIN","BlockButtonStyles"],"mappings":";;AAMY,IAAAA,sBAAAA,OACRA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,QAAQ,SACRA,EAAA,eAAe,gBACfA,EAAA,aAAa,cACbA,EAAA,IAAI,KAXIA,IAAAA,KAAA,CAAA,CAAA;AAaL,MAAMC,IAAyE;AAAA,EACjF,UAAsB;AAAA,IACnB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,UAAsB;AAAA,IACnB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,UAAsB;AAAA,IACnB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,UAAsB;AAAA,IACnB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,SAAqB;AAAA,IAClB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,SAAqB;AAAA,IAClB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,SAAqB;AAAA,IAClB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,GAAe;AAAA,IACZ,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,OAAmB;AAAA,IAChB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,cAA0B;AAAA,IACvB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACC,YAAwB;AAAA,IACrB,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACA,CAACC,CAAW,GAAG;AAAA,IACX,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,OAAO;AAAA,EACX;AAAA,EACA,GAAGC;AACP;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { relativeUrlRegex as e } from "../components/Link/utils/relativeUrlRegex.es.js";
|
|
2
|
+
const n = (t) => {
|
|
3
|
+
if (e.test(t))
|
|
4
|
+
return t;
|
|
5
|
+
try {
|
|
6
|
+
return new URL(t), t;
|
|
7
|
+
} catch {
|
|
8
|
+
return `https://${t}`;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
n as addHttps
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=addHttps.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addHttps.es.js","sources":["../../src/helpers/addHttps.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { relativeUrlRegex } from '../components/Link/utils';\n\nexport const addHttps = (url: string) => {\n if (relativeUrlRegex.test(url)) {\n return url;\n }\n try {\n new URL(url);\n return url;\n } catch {\n return `https://${url}`;\n }\n};\n"],"names":["addHttps","url","relativeUrlRegex"],"mappings":";AAIa,MAAAA,IAAW,CAACC,MAAgB;AACjC,MAAAC,EAAiB,KAAKD,CAAG;AAClB,WAAAA;AAEP,MAAA;AACA,eAAI,IAAIA,CAAG,GACJA;AAAA,EAAA,QACH;AACJ,WAAO,WAAWA,CAAG;AAAA,EACzB;AACJ;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { hasRichTextValue as c } from "./hasRichTextValue.es.js";
|
|
2
|
+
const n = (r = "p", o = "", i) => c(o) ? o : JSON.stringify([{ type: r, children: [{ text: o, textStyle: r }], align: i }]);
|
|
3
|
+
export {
|
|
4
|
+
n as convertToRteValue
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=convertToRichTextValue.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertToRichTextValue.es.js","sources":["../../src/helpers/convertToRichTextValue.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { hasRichTextValue } from './hasRichTextValue';\n\nexport const convertToRteValue = (textStyle = 'p', text = '', align?: 'center' | 'right' | 'left' | 'justify') =>\n hasRichTextValue(text) ? text : JSON.stringify([{ type: textStyle, children: [{ text, textStyle }], align }]);\n"],"names":["convertToRteValue","textStyle","text","align","hasRichTextValue"],"mappings":";AAIa,MAAAA,IAAoB,CAACC,IAAY,KAAKC,IAAO,IAAIC,MAC1DC,EAAiBF,CAAI,IAAIA,IAAO,KAAK,UAAU,CAAC,EAAE,MAAMD,GAAW,UAAU,CAAC,EAAE,MAAAC,GAAM,WAAAD,EAAA,CAAW,GAAG,OAAAE,GAAO,CAAC;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { KeyboardCode as h } from "@dnd-kit/core";
|
|
2
|
+
const w = [h.Down, h.Right, h.Up, h.Left], m = (x, y) => (t, { currentCoordinates: f, context: { activeNode: s } }) => {
|
|
3
|
+
if (t.preventDefault(), w.includes(t.code)) {
|
|
4
|
+
const g = (s == null ? void 0 : s.offsetWidth) ?? 0, p = (s == null ? void 0 : s.offsetHeight) ?? 0;
|
|
5
|
+
switch (t.code) {
|
|
6
|
+
case h.Right:
|
|
7
|
+
return {
|
|
8
|
+
...f,
|
|
9
|
+
x: f.x + g + x
|
|
10
|
+
};
|
|
11
|
+
case h.Left:
|
|
12
|
+
return {
|
|
13
|
+
...f,
|
|
14
|
+
x: f.x - g - x
|
|
15
|
+
};
|
|
16
|
+
case h.Down:
|
|
17
|
+
return {
|
|
18
|
+
...f,
|
|
19
|
+
y: f.y + p + y
|
|
20
|
+
};
|
|
21
|
+
case h.Up:
|
|
22
|
+
return {
|
|
23
|
+
...f,
|
|
24
|
+
y: f.y - p - y
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
m as customCoordinatesGetterFactory
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=customCoordinatesGetterFactory.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customCoordinatesGetterFactory.es.js","sources":["../../src/helpers/customCoordinatesGetterFactory.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { KeyboardCode, KeyboardCoordinateGetter } from '@dnd-kit/core';\n\nconst directions: string[] = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\n\nexport const customCoordinatesGetterFactory =\n (columnGap: number, rowGap: number): KeyboardCoordinateGetter =>\n (event, { currentCoordinates, context: { activeNode } }) => {\n event.preventDefault();\n if (directions.includes(event.code)) {\n const width = activeNode?.offsetWidth ?? 0;\n const height = activeNode?.offsetHeight ?? 0;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return {\n ...currentCoordinates,\n x: currentCoordinates.x + width + columnGap,\n };\n case KeyboardCode.Left:\n return {\n ...currentCoordinates,\n x: currentCoordinates.x - width - columnGap,\n };\n case KeyboardCode.Down:\n return {\n ...currentCoordinates,\n y: currentCoordinates.y + height + rowGap,\n };\n case KeyboardCode.Up:\n return {\n ...currentCoordinates,\n y: currentCoordinates.y - height - rowGap,\n };\n }\n }\n return undefined;\n };\n"],"names":["directions","KeyboardCode","customCoordinatesGetterFactory","columnGap","rowGap","event","currentCoordinates","activeNode","width","height"],"mappings":";AAIA,MAAMA,IAAuB,CAACC,EAAa,MAAMA,EAAa,OAAOA,EAAa,IAAIA,EAAa,IAAI,GAE1FC,IACT,CAACC,GAAmBC,MACpB,CAACC,GAAO,EAAE,oBAAAC,GAAoB,SAAS,EAAE,YAAAC,EAAW,QAAQ;AAExD,MADAF,EAAM,eAAe,GACjBL,EAAW,SAASK,EAAM,IAAI,GAAG;AAC3B,UAAAG,KAAQD,KAAA,gBAAAA,EAAY,gBAAe,GACnCE,KAASF,KAAA,gBAAAA,EAAY,iBAAgB;AAE3C,YAAQF,EAAM,MAAM;AAAA,MAChB,KAAKJ,EAAa;AACP,eAAA;AAAA,UACH,GAAGK;AAAA,UACH,GAAGA,EAAmB,IAAIE,IAAQL;AAAA,QAAA;AAAA,MAE1C,KAAKF,EAAa;AACP,eAAA;AAAA,UACH,GAAGK;AAAA,UACH,GAAGA,EAAmB,IAAIE,IAAQL;AAAA,QAAA;AAAA,MAE1C,KAAKF,EAAa;AACP,eAAA;AAAA,UACH,GAAGK;AAAA,UACH,GAAGA,EAAmB,IAAIG,IAASL;AAAA,QAAA;AAAA,MAE3C,KAAKH,EAAa;AACP,eAAA;AAAA,UACH,GAAGK;AAAA,UACH,GAAGA,EAAmB,IAAIG,IAASL;AAAA,QAAA;AAAA,IAE/C;AAAA,EACJ;AAEJ;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const s = (t) => {
|
|
2
|
+
if (!t)
|
|
3
|
+
return !1;
|
|
4
|
+
const n = (e) => e.some((r) => r.text ? r.text !== "" : r.children ? n(r.children) : !1);
|
|
5
|
+
try {
|
|
6
|
+
const e = JSON.parse(t);
|
|
7
|
+
return n(e);
|
|
8
|
+
} catch {
|
|
9
|
+
return !1;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
s as hasRichTextValue
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=hasRichTextValue.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hasRichTextValue.es.js","sources":["../../src/helpers/hasRichTextValue.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\ntype TextElement = {\n text: string;\n children?: TextElement[];\n};\n\nexport const hasRichTextValue = (string?: string): boolean => {\n if (!string) {\n return false;\n }\n const hasText = (children: TextElement[]): boolean =>\n children.some((child: TextElement) => {\n if (child.text) {\n return child.text !== '';\n }\n if (child.children) {\n return hasText(child.children);\n }\n return false;\n });\n\n try {\n const json = JSON.parse(string);\n return hasText(json);\n } catch (error) {\n return false;\n }\n};\n"],"names":["hasRichTextValue","string","hasText","children","child","json"],"mappings":"AAOa,MAAAA,IAAmB,CAACC,MAA6B;AAC1D,MAAI,CAACA;AACM,WAAA;AAEX,QAAMC,IAAU,CAACC,MACbA,EAAS,KAAK,CAACC,MACPA,EAAM,OACCA,EAAM,SAAS,KAEtBA,EAAM,WACCF,EAAQE,EAAM,QAAQ,IAE1B,EACV;AAED,MAAA;AACM,UAAAC,IAAO,KAAK,MAAMJ,CAAM;AAC9B,WAAOC,EAAQG,CAAI;AAAA,UACP;AACL,WAAA;AAAA,EACX;AACJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isDownloadable.es.js","sources":["../../src/helpers/isDownloadable.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Security } from '../settings/types';\n\nexport const isDownloadable = (security: Security, downloadable: boolean, globalAssetDownloadEnabled: boolean) => {\n return security === Security.Custom ? downloadable : globalAssetDownloadEnabled;\n};\n"],"names":["isDownloadable","security","downloadable","globalAssetDownloadEnabled","Security"],"mappings":";AAIO,MAAMA,IAAiB,CAACC,GAAoBC,GAAuBC,MAC/DF,MAAaG,EAAS,SAASF,IAAeC;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const i = (e) => e.map(n), n = (e) => ({
|
|
2
|
+
id: e.id,
|
|
3
|
+
title: e.name,
|
|
4
|
+
colors: e.colors.map(p)
|
|
5
|
+
}), t = (e) => "revision" in e, p = (e) => {
|
|
6
|
+
if (t(e)) {
|
|
7
|
+
const { title: r, revision: a } = e;
|
|
8
|
+
return {
|
|
9
|
+
alpha: a.rgba.alpha ? a.rgba.alpha / 255 : 1,
|
|
10
|
+
red: a.rgba.red ?? 0,
|
|
11
|
+
green: a.rgba.green ?? 0,
|
|
12
|
+
blue: a.rgba.blue ?? 0,
|
|
13
|
+
name: r ?? ""
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
alpha: e.alpha ? e.alpha / 255 : 1,
|
|
18
|
+
red: e.red ?? 0,
|
|
19
|
+
green: e.green ?? 0,
|
|
20
|
+
blue: e.blue ?? 0,
|
|
21
|
+
name: e.name ?? ""
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
n as mapAppBridgeColorPaletteToFonduePalette,
|
|
26
|
+
i as mapAppBridgeColorPalettesToFonduePalettes
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=mapColorPalettes.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapColorPalettes.es.js","sources":["../../src/helpers/mapColorPalettes.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ColorPalette } from '@frontify/app-bridge';\nimport { Palette } from '@frontify/fondue';\n\ntype Nullable<T> = T | null;\n\ntype V3Color = {\n id: number;\n name: Nullable<string>;\n red: Nullable<number>;\n green: Nullable<number>;\n blue: Nullable<number>;\n alpha: Nullable<number>;\n};\n\ntype V4Color = {\n id: number;\n title: Nullable<string>;\n revision: {\n rgba: {\n red: Nullable<number>;\n green: Nullable<number>;\n blue: Nullable<number>;\n alpha: Nullable<number>;\n };\n };\n};\n\ntype Color = V3Color | V4Color;\n\nexport const mapAppBridgeColorPalettesToFonduePalettes = (colorPalettes: ColorPalette[]): Palette[] => {\n return colorPalettes.map(mapAppBridgeColorPaletteToFonduePalette);\n};\nexport const mapAppBridgeColorPaletteToFonduePalette = (colorPalette: ColorPalette): Palette => {\n return {\n id: colorPalette.id,\n title: colorPalette.name,\n colors: colorPalette.colors.map(mapColor),\n };\n};\n\nconst isV4Color = (color: Color): color is V4Color => {\n return 'revision' in color;\n};\n\nconst mapColor = (color: Color) => {\n if (isV4Color(color)) {\n const { title, revision } = color;\n return {\n alpha: revision.rgba.alpha ? revision.rgba.alpha / 255 : 1,\n red: revision.rgba.red ?? 0,\n green: revision.rgba.green ?? 0,\n blue: revision.rgba.blue ?? 0,\n name: title ?? '',\n };\n }\n return {\n alpha: color.alpha ? color.alpha / 255 : 1,\n red: color.red ?? 0,\n green: color.green ?? 0,\n blue: color.blue ?? 0,\n name: color.name ?? '',\n };\n};\n"],"names":["mapAppBridgeColorPalettesToFonduePalettes","colorPalettes","mapAppBridgeColorPaletteToFonduePalette","colorPalette","mapColor","isV4Color","color","title","revision"],"mappings":"AA+Ba,MAAAA,IAA4C,CAACC,MAC/CA,EAAc,IAAIC,CAAuC,GAEvDA,IAA0C,CAACC,OAC7C;AAAA,EACH,IAAIA,EAAa;AAAA,EACjB,OAAOA,EAAa;AAAA,EACpB,QAAQA,EAAa,OAAO,IAAIC,CAAQ;AAAA,IAI1CC,IAAY,CAACC,MACR,cAAcA,GAGnBF,IAAW,CAACE,MAAiB;AAC3B,MAAAD,EAAUC,CAAK,GAAG;AACZ,UAAA,EAAE,OAAAC,GAAO,UAAAC,EAAa,IAAAF;AACrB,WAAA;AAAA,MACH,OAAOE,EAAS,KAAK,QAAQA,EAAS,KAAK,QAAQ,MAAM;AAAA,MACzD,KAAKA,EAAS,KAAK,OAAO;AAAA,MAC1B,OAAOA,EAAS,KAAK,SAAS;AAAA,MAC9B,MAAMA,EAAS,KAAK,QAAQ;AAAA,MAC5B,MAAMD,KAAS;AAAA,IAAA;AAAA,EAEvB;AACO,SAAA;AAAA,IACH,OAAOD,EAAM,QAAQA,EAAM,QAAQ,MAAM;AAAA,IACzC,KAAKA,EAAM,OAAO;AAAA,IAClB,OAAOA,EAAM,SAAS;AAAA,IACtB,MAAMA,EAAM,QAAQ;AAAA,IACpB,MAAMA,EAAM,QAAQ;AAAA,EAAA;AAE5B;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useBlockAssets as p } from "@frontify/app-bridge";
|
|
3
|
+
import { createContext as w, useContext as u } from "react";
|
|
4
|
+
const l = (t, e) => {
|
|
5
|
+
const { blockAssets: n, addAssetIdsToKey: s, deleteAssetIdsFromKey: h, updateAssetIdsFromKey: d } = p(t), i = (n == null ? void 0 : n[e]) || [];
|
|
6
|
+
return {
|
|
7
|
+
onAttachmentsAdd: async (o) => {
|
|
8
|
+
await s(
|
|
9
|
+
e,
|
|
10
|
+
o.map((r) => r.id)
|
|
11
|
+
);
|
|
12
|
+
},
|
|
13
|
+
onAttachmentDelete: async (o) => {
|
|
14
|
+
await h(e, [o.id]);
|
|
15
|
+
},
|
|
16
|
+
onAttachmentReplace: async (o, r) => {
|
|
17
|
+
const c = i.map(
|
|
18
|
+
(m) => m.id === o.id ? r.id : m.id
|
|
19
|
+
);
|
|
20
|
+
await d(e, c);
|
|
21
|
+
},
|
|
22
|
+
onAttachmentsSorted: async (o) => {
|
|
23
|
+
const r = o.map((c) => c.id);
|
|
24
|
+
await d(e, r);
|
|
25
|
+
},
|
|
26
|
+
attachments: i,
|
|
27
|
+
appBridge: t
|
|
28
|
+
};
|
|
29
|
+
}, A = w(null), x = ({
|
|
30
|
+
appBridge: t,
|
|
31
|
+
children: e,
|
|
32
|
+
assetId: n
|
|
33
|
+
}) => {
|
|
34
|
+
const s = l(t, n);
|
|
35
|
+
return /* @__PURE__ */ a(A.Provider, { value: s, children: e });
|
|
36
|
+
}, D = () => {
|
|
37
|
+
const t = u(A);
|
|
38
|
+
if (!t)
|
|
39
|
+
throw new Error(
|
|
40
|
+
"No AttachmentsContext Provided. Component must be wrapped in an 'AttachmentsProvider' or the 'withAttachmentsProvider' HOC"
|
|
41
|
+
);
|
|
42
|
+
return t;
|
|
43
|
+
}, F = (t, e) => {
|
|
44
|
+
const n = (s) => /* @__PURE__ */ a(x, { appBridge: s.appBridge, assetId: e, children: /* @__PURE__ */ a(t, { ...s }) });
|
|
45
|
+
return n.displayName = "withAttachmentsProvider", n;
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
x as AttachmentsProvider,
|
|
49
|
+
l as useAttachments,
|
|
50
|
+
D as useAttachmentsContext,
|
|
51
|
+
F as withAttachmentsProvider
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=useAttachments.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttachments.es.js","sources":["../../src/hooks/useAttachments.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { AppBridgeBlock, Asset, useBlockAssets } from '@frontify/app-bridge';\nimport { type ReactNode, createContext, useContext } from 'react';\n\nimport { type BlockProps } from '../index';\n\nexport const useAttachments = (appBridge: AppBridgeBlock, attachmentKey: string) => {\n const { blockAssets, addAssetIdsToKey, deleteAssetIdsFromKey, updateAssetIdsFromKey } = useBlockAssets(appBridge);\n const attachments = blockAssets?.[attachmentKey] || [];\n\n const onAttachmentsAdd = async (newAssets: Asset[]) => {\n await addAssetIdsToKey(\n attachmentKey,\n newAssets.map((asset) => asset.id),\n );\n };\n\n const onAttachmentDelete = async (assetToDelete: Asset) => {\n await deleteAssetIdsFromKey(attachmentKey, [assetToDelete.id]);\n };\n\n const onAttachmentReplace = async (attachmentToReplace: Asset, newAsset: Asset) => {\n const newAssetIds = attachments.map((attachment) =>\n attachment.id === attachmentToReplace.id ? newAsset.id : attachment.id,\n );\n\n await updateAssetIdsFromKey(attachmentKey, newAssetIds);\n };\n\n const onAttachmentsSorted = async (assets: Asset[]) => {\n const newAssetIds = assets.map((asset) => asset.id);\n\n await updateAssetIdsFromKey(attachmentKey, newAssetIds);\n };\n\n return {\n onAttachmentsAdd,\n onAttachmentDelete,\n onAttachmentReplace,\n onAttachmentsSorted,\n attachments,\n appBridge,\n };\n};\n\nconst AttachmentsContext = createContext<ReturnType<typeof useAttachments> | null>(null);\n\nexport const AttachmentsProvider = ({\n appBridge,\n children,\n assetId,\n}: {\n appBridge: AppBridgeBlock;\n children: ReactNode;\n assetId: string;\n}) => {\n const attachmentContext = useAttachments(appBridge, assetId);\n\n return <AttachmentsContext.Provider value={attachmentContext}>{children}</AttachmentsContext.Provider>;\n};\n\nexport const useAttachmentsContext = () => {\n const context = useContext(AttachmentsContext);\n\n if (!context) {\n throw new Error(\n \"No AttachmentsContext Provided. Component must be wrapped in an 'AttachmentsProvider' or the 'withAttachmentsProvider' HOC\",\n );\n }\n\n return context;\n};\n\n/**\n * Block-level HOC for cases when there is only one attachment asset field related to the block.\n * Recommended for most cases.\n * If finer control is required over attachments, use {@link AttachmentsProvider} component.\n */\nexport const withAttachmentsProvider = <T extends BlockProps>(Component: (props: T) => ReactNode, assetId: string) => {\n const wrappedComponent = (props: T) => (\n <AttachmentsProvider appBridge={props.appBridge} assetId={assetId}>\n <Component {...props} />\n </AttachmentsProvider>\n );\n\n wrappedComponent.displayName = 'withAttachmentsProvider';\n\n return wrappedComponent;\n};\n"],"names":["useAttachments","appBridge","attachmentKey","blockAssets","addAssetIdsToKey","deleteAssetIdsFromKey","updateAssetIdsFromKey","useBlockAssets","attachments","newAssets","asset","assetToDelete","attachmentToReplace","newAsset","newAssetIds","attachment","assets","AttachmentsContext","createContext","AttachmentsProvider","children","assetId","attachmentContext","useAttachmentsContext","context","useContext","withAttachmentsProvider","Component","wrappedComponent","props","jsx"],"mappings":";;;AAOa,MAAAA,IAAiB,CAACC,GAA2BC,MAA0B;AAChF,QAAM,EAAE,aAAAC,GAAa,kBAAAC,GAAkB,uBAAAC,GAAuB,uBAAAC,MAA0BC,EAAeN,CAAS,GAC1GO,KAAcL,KAAA,gBAAAA,EAAcD,OAAkB,CAAA;AA2B7C,SAAA;AAAA,IACH,kBA1BqB,OAAOO,MAAuB;AAC7C,YAAAL;AAAA,QACFF;AAAA,QACAO,EAAU,IAAI,CAACC,MAAUA,EAAM,EAAE;AAAA,MAAA;AAAA,IACrC;AAAA,IAuBA,oBApBuB,OAAOC,MAAyB;AACvD,YAAMN,EAAsBH,GAAe,CAACS,EAAc,EAAE,CAAC;AAAA,IAAA;AAAA,IAoB7D,qBAjBwB,OAAOC,GAA4BC,MAAoB;AAC/E,YAAMC,IAAcN,EAAY;AAAA,QAAI,CAACO,MACjCA,EAAW,OAAOH,EAAoB,KAAKC,EAAS,KAAKE,EAAW;AAAA,MAAA;AAGlE,YAAAT,EAAsBJ,GAAeY,CAAW;AAAA,IAAA;AAAA,IAatD,qBAVwB,OAAOE,MAAoB;AACnD,YAAMF,IAAcE,EAAO,IAAI,CAACN,MAAUA,EAAM,EAAE;AAE5C,YAAAJ,EAAsBJ,GAAeY,CAAW;AAAA,IAAA;AAAA,IAQtD,aAAAN;AAAA,IACA,WAAAP;AAAA,EAAA;AAER,GAEMgB,IAAqBC,EAAwD,IAAI,GAE1EC,IAAsB,CAAC;AAAA,EAChC,WAAAlB;AAAA,EACA,UAAAmB;AAAA,EACA,SAAAC;AACJ,MAIM;AACI,QAAAC,IAAoBtB,EAAeC,GAAWoB,CAAO;AAE3D,2BAAQJ,EAAmB,UAAnB,EAA4B,OAAOK,GAAoB,UAAAF,EAAS,CAAA;AAC5E,GAEaG,IAAwB,MAAM;AACjC,QAAAC,IAAUC,EAAWR,CAAkB;AAE7C,MAAI,CAACO;AACD,UAAM,IAAI;AAAA,MACN;AAAA,IAAA;AAID,SAAAA;AACX,GAOaE,IAA0B,CAAuBC,GAAoCN,MAAoB;AAClH,QAAMO,IAAmB,CAACC,MACtB,gBAAAC,EAACX,GAAoB,EAAA,WAAWU,EAAM,WAAW,SAAAR,GAC7C,UAAA,gBAAAS,EAACH,GAAW,EAAA,GAAGE,GAAO,EAC1B,CAAA;AAGJ,SAAAD,EAAiB,cAAc,2BAExBA;AACX;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useSensors as t, useSensor as e, PointerSensor as n, KeyboardSensor as c } from "@dnd-kit/core";
|
|
2
|
+
import { customCoordinatesGetterFactory as a } from "../helpers/customCoordinatesGetterFactory.es.js";
|
|
3
|
+
const d = {
|
|
4
|
+
start: ["Space", "Enter"],
|
|
5
|
+
cancel: [],
|
|
6
|
+
end: ["Space", "Enter", "Escape"]
|
|
7
|
+
}, p = (o = 0, r = 0) => {
|
|
8
|
+
const s = a(o, r);
|
|
9
|
+
return t(
|
|
10
|
+
e(n),
|
|
11
|
+
e(c, {
|
|
12
|
+
coordinateGetter: s,
|
|
13
|
+
keyboardCodes: d
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
p as useDndSensors
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useDndSensors.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDndSensors.es.js","sources":["../../src/hooks/useDndSensors.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';\nimport { customCoordinatesGetterFactory } from '../helpers/customCoordinatesGetterFactory';\n\nconst keyboardCodes = {\n start: ['Space', 'Enter'],\n cancel: [],\n end: ['Space', 'Enter', 'Escape'],\n};\n\nexport const useDndSensors = (columnGap = 0, rowGap = 0) => {\n const customCoordinatesGetter = customCoordinatesGetterFactory(columnGap, rowGap);\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: customCoordinatesGetter,\n keyboardCodes,\n }),\n );\n\n return sensors;\n};\n"],"names":["keyboardCodes","useDndSensors","columnGap","rowGap","customCoordinatesGetter","customCoordinatesGetterFactory","useSensors","useSensor","PointerSensor","KeyboardSensor"],"mappings":";;AAKA,MAAMA,IAAgB;AAAA,EAClB,OAAO,CAAC,SAAS,OAAO;AAAA,EACxB,QAAQ,CAAC;AAAA,EACT,KAAK,CAAC,SAAS,SAAS,QAAQ;AACpC,GAEaC,IAAgB,CAACC,IAAY,GAAGC,IAAS,MAAM;AAClD,QAAAC,IAA0BC,EAA+BH,GAAWC,CAAM;AASzE,SARSG;AAAA,IACZC,EAAUC,CAAa;AAAA,IACvBD,EAAUE,GAAgB;AAAA,MACtB,kBAAkBL;AAAA,MAClB,eAAAJ;AAAA,IAAA,CACH;AAAA,EAAA;AAIT;"}
|