@frontify/guideline-blocks-settings 3.0.2 → 3.0.3
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/_virtual/_rolldown/runtime.es.js +17 -0
- package/dist/components/Attachments/AttachmentItem.es.js +116 -168
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -1
- package/dist/components/Attachments/Attachments.es.js +145 -137
- package/dist/components/Attachments/Attachments.es.js.map +1 -1
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js +25 -28
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js.map +1 -1
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js +114 -126
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +53 -74
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js +26 -31
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js +22 -25
- package/dist/components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButtonTrigger.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js +17 -28
- package/dist/components/BlockItemWrapper/Toolbar/BaseToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js +25 -35
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js +41 -34
- package/dist/components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js +41 -36
- package/dist/components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js +24 -33
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js +20 -11
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButton/ToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js +18 -10
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarButtonTooltip.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js +10 -12
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js +13 -13
- package/dist/components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js +21 -19
- package/dist/components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js +18 -25
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js +18 -17
- package/dist/components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/constants.es.js +6 -6
- package/dist/components/BlockItemWrapper/constants.es.js.map +1 -1
- package/dist/components/Link/LinkInput.es.js +63 -63
- package/dist/components/Link/LinkInput.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/DocumentLink.es.js +46 -63
- package/dist/components/Link/LinkSelector/DocumentLink.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js +50 -64
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/LinkSelector2.es.js +77 -0
- package/dist/components/Link/LinkSelector/LinkSelector2.es.js.map +1 -0
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js +10 -6
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/PageLink.es.js +53 -67
- package/dist/components/Link/LinkSelector/PageLink.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/PageLinks.es.js +28 -37
- package/dist/components/Link/LinkSelector/PageLinks.es.js.map +1 -1
- package/dist/components/Link/LinkSelector/SectionLink.es.js +31 -24
- package/dist/components/Link/LinkSelector/SectionLink.es.js.map +1 -1
- package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js +6 -5
- package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js.map +1 -1
- package/dist/components/Link/utils/getUrl.es.js +10 -12
- package/dist/components/Link/utils/getUrl.es.js.map +1 -1
- package/dist/components/Link/utils/relativeUrlRegex.es.js +6 -5
- package/dist/components/Link/utils/relativeUrlRegex.es.js.map +1 -1
- package/dist/components/Link/utils/url.es.js +21 -17
- package/dist/components/Link/utils/url.es.js.map +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.es.js +61 -68
- package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
- package/dist/components/RichTextEditor/SerializedText.es.js +25 -22
- package/dist/components/RichTextEditor/SerializedText.es.js.map +1 -1
- package/dist/components/RichTextEditor/constants.es.js +6 -5
- package/dist/components/RichTextEditor/constants.es.js.map +1 -1
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js +30 -37
- package/dist/components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js +31 -39
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/ButtonMarkupElementNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js +12 -11
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/ButtonMarkupElement/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js +19 -23
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js +24 -26
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/ButtonToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js +46 -53
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/CustomFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js +52 -54
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/EditButtonModal/EditModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js +68 -68
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/InsertButtonModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js +91 -103
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/InsertButtonModal/useInsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js +26 -32
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/floatingButtonStore.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js +47 -53
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEdit.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js +12 -18
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEnter.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js +21 -25
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonEscape.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js +29 -37
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useFloatingButtonInsert.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js +13 -17
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/components/FloatingButton/useVirtualFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js +56 -62
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js +9 -12
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js +23 -24
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js +28 -33
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js +61 -80
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js +23 -23
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js +18 -18
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js +13 -12
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js +9 -8
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getButtonStyle.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js +11 -10
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js +85 -84
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js +13 -16
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js +13 -16
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js +10 -13
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js +45 -51
- package/dist/components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js +20 -22
- package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/helpers.es.js +12 -12
- package/dist/components/RichTextEditor/plugins/ColumnBreakPlugin/helpers.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js +48 -57
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/CustomFloatingLink.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js +46 -48
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/EditLinkModal/EditModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js +12 -8
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertLinkModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js +62 -71
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/InsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js +76 -77
- package/dist/components/RichTextEditor/plugins/LinkPlugin/FloatingLink/InsertLinkModal/useInsertModal.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js +17 -21
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js +17 -10
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/LinkMarkupElementNode.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js +11 -10
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkMarkupElement/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkToolbarButton.es.js +22 -26
- package/dist/components/RichTextEditor/plugins/LinkPlugin/LinkToolbarButton.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js +6 -5
- package/dist/components/RichTextEditor/plugins/LinkPlugin/id.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js +39 -40
- package/dist/components/RichTextEditor/plugins/LinkPlugin/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js +10 -10
- package/dist/components/RichTextEditor/plugins/LinkPlugin/utils/getUrl.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/OrderedListPlugin/index.es.js +26 -26
- package/dist/components/RichTextEditor/plugins/OrderedListPlugin/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js +40 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js +40 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js +40 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js +41 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js +41 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js +41 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js +41 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js +44 -38
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js +41 -47
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js +40 -46
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js +45 -41
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js +40 -48
- package/dist/components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/UnorderedListPlugin/index.es.js +29 -29
- package/dist/components/RichTextEditor/plugins/UnorderedListPlugin/index.es.js.map +1 -1
- package/dist/components/RichTextEditor/plugins/styles.es.js +167 -166
- package/dist/components/RichTextEditor/plugins/styles.es.js.map +1 -1
- package/dist/helpers/addHttps.es.js +12 -12
- package/dist/helpers/addHttps.es.js.map +1 -1
- package/dist/helpers/convertToRichTextValue.es.js +14 -6
- package/dist/helpers/convertToRichTextValue.es.js.map +1 -1
- package/dist/helpers/hasRichTextValue.es.js +13 -14
- package/dist/helpers/hasRichTextValue.es.js.map +1 -1
- package/dist/helpers/isDownloadable.es.js +6 -5
- package/dist/helpers/isDownloadable.es.js.map +1 -1
- package/dist/hooks/useAttachments.es.js +65 -73
- package/dist/hooks/useAttachments.es.js.map +1 -1
- package/dist/hooks/useIsInViewport.es.js +20 -21
- package/dist/hooks/useIsInViewport.es.js.map +1 -1
- package/dist/index.cjs.js +6 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +8 -7
- package/dist/index.es.js +221 -213
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/settings/background.es.js +20 -21
- package/dist/settings/background.es.js.map +1 -1
- package/dist/settings/border.es.js +62 -64
- package/dist/settings/border.es.js.map +1 -1
- package/dist/settings/borderRadius.es.js +49 -52
- package/dist/settings/borderRadius.es.js.map +1 -1
- package/dist/settings/borderRadiusExtended.es.js +58 -60
- package/dist/settings/borderRadiusExtended.es.js.map +1 -1
- package/dist/settings/defaultValues.es.js +16 -19
- package/dist/settings/defaultValues.es.js.map +1 -1
- package/dist/settings/gutter.es.js +48 -52
- package/dist/settings/gutter.es.js.map +1 -1
- package/dist/settings/margin.es.js +49 -52
- package/dist/settings/margin.es.js.map +1 -1
- package/dist/settings/marginExtended.es.js +62 -64
- package/dist/settings/marginExtended.es.js.map +1 -1
- package/dist/settings/padding.es.js +49 -52
- package/dist/settings/padding.es.js.map +1 -1
- package/dist/settings/paddingExtended.es.js +62 -64
- package/dist/settings/paddingExtended.es.js.map +1 -1
- package/dist/settings/securityDownloadable.es.js +16 -16
- package/dist/settings/securityDownloadable.es.js.map +1 -1
- package/dist/settings/securityGlobalControl.es.js +26 -32
- package/dist/settings/securityGlobalControl.es.js.map +1 -1
- package/dist/settings/types.es.js +41 -47
- package/dist/settings/types.es.js.map +1 -1
- package/dist/styles.css +1 -0
- package/dist/utilities/color/getReadableColor.es.js +15 -13
- package/dist/utilities/color/getReadableColor.es.js.map +1 -1
- package/dist/utilities/color/isDark.es.js +14 -9
- package/dist/utilities/color/isDark.es.js.map +1 -1
- package/dist/utilities/color/setAlpha.es.js +7 -6
- package/dist/utilities/color/setAlpha.es.js.map +1 -1
- package/dist/utilities/color/toColorObject.es.js +14 -8
- package/dist/utilities/color/toColorObject.es.js.map +1 -1
- package/dist/utilities/color/toHex8String.es.js +7 -6
- package/dist/utilities/color/toHex8String.es.js.map +1 -1
- package/dist/utilities/color/toHexString.es.js +7 -6
- package/dist/utilities/color/toHexString.es.js.map +1 -1
- package/dist/utilities/color/toRgbaString.es.js +7 -6
- package/dist/utilities/color/toRgbaString.es.js.map +1 -1
- package/dist/utilities/color/toShortRgba.es.js +18 -11
- package/dist/utilities/color/toShortRgba.es.js.map +1 -1
- package/dist/utilities/react/getBackgroundColorStyles.es.js +7 -8
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -1
- package/dist/utilities/react/getBorderStyles.es.js +12 -11
- package/dist/utilities/react/getBorderStyles.es.js.map +1 -1
- package/dist/utilities/react/getRadiusStyles.es.js +7 -8
- package/dist/utilities/react/getRadiusStyles.es.js.map +1 -1
- package/dist/utilities/react/joinClassNames.es.js +6 -5
- package/dist/utilities/react/joinClassNames.es.js.map +1 -1
- package/package.json +6 -8
- package/dist/components/Link/LinkSelector/LinkSelector.es.js +0 -72
- package/dist/components/Link/LinkSelector/LinkSelector.es.js.map +0 -1
|
@@ -1,74 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
i
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, S = (t, o) => {
|
|
63
|
-
const e = (n) => /* @__PURE__ */ m(x, { appBridge: n.appBridge, assetId: o, children: /* @__PURE__ */ m(t, { ...n }) });
|
|
64
|
-
return e.displayName = "withAttachmentsProvider", e;
|
|
1
|
+
import { useBlockAssets as e } from "@frontify/app-bridge";
|
|
2
|
+
import { createContext as t, useContext as n } from "react";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/hooks/useAttachments.tsx
|
|
5
|
+
var i = (e, t) => {
|
|
6
|
+
let { blockAssets: n, addAssetIdsToKey: r, deleteAssetIdsFromKey: i, updateAssetIdsFromKey: a } = t, o = n?.[e] || [];
|
|
7
|
+
return {
|
|
8
|
+
onAttachmentsAdd: async (t) => {
|
|
9
|
+
await r(e, t.map((e) => e.id));
|
|
10
|
+
},
|
|
11
|
+
onAttachmentDelete: async (t) => {
|
|
12
|
+
await i(e, [t.id]);
|
|
13
|
+
},
|
|
14
|
+
onAttachmentReplace: async (t, n) => {
|
|
15
|
+
let r = o.map((e) => e.id === t.id ? n.id : e.id);
|
|
16
|
+
await a(e, r);
|
|
17
|
+
},
|
|
18
|
+
onAttachmentsSorted: async (t) => {
|
|
19
|
+
let n = t.map((e) => e.id);
|
|
20
|
+
await a(e, n);
|
|
21
|
+
},
|
|
22
|
+
attachments: o
|
|
23
|
+
};
|
|
24
|
+
}, a = (t, n) => {
|
|
25
|
+
let { onAttachmentsAdd: r, onAttachmentDelete: a, onAttachmentReplace: o, onAttachmentsSorted: s, attachments: c } = i(n, e(t));
|
|
26
|
+
return {
|
|
27
|
+
onAttachmentsAdd: r,
|
|
28
|
+
onAttachmentDelete: a,
|
|
29
|
+
onAttachmentReplace: o,
|
|
30
|
+
onAttachmentsSorted: s,
|
|
31
|
+
attachments: c,
|
|
32
|
+
appBridge: t
|
|
33
|
+
};
|
|
34
|
+
}, o = t(null);
|
|
35
|
+
o.displayName = "AttachmentsContext";
|
|
36
|
+
var s = ({ appBridge: e, children: t, assetId: n }) => {
|
|
37
|
+
let i = a(e, n);
|
|
38
|
+
return /* @__PURE__ */ r(o.Provider, {
|
|
39
|
+
value: i,
|
|
40
|
+
children: t
|
|
41
|
+
});
|
|
42
|
+
}, c = ({ blockAssetBundle: e, appBridge: t, children: n, assetId: a }) => {
|
|
43
|
+
let s = i(a, e);
|
|
44
|
+
return /* @__PURE__ */ r(o.Provider, {
|
|
45
|
+
value: {
|
|
46
|
+
...s,
|
|
47
|
+
appBridge: t
|
|
48
|
+
},
|
|
49
|
+
children: n
|
|
50
|
+
});
|
|
51
|
+
}, l = () => {
|
|
52
|
+
let e = n(o);
|
|
53
|
+
if (!e) throw Error("No AttachmentsContext Provided. Component must be wrapped in an 'AttachmentsProvider' or the 'withAttachmentsProvider' HOC");
|
|
54
|
+
return e;
|
|
55
|
+
}, u = (e, t) => {
|
|
56
|
+
let n = (n) => /* @__PURE__ */ r(s, {
|
|
57
|
+
appBridge: n.appBridge,
|
|
58
|
+
assetId: t,
|
|
59
|
+
children: /* @__PURE__ */ r(e, { ...n })
|
|
60
|
+
});
|
|
61
|
+
return n.displayName = "withAttachmentsProvider", n;
|
|
65
62
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
v as useAttachments,
|
|
71
|
-
R as useAttachmentsContext,
|
|
72
|
-
S as withAttachmentsProvider
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=useAttachments.es.js.map
|
|
63
|
+
//#endregion
|
|
64
|
+
export { c as AttachmentOperationsProvider, s as AttachmentsProvider, i as useAttachmentOperations, a as useAttachments, l as useAttachmentsContext, u as withAttachmentsProvider };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=useAttachments.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAttachments.es.js","sources":["../../src/hooks/useAttachments.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type AppBridgeBlock, type Asset, useBlockAssets } from '@frontify/app-bridge';\nimport { type ReactNode, createContext, useContext } from 'react';\n\nimport { type BlockProps } from '../index';\n\nexport const useAttachmentOperations = (attachmentKey: string, blockAssetBundle: ReturnType<typeof useBlockAssets>) => {\n const { blockAssets, addAssetIdsToKey, deleteAssetIdsFromKey, updateAssetIdsFromKey } = blockAssetBundle;\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 };\n};\n\nexport const useAttachments = (appBridge: AppBridgeBlock, attachmentKey: string) => {\n const { onAttachmentsAdd, onAttachmentDelete, onAttachmentReplace, onAttachmentsSorted, attachments } =\n useAttachmentOperations(attachmentKey, useBlockAssets(appBridge));\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);\nAttachmentsContext.displayName = 'AttachmentsContext';\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 AttachmentOperationsProvider = ({\n blockAssetBundle,\n appBridge,\n children,\n assetId,\n}: {\n blockAssetBundle: ReturnType<typeof useBlockAssets>;\n children: ReactNode;\n assetId: string;\n appBridge: AppBridgeBlock;\n}) => {\n const attachmentContext = useAttachmentOperations(assetId, blockAssetBundle);\n\n return (\n <AttachmentsContext.Provider value={{ ...attachmentContext, appBridge }}>\n {children}\n </AttachmentsContext.Provider>\n );\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"],"
|
|
1
|
+
{"version":3,"file":"useAttachments.es.js","names":[],"sources":["../../src/hooks/useAttachments.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type AppBridgeBlock, type Asset, useBlockAssets } from '@frontify/app-bridge';\nimport { type ReactNode, createContext, useContext } from 'react';\n\nimport { type BlockProps } from '../index';\n\nexport const useAttachmentOperations = (attachmentKey: string, blockAssetBundle: ReturnType<typeof useBlockAssets>) => {\n const { blockAssets, addAssetIdsToKey, deleteAssetIdsFromKey, updateAssetIdsFromKey } = blockAssetBundle;\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 };\n};\n\nexport const useAttachments = (appBridge: AppBridgeBlock, attachmentKey: string) => {\n const { onAttachmentsAdd, onAttachmentDelete, onAttachmentReplace, onAttachmentsSorted, attachments } =\n useAttachmentOperations(attachmentKey, useBlockAssets(appBridge));\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);\nAttachmentsContext.displayName = 'AttachmentsContext';\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 AttachmentOperationsProvider = ({\n blockAssetBundle,\n appBridge,\n children,\n assetId,\n}: {\n blockAssetBundle: ReturnType<typeof useBlockAssets>;\n children: ReactNode;\n assetId: string;\n appBridge: AppBridgeBlock;\n}) => {\n const attachmentContext = useAttachmentOperations(assetId, blockAssetBundle);\n\n return (\n <AttachmentsContext.Provider value={{ ...attachmentContext, appBridge }}>\n {children}\n </AttachmentsContext.Provider>\n );\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"],"mappings":";;;;AAOA,IAAa,KAA2B,GAAuB,MAAwD;CACnH,IAAM,EAAE,gBAAa,qBAAkB,0BAAuB,6BAA0B,GAClF,IAAc,IAAc,MAAkB,CAAC;CA2BrD,OAAO;EACH,yBA1B4B,MAAuB;GACnD,MAAM,EACF,GACA,EAAU,KAAK,MAAU,EAAM,EAAE,CACrC;EACJ;EAsBI,2BApB8B,MAAyB;GACvD,MAAM,EAAsB,GAAe,CAAC,EAAc,EAAE,CAAC;EACjE;EAmBI,4BAjB+B,GAA4B,MAAoB;GAC/E,IAAM,IAAc,EAAY,KAAK,MACjC,EAAW,OAAO,EAAoB,KAAK,EAAS,KAAK,EAAW,EACxE;GAEA,MAAM,EAAsB,GAAe,CAAW;EAC1D;EAYI,4BAV+B,MAAoB;GACnD,IAAM,IAAc,EAAO,KAAK,MAAU,EAAM,EAAE;GAElD,MAAM,EAAsB,GAAe,CAAW;EAC1D;EAOI;CACJ;AACJ,GAEa,KAAkB,GAA2B,MAA0B;CAChF,IAAM,EAAE,qBAAkB,uBAAoB,wBAAqB,wBAAqB,mBACpF,EAAwB,GAAe,EAAe,CAAS,CAAC;CAEpE,OAAO;EACH;EACA;EACA;EACA;EACA;EACA;CACJ;AACJ,GAEM,IAAqB,EAAwD,IAAI;AACvF,EAAmB,cAAc;AAEjC,IAAa,KAAuB,EAChC,cACA,aACA,iBAKE;CACF,IAAM,IAAoB,EAAe,GAAW,CAAO;CAE3D,OAAO,kBAAC,EAAmB,UAApB;EAA6B,OAAO;EAAoB;CAAsC,CAAA;AACzG,GAEa,KAAgC,EACzC,qBACA,cACA,aACA,iBAME;CACF,IAAM,IAAoB,EAAwB,GAAS,CAAgB;CAE3E,OACI,kBAAC,EAAmB,UAApB;EAA6B,OAAO;GAAE,GAAG;GAAmB;EAAU;EACjE;CACwB,CAAA;AAErC,GAEa,UAA8B;CACvC,IAAM,IAAU,EAAW,CAAkB;CAE7C,IAAI,CAAC,GACD,MAAU,MACN,4HACJ;CAGJ,OAAO;AACX,GAOa,KAAiD,GAAoC,MAAoB;CAClH,IAAM,KAAoB,MACtB,kBAAC,GAAD;EAAqB,WAAW,EAAM;EAAoB;EACtD,UAAA,kBAAC,GAAD,EAAW,GAAI,EAAQ,CAAA;CACN,CAAA;CAKzB,OAFA,EAAiB,cAAc,2BAExB;AACX"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, [e, r, s]);
|
|
1
|
+
import { useEffect as e } from "react";
|
|
2
|
+
//#region src/hooks/useIsInViewport.ts
|
|
3
|
+
var t = ({ ref: t, disabled: n, onChange: r }) => {
|
|
4
|
+
e(() => {
|
|
5
|
+
if (n || !t.current) return;
|
|
6
|
+
let e = !1, i = new IntersectionObserver(([t]) => {
|
|
7
|
+
t.isIntersecting !== e && (e = t.isIntersecting, r(t.isIntersecting));
|
|
8
|
+
});
|
|
9
|
+
return i.observe(t.current), () => {
|
|
10
|
+
i.disconnect();
|
|
11
|
+
};
|
|
12
|
+
}, [
|
|
13
|
+
t,
|
|
14
|
+
n,
|
|
15
|
+
r
|
|
16
|
+
]);
|
|
18
17
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=useIsInViewport.es.js.map
|
|
18
|
+
//#endregion
|
|
19
|
+
export { t as useIsInViewport };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=useIsInViewport.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsInViewport.es.js","sources":["../../src/hooks/useIsInViewport.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RefObject, useEffect } from 'react';\n\nexport const useIsInViewport = <T extends Element>({\n ref,\n disabled,\n onChange,\n}: {\n ref: RefObject<T>;\n disabled: boolean;\n onChange: (isInViewport: boolean) => void;\n}) => {\n useEffect(() => {\n if (disabled || !ref.current) {\n return;\n }\n\n let isInViewport = false;\n\n const intersectionObserver = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting !== isInViewport) {\n isInViewport = entry.isIntersecting;\n onChange(entry.isIntersecting);\n }\n });\n\n intersectionObserver.observe(ref.current);\n\n return () => {\n intersectionObserver.disconnect();\n };\n }, [ref, disabled, onChange]);\n};\n"],"
|
|
1
|
+
{"version":3,"file":"useIsInViewport.es.js","names":[],"sources":["../../src/hooks/useIsInViewport.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RefObject, useEffect } from 'react';\n\nexport const useIsInViewport = <T extends Element>({\n ref,\n disabled,\n onChange,\n}: {\n ref: RefObject<T>;\n disabled: boolean;\n onChange: (isInViewport: boolean) => void;\n}) => {\n useEffect(() => {\n if (disabled || !ref.current) {\n return;\n }\n\n let isInViewport = false;\n\n const intersectionObserver = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting !== isInViewport) {\n isInViewport = entry.isIntersecting;\n onChange(entry.isIntersecting);\n }\n });\n\n intersectionObserver.observe(ref.current);\n\n return () => {\n intersectionObserver.disconnect();\n };\n }, [ref, disabled, onChange]);\n};\n"],"mappings":";;AAIA,IAAa,KAAsC,EAC/C,QACA,aACA,kBAKE;CACF,QAAgB;EACZ,IAAI,KAAY,CAAC,EAAI,SACjB;EAGJ,IAAI,IAAe,IAEb,IAAuB,IAAI,sBAAsB,CAAC,OAAW;GAC/D,AAAI,EAAM,mBAAmB,MACzB,IAAe,EAAM,gBACrB,EAAS,EAAM,cAAc;EAErC,CAAC;EAID,OAFA,EAAqB,QAAQ,EAAI,OAAO,SAE3B;GACT,EAAqB,WAAW;EACpC;CACJ,GAAG;EAAC;EAAK;EAAU;CAAQ,CAAC;AAChC"}
|