@frontify/guideline-blocks-settings 1.0.1 → 1.0.2
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/hooks/useAttachments.es.js +42 -32
- package/dist/hooks/useAttachments.es.js.map +1 -1
- package/dist/index.cjs.js +15 -15
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +14 -5
- package/dist/index.es.js +81 -80
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -15
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ import { TextStyleRenderElementProps } from '@frontify/fondue';
|
|
|
57
57
|
import { TLinkElement } from '@frontify/fondue';
|
|
58
58
|
import { TText } from '@frontify/fondue';
|
|
59
59
|
import { UnwrapNodesOptions } from '@frontify/fondue';
|
|
60
|
+
import { useBlockAssets } from '@frontify/app-bridge';
|
|
60
61
|
import { Value } from '@frontify/fondue';
|
|
61
62
|
import { ValueOrPromisedValue as ValueOrPromisedValue_2 } from '@frontify/sidebar-settings';
|
|
62
63
|
import { WithOverride } from '@frontify/fondue';
|
|
@@ -132,18 +133,18 @@ export declare const BlockButtonStyles: Record<string, CSSProperties & {
|
|
|
132
133
|
export declare type BlockConfigExport = {
|
|
133
134
|
/**
|
|
134
135
|
* Block component to render.
|
|
135
|
-
* {@link https://developer.frontify.com/
|
|
136
|
+
* {@link https://developer.frontify.com/document/2569#/details-concepts-1/content-blocks}
|
|
136
137
|
*/
|
|
137
138
|
block: FC<BlockProps>;
|
|
138
139
|
/**
|
|
139
140
|
* Contains the block settings and its structure.
|
|
140
|
-
* {@link https://developer.frontify.com/
|
|
141
|
+
* {@link https://developer.frontify.com/document/2569#/details-concepts-1/block-settings-1}
|
|
141
142
|
*/
|
|
142
143
|
settings: ReturnType<typeof defineSettings>;
|
|
143
144
|
/**
|
|
144
145
|
* Block lifecycle hook ran before the block gets added in the Guideline.
|
|
145
146
|
* The hook support both synchronous or asynchronous execution.
|
|
146
|
-
* {@link https://developer.frontify.com/
|
|
147
|
+
* {@link https://developer.frontify.com/document/2569#/details-concepts-1/block-lifecycle/on-block-creation}
|
|
147
148
|
*/
|
|
148
149
|
onBlockCreated?: (({ appBridge }: {
|
|
149
150
|
appBridge: AppBridgeBlock;
|
|
@@ -153,7 +154,7 @@ export declare type BlockConfigExport = {
|
|
|
153
154
|
/**
|
|
154
155
|
* Block lifecycle hook ran before the block gets deleted from the Guideline.
|
|
155
156
|
* The hook support both synchronous or asynchronous execution.
|
|
156
|
-
* {@link https://developer.frontify.com/
|
|
157
|
+
* {@link https://developer.frontify.com/document/2569#/details-concepts-1/block-lifecycle/on-block-deletion}
|
|
157
158
|
*/
|
|
158
159
|
onBlockDeleted?: (({ appBridge }: {
|
|
159
160
|
appBridge: AppBridgeBlock;
|
|
@@ -201,7 +202,7 @@ export declare type BlockItemWrapperProps = {
|
|
|
201
202
|
export declare type BlockProps = {
|
|
202
203
|
/**
|
|
203
204
|
* The Frontify App Bridge provides an interface to the Frontify app internals.
|
|
204
|
-
* {@link https://developer.frontify.com/
|
|
205
|
+
* {@link https://developer.frontify.com/document/2569#/details-concepts-1/content-blocks/introducing-the-app-bridge}
|
|
205
206
|
*/
|
|
206
207
|
appBridge: AppBridgeBlock;
|
|
207
208
|
};
|
|
@@ -1094,6 +1095,14 @@ export declare type UpsertButtonOptions<V extends Value = Value> = CreateButtonN
|
|
|
1094
1095
|
*/
|
|
1095
1096
|
export declare const upsertButtonText: <V extends Value>(editor: PlateEditor<V>, { text }: UpsertButtonOptions<V>) => void;
|
|
1096
1097
|
|
|
1098
|
+
export declare const useAttachmentOperations: (attachmentKey: string, blockAssetBundle: ReturnType<typeof useBlockAssets>) => {
|
|
1099
|
+
onAttachmentsAdd: (newAssets: Asset[]) => Promise<void>;
|
|
1100
|
+
onAttachmentDelete: (assetToDelete: Asset) => Promise<void>;
|
|
1101
|
+
onAttachmentReplace: (attachmentToReplace: Asset, newAsset: Asset) => Promise<void>;
|
|
1102
|
+
onAttachmentsSorted: (assets: Asset[]) => Promise<void>;
|
|
1103
|
+
attachments: Asset[];
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1097
1106
|
export declare const useAttachments: (appBridge: AppBridgeBlock, attachmentKey: string) => {
|
|
1098
1107
|
onAttachmentsAdd: (newAssets: Asset[]) => Promise<void>;
|
|
1099
1108
|
onAttachmentDelete: (assetToDelete: Asset) => Promise<void>;
|
package/dist/index.es.js
CHANGED
|
@@ -8,11 +8,11 @@ import { useMultiFlyoutState as B } from "./components/BlockItemWrapper/Toolbar/
|
|
|
8
8
|
import { Toolbar as c } from "./components/BlockItemWrapper/Toolbar/Toolbar.es.js";
|
|
9
9
|
import { AttachmentsToolbarButton as E, DEFAULT_ATTACHMENTS_BUTTON_ID as A } from "./components/BlockItemWrapper/Toolbar/AttachmentsToolbarButton/AttachmentsToolbarButton.es.js";
|
|
10
10
|
import { DragHandleToolbarButton as M } from "./components/BlockItemWrapper/Toolbar/DragHandleToolbarButton/DragHandleToolbarButton.es.js";
|
|
11
|
-
import { FlyoutToolbarButton as
|
|
11
|
+
import { FlyoutToolbarButton as C } from "./components/BlockItemWrapper/Toolbar/FlyoutToolbarButton/FlyoutToolbarButton.es.js";
|
|
12
12
|
import { DEFAULT_MENU_BUTTON_ID as k, MenuToolbarButton as R } from "./components/BlockItemWrapper/Toolbar/MenuToolbarButton/MenuToolbarButton.es.js";
|
|
13
13
|
import { DEFAULT_DRAGGING_TOOLTIP as _, DEFAULT_DRAG_TOOLTIP as D } from "./components/BlockItemWrapper/constants.es.js";
|
|
14
14
|
import { Attachments as b } from "./components/Attachments/Attachments.es.js";
|
|
15
|
-
import { DownloadButton as
|
|
15
|
+
import { DownloadButton as O } from "./components/DownloadButton/DownloadButton.es.js";
|
|
16
16
|
import { RichTextEditor as H } from "./components/RichTextEditor/RichTextEditor.es.js";
|
|
17
17
|
import { LinkPlugin as w, createLinkPlugin as V } from "./components/RichTextEditor/plugins/LinkPlugin/index.es.js";
|
|
18
18
|
import { BUTTON_PLUGIN as j, ButtonPlugin as Q, ELEMENT_BUTTON as K, createButtonPlugin as X } from "./components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js";
|
|
@@ -31,12 +31,12 @@ import { triggerFloatingButtonInsert as St } from "./components/RichTextEditor/p
|
|
|
31
31
|
import { BlockButtonStyles as Tt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js";
|
|
32
32
|
import { BreakAfterPlugin as yt, GAP_DEFAULT as Et, KEY_ELEMENT_BREAK_AFTER_COLUMN as At } from "./components/RichTextEditor/plugins/ColumnBreakPlugin/ColumnBreakPlugin.es.js";
|
|
33
33
|
import { Custom1Plugin as Mt } from "./components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js";
|
|
34
|
-
import { Custom2Plugin as
|
|
34
|
+
import { Custom2Plugin as Ct } from "./components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js";
|
|
35
35
|
import { Custom3Plugin as kt } from "./components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js";
|
|
36
36
|
import { Heading1Plugin as Ut } from "./components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js";
|
|
37
37
|
import { Heading2Plugin as Dt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js";
|
|
38
38
|
import { Heading3Plugin as bt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js";
|
|
39
|
-
import { Heading4Plugin as
|
|
39
|
+
import { Heading4Plugin as Ot } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
40
40
|
import { ImageCaptionPlugin as Ht } from "./components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js";
|
|
41
41
|
import { ImageTitlePlugin as wt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js";
|
|
42
42
|
import { PARAGRAPH_CLASSES as Wt, ParagraphMarkupElement as jt, ParagraphMarkupElementNode as Qt, ParagraphPlugin as Kt, createParagraphPlugin as Xt } from "./components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js";
|
|
@@ -51,168 +51,169 @@ import { getLegacyUrl as dr, getLinkFromEditor as Pr, getUrl as Sr, getUrlFromLi
|
|
|
51
51
|
import { relativeUrlRegex as cr } from "./components/Link/utils/relativeUrlRegex.es.js";
|
|
52
52
|
import { isValidUrl as Er, isValidUrlOrEmpty as Ar } from "./components/Link/utils/url.es.js";
|
|
53
53
|
import { convertToRteValue as Mr } from "./helpers/convertToRichTextValue.es.js";
|
|
54
|
-
import { customCoordinatesGetterFactory as
|
|
54
|
+
import { customCoordinatesGetterFactory as Cr } from "./helpers/customCoordinatesGetterFactory.es.js";
|
|
55
55
|
import { hasRichTextValue as kr } from "./helpers/hasRichTextValue.es.js";
|
|
56
56
|
import { isDownloadable as Ur } from "./helpers/isDownloadable.es.js";
|
|
57
57
|
import { mapAppBridgeColorPaletteToFonduePalette as Dr, mapAppBridgeColorPalettesToFonduePalettes as Ir } from "./helpers/mapColorPalettes.es.js";
|
|
58
58
|
import { addHttps as Nr } from "./helpers/addHttps.es.js";
|
|
59
|
-
import { AttachmentsProvider as
|
|
60
|
-
import { useDndSensors as
|
|
61
|
-
import { getBackgroundSettings as
|
|
62
|
-
import { getBorderSettings as
|
|
63
|
-
import { getBorderRadiusSettings as
|
|
64
|
-
import { getExtendedBorderRadiusSettings as
|
|
65
|
-
import { getGutterSettings as
|
|
66
|
-
import { getMarginSettings as
|
|
67
|
-
import { getMarginExtendedSettings as
|
|
68
|
-
import { getPaddingSettings as
|
|
69
|
-
import { getPaddingExtendedSettings as
|
|
70
|
-
import { BorderStyle as
|
|
71
|
-
import { getSecurityDownloadableSetting as
|
|
72
|
-
import { getSecurityGlobalControlSetting as
|
|
73
|
-
import { isDark as
|
|
74
|
-
import { toHex8String as
|
|
75
|
-
import { toHexString as
|
|
76
|
-
import { toRgbaString as
|
|
77
|
-
import { setAlpha as
|
|
78
|
-
import { toColorObject as
|
|
79
|
-
import { getReadableColor as
|
|
80
|
-
import { toShortRgba as
|
|
81
|
-
import { moveItemInArray as
|
|
82
|
-
import { getBackgroundColorStyles as
|
|
83
|
-
import { getBorderStyles as
|
|
84
|
-
import { getRadiusStyles as
|
|
85
|
-
import { joinClassNames as
|
|
59
|
+
import { AttachmentsProvider as Gr, useAttachmentOperations as Hr, useAttachments as vr, useAttachmentsContext as wr, withAttachmentsProvider as Vr } from "./hooks/useAttachments.es.js";
|
|
60
|
+
import { useDndSensors as jr } from "./hooks/useDndSensors.es.js";
|
|
61
|
+
import { getBackgroundSettings as Kr } from "./settings/background.es.js";
|
|
62
|
+
import { getBorderSettings as Yr } from "./settings/border.es.js";
|
|
63
|
+
import { getBorderRadiusSettings as zr, getBorderRadiusSlider as Jr } from "./settings/borderRadius.es.js";
|
|
64
|
+
import { getExtendedBorderRadiusSettings as $r } from "./settings/borderRadiusExtended.es.js";
|
|
65
|
+
import { getGutterSettings as ro } from "./settings/gutter.es.js";
|
|
66
|
+
import { getMarginSettings as eo, getMarginSlider as no } from "./settings/margin.es.js";
|
|
67
|
+
import { getMarginExtendedSettings as io } from "./settings/marginExtended.es.js";
|
|
68
|
+
import { getPaddingSettings as mo, getPaddingSlider as go } from "./settings/padding.es.js";
|
|
69
|
+
import { getPaddingExtendedSettings as xo } from "./settings/paddingExtended.es.js";
|
|
70
|
+
import { BorderStyle as fo, GutterSpacing as so, Margin as Po, Padding as So, Radius as Bo, Security as To, borderStyleMap as co, gutterSpacingStyleMap as yo, marginStyleMap as Eo, paddingStyleMap as Ao, radiusStyleMap as Lo } from "./settings/types.es.js";
|
|
71
|
+
import { getSecurityDownloadableSetting as ho, getSecurityGlobalControlId as Co } from "./settings/securityDownloadable.es.js";
|
|
72
|
+
import { getSecurityGlobalControlSetting as ko } from "./settings/securityGlobalControl.es.js";
|
|
73
|
+
import { isDark as Uo } from "./utilities/color/isDark.es.js";
|
|
74
|
+
import { toHex8String as Do } from "./utilities/color/toHex8String.es.js";
|
|
75
|
+
import { toHexString as bo } from "./utilities/color/toHexString.es.js";
|
|
76
|
+
import { toRgbaString as Oo } from "./utilities/color/toRgbaString.es.js";
|
|
77
|
+
import { setAlpha as Ho } from "./utilities/color/setAlpha.es.js";
|
|
78
|
+
import { toColorObject as wo } from "./utilities/color/toColorObject.es.js";
|
|
79
|
+
import { getReadableColor as Wo } from "./utilities/color/getReadableColor.es.js";
|
|
80
|
+
import { toShortRgba as Qo } from "./utilities/color/toShortRgba.es.js";
|
|
81
|
+
import { moveItemInArray as Xo } from "./utilities/moveItemInArray.es.js";
|
|
82
|
+
import { getBackgroundColorStyles as qo } from "./utilities/react/getBackgroundColorStyles.es.js";
|
|
83
|
+
import { getBorderStyles as Jo } from "./utilities/react/getBorderStyles.es.js";
|
|
84
|
+
import { getRadiusStyles as $o } from "./utilities/react/getRadiusStyles.es.js";
|
|
85
|
+
import { joinClassNames as re } from "./utilities/react/joinClassNames.es.js";
|
|
86
86
|
var r = /* @__PURE__ */ ((t) => (t.Main = "main", t.Basics = "basics", t.Layout = "layout", t.Style = "style", t.Security = "security", t.Targets = "targets", t))(r || {});
|
|
87
87
|
const e = (t) => t, n = (t) => t;
|
|
88
88
|
export {
|
|
89
89
|
$t as AllTextStylePlugins,
|
|
90
90
|
tr as AllTextStyles,
|
|
91
91
|
b as Attachments,
|
|
92
|
-
|
|
92
|
+
Gr as AttachmentsProvider,
|
|
93
93
|
E as AttachmentsToolbarButton,
|
|
94
94
|
j as BUTTON_PLUGIN,
|
|
95
95
|
Tt as BlockButtonStyles,
|
|
96
96
|
m as BlockInjectButton,
|
|
97
97
|
l as BlockItemWrapper,
|
|
98
98
|
nr as BlockStyles,
|
|
99
|
-
|
|
99
|
+
fo as BorderStyle,
|
|
100
100
|
yt as BreakAfterPlugin,
|
|
101
101
|
Q as ButtonPlugin,
|
|
102
102
|
Mt as Custom1Plugin,
|
|
103
|
-
|
|
103
|
+
Ct as Custom2Plugin,
|
|
104
104
|
kt as Custom3Plugin,
|
|
105
105
|
A as DEFAULT_ATTACHMENTS_BUTTON_ID,
|
|
106
106
|
_ as DEFAULT_DRAGGING_TOOLTIP,
|
|
107
107
|
D as DEFAULT_DRAG_TOOLTIP,
|
|
108
108
|
k as DEFAULT_MENU_BUTTON_ID,
|
|
109
|
-
|
|
109
|
+
O as DownloadButton,
|
|
110
110
|
M as DragHandleToolbarButton,
|
|
111
111
|
u as DragPreviewContextProvider,
|
|
112
112
|
K as ELEMENT_BUTTON,
|
|
113
|
-
|
|
113
|
+
C as FlyoutToolbarButton,
|
|
114
114
|
Et as GAP_DEFAULT,
|
|
115
|
-
|
|
115
|
+
so as GutterSpacing,
|
|
116
116
|
Ut as Heading1Plugin,
|
|
117
117
|
Dt as Heading2Plugin,
|
|
118
118
|
bt as Heading3Plugin,
|
|
119
|
-
|
|
119
|
+
Ot as Heading4Plugin,
|
|
120
120
|
Ht as ImageCaptionPlugin,
|
|
121
121
|
wt as ImageTitlePlugin,
|
|
122
122
|
At as KEY_ELEMENT_BREAK_AFTER_COLUMN,
|
|
123
123
|
fr as LinkInput,
|
|
124
124
|
w as LinkPlugin,
|
|
125
125
|
xr as LinkSelector,
|
|
126
|
-
|
|
126
|
+
Po as Margin,
|
|
127
127
|
R as MenuToolbarButton,
|
|
128
128
|
d as MultiFlyoutContextProvider,
|
|
129
129
|
Wt as PARAGRAPH_CLASSES,
|
|
130
|
-
|
|
130
|
+
So as Padding,
|
|
131
131
|
jt as ParagraphMarkupElement,
|
|
132
132
|
Qt as ParagraphMarkupElementNode,
|
|
133
133
|
Kt as ParagraphPlugin,
|
|
134
134
|
qt as QuoteMarkupElementNode,
|
|
135
135
|
zt as QuotePlugin,
|
|
136
|
-
|
|
136
|
+
Bo as Radius,
|
|
137
137
|
H as RichTextEditor,
|
|
138
138
|
r as Sections,
|
|
139
|
-
|
|
139
|
+
To as Security,
|
|
140
140
|
gr as THEME_PREFIX,
|
|
141
141
|
rr as TextStylePluginsWithoutImage,
|
|
142
142
|
ar as TextStyles,
|
|
143
143
|
or as TextStylesWithoutImage,
|
|
144
144
|
c as Toolbar,
|
|
145
145
|
Nr as addHttps,
|
|
146
|
-
|
|
146
|
+
co as borderStyleMap,
|
|
147
147
|
Mr as convertToRteValue,
|
|
148
148
|
xt as createButtonNode,
|
|
149
149
|
X as createButtonPlugin,
|
|
150
150
|
V as createLinkPlugin,
|
|
151
151
|
Xt as createParagraphPlugin,
|
|
152
152
|
Jt as createQuotePlugin,
|
|
153
|
-
|
|
153
|
+
Cr as customCoordinatesGetterFactory,
|
|
154
154
|
e as defineBlock,
|
|
155
155
|
n as defineSettings,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
156
|
+
qo as getBackgroundColorStyles,
|
|
157
|
+
Kr as getBackgroundSettings,
|
|
158
|
+
zr as getBorderRadiusSettings,
|
|
159
|
+
Jr as getBorderRadiusSlider,
|
|
160
|
+
Yr as getBorderSettings,
|
|
161
|
+
Jo as getBorderStyles,
|
|
162
162
|
pr as getDefaultPluginsWithLinkChooser,
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
$r as getExtendedBorderRadiusSettings,
|
|
164
|
+
ro as getGutterSettings,
|
|
165
165
|
dr as getLegacyUrl,
|
|
166
166
|
Pr as getLinkFromEditor,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
167
|
+
io as getMarginExtendedSettings,
|
|
168
|
+
eo as getMarginSettings,
|
|
169
|
+
no as getMarginSlider,
|
|
170
|
+
xo as getPaddingExtendedSettings,
|
|
171
|
+
mo as getPaddingSettings,
|
|
172
|
+
go as getPaddingSlider,
|
|
173
|
+
$o as getRadiusStyles,
|
|
174
|
+
Wo as getReadableColor,
|
|
175
|
+
ho as getSecurityDownloadableSetting,
|
|
176
176
|
Co as getSecurityGlobalControlId,
|
|
177
|
-
|
|
177
|
+
ko as getSecurityGlobalControlSetting,
|
|
178
178
|
Sr as getUrl,
|
|
179
179
|
gt as getUrlFromEditor,
|
|
180
180
|
Br as getUrlFromLinkOrLegacyLink,
|
|
181
|
-
|
|
181
|
+
yo as gutterSpacingStyleMap,
|
|
182
182
|
kr as hasRichTextValue,
|
|
183
183
|
J as insertButton,
|
|
184
|
-
|
|
184
|
+
Uo as isDark,
|
|
185
185
|
Ur as isDownloadable,
|
|
186
186
|
Er as isValidUrl,
|
|
187
187
|
Ar as isValidUrlOrEmpty,
|
|
188
|
-
|
|
188
|
+
re as joinClassNames,
|
|
189
189
|
Dr as mapAppBridgeColorPaletteToFonduePalette,
|
|
190
190
|
Ir as mapAppBridgeColorPalettesToFonduePalettes,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
Eo as marginStyleMap,
|
|
192
|
+
Xo as moveItemInArray,
|
|
193
|
+
Ao as paddingStyleMap,
|
|
194
|
+
Lo as radiusStyleMap,
|
|
195
195
|
cr as relativeUrlRegex,
|
|
196
|
-
|
|
196
|
+
Ho as setAlpha,
|
|
197
197
|
$ as submitFloatingButton,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
198
|
+
wo as toColorObject,
|
|
199
|
+
Do as toHex8String,
|
|
200
|
+
bo as toHexString,
|
|
201
|
+
Oo as toRgbaString,
|
|
202
|
+
Qo as toShortRgba,
|
|
203
203
|
ft as triggerFloatingButton,
|
|
204
204
|
dt as triggerFloatingButtonEdit,
|
|
205
205
|
St as triggerFloatingButtonInsert,
|
|
206
206
|
rt as unwrapButton,
|
|
207
207
|
et as upsertButton,
|
|
208
208
|
at as upsertButtonText,
|
|
209
|
-
Hr as
|
|
210
|
-
vr as
|
|
211
|
-
|
|
209
|
+
Hr as useAttachmentOperations,
|
|
210
|
+
vr as useAttachments,
|
|
211
|
+
wr as useAttachmentsContext,
|
|
212
|
+
jr as useDndSensors,
|
|
212
213
|
f as useDragPreviewContext,
|
|
213
214
|
P as useMultiFlyoutContext,
|
|
214
215
|
B as useMultiFlyoutState,
|
|
215
|
-
|
|
216
|
+
Vr as withAttachmentsProvider,
|
|
216
217
|
q as withButton,
|
|
217
218
|
pt as wrapButton
|
|
218
219
|
};
|
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/
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DY,IAAAA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,UAAU,WANFA,IAAAA,KAAA,CAAA,CAAA;AAyDC,MAAAC,IAAc,CAACC,MAAiDA,GAMhEC,IAAiB,CAM1BC,MACIA;"}
|