@frontify/guideline-blocks-settings 0.29.16 → 0.30.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 +24 -0
- package/dist/components/Attachments/AttachmentItem.es.js +73 -79
- package/dist/components/Attachments/AttachmentItem.es.js.map +1 -1
- package/dist/components/Attachments/Attachments.es.js +103 -96
- package/dist/components/Attachments/Attachments.es.js.map +1 -1
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js +21 -0
- package/dist/components/Attachments/AttachmentsButtonTrigger.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js +47 -43
- package/dist/components/BlockItemWrapper/BlockItemWrapper.es.js.map +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js +123 -0
- package/dist/components/BlockItemWrapper/Toolbar/Toolbar.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarAttachments.es.js +27 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarAttachments.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarAttachmentsTrigger.es.js +12 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarAttachmentsTrigger.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js +6 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js.map +1 -0
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js +26 -0
- package/dist/components/BlockItemWrapper/Toolbar/helpers.es.js.map +1 -0
- package/dist/hooks/useAttachments.es.js +43 -20
- package/dist/hooks/useAttachments.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 +84 -15
- package/dist/index.es.js +103 -100
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/components/Attachments/AttachmentItem.tsx +2 -13
- package/src/components/Attachments/Attachments.tsx +30 -15
- package/src/components/Attachments/AttachmentsButtonTrigger.tsx +22 -0
- package/src/components/Attachments/types.ts +10 -2
- package/src/components/BlockItemWrapper/BlockItemWrapper.tsx +23 -20
- package/src/components/BlockItemWrapper/Toolbar/Toolbar.spec.tsx +127 -0
- package/src/components/BlockItemWrapper/Toolbar/Toolbar.tsx +133 -0
- package/src/components/BlockItemWrapper/Toolbar/ToolbarAttachments.tsx +29 -0
- package/src/components/BlockItemWrapper/Toolbar/ToolbarAttachmentsTrigger.tsx +14 -0
- package/src/components/BlockItemWrapper/Toolbar/ToolbarSegment.tsx +9 -0
- package/src/components/BlockItemWrapper/Toolbar/helpers.ts +33 -0
- package/src/components/BlockItemWrapper/Toolbar/index.ts +4 -0
- package/src/components/BlockItemWrapper/Toolbar/types.ts +38 -0
- package/src/components/BlockItemWrapper/types.ts +11 -34
- package/src/hooks/{useAttachments.spec.ts → useAttachments.spec.tsx} +55 -4
- package/src/hooks/useAttachments.tsx +95 -0
- package/dist/components/BlockItemWrapper/Toolbar.es.js +0 -117
- package/dist/components/BlockItemWrapper/Toolbar.es.js.map +0 -1
- package/src/components/BlockItemWrapper/Toolbar.tsx +0 -133
- package/src/hooks/useAttachments.ts +0 -46
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import type { AppBridgeTheme } from '@frontify/app-bridge';
|
|
|
6
6
|
import { Asset } from '@frontify/app-bridge';
|
|
7
7
|
import type { AssetInputBlock as AssetInputBlock_2 } from '@frontify/sidebar-settings';
|
|
8
8
|
import type { BaseBlock as BaseBlock_2 } from '@frontify/sidebar-settings';
|
|
9
|
+
import { BlockContext } from '@frontify/app-bridge';
|
|
10
|
+
import { BlockState } from '@frontify/app-bridge';
|
|
9
11
|
import type { Bundle as Bundle_2 } from '@frontify/sidebar-settings';
|
|
10
12
|
import { ButtonSize } from '@frontify/fondue';
|
|
11
13
|
import { CheckboxState } from '@frontify/fondue';
|
|
@@ -41,7 +43,7 @@ import { PluginComposer } from '@frontify/fondue';
|
|
|
41
43
|
import { PluginProps } from '@frontify/fondue';
|
|
42
44
|
import { RangeBeforeOptions } from '@udecode/plate';
|
|
43
45
|
import { ReactElement } from 'react';
|
|
44
|
-
import
|
|
46
|
+
import { ReactNode } from 'react';
|
|
45
47
|
import type { SectionHeadingBlock as SectionHeadingBlock_2 } from '@frontify/sidebar-settings';
|
|
46
48
|
import type { SegmentedControlsBlock as SegmentedControlsBlock_2 } from '@frontify/sidebar-settings';
|
|
47
49
|
import { SensorDescriptor } from '@dnd-kit/core';
|
|
@@ -50,6 +52,7 @@ import type { SettingBlock as SettingBlock_2 } from '@frontify/sidebar-settings'
|
|
|
50
52
|
import type { SimpleSettingBlock as SimpleSettingBlock_2 } from '@frontify/sidebar-settings';
|
|
51
53
|
import type { SwitchBlock as SwitchBlock_2 } from '@frontify/sidebar-settings';
|
|
52
54
|
import type { TemplateInputBlock as TemplateInputBlock_2 } from '@frontify/sidebar-settings';
|
|
55
|
+
import { TemplateLegacy } from '@frontify/app-bridge';
|
|
53
56
|
import type { TextareaBlock as TextareaBlock_2 } from '@frontify/sidebar-settings';
|
|
54
57
|
import { TextStyleRenderElementProps } from '@frontify/fondue';
|
|
55
58
|
import { TLinkElement } from '@udecode/plate';
|
|
@@ -75,7 +78,7 @@ export declare type AttachmentItemProps = SortableAttachmentItemProps & {
|
|
|
75
78
|
isOverlay?: boolean;
|
|
76
79
|
};
|
|
77
80
|
|
|
78
|
-
export declare const Attachments: ({ items, onDelete, onReplaceWithBrowse, onReplaceWithUpload, onBrowse, onUpload, onSorted, appBridge, }: AttachmentsProps) => JSX_2.Element | null;
|
|
81
|
+
export declare const Attachments: ({ items, onDelete, onReplaceWithBrowse, onReplaceWithUpload, onBrowse, onUpload, onSorted, appBridge, triggerComponent: TriggerComponent, isOpen, onOpenChange, }: AttachmentsProps) => JSX_2.Element | null;
|
|
79
82
|
|
|
80
83
|
export declare type AttachmentsProps = {
|
|
81
84
|
items?: Asset[];
|
|
@@ -86,6 +89,24 @@ export declare type AttachmentsProps = {
|
|
|
86
89
|
onUpload: (uploadedAttachments: Asset[]) => Promise<void>;
|
|
87
90
|
onBrowse: (browserAttachments: Asset[]) => void;
|
|
88
91
|
onSorted: (sortedAttachments: Asset[]) => void;
|
|
92
|
+
triggerComponent?: (props: AttachmentsTriggerProps) => JSX.Element;
|
|
93
|
+
} & ({
|
|
94
|
+
isOpen?: never;
|
|
95
|
+
onOpenChange?: never;
|
|
96
|
+
} | {
|
|
97
|
+
isOpen: boolean;
|
|
98
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export declare const AttachmentsProvider: ({ appBridge, children, assetId, }: {
|
|
102
|
+
appBridge: AppBridgeBlock;
|
|
103
|
+
children: ReactNode;
|
|
104
|
+
assetId: string;
|
|
105
|
+
}) => JSX_2.Element;
|
|
106
|
+
|
|
107
|
+
export declare type AttachmentsTriggerProps = {
|
|
108
|
+
children: ReactNode;
|
|
109
|
+
isFlyoutOpen: boolean;
|
|
89
110
|
};
|
|
90
111
|
|
|
91
112
|
/**
|
|
@@ -168,7 +189,7 @@ export declare type BlockInjectButtonProps = {
|
|
|
168
189
|
verticalLayout?: boolean;
|
|
169
190
|
};
|
|
170
191
|
|
|
171
|
-
export declare const BlockItemWrapper: ({ children, toolbarFlyoutItems, toolbarItems, shouldHideWrapper, shouldHideComponent, isDragging, shouldFillContainer, outlineOffset, shouldBeShown, }: BlockItemWrapperProps) => ReactElement;
|
|
192
|
+
export declare const BlockItemWrapper: ({ children, toolbarFlyoutItems, toolbarItems, shouldHideWrapper, shouldHideComponent, isDragging, shouldFillContainer, outlineOffset, shouldBeShown, showAttachments, }: BlockItemWrapperProps) => ReactElement;
|
|
172
193
|
|
|
173
194
|
export declare type BlockItemWrapperProps = {
|
|
174
195
|
children: ReactNode;
|
|
@@ -180,6 +201,12 @@ export declare type BlockItemWrapperProps = {
|
|
|
180
201
|
shouldFillContainer?: boolean;
|
|
181
202
|
outlineOffset?: number;
|
|
182
203
|
shouldBeShown?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* When set to true the BlockItemWrapper must be a child of a {@link AttachmentsProvider} component,
|
|
206
|
+
* or the block must be wrapped with a {@link withAttachmentsProvider} HOC.
|
|
207
|
+
* @default false
|
|
208
|
+
*/
|
|
209
|
+
showAttachments?: boolean;
|
|
183
210
|
};
|
|
184
211
|
|
|
185
212
|
export declare type BlockProps = {
|
|
@@ -404,7 +431,7 @@ export declare type DynamicSupportedBlock = DynamicSupportedBlock_2<AppBridgeBlo
|
|
|
404
431
|
|
|
405
432
|
export declare const ELEMENT_BUTTON = "button";
|
|
406
433
|
|
|
407
|
-
|
|
434
|
+
declare type FlyoutToolbarItem = {
|
|
408
435
|
title: string;
|
|
409
436
|
onClick: () => void;
|
|
410
437
|
icon: JSX.Element;
|
|
@@ -839,6 +866,7 @@ export declare type SortableAttachmentItemProps = {
|
|
|
839
866
|
isLoading?: boolean;
|
|
840
867
|
onReplaceWithBrowse: () => void;
|
|
841
868
|
onReplaceWithUpload: (uploadedAsset: Asset) => void;
|
|
869
|
+
onDownload?: () => Promise<void>;
|
|
842
870
|
};
|
|
843
871
|
|
|
844
872
|
export declare const submitFloatingButton: <V extends Value>(editor: PlateEditor<V>) => true | undefined;
|
|
@@ -907,16 +935,7 @@ export declare const toHex8String: (color: Color) => string;
|
|
|
907
935
|
*/
|
|
908
936
|
export declare const toHexString: (color: Color) => string;
|
|
909
937
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
export declare type ToolbarProps = {
|
|
913
|
-
items: ToolbarItem[];
|
|
914
|
-
flyoutItems: FlyoutToolbarItem[][];
|
|
915
|
-
isFlyoutOpen: boolean;
|
|
916
|
-
setIsFlyoutOpen: (isOpen: boolean) => void;
|
|
917
|
-
isDragging?: boolean;
|
|
918
|
-
isFlyoutDisabled?: boolean;
|
|
919
|
-
};
|
|
938
|
+
declare type ToolbarItem = DraghandleToolbarItem | ButtonToolbarItem;
|
|
920
939
|
|
|
921
940
|
/**
|
|
922
941
|
* Maps color object of rgba values to rgba string.
|
|
@@ -988,17 +1007,67 @@ export declare type UpsertButtonOptions<V extends Value = Value> = CreateButtonN
|
|
|
988
1007
|
export declare const upsertButtonText: <V extends Value>(editor: PlateEditor<V>, { text }: UpsertButtonOptions<V>) => void;
|
|
989
1008
|
|
|
990
1009
|
export declare const useAttachments: (appBridge: AppBridgeBlock, assetId: string) => {
|
|
991
|
-
|
|
1010
|
+
onAttachmentsAdd: (newAssets: Asset[]) => Promise<void>;
|
|
992
1011
|
onAttachmentDelete: (assetToDelete: Asset) => Promise<void>;
|
|
993
1012
|
onAttachmentReplace: (attachmentToReplace: Asset, newAsset: Asset) => Promise<void>;
|
|
994
1013
|
onAttachmentsSorted: (assets: Asset[]) => Promise<void>;
|
|
995
1014
|
attachments: Asset[];
|
|
1015
|
+
appBridge: AppBridgeBlock<BlockState, BlockContext, {
|
|
1016
|
+
assetsChosen: {
|
|
1017
|
+
assets: Asset[];
|
|
1018
|
+
};
|
|
1019
|
+
templateChosen: {
|
|
1020
|
+
template: TemplateLegacy;
|
|
1021
|
+
};
|
|
1022
|
+
"State.settings": [Record<string, unknown>, Record<string, unknown>];
|
|
1023
|
+
"State.assets": [Record<string, unknown>, Record<string, unknown>];
|
|
1024
|
+
"State.templates": [Record<string, unknown>, Record<string, unknown>];
|
|
1025
|
+
"State.*": [BlockState, BlockState];
|
|
1026
|
+
"Context.portalId": [number, number];
|
|
1027
|
+
"Context.blockId": [number, number];
|
|
1028
|
+
"Context.sectionId"?: [number | undefined, number | undefined] | undefined;
|
|
1029
|
+
"Context.*": [BlockContext, BlockContext];
|
|
1030
|
+
}>;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
export declare const useAttachmentsContext: () => {
|
|
1034
|
+
onAttachmentsAdd: (newAssets: Asset[]) => Promise<void>;
|
|
1035
|
+
onAttachmentDelete: (assetToDelete: Asset) => Promise<void>;
|
|
1036
|
+
onAttachmentReplace: (attachmentToReplace: Asset, newAsset: Asset) => Promise<void>;
|
|
1037
|
+
onAttachmentsSorted: (assets: Asset[]) => Promise<void>;
|
|
1038
|
+
attachments: Asset[];
|
|
1039
|
+
appBridge: AppBridgeBlock<BlockState, BlockContext, {
|
|
1040
|
+
assetsChosen: {
|
|
1041
|
+
assets: Asset[];
|
|
1042
|
+
};
|
|
1043
|
+
templateChosen: {
|
|
1044
|
+
template: TemplateLegacy;
|
|
1045
|
+
};
|
|
1046
|
+
"State.settings": [Record<string, unknown>, Record<string, unknown>];
|
|
1047
|
+
"State.assets": [Record<string, unknown>, Record<string, unknown>];
|
|
1048
|
+
"State.templates": [Record<string, unknown>, Record<string, unknown>];
|
|
1049
|
+
"State.*": [BlockState, BlockState];
|
|
1050
|
+
"Context.portalId": [number, number];
|
|
1051
|
+
"Context.blockId": [number, number];
|
|
1052
|
+
"Context.sectionId"?: [number | undefined, number | undefined] | undefined;
|
|
1053
|
+
"Context.*": [BlockContext, BlockContext];
|
|
1054
|
+
}>;
|
|
996
1055
|
};
|
|
997
1056
|
|
|
998
1057
|
export declare const useDndSensors: (columnGap?: number, rowGap?: number) => SensorDescriptor<SensorOptions>[];
|
|
999
1058
|
|
|
1000
1059
|
export declare type ValueOrPromisedValue<T> = ValueOrPromisedValue_2<AppBridgeBlock, T>;
|
|
1001
1060
|
|
|
1061
|
+
/**
|
|
1062
|
+
* Block-level HOC for cases when there is only one attachment asset field related to the block.
|
|
1063
|
+
* Recommended for most cases.
|
|
1064
|
+
* If finer control is required over attachments, use {@link AttachmentsProvider} component.
|
|
1065
|
+
*/
|
|
1066
|
+
export declare const withAttachmentsProvider: <T extends BlockProps>(Component: (props: T) => ReactNode, assetId: string) => {
|
|
1067
|
+
(props: T): JSX_2.Element;
|
|
1068
|
+
displayName: string;
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1002
1071
|
/**
|
|
1003
1072
|
* Insert space after a url to wrap a button.
|
|
1004
1073
|
* Lookup from the block start to the cursor to check if there is an url.
|
package/dist/index.es.js
CHANGED
|
@@ -3,12 +3,12 @@ export * from "@frontify/sidebar-settings";
|
|
|
3
3
|
import { BlockInjectButton as g } from "./components/BlockInjectButton/BlockInjectButton.es.js";
|
|
4
4
|
import { BlockItemWrapper as l } from "./components/BlockItemWrapper/BlockItemWrapper.es.js";
|
|
5
5
|
import { DEFAULT_DRAGGING_TOOLTIP as u, DEFAULT_DRAG_TOOLTIP as f } from "./components/BlockItemWrapper/constants.es.js";
|
|
6
|
-
import { Attachments as
|
|
6
|
+
import { Attachments as d } from "./components/Attachments/Attachments.es.js";
|
|
7
7
|
import { DownloadButton as P } from "./components/DownloadButton/DownloadButton.es.js";
|
|
8
|
-
import { RichTextEditor as
|
|
9
|
-
import { LinkPlugin as T, createLinkPlugin as
|
|
10
|
-
import { BUTTON_PLUGIN as
|
|
11
|
-
import { withButton as
|
|
8
|
+
import { RichTextEditor as B } from "./components/RichTextEditor/RichTextEditor.es.js";
|
|
9
|
+
import { LinkPlugin as T, createLinkPlugin as h } from "./components/RichTextEditor/plugins/LinkPlugin/index.es.js";
|
|
10
|
+
import { BUTTON_PLUGIN as k, ButtonPlugin as A, ELEMENT_BUTTON as L, createButtonPlugin as R } from "./components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js";
|
|
11
|
+
import { withButton as I } from "./components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js";
|
|
12
12
|
import { insertButton as F } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js";
|
|
13
13
|
import { submitFloatingButton as b } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js";
|
|
14
14
|
import { unwrapButton as D } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js";
|
|
@@ -23,16 +23,16 @@ import { triggerFloatingButtonInsert as Y } from "./components/RichTextEditor/pl
|
|
|
23
23
|
import { BlockButtonStyles as $ } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js";
|
|
24
24
|
import { Custom1Plugin as rt } from "./components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js";
|
|
25
25
|
import { Custom2Plugin as ot } from "./components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js";
|
|
26
|
-
import { Custom3Plugin as
|
|
27
|
-
import { Heading1Plugin as
|
|
26
|
+
import { Custom3Plugin as it } from "./components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js";
|
|
27
|
+
import { Heading1Plugin as pt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js";
|
|
28
28
|
import { Heading2Plugin as mt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js";
|
|
29
29
|
import { Heading3Plugin as xt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js";
|
|
30
30
|
import { Heading4Plugin as ft } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
31
|
-
import { ImageCaptionPlugin as
|
|
31
|
+
import { ImageCaptionPlugin as dt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js";
|
|
32
32
|
import { ImageTitlePlugin as Pt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js";
|
|
33
|
-
import { PARAGRAPH_CLASSES as
|
|
34
|
-
import { QuoteMarkupElementNode as
|
|
35
|
-
import { AllTextStylePlugins as
|
|
33
|
+
import { PARAGRAPH_CLASSES as Bt, ParagraphMarkupElement as yt, ParagraphMarkupElementNode as Tt, ParagraphPlugin as ht, createParagraphPlugin as Et } from "./components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js";
|
|
34
|
+
import { QuoteMarkupElementNode as At, QuotePlugin as Lt, createQuotePlugin as Rt } from "./components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js";
|
|
35
|
+
import { AllTextStylePlugins as It, AllTextStyles as Mt, TextStylePluginsWithoutImage as Ft, TextStylesWithoutImage as Ut } from "./components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js";
|
|
36
36
|
import { BlockStyles as Gt, TextStyles as Dt } from "./components/RichTextEditor/plugins/styles.es.js";
|
|
37
37
|
import { getDefaultPluginsWithLinkChooser as Nt } from "./components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js";
|
|
38
38
|
import { THEME_PREFIX as _t } from "./components/RichTextEditor/constants.es.js";
|
|
@@ -43,141 +43,142 @@ import { relativeUrlRegex as Kt } from "./components/Link/utils/relativeUrlRegex
|
|
|
43
43
|
import { isValidUrl as Zt, isValidUrlOrEmpty as $t } from "./components/Link/utils/url.es.js";
|
|
44
44
|
import { convertToRteValue as rr } from "./helpers/convertToRichTextValue.es.js";
|
|
45
45
|
import { customCoordinatesGetterFactory as or } from "./helpers/customCoordinatesGetterFactory.es.js";
|
|
46
|
-
import { hasRichTextValue as
|
|
47
|
-
import { isDownloadable as
|
|
46
|
+
import { hasRichTextValue as ir } from "./helpers/hasRichTextValue.es.js";
|
|
47
|
+
import { isDownloadable as pr } from "./helpers/isDownloadable.es.js";
|
|
48
48
|
import { mapAppBridgeColorPaletteToFonduePalette as mr, mapAppBridgeColorPalettesToFonduePalettes as lr } from "./helpers/mapColorPalettes.es.js";
|
|
49
49
|
import { addHttps as ur } from "./helpers/addHttps.es.js";
|
|
50
|
-
import { useAttachments as dr } from "./hooks/useAttachments.es.js";
|
|
51
|
-
import { useDndSensors as
|
|
52
|
-
import { getBackgroundSettings as
|
|
53
|
-
import { getBorderSettings as
|
|
54
|
-
import { getBorderRadiusSettings as
|
|
55
|
-
import { getExtendedBorderRadiusSettings as
|
|
56
|
-
import { getGutterSettings as
|
|
57
|
-
import { getMarginSettings as
|
|
58
|
-
import { getMarginExtendedSettings as
|
|
59
|
-
import { getPaddingSettings as
|
|
60
|
-
import { getPaddingExtendedSettings as
|
|
61
|
-
import { BorderStyle as
|
|
62
|
-
import { getSecurityDownloadableSetting as
|
|
63
|
-
import { getSecurityGlobalControlSetting as
|
|
64
|
-
import { isDark as
|
|
65
|
-
import { toHex8String as
|
|
66
|
-
import { toHexString as
|
|
67
|
-
import { toRgbaString as
|
|
68
|
-
import { setAlpha as
|
|
69
|
-
import { toColorObject as
|
|
70
|
-
import { getReadableColor as
|
|
71
|
-
import { toShortRgba as
|
|
72
|
-
import { moveItemInArray as
|
|
73
|
-
import { getBackgroundColorStyles as
|
|
74
|
-
import { getBorderStyles as
|
|
75
|
-
import { getRadiusStyles as
|
|
76
|
-
import { joinClassNames as
|
|
50
|
+
import { AttachmentsProvider as sr, useAttachments as dr, useAttachmentsContext as Sr, withAttachmentsProvider as Pr } from "./hooks/useAttachments.es.js";
|
|
51
|
+
import { useDndSensors as Br } from "./hooks/useDndSensors.es.js";
|
|
52
|
+
import { getBackgroundSettings as Tr } from "./settings/background.es.js";
|
|
53
|
+
import { getBorderSettings as Er } from "./settings/border.es.js";
|
|
54
|
+
import { getBorderRadiusSettings as Ar, getBorderRadiusSlider as Lr } from "./settings/borderRadius.es.js";
|
|
55
|
+
import { getExtendedBorderRadiusSettings as Cr } from "./settings/borderRadiusExtended.es.js";
|
|
56
|
+
import { getGutterSettings as Mr } from "./settings/gutter.es.js";
|
|
57
|
+
import { getMarginSettings as Ur, getMarginSlider as br } from "./settings/margin.es.js";
|
|
58
|
+
import { getMarginExtendedSettings as Dr } from "./settings/marginExtended.es.js";
|
|
59
|
+
import { getPaddingSettings as Nr, getPaddingSlider as Or } from "./settings/padding.es.js";
|
|
60
|
+
import { getPaddingExtendedSettings as wr } from "./settings/paddingExtended.es.js";
|
|
61
|
+
import { BorderStyle as Vr, GutterSpacing as Wr, Margin as jr, Padding as Qr, Radius as Xr, Security as qr, borderStyleMap as zr, gutterSpacingStyleMap as Jr, marginStyleMap as Kr, paddingStyleMap as Yr, radiusStyleMap as Zr } from "./settings/types.es.js";
|
|
62
|
+
import { getSecurityDownloadableSetting as te, getSecurityGlobalControlId as re } from "./settings/securityDownloadable.es.js";
|
|
63
|
+
import { getSecurityGlobalControlSetting as oe } from "./settings/securityGlobalControl.es.js";
|
|
64
|
+
import { isDark as ie } from "./utilities/color/isDark.es.js";
|
|
65
|
+
import { toHex8String as pe } from "./utilities/color/toHex8String.es.js";
|
|
66
|
+
import { toHexString as me } from "./utilities/color/toHexString.es.js";
|
|
67
|
+
import { toRgbaString as xe } from "./utilities/color/toRgbaString.es.js";
|
|
68
|
+
import { setAlpha as fe } from "./utilities/color/setAlpha.es.js";
|
|
69
|
+
import { toColorObject as de } from "./utilities/color/toColorObject.es.js";
|
|
70
|
+
import { getReadableColor as Pe } from "./utilities/color/getReadableColor.es.js";
|
|
71
|
+
import { toShortRgba as Be } from "./utilities/color/toShortRgba.es.js";
|
|
72
|
+
import { moveItemInArray as Te } from "./utilities/moveItemInArray.es.js";
|
|
73
|
+
import { getBackgroundColorStyles as Ee } from "./utilities/react/getBackgroundColorStyles.es.js";
|
|
74
|
+
import { getBorderStyles as Ae } from "./utilities/react/getBorderStyles.es.js";
|
|
75
|
+
import { getRadiusStyles as Re } from "./utilities/react/getRadiusStyles.es.js";
|
|
76
|
+
import { joinClassNames as Ie } from "./utilities/react/joinClassNames.es.js";
|
|
77
77
|
var r = /* @__PURE__ */ ((t) => (t.Main = "main", t.Basics = "basics", t.Layout = "layout", t.Style = "style", t.Security = "security", t.Targets = "targets", t))(r || {});
|
|
78
78
|
const o = (t) => t, n = (t) => t;
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
It as AllTextStylePlugins,
|
|
81
81
|
Mt as AllTextStyles,
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
d as Attachments,
|
|
83
|
+
sr as AttachmentsProvider,
|
|
84
|
+
k as BUTTON_PLUGIN,
|
|
84
85
|
$ as BlockButtonStyles,
|
|
85
86
|
g as BlockInjectButton,
|
|
86
87
|
l as BlockItemWrapper,
|
|
87
88
|
Gt as BlockStyles,
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
Vr as BorderStyle,
|
|
90
|
+
A as ButtonPlugin,
|
|
90
91
|
rt as Custom1Plugin,
|
|
91
92
|
ot as Custom2Plugin,
|
|
92
|
-
|
|
93
|
+
it as Custom3Plugin,
|
|
93
94
|
u as DEFAULT_DRAGGING_TOOLTIP,
|
|
94
95
|
f as DEFAULT_DRAG_TOOLTIP,
|
|
95
96
|
P as DownloadButton,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
L as ELEMENT_BUTTON,
|
|
98
|
+
Wr as GutterSpacing,
|
|
99
|
+
pt as Heading1Plugin,
|
|
99
100
|
mt as Heading2Plugin,
|
|
100
101
|
xt as Heading3Plugin,
|
|
101
102
|
ft as Heading4Plugin,
|
|
102
|
-
|
|
103
|
+
dt as ImageCaptionPlugin,
|
|
103
104
|
Pt as ImageTitlePlugin,
|
|
104
105
|
Wt as LinkInput,
|
|
105
106
|
T as LinkPlugin,
|
|
106
107
|
vt as LinkSelector,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
jr as Margin,
|
|
109
|
+
Bt as PARAGRAPH_CLASSES,
|
|
110
|
+
Qr as Padding,
|
|
110
111
|
yt as ParagraphMarkupElement,
|
|
111
112
|
Tt as ParagraphMarkupElementNode,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
ht as ParagraphPlugin,
|
|
114
|
+
At as QuoteMarkupElementNode,
|
|
115
|
+
Lt as QuotePlugin,
|
|
116
|
+
Xr as Radius,
|
|
117
|
+
B as RichTextEditor,
|
|
117
118
|
r as Sections,
|
|
118
|
-
|
|
119
|
+
qr as Security,
|
|
119
120
|
_t as THEME_PREFIX,
|
|
120
121
|
Ft as TextStylePluginsWithoutImage,
|
|
121
122
|
Dt as TextStyles,
|
|
122
123
|
Ut as TextStylesWithoutImage,
|
|
123
124
|
ur as addHttps,
|
|
124
|
-
|
|
125
|
+
zr as borderStyleMap,
|
|
125
126
|
rr as convertToRteValue,
|
|
126
127
|
Q as createButtonNode,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
R as createButtonPlugin,
|
|
129
|
+
h as createLinkPlugin,
|
|
130
|
+
Et as createParagraphPlugin,
|
|
131
|
+
Rt as createQuotePlugin,
|
|
131
132
|
or as customCoordinatesGetterFactory,
|
|
132
133
|
o as defineBlock,
|
|
133
134
|
n as defineSettings,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
Ee as getBackgroundColorStyles,
|
|
136
|
+
Tr as getBackgroundSettings,
|
|
137
|
+
Ar as getBorderRadiusSettings,
|
|
138
|
+
Lr as getBorderRadiusSlider,
|
|
139
|
+
Er as getBorderSettings,
|
|
140
|
+
Ae as getBorderStyles,
|
|
140
141
|
Nt as getDefaultPluginsWithLinkChooser,
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
Cr as getExtendedBorderRadiusSettings,
|
|
143
|
+
Mr as getGutterSettings,
|
|
143
144
|
Qt as getLegacyUrl,
|
|
144
145
|
Xt as getLinkFromEditor,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
146
|
+
Dr as getMarginExtendedSettings,
|
|
147
|
+
Ur as getMarginSettings,
|
|
148
|
+
br as getMarginSlider,
|
|
149
|
+
wr as getPaddingExtendedSettings,
|
|
150
|
+
Nr as getPaddingSettings,
|
|
151
|
+
Or as getPaddingSlider,
|
|
152
|
+
Re as getRadiusStyles,
|
|
153
|
+
Pe as getReadableColor,
|
|
154
|
+
te as getSecurityDownloadableSetting,
|
|
155
|
+
re as getSecurityGlobalControlId,
|
|
156
|
+
oe as getSecurityGlobalControlSetting,
|
|
156
157
|
qt as getUrl,
|
|
157
158
|
W as getUrlFromEditor,
|
|
158
159
|
zt as getUrlFromLinkOrLegacyLink,
|
|
159
|
-
|
|
160
|
-
|
|
160
|
+
Jr as gutterSpacingStyleMap,
|
|
161
|
+
ir as hasRichTextValue,
|
|
161
162
|
F as insertButton,
|
|
162
|
-
|
|
163
|
-
|
|
163
|
+
ie as isDark,
|
|
164
|
+
pr as isDownloadable,
|
|
164
165
|
Zt as isValidUrl,
|
|
165
166
|
$t as isValidUrlOrEmpty,
|
|
166
|
-
|
|
167
|
+
Ie as joinClassNames,
|
|
167
168
|
mr as mapAppBridgeColorPaletteToFonduePalette,
|
|
168
169
|
lr as mapAppBridgeColorPalettesToFonduePalettes,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
Kr as marginStyleMap,
|
|
171
|
+
Te as moveItemInArray,
|
|
172
|
+
Yr as paddingStyleMap,
|
|
173
|
+
Zr as radiusStyleMap,
|
|
173
174
|
Kt as relativeUrlRegex,
|
|
174
|
-
|
|
175
|
+
fe as setAlpha,
|
|
175
176
|
b as submitFloatingButton,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
de as toColorObject,
|
|
178
|
+
pe as toHex8String,
|
|
179
|
+
me as toHexString,
|
|
180
|
+
xe as toRgbaString,
|
|
181
|
+
Be as toShortRgba,
|
|
181
182
|
q as triggerFloatingButton,
|
|
182
183
|
J as triggerFloatingButtonEdit,
|
|
183
184
|
Y as triggerFloatingButtonInsert,
|
|
@@ -185,8 +186,10 @@ export {
|
|
|
185
186
|
N as upsertButton,
|
|
186
187
|
_ as upsertButtonText,
|
|
187
188
|
dr as useAttachments,
|
|
188
|
-
Sr as
|
|
189
|
-
|
|
189
|
+
Sr as useAttachmentsContext,
|
|
190
|
+
Br as useDndSensors,
|
|
191
|
+
Pr as withAttachmentsProvider,
|
|
192
|
+
I as withButton,
|
|
190
193
|
v as wrapButton
|
|
191
194
|
};
|
|
192
195
|
//# sourceMappingURL=index.es.js.map
|