@makeswift/runtime 0.0.0-018e17a
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/actions.cjs.js +91 -0
- package/dist/actions.cjs.js.map +1 -0
- package/dist/actions.es.js +80 -0
- package/dist/actions.es.js.map +1 -0
- package/dist/box-model.cjs.js +9 -0
- package/dist/box-model.cjs.js.map +1 -0
- package/dist/box-model.es.js +3 -0
- package/dist/box-model.es.js.map +1 -0
- package/dist/box-models.cjs.js +236 -0
- package/dist/box-models.cjs.js.map +1 -0
- package/dist/box-models.es.js +227 -0
- package/dist/box-models.es.js.map +1 -0
- package/dist/components.cjs.js +305 -0
- package/dist/components.cjs.js.map +1 -0
- package/dist/components.es.js +298 -0
- package/dist/components.es.js.map +1 -0
- package/dist/main.cjs.js +8 -0
- package/dist/main.cjs.js.map +1 -0
- package/dist/main.es.js +2 -0
- package/dist/main.es.js.map +1 -0
- package/dist/prop-controllers.cjs.js +177 -0
- package/dist/prop-controllers.cjs.js.map +1 -0
- package/dist/prop-controllers.es.js +174 -0
- package/dist/prop-controllers.es.js.map +1 -0
- package/dist/react-builder-preview.cjs.js +4301 -0
- package/dist/react-builder-preview.cjs.js.map +1 -0
- package/dist/react-builder-preview.es.js +4294 -0
- package/dist/react-builder-preview.es.js.map +1 -0
- package/dist/react.cjs.js +13 -0
- package/dist/react.cjs.js.map +1 -0
- package/dist/react.cjs2.js +835 -0
- package/dist/react.cjs2.js.map +1 -0
- package/dist/react.es.js +4 -0
- package/dist/react.es.js.map +1 -0
- package/dist/react.es2.js +810 -0
- package/dist/react.es2.js.map +1 -0
- package/dist/types/box-model.d.ts +3 -0
- package/dist/types/box-model.d.ts.map +1 -0
- package/dist/types/components/Root/Root.d.ts +11 -0
- package/dist/types/components/Root/Root.d.ts.map +1 -0
- package/dist/types/components/Root/components/Placeholder/index.d.ts +5 -0
- package/dist/types/components/Root/components/Placeholder/index.d.ts.map +1 -0
- package/dist/types/components/Root/index.d.ts +2 -0
- package/dist/types/components/Root/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/utils/columns.d.ts +2 -0
- package/dist/types/components/utils/columns.d.ts.map +1 -0
- package/dist/types/components/utils/cssMediaRules.d.ts +18 -0
- package/dist/types/components/utils/cssMediaRules.d.ts.map +1 -0
- package/dist/types/components/utils/devices.d.ts +16 -0
- package/dist/types/components/utils/devices.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/prop-controllers/descriptors.d.ts +656 -0
- package/dist/types/prop-controllers/descriptors.d.ts.map +1 -0
- package/dist/types/prop-controllers/index.d.ts +3 -0
- package/dist/types/prop-controllers/index.d.ts.map +1 -0
- package/dist/types/react.d.ts +4 -0
- package/dist/types/react.d.ts.map +1 -0
- package/dist/types/runtimes/react.d.ts +28 -0
- package/dist/types/runtimes/react.d.ts.map +1 -0
- package/dist/types/state/actions.d.ts +124 -0
- package/dist/types/state/actions.d.ts.map +1 -0
- package/dist/types/state/modules/box-models.d.ts +22 -0
- package/dist/types/state/modules/box-models.d.ts.map +1 -0
- package/dist/types/state/modules/components-meta.d.ts +14 -0
- package/dist/types/state/modules/components-meta.d.ts.map +1 -0
- package/dist/types/state/modules/prop-controllers.d.ts +10 -0
- package/dist/types/state/modules/prop-controllers.d.ts.map +1 -0
- package/dist/types/state/modules/react-components.d.ts +10 -0
- package/dist/types/state/modules/react-components.d.ts.map +1 -0
- package/dist/types/state/modules/read-only-documents.d.ts +28 -0
- package/dist/types/state/modules/read-only-documents.d.ts.map +1 -0
- package/dist/types/state/modules/read-write-documents.d.ts +13 -0
- package/dist/types/state/modules/read-write-documents.d.ts.map +1 -0
- package/dist/types/state/react-builder-preview.d.ts +39 -0
- package/dist/types/state/react-builder-preview.d.ts.map +1 -0
- package/dist/types/state/react-page.d.ts +28 -0
- package/dist/types/state/react-page.d.ts.map +1 -0
- package/dist/types/utils/deepEqual.d.ts +3 -0
- package/dist/types/utils/deepEqual.d.ts.map +1 -0
- package/dist/types/utils/is.d.ts +2 -0
- package/dist/types/utils/is.d.ts.map +1 -0
- package/dist/types/utils/shallowEqual.d.ts +3 -0
- package/dist/types/utils/shallowEqual.d.ts.map +1 -0
- package/package.json +103 -0
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
import type * as Slate from 'slate';
|
|
2
|
+
import type { Element, Data } from '../state/react-page';
|
|
3
|
+
export declare type IndexSignatureHack<T> = T extends Record<string, any> ? {
|
|
4
|
+
[K in keyof T]: IndexSignatureHack<T[K]>;
|
|
5
|
+
} : T;
|
|
6
|
+
export declare type Device = 'desktop' | 'tablet' | 'mobile';
|
|
7
|
+
export declare type DeviceOverride<T> = {
|
|
8
|
+
deviceId: Device;
|
|
9
|
+
value: T;
|
|
10
|
+
};
|
|
11
|
+
export declare type ResponsiveValue<T> = DeviceOverride<T>[];
|
|
12
|
+
export declare type ResponsiveValueType<T> = T extends ResponsiveValue<infer U> ? U : never;
|
|
13
|
+
declare type Color = {
|
|
14
|
+
swatchId: string;
|
|
15
|
+
alpha: number;
|
|
16
|
+
};
|
|
17
|
+
declare type IconName = 'HeightAuto16' | 'HeightMatch16' | 'VerticalAlignStart16' | 'VerticalAlignMiddle16' | 'VerticalAlignEnd16' | 'VerticalAlignSpaceBetween16' | 'ButtonPill16' | 'ButtonRounded16' | 'ButtonSquare16' | 'SizeSmall16' | 'SizeMedium16' | 'SizeLarge16' | 'ArrowInside16' | 'ArrowCenter16' | 'ArrowOutside16' | 'CountdownSolid16' | 'CountdownSolidSplit16' | 'CountdownOutline16' | 'CountdownOutlineSplit16' | 'CountdownNaked16' | 'Sun16' | 'Moon16' | 'AlignLeft16' | 'AlignCenter16' | 'AlignRight16' | 'Star16' | 'StarCircle16' | 'StarRoundedSquare16' | 'StarSquare16';
|
|
18
|
+
declare type Gap = {
|
|
19
|
+
value: number;
|
|
20
|
+
unit: 'px';
|
|
21
|
+
};
|
|
22
|
+
export declare type Length = {
|
|
23
|
+
value: number;
|
|
24
|
+
unit: 'px' | '%';
|
|
25
|
+
};
|
|
26
|
+
declare type OpenPageLink = {
|
|
27
|
+
type: 'OPEN_PAGE';
|
|
28
|
+
payload: {
|
|
29
|
+
pageId: string | null | undefined;
|
|
30
|
+
openInNewTab: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
declare type OpenURLLink = {
|
|
34
|
+
type: 'OPEN_URL';
|
|
35
|
+
payload: {
|
|
36
|
+
url: string;
|
|
37
|
+
openInNewTab: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
declare type SendEmailLink = {
|
|
41
|
+
type: 'SEND_EMAIL';
|
|
42
|
+
payload: {
|
|
43
|
+
to: string;
|
|
44
|
+
subject?: string;
|
|
45
|
+
body?: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
declare type CallPhoneLink = {
|
|
49
|
+
type: 'CALL_PHONE';
|
|
50
|
+
payload: {
|
|
51
|
+
phoneNumber: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
declare type ScrollToElementLink = {
|
|
55
|
+
type: 'SCROLL_TO_ELEMENT';
|
|
56
|
+
payload: {
|
|
57
|
+
elementIdConfig: {
|
|
58
|
+
elementKey: string;
|
|
59
|
+
propName: string;
|
|
60
|
+
} | null | undefined;
|
|
61
|
+
block: 'start' | 'center' | 'end';
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
declare type Link = OpenPageLink | OpenURLLink | SendEmailLink | CallPhoneLink | ScrollToElementLink;
|
|
65
|
+
declare type TextStyle = {
|
|
66
|
+
fontFamily?: string | null | undefined;
|
|
67
|
+
letterSpacing: number | null | undefined;
|
|
68
|
+
fontSize: {
|
|
69
|
+
value: number;
|
|
70
|
+
unit: 'px';
|
|
71
|
+
} | null | undefined;
|
|
72
|
+
fontWeight: number | null | undefined;
|
|
73
|
+
textTransform: 'uppercase'[];
|
|
74
|
+
fontStyle: 'italic'[];
|
|
75
|
+
};
|
|
76
|
+
export declare const Types: {
|
|
77
|
+
readonly Backgrounds: "Backgrounds";
|
|
78
|
+
readonly Border: "Border";
|
|
79
|
+
readonly BorderRadius: "BorderRadius";
|
|
80
|
+
readonly Checkbox: "Checkbox";
|
|
81
|
+
readonly Date: "Date";
|
|
82
|
+
readonly ElementID: "ElementID";
|
|
83
|
+
readonly Font: "Font";
|
|
84
|
+
readonly GapX: "GapX";
|
|
85
|
+
readonly GapY: "GapY";
|
|
86
|
+
readonly Grid: "Grid";
|
|
87
|
+
readonly Image: "Image";
|
|
88
|
+
readonly Images: "Images";
|
|
89
|
+
readonly Link: "Link";
|
|
90
|
+
readonly Margin: "Margin";
|
|
91
|
+
readonly NavigationLinks: "NavigationLinks";
|
|
92
|
+
readonly Number: "Number";
|
|
93
|
+
readonly Padding: "Padding";
|
|
94
|
+
readonly ResponsiveColor: "ResponsiveColor";
|
|
95
|
+
readonly ResponsiveIconRadioGroup: "ResponsiveIconRadioGroup";
|
|
96
|
+
readonly ResponsiveLength: "ResponsiveLength";
|
|
97
|
+
readonly ResponsiveNumber: "ResponsiveNumber";
|
|
98
|
+
readonly ResponsiveOpacity: "ResponsiveOpacity";
|
|
99
|
+
readonly ResponsiveSelect: "ResponsiveSelect";
|
|
100
|
+
readonly RichText: "RichText";
|
|
101
|
+
readonly Shadows: "Shadows";
|
|
102
|
+
readonly SocialLinks: "SocialLinks";
|
|
103
|
+
readonly Table: "Table";
|
|
104
|
+
readonly TableFormFields: "TableFormFields";
|
|
105
|
+
readonly TextArea: "TextArea";
|
|
106
|
+
readonly TextInput: "TextInput";
|
|
107
|
+
readonly TextStyle: "TextStyle";
|
|
108
|
+
readonly Video: "Video";
|
|
109
|
+
readonly Width: "Width";
|
|
110
|
+
};
|
|
111
|
+
declare type Options<T> = T | ((props: Record<string, unknown>, decideMode: Device) => T);
|
|
112
|
+
declare type ColorBackground = {
|
|
113
|
+
type: 'color';
|
|
114
|
+
id: string;
|
|
115
|
+
payload: Color | null;
|
|
116
|
+
};
|
|
117
|
+
declare type GradientStop = {
|
|
118
|
+
id: string;
|
|
119
|
+
location: number;
|
|
120
|
+
color: Color | null;
|
|
121
|
+
};
|
|
122
|
+
declare type Gradient = {
|
|
123
|
+
angle?: number;
|
|
124
|
+
isRadial?: boolean;
|
|
125
|
+
stops: GradientStop[];
|
|
126
|
+
};
|
|
127
|
+
declare type GradientBackground = {
|
|
128
|
+
type: 'gradient';
|
|
129
|
+
id: string;
|
|
130
|
+
payload: Gradient;
|
|
131
|
+
};
|
|
132
|
+
declare type BackgroundImagePosition = {
|
|
133
|
+
x: number;
|
|
134
|
+
y: number;
|
|
135
|
+
};
|
|
136
|
+
declare type BackgroundImageSize = 'cover' | 'contain' | 'auto';
|
|
137
|
+
declare type BackgroundImageRepeat = 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat';
|
|
138
|
+
declare type BackgroundImage = {
|
|
139
|
+
imageId: string;
|
|
140
|
+
position: BackgroundImagePosition;
|
|
141
|
+
size?: BackgroundImageSize;
|
|
142
|
+
repeat?: BackgroundImageRepeat;
|
|
143
|
+
opacity?: number;
|
|
144
|
+
parallax?: number;
|
|
145
|
+
};
|
|
146
|
+
declare type ImageBackground = {
|
|
147
|
+
type: 'image';
|
|
148
|
+
id: string;
|
|
149
|
+
payload: BackgroundImage;
|
|
150
|
+
};
|
|
151
|
+
declare type BackgroundVideoAspectRatio = 'wide' | 'standard';
|
|
152
|
+
declare type BackgroundVideo = {
|
|
153
|
+
url?: string;
|
|
154
|
+
maskColor?: Color | null;
|
|
155
|
+
opacity?: number;
|
|
156
|
+
zoom?: number;
|
|
157
|
+
aspectRatio?: BackgroundVideoAspectRatio;
|
|
158
|
+
parallax?: number;
|
|
159
|
+
};
|
|
160
|
+
declare type VideoBackground = {
|
|
161
|
+
type: 'video';
|
|
162
|
+
id: string;
|
|
163
|
+
payload: BackgroundVideo;
|
|
164
|
+
};
|
|
165
|
+
declare type Background = ColorBackground | GradientBackground | ImageBackground | VideoBackground;
|
|
166
|
+
export declare type BackgroundsValue = ResponsiveValue<Background[]>;
|
|
167
|
+
declare type BackgroundsOptions = Options<Record<string, never>>;
|
|
168
|
+
declare type BackgroundsDescriptor<_T = BackgroundsValue> = {
|
|
169
|
+
type: typeof Types.Backgrounds;
|
|
170
|
+
options: BackgroundsOptions;
|
|
171
|
+
};
|
|
172
|
+
export declare function Backgrounds(options?: BackgroundsOptions): BackgroundsDescriptor;
|
|
173
|
+
declare type BorderSideStyle = 'dashed' | 'dotted' | 'solid';
|
|
174
|
+
declare type BorderSide = {
|
|
175
|
+
width: number | null | undefined;
|
|
176
|
+
style: BorderSideStyle;
|
|
177
|
+
color?: Color | null;
|
|
178
|
+
};
|
|
179
|
+
declare type Border = {
|
|
180
|
+
[K in 'top' | 'right' | 'bottom' | 'left' as `border${Capitalize<K>}`]: BorderSide | null | undefined;
|
|
181
|
+
};
|
|
182
|
+
export declare type BorderValue = ResponsiveValue<Border>;
|
|
183
|
+
declare type BorderOptions = Options<Record<string, never>>;
|
|
184
|
+
declare type BorderDescriptor<_T = BorderValue> = {
|
|
185
|
+
type: typeof Types.Border;
|
|
186
|
+
options: BorderOptions;
|
|
187
|
+
};
|
|
188
|
+
export declare function Border(options?: BorderOptions): BorderDescriptor;
|
|
189
|
+
declare type BorderRadius = {
|
|
190
|
+
[K in 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' as `border${Capitalize<K>}Radius`]: Length | null | undefined;
|
|
191
|
+
};
|
|
192
|
+
export declare type BorderRadiusValue = ResponsiveValue<BorderRadius>;
|
|
193
|
+
declare type BorderRadiusOptions = Options<Record<string, never>>;
|
|
194
|
+
declare type BorderRadiusDescriptor<_T = BorderRadiusValue> = {
|
|
195
|
+
type: typeof Types.BorderRadius;
|
|
196
|
+
options: BorderRadiusOptions;
|
|
197
|
+
};
|
|
198
|
+
export declare function BorderRadius(options?: BorderRadiusOptions): BorderRadiusDescriptor;
|
|
199
|
+
export declare type CheckboxValue = boolean;
|
|
200
|
+
declare type CheckboxOptions = Options<{
|
|
201
|
+
preset?: CheckboxValue;
|
|
202
|
+
label: string;
|
|
203
|
+
hidden?: boolean;
|
|
204
|
+
}>;
|
|
205
|
+
declare type CheckboxDescriptor<_T = CheckboxValue> = {
|
|
206
|
+
type: typeof Types.Checkbox;
|
|
207
|
+
options: CheckboxOptions;
|
|
208
|
+
};
|
|
209
|
+
export declare function Checkbox(options: CheckboxOptions): CheckboxDescriptor;
|
|
210
|
+
export declare type DateValue = string;
|
|
211
|
+
declare type DateOptions = Options<{
|
|
212
|
+
preset?: DateValue;
|
|
213
|
+
}>;
|
|
214
|
+
declare type DateDescriptor<_T = DateValue> = {
|
|
215
|
+
type: typeof Types.Date;
|
|
216
|
+
options: DateOptions;
|
|
217
|
+
};
|
|
218
|
+
export declare function Date(options?: DateOptions): DateDescriptor;
|
|
219
|
+
export declare type ElementIDValue = string;
|
|
220
|
+
declare type ElementIDOptions = Options<Record<string, never>>;
|
|
221
|
+
declare type ElementIDDescriptor<_T = ElementIDValue> = {
|
|
222
|
+
type: typeof Types.ElementID;
|
|
223
|
+
options: ElementIDOptions;
|
|
224
|
+
};
|
|
225
|
+
export declare function ElementID(options?: ElementIDOptions): ElementIDDescriptor;
|
|
226
|
+
export declare type FontValue = ResponsiveValue<string>;
|
|
227
|
+
declare type FontOptions = Options<{
|
|
228
|
+
preset?: FontValue;
|
|
229
|
+
label?: string;
|
|
230
|
+
}>;
|
|
231
|
+
declare type FontDescriptor<_T = FontValue> = {
|
|
232
|
+
type: typeof Types.Font;
|
|
233
|
+
options: FontOptions;
|
|
234
|
+
};
|
|
235
|
+
export declare function Font(options?: FontOptions): FontDescriptor;
|
|
236
|
+
export declare type GapXValue = ResponsiveValue<Gap>;
|
|
237
|
+
declare type GapXOptions = Options<{
|
|
238
|
+
preset?: GapXValue;
|
|
239
|
+
label?: string;
|
|
240
|
+
defaultValue?: Gap;
|
|
241
|
+
min?: number;
|
|
242
|
+
max?: number;
|
|
243
|
+
step?: number;
|
|
244
|
+
hidden?: boolean;
|
|
245
|
+
}>;
|
|
246
|
+
declare type GapXDescriptor<_T = GapXValue> = {
|
|
247
|
+
type: typeof Types.GapX;
|
|
248
|
+
options: GapXOptions;
|
|
249
|
+
};
|
|
250
|
+
export declare function GapX(options?: GapXOptions): GapXDescriptor;
|
|
251
|
+
export declare type GapYValue = ResponsiveValue<Gap>;
|
|
252
|
+
declare type GapYOptions = Options<{
|
|
253
|
+
preset?: GapYValue;
|
|
254
|
+
label?: string;
|
|
255
|
+
defaultValue?: Gap;
|
|
256
|
+
step?: number;
|
|
257
|
+
min?: number;
|
|
258
|
+
max?: number;
|
|
259
|
+
hidden?: boolean;
|
|
260
|
+
}>;
|
|
261
|
+
declare type GapYDescriptor<_T = GapYValue> = {
|
|
262
|
+
type: typeof Types.GapY;
|
|
263
|
+
options: GapYOptions;
|
|
264
|
+
};
|
|
265
|
+
export declare function GapY(options?: GapYOptions): GapYDescriptor;
|
|
266
|
+
declare type GridColumn = {
|
|
267
|
+
count: number;
|
|
268
|
+
spans: number[][];
|
|
269
|
+
};
|
|
270
|
+
export declare type GridValue = {
|
|
271
|
+
elements: Element[];
|
|
272
|
+
columns: ResponsiveValue<GridColumn>;
|
|
273
|
+
};
|
|
274
|
+
declare type GridOptions = Options<Record<string, never>>;
|
|
275
|
+
declare type GridDescriptor<_T = GridValue> = {
|
|
276
|
+
type: typeof Types.Grid;
|
|
277
|
+
options: GridOptions;
|
|
278
|
+
};
|
|
279
|
+
export declare function Grid(options?: GridOptions): GridDescriptor;
|
|
280
|
+
export declare type ImageValue = string;
|
|
281
|
+
declare type ImageOptions = Options<{
|
|
282
|
+
label?: string;
|
|
283
|
+
hidden?: boolean;
|
|
284
|
+
}>;
|
|
285
|
+
declare type ImageDescriptor<_T = ImageValue> = {
|
|
286
|
+
type: typeof Types.Image;
|
|
287
|
+
options: ImageOptions;
|
|
288
|
+
};
|
|
289
|
+
export declare function Image(options?: ImageOptions): ImageDescriptor;
|
|
290
|
+
export declare type ImagesValue = {
|
|
291
|
+
key: string;
|
|
292
|
+
props: {
|
|
293
|
+
link?: Link;
|
|
294
|
+
file?: string;
|
|
295
|
+
altText?: string;
|
|
296
|
+
};
|
|
297
|
+
}[];
|
|
298
|
+
declare type ImagesOptions = Options<{
|
|
299
|
+
preset?: ImagesValue;
|
|
300
|
+
}>;
|
|
301
|
+
declare type ImagesDescriptor<_T = ImagesValue> = {
|
|
302
|
+
type: typeof Types.Images;
|
|
303
|
+
options: ImagesOptions;
|
|
304
|
+
};
|
|
305
|
+
export declare function Images(options?: ImagesOptions): ImagesDescriptor;
|
|
306
|
+
export declare type LinkValue = Link;
|
|
307
|
+
declare type LinkOptions = Options<{
|
|
308
|
+
preset?: LinkValue;
|
|
309
|
+
label?: string;
|
|
310
|
+
defaultValue?: Link;
|
|
311
|
+
options?: {
|
|
312
|
+
value: Link['type'];
|
|
313
|
+
label: string;
|
|
314
|
+
}[];
|
|
315
|
+
hidden?: boolean;
|
|
316
|
+
}>;
|
|
317
|
+
declare type LinkDescriptor<_T = LinkValue> = {
|
|
318
|
+
type: typeof Types.Link;
|
|
319
|
+
options: LinkOptions;
|
|
320
|
+
};
|
|
321
|
+
export declare function Link(options?: LinkOptions): LinkDescriptor;
|
|
322
|
+
declare type MarginSide = {
|
|
323
|
+
value: number;
|
|
324
|
+
unit: 'px';
|
|
325
|
+
} | 'auto';
|
|
326
|
+
declare type Margin = {
|
|
327
|
+
[K in 'top' | 'right' | 'bottom' | 'left' as `margin${Capitalize<K>}`]: MarginSide | null | undefined;
|
|
328
|
+
};
|
|
329
|
+
export declare type MarginValue = ResponsiveValue<Margin>;
|
|
330
|
+
declare type MarginOptions = Options<{
|
|
331
|
+
preset?: MarginValue;
|
|
332
|
+
}>;
|
|
333
|
+
declare type MarginDescriptor<_T = MarginValue> = {
|
|
334
|
+
type: typeof Types.Margin;
|
|
335
|
+
options: MarginOptions;
|
|
336
|
+
};
|
|
337
|
+
export declare function Margin(options?: MarginOptions): MarginDescriptor;
|
|
338
|
+
declare type ButtonVariant = 'flat' | 'outline' | 'shadow' | 'clear' | 'blocky' | 'bubbly' | 'skewed';
|
|
339
|
+
declare type ButtonShape = 'pill' | 'rounded' | 'square';
|
|
340
|
+
declare type ButtonSize = 'small' | 'medium' | 'large';
|
|
341
|
+
declare type NavigationButton = {
|
|
342
|
+
id: string;
|
|
343
|
+
type: 'button';
|
|
344
|
+
payload: {
|
|
345
|
+
label: string;
|
|
346
|
+
link?: Link;
|
|
347
|
+
variant?: ResponsiveValue<ButtonVariant>;
|
|
348
|
+
shape?: ResponsiveValue<ButtonShape>;
|
|
349
|
+
size?: ResponsiveValue<ButtonSize>;
|
|
350
|
+
textColor?: ResponsiveValue<Color>;
|
|
351
|
+
color?: ResponsiveValue<Color>;
|
|
352
|
+
textStyle?: ResponsiveValue<TextStyle>;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
declare type NavigationDropdownCaretType = 'caret' | 'plus' | 'arrow-down' | 'chevron-down';
|
|
356
|
+
declare type NavigationDropdownLink = {
|
|
357
|
+
id: string;
|
|
358
|
+
payload: {
|
|
359
|
+
label: string;
|
|
360
|
+
link?: Link;
|
|
361
|
+
color?: ResponsiveValue<Color>;
|
|
362
|
+
textStyle?: ResponsiveValue<TextStyle>;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
declare type NavigationDropdown = {
|
|
366
|
+
id: string;
|
|
367
|
+
type: 'dropdown';
|
|
368
|
+
payload: {
|
|
369
|
+
label: string;
|
|
370
|
+
caret?: NavigationDropdownCaretType;
|
|
371
|
+
links?: NavigationDropdownLink[];
|
|
372
|
+
variant?: ResponsiveValue<ButtonVariant>;
|
|
373
|
+
shape?: ResponsiveValue<ButtonShape>;
|
|
374
|
+
size?: ResponsiveValue<ButtonSize>;
|
|
375
|
+
textColor?: ResponsiveValue<Color>;
|
|
376
|
+
color?: ResponsiveValue<Color>;
|
|
377
|
+
textStyle?: ResponsiveValue<TextStyle>;
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
export declare type NavigationLinksValue = (NavigationButton | NavigationDropdown)[];
|
|
381
|
+
declare type NavigationLinksOptions = Options<Record<string, never>>;
|
|
382
|
+
declare type NavigationLinksDescriptor<_T = NavigationLinksValue> = {
|
|
383
|
+
type: typeof Types.NavigationLinks;
|
|
384
|
+
options: NavigationLinksOptions;
|
|
385
|
+
};
|
|
386
|
+
export declare function NavigationLinks(options?: NavigationLinksOptions): NavigationLinksDescriptor;
|
|
387
|
+
export declare type NumberValue = number;
|
|
388
|
+
declare type NumberOptions = Options<{
|
|
389
|
+
preset?: NumberValue;
|
|
390
|
+
label?: string;
|
|
391
|
+
defaultValue?: number;
|
|
392
|
+
min?: number;
|
|
393
|
+
max?: number;
|
|
394
|
+
step?: number;
|
|
395
|
+
suffix?: string;
|
|
396
|
+
hidden?: boolean;
|
|
397
|
+
}>;
|
|
398
|
+
declare type NumberDescriptor<_T = NumberValue> = {
|
|
399
|
+
type: typeof Types.Number;
|
|
400
|
+
options: NumberOptions;
|
|
401
|
+
};
|
|
402
|
+
export declare function Number(options?: NumberOptions): NumberDescriptor;
|
|
403
|
+
declare type PaddingSide = {
|
|
404
|
+
value: number;
|
|
405
|
+
unit: 'px';
|
|
406
|
+
};
|
|
407
|
+
declare type Padding = {
|
|
408
|
+
[K in 'top' | 'right' | 'bottom' | 'left' as `padding${Capitalize<K>}`]: PaddingSide | null | undefined;
|
|
409
|
+
};
|
|
410
|
+
export declare type PaddingValue = ResponsiveValue<Padding>;
|
|
411
|
+
declare type PaddingOptions = Options<{
|
|
412
|
+
preset?: PaddingValue;
|
|
413
|
+
}>;
|
|
414
|
+
declare type PaddingDescriptor<_T = PaddingValue> = {
|
|
415
|
+
type: typeof Types.Padding;
|
|
416
|
+
options: PaddingOptions;
|
|
417
|
+
};
|
|
418
|
+
export declare function Padding(options?: PaddingOptions): PaddingDescriptor;
|
|
419
|
+
export declare type ResponsiveColorValue = ResponsiveValue<Color>;
|
|
420
|
+
declare type ResponsiveColorOptions = Options<{
|
|
421
|
+
label?: string;
|
|
422
|
+
placeholder?: string;
|
|
423
|
+
hidden?: boolean;
|
|
424
|
+
}>;
|
|
425
|
+
declare type ResponsiveColorDescriptor<_T = ResponsiveColorValue> = {
|
|
426
|
+
type: typeof Types.ResponsiveColor;
|
|
427
|
+
options: ResponsiveColorOptions;
|
|
428
|
+
};
|
|
429
|
+
export declare function ResponsiveColor(options?: ResponsiveColorOptions): ResponsiveColorDescriptor;
|
|
430
|
+
declare type IconRadioGroupOption<T extends string> = {
|
|
431
|
+
value: T;
|
|
432
|
+
label: string;
|
|
433
|
+
icon: IconName;
|
|
434
|
+
};
|
|
435
|
+
export declare type ResponsiveIconRadioGroupValue<T extends string> = ResponsiveValue<T>;
|
|
436
|
+
declare type ResponsiveIconRadioGroupOptions<T extends string, U extends T = T> = Options<{
|
|
437
|
+
label?: string;
|
|
438
|
+
options: IconRadioGroupOption<T>[];
|
|
439
|
+
defaultValue?: U;
|
|
440
|
+
hidden?: boolean;
|
|
441
|
+
}>;
|
|
442
|
+
declare type ResponsiveIconRadioGroupDescriptor<T extends ResponsiveIconRadioGroupValue<string>> = {
|
|
443
|
+
type: typeof Types.ResponsiveIconRadioGroup;
|
|
444
|
+
options: ResponsiveIconRadioGroupOptions<ResponsiveValueType<T>>;
|
|
445
|
+
};
|
|
446
|
+
export declare function ResponsiveIconRadioGroup<_T extends string, T extends _T, U extends T>(options: ResponsiveIconRadioGroupOptions<T, U>): ResponsiveIconRadioGroupDescriptor<ResponsiveIconRadioGroupValue<T>>;
|
|
447
|
+
export declare type ResponsiveLengthValue = ResponsiveValue<Length>;
|
|
448
|
+
declare type LengthOption = {
|
|
449
|
+
value: 'px';
|
|
450
|
+
label: 'Pixels';
|
|
451
|
+
icon: 'Px16';
|
|
452
|
+
} | {
|
|
453
|
+
value: '%';
|
|
454
|
+
label: 'Percentage';
|
|
455
|
+
icon: 'Percent16';
|
|
456
|
+
};
|
|
457
|
+
declare type ResponsiveLengthOptions = Options<{
|
|
458
|
+
label?: string;
|
|
459
|
+
options?: LengthOption[];
|
|
460
|
+
defaultValue?: Length;
|
|
461
|
+
hidden?: boolean;
|
|
462
|
+
}>;
|
|
463
|
+
declare type ResponsiveLengthDescriptor<_T = ResponsiveLengthValue> = {
|
|
464
|
+
type: typeof Types.ResponsiveLength;
|
|
465
|
+
options: ResponsiveLengthOptions;
|
|
466
|
+
};
|
|
467
|
+
export declare function ResponsiveLength(options?: ResponsiveLengthOptions): ResponsiveLengthDescriptor;
|
|
468
|
+
export declare type ResponsiveNumberValue = ResponsiveValue<number>;
|
|
469
|
+
declare type ResponsiveNumberOptions = Options<{
|
|
470
|
+
label?: string;
|
|
471
|
+
defaultValue?: number;
|
|
472
|
+
min?: number;
|
|
473
|
+
max?: number;
|
|
474
|
+
step?: number;
|
|
475
|
+
suffix?: string;
|
|
476
|
+
hidden?: boolean;
|
|
477
|
+
}>;
|
|
478
|
+
declare type ResponsiveNumberDescriptor<_T = ResponsiveNumberValue> = {
|
|
479
|
+
type: typeof Types.ResponsiveNumber;
|
|
480
|
+
options: ResponsiveNumberOptions;
|
|
481
|
+
};
|
|
482
|
+
export declare function ResponsiveNumber(options?: ResponsiveNumberOptions): ResponsiveNumberDescriptor;
|
|
483
|
+
export declare type ResponsiveOpacityValue = ResponsiveValue<number>;
|
|
484
|
+
declare type ResponsiveOpacityOptions = Options<Record<string, never>>;
|
|
485
|
+
declare type ResponsiveOpacityDescriptor<_T = ResponsiveOpacityValue> = {
|
|
486
|
+
type: typeof Types.ResponsiveOpacity;
|
|
487
|
+
options: ResponsiveOpacityOptions;
|
|
488
|
+
};
|
|
489
|
+
export declare function ResponsiveOpacity(options?: ResponsiveOpacityOptions): ResponsiveOpacityDescriptor;
|
|
490
|
+
export declare type ResponsiveSelectValue<T extends string> = ResponsiveValue<T>;
|
|
491
|
+
declare type SelectLabelOrientation = 'vertical' | 'horizontal';
|
|
492
|
+
declare type SelectOption<T extends string> = {
|
|
493
|
+
value: T;
|
|
494
|
+
label: string;
|
|
495
|
+
};
|
|
496
|
+
declare type ResponsiveSelectOptions<T extends string, U extends T = T> = Options<{
|
|
497
|
+
label?: string;
|
|
498
|
+
labelOrientation?: SelectLabelOrientation;
|
|
499
|
+
options: SelectOption<T>[];
|
|
500
|
+
defaultValue?: U;
|
|
501
|
+
hidden?: boolean;
|
|
502
|
+
}>;
|
|
503
|
+
declare type ResponsiveSelectDescriptor<T extends ResponsiveSelectValue<string>> = {
|
|
504
|
+
type: typeof Types.ResponsiveSelect;
|
|
505
|
+
options: ResponsiveSelectOptions<ResponsiveValueType<T>>;
|
|
506
|
+
};
|
|
507
|
+
export declare function ResponsiveSelect<_T extends string, T extends _T, U extends T>(options: ResponsiveSelectOptions<T, U>): ResponsiveSelectDescriptor<ResponsiveSelectValue<T>>;
|
|
508
|
+
export declare type RichTextValue = IndexSignatureHack<Slate.ValueJSON>;
|
|
509
|
+
declare type RichTextOptions = Options<{
|
|
510
|
+
preset?: RichTextValue;
|
|
511
|
+
}>;
|
|
512
|
+
declare type RichTextDescriptor<_T extends Data = RichTextValue> = {
|
|
513
|
+
type: typeof Types.RichText;
|
|
514
|
+
options: RichTextOptions;
|
|
515
|
+
};
|
|
516
|
+
export declare function RichText(options?: RichTextOptions): RichTextDescriptor;
|
|
517
|
+
declare type Shadow = {
|
|
518
|
+
color?: Color | null;
|
|
519
|
+
blurRadius?: number;
|
|
520
|
+
spreadRadius?: number;
|
|
521
|
+
offsetX?: number;
|
|
522
|
+
offsetY?: number;
|
|
523
|
+
inset?: boolean;
|
|
524
|
+
};
|
|
525
|
+
declare type Shadows = {
|
|
526
|
+
id: string;
|
|
527
|
+
payload: Shadow;
|
|
528
|
+
}[];
|
|
529
|
+
export declare type ShadowsValue = ResponsiveValue<Shadows>;
|
|
530
|
+
declare type ShadowsOptions = Options<Record<string, never>>;
|
|
531
|
+
declare type ShadowsDescriptor<_T = ShadowsValue> = {
|
|
532
|
+
type: typeof Types.Shadows;
|
|
533
|
+
options: ShadowsOptions;
|
|
534
|
+
};
|
|
535
|
+
export declare function Shadows(options?: ShadowsOptions): ShadowsDescriptor;
|
|
536
|
+
declare type SocialLinkType = 'angellist' | 'codepen' | 'dribbble' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'medium' | 'pinterest' | 'reddit' | 'rss' | 'snapchat' | 'soundcloud' | 'spotify' | 'telegram' | 'tumblr' | 'twitch' | 'twitter' | 'vimeo' | 'whatsapp' | 'yelp' | 'youtube';
|
|
537
|
+
declare type SocialLink = {
|
|
538
|
+
type: SocialLinkType;
|
|
539
|
+
url: string;
|
|
540
|
+
};
|
|
541
|
+
declare type SocialLinksLink = {
|
|
542
|
+
id: string;
|
|
543
|
+
payload: SocialLink;
|
|
544
|
+
};
|
|
545
|
+
export declare type SocialLinksValue = {
|
|
546
|
+
links: SocialLinksLink[];
|
|
547
|
+
openInNewTab: boolean;
|
|
548
|
+
};
|
|
549
|
+
declare type SocialLinksOptions = Options<{
|
|
550
|
+
preset?: SocialLinksValue;
|
|
551
|
+
}>;
|
|
552
|
+
declare type SocialLinksDescriptor<_T = SocialLinksValue> = {
|
|
553
|
+
type: typeof Types.SocialLinks;
|
|
554
|
+
options: SocialLinksOptions;
|
|
555
|
+
};
|
|
556
|
+
export declare function SocialLinks(options?: SocialLinksOptions): SocialLinksDescriptor;
|
|
557
|
+
export declare type TableValue = string;
|
|
558
|
+
declare type TableOptions = Options<{
|
|
559
|
+
preset?: TableValue;
|
|
560
|
+
}>;
|
|
561
|
+
declare type TableDescriptor<_T = TableValue> = {
|
|
562
|
+
type: typeof Types.Table;
|
|
563
|
+
options: TableOptions;
|
|
564
|
+
};
|
|
565
|
+
export declare function Table(options?: TableOptions): TableDescriptor;
|
|
566
|
+
declare type TableFormField = {
|
|
567
|
+
id: string;
|
|
568
|
+
tableColumnId: string;
|
|
569
|
+
label?: string;
|
|
570
|
+
placeholder?: string;
|
|
571
|
+
defaultValue?: string | boolean | string[];
|
|
572
|
+
required?: boolean;
|
|
573
|
+
hidden?: boolean;
|
|
574
|
+
type?: 'select' | 'radio';
|
|
575
|
+
hideLabel?: boolean;
|
|
576
|
+
autofill?: boolean;
|
|
577
|
+
};
|
|
578
|
+
declare type Grid = {
|
|
579
|
+
count: number;
|
|
580
|
+
spans: number[][];
|
|
581
|
+
};
|
|
582
|
+
export declare type TableFormFieldsValue = {
|
|
583
|
+
fields: TableFormField[];
|
|
584
|
+
grid: ResponsiveValue<Grid>;
|
|
585
|
+
};
|
|
586
|
+
declare type TableFormFieldsOptions = Options<{
|
|
587
|
+
preset?: TableFormFieldsValue;
|
|
588
|
+
}>;
|
|
589
|
+
declare type TableFormFieldsDescriptor<_T = TableFormFieldsValue> = {
|
|
590
|
+
type: typeof Types.TableFormFields;
|
|
591
|
+
options: TableFormFieldsOptions;
|
|
592
|
+
};
|
|
593
|
+
export declare function TableFormFields(options?: TableFormFieldsOptions): TableFormFieldsDescriptor;
|
|
594
|
+
export declare type TextAreaValue = string;
|
|
595
|
+
declare type TextAreaOptions = Options<{
|
|
596
|
+
preset?: TextAreaValue;
|
|
597
|
+
label?: string;
|
|
598
|
+
rows?: number;
|
|
599
|
+
}>;
|
|
600
|
+
declare type TextAreaDescriptor<_T = TextAreaValue> = {
|
|
601
|
+
type: typeof Types.TextArea;
|
|
602
|
+
options: TextAreaOptions;
|
|
603
|
+
};
|
|
604
|
+
export declare function TextArea(options?: TextAreaOptions): TextAreaDescriptor;
|
|
605
|
+
export declare type TextInputValue = string;
|
|
606
|
+
declare type TextInputOptions = Options<{
|
|
607
|
+
label?: string;
|
|
608
|
+
placeholder?: string;
|
|
609
|
+
hidden?: boolean;
|
|
610
|
+
}>;
|
|
611
|
+
declare type TextInputDescriptor<_T = TextInputValue> = {
|
|
612
|
+
type: typeof Types.TextInput;
|
|
613
|
+
options: TextInputOptions;
|
|
614
|
+
};
|
|
615
|
+
export declare function TextInput(options?: TextInputOptions): TextInputDescriptor;
|
|
616
|
+
export declare type TextStyleValue = ResponsiveValue<TextStyle>;
|
|
617
|
+
declare type TextStyleOptions = Options<{
|
|
618
|
+
preset?: TextStyleValue;
|
|
619
|
+
label?: string;
|
|
620
|
+
hidden?: boolean;
|
|
621
|
+
}>;
|
|
622
|
+
declare type TextStyleDescriptor<_T = TextStyleValue> = {
|
|
623
|
+
type: typeof Types.TextStyle;
|
|
624
|
+
options: TextStyleOptions;
|
|
625
|
+
};
|
|
626
|
+
export declare function TextStyle(options?: TextStyleOptions): TextStyleDescriptor;
|
|
627
|
+
declare type Video = {
|
|
628
|
+
url?: string;
|
|
629
|
+
muted?: boolean;
|
|
630
|
+
playing?: boolean;
|
|
631
|
+
loop?: boolean;
|
|
632
|
+
controls?: boolean;
|
|
633
|
+
};
|
|
634
|
+
export declare type VideoValue = Video;
|
|
635
|
+
declare type VideoOptions = Options<{
|
|
636
|
+
preset?: VideoValue;
|
|
637
|
+
}>;
|
|
638
|
+
declare type VideoDescriptor<_T = VideoValue> = {
|
|
639
|
+
type: typeof Types.Video;
|
|
640
|
+
options: VideoOptions;
|
|
641
|
+
};
|
|
642
|
+
export declare function Video(options?: VideoOptions): VideoDescriptor;
|
|
643
|
+
export declare type WidthValue = ResponsiveValue<Length>;
|
|
644
|
+
declare type WidthOptions = Options<{
|
|
645
|
+
preset?: WidthValue;
|
|
646
|
+
defaultValue?: Length;
|
|
647
|
+
}>;
|
|
648
|
+
declare type WidthDescriptor<_T = WidthValue> = {
|
|
649
|
+
type: typeof Types.Width;
|
|
650
|
+
options: WidthOptions;
|
|
651
|
+
};
|
|
652
|
+
export declare function Width(options?: WidthOptions): WidthDescriptor;
|
|
653
|
+
export declare type Descriptor<T extends Data = Data> = BackgroundsDescriptor<T> | BorderDescriptor<T> | BorderRadiusDescriptor<T> | CheckboxDescriptor<T> | DateDescriptor<T> | ElementIDDescriptor<T> | FontDescriptor<T> | GapXDescriptor<T> | GapYDescriptor<T> | GridDescriptor<T> | ImageDescriptor<T> | ImagesDescriptor<T> | LinkDescriptor<T> | MarginDescriptor<T> | NavigationLinksDescriptor<T> | NumberDescriptor<T> | PaddingDescriptor<T> | ResponsiveColorDescriptor<T> | ResponsiveIconRadioGroupDescriptor<T extends ResponsiveIconRadioGroupValue<string> ? T : ResponsiveIconRadioGroupValue<string>> | ResponsiveLengthDescriptor<T> | ResponsiveNumberDescriptor<T> | ResponsiveOpacityDescriptor<T> | ResponsiveSelectDescriptor<T extends ResponsiveSelectValue<string> ? T : ResponsiveSelectValue<string>> | RichTextDescriptor<T> | ShadowsDescriptor<T> | SocialLinksDescriptor<T> | TableDescriptor<T> | TableFormFieldsDescriptor<T> | TextAreaDescriptor<T> | TextInputDescriptor<T> | TextStyleDescriptor<T> | VideoDescriptor<T> | WidthDescriptor<T>;
|
|
654
|
+
export declare type DescriptorValueType<T extends Descriptor> = T extends Descriptor<infer U> ? U : never;
|
|
655
|
+
export {};
|
|
656
|
+
//# sourceMappingURL=descriptors.d.ts.map
|