@frontify/guideline-blocks-settings 3.0.4 → 4.0.0-alpha.1
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/Link/LinkInput.es.js +38 -31
- package/dist/components/Link/LinkInput.es.js.map +1 -1
- package/dist/index.cjs.js +1 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +8 -27
- package/dist/index.es.js +92 -94
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/dist/components/Link/LinkSelector/DocumentLink.es.js +0 -47
- package/dist/components/Link/LinkSelector/DocumentLink.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js +0 -51
- package/dist/components/Link/LinkSelector/DocumentLinks.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/LinkSelector2.es.js +0 -77
- package/dist/components/Link/LinkSelector/LinkSelector2.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js +0 -11
- package/dist/components/Link/LinkSelector/LoadingIndicator.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/PageLink.es.js +0 -55
- package/dist/components/Link/LinkSelector/PageLink.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/PageLinks.es.js +0 -29
- package/dist/components/Link/LinkSelector/PageLinks.es.js.map +0 -1
- package/dist/components/Link/LinkSelector/SectionLink.es.js +0 -33
- package/dist/components/Link/LinkSelector/SectionLink.es.js.map +0 -1
- package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js +0 -6
- package/dist/components/Link/helpers/filterDocumentSectionsWithUnreadableTitles.es.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,9 +12,6 @@ import { Color } from '@frontify/sidebar-settings';
|
|
|
12
12
|
import { ColorInputBlock as ColorInputBlock_2 } from '@frontify/sidebar-settings';
|
|
13
13
|
import { CSSProperties } from 'react';
|
|
14
14
|
import { Dispatch } from 'react';
|
|
15
|
-
import { Document as Document_2 } from '@frontify/app-bridge';
|
|
16
|
-
import { DocumentPage } from '@frontify/app-bridge';
|
|
17
|
-
import { DocumentSection } from '@frontify/app-bridge';
|
|
18
15
|
import { DropdownBlock as DropdownBlock_2 } from '@frontify/sidebar-settings';
|
|
19
16
|
import { DynamicSettingBlock as DynamicSettingBlock_2 } from '@frontify/sidebar-settings';
|
|
20
17
|
import { DynamicSupportedBlock as DynamicSupportedBlock_2 } from '@frontify/sidebar-settings';
|
|
@@ -421,10 +418,6 @@ export declare const defineBlock: (config: BlockConfigExport) => BlockConfigExpo
|
|
|
421
418
|
*/
|
|
422
419
|
export declare const defineSettings: <T extends BlockSettingsStructureExport | (() => Promise<BlockSettingsStructureExport>) | (() => BlockSettingsStructureExport)>(settingsStructure: T) => T;
|
|
423
420
|
|
|
424
|
-
export declare type DocumentSectionWithTitle = Omit<DocumentSection, 'title'> & {
|
|
425
|
-
title: string;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
421
|
export declare const DragHandleToolbarButton: ({ tooltip, icon, setActivatorNodeRef, draggableProps, }: DragHandleToolbarButtonProps) => JSX_2.Element;
|
|
429
422
|
|
|
430
423
|
export declare type DragHandleToolbarButtonProps = {
|
|
@@ -631,11 +624,6 @@ export declare class ImageTitlePlugin extends Plugin_2 {
|
|
|
631
624
|
plugins(): PlatePlugin[];
|
|
632
625
|
}
|
|
633
626
|
|
|
634
|
-
export declare type InitiallyExpandedItems = {
|
|
635
|
-
documentId?: number;
|
|
636
|
-
pageId?: number;
|
|
637
|
-
};
|
|
638
|
-
|
|
639
627
|
export declare type InputBlock = InputBlock_2<AppBridgeBlock>;
|
|
640
628
|
|
|
641
629
|
export declare const insertButton: <V extends Value>(editor: PlateEditor<V>, createButtonNodeOptions: CreateButtonNodeOptions, options?: InsertNodesOptions<V>) => void;
|
|
@@ -692,17 +680,6 @@ export declare type LinkPluginProps = PluginProps & {
|
|
|
692
680
|
appBridge: AppBridgeBlock;
|
|
693
681
|
};
|
|
694
682
|
|
|
695
|
-
export declare const LinkSelector: ({ url, onUrlChange, buttonSize, getAllDocuments, getDocumentPagesByDocumentId, getDocumentSectionsByDocumentPageId, }: LinkSelectorProps) => ReactElement;
|
|
696
|
-
|
|
697
|
-
declare type LinkSelectorProps = {
|
|
698
|
-
url: string;
|
|
699
|
-
onUrlChange?: (value: string) => void;
|
|
700
|
-
buttonSize?: 'small' | 'medium' | 'large';
|
|
701
|
-
getAllDocuments: () => Promise<Document_2[]>;
|
|
702
|
-
getDocumentSectionsByDocumentPageId: (documentPageId: number) => Promise<DocumentSection[]>;
|
|
703
|
-
getDocumentPagesByDocumentId: (documentId: number) => Promise<DocumentPage[]>;
|
|
704
|
-
};
|
|
705
|
-
|
|
706
683
|
export declare enum Margin {
|
|
707
684
|
None = "None",
|
|
708
685
|
Small = "Small",
|
|
@@ -856,10 +833,6 @@ export declare type RichTextButtonStyle = 'primary' | 'secondary' | 'tertiary';
|
|
|
856
833
|
export declare const RichTextEditor: (props: RichTextEditorProps) => JSX_2.Element;
|
|
857
834
|
|
|
858
835
|
declare type RichTextEditorProps = {
|
|
859
|
-
/**
|
|
860
|
-
* @deprecated not needed anymore, handled automatically
|
|
861
|
-
*/
|
|
862
|
-
id?: string;
|
|
863
836
|
isEditing: boolean;
|
|
864
837
|
value?: string;
|
|
865
838
|
placeholder?: string;
|
|
@@ -1107,6 +1080,9 @@ export declare const useAttachments: (appBridge: AppBridgeBlock, attachmentKey:
|
|
|
1107
1080
|
templateChosen: {
|
|
1108
1081
|
template: TemplateLegacy;
|
|
1109
1082
|
};
|
|
1083
|
+
linkChosen: {
|
|
1084
|
+
url: string;
|
|
1085
|
+
};
|
|
1110
1086
|
"State.settings": [Record<string, unknown>, Record<string, unknown>];
|
|
1111
1087
|
"State.assets": [Record<string, unknown>, Record<string, unknown>];
|
|
1112
1088
|
"State.templates": [Record<string, unknown>, Record<string, unknown>];
|
|
@@ -1116,6 +1092,7 @@ export declare const useAttachments: (appBridge: AppBridgeBlock, attachmentKey:
|
|
|
1116
1092
|
"Context.sectionId"?: [number | undefined, number | undefined] | undefined;
|
|
1117
1093
|
"Context.isAuthenticated": [boolean, boolean];
|
|
1118
1094
|
"Context.isNewlyInserted": [boolean, boolean];
|
|
1095
|
+
"Context.assets"?: [Record<string, Asset[]> | undefined, Record<string, Asset[]> | undefined] | undefined;
|
|
1119
1096
|
"Context.*": [ BlockContext, BlockContext];
|
|
1120
1097
|
}>;
|
|
1121
1098
|
};
|
|
@@ -1133,6 +1110,9 @@ export declare const useAttachmentsContext: () => {
|
|
|
1133
1110
|
templateChosen: {
|
|
1134
1111
|
template: TemplateLegacy;
|
|
1135
1112
|
};
|
|
1113
|
+
linkChosen: {
|
|
1114
|
+
url: string;
|
|
1115
|
+
};
|
|
1136
1116
|
"State.settings": [Record<string, unknown>, Record<string, unknown>];
|
|
1137
1117
|
"State.assets": [Record<string, unknown>, Record<string, unknown>];
|
|
1138
1118
|
"State.templates": [Record<string, unknown>, Record<string, unknown>];
|
|
@@ -1142,6 +1122,7 @@ export declare const useAttachmentsContext: () => {
|
|
|
1142
1122
|
"Context.sectionId"?: [number | undefined, number | undefined] | undefined;
|
|
1143
1123
|
"Context.isAuthenticated": [boolean, boolean];
|
|
1144
1124
|
"Context.isNewlyInserted": [boolean, boolean];
|
|
1125
|
+
"Context.assets"?: [Record<string, Asset[]> | undefined, Record<string, Asset[]> | undefined] | undefined;
|
|
1145
1126
|
"Context.*": [ BlockContext, BlockContext];
|
|
1146
1127
|
}>;
|
|
1147
1128
|
};
|
package/dist/index.es.js
CHANGED
|
@@ -47,132 +47,130 @@ import { triggerFloatingButtonEdit as ge } from "./components/RichTextEditor/plu
|
|
|
47
47
|
import { triggerFloatingButtonInsert as _e } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js";
|
|
48
48
|
import { BlockButtonStyles as ve } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js";
|
|
49
49
|
import { BlockStyles as $, TextStyles as ye } from "./components/RichTextEditor/plugins/styles.es.js";
|
|
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 { getSecurityGlobalControlSetting as _t } from "./settings/securityGlobalControl.es.js";
|
|
50
|
+
import { LinkInput as be } from "./components/Link/LinkInput.es.js";
|
|
51
|
+
import { BUTTON_PLUGIN as xe, ButtonPlugin as Se, ELEMENT_BUTTON as Ce, createButtonPlugin as we } from "./components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js";
|
|
52
|
+
import { RichTextEditor as Te } from "./components/RichTextEditor/RichTextEditor.es.js";
|
|
53
|
+
import { LinkPlugin as Ee, createLinkPlugin as De } from "./components/RichTextEditor/plugins/LinkPlugin/index.es.js";
|
|
54
|
+
import { BreakAfterPlugin as Oe, GAP_DEFAULT as ke, KEY_ELEMENT_BREAK_AFTER_COLUMN as Ae } from "./components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js";
|
|
55
|
+
import { Custom1Plugin as je } from "./components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js";
|
|
56
|
+
import { Custom2Plugin as Me } from "./components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js";
|
|
57
|
+
import { Custom3Plugin as Ne } from "./components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js";
|
|
58
|
+
import { Heading1Plugin as Pe } from "./components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js";
|
|
59
|
+
import { Heading2Plugin as Fe } from "./components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js";
|
|
60
|
+
import { Heading3Plugin as Ie } from "./components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js";
|
|
61
|
+
import { Heading4Plugin as Le } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
62
|
+
import { ImageCaptionPlugin as Re } from "./components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js";
|
|
63
|
+
import { ImageTitlePlugin as ze } from "./components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js";
|
|
64
|
+
import { PARAGRAPH_CLASSES as Be, ParagraphMarkupElement as Ve, ParagraphMarkupElementNode as He, ParagraphPlugin as Ue, createParagraphPlugin as We } from "./components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js";
|
|
65
|
+
import { QuoteMarkupElementNode as Ge, QuotePlugin as Ke, createQuotePlugin as qe } from "./components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js";
|
|
66
|
+
import { AllTextStylePlugins as Je, AllTextStyles as Ye, TextStylePluginsWithoutImage as Xe, TextStylesWithoutImage as Ze } from "./components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js";
|
|
67
|
+
import { UnorderedListPlugin as Qe } from "./components/RichTextEditor/plugins/UnorderedListPlugin/index.es.js";
|
|
68
|
+
import { OrderedListPlugin as $e } from "./components/RichTextEditor/plugins/OrderedListPlugin/index.es.js";
|
|
69
|
+
import { getDefaultPluginsWithLinkChooser as et } from "./components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js";
|
|
70
|
+
import { THEME_PREFIX as tt } from "./components/RichTextEditor/constants.es.js";
|
|
71
|
+
import { getBackgroundSettings as nt } from "./settings/background.es.js";
|
|
72
|
+
import { getBorderSettings as rt } from "./settings/border.es.js";
|
|
73
|
+
import { getBorderRadiusSettings as it, getBorderRadiusSlider as at } from "./settings/borderRadius.es.js";
|
|
74
|
+
import { getExtendedBorderRadiusSettings as ot } from "./settings/borderRadiusExtended.es.js";
|
|
75
|
+
import { getGutterSettings as st } from "./settings/gutter.es.js";
|
|
76
|
+
import { getMarginSettings as ct, getMarginSlider as lt } from "./settings/margin.es.js";
|
|
77
|
+
import { getMarginExtendedSettings as ut } from "./settings/marginExtended.es.js";
|
|
78
|
+
import { getPaddingSettings as dt, getPaddingSlider as ft } from "./settings/padding.es.js";
|
|
79
|
+
import { getPaddingExtendedSettings as pt } from "./settings/paddingExtended.es.js";
|
|
80
|
+
import { getSecurityDownloadableSetting as mt, getSecurityGlobalControlId as ht } from "./settings/securityDownloadable.es.js";
|
|
81
|
+
import { getSecurityGlobalControlSetting as gt } from "./settings/securityGlobalControl.es.js";
|
|
83
82
|
export * from "@frontify/sidebar-settings";
|
|
84
83
|
//#region src/index.ts
|
|
85
|
-
var
|
|
86
|
-
AllTextStylePlugins: () =>
|
|
87
|
-
AllTextStyles: () =>
|
|
84
|
+
var _t = /* @__PURE__ */ e({
|
|
85
|
+
AllTextStylePlugins: () => Je,
|
|
86
|
+
AllTextStyles: () => Ye,
|
|
88
87
|
AttachmentOperationsProvider: () => k,
|
|
89
88
|
Attachments: () => F,
|
|
90
89
|
AttachmentsProvider: () => A,
|
|
91
90
|
AttachmentsToolbarButton: () => I,
|
|
92
|
-
BUTTON_PLUGIN: () =>
|
|
91
|
+
BUTTON_PLUGIN: () => xe,
|
|
93
92
|
BlockButtonStyles: () => ve,
|
|
94
93
|
BlockInjectButton: () => t,
|
|
95
94
|
BlockItemWrapper: () => G,
|
|
96
95
|
BlockStyles: () => $,
|
|
97
96
|
BorderStyle: () => d,
|
|
98
|
-
BreakAfterPlugin: () =>
|
|
99
|
-
ButtonPlugin: () =>
|
|
100
|
-
Custom1Plugin: () =>
|
|
101
|
-
Custom2Plugin: () =>
|
|
102
|
-
Custom3Plugin: () =>
|
|
97
|
+
BreakAfterPlugin: () => Oe,
|
|
98
|
+
ButtonPlugin: () => Se,
|
|
99
|
+
Custom1Plugin: () => je,
|
|
100
|
+
Custom2Plugin: () => Me,
|
|
101
|
+
Custom3Plugin: () => Ne,
|
|
103
102
|
DEFAULT_ATTACHMENTS_BUTTON_ID: () => L,
|
|
104
103
|
DEFAULT_DRAGGING_TOOLTIP: () => R,
|
|
105
104
|
DEFAULT_DRAG_TOOLTIP: () => z,
|
|
106
105
|
DEFAULT_MENU_BUTTON_ID: () => H,
|
|
107
106
|
DragHandleToolbarButton: () => B,
|
|
108
107
|
DragPreviewContextProvider: () => w,
|
|
109
|
-
ELEMENT_BUTTON: () =>
|
|
108
|
+
ELEMENT_BUTTON: () => Ce,
|
|
110
109
|
FlyoutToolbarButton: () => V,
|
|
111
|
-
GAP_DEFAULT: () =>
|
|
110
|
+
GAP_DEFAULT: () => ke,
|
|
112
111
|
GutterSpacing: () => f,
|
|
113
|
-
Heading1Plugin: () =>
|
|
114
|
-
Heading2Plugin: () =>
|
|
115
|
-
Heading3Plugin: () =>
|
|
116
|
-
Heading4Plugin: () =>
|
|
117
|
-
ImageCaptionPlugin: () =>
|
|
118
|
-
ImageTitlePlugin: () =>
|
|
119
|
-
KEY_ELEMENT_BREAK_AFTER_COLUMN: () =>
|
|
120
|
-
LinkInput: () =>
|
|
121
|
-
LinkPlugin: () =>
|
|
122
|
-
LinkSelector: () => be,
|
|
112
|
+
Heading1Plugin: () => Pe,
|
|
113
|
+
Heading2Plugin: () => Fe,
|
|
114
|
+
Heading3Plugin: () => Ie,
|
|
115
|
+
Heading4Plugin: () => Le,
|
|
116
|
+
ImageCaptionPlugin: () => Re,
|
|
117
|
+
ImageTitlePlugin: () => ze,
|
|
118
|
+
KEY_ELEMENT_BREAK_AFTER_COLUMN: () => Ae,
|
|
119
|
+
LinkInput: () => be,
|
|
120
|
+
LinkPlugin: () => Ee,
|
|
123
121
|
Margin: () => p,
|
|
124
122
|
MenuToolbarButton: () => U,
|
|
125
123
|
MultiFlyoutContextProvider: () => E,
|
|
126
|
-
OrderedListPlugin: () =>
|
|
127
|
-
PARAGRAPH_CLASSES: () =>
|
|
124
|
+
OrderedListPlugin: () => $e,
|
|
125
|
+
PARAGRAPH_CLASSES: () => Be,
|
|
128
126
|
Padding: () => m,
|
|
129
|
-
ParagraphMarkupElement: () =>
|
|
130
|
-
ParagraphMarkupElementNode: () =>
|
|
131
|
-
ParagraphPlugin: () =>
|
|
132
|
-
QuoteMarkupElementNode: () =>
|
|
133
|
-
QuotePlugin: () =>
|
|
127
|
+
ParagraphMarkupElement: () => Ve,
|
|
128
|
+
ParagraphMarkupElementNode: () => He,
|
|
129
|
+
ParagraphPlugin: () => Ue,
|
|
130
|
+
QuoteMarkupElementNode: () => Ge,
|
|
131
|
+
QuotePlugin: () => Ke,
|
|
134
132
|
Radius: () => h,
|
|
135
|
-
RichTextEditor: () =>
|
|
136
|
-
Sections: () =>
|
|
133
|
+
RichTextEditor: () => Te,
|
|
134
|
+
Sections: () => yt,
|
|
137
135
|
Security: () => g,
|
|
138
|
-
THEME_PREFIX: () =>
|
|
139
|
-
TextStylePluginsWithoutImage: () =>
|
|
136
|
+
THEME_PREFIX: () => tt,
|
|
137
|
+
TextStylePluginsWithoutImage: () => Xe,
|
|
140
138
|
TextStyles: () => ye,
|
|
141
|
-
TextStylesWithoutImage: () =>
|
|
139
|
+
TextStylesWithoutImage: () => Ze,
|
|
142
140
|
Toolbar: () => W,
|
|
143
|
-
UnorderedListPlugin: () =>
|
|
141
|
+
UnorderedListPlugin: () => Qe,
|
|
144
142
|
addHttps: () => re,
|
|
145
143
|
borderStyleMap: () => _,
|
|
146
144
|
convertToRteValue: () => q,
|
|
147
145
|
createButtonNode: () => me,
|
|
148
|
-
createButtonPlugin: () =>
|
|
149
|
-
createLinkPlugin: () =>
|
|
150
|
-
createParagraphPlugin: () =>
|
|
151
|
-
createQuotePlugin: () =>
|
|
152
|
-
defineBlock: () =>
|
|
153
|
-
defineSettings: () =>
|
|
146
|
+
createButtonPlugin: () => we,
|
|
147
|
+
createLinkPlugin: () => De,
|
|
148
|
+
createParagraphPlugin: () => We,
|
|
149
|
+
createQuotePlugin: () => qe,
|
|
150
|
+
defineBlock: () => bt,
|
|
151
|
+
defineSettings: () => xt,
|
|
154
152
|
getBackgroundColorStyles: () => u,
|
|
155
|
-
getBackgroundSettings: () =>
|
|
156
|
-
getBorderRadiusSettings: () =>
|
|
157
|
-
getBorderRadiusSlider: () =>
|
|
158
|
-
getBorderSettings: () =>
|
|
153
|
+
getBackgroundSettings: () => nt,
|
|
154
|
+
getBorderRadiusSettings: () => it,
|
|
155
|
+
getBorderRadiusSlider: () => at,
|
|
156
|
+
getBorderSettings: () => rt,
|
|
159
157
|
getBorderStyles: () => S,
|
|
160
|
-
getDefaultPluginsWithLinkChooser: () =>
|
|
161
|
-
getExtendedBorderRadiusSettings: () =>
|
|
162
|
-
getGutterSettings: () =>
|
|
158
|
+
getDefaultPluginsWithLinkChooser: () => et,
|
|
159
|
+
getExtendedBorderRadiusSettings: () => ot,
|
|
160
|
+
getGutterSettings: () => st,
|
|
163
161
|
getLegacyUrl: () => Y,
|
|
164
162
|
getLinkFromEditor: () => X,
|
|
165
|
-
getMarginExtendedSettings: () =>
|
|
166
|
-
getMarginSettings: () =>
|
|
167
|
-
getMarginSlider: () =>
|
|
168
|
-
getPaddingExtendedSettings: () =>
|
|
169
|
-
getPaddingSettings: () =>
|
|
170
|
-
getPaddingSlider: () =>
|
|
163
|
+
getMarginExtendedSettings: () => ut,
|
|
164
|
+
getMarginSettings: () => ct,
|
|
165
|
+
getMarginSlider: () => lt,
|
|
166
|
+
getPaddingExtendedSettings: () => pt,
|
|
167
|
+
getPaddingSettings: () => dt,
|
|
168
|
+
getPaddingSlider: () => ft,
|
|
171
169
|
getRadiusStyles: () => C,
|
|
172
170
|
getReadableColor: () => l,
|
|
173
|
-
getSecurityDownloadableSetting: () =>
|
|
174
|
-
getSecurityGlobalControlId: () =>
|
|
175
|
-
getSecurityGlobalControlSetting: () =>
|
|
171
|
+
getSecurityDownloadableSetting: () => mt,
|
|
172
|
+
getSecurityGlobalControlId: () => ht,
|
|
173
|
+
getSecurityGlobalControlSetting: () => gt,
|
|
176
174
|
getUrl: () => Z,
|
|
177
175
|
getUrlFromEditor: () => pe,
|
|
178
176
|
getUrlFromLinkOrLegacyLink: () => Q,
|
|
@@ -211,12 +209,12 @@ var vt = /* @__PURE__ */ e({
|
|
|
211
209
|
withButton: () => oe,
|
|
212
210
|
wrapButton: () => fe
|
|
213
211
|
});
|
|
214
|
-
import * as
|
|
215
|
-
ee(
|
|
216
|
-
var
|
|
212
|
+
import * as vt from "@frontify/sidebar-settings";
|
|
213
|
+
ee(_t, vt);
|
|
214
|
+
var yt = /* @__PURE__ */ function(e) {
|
|
217
215
|
return e.Main = "main", e.Basics = "basics", e.Layout = "layout", e.Style = "style", e.Security = "security", e.Targets = "targets", e;
|
|
218
|
-
}({}),
|
|
216
|
+
}({}), bt = (e) => e, xt = (e) => e;
|
|
219
217
|
//#endregion
|
|
220
|
-
export {
|
|
218
|
+
export { Je as AllTextStylePlugins, Ye as AllTextStyles, k as AttachmentOperationsProvider, F as Attachments, A as AttachmentsProvider, I as AttachmentsToolbarButton, xe as BUTTON_PLUGIN, ve as BlockButtonStyles, t as BlockInjectButton, G as BlockItemWrapper, $ as BlockStyles, d as BorderStyle, Oe as BreakAfterPlugin, Se as ButtonPlugin, je as Custom1Plugin, Me as Custom2Plugin, Ne as Custom3Plugin, L as DEFAULT_ATTACHMENTS_BUTTON_ID, R as DEFAULT_DRAGGING_TOOLTIP, z as DEFAULT_DRAG_TOOLTIP, H as DEFAULT_MENU_BUTTON_ID, B as DragHandleToolbarButton, w as DragPreviewContextProvider, Ce as ELEMENT_BUTTON, V as FlyoutToolbarButton, ke as GAP_DEFAULT, f as GutterSpacing, Pe as Heading1Plugin, Fe as Heading2Plugin, Ie as Heading3Plugin, Le as Heading4Plugin, Re as ImageCaptionPlugin, ze as ImageTitlePlugin, Ae as KEY_ELEMENT_BREAK_AFTER_COLUMN, be as LinkInput, Ee as LinkPlugin, p as Margin, U as MenuToolbarButton, E as MultiFlyoutContextProvider, $e as OrderedListPlugin, Be as PARAGRAPH_CLASSES, m as Padding, Ve as ParagraphMarkupElement, He as ParagraphMarkupElementNode, Ue as ParagraphPlugin, Ge as QuoteMarkupElementNode, Ke as QuotePlugin, h as Radius, Te as RichTextEditor, yt as Sections, g as Security, tt as THEME_PREFIX, Xe as TextStylePluginsWithoutImage, ye as TextStyles, Ze as TextStylesWithoutImage, W as Toolbar, Qe as UnorderedListPlugin, re as addHttps, _ as borderStyleMap, q as convertToRteValue, me as createButtonNode, we as createButtonPlugin, De as createLinkPlugin, We as createParagraphPlugin, qe as createQuotePlugin, bt as defineBlock, xt as defineSettings, u as getBackgroundColorStyles, nt as getBackgroundSettings, it as getBorderRadiusSettings, at as getBorderRadiusSlider, rt as getBorderSettings, S as getBorderStyles, et as getDefaultPluginsWithLinkChooser, ot as getExtendedBorderRadiusSettings, st as getGutterSettings, Y as getLegacyUrl, X as getLinkFromEditor, ut as getMarginExtendedSettings, ct as getMarginSettings, lt as getMarginSlider, pt as getPaddingExtendedSettings, dt as getPaddingSettings, ft as getPaddingSlider, C as getRadiusStyles, l as getReadableColor, mt as getSecurityDownloadableSetting, ht as getSecurityGlobalControlId, gt as getSecurityGlobalControlSetting, Z as getUrl, pe as getUrlFromEditor, Q as getUrlFromLinkOrLegacyLink, v as gutterSpacingStyleMap, K as hasRichTextValue, se as insertButton, r as isDark, J as isDownloadable, ie as isValidUrl, ae as isValidUrlOrEmpty, te as joinClassNames, y as marginStyleMap, b as paddingStyleMap, x as radiusStyleMap, ne as relativeUrlRegex, s as setAlpha, _t as src_exports, ce as submitFloatingButton, c as toColorObject, i as toHex8String, a as toHexString, o as toRgbaString, n as toShortRgba, he as triggerFloatingButton, ge as triggerFloatingButtonEdit, _e as triggerFloatingButtonInsert, le as unwrapButton, ue as upsertButton, de as upsertButtonText, j as useAttachmentOperations, M as useAttachments, N as useAttachmentsContext, T as useDragPreviewContext, D as useMultiFlyoutContext, O as useMultiFlyoutState, P as withAttachmentsProvider, oe as withButton, fe as wrapButton };
|
|
221
219
|
|
|
222
220
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport './styles.css';\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"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport './styles.css';\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAY,KAAL,yBAAA,GAAA;QACH,EAAA,OAAA,QACA,EAAA,SAAA,UACA,EAAA,SAAA,UACA,EAAA,QAAA,SACA,EAAA,WAAA,YACA,EAAA,UAAA;AACJ,EAAA,CAAA,CAAA,GAkDa,MAAe,MAAiD,GAMhE,MAMT,MACI"}
|