@frontify/guideline-blocks-settings 2.1.16 → 3.0.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/BlockInjectButton/BlockInjectButton.es.js +50 -49
- package/dist/components/BlockInjectButton/BlockInjectButton.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js.map +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -34
- package/dist/index.es.js +169 -180
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/settings/background.es.js.map +1 -1
- package/dist/settings/borderRadius.es.js +10 -10
- package/dist/settings/borderRadius.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utilities/color/toColorObject.es.js.map +1 -1
- package/dist/utilities/color/toHex8String.es.js.map +1 -1
- package/dist/utilities/color/toHexString.es.js.map +1 -1
- package/dist/utilities/color/toRgbaString.es.js.map +1 -1
- package/dist/utilities/color/toShortRgba.es.js.map +1 -1
- package/dist/utilities/react/getBackgroundColorStyles.es.js.map +1 -1
- package/dist/utilities/react/getBorderStyles.es.js.map +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +0 -14
- package/dist/components/DownloadButton/DownloadButton.es.js +0 -26
- package/dist/components/DownloadButton/DownloadButton.es.js.map +0 -1
- package/dist/helpers/customCoordinatesGetterFactory.es.js +0 -32
- package/dist/helpers/customCoordinatesGetterFactory.es.js.map +0 -1
- package/dist/helpers/mapColorPalettes.es.js +0 -28
- package/dist/helpers/mapColorPalettes.es.js.map +0 -1
- package/dist/hooks/useDndSensors.es.js +0 -18
- package/dist/hooks/useDndSensors.es.js.map +0 -1
- package/dist/utilities/moveItemInArray.es.js +0 -12
- package/dist/utilities/moveItemInArray.es.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,10 +7,8 @@ import { BlockState } from '@frontify/app-bridge';
|
|
|
7
7
|
import { Bundle as Bundle_2 } from '@frontify/sidebar-settings';
|
|
8
8
|
import { ChecklistBlock as ChecklistBlock_2 } from '@frontify/sidebar-settings';
|
|
9
9
|
import { ChoicesType as ChoicesType_2 } from '@frontify/sidebar-settings';
|
|
10
|
-
import { Color } from '@frontify/
|
|
11
|
-
import { Color as Color_2 } from '@frontify/sidebar-settings';
|
|
10
|
+
import { Color } from '@frontify/sidebar-settings';
|
|
12
11
|
import { ColorInputBlock as ColorInputBlock_2 } from '@frontify/sidebar-settings';
|
|
13
|
-
import { ColorPalette } from '@frontify/app-bridge';
|
|
14
12
|
import { CSSProperties } from 'react';
|
|
15
13
|
import { Dispatch } from 'react';
|
|
16
14
|
import { Document as Document_2 } from '@frontify/app-bridge';
|
|
@@ -25,7 +23,6 @@ import { FontInputBlock as FontInputBlock_2 } from '@frontify/sidebar-settings';
|
|
|
25
23
|
import { InputBlock as InputBlock_2 } from '@frontify/sidebar-settings';
|
|
26
24
|
import { InsertNodesOptions } from '@frontify/fondue/rte';
|
|
27
25
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
28
|
-
import { KeyboardCoordinateGetter } from '@dnd-kit/core';
|
|
29
26
|
import { LegacyAssetInputBlock as LegacyAssetInputBlock_2 } from '@frontify/sidebar-settings';
|
|
30
27
|
import { LinkBlock as LinkBlock_2 } from '@frontify/sidebar-settings';
|
|
31
28
|
import { LinkChooserBlock as LinkChooserBlock_2 } from '@frontify/sidebar-settings';
|
|
@@ -35,7 +32,6 @@ import { MultiInputBlock as MultiInputBlock_2 } from '@frontify/sidebar-settings
|
|
|
35
32
|
import { NotificationBlock as NotificationBlock_2 } from '@frontify/sidebar-settings';
|
|
36
33
|
import { OrderedListPlugin as OrderedListPlugin_2 } from '@frontify/fondue/rte';
|
|
37
34
|
import { OrderedListPluginProps } from '@frontify/fondue/rte';
|
|
38
|
-
import { Palette } from '@frontify/fondue';
|
|
39
35
|
import { PlateEditor } from '@frontify/fondue/rte';
|
|
40
36
|
import { PlatePlugin } from '@frontify/fondue/rte';
|
|
41
37
|
import { Plugin as Plugin_2 } from '@frontify/fondue/rte';
|
|
@@ -46,8 +42,6 @@ import { ReactElement } from 'react';
|
|
|
46
42
|
import { ReactNode } from 'react';
|
|
47
43
|
import { SectionHeadingBlock as SectionHeadingBlock_2 } from '@frontify/sidebar-settings';
|
|
48
44
|
import { SegmentedControlsBlock as SegmentedControlsBlock_2 } from '@frontify/sidebar-settings';
|
|
49
|
-
import { SensorDescriptor } from '@dnd-kit/core';
|
|
50
|
-
import { SensorOptions } from '@dnd-kit/core';
|
|
51
45
|
import { SetStateAction } from 'react';
|
|
52
46
|
import { SettingBlock as SettingBlock_2 } from '@frontify/sidebar-settings';
|
|
53
47
|
import { SimpleSettingBlock as SimpleSettingBlock_2 } from '@frontify/sidebar-settings';
|
|
@@ -265,7 +259,7 @@ export declare type BorderSettings = {
|
|
|
265
259
|
hasBorder: boolean;
|
|
266
260
|
borderStyle: BorderStyle;
|
|
267
261
|
borderWidth: string;
|
|
268
|
-
borderColor:
|
|
262
|
+
borderColor: Color;
|
|
269
263
|
};
|
|
270
264
|
|
|
271
265
|
/**
|
|
@@ -280,7 +274,7 @@ export declare type BorderSettings = {
|
|
|
280
274
|
declare type BorderSettingsType = {
|
|
281
275
|
id?: string;
|
|
282
276
|
defaultValue?: boolean;
|
|
283
|
-
defaultColor?:
|
|
277
|
+
defaultColor?: Color;
|
|
284
278
|
switchLabel?: string;
|
|
285
279
|
};
|
|
286
280
|
|
|
@@ -407,8 +401,6 @@ export declare class Custom3Plugin extends Plugin_2 {
|
|
|
407
401
|
plugins(): PlatePlugin[];
|
|
408
402
|
}
|
|
409
403
|
|
|
410
|
-
export declare const customCoordinatesGetterFactory: (columnGap: number, rowGap: number) => KeyboardCoordinateGetter;
|
|
411
|
-
|
|
412
404
|
export declare const DEFAULT_ATTACHMENTS_BUTTON_ID = "attachments";
|
|
413
405
|
|
|
414
406
|
export declare const DEFAULT_DRAG_TOOLTIP = "Drag or press \u21B5 to move";
|
|
@@ -432,13 +424,6 @@ export declare type DocumentSectionWithTitle = Omit<DocumentSection, 'title'> &
|
|
|
432
424
|
title: string;
|
|
433
425
|
};
|
|
434
426
|
|
|
435
|
-
export declare const DownloadButton: ({ onDownload, ariaLabel }: DownloadButtonProps) => JSX_2.Element;
|
|
436
|
-
|
|
437
|
-
declare type DownloadButtonProps = {
|
|
438
|
-
onDownload: () => void;
|
|
439
|
-
ariaLabel?: string;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
427
|
export declare const DragHandleToolbarButton: ({ tooltip, icon, setActivatorNodeRef, draggableProps, }: DragHandleToolbarButtonProps) => JSX_2.Element;
|
|
443
428
|
|
|
444
429
|
export declare type DragHandleToolbarButtonProps = {
|
|
@@ -717,10 +702,6 @@ declare type LinkSelectorProps = {
|
|
|
717
702
|
getDocumentPagesByDocumentId: (documentId: number) => Promise<DocumentPage[]>;
|
|
718
703
|
};
|
|
719
704
|
|
|
720
|
-
export declare const mapAppBridgeColorPalettesToFonduePalettes: (colorPalettes: ColorPalette[]) => Palette[];
|
|
721
|
-
|
|
722
|
-
export declare const mapAppBridgeColorPaletteToFonduePalette: (colorPalette: ColorPalette) => Palette;
|
|
723
|
-
|
|
724
705
|
export declare enum Margin {
|
|
725
706
|
None = "None",
|
|
726
707
|
Small = "Small",
|
|
@@ -771,16 +752,6 @@ export declare type MenuToolbarItem = {
|
|
|
771
752
|
type: 'menu';
|
|
772
753
|
} & MenuToolbarButtonProps;
|
|
773
754
|
|
|
774
|
-
/**
|
|
775
|
-
* Moves an item from the 'from' position to the 'to' position and updates the array
|
|
776
|
-
*
|
|
777
|
-
* @param {Array} array Array of items
|
|
778
|
-
* @param {Number} from Initial index of the item
|
|
779
|
-
* @param {Number} to New index of the item
|
|
780
|
-
* @returns {Array} New array with the item moved to the new position
|
|
781
|
-
*/
|
|
782
|
-
export declare const moveItemInArray: <T>(array: T[], from: number, to: number) => T[];
|
|
783
|
-
|
|
784
755
|
export declare const MultiFlyoutContextProvider: ({ children, openFlyoutIds, setOpenFlyoutIds, }: {
|
|
785
756
|
children: ReactNode;
|
|
786
757
|
} & MultiFlyoutContextType) => JSX_2.Element;
|
|
@@ -1174,8 +1145,6 @@ export declare const useAttachmentsContext: () => {
|
|
|
1174
1145
|
}>;
|
|
1175
1146
|
};
|
|
1176
1147
|
|
|
1177
|
-
export declare const useDndSensors: (columnGap?: number, rowGap?: number) => SensorDescriptor<SensorOptions>[];
|
|
1178
|
-
|
|
1179
1148
|
export declare const useDragPreviewContext: () => boolean;
|
|
1180
1149
|
|
|
1181
1150
|
export declare const useMultiFlyoutContext: () => MultiFlyoutContextType;
|
package/dist/index.es.js
CHANGED
|
@@ -1,225 +1,214 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
export * from "@frontify/sidebar-settings";
|
|
3
|
-
import { AllTextStylePlugins as
|
|
4
|
-
import { AttachmentOperationsProvider as f, AttachmentsProvider as s, useAttachmentOperations as d, useAttachments as P, useAttachmentsContext as S, withAttachmentsProvider as
|
|
3
|
+
import { AllTextStylePlugins as g, AllTextStyles as m, TextStylePluginsWithoutImage as l, TextStylesWithoutImage as x } from "./components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js";
|
|
4
|
+
import { AttachmentOperationsProvider as f, AttachmentsProvider as s, useAttachmentOperations as d, useAttachments as P, useAttachmentsContext as S, withAttachmentsProvider as T } from "./hooks/useAttachments.es.js";
|
|
5
5
|
import { Attachments as c } from "./components/Attachments/Attachments.es.js";
|
|
6
|
-
import { AttachmentsToolbarButton as
|
|
7
|
-
import { BUTTON_PLUGIN as h, ButtonPlugin as M, ELEMENT_BUTTON as
|
|
8
|
-
import { BlockButtonStyles as
|
|
9
|
-
import { BlockInjectButton as
|
|
10
|
-
import { BlockItemWrapper as
|
|
6
|
+
import { AttachmentsToolbarButton as E, DEFAULT_ATTACHMENTS_BUTTON_ID as A } from "./components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js";
|
|
7
|
+
import { BUTTON_PLUGIN as h, ButtonPlugin as M, ELEMENT_BUTTON as k, createButtonPlugin as U } from "./components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js";
|
|
8
|
+
import { BlockButtonStyles as R } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js";
|
|
9
|
+
import { BlockInjectButton as F } from "./components/BlockInjectButton/BlockInjectButton.es.js";
|
|
10
|
+
import { BlockItemWrapper as D } from "./components/BlockItemWrapper/BlockItemWrapper.es.js";
|
|
11
11
|
import { BlockStyles as N, TextStyles as O } from "./components/RichTextEditor/plugins/styles.es.js";
|
|
12
|
-
import { BorderStyle as
|
|
12
|
+
import { BorderStyle as H, GutterSpacing as v, Margin as w, Padding as V, Radius as W, Security as j, borderStyleMap as Q, gutterSpacingStyleMap as K, marginStyleMap as X, paddingStyleMap as Y, radiusStyleMap as q } from "./settings/types.es.js";
|
|
13
13
|
import { BreakAfterPlugin as J, GAP_DEFAULT as Z, KEY_ELEMENT_BREAK_AFTER_COLUMN as $ } from "./components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js";
|
|
14
14
|
import { Custom1Plugin as rt } from "./components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js";
|
|
15
|
-
import { Custom2Plugin as
|
|
15
|
+
import { Custom2Plugin as ot } from "./components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js";
|
|
16
16
|
import { Custom3Plugin as it } from "./components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js";
|
|
17
|
-
import { DEFAULT_DRAGGING_TOOLTIP as pt, DEFAULT_DRAG_TOOLTIP as
|
|
17
|
+
import { DEFAULT_DRAGGING_TOOLTIP as pt, DEFAULT_DRAG_TOOLTIP as gt } from "./components/BlockItemWrapper/constants.es.js";
|
|
18
18
|
import { DEFAULT_MENU_BUTTON_ID as lt, MenuToolbarButton as xt } from "./components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { Heading4Plugin as Ft } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
19
|
+
import { DragHandleToolbarButton as ft } from "./components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js";
|
|
20
|
+
import { DragPreviewContextProvider as dt, useDragPreviewContext as Pt } from "./components/BlockItemWrapper/Toolbar/context/DragPreviewContext.es.js";
|
|
21
|
+
import { FlyoutToolbarButton as Tt } from "./components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js";
|
|
22
|
+
import { Heading1Plugin as ct } from "./components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js";
|
|
23
|
+
import { Heading2Plugin as Et } from "./components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js";
|
|
24
|
+
import { Heading3Plugin as Lt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js";
|
|
25
|
+
import { Heading4Plugin as Mt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
27
26
|
import { ImageCaptionPlugin as Ut } from "./components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js";
|
|
28
|
-
import { ImageTitlePlugin as
|
|
29
|
-
import { LinkInput as
|
|
30
|
-
import { LinkPlugin as
|
|
31
|
-
import { LinkSelector as
|
|
32
|
-
import { MultiFlyoutContextProvider as
|
|
33
|
-
import { OrderedListPlugin as
|
|
34
|
-
import { PARAGRAPH_CLASSES as
|
|
35
|
-
import { QuoteMarkupElementNode as
|
|
36
|
-
import { RichTextEditor as
|
|
37
|
-
import { THEME_PREFIX as
|
|
38
|
-
import { Toolbar as
|
|
39
|
-
import { UnorderedListPlugin as
|
|
40
|
-
import { addHttps as
|
|
41
|
-
import { convertToRteValue as
|
|
42
|
-
import { createButtonNode as
|
|
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 {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import { useDndSensors as te } from "./hooks/useDndSensors.es.js";
|
|
85
|
-
import { useMultiFlyoutState as oe } from "./components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js";
|
|
86
|
-
import { withButton as ne } from "./components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js";
|
|
87
|
-
import { wrapButton as ae } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js";
|
|
27
|
+
import { ImageTitlePlugin as Rt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js";
|
|
28
|
+
import { LinkInput as Ft } from "./components/Link/LinkInput.es.js";
|
|
29
|
+
import { LinkPlugin as Dt, createLinkPlugin as It } from "./components/RichTextEditor/plugins/LinkPlugin/index.es.js";
|
|
30
|
+
import { LinkSelector as Ot } from "./components/Link/LinkSelector/LinkSelector.es.js";
|
|
31
|
+
import { MultiFlyoutContextProvider as Ht, useMultiFlyoutContext as vt } from "./components/BlockItemWrapper/Toolbar/context/MultiFlyoutContext.es.js";
|
|
32
|
+
import { OrderedListPlugin as Vt } from "./components/RichTextEditor/plugins/OrderedListPlugin/index.es.js";
|
|
33
|
+
import { PARAGRAPH_CLASSES as jt, ParagraphMarkupElement as Qt, ParagraphMarkupElementNode as Kt, ParagraphPlugin as Xt, createParagraphPlugin as Yt } from "./components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js";
|
|
34
|
+
import { QuoteMarkupElementNode as zt, QuotePlugin as Jt, createQuotePlugin as Zt } from "./components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js";
|
|
35
|
+
import { RichTextEditor as tr } from "./components/RichTextEditor/RichTextEditor.es.js";
|
|
36
|
+
import { THEME_PREFIX as er } from "./components/RichTextEditor/constants.es.js";
|
|
37
|
+
import { Toolbar as nr } from "./components/BlockItemWrapper/Toolbar/Toolbar.es.js";
|
|
38
|
+
import { UnorderedListPlugin as ar } from "./components/RichTextEditor/plugins/UnorderedListPlugin/index.es.js";
|
|
39
|
+
import { addHttps as gr } from "./helpers/addHttps.es.js";
|
|
40
|
+
import { convertToRteValue as lr } from "./helpers/convertToRichTextValue.es.js";
|
|
41
|
+
import { createButtonNode as ur } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js";
|
|
42
|
+
import { getBackgroundColorStyles as sr } from "./utilities/react/getBackgroundColorStyles.es.js";
|
|
43
|
+
import { getBackgroundSettings as Pr } from "./settings/background.es.js";
|
|
44
|
+
import { getBorderRadiusSettings as Tr, getBorderRadiusSlider as Br } from "./settings/borderRadius.es.js";
|
|
45
|
+
import { getBorderSettings as yr } from "./settings/border.es.js";
|
|
46
|
+
import { getBorderStyles as Ar } from "./utilities/react/getBorderStyles.es.js";
|
|
47
|
+
import { getDefaultPluginsWithLinkChooser as hr } from "./components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js";
|
|
48
|
+
import { getExtendedBorderRadiusSettings as kr } from "./settings/borderRadiusExtended.es.js";
|
|
49
|
+
import { getGutterSettings as Cr } from "./settings/gutter.es.js";
|
|
50
|
+
import { getLegacyUrl as _r, getLinkFromEditor as Fr, getUrl as br, getUrlFromLinkOrLegacyLink as Dr } from "./components/Link/utils/getUrl.es.js";
|
|
51
|
+
import { getMarginExtendedSettings as Nr } from "./settings/marginExtended.es.js";
|
|
52
|
+
import { getMarginSettings as Gr, getMarginSlider as Hr } from "./settings/margin.es.js";
|
|
53
|
+
import { getPaddingExtendedSettings as wr } from "./settings/paddingExtended.es.js";
|
|
54
|
+
import { getPaddingSettings as Wr, getPaddingSlider as jr } from "./settings/padding.es.js";
|
|
55
|
+
import { getRadiusStyles as Kr } from "./utilities/react/getRadiusStyles.es.js";
|
|
56
|
+
import { getReadableColor as Yr } from "./utilities/color/getReadableColor.es.js";
|
|
57
|
+
import { getSecurityDownloadableSetting as zr, getSecurityGlobalControlId as Jr } from "./settings/securityDownloadable.es.js";
|
|
58
|
+
import { getSecurityGlobalControlSetting as $r } from "./settings/securityGlobalControl.es.js";
|
|
59
|
+
import { getUrlFromEditor as re } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js";
|
|
60
|
+
import { hasRichTextValue as oe } from "./helpers/hasRichTextValue.es.js";
|
|
61
|
+
import { insertButton as ie } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js";
|
|
62
|
+
import { isDark as pe } from "./utilities/color/isDark.es.js";
|
|
63
|
+
import { isDownloadable as me } from "./helpers/isDownloadable.es.js";
|
|
64
|
+
import { isValidUrl as xe, isValidUrlOrEmpty as ue } from "./components/Link/utils/url.es.js";
|
|
65
|
+
import { joinClassNames as se } from "./utilities/react/joinClassNames.es.js";
|
|
66
|
+
import { relativeUrlRegex as Pe } from "./components/Link/utils/relativeUrlRegex.es.js";
|
|
67
|
+
import { setAlpha as Te } from "./utilities/color/setAlpha.es.js";
|
|
68
|
+
import { submitFloatingButton as ce } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js";
|
|
69
|
+
import { toColorObject as Ee } from "./utilities/color/toColorObject.es.js";
|
|
70
|
+
import { toHex8String as Le } from "./utilities/color/toHex8String.es.js";
|
|
71
|
+
import { toHexString as Me } from "./utilities/color/toHexString.es.js";
|
|
72
|
+
import { toRgbaString as Ue } from "./utilities/color/toRgbaString.es.js";
|
|
73
|
+
import { toShortRgba as Re } from "./utilities/color/toShortRgba.es.js";
|
|
74
|
+
import { triggerFloatingButton as Fe } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js";
|
|
75
|
+
import { triggerFloatingButtonEdit as De } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js";
|
|
76
|
+
import { triggerFloatingButtonInsert as Ne } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js";
|
|
77
|
+
import { unwrapButton as Ge } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js";
|
|
78
|
+
import { upsertButton as ve } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js";
|
|
79
|
+
import { upsertButtonText as Ve } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js";
|
|
80
|
+
import { useMultiFlyoutState as je } from "./components/BlockItemWrapper/Toolbar/hooks/useMultiFlyoutState.es.js";
|
|
81
|
+
import { withButton as Ke } from "./components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js";
|
|
82
|
+
import { wrapButton as Ye } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js";
|
|
88
83
|
var r = /* @__PURE__ */ ((t) => (t.Main = "main", t.Basics = "basics", t.Layout = "layout", t.Style = "style", t.Security = "security", t.Targets = "targets", t))(r || {});
|
|
89
|
-
const
|
|
84
|
+
const o = (t) => t, n = (t) => t;
|
|
90
85
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
g as AllTextStylePlugins,
|
|
87
|
+
m as AllTextStyles,
|
|
93
88
|
f as AttachmentOperationsProvider,
|
|
94
89
|
c as Attachments,
|
|
95
90
|
s as AttachmentsProvider,
|
|
96
|
-
|
|
91
|
+
E as AttachmentsToolbarButton,
|
|
97
92
|
h as BUTTON_PLUGIN,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
R as BlockButtonStyles,
|
|
94
|
+
F as BlockInjectButton,
|
|
95
|
+
D as BlockItemWrapper,
|
|
101
96
|
N as BlockStyles,
|
|
102
|
-
|
|
97
|
+
H as BorderStyle,
|
|
103
98
|
J as BreakAfterPlugin,
|
|
104
99
|
M as ButtonPlugin,
|
|
105
100
|
rt as Custom1Plugin,
|
|
106
|
-
|
|
101
|
+
ot as Custom2Plugin,
|
|
107
102
|
it as Custom3Plugin,
|
|
108
|
-
|
|
103
|
+
A as DEFAULT_ATTACHMENTS_BUTTON_ID,
|
|
109
104
|
pt as DEFAULT_DRAGGING_TOOLTIP,
|
|
110
|
-
|
|
105
|
+
gt as DEFAULT_DRAG_TOOLTIP,
|
|
111
106
|
lt as DEFAULT_MENU_BUTTON_ID,
|
|
112
|
-
ft as
|
|
113
|
-
dt as
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
ct as FlyoutToolbarButton,
|
|
107
|
+
ft as DragHandleToolbarButton,
|
|
108
|
+
dt as DragPreviewContextProvider,
|
|
109
|
+
k as ELEMENT_BUTTON,
|
|
110
|
+
Tt as FlyoutToolbarButton,
|
|
117
111
|
Z as GAP_DEFAULT,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
v as GutterSpacing,
|
|
113
|
+
ct as Heading1Plugin,
|
|
114
|
+
Et as Heading2Plugin,
|
|
115
|
+
Lt as Heading3Plugin,
|
|
116
|
+
Mt as Heading4Plugin,
|
|
123
117
|
Ut as ImageCaptionPlugin,
|
|
124
|
-
|
|
118
|
+
Rt as ImageTitlePlugin,
|
|
125
119
|
$ as KEY_ELEMENT_BREAK_AFTER_COLUMN,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
Ft as LinkInput,
|
|
121
|
+
Dt as LinkPlugin,
|
|
122
|
+
Ot as LinkSelector,
|
|
129
123
|
w as Margin,
|
|
130
124
|
xt as MenuToolbarButton,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
125
|
+
Ht as MultiFlyoutContextProvider,
|
|
126
|
+
Vt as OrderedListPlugin,
|
|
127
|
+
jt as PARAGRAPH_CLASSES,
|
|
134
128
|
V as Padding,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
129
|
+
Qt as ParagraphMarkupElement,
|
|
130
|
+
Kt as ParagraphMarkupElementNode,
|
|
131
|
+
Xt as ParagraphPlugin,
|
|
132
|
+
zt as QuoteMarkupElementNode,
|
|
133
|
+
Jt as QuotePlugin,
|
|
140
134
|
W as Radius,
|
|
141
|
-
|
|
135
|
+
tr as RichTextEditor,
|
|
142
136
|
r as Sections,
|
|
143
137
|
j as Security,
|
|
144
|
-
|
|
138
|
+
er as THEME_PREFIX,
|
|
145
139
|
l as TextStylePluginsWithoutImage,
|
|
146
140
|
O as TextStyles,
|
|
147
141
|
x as TextStylesWithoutImage,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
nr as Toolbar,
|
|
143
|
+
ar as UnorderedListPlugin,
|
|
144
|
+
gr as addHttps,
|
|
151
145
|
Q as borderStyleMap,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
e as defineBlock,
|
|
146
|
+
lr as convertToRteValue,
|
|
147
|
+
ur as createButtonNode,
|
|
148
|
+
U as createButtonPlugin,
|
|
149
|
+
It as createLinkPlugin,
|
|
150
|
+
Yt as createParagraphPlugin,
|
|
151
|
+
Zt as createQuotePlugin,
|
|
152
|
+
o as defineBlock,
|
|
160
153
|
n as defineSettings,
|
|
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
|
-
|
|
154
|
+
sr as getBackgroundColorStyles,
|
|
155
|
+
Pr as getBackgroundSettings,
|
|
156
|
+
Tr as getBorderRadiusSettings,
|
|
157
|
+
Br as getBorderRadiusSlider,
|
|
158
|
+
yr as getBorderSettings,
|
|
159
|
+
Ar as getBorderStyles,
|
|
160
|
+
hr as getDefaultPluginsWithLinkChooser,
|
|
161
|
+
kr as getExtendedBorderRadiusSettings,
|
|
162
|
+
Cr as getGutterSettings,
|
|
163
|
+
_r as getLegacyUrl,
|
|
164
|
+
Fr as getLinkFromEditor,
|
|
165
|
+
Nr as getMarginExtendedSettings,
|
|
166
|
+
Gr as getMarginSettings,
|
|
167
|
+
Hr as getMarginSlider,
|
|
168
|
+
wr as getPaddingExtendedSettings,
|
|
169
|
+
Wr as getPaddingSettings,
|
|
170
|
+
jr as getPaddingSlider,
|
|
171
|
+
Kr as getRadiusStyles,
|
|
172
|
+
Yr as getReadableColor,
|
|
173
|
+
zr as getSecurityDownloadableSetting,
|
|
174
|
+
Jr as getSecurityGlobalControlId,
|
|
175
|
+
$r as getSecurityGlobalControlSetting,
|
|
176
|
+
br as getUrl,
|
|
177
|
+
re as getUrlFromEditor,
|
|
178
|
+
Dr as getUrlFromLinkOrLegacyLink,
|
|
186
179
|
K as gutterSpacingStyleMap,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
yo as mapAppBridgeColorPaletteToFonduePalette,
|
|
195
|
-
Ao as mapAppBridgeColorPalettesToFonduePalettes,
|
|
180
|
+
oe as hasRichTextValue,
|
|
181
|
+
ie as insertButton,
|
|
182
|
+
pe as isDark,
|
|
183
|
+
me as isDownloadable,
|
|
184
|
+
xe as isValidUrl,
|
|
185
|
+
ue as isValidUrlOrEmpty,
|
|
186
|
+
se as joinClassNames,
|
|
196
187
|
X as marginStyleMap,
|
|
197
|
-
Lo as moveItemInArray,
|
|
198
188
|
Y as paddingStyleMap,
|
|
199
189
|
q as radiusStyleMap,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
190
|
+
Pe as relativeUrlRegex,
|
|
191
|
+
Te as setAlpha,
|
|
192
|
+
ce as submitFloatingButton,
|
|
193
|
+
Ee as toColorObject,
|
|
194
|
+
Le as toHex8String,
|
|
195
|
+
Me as toHexString,
|
|
196
|
+
Ue as toRgbaString,
|
|
197
|
+
Re as toShortRgba,
|
|
198
|
+
Fe as triggerFloatingButton,
|
|
199
|
+
De as triggerFloatingButtonEdit,
|
|
200
|
+
Ne as triggerFloatingButtonInsert,
|
|
201
|
+
Ge as unwrapButton,
|
|
202
|
+
ve as upsertButton,
|
|
203
|
+
Ve as upsertButtonText,
|
|
214
204
|
d as useAttachmentOperations,
|
|
215
205
|
P as useAttachments,
|
|
216
206
|
S as useAttachmentsContext,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
ae as wrapButton
|
|
207
|
+
Pt as useDragPreviewContext,
|
|
208
|
+
vt as useMultiFlyoutContext,
|
|
209
|
+
je as useMultiFlyoutState,
|
|
210
|
+
T as withAttachmentsProvider,
|
|
211
|
+
Ke as withButton,
|
|
212
|
+
Ye as wrapButton
|
|
224
213
|
};
|
|
225
214
|
//# 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 AppBridgeBlock } from '@frontify/app-bridge';\nimport {\n type AssetInputBlock as AssetInputBlockSidebarSettings,\n type BaseBlock as BaseBlockSidebarSettings,\n type Bundle as BundleSidebarSettings,\n type ChecklistBlock as ChecklistBlockSidebarSettings,\n type ChoicesType as ChoicesTypeSidebarSettings,\n type ColorInputBlock as ColorInputBlockSidebarSettings,\n type DropdownBlock as DropdownBlockSidebarSettings,\n type DynamicSettingBlock as DynamicSettingBlockSidebarSettings,\n type DynamicSupportedBlock as DynamicSupportedBlockSidebarSettings,\n type FontInputBlock as FontInputBlockSidebarSettings,\n type InputBlock as InputBlockSidebarSettings,\n type LegacyAssetInputBlock as LegacyAssetInputBlockSidebarSettings,\n type LinkBlock as LinkBlockSidebarSettings,\n type LinkChooserBlock as LinkChooserBlockSidebarSettings,\n type MultiInputBlock as MultiInputBlockSidebarSettings,\n type NotificationBlock as NotificationBlockSidebarSettings,\n type SectionHeadingBlock as SectionHeadingBlockSidebarSettings,\n type SegmentedControlsBlock as SegmentedControlsBlockSidebarSettings,\n type SettingBlock as SettingBlockSidebarSettings,\n type SimpleSettingBlock as SimpleSettingBlockSidebarSettings,\n type SwitchBlock as SwitchBlockSidebarSettings,\n type TemplateInputBlock as TemplateInputBlockSidebarSettings,\n type TextareaBlock as TextareaBlockSidebarSettings,\n type ValueOrPromisedValue as ValueOrPromisedValueSidebarSettings,\n} from '@frontify/sidebar-settings';\nimport { type FC } from 'react';\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/document/2569#/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/document/2569#/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/document/2569#/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/document/2569#/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/document/2569#/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 AppBridgeBlock } from '@frontify/app-bridge';\nimport {\n type AssetInputBlock as AssetInputBlockSidebarSettings,\n type BaseBlock as BaseBlockSidebarSettings,\n type Bundle as BundleSidebarSettings,\n type ChecklistBlock as ChecklistBlockSidebarSettings,\n type ChoicesType as ChoicesTypeSidebarSettings,\n type ColorInputBlock as ColorInputBlockSidebarSettings,\n type DropdownBlock as DropdownBlockSidebarSettings,\n type DynamicSettingBlock as DynamicSettingBlockSidebarSettings,\n type DynamicSupportedBlock as DynamicSupportedBlockSidebarSettings,\n type FontInputBlock as FontInputBlockSidebarSettings,\n type InputBlock as InputBlockSidebarSettings,\n type LegacyAssetInputBlock as LegacyAssetInputBlockSidebarSettings,\n type LinkBlock as LinkBlockSidebarSettings,\n type LinkChooserBlock as LinkChooserBlockSidebarSettings,\n type MultiInputBlock as MultiInputBlockSidebarSettings,\n type NotificationBlock as NotificationBlockSidebarSettings,\n type SectionHeadingBlock as SectionHeadingBlockSidebarSettings,\n type SegmentedControlsBlock as SegmentedControlsBlockSidebarSettings,\n type SettingBlock as SettingBlockSidebarSettings,\n type SimpleSettingBlock as SimpleSettingBlockSidebarSettings,\n type SwitchBlock as SwitchBlockSidebarSettings,\n type TemplateInputBlock as TemplateInputBlockSidebarSettings,\n type TextareaBlock as TextareaBlockSidebarSettings,\n type ValueOrPromisedValue as ValueOrPromisedValueSidebarSettings,\n} from '@frontify/sidebar-settings';\nimport { type FC } from 'react';\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/document/2569#/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/document/2569#/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/document/2569#/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/document/2569#/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/document/2569#/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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DO,IAAKA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,UAAU,WANFA,IAAAA,KAAA,CAAA,CAAA;AAyDL,MAAMC,IAAc,CAACC,MAAiDA,GAMhEC,IAAiB,CAM1BC,MACIA;"}
|