@frontify/guideline-blocks-settings 0.30.0 → 0.30.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/CHANGELOG.md +12 -0
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.es.js +1 -1
- package/dist/components/BlockItemWrapper/Toolbar/ToolbarSegment.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 +20 -2
- package/dist/index.es.js +183 -181
- package/dist/index.es.js.map +1 -1
- 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/BlockItemWrapper/Toolbar/ToolbarSegment.tsx +1 -1
- package/src/components/BlockItemWrapper/index.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ export declare type DynamicSupportedBlock = DynamicSupportedBlock_2<AppBridgeBlo
|
|
|
431
431
|
|
|
432
432
|
export declare const ELEMENT_BUTTON = "button";
|
|
433
433
|
|
|
434
|
-
declare type FlyoutToolbarItem = {
|
|
434
|
+
export declare type FlyoutToolbarItem = {
|
|
435
435
|
title: string;
|
|
436
436
|
onClick: () => void;
|
|
437
437
|
icon: JSX.Element;
|
|
@@ -935,7 +935,25 @@ export declare const toHex8String: (color: Color) => string;
|
|
|
935
935
|
*/
|
|
936
936
|
export declare const toHexString: (color: Color) => string;
|
|
937
937
|
|
|
938
|
-
declare
|
|
938
|
+
export declare const Toolbar: ({ items, flyoutMenu, attachments, isDragging }: ToolbarProps) => JSX_2.Element;
|
|
939
|
+
|
|
940
|
+
export declare type ToolbarFlyoutState = {
|
|
941
|
+
isOpen: boolean;
|
|
942
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
943
|
+
};
|
|
944
|
+
|
|
945
|
+
export declare type ToolbarItem = DraghandleToolbarItem | ButtonToolbarItem;
|
|
946
|
+
|
|
947
|
+
export declare type ToolbarProps = {
|
|
948
|
+
items: ToolbarItem[];
|
|
949
|
+
flyoutMenu: ToolbarFlyoutState & {
|
|
950
|
+
items: FlyoutToolbarItem[][];
|
|
951
|
+
};
|
|
952
|
+
attachments: ToolbarFlyoutState & {
|
|
953
|
+
isEnabled: boolean;
|
|
954
|
+
};
|
|
955
|
+
isDragging?: boolean;
|
|
956
|
+
};
|
|
939
957
|
|
|
940
958
|
/**
|
|
941
959
|
* Maps color object of rgba values to rgba string.
|
package/dist/index.es.js
CHANGED
|
@@ -2,194 +2,196 @@ import "./styles.css.es.js";
|
|
|
2
2
|
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
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
5
|
+
import { Toolbar as u } from "./components/BlockItemWrapper/Toolbar/Toolbar.es.js";
|
|
6
|
+
import { DEFAULT_DRAGGING_TOOLTIP as s, DEFAULT_DRAG_TOOLTIP as d } from "./components/BlockItemWrapper/constants.es.js";
|
|
7
|
+
import { Attachments as P } from "./components/Attachments/Attachments.es.js";
|
|
8
|
+
import { DownloadButton as B } from "./components/DownloadButton/DownloadButton.es.js";
|
|
9
|
+
import { RichTextEditor as T } from "./components/RichTextEditor/RichTextEditor.es.js";
|
|
10
|
+
import { LinkPlugin as E, createLinkPlugin as k } from "./components/RichTextEditor/plugins/LinkPlugin/index.es.js";
|
|
11
|
+
import { BUTTON_PLUGIN as L, ButtonPlugin as R, ELEMENT_BUTTON as C, createButtonPlugin as I } from "./components/RichTextEditor/plugins/ButtonPlugin/createButtonPlugin.es.js";
|
|
12
|
+
import { withButton as F } from "./components/RichTextEditor/plugins/ButtonPlugin/withButton.es.js";
|
|
13
|
+
import { insertButton as U } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/insertButton.es.js";
|
|
14
|
+
import { submitFloatingButton as D } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/submitFloatingButton.es.js";
|
|
15
|
+
import { unwrapButton as N } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/unwrapButton.es.js";
|
|
16
|
+
import { upsertButton as _ } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButton.es.js";
|
|
17
|
+
import { upsertButtonText as v } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/upsertButtonText.es.js";
|
|
18
|
+
import { wrapButton as W } from "./components/RichTextEditor/plugins/ButtonPlugin/transforms/wrapButton.es.js";
|
|
19
|
+
import { getUrlFromEditor as Q } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/getUrl.es.js";
|
|
20
|
+
import { createButtonNode as q } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/createButtonNode.es.js";
|
|
21
|
+
import { triggerFloatingButton as J } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButton.es.js";
|
|
22
|
+
import { triggerFloatingButtonEdit as Y } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonEdit.es.js";
|
|
23
|
+
import { triggerFloatingButtonInsert as $ } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/triggerFloatingButtonInsert.es.js";
|
|
24
|
+
import { BlockButtonStyles as rt } from "./components/RichTextEditor/plugins/ButtonPlugin/utils/styles.es.js";
|
|
25
|
+
import { Custom1Plugin as ot } from "./components/RichTextEditor/plugins/TextStylePlugins/custom1Plugin.es.js";
|
|
26
|
+
import { Custom2Plugin as it } from "./components/RichTextEditor/plugins/TextStylePlugins/custom2Plugin.es.js";
|
|
27
|
+
import { Custom3Plugin as pt } from "./components/RichTextEditor/plugins/TextStylePlugins/custom3Plugin.es.js";
|
|
28
|
+
import { Heading1Plugin as mt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading1Plugin.es.js";
|
|
29
|
+
import { Heading2Plugin as xt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading2Plugin.es.js";
|
|
30
|
+
import { Heading3Plugin as ft } from "./components/RichTextEditor/plugins/TextStylePlugins/heading3Plugin.es.js";
|
|
31
|
+
import { Heading4Plugin as dt } from "./components/RichTextEditor/plugins/TextStylePlugins/heading4Plugin.es.js";
|
|
32
|
+
import { ImageCaptionPlugin as Pt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageCaptionPlugin.es.js";
|
|
33
|
+
import { ImageTitlePlugin as Bt } from "./components/RichTextEditor/plugins/TextStylePlugins/imageTitlePlugin.es.js";
|
|
34
|
+
import { PARAGRAPH_CLASSES as Tt, ParagraphMarkupElement as ht, ParagraphMarkupElementNode as Et, ParagraphPlugin as kt, createParagraphPlugin as At } from "./components/RichTextEditor/plugins/TextStylePlugins/paragraphPlugin.es.js";
|
|
35
|
+
import { QuoteMarkupElementNode as Rt, QuotePlugin as Ct, createQuotePlugin as It } from "./components/RichTextEditor/plugins/TextStylePlugins/quotePlugin.es.js";
|
|
36
|
+
import { AllTextStylePlugins as Ft, AllTextStyles as bt, TextStylePluginsWithoutImage as Ut, TextStylesWithoutImage as Gt } from "./components/RichTextEditor/plugins/TextStylePlugins/helpers.es.js";
|
|
37
|
+
import { BlockStyles as Ht, TextStyles as Nt } from "./components/RichTextEditor/plugins/styles.es.js";
|
|
38
|
+
import { getDefaultPluginsWithLinkChooser as _t } from "./components/RichTextEditor/pluginPresets/defaultPluginsWithLinkChooser.es.js";
|
|
39
|
+
import { THEME_PREFIX as vt } from "./components/RichTextEditor/constants.es.js";
|
|
40
|
+
import { LinkSelector as Wt } from "./components/Link/LinkSelector/LinkSelector.es.js";
|
|
41
|
+
import { LinkInput as Qt } from "./components/Link/LinkInput.es.js";
|
|
42
|
+
import { getLegacyUrl as qt, getLinkFromEditor as zt, getUrl as Jt, getUrlFromLinkOrLegacyLink as Kt } from "./components/Link/utils/getUrl.es.js";
|
|
43
|
+
import { relativeUrlRegex as Zt } from "./components/Link/utils/relativeUrlRegex.es.js";
|
|
44
|
+
import { isValidUrl as tr, isValidUrlOrEmpty as rr } from "./components/Link/utils/url.es.js";
|
|
45
|
+
import { convertToRteValue as or } from "./helpers/convertToRichTextValue.es.js";
|
|
46
|
+
import { customCoordinatesGetterFactory as ir } from "./helpers/customCoordinatesGetterFactory.es.js";
|
|
47
|
+
import { hasRichTextValue as pr } from "./helpers/hasRichTextValue.es.js";
|
|
48
|
+
import { isDownloadable as mr } from "./helpers/isDownloadable.es.js";
|
|
49
|
+
import { mapAppBridgeColorPaletteToFonduePalette as xr, mapAppBridgeColorPalettesToFonduePalettes as ur } from "./helpers/mapColorPalettes.es.js";
|
|
50
|
+
import { addHttps as sr } from "./helpers/addHttps.es.js";
|
|
51
|
+
import { AttachmentsProvider as Sr, useAttachments as Pr, useAttachmentsContext as cr, withAttachmentsProvider as Br } from "./hooks/useAttachments.es.js";
|
|
52
|
+
import { useDndSensors as Tr } from "./hooks/useDndSensors.es.js";
|
|
53
|
+
import { getBackgroundSettings as Er } from "./settings/background.es.js";
|
|
54
|
+
import { getBorderSettings as Ar } from "./settings/border.es.js";
|
|
55
|
+
import { getBorderRadiusSettings as Rr, getBorderRadiusSlider as Cr } from "./settings/borderRadius.es.js";
|
|
56
|
+
import { getExtendedBorderRadiusSettings as Mr } from "./settings/borderRadiusExtended.es.js";
|
|
57
|
+
import { getGutterSettings as br } from "./settings/gutter.es.js";
|
|
58
|
+
import { getMarginSettings as Gr, getMarginSlider as Dr } from "./settings/margin.es.js";
|
|
59
|
+
import { getMarginExtendedSettings as Nr } from "./settings/marginExtended.es.js";
|
|
60
|
+
import { getPaddingSettings as _r, getPaddingSlider as wr } from "./settings/padding.es.js";
|
|
61
|
+
import { getPaddingExtendedSettings as Vr } from "./settings/paddingExtended.es.js";
|
|
62
|
+
import { BorderStyle as jr, GutterSpacing as Qr, Margin as Xr, Padding as qr, Radius as zr, Security as Jr, borderStyleMap as Kr, gutterSpacingStyleMap as Yr, marginStyleMap as Zr, paddingStyleMap as $r, radiusStyleMap as te } from "./settings/types.es.js";
|
|
63
|
+
import { getSecurityDownloadableSetting as ee, getSecurityGlobalControlId as oe } from "./settings/securityDownloadable.es.js";
|
|
64
|
+
import { getSecurityGlobalControlSetting as ie } from "./settings/securityGlobalControl.es.js";
|
|
65
|
+
import { isDark as pe } from "./utilities/color/isDark.es.js";
|
|
66
|
+
import { toHex8String as me } from "./utilities/color/toHex8String.es.js";
|
|
67
|
+
import { toHexString as xe } from "./utilities/color/toHexString.es.js";
|
|
68
|
+
import { toRgbaString as fe } from "./utilities/color/toRgbaString.es.js";
|
|
69
|
+
import { setAlpha as de } from "./utilities/color/setAlpha.es.js";
|
|
70
|
+
import { toColorObject as Pe } from "./utilities/color/toColorObject.es.js";
|
|
71
|
+
import { getReadableColor as Be } from "./utilities/color/getReadableColor.es.js";
|
|
72
|
+
import { toShortRgba as Te } from "./utilities/color/toShortRgba.es.js";
|
|
73
|
+
import { moveItemInArray as Ee } from "./utilities/moveItemInArray.es.js";
|
|
74
|
+
import { getBackgroundColorStyles as Ae } from "./utilities/react/getBackgroundColorStyles.es.js";
|
|
75
|
+
import { getBorderStyles as Re } from "./utilities/react/getBorderStyles.es.js";
|
|
76
|
+
import { getRadiusStyles as Ie } from "./utilities/react/getRadiusStyles.es.js";
|
|
77
|
+
import { joinClassNames as Fe } from "./utilities/react/joinClassNames.es.js";
|
|
77
78
|
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
79
|
const o = (t) => t, n = (t) => t;
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
Ft as AllTextStylePlugins,
|
|
82
|
+
bt as AllTextStyles,
|
|
83
|
+
P as Attachments,
|
|
84
|
+
Sr as AttachmentsProvider,
|
|
85
|
+
L as BUTTON_PLUGIN,
|
|
86
|
+
rt as BlockButtonStyles,
|
|
86
87
|
g as BlockInjectButton,
|
|
87
88
|
l as BlockItemWrapper,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
89
|
+
Ht as BlockStyles,
|
|
90
|
+
jr as BorderStyle,
|
|
91
|
+
R as ButtonPlugin,
|
|
92
|
+
ot as Custom1Plugin,
|
|
93
|
+
it as Custom2Plugin,
|
|
94
|
+
pt as Custom3Plugin,
|
|
95
|
+
s as DEFAULT_DRAGGING_TOOLTIP,
|
|
96
|
+
d as DEFAULT_DRAG_TOOLTIP,
|
|
97
|
+
B as DownloadButton,
|
|
98
|
+
C as ELEMENT_BUTTON,
|
|
99
|
+
Qr as GutterSpacing,
|
|
100
|
+
mt as Heading1Plugin,
|
|
101
|
+
xt as Heading2Plugin,
|
|
102
|
+
ft as Heading3Plugin,
|
|
103
|
+
dt as Heading4Plugin,
|
|
104
|
+
Pt as ImageCaptionPlugin,
|
|
105
|
+
Bt as ImageTitlePlugin,
|
|
106
|
+
Qt as LinkInput,
|
|
107
|
+
E as LinkPlugin,
|
|
108
|
+
Wt as LinkSelector,
|
|
109
|
+
Xr as Margin,
|
|
110
|
+
Tt as PARAGRAPH_CLASSES,
|
|
111
|
+
qr as Padding,
|
|
112
|
+
ht as ParagraphMarkupElement,
|
|
113
|
+
Et as ParagraphMarkupElementNode,
|
|
114
|
+
kt as ParagraphPlugin,
|
|
115
|
+
Rt as QuoteMarkupElementNode,
|
|
116
|
+
Ct as QuotePlugin,
|
|
117
|
+
zr as Radius,
|
|
118
|
+
T as RichTextEditor,
|
|
118
119
|
r as Sections,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
120
|
+
Jr as Security,
|
|
121
|
+
vt as THEME_PREFIX,
|
|
122
|
+
Ut as TextStylePluginsWithoutImage,
|
|
123
|
+
Nt as TextStyles,
|
|
124
|
+
Gt as TextStylesWithoutImage,
|
|
125
|
+
u as Toolbar,
|
|
126
|
+
sr as addHttps,
|
|
127
|
+
Kr as borderStyleMap,
|
|
128
|
+
or as convertToRteValue,
|
|
129
|
+
q as createButtonNode,
|
|
130
|
+
I as createButtonPlugin,
|
|
131
|
+
k as createLinkPlugin,
|
|
132
|
+
At as createParagraphPlugin,
|
|
133
|
+
It as createQuotePlugin,
|
|
134
|
+
ir as customCoordinatesGetterFactory,
|
|
133
135
|
o as defineBlock,
|
|
134
136
|
n as defineSettings,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
137
|
+
Ae as getBackgroundColorStyles,
|
|
138
|
+
Er as getBackgroundSettings,
|
|
139
|
+
Rr as getBorderRadiusSettings,
|
|
140
|
+
Cr as getBorderRadiusSlider,
|
|
141
|
+
Ar as getBorderSettings,
|
|
142
|
+
Re as getBorderStyles,
|
|
143
|
+
_t as getDefaultPluginsWithLinkChooser,
|
|
144
|
+
Mr as getExtendedBorderRadiusSettings,
|
|
145
|
+
br as getGutterSettings,
|
|
146
|
+
qt as getLegacyUrl,
|
|
147
|
+
zt as getLinkFromEditor,
|
|
148
|
+
Nr as getMarginExtendedSettings,
|
|
149
|
+
Gr as getMarginSettings,
|
|
150
|
+
Dr as getMarginSlider,
|
|
151
|
+
Vr as getPaddingExtendedSettings,
|
|
152
|
+
_r as getPaddingSettings,
|
|
153
|
+
wr as getPaddingSlider,
|
|
154
|
+
Ie as getRadiusStyles,
|
|
155
|
+
Be as getReadableColor,
|
|
156
|
+
ee as getSecurityDownloadableSetting,
|
|
157
|
+
oe as getSecurityGlobalControlId,
|
|
158
|
+
ie as getSecurityGlobalControlSetting,
|
|
159
|
+
Jt as getUrl,
|
|
160
|
+
Q as getUrlFromEditor,
|
|
161
|
+
Kt as getUrlFromLinkOrLegacyLink,
|
|
162
|
+
Yr as gutterSpacingStyleMap,
|
|
163
|
+
pr as hasRichTextValue,
|
|
164
|
+
U as insertButton,
|
|
165
|
+
pe as isDark,
|
|
166
|
+
mr as isDownloadable,
|
|
167
|
+
tr as isValidUrl,
|
|
168
|
+
rr as isValidUrlOrEmpty,
|
|
169
|
+
Fe as joinClassNames,
|
|
170
|
+
xr as mapAppBridgeColorPaletteToFonduePalette,
|
|
171
|
+
ur as mapAppBridgeColorPalettesToFonduePalettes,
|
|
172
|
+
Zr as marginStyleMap,
|
|
173
|
+
Ee as moveItemInArray,
|
|
174
|
+
$r as paddingStyleMap,
|
|
175
|
+
te as radiusStyleMap,
|
|
176
|
+
Zt as relativeUrlRegex,
|
|
177
|
+
de as setAlpha,
|
|
178
|
+
D as submitFloatingButton,
|
|
179
|
+
Pe as toColorObject,
|
|
180
|
+
me as toHex8String,
|
|
181
|
+
xe as toHexString,
|
|
182
|
+
fe as toRgbaString,
|
|
183
|
+
Te as toShortRgba,
|
|
184
|
+
J as triggerFloatingButton,
|
|
185
|
+
Y as triggerFloatingButtonEdit,
|
|
186
|
+
$ as triggerFloatingButtonInsert,
|
|
187
|
+
N as unwrapButton,
|
|
188
|
+
_ as upsertButton,
|
|
189
|
+
v as upsertButtonText,
|
|
190
|
+
Pr as useAttachments,
|
|
191
|
+
cr as useAttachmentsContext,
|
|
192
|
+
Tr as useDndSensors,
|
|
193
|
+
Br as withAttachmentsProvider,
|
|
194
|
+
F as withButton,
|
|
195
|
+
W as wrapButton
|
|
194
196
|
};
|
|
195
197
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport './styles.css';\n\nimport type { FC } from 'react';\nimport type { AppBridgeBlock } from '@frontify/app-bridge';\nimport type {\n AssetInputBlock as AssetInputBlockSidebarSettings,\n BaseBlock as BaseBlockSidebarSettings,\n Bundle as BundleSidebarSettings,\n ChecklistBlock as ChecklistBlockSidebarSettings,\n ChoicesType as ChoicesTypeSidebarSettings,\n ColorInputBlock as ColorInputBlockSidebarSettings,\n DropdownBlock as DropdownBlockSidebarSettings,\n DynamicSettingBlock as DynamicSettingBlockSidebarSettings,\n DynamicSupportedBlock as DynamicSupportedBlockSidebarSettings,\n FontInputBlock as FontInputBlockSidebarSettings,\n InputBlock as InputBlockSidebarSettings,\n LegacyAssetInputBlock as LegacyAssetInputBlockSidebarSettings,\n LinkBlock as LinkBlockSidebarSettings,\n LinkChooserBlock as LinkChooserBlockSidebarSettings,\n MultiInputBlock as MultiInputBlockSidebarSettings,\n NotificationBlock as NotificationBlockSidebarSettings,\n SectionHeadingBlock as SectionHeadingBlockSidebarSettings,\n SegmentedControlsBlock as SegmentedControlsBlockSidebarSettings,\n SettingBlock as SettingBlockSidebarSettings,\n SimpleSettingBlock as SimpleSettingBlockSidebarSettings,\n SwitchBlock as SwitchBlockSidebarSettings,\n TemplateInputBlock as TemplateInputBlockSidebarSettings,\n TextareaBlock as TextareaBlockSidebarSettings,\n ValueOrPromisedValue as ValueOrPromisedValueSidebarSettings,\n} from '@frontify/sidebar-settings';\n\nexport * from '@frontify/sidebar-settings';\n\nexport type AssetInputBlock = AssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type BaseBlock<T = undefined> = BaseBlockSidebarSettings<AppBridgeBlock, T>;\nexport type Bundle = BundleSidebarSettings<AppBridgeBlock>;\nexport type ChecklistBlock = ChecklistBlockSidebarSettings<AppBridgeBlock>;\nexport type ChoicesType = ChoicesTypeSidebarSettings<AppBridgeBlock>;\nexport type ColorInputBlock = ColorInputBlockSidebarSettings<AppBridgeBlock>;\nexport type DropdownBlock = DropdownBlockSidebarSettings<AppBridgeBlock>;\nexport type DynamicSettingBlock<Block extends DynamicSupportedBlock = DynamicSupportedBlock> =\n DynamicSettingBlockSidebarSettings<AppBridgeBlock, Block>;\nexport type DynamicSupportedBlock = DynamicSupportedBlockSidebarSettings<AppBridgeBlock>;\nexport type FontInputBlock = FontInputBlockSidebarSettings<AppBridgeBlock>;\nexport type InputBlock = InputBlockSidebarSettings<AppBridgeBlock>;\nexport type LegacyAssetInputBlock = LegacyAssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkBlock = LinkBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkChooserBlock = LinkChooserBlockSidebarSettings<AppBridgeBlock>;\nexport type MultiInputBlock = MultiInputBlockSidebarSettings<AppBridgeBlock>;\nexport type NotificationBlock = NotificationBlockSidebarSettings<AppBridgeBlock>;\nexport type SectionHeadingBlock = SectionHeadingBlockSidebarSettings<AppBridgeBlock>;\nexport type SegmentedControlsBlock = SegmentedControlsBlockSidebarSettings<AppBridgeBlock>;\nexport type SettingBlock = SettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SimpleSettingBlock = SimpleSettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SwitchBlock = SwitchBlockSidebarSettings<AppBridgeBlock>;\nexport type TemplateInputBlock = TemplateInputBlockSidebarSettings<AppBridgeBlock>;\nexport type TextareaBlock = TextareaBlockSidebarSettings<AppBridgeBlock>;\nexport type ValueOrPromisedValue<T> = ValueOrPromisedValueSidebarSettings<AppBridgeBlock, T>;\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettingsStructureExport = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n} & { [customSectionName: string]: SettingBlock[] };\n\nexport type BlockProps = {\n /**\n * The Frontify App Bridge provides an interface to the Frontify app internals.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks/introducing-the-app-bridge}\n */\n appBridge: AppBridgeBlock;\n};\n\nexport type BlockConfigExport = {\n /**\n * Block component to render.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks}\n */\n block: FC<BlockProps>;\n /**\n * Contains the block settings and its structure.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-settings-1}\n */\n settings: ReturnType<typeof defineSettings>;\n /**\n * Block lifecycle hook ran before the block gets added in the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-creation}\n */\n onBlockCreated?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n /**\n * Block lifecycle hook ran before the block gets deleted from the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-deletion}\n */\n onBlockDeleted?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n};\n\n/**\n * Type helper to make it easier to export a theme, accepts a direct {@link BlockConfigExport} object.\n */\nexport const defineBlock = (config: BlockConfigExport): BlockConfigExport => config;\n\n/**\n * Type helper to make it easier to export block's settings structure, accepts a direct {@link BlockSettingsStructureExport} object\n * or a function return a direct {@link BlockSettingsStructureExport} or a function returning a Promise of {@link BlockSettingsStructureExport}.\n */\nexport const defineSettings = <\n T extends\n | BlockSettingsStructureExport\n | (() => Promise<BlockSettingsStructureExport>)\n | (() => BlockSettingsStructureExport),\n>(\n settingsStructure: T,\n): T => settingsStructure;\n\nexport * from './components';\nexport * from './helpers';\nexport * from './hooks';\nexport * from './settings';\nexport * from './utilities';\n"],"names":["Sections","defineBlock","config","defineSettings","settingsStructure"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/index.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport './styles.css';\n\nimport type { FC } from 'react';\nimport type { AppBridgeBlock } from '@frontify/app-bridge';\nimport type {\n AssetInputBlock as AssetInputBlockSidebarSettings,\n BaseBlock as BaseBlockSidebarSettings,\n Bundle as BundleSidebarSettings,\n ChecklistBlock as ChecklistBlockSidebarSettings,\n ChoicesType as ChoicesTypeSidebarSettings,\n ColorInputBlock as ColorInputBlockSidebarSettings,\n DropdownBlock as DropdownBlockSidebarSettings,\n DynamicSettingBlock as DynamicSettingBlockSidebarSettings,\n DynamicSupportedBlock as DynamicSupportedBlockSidebarSettings,\n FontInputBlock as FontInputBlockSidebarSettings,\n InputBlock as InputBlockSidebarSettings,\n LegacyAssetInputBlock as LegacyAssetInputBlockSidebarSettings,\n LinkBlock as LinkBlockSidebarSettings,\n LinkChooserBlock as LinkChooserBlockSidebarSettings,\n MultiInputBlock as MultiInputBlockSidebarSettings,\n NotificationBlock as NotificationBlockSidebarSettings,\n SectionHeadingBlock as SectionHeadingBlockSidebarSettings,\n SegmentedControlsBlock as SegmentedControlsBlockSidebarSettings,\n SettingBlock as SettingBlockSidebarSettings,\n SimpleSettingBlock as SimpleSettingBlockSidebarSettings,\n SwitchBlock as SwitchBlockSidebarSettings,\n TemplateInputBlock as TemplateInputBlockSidebarSettings,\n TextareaBlock as TextareaBlockSidebarSettings,\n ValueOrPromisedValue as ValueOrPromisedValueSidebarSettings,\n} from '@frontify/sidebar-settings';\n\nexport * from '@frontify/sidebar-settings';\n\nexport type AssetInputBlock = AssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type BaseBlock<T = undefined> = BaseBlockSidebarSettings<AppBridgeBlock, T>;\nexport type Bundle = BundleSidebarSettings<AppBridgeBlock>;\nexport type ChecklistBlock = ChecklistBlockSidebarSettings<AppBridgeBlock>;\nexport type ChoicesType = ChoicesTypeSidebarSettings<AppBridgeBlock>;\nexport type ColorInputBlock = ColorInputBlockSidebarSettings<AppBridgeBlock>;\nexport type DropdownBlock = DropdownBlockSidebarSettings<AppBridgeBlock>;\nexport type DynamicSettingBlock<Block extends DynamicSupportedBlock = DynamicSupportedBlock> =\n DynamicSettingBlockSidebarSettings<AppBridgeBlock, Block>;\nexport type DynamicSupportedBlock = DynamicSupportedBlockSidebarSettings<AppBridgeBlock>;\nexport type FontInputBlock = FontInputBlockSidebarSettings<AppBridgeBlock>;\nexport type InputBlock = InputBlockSidebarSettings<AppBridgeBlock>;\nexport type LegacyAssetInputBlock = LegacyAssetInputBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkBlock = LinkBlockSidebarSettings<AppBridgeBlock>;\nexport type LinkChooserBlock = LinkChooserBlockSidebarSettings<AppBridgeBlock>;\nexport type MultiInputBlock = MultiInputBlockSidebarSettings<AppBridgeBlock>;\nexport type NotificationBlock = NotificationBlockSidebarSettings<AppBridgeBlock>;\nexport type SectionHeadingBlock = SectionHeadingBlockSidebarSettings<AppBridgeBlock>;\nexport type SegmentedControlsBlock = SegmentedControlsBlockSidebarSettings<AppBridgeBlock>;\nexport type SettingBlock = SettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SimpleSettingBlock = SimpleSettingBlockSidebarSettings<AppBridgeBlock>;\nexport type SwitchBlock = SwitchBlockSidebarSettings<AppBridgeBlock>;\nexport type TemplateInputBlock = TemplateInputBlockSidebarSettings<AppBridgeBlock>;\nexport type TextareaBlock = TextareaBlockSidebarSettings<AppBridgeBlock>;\nexport type ValueOrPromisedValue<T> = ValueOrPromisedValueSidebarSettings<AppBridgeBlock, T>;\n\nexport enum Sections {\n Main = 'main',\n Basics = 'basics',\n Layout = 'layout',\n Style = 'style',\n Security = 'security',\n Targets = 'targets',\n}\n\nexport type BlockSettingsStructureExport = {\n [Sections.Main]?: SettingBlock[];\n [Sections.Basics]?: SettingBlock[];\n [Sections.Layout]?: SettingBlock[];\n [Sections.Style]?: SettingBlock[];\n [Sections.Security]?: SettingBlock[];\n} & { [customSectionName: string]: SettingBlock[] };\n\nexport type BlockProps = {\n /**\n * The Frontify App Bridge provides an interface to the Frontify app internals.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks/introducing-the-app-bridge}\n */\n appBridge: AppBridgeBlock;\n};\n\nexport type BlockConfigExport = {\n /**\n * Block component to render.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/content-blocks}\n */\n block: FC<BlockProps>;\n /**\n * Contains the block settings and its structure.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-settings-1}\n */\n settings: ReturnType<typeof defineSettings>;\n /**\n * Block lifecycle hook ran before the block gets added in the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-creation}\n */\n onBlockCreated?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n /**\n * Block lifecycle hook ran before the block gets deleted from the Guideline.\n * The hook support both synchronous or asynchronous execution.\n * {@link https://developer.frontify.com/d/XFPCrGNrXQQM/content-blocks#/details-concepts-1/block-lifecycle/on-block-deletion}\n */\n onBlockDeleted?:\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => void)\n | (({ appBridge }: { appBridge: AppBridgeBlock }) => Promise<void>);\n};\n\n/**\n * Type helper to make it easier to export a theme, accepts a direct {@link BlockConfigExport} object.\n */\nexport const defineBlock = (config: BlockConfigExport): BlockConfigExport => config;\n\n/**\n * Type helper to make it easier to export block's settings structure, accepts a direct {@link BlockSettingsStructureExport} object\n * or a function return a direct {@link BlockSettingsStructureExport} or a function returning a Promise of {@link BlockSettingsStructureExport}.\n */\nexport const defineSettings = <\n T extends\n | BlockSettingsStructureExport\n | (() => Promise<BlockSettingsStructureExport>)\n | (() => BlockSettingsStructureExport),\n>(\n settingsStructure: T,\n): T => settingsStructure;\n\nexport * from './components';\nexport * from './helpers';\nexport * from './hooks';\nexport * from './settings';\nexport * from './utilities';\n"],"names":["Sections","defineBlock","config","defineSettings","settingsStructure"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DY,IAAAA,sBAAAA,OACRA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,UAAU,WANFA,IAAAA,KAAA,CAAA,CAAA;AAyDC,MAAAC,IAAc,CAACC,MAAiDA,GAMhEC,IAAiB,CAM1BC,MACIA;"}
|