@frontify/guideline-blocks-settings 0.32.2 → 0.33.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/CHANGELOG.md +108 -1
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +23 -27
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js +10 -14
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +42 -11
- package/dist/index.es.js +201 -193
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -2
- package/src/components/BlockItemWrapper/BlockItemWrapper.spec.ct.tsx +37 -38
- package/src/components/BlockItemWrapper/BlockItemWrapper.tsx +0 -4
- package/src/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.tsx +2 -1
- package/src/components/BlockItemWrapper/Toolbar/Toolbar.spec.tsx +165 -30
- package/src/components/BlockItemWrapper/Toolbar/Toolbar.tsx +14 -9
- package/src/components/BlockItemWrapper/Toolbar/context/index.ts +4 -0
- package/src/components/BlockItemWrapper/Toolbar/hooks/index.ts +3 -0
- package/src/components/BlockItemWrapper/Toolbar/index.ts +2 -0
- package/src/components/BlockItemWrapper/Toolbar/types.ts +8 -9
- package/src/components/BlockItemWrapper/types.ts +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { Color as Color_2 } from '@frontify/sidebar-settings';
|
|
|
16
16
|
import type { ColorInputBlock as ColorInputBlock_2 } from '@frontify/sidebar-settings';
|
|
17
17
|
import { ColorPalette } from '@frontify/app-bridge';
|
|
18
18
|
import { CSSProperties } from 'react';
|
|
19
|
+
import { Dispatch } from 'react';
|
|
19
20
|
import type { Document as Document_2 } from '@frontify/app-bridge';
|
|
20
21
|
import type { DocumentPage } from '@frontify/app-bridge';
|
|
21
22
|
import type { DocumentSection } from '@frontify/app-bridge';
|
|
@@ -51,6 +52,7 @@ import type { SectionHeadingBlock as SectionHeadingBlock_2 } from '@frontify/sid
|
|
|
51
52
|
import type { SegmentedControlsBlock as SegmentedControlsBlock_2 } from '@frontify/sidebar-settings';
|
|
52
53
|
import { SensorDescriptor } from '@dnd-kit/core';
|
|
53
54
|
import { SensorOptions } from '@dnd-kit/core';
|
|
55
|
+
import { SetStateAction } from 'react';
|
|
54
56
|
import type { SettingBlock as SettingBlock_2 } from '@frontify/sidebar-settings';
|
|
55
57
|
import type { SimpleSettingBlock as SimpleSettingBlock_2 } from '@frontify/sidebar-settings';
|
|
56
58
|
import type { SwitchBlock as SwitchBlock_2 } from '@frontify/sidebar-settings';
|
|
@@ -185,14 +187,13 @@ export declare type BlockInjectButtonProps = {
|
|
|
185
187
|
verticalLayout?: boolean;
|
|
186
188
|
};
|
|
187
189
|
|
|
188
|
-
export declare const BlockItemWrapper: ({ children,
|
|
190
|
+
export declare const BlockItemWrapper: ({ children, toolbarItems, shouldHideWrapper, shouldHideComponent, isDragging, shouldFillContainer, outlineOffset, shouldBeShown, showAttachments, }: BlockItemWrapperProps) => ReactElement;
|
|
189
191
|
|
|
190
192
|
export declare type BlockItemWrapperProps = {
|
|
191
193
|
children: ReactNode;
|
|
192
194
|
shouldHideWrapper?: boolean;
|
|
193
195
|
shouldHideComponent?: boolean;
|
|
194
196
|
toolbarItems: (ToolbarItem | undefined)[];
|
|
195
|
-
toolbarFlyoutItems: FlyoutToolbarItem[][];
|
|
196
197
|
isDragging?: boolean;
|
|
197
198
|
shouldFillContainer?: boolean;
|
|
198
199
|
outlineOffset?: number;
|
|
@@ -340,7 +341,9 @@ export declare type ButtonPluginProps = Omit<PluginProps, 'styles'> & {
|
|
|
340
341
|
appBridge: AppBridgeBlock;
|
|
341
342
|
};
|
|
342
343
|
|
|
343
|
-
export declare type ButtonToolbarItem =
|
|
344
|
+
export declare type ButtonToolbarItem = {
|
|
345
|
+
type: 'button';
|
|
346
|
+
} & ToolbarButtonProps;
|
|
344
347
|
|
|
345
348
|
export declare type ChecklistBlock = ChecklistBlock_2<AppBridgeBlock>;
|
|
346
349
|
|
|
@@ -419,13 +422,20 @@ declare type DownloadButtonProps = {
|
|
|
419
422
|
export declare const DragHandleToolbarButton: ({ tooltip, icon, setActivatorNodeRef, draggableProps, }: DragHandleToolbarButtonProps) => JSX_2.Element;
|
|
420
423
|
|
|
421
424
|
export declare type DragHandleToolbarButtonProps = {
|
|
422
|
-
icon
|
|
425
|
+
icon?: ReactNode;
|
|
423
426
|
tooltip?: string;
|
|
424
427
|
draggableProps: Record<string, unknown>;
|
|
425
428
|
setActivatorNodeRef?: (node: HTMLElement | null) => void;
|
|
426
429
|
};
|
|
427
430
|
|
|
428
|
-
export declare type
|
|
431
|
+
export declare type DragHandleToolbarItem = {
|
|
432
|
+
type: 'dragHandle';
|
|
433
|
+
} & DragHandleToolbarButtonProps;
|
|
434
|
+
|
|
435
|
+
export declare const DragPreviewContextProvider: ({ children, isDragPreview, }: {
|
|
436
|
+
children: ReactNode;
|
|
437
|
+
isDragPreview: boolean;
|
|
438
|
+
}) => JSX_2.Element;
|
|
429
439
|
|
|
430
440
|
export declare type DropdownBlock = DropdownBlock_2<AppBridgeBlock>;
|
|
431
441
|
|
|
@@ -446,7 +456,9 @@ export declare type FlyoutToolbarButtonProps = {
|
|
|
446
456
|
flyoutHeader?: ReactNode;
|
|
447
457
|
};
|
|
448
458
|
|
|
449
|
-
export declare type FlyoutToolbarItem =
|
|
459
|
+
export declare type FlyoutToolbarItem = {
|
|
460
|
+
type: 'flyout';
|
|
461
|
+
} & FlyoutToolbarButtonProps;
|
|
450
462
|
|
|
451
463
|
export declare type FontInputBlock = FontInputBlock_2<AppBridgeBlock>;
|
|
452
464
|
|
|
@@ -730,6 +742,10 @@ export declare type MenuToolbarButtonProps = {
|
|
|
730
742
|
tooltip?: string;
|
|
731
743
|
};
|
|
732
744
|
|
|
745
|
+
export declare type MenuToolbarItem = {
|
|
746
|
+
type: 'menu';
|
|
747
|
+
} & MenuToolbarButtonProps;
|
|
748
|
+
|
|
733
749
|
/**
|
|
734
750
|
* Moves an item from the 'from' position to the 'to' position and updates the array
|
|
735
751
|
*
|
|
@@ -740,6 +756,15 @@ export declare type MenuToolbarButtonProps = {
|
|
|
740
756
|
*/
|
|
741
757
|
export declare const moveItemInArray: <T>(array: T[], from: number, to: number) => T[];
|
|
742
758
|
|
|
759
|
+
export declare const MultiFlyoutContextProvider: ({ children, openFlyoutIds, setOpenFlyoutIds, }: {
|
|
760
|
+
children: ReactNode;
|
|
761
|
+
} & MultiFlyoutContextType) => JSX_2.Element;
|
|
762
|
+
|
|
763
|
+
export declare type MultiFlyoutContextType = {
|
|
764
|
+
openFlyoutIds: string[];
|
|
765
|
+
setOpenFlyoutIds: Dispatch<SetStateAction<string[]>>;
|
|
766
|
+
};
|
|
767
|
+
|
|
743
768
|
export declare type MultiInputBlock = MultiInputBlock_2<AppBridgeBlock>;
|
|
744
769
|
|
|
745
770
|
export declare type NotificationBlock = NotificationBlock_2<AppBridgeBlock>;
|
|
@@ -967,7 +992,7 @@ export declare const toHex8String: (color: Color) => string;
|
|
|
967
992
|
*/
|
|
968
993
|
export declare const toHexString: (color: Color) => string;
|
|
969
994
|
|
|
970
|
-
export declare const Toolbar: ({ items,
|
|
995
|
+
export declare const Toolbar: ({ items, attachments }: ToolbarProps) => JSX_2.Element;
|
|
971
996
|
|
|
972
997
|
declare type ToolbarButtonProps = {
|
|
973
998
|
icon: JSX_2.Element;
|
|
@@ -982,13 +1007,10 @@ declare type ToolbarFlyoutMenuItem = {
|
|
|
982
1007
|
style?: MenuItemStyle;
|
|
983
1008
|
};
|
|
984
1009
|
|
|
985
|
-
export declare type ToolbarItem =
|
|
1010
|
+
export declare type ToolbarItem = DragHandleToolbarItem | ButtonToolbarItem | FlyoutToolbarItem | MenuToolbarItem;
|
|
986
1011
|
|
|
987
1012
|
export declare type ToolbarProps = {
|
|
988
1013
|
items: ToolbarItem[];
|
|
989
|
-
flyoutMenu: {
|
|
990
|
-
items: ToolbarFlyoutMenuItem[][];
|
|
991
|
-
};
|
|
992
1014
|
attachments: {
|
|
993
1015
|
isEnabled: boolean;
|
|
994
1016
|
};
|
|
@@ -1113,6 +1135,15 @@ export declare const useAttachmentsContext: () => {
|
|
|
1113
1135
|
|
|
1114
1136
|
export declare const useDndSensors: (columnGap?: number, rowGap?: number) => SensorDescriptor<SensorOptions>[];
|
|
1115
1137
|
|
|
1138
|
+
export declare const useDragPreviewContext: () => boolean;
|
|
1139
|
+
|
|
1140
|
+
export declare const useMultiFlyoutContext: () => MultiFlyoutContextType;
|
|
1141
|
+
|
|
1142
|
+
export declare const useMultiFlyoutState: (flyoutId: string) => {
|
|
1143
|
+
isOpen: boolean;
|
|
1144
|
+
onOpenChange: (isFlyoutOpen: boolean) => void;
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1116
1147
|
export declare type ValueOrPromisedValue<T> = ValueOrPromisedValue_2<AppBridgeBlock, T>;
|
|
1117
1148
|
|
|
1118
1149
|
/**
|
package/dist/index.es.js
CHANGED
|
@@ -2,206 +2,214 @@ import "./styles.css.es.js";
|
|
|
2
2
|
export * from "@frontify/sidebar-settings";
|
|
3
3
|
import { BlockInjectButton as m } from "./components/BlockInjectButton/BlockInjectButton.es.js";
|
|
4
4
|
import { BlockItemWrapper as l } from "./components/BlockItemWrapper/BlockItemWrapper.es.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
5
|
+
import { DragPreviewContextProvider as u, useDragPreviewContext as f } from "./components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js";
|
|
6
|
+
import { MultiFlyoutContextProvider as d, useMultiFlyoutContext as S } from "./components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js";
|
|
7
|
+
import { useMultiFlyoutState as B } from "./components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js";
|
|
8
|
+
import { Toolbar as c } from "./components/BlockItemWrapper/Toolbar/Toolbar.es.js";
|
|
9
|
+
import { AttachmentsToolbarButton as A, DEFAULT_ATTACHMENTS_BUTTON_ID as E } from "./components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js";
|
|
10
|
+
import { DragHandleToolbarButton as C } from "./components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js";
|
|
11
|
+
import { FlyoutToolbarButton as L } from "./components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js";
|
|
12
|
+
import { DEFAULT_MENU_BUTTON_ID as F, MenuToolbarButton as I } from "./components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js";
|
|
13
|
+
import { DEFAULT_DRAGGING_TOOLTIP as R, DEFAULT_DRAG_TOOLTIP as U } from "./components/BlockItemWrapper/constants.es.js";
|
|
14
|
+
import { Attachments as _ } from "./components/Attachments/Attachments.es.js";
|
|
15
|
+
import { DownloadButton as G } from "./components/DownloadButton/DownloadButton.es.js";
|
|
16
|
+
import { RichTextEditor as O } from "./components/RichTextEditor/RichTextEditor.es.js";
|
|
17
|
+
import { LinkPlugin as w, createLinkPlugin as V } from "./components/RichTextEditor/plugins/LinkPlugin/index.es.js";
|
|
18
|
+
import { BUTTON_PLUGIN as j, ButtonPlugin as Q, ELEMENT_BUTTON as X, createButtonPlugin as q } from "./components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js";
|
|
19
|
+
import { withButton as J } from "./components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js";
|
|
20
|
+
import { insertButton as Y } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js";
|
|
21
|
+
import { submitFloatingButton as $ } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js";
|
|
22
|
+
import { unwrapButton as rt } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js";
|
|
23
|
+
import { upsertButton as et } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js";
|
|
24
|
+
import { upsertButtonText as at } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js";
|
|
25
|
+
import { wrapButton as pt } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js";
|
|
26
|
+
import { getUrlFromEditor as gt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js";
|
|
27
|
+
import { createButtonNode as xt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js";
|
|
28
|
+
import { triggerFloatingButton as ft } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js";
|
|
29
|
+
import { triggerFloatingButtonEdit as dt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js";
|
|
30
|
+
import { triggerFloatingButtonInsert as Pt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js";
|
|
31
|
+
import { BlockButtonStyles as Tt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js";
|
|
32
|
+
import { Custom1Plugin as yt } from "./components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js";
|
|
33
|
+
import { Custom2Plugin as Et } from "./components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js";
|
|
34
|
+
import { Custom3Plugin as Ct } from "./components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js";
|
|
35
|
+
import { Heading1Plugin as Lt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js";
|
|
36
|
+
import { Heading2Plugin as Ft } from "./components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js";
|
|
37
|
+
import { Heading3Plugin as Dt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js";
|
|
38
|
+
import { Heading4Plugin as Ut } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
39
|
+
import { ImageCaptionPlugin as _t } from "./components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js";
|
|
40
|
+
import { ImageTitlePlugin as Gt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js";
|
|
41
|
+
import { PARAGRAPH_CLASSES as Ot, ParagraphMarkupElement as vt, ParagraphMarkupElementNode as wt, ParagraphPlugin as Vt, createParagraphPlugin as Wt } from "./components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js";
|
|
42
|
+
import { QuoteMarkupElementNode as Qt, QuotePlugin as Xt, createQuotePlugin as qt } from "./components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js";
|
|
43
|
+
import { AllTextStylePlugins as Jt, AllTextStyles as Kt, TextStylePluginsWithoutImage as Yt, TextStylesWithoutImage as Zt } from "./components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js";
|
|
44
|
+
import { BlockStyles as tr, TextStyles as rr } from "./components/RichTextEditor/plugins/styles.es.js";
|
|
45
|
+
import { getDefaultPluginsWithLinkChooser as er } from "./components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js";
|
|
46
|
+
import { THEME_PREFIX as ar } from "./components/RichTextEditor/constants.es.js";
|
|
47
|
+
import { LinkSelector as pr } from "./components/Link/LinkSelector/LinkSelector.es.js";
|
|
48
|
+
import { LinkInput as gr } from "./components/Link/LinkInput.es.js";
|
|
49
|
+
import { getLegacyUrl as xr, getLinkFromEditor as ur, getUrl as fr, getUrlFromLinkOrLegacyLink as sr } from "./components/Link/utils/getUrl.es.js";
|
|
50
|
+
import { relativeUrlRegex as Sr } from "./components/Link/utils/relativeUrlRegex.es.js";
|
|
51
|
+
import { isValidUrl as Br, isValidUrlOrEmpty as Tr } from "./components/Link/utils/url.es.js";
|
|
52
|
+
import { convertToRteValue as yr } from "./helpers/convertToRichTextValue.es.js";
|
|
53
|
+
import { customCoordinatesGetterFactory as Er } from "./helpers/customCoordinatesGetterFactory.es.js";
|
|
54
|
+
import { hasRichTextValue as Cr } from "./helpers/hasRichTextValue.es.js";
|
|
55
|
+
import { isDownloadable as Lr } from "./helpers/isDownloadable.es.js";
|
|
56
|
+
import { mapAppBridgeColorPaletteToFonduePalette as Fr, mapAppBridgeColorPalettesToFonduePalettes as Ir } from "./helpers/mapColorPalettes.es.js";
|
|
57
|
+
import { addHttps as Rr } from "./helpers/addHttps.es.js";
|
|
58
|
+
import { AttachmentsProvider as br, useAttachments as _r, useAttachmentsContext as Nr, withAttachmentsProvider as Gr } from "./hooks/useAttachments.es.js";
|
|
59
|
+
import { useDndSensors as Or } from "./hooks/useDndSensors.es.js";
|
|
60
|
+
import { getBackgroundSettings as wr } from "./settings/background.es.js";
|
|
61
|
+
import { getBorderSettings as Wr } from "./settings/border.es.js";
|
|
62
|
+
import { getBorderRadiusSettings as Qr, getBorderRadiusSlider as Xr } from "./settings/borderRadius.es.js";
|
|
63
|
+
import { getExtendedBorderRadiusSettings as zr } from "./settings/borderRadiusExtended.es.js";
|
|
64
|
+
import { getGutterSettings as Kr } from "./settings/gutter.es.js";
|
|
65
|
+
import { getMarginSettings as Zr, getMarginSlider as $r } from "./settings/margin.es.js";
|
|
66
|
+
import { getMarginExtendedSettings as ro } from "./settings/marginExtended.es.js";
|
|
67
|
+
import { getPaddingSettings as eo, getPaddingSlider as no } from "./settings/padding.es.js";
|
|
68
|
+
import { getPaddingExtendedSettings as io } from "./settings/paddingExtended.es.js";
|
|
69
|
+
import { BorderStyle as mo, GutterSpacing as go, Margin as lo, Padding as xo, Radius as uo, Security as fo, borderStyleMap as so, gutterSpacingStyleMap as So, marginStyleMap as Po, paddingStyleMap as Bo, radiusStyleMap as To } from "./settings/types.es.js";
|
|
70
|
+
import { getSecurityDownloadableSetting as yo, getSecurityGlobalControlId as Ao } from "./settings/securityDownloadable.es.js";
|
|
71
|
+
import { getSecurityGlobalControlSetting as ho } from "./settings/securityGlobalControl.es.js";
|
|
72
|
+
import { isDark as Mo } from "./utilities/color/isDark.es.js";
|
|
73
|
+
import { toHex8String as ko } from "./utilities/color/toHex8String.es.js";
|
|
74
|
+
import { toHexString as Io } from "./utilities/color/toHexString.es.js";
|
|
75
|
+
import { toRgbaString as Ro } from "./utilities/color/toRgbaString.es.js";
|
|
76
|
+
import { setAlpha as bo } from "./utilities/color/setAlpha.es.js";
|
|
77
|
+
import { toColorObject as No } from "./utilities/color/toColorObject.es.js";
|
|
78
|
+
import { getReadableColor as Ho } from "./utilities/color/getReadableColor.es.js";
|
|
79
|
+
import { toShortRgba as vo } from "./utilities/color/toShortRgba.es.js";
|
|
80
|
+
import { moveItemInArray as Vo } from "./utilities/moveItemInArray.es.js";
|
|
81
|
+
import { getBackgroundColorStyles as jo } from "./utilities/react/getBackgroundColorStyles.es.js";
|
|
82
|
+
import { getBorderStyles as Xo } from "./utilities/react/getBorderStyles.es.js";
|
|
83
|
+
import { getRadiusStyles as zo } from "./utilities/react/getRadiusStyles.es.js";
|
|
84
|
+
import { joinClassNames as Ko } from "./utilities/react/joinClassNames.es.js";
|
|
82
85
|
var r = /* @__PURE__ */ ((t) => (t.Main = "main", t.Basics = "basics", t.Layout = "layout", t.Style = "style", t.Security = "security", t.Targets = "targets", t))(r || {});
|
|
83
86
|
const e = (t) => t, n = (t) => t;
|
|
84
87
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
Jt as AllTextStylePlugins,
|
|
89
|
+
Kt as AllTextStyles,
|
|
90
|
+
_ as Attachments,
|
|
91
|
+
br as AttachmentsProvider,
|
|
92
|
+
A as AttachmentsToolbarButton,
|
|
93
|
+
j as BUTTON_PLUGIN,
|
|
94
|
+
Tt as BlockButtonStyles,
|
|
92
95
|
m as BlockInjectButton,
|
|
93
96
|
l as BlockItemWrapper,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
97
|
+
tr as BlockStyles,
|
|
98
|
+
mo as BorderStyle,
|
|
99
|
+
Q as ButtonPlugin,
|
|
100
|
+
yt as Custom1Plugin,
|
|
101
|
+
Et as Custom2Plugin,
|
|
102
|
+
Ct as Custom3Plugin,
|
|
103
|
+
E as DEFAULT_ATTACHMENTS_BUTTON_ID,
|
|
104
|
+
R as DEFAULT_DRAGGING_TOOLTIP,
|
|
105
|
+
U as DEFAULT_DRAG_TOOLTIP,
|
|
106
|
+
F as DEFAULT_MENU_BUTTON_ID,
|
|
107
|
+
G as DownloadButton,
|
|
108
|
+
C as DragHandleToolbarButton,
|
|
109
|
+
u as DragPreviewContextProvider,
|
|
110
|
+
X as ELEMENT_BUTTON,
|
|
111
|
+
L as FlyoutToolbarButton,
|
|
112
|
+
go as GutterSpacing,
|
|
113
|
+
Lt as Heading1Plugin,
|
|
114
|
+
Ft as Heading2Plugin,
|
|
115
|
+
Dt as Heading3Plugin,
|
|
116
|
+
Ut as Heading4Plugin,
|
|
117
|
+
_t as ImageCaptionPlugin,
|
|
118
|
+
Gt as ImageTitlePlugin,
|
|
119
|
+
gr as LinkInput,
|
|
120
|
+
w as LinkPlugin,
|
|
121
|
+
pr as LinkSelector,
|
|
122
|
+
lo as Margin,
|
|
123
|
+
I as MenuToolbarButton,
|
|
124
|
+
d as MultiFlyoutContextProvider,
|
|
125
|
+
Ot as PARAGRAPH_CLASSES,
|
|
126
|
+
xo as Padding,
|
|
127
|
+
vt as ParagraphMarkupElement,
|
|
128
|
+
wt as ParagraphMarkupElementNode,
|
|
129
|
+
Vt as ParagraphPlugin,
|
|
130
|
+
Qt as QuoteMarkupElementNode,
|
|
131
|
+
Xt as QuotePlugin,
|
|
132
|
+
uo as Radius,
|
|
133
|
+
O as RichTextEditor,
|
|
129
134
|
r as Sections,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
fo as Security,
|
|
136
|
+
ar as THEME_PREFIX,
|
|
137
|
+
Yt as TextStylePluginsWithoutImage,
|
|
138
|
+
rr as TextStyles,
|
|
139
|
+
Zt as TextStylesWithoutImage,
|
|
140
|
+
c as Toolbar,
|
|
141
|
+
Rr as addHttps,
|
|
142
|
+
so as borderStyleMap,
|
|
143
|
+
yr as convertToRteValue,
|
|
144
|
+
xt as createButtonNode,
|
|
145
|
+
q as createButtonPlugin,
|
|
146
|
+
V as createLinkPlugin,
|
|
147
|
+
Wt as createParagraphPlugin,
|
|
148
|
+
qt as createQuotePlugin,
|
|
149
|
+
Er as customCoordinatesGetterFactory,
|
|
145
150
|
e as defineBlock,
|
|
146
151
|
n as defineSettings,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
152
|
+
jo as getBackgroundColorStyles,
|
|
153
|
+
wr as getBackgroundSettings,
|
|
154
|
+
Qr as getBorderRadiusSettings,
|
|
155
|
+
Xr as getBorderRadiusSlider,
|
|
156
|
+
Wr as getBorderSettings,
|
|
157
|
+
Xo as getBorderStyles,
|
|
158
|
+
er as getDefaultPluginsWithLinkChooser,
|
|
159
|
+
zr as getExtendedBorderRadiusSettings,
|
|
160
|
+
Kr as getGutterSettings,
|
|
161
|
+
xr as getLegacyUrl,
|
|
162
|
+
ur as getLinkFromEditor,
|
|
163
|
+
ro as getMarginExtendedSettings,
|
|
164
|
+
Zr as getMarginSettings,
|
|
165
|
+
$r as getMarginSlider,
|
|
166
|
+
io as getPaddingExtendedSettings,
|
|
167
|
+
eo as getPaddingSettings,
|
|
168
|
+
no as getPaddingSlider,
|
|
169
|
+
zo as getRadiusStyles,
|
|
170
|
+
Ho as getReadableColor,
|
|
171
|
+
yo as getSecurityDownloadableSetting,
|
|
172
|
+
Ao as getSecurityGlobalControlId,
|
|
173
|
+
ho as getSecurityGlobalControlSetting,
|
|
174
|
+
fr as getUrl,
|
|
175
|
+
gt as getUrlFromEditor,
|
|
176
|
+
sr as getUrlFromLinkOrLegacyLink,
|
|
177
|
+
So as gutterSpacingStyleMap,
|
|
178
|
+
Cr as hasRichTextValue,
|
|
179
|
+
Y as insertButton,
|
|
180
|
+
Mo as isDark,
|
|
181
|
+
Lr as isDownloadable,
|
|
182
|
+
Br as isValidUrl,
|
|
183
|
+
Tr as isValidUrlOrEmpty,
|
|
184
|
+
Ko as joinClassNames,
|
|
185
|
+
Fr as mapAppBridgeColorPaletteToFonduePalette,
|
|
186
|
+
Ir as mapAppBridgeColorPalettesToFonduePalettes,
|
|
187
|
+
Po as marginStyleMap,
|
|
188
|
+
Vo as moveItemInArray,
|
|
189
|
+
Bo as paddingStyleMap,
|
|
190
|
+
To as radiusStyleMap,
|
|
191
|
+
Sr as relativeUrlRegex,
|
|
192
|
+
bo as setAlpha,
|
|
193
|
+
$ as submitFloatingButton,
|
|
194
|
+
No as toColorObject,
|
|
195
|
+
ko as toHex8String,
|
|
196
|
+
Io as toHexString,
|
|
197
|
+
Ro as toRgbaString,
|
|
198
|
+
vo as toShortRgba,
|
|
199
|
+
ft as triggerFloatingButton,
|
|
200
|
+
dt as triggerFloatingButtonEdit,
|
|
201
|
+
Pt as triggerFloatingButtonInsert,
|
|
202
|
+
rt as unwrapButton,
|
|
203
|
+
et as upsertButton,
|
|
204
|
+
at as upsertButtonText,
|
|
205
|
+
_r as useAttachments,
|
|
206
|
+
Nr as useAttachmentsContext,
|
|
207
|
+
Or as useDndSensors,
|
|
208
|
+
f as useDragPreviewContext,
|
|
209
|
+
S as useMultiFlyoutContext,
|
|
210
|
+
B as useMultiFlyoutState,
|
|
211
|
+
Gr as withAttachmentsProvider,
|
|
212
|
+
J as withButton,
|
|
213
|
+
pt as wrapButton
|
|
206
214
|
};
|
|
207
215
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport './styles.css';\n\nimport type { FC } from 'react';\nimport type { AppBridgeBlock } from '@frontify/app-bridge';\nimport type {\n AssetInputBlock as AssetInputBlockSidebarSettings,\n BaseBlock as BaseBlockSidebarSettings,\n Bundle as BundleSidebarSettings,\n ChecklistBlock as ChecklistBlockSidebarSettings,\n ChoicesType as ChoicesTypeSidebarSettings,\n ColorInputBlock as ColorInputBlockSidebarSettings,\n DropdownBlock as DropdownBlockSidebarSettings,\n DynamicSettingBlock as DynamicSettingBlockSidebarSettings,\n DynamicSupportedBlock as DynamicSupportedBlockSidebarSettings,\n FontInputBlock as FontInputBlockSidebarSettings,\n InputBlock as InputBlockSidebarSettings,\n LegacyAssetInputBlock as LegacyAssetInputBlockSidebarSettings,\n LinkBlock as LinkBlockSidebarSettings,\n LinkChooserBlock as LinkChooserBlockSidebarSettings,\n MultiInputBlock as MultiInputBlockSidebarSettings,\n NotificationBlock as NotificationBlockSidebarSettings,\n SectionHeadingBlock as SectionHeadingBlockSidebarSettings,\n SegmentedControlsBlock as SegmentedControlsBlockSidebarSettings,\n SettingBlock as SettingBlockSidebarSettings,\n SimpleSettingBlock as SimpleSettingBlockSidebarSettings,\n SwitchBlock as SwitchBlockSidebarSettings,\n TemplateInputBlock as TemplateInputBlockSidebarSettings,\n TextareaBlock as TextareaBlockSidebarSettings,\n ValueOrPromisedValue as ValueOrPromisedValueSidebarSettings,\n} from '@frontify/sidebar-settings';\n\nexport * from '@frontify/sidebar-settings';\n\nexport type AssetInputBlock = AssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type BaseBlock<T = undefined> = BaseBlockSidebarSettings<AppBridgeBlock, T>;\nexport type Bundle = BundleSidebarSettings<AppBridgeBlock>;\nexport type ChecklistBlock = ChecklistBlockSidebarSettings<AppBridgeBlock>;\nexport type ChoicesType = ChoicesTypeSidebarSettings<AppBridgeBlock>;\nexport type ColorInputBlock = ColorInputBlockSidebarSettings<AppBridgeBlock>;\nexport type DropdownBlock = DropdownBlockSidebarSettings<AppBridgeBlock>;\nexport type DynamicSettingBlock<Block extends DynamicSupportedBlock = DynamicSupportedBlock> =\n DynamicSettingBlockSidebarSettings<AppBridgeBlock, Block>;\nexport type DynamicSupportedBlock = DynamicSupportedBlockSidebarSettings<AppBridgeBlock>;\nexport type FontInputBlock = FontInputBlockSidebarSettings<AppBridgeBlock>;\nexport type InputBlock = InputBlockSidebarSettings<AppBridgeBlock>;\nexport type LegacyAssetInputBlock = LegacyAssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkBlock = LinkBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkChooserBlock = LinkChooserBlockSidebarSettings<AppBridgeBlock>;\nexport type MultiInputBlock = MultiInputBlockSidebarSettings<AppBridgeBlock>;\nexport type NotificationBlock = NotificationBlockSidebarSettings<AppBridgeBlock>;\nexport type SectionHeadingBlock = SectionHeadingBlockSidebarSettings<AppBridgeBlock>;\nexport type SegmentedControlsBlock = SegmentedControlsBlockSidebarSettings<AppBridgeBlock>;\nexport type SettingBlock = SettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SimpleSettingBlock = SimpleSettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SwitchBlock = SwitchBlockSidebarSettings<AppBridgeBlock>;\nexport type TemplateInputBlock = TemplateInputBlockSidebarSettings<AppBridgeBlock>;\nexport type TextareaBlock = TextareaBlockSidebarSettings<AppBridgeBlock>;\nexport type ValueOrPromisedValue<T> = ValueOrPromisedValueSidebarSettings<AppBridgeBlock, T>;\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettingsStructureExport = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n} & { [customSectionName: string]: SettingBlock[] };\n\nexport type BlockProps = {\n /**\n * The Frontify App Bridge provides an interface to the Frontify app internals.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks/introducing-the-app-bridge}\n */\n appBridge: AppBridgeBlock;\n};\n\nexport type BlockConfigExport = {\n /**\n * Block component to render.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks}\n */\n block: FC<BlockProps>;\n /**\n * Contains the block settings and its structure.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-settings-1}\n */\n settings: ReturnType<typeof defineSettings>;\n /**\n * Block lifecycle hook ran before the block gets added in the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-creation}\n */\n onBlockCreated?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n /**\n * Block lifecycle hook ran before the block gets deleted from the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-deletion}\n */\n onBlockDeleted?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n};\n\n/**\n * Type helper to make it easier to export a theme, accepts a direct {@link BlockConfigExport} object.\n */\nexport const defineBlock = (config: BlockConfigExport): BlockConfigExport => config;\n\n/**\n * Type helper to make it easier to export block's settings structure, accepts a direct {@link BlockSettingsStructureExport} object\n * or a function return a direct {@link BlockSettingsStructureExport} or a function returning a Promise of {@link BlockSettingsStructureExport}.\n */\nexport const defineSettings = <\n T extends\n | BlockSettingsStructureExport\n | (() => Promise<BlockSettingsStructureExport>)\n | (() => BlockSettingsStructureExport),\n>(\n settingsStructure: T,\n): T => settingsStructure;\n\nexport * from './components';\nexport * from './helpers';\nexport * from './hooks';\nexport * from './settings';\nexport * from './utilities';\n"],"names":["Sections","defineBlock","config","defineSettings","settingsStructure"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport './styles.css';\n\nimport type { FC } from 'react';\nimport type { AppBridgeBlock } from '@frontify/app-bridge';\nimport type {\n AssetInputBlock as AssetInputBlockSidebarSettings,\n BaseBlock as BaseBlockSidebarSettings,\n Bundle as BundleSidebarSettings,\n ChecklistBlock as ChecklistBlockSidebarSettings,\n ChoicesType as ChoicesTypeSidebarSettings,\n ColorInputBlock as ColorInputBlockSidebarSettings,\n DropdownBlock as DropdownBlockSidebarSettings,\n DynamicSettingBlock as DynamicSettingBlockSidebarSettings,\n DynamicSupportedBlock as DynamicSupportedBlockSidebarSettings,\n FontInputBlock as FontInputBlockSidebarSettings,\n InputBlock as InputBlockSidebarSettings,\n LegacyAssetInputBlock as LegacyAssetInputBlockSidebarSettings,\n LinkBlock as LinkBlockSidebarSettings,\n LinkChooserBlock as LinkChooserBlockSidebarSettings,\n MultiInputBlock as MultiInputBlockSidebarSettings,\n NotificationBlock as NotificationBlockSidebarSettings,\n SectionHeadingBlock as SectionHeadingBlockSidebarSettings,\n SegmentedControlsBlock as SegmentedControlsBlockSidebarSettings,\n SettingBlock as SettingBlockSidebarSettings,\n SimpleSettingBlock as SimpleSettingBlockSidebarSettings,\n SwitchBlock as SwitchBlockSidebarSettings,\n TemplateInputBlock as TemplateInputBlockSidebarSettings,\n TextareaBlock as TextareaBlockSidebarSettings,\n ValueOrPromisedValue as ValueOrPromisedValueSidebarSettings,\n} from '@frontify/sidebar-settings';\n\nexport * from '@frontify/sidebar-settings';\n\nexport type AssetInputBlock = AssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type BaseBlock<T = undefined> = BaseBlockSidebarSettings<AppBridgeBlock, T>;\nexport type Bundle = BundleSidebarSettings<AppBridgeBlock>;\nexport type ChecklistBlock = ChecklistBlockSidebarSettings<AppBridgeBlock>;\nexport type ChoicesType = ChoicesTypeSidebarSettings<AppBridgeBlock>;\nexport type ColorInputBlock = ColorInputBlockSidebarSettings<AppBridgeBlock>;\nexport type DropdownBlock = DropdownBlockSidebarSettings<AppBridgeBlock>;\nexport type DynamicSettingBlock<Block extends DynamicSupportedBlock = DynamicSupportedBlock> =\n DynamicSettingBlockSidebarSettings<AppBridgeBlock, Block>;\nexport type DynamicSupportedBlock = DynamicSupportedBlockSidebarSettings<AppBridgeBlock>;\nexport type FontInputBlock = FontInputBlockSidebarSettings<AppBridgeBlock>;\nexport type InputBlock = InputBlockSidebarSettings<AppBridgeBlock>;\nexport type LegacyAssetInputBlock = LegacyAssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkBlock = LinkBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkChooserBlock = LinkChooserBlockSidebarSettings<AppBridgeBlock>;\nexport type MultiInputBlock = MultiInputBlockSidebarSettings<AppBridgeBlock>;\nexport type NotificationBlock = NotificationBlockSidebarSettings<AppBridgeBlock>;\nexport type SectionHeadingBlock = SectionHeadingBlockSidebarSettings<AppBridgeBlock>;\nexport type SegmentedControlsBlock = SegmentedControlsBlockSidebarSettings<AppBridgeBlock>;\nexport type SettingBlock = SettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SimpleSettingBlock = SimpleSettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SwitchBlock = SwitchBlockSidebarSettings<AppBridgeBlock>;\nexport type TemplateInputBlock = TemplateInputBlockSidebarSettings<AppBridgeBlock>;\nexport type TextareaBlock = TextareaBlockSidebarSettings<AppBridgeBlock>;\nexport type ValueOrPromisedValue<T> = ValueOrPromisedValueSidebarSettings<AppBridgeBlock, T>;\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettingsStructureExport = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n} & { [customSectionName: string]: SettingBlock[] };\n\nexport type BlockProps = {\n /**\n * The Frontify App Bridge provides an interface to the Frontify app internals.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks/introducing-the-app-bridge}\n */\n appBridge: AppBridgeBlock;\n};\n\nexport type BlockConfigExport = {\n /**\n * Block component to render.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks}\n */\n block: FC<BlockProps>;\n /**\n * Contains the block settings and its structure.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-settings-1}\n */\n settings: ReturnType<typeof defineSettings>;\n /**\n * Block lifecycle hook ran before the block gets added in the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-creation}\n */\n onBlockCreated?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n /**\n * Block lifecycle hook ran before the block gets deleted from the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-deletion}\n */\n onBlockDeleted?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n};\n\n/**\n * Type helper to make it easier to export a theme, accepts a direct {@link BlockConfigExport} object.\n */\nexport const defineBlock = (config: BlockConfigExport): BlockConfigExport => config;\n\n/**\n * Type helper to make it easier to export block's settings structure, accepts a direct {@link BlockSettingsStructureExport} object\n * or a function return a direct {@link BlockSettingsStructureExport} or a function returning a Promise of {@link BlockSettingsStructureExport}.\n */\nexport const defineSettings = <\n T extends\n | BlockSettingsStructureExport\n | (() => Promise<BlockSettingsStructureExport>)\n | (() => BlockSettingsStructureExport),\n>(\n settingsStructure: T,\n): T => settingsStructure;\n\nexport * from './components';\nexport * from './helpers';\nexport * from './hooks';\nexport * from './settings';\nexport * from './utilities';\n"],"names":["Sections","defineBlock","config","defineSettings","settingsStructure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DY,IAAAA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,UAAU,WANFA,IAAAA,KAAA,CAAA,CAAA;AAyDC,MAAAC,IAAc,CAACC,MAAiDA,GAMhEC,IAAiB,CAM1BC,MACIA;"}
|