@makeswift/runtime 0.7.16 → 0.7.18
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/Box.cjs.js +1 -1
- package/dist/Box.es.js +1 -1
- package/dist/Button.cjs.js +2 -2
- package/dist/Button.es.js +2 -2
- package/dist/Carousel.cjs.js +3 -3
- package/dist/Carousel.es.js +3 -3
- package/dist/Countdown.cjs.js +3 -3
- package/dist/Countdown.es.js +3 -3
- package/dist/Divider.cjs.js +3 -3
- package/dist/Divider.es.js +3 -3
- package/dist/Embed.cjs.js +3 -3
- package/dist/Embed.es.js +3 -3
- package/dist/Form.cjs.js +1 -1
- package/dist/Form.es.js +1 -1
- package/dist/Image.cjs.js +3 -3
- package/dist/Image.es.js +3 -3
- package/dist/LiveProvider.cjs.js +3 -3
- package/dist/LiveProvider.es.js +4 -4
- package/dist/Navigation.cjs.js +3 -3
- package/dist/Navigation.es.js +3 -3
- package/dist/PreviewProvider.cjs.js +8 -8
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +2 -2
- package/dist/ReadOnlyText.cjs.js +55 -55
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +3 -3
- package/dist/Root.cjs.js +3 -3
- package/dist/Root.es.js +3 -3
- package/dist/SocialLinks.cjs.js +2 -2
- package/dist/SocialLinks.es.js +2 -2
- package/dist/Text.cjs.js +4 -4
- package/dist/Text.es.js +4 -4
- package/dist/Video.cjs.js +3 -3
- package/dist/Video.es.js +3 -3
- package/dist/builder.cjs.js +2 -2
- package/dist/builder.es.js +2 -2
- package/dist/components.cjs.js +1 -1
- package/dist/components.es.js +1 -1
- package/dist/constants.cjs.js +14 -14
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +1 -1
- package/dist/control-serialization.cjs.js +41 -41
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +46 -44
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +2 -2
- package/dist/{rich-text.cjs.js → descriptors.cjs.js} +476 -459
- package/dist/descriptors.cjs.js.map +1 -0
- package/dist/{rich-text.es.js → descriptors.es.js} +467 -452
- package/dist/descriptors.es.js.map +1 -0
- package/dist/index.cjs.js +242 -211
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs5.js +568 -37
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +17 -697
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +327 -0
- package/dist/index.cjs7.js.map +1 -0
- package/dist/index.es.js +46 -15
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es5.js +558 -35
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +16 -692
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +320 -0
- package/dist/index.es7.js.map +1 -0
- package/dist/introspection.cjs.js +22 -22
- package/dist/introspection.cjs.js.map +1 -1
- package/dist/introspection.es.js +1 -1
- package/dist/leaf.cjs.js +1 -0
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +2 -2
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +1 -1
- package/dist/next.cjs.js +3 -3
- package/dist/next.es.js +3 -3
- package/dist/prop-controllers.cjs.js +5 -5
- package/dist/prop-controllers.es.js +2 -2
- package/dist/react.cjs.js +3 -3
- package/dist/react.es.js +3 -3
- package/dist/slate.cjs.js +48 -0
- package/dist/slate.cjs.js.map +1 -0
- package/dist/slate.es.js +39 -0
- package/dist/slate.es.js.map +1 -0
- package/dist/types/src/components/builtin/Button/Button.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
- package/dist/types/src/controls/control.d.ts +3 -2
- package/dist/types/src/controls/control.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/dto-types.d.ts +1 -2
- package/dist/types/src/controls/rich-text/dto-types.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +1 -1
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/style.d.ts +17 -0
- package/dist/types/src/controls/style.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +1 -2
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/instances.d.ts +3 -3
- package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +3 -2
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/style.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
- package/package.json +5 -4
- package/slate.js +1 -0
- package/dist/rich-text.cjs.js.map +0 -1
- package/dist/rich-text.es.js.map +0 -1
|
@@ -22,9 +22,9 @@ var __publicField = (obj, key, value) => {
|
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
24
|
const import_meta = {};
|
|
25
|
-
import { A as ActionTypes } from "./actions.es.js";
|
|
26
25
|
import { Transforms, Editor, Text } from "slate";
|
|
27
26
|
import { ReactEditor } from "slate-react";
|
|
27
|
+
import { A as ActionTypes } from "./actions.es.js";
|
|
28
28
|
const BuilderEditMode = {
|
|
29
29
|
BUILD: "build",
|
|
30
30
|
CONTENT: "content",
|
|
@@ -41,431 +41,27 @@ function reducer(state = getInitialState(), action) {
|
|
|
41
41
|
return state;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const ColorControlType = "makeswift::controls::color";
|
|
45
|
-
function Color(config = {}) {
|
|
46
|
-
return { type: ColorControlType, config };
|
|
47
|
-
}
|
|
48
|
-
function copyColorData(value, context) {
|
|
49
|
-
var _a;
|
|
50
|
-
if (value == null)
|
|
51
|
-
return value;
|
|
52
|
-
return __spreadProps(__spreadValues({}, value), {
|
|
53
|
-
swatchId: (_a = context.replacementContext.swatchIds.get(value.swatchId)) != null ? _a : value.swatchId
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
const StyleControlType = "makeswift::controls::style";
|
|
57
|
-
const StyleControlProperty = {
|
|
58
|
-
Width: "makeswift::controls::style::property::width",
|
|
59
|
-
Margin: "makeswift::controls::style::property::margin",
|
|
60
|
-
Padding: "makeswift::controls::style::property::padding",
|
|
61
|
-
Border: "makeswift::controls::style::property::border",
|
|
62
|
-
BorderRadius: "makeswift::controls::style::property::border-radius",
|
|
63
|
-
TextStyle: "makeswift::controls::style::property::text-style"
|
|
64
|
-
};
|
|
65
|
-
const StyleControlDefaultProperties = [
|
|
66
|
-
StyleControlProperty.Width,
|
|
67
|
-
StyleControlProperty.Margin
|
|
68
|
-
];
|
|
69
|
-
const AllStyleControlProperties = [
|
|
70
|
-
StyleControlProperty.Width,
|
|
71
|
-
StyleControlProperty.Margin,
|
|
72
|
-
StyleControlProperty.Padding,
|
|
73
|
-
StyleControlProperty.Border,
|
|
74
|
-
StyleControlProperty.BorderRadius,
|
|
75
|
-
StyleControlProperty.TextStyle
|
|
76
|
-
];
|
|
77
|
-
function Style(params) {
|
|
78
|
-
var _a;
|
|
79
|
-
return {
|
|
80
|
-
type: StyleControlType,
|
|
81
|
-
config: { properties: (_a = params == null ? void 0 : params.properties) != null ? _a : StyleControlDefaultProperties }
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
Style.Default = StyleControlDefaultProperties;
|
|
85
|
-
Style.All = AllStyleControlProperties;
|
|
86
|
-
Style.Width = StyleControlProperty.Width;
|
|
87
|
-
Style.Margin = StyleControlProperty.Margin;
|
|
88
|
-
Style.Padding = StyleControlProperty.Padding;
|
|
89
|
-
Style.Border = StyleControlProperty.Border;
|
|
90
|
-
Style.BorderRadius = StyleControlProperty.BorderRadius;
|
|
91
|
-
Style.TextStyle = StyleControlProperty.TextStyle;
|
|
92
|
-
function copyStyleData(value, context) {
|
|
93
|
-
if (value == null)
|
|
94
|
-
return value;
|
|
95
|
-
function copyResponsiveBorder(responsiveBorder) {
|
|
96
|
-
if (responsiveBorder == null)
|
|
97
|
-
return void 0;
|
|
98
|
-
return responsiveBorder.map((deviceBorder) => __spreadProps(__spreadValues({}, deviceBorder), {
|
|
99
|
-
value: copyBorder(deviceBorder.value)
|
|
100
|
-
}));
|
|
101
|
-
}
|
|
102
|
-
function copyBorder(border) {
|
|
103
|
-
function copyBorderSide(side) {
|
|
104
|
-
if (side == null)
|
|
105
|
-
return null;
|
|
106
|
-
if (side.color == null)
|
|
107
|
-
return side;
|
|
108
|
-
return __spreadProps(__spreadValues({}, side), {
|
|
109
|
-
color: copyColorData(side.color, context)
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
borderTop: copyBorderSide(border.borderTop),
|
|
114
|
-
borderBottom: copyBorderSide(border.borderBottom),
|
|
115
|
-
borderRight: copyBorderSide(border.borderRight),
|
|
116
|
-
borderLeft: copyBorderSide(border.borderLeft)
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
return __spreadProps(__spreadValues({}, value), { border: copyResponsiveBorder(value.border) });
|
|
120
|
-
}
|
|
121
|
-
if (import_meta.vitest) {
|
|
122
|
-
const { describe, test, expect } = import_meta.vitest;
|
|
123
|
-
describe.concurrent("style copy", () => {
|
|
124
|
-
test("colors are replaced", () => {
|
|
125
|
-
const value = {
|
|
126
|
-
width: [
|
|
127
|
-
{
|
|
128
|
-
value: {
|
|
129
|
-
unit: "px",
|
|
130
|
-
value: 100
|
|
131
|
-
},
|
|
132
|
-
deviceId: "desktop"
|
|
133
|
-
}
|
|
134
|
-
],
|
|
135
|
-
border: [
|
|
136
|
-
{
|
|
137
|
-
value: {
|
|
138
|
-
borderTop: {
|
|
139
|
-
color: {
|
|
140
|
-
alpha: 1,
|
|
141
|
-
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
142
|
-
},
|
|
143
|
-
style: "solid",
|
|
144
|
-
width: 9
|
|
145
|
-
},
|
|
146
|
-
borderLeft: {
|
|
147
|
-
color: {
|
|
148
|
-
alpha: 1,
|
|
149
|
-
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
150
|
-
},
|
|
151
|
-
style: "solid",
|
|
152
|
-
width: 9
|
|
153
|
-
},
|
|
154
|
-
borderRight: {
|
|
155
|
-
color: {
|
|
156
|
-
alpha: 1,
|
|
157
|
-
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
158
|
-
},
|
|
159
|
-
style: "solid",
|
|
160
|
-
width: 9
|
|
161
|
-
},
|
|
162
|
-
borderBottom: {
|
|
163
|
-
color: {
|
|
164
|
-
alpha: 1,
|
|
165
|
-
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
166
|
-
},
|
|
167
|
-
style: "solid",
|
|
168
|
-
width: 9
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
deviceId: "desktop"
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
textStyle: [
|
|
175
|
-
{
|
|
176
|
-
value: {
|
|
177
|
-
fontSize: {
|
|
178
|
-
unit: "px",
|
|
179
|
-
value: 46
|
|
180
|
-
},
|
|
181
|
-
fontStyle: [],
|
|
182
|
-
fontFamily: "Oswald",
|
|
183
|
-
fontWeight: 400,
|
|
184
|
-
letterSpacing: 5.2,
|
|
185
|
-
textTransform: []
|
|
186
|
-
},
|
|
187
|
-
deviceId: "desktop"
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
borderRadius: [
|
|
191
|
-
{
|
|
192
|
-
value: {
|
|
193
|
-
borderTopLeftRadius: {
|
|
194
|
-
unit: "px",
|
|
195
|
-
value: 4
|
|
196
|
-
},
|
|
197
|
-
borderTopRightRadius: {
|
|
198
|
-
unit: "px",
|
|
199
|
-
value: 4
|
|
200
|
-
},
|
|
201
|
-
borderBottomLeftRadius: {
|
|
202
|
-
unit: "px",
|
|
203
|
-
value: 4
|
|
204
|
-
},
|
|
205
|
-
borderBottomRightRadius: {
|
|
206
|
-
unit: "px",
|
|
207
|
-
value: 4
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
deviceId: "desktop"
|
|
211
|
-
}
|
|
212
|
-
]
|
|
213
|
-
};
|
|
214
|
-
const expected = JSON.parse(JSON.stringify(value).replaceAll("U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA==", "testing"));
|
|
215
|
-
const replacementContext = {
|
|
216
|
-
elementHtmlIds: /* @__PURE__ */ new Set(),
|
|
217
|
-
elementKeys: /* @__PURE__ */ new Map(),
|
|
218
|
-
swatchIds: /* @__PURE__ */ new Map([
|
|
219
|
-
["U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA==", "testing"]
|
|
220
|
-
]),
|
|
221
|
-
fileIds: /* @__PURE__ */ new Map(),
|
|
222
|
-
typographyIds: /* @__PURE__ */ new Map(),
|
|
223
|
-
tableIds: /* @__PURE__ */ new Map(),
|
|
224
|
-
tableColumnIds: /* @__PURE__ */ new Map(),
|
|
225
|
-
pageIds: /* @__PURE__ */ new Map(),
|
|
226
|
-
globalElementIds: /* @__PURE__ */ new Map(),
|
|
227
|
-
globalElementData: /* @__PURE__ */ new Map()
|
|
228
|
-
};
|
|
229
|
-
const result = copyStyleData(value, {
|
|
230
|
-
replacementContext,
|
|
231
|
-
copyElement: (node) => node
|
|
232
|
-
});
|
|
233
|
-
expect(result).toMatchObject(expected);
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
const Types = {
|
|
238
|
-
Backgrounds: "Backgrounds",
|
|
239
|
-
Border: "Border",
|
|
240
|
-
BorderRadius: "BorderRadius",
|
|
241
|
-
Checkbox: "Checkbox",
|
|
242
|
-
Date: "Date",
|
|
243
|
-
ElementID: "ElementID",
|
|
244
|
-
Font: "Font",
|
|
245
|
-
GapX: "GapX",
|
|
246
|
-
GapY: "GapY",
|
|
247
|
-
Grid: "Grid",
|
|
248
|
-
Image: "Image",
|
|
249
|
-
Images: "Images",
|
|
250
|
-
Link: "Link",
|
|
251
|
-
List: "List",
|
|
252
|
-
Margin: "Margin",
|
|
253
|
-
NavigationLinks: "NavigationLinks",
|
|
254
|
-
Number: "Number",
|
|
255
|
-
Padding: "Padding",
|
|
256
|
-
ResponsiveColor: "ResponsiveColor",
|
|
257
|
-
ResponsiveIconRadioGroup: "ResponsiveIconRadioGroup",
|
|
258
|
-
ResponsiveLength: "ResponsiveLength",
|
|
259
|
-
ResponsiveNumber: "ResponsiveNumber",
|
|
260
|
-
ResponsiveOpacity: "ResponsiveOpacity",
|
|
261
|
-
ResponsiveSelect: "ResponsiveSelect",
|
|
262
|
-
RichText: "RichText",
|
|
263
|
-
Shadows: "Shadows",
|
|
264
|
-
Shape: "Shape",
|
|
265
|
-
SocialLinks: "SocialLinks",
|
|
266
|
-
Table: "Table",
|
|
267
|
-
TableFormFields: "TableFormFields",
|
|
268
|
-
Typeahead: "Typeahead",
|
|
269
|
-
TextArea: "TextArea",
|
|
270
|
-
TextInput: "TextInput",
|
|
271
|
-
TextStyle: "TextStyle",
|
|
272
|
-
Video: "Video",
|
|
273
|
-
Width: "Width",
|
|
274
|
-
Style: StyleControlType
|
|
275
|
-
};
|
|
276
|
-
function Backgrounds(options = {}) {
|
|
277
|
-
return { type: Types.Backgrounds, options };
|
|
278
|
-
}
|
|
279
|
-
const BorderPropControllerFormat = {
|
|
280
|
-
ClassName: "makeswift::prop-controllers::border::format::class-name",
|
|
281
|
-
ResponsiveValue: "makeswift::prop-controllers:border::format::responsive-value"
|
|
282
|
-
};
|
|
283
|
-
function Border(options = {}) {
|
|
284
|
-
return { type: Types.Border, options };
|
|
285
|
-
}
|
|
286
|
-
Border.Format = BorderPropControllerFormat;
|
|
287
|
-
const BorderRadiusPropControllerFormat = {
|
|
288
|
-
ClassName: "makeswift::prop-controllers::border-radius::format::class-name",
|
|
289
|
-
ResponsiveValue: "makeswift::prop-controllers::border-radius::format::responsive-value"
|
|
290
|
-
};
|
|
291
|
-
function BorderRadius(options = {}) {
|
|
292
|
-
return { type: Types.BorderRadius, options };
|
|
293
|
-
}
|
|
294
|
-
BorderRadius.Format = BorderRadiusPropControllerFormat;
|
|
295
|
-
function Checkbox(options) {
|
|
296
|
-
return { type: Types.Checkbox, options };
|
|
297
|
-
}
|
|
298
|
-
function Date(options = {}) {
|
|
299
|
-
return { type: Types.Date, options };
|
|
300
|
-
}
|
|
301
|
-
function ElementID(options = {}) {
|
|
302
|
-
return { type: Types.ElementID, options };
|
|
303
|
-
}
|
|
304
|
-
function Font(options = {}) {
|
|
305
|
-
return { type: Types.Font, options };
|
|
306
|
-
}
|
|
307
|
-
function GapX(options = {}) {
|
|
308
|
-
return { type: Types.GapX, options };
|
|
309
|
-
}
|
|
310
|
-
function GapY(options = {}) {
|
|
311
|
-
return { type: Types.GapY, options };
|
|
312
|
-
}
|
|
313
|
-
function Grid(options = {}) {
|
|
314
|
-
return { type: Types.Grid, options };
|
|
315
|
-
}
|
|
316
|
-
function Image$1(options = {}) {
|
|
317
|
-
return { type: Types.Image, options };
|
|
318
|
-
}
|
|
319
|
-
function Images(options = {}) {
|
|
320
|
-
return { type: Types.Images, options };
|
|
321
|
-
}
|
|
322
|
-
function Link$1(options = {}) {
|
|
323
|
-
return { type: Types.Link, options };
|
|
324
|
-
}
|
|
325
|
-
function List$1(options) {
|
|
326
|
-
return { type: Types.List, options };
|
|
327
|
-
}
|
|
328
|
-
const MarginPropControllerFormat = {
|
|
329
|
-
ClassName: "makeswift::prop-controllers::margin::format::class-name",
|
|
330
|
-
ResponsiveValue: "makeswift::prop-controllers::margin::format::responsive-value"
|
|
331
|
-
};
|
|
332
|
-
function Margin(options = {}) {
|
|
333
|
-
return { type: Types.Margin, options };
|
|
334
|
-
}
|
|
335
|
-
Margin.Format = MarginPropControllerFormat;
|
|
336
|
-
function NavigationLinks(options = {}) {
|
|
337
|
-
return { type: Types.NavigationLinks, options };
|
|
338
|
-
}
|
|
339
|
-
function Number(options = {}) {
|
|
340
|
-
return { type: Types.Number, options };
|
|
341
|
-
}
|
|
342
|
-
const PaddingPropControllerFormat = {
|
|
343
|
-
ClassName: "makeswift::prop-controllers::padding::format::class-name",
|
|
344
|
-
ResponsiveValue: "makeswift::prop-controllers::padding::format::responsive-value"
|
|
345
|
-
};
|
|
346
|
-
function Padding(options = {}) {
|
|
347
|
-
return { type: Types.Padding, options };
|
|
348
|
-
}
|
|
349
|
-
Padding.Format = PaddingPropControllerFormat;
|
|
350
|
-
function ResponsiveColor(options = {}) {
|
|
351
|
-
return { type: Types.ResponsiveColor, options };
|
|
352
|
-
}
|
|
353
|
-
function ResponsiveIconRadioGroup(options) {
|
|
354
|
-
return { type: Types.ResponsiveIconRadioGroup, options };
|
|
355
|
-
}
|
|
356
|
-
function ResponsiveLength(options = {}) {
|
|
357
|
-
return { type: Types.ResponsiveLength, options };
|
|
358
|
-
}
|
|
359
|
-
function ResponsiveNumber(options = {}) {
|
|
360
|
-
return { type: Types.ResponsiveNumber, options };
|
|
361
|
-
}
|
|
362
|
-
function ResponsiveOpacity(options = {}) {
|
|
363
|
-
return { type: Types.ResponsiveOpacity, options };
|
|
364
|
-
}
|
|
365
|
-
function ResponsiveSelect(options) {
|
|
366
|
-
return { type: Types.ResponsiveSelect, options };
|
|
367
|
-
}
|
|
368
|
-
function RichText$1(options = {}) {
|
|
369
|
-
return { type: Types.RichText, options };
|
|
370
|
-
}
|
|
371
|
-
const ShadowsPropControllerFormat = {
|
|
372
|
-
ClassName: "makeswift::prop-controllers::shadows::format::class-name",
|
|
373
|
-
ResponsiveValue: "makeswift::prop-controllers::shadows::format::responsive-value"
|
|
374
|
-
};
|
|
375
|
-
function Shadows(options = {}) {
|
|
376
|
-
return { type: Types.Shadows, options };
|
|
377
|
-
}
|
|
378
|
-
Shadows.Format = ShadowsPropControllerFormat;
|
|
379
|
-
function Shape$1(options) {
|
|
380
|
-
return { type: Types.Shape, options };
|
|
381
|
-
}
|
|
382
|
-
function SocialLinks(options = {}) {
|
|
383
|
-
return { type: Types.SocialLinks, options };
|
|
384
|
-
}
|
|
385
|
-
function Table(options = {}) {
|
|
386
|
-
return { type: Types.Table, options };
|
|
387
|
-
}
|
|
388
|
-
function TableFormFields(options = {}) {
|
|
389
|
-
return { type: Types.TableFormFields, options };
|
|
390
|
-
}
|
|
391
|
-
function Typeahead(options) {
|
|
392
|
-
return { type: Types.Typeahead, options };
|
|
393
|
-
}
|
|
394
|
-
function TextArea(options = {}) {
|
|
395
|
-
return { type: Types.TextArea, options };
|
|
396
|
-
}
|
|
397
|
-
function TextInput(options = {}) {
|
|
398
|
-
return { type: Types.TextInput, options };
|
|
399
|
-
}
|
|
400
|
-
function TextStyle(options = {}) {
|
|
401
|
-
return { type: Types.TextStyle, options };
|
|
402
|
-
}
|
|
403
|
-
function Video(options = {}) {
|
|
404
|
-
return { type: Types.Video, options };
|
|
405
|
-
}
|
|
406
|
-
const WidthPropControllerFormat = {
|
|
407
|
-
ClassName: "makeswift::prop-controllers::width::format::class-name",
|
|
408
|
-
ResponsiveValue: "makeswift::prop-controllers::width::format::responsive-value"
|
|
409
|
-
};
|
|
410
|
-
function Width(options = {}) {
|
|
411
|
-
return { type: Types.Width, options };
|
|
44
|
+
const ColorControlType = "makeswift::controls::color";
|
|
45
|
+
function Color(config = {}) {
|
|
46
|
+
return { type: ColorControlType, config };
|
|
47
|
+
}
|
|
48
|
+
function copyColorData(value, context) {
|
|
49
|
+
var _a;
|
|
50
|
+
if (value == null)
|
|
51
|
+
return value;
|
|
52
|
+
return __spreadProps(__spreadValues({}, value), {
|
|
53
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(value.swatchId)) != null ? _a : value.swatchId
|
|
54
|
+
});
|
|
412
55
|
}
|
|
413
|
-
Width.Format = WidthPropControllerFormat;
|
|
414
|
-
var descriptors = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
415
|
-
__proto__: null,
|
|
416
|
-
Types,
|
|
417
|
-
Backgrounds,
|
|
418
|
-
BorderPropControllerFormat,
|
|
419
|
-
Border,
|
|
420
|
-
BorderRadiusPropControllerFormat,
|
|
421
|
-
BorderRadius,
|
|
422
|
-
Checkbox,
|
|
423
|
-
Date,
|
|
424
|
-
ElementID,
|
|
425
|
-
Font,
|
|
426
|
-
GapX,
|
|
427
|
-
GapY,
|
|
428
|
-
Grid,
|
|
429
|
-
Image: Image$1,
|
|
430
|
-
Images,
|
|
431
|
-
Link: Link$1,
|
|
432
|
-
List: List$1,
|
|
433
|
-
MarginPropControllerFormat,
|
|
434
|
-
Margin,
|
|
435
|
-
NavigationLinks,
|
|
436
|
-
Number,
|
|
437
|
-
PaddingPropControllerFormat,
|
|
438
|
-
Padding,
|
|
439
|
-
ResponsiveColor,
|
|
440
|
-
ResponsiveIconRadioGroup,
|
|
441
|
-
ResponsiveLength,
|
|
442
|
-
ResponsiveNumber,
|
|
443
|
-
ResponsiveOpacity,
|
|
444
|
-
ResponsiveSelect,
|
|
445
|
-
RichText: RichText$1,
|
|
446
|
-
ShadowsPropControllerFormat,
|
|
447
|
-
Shadows,
|
|
448
|
-
Shape: Shape$1,
|
|
449
|
-
SocialLinks,
|
|
450
|
-
Table,
|
|
451
|
-
TableFormFields,
|
|
452
|
-
Typeahead,
|
|
453
|
-
TextArea,
|
|
454
|
-
TextInput,
|
|
455
|
-
TextStyle,
|
|
456
|
-
Video,
|
|
457
|
-
WidthPropControllerFormat,
|
|
458
|
-
Width
|
|
459
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
460
56
|
const ImageControlType = "makeswift::controls::image";
|
|
461
57
|
const ImageControlValueFormat = {
|
|
462
58
|
URL: "makeswift::controls::image::format::url",
|
|
463
59
|
WithDimensions: "makeswift::controls::image::format::with-dimensions"
|
|
464
60
|
};
|
|
465
|
-
function Image(config = {}) {
|
|
61
|
+
function Image$1(config = {}) {
|
|
466
62
|
return { type: ImageControlType, config };
|
|
467
63
|
}
|
|
468
|
-
Image.Format = ImageControlValueFormat;
|
|
64
|
+
Image$1.Format = ImageControlValueFormat;
|
|
469
65
|
function copyImageData(value, context) {
|
|
470
66
|
var _a;
|
|
471
67
|
if (value == null)
|
|
@@ -499,7 +95,7 @@ if (import_meta.vitest) {
|
|
|
499
95
|
});
|
|
500
96
|
}
|
|
501
97
|
const LinkControlType = "makeswift::controls::link";
|
|
502
|
-
function Link(config = {}) {
|
|
98
|
+
function Link$1(config = {}) {
|
|
503
99
|
return { type: LinkControlType, config };
|
|
504
100
|
}
|
|
505
101
|
function copyLinkData(value, context) {
|
|
@@ -665,12 +261,14 @@ function createPropController(descriptor, send) {
|
|
|
665
261
|
return new ListControl(send, descriptor);
|
|
666
262
|
case ShapeControlType:
|
|
667
263
|
return new ShapeControl(send, descriptor);
|
|
264
|
+
case StyleControlType:
|
|
265
|
+
return new StyleControl(send);
|
|
668
266
|
default:
|
|
669
267
|
return new DefaultPropController(send);
|
|
670
268
|
}
|
|
671
269
|
}
|
|
672
270
|
const ListControlType = "makeswift::controls::list";
|
|
673
|
-
function List(config) {
|
|
271
|
+
function List$1(config) {
|
|
674
272
|
return { type: ListControlType, config };
|
|
675
273
|
}
|
|
676
274
|
const ListControlMessageType = {
|
|
@@ -729,7 +327,7 @@ function copyListData(definition, value, context) {
|
|
|
729
327
|
}));
|
|
730
328
|
}
|
|
731
329
|
const ShapeControlType = "makeswift::controls::shape";
|
|
732
|
-
function Shape(config) {
|
|
330
|
+
function Shape$1(config) {
|
|
733
331
|
return { type: ShapeControlType, config };
|
|
734
332
|
}
|
|
735
333
|
const ShapeControlMessageType = {
|
|
@@ -751,35 +349,229 @@ class ShapeControl extends PropController {
|
|
|
751
349
|
}));
|
|
752
350
|
controls.set(key, control);
|
|
753
351
|
});
|
|
754
|
-
this.controls = controls;
|
|
755
|
-
return this.controls;
|
|
756
|
-
});
|
|
757
|
-
__publicField(this, "recv", (message) => {
|
|
758
|
-
switch (message.type) {
|
|
759
|
-
case ShapeControlMessageType.SHAPE_CONTROL_CHILD_CONTROL_MESSAGE: {
|
|
760
|
-
const control = this.controls.get(message.payload.key);
|
|
761
|
-
if (control == null)
|
|
762
|
-
return;
|
|
763
|
-
const recv = control.recv;
|
|
764
|
-
recv(message.payload.message);
|
|
765
|
-
}
|
|
766
|
-
}
|
|
352
|
+
this.controls = controls;
|
|
353
|
+
return this.controls;
|
|
354
|
+
});
|
|
355
|
+
__publicField(this, "recv", (message) => {
|
|
356
|
+
switch (message.type) {
|
|
357
|
+
case ShapeControlMessageType.SHAPE_CONTROL_CHILD_CONTROL_MESSAGE: {
|
|
358
|
+
const control = this.controls.get(message.payload.key);
|
|
359
|
+
if (control == null)
|
|
360
|
+
return;
|
|
361
|
+
const recv = control.recv;
|
|
362
|
+
recv(message.payload.message);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
this.descriptor = descriptor;
|
|
367
|
+
this.send = send;
|
|
368
|
+
this.controls = /* @__PURE__ */ new Map();
|
|
369
|
+
this.setControls();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
function copyShapeData(definition, value, context) {
|
|
373
|
+
if (value == null)
|
|
374
|
+
return value;
|
|
375
|
+
const newValue = {};
|
|
376
|
+
for (const [key, itemDefinition] of Object.entries(definition.config.type)) {
|
|
377
|
+
const prop = value[key];
|
|
378
|
+
newValue[key] = copy(itemDefinition, prop, context);
|
|
379
|
+
}
|
|
380
|
+
return newValue;
|
|
381
|
+
}
|
|
382
|
+
const StyleControlType = "makeswift::controls::style";
|
|
383
|
+
const StyleControlProperty = {
|
|
384
|
+
Width: "makeswift::controls::style::property::width",
|
|
385
|
+
Margin: "makeswift::controls::style::property::margin",
|
|
386
|
+
Padding: "makeswift::controls::style::property::padding",
|
|
387
|
+
Border: "makeswift::controls::style::property::border",
|
|
388
|
+
BorderRadius: "makeswift::controls::style::property::border-radius",
|
|
389
|
+
TextStyle: "makeswift::controls::style::property::text-style"
|
|
390
|
+
};
|
|
391
|
+
const StyleControlDefaultProperties = [
|
|
392
|
+
StyleControlProperty.Width,
|
|
393
|
+
StyleControlProperty.Margin
|
|
394
|
+
];
|
|
395
|
+
const AllStyleControlProperties = [
|
|
396
|
+
StyleControlProperty.Width,
|
|
397
|
+
StyleControlProperty.Margin,
|
|
398
|
+
StyleControlProperty.Padding,
|
|
399
|
+
StyleControlProperty.Border,
|
|
400
|
+
StyleControlProperty.BorderRadius,
|
|
401
|
+
StyleControlProperty.TextStyle
|
|
402
|
+
];
|
|
403
|
+
function Style(params) {
|
|
404
|
+
var _a;
|
|
405
|
+
return {
|
|
406
|
+
type: StyleControlType,
|
|
407
|
+
config: { properties: (_a = params == null ? void 0 : params.properties) != null ? _a : StyleControlDefaultProperties }
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
Style.Default = StyleControlDefaultProperties;
|
|
411
|
+
Style.All = AllStyleControlProperties;
|
|
412
|
+
Style.Width = StyleControlProperty.Width;
|
|
413
|
+
Style.Margin = StyleControlProperty.Margin;
|
|
414
|
+
Style.Padding = StyleControlProperty.Padding;
|
|
415
|
+
Style.Border = StyleControlProperty.Border;
|
|
416
|
+
Style.BorderRadius = StyleControlProperty.BorderRadius;
|
|
417
|
+
Style.TextStyle = StyleControlProperty.TextStyle;
|
|
418
|
+
const StyleControlMessageType = {
|
|
419
|
+
CHANGE_BOX_MODEL: "makeswift::controls::style::message::change-box-model"
|
|
420
|
+
};
|
|
421
|
+
class StyleControl extends PropController {
|
|
422
|
+
constructor(send) {
|
|
423
|
+
super(send);
|
|
424
|
+
}
|
|
425
|
+
changeBoxModel(boxModel) {
|
|
426
|
+
this.send({ type: StyleControlMessageType.CHANGE_BOX_MODEL, payload: { boxModel } });
|
|
427
|
+
}
|
|
428
|
+
recv() {
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function copyStyleData(value, context) {
|
|
432
|
+
if (value == null)
|
|
433
|
+
return value;
|
|
434
|
+
function copyResponsiveBorder(responsiveBorder) {
|
|
435
|
+
if (responsiveBorder == null)
|
|
436
|
+
return void 0;
|
|
437
|
+
return responsiveBorder.map((deviceBorder) => __spreadProps(__spreadValues({}, deviceBorder), {
|
|
438
|
+
value: copyBorder(deviceBorder.value)
|
|
439
|
+
}));
|
|
440
|
+
}
|
|
441
|
+
function copyBorder(border) {
|
|
442
|
+
function copyBorderSide(side) {
|
|
443
|
+
if (side == null)
|
|
444
|
+
return null;
|
|
445
|
+
if (side.color == null)
|
|
446
|
+
return side;
|
|
447
|
+
return __spreadProps(__spreadValues({}, side), {
|
|
448
|
+
color: copyColorData(side.color, context)
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
return {
|
|
452
|
+
borderTop: copyBorderSide(border.borderTop),
|
|
453
|
+
borderBottom: copyBorderSide(border.borderBottom),
|
|
454
|
+
borderRight: copyBorderSide(border.borderRight),
|
|
455
|
+
borderLeft: copyBorderSide(border.borderLeft)
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
return __spreadProps(__spreadValues({}, value), { border: copyResponsiveBorder(value.border) });
|
|
459
|
+
}
|
|
460
|
+
if (import_meta.vitest) {
|
|
461
|
+
const { describe, test, expect } = import_meta.vitest;
|
|
462
|
+
describe.concurrent("style copy", () => {
|
|
463
|
+
test("colors are replaced", () => {
|
|
464
|
+
const value = {
|
|
465
|
+
width: [
|
|
466
|
+
{
|
|
467
|
+
value: {
|
|
468
|
+
unit: "px",
|
|
469
|
+
value: 100
|
|
470
|
+
},
|
|
471
|
+
deviceId: "desktop"
|
|
472
|
+
}
|
|
473
|
+
],
|
|
474
|
+
border: [
|
|
475
|
+
{
|
|
476
|
+
value: {
|
|
477
|
+
borderTop: {
|
|
478
|
+
color: {
|
|
479
|
+
alpha: 1,
|
|
480
|
+
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
481
|
+
},
|
|
482
|
+
style: "solid",
|
|
483
|
+
width: 9
|
|
484
|
+
},
|
|
485
|
+
borderLeft: {
|
|
486
|
+
color: {
|
|
487
|
+
alpha: 1,
|
|
488
|
+
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
489
|
+
},
|
|
490
|
+
style: "solid",
|
|
491
|
+
width: 9
|
|
492
|
+
},
|
|
493
|
+
borderRight: {
|
|
494
|
+
color: {
|
|
495
|
+
alpha: 1,
|
|
496
|
+
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
497
|
+
},
|
|
498
|
+
style: "solid",
|
|
499
|
+
width: 9
|
|
500
|
+
},
|
|
501
|
+
borderBottom: {
|
|
502
|
+
color: {
|
|
503
|
+
alpha: 1,
|
|
504
|
+
swatchId: "U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA=="
|
|
505
|
+
},
|
|
506
|
+
style: "solid",
|
|
507
|
+
width: 9
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
deviceId: "desktop"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
textStyle: [
|
|
514
|
+
{
|
|
515
|
+
value: {
|
|
516
|
+
fontSize: {
|
|
517
|
+
unit: "px",
|
|
518
|
+
value: 46
|
|
519
|
+
},
|
|
520
|
+
fontStyle: [],
|
|
521
|
+
fontFamily: "Oswald",
|
|
522
|
+
fontWeight: 400,
|
|
523
|
+
letterSpacing: 5.2,
|
|
524
|
+
textTransform: []
|
|
525
|
+
},
|
|
526
|
+
deviceId: "desktop"
|
|
527
|
+
}
|
|
528
|
+
],
|
|
529
|
+
borderRadius: [
|
|
530
|
+
{
|
|
531
|
+
value: {
|
|
532
|
+
borderTopLeftRadius: {
|
|
533
|
+
unit: "px",
|
|
534
|
+
value: 4
|
|
535
|
+
},
|
|
536
|
+
borderTopRightRadius: {
|
|
537
|
+
unit: "px",
|
|
538
|
+
value: 4
|
|
539
|
+
},
|
|
540
|
+
borderBottomLeftRadius: {
|
|
541
|
+
unit: "px",
|
|
542
|
+
value: 4
|
|
543
|
+
},
|
|
544
|
+
borderBottomRightRadius: {
|
|
545
|
+
unit: "px",
|
|
546
|
+
value: 4
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
deviceId: "desktop"
|
|
550
|
+
}
|
|
551
|
+
]
|
|
552
|
+
};
|
|
553
|
+
const expected = JSON.parse(JSON.stringify(value).replaceAll("U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA==", "testing"));
|
|
554
|
+
const replacementContext = {
|
|
555
|
+
elementHtmlIds: /* @__PURE__ */ new Set(),
|
|
556
|
+
elementKeys: /* @__PURE__ */ new Map(),
|
|
557
|
+
swatchIds: /* @__PURE__ */ new Map([
|
|
558
|
+
["U3dhdGNoOmJjMDkwZWJjLTZkZDUtNDY1NS1hMDY0LTg3ZDAxM2U4YTFhNA==", "testing"]
|
|
559
|
+
]),
|
|
560
|
+
fileIds: /* @__PURE__ */ new Map(),
|
|
561
|
+
typographyIds: /* @__PURE__ */ new Map(),
|
|
562
|
+
tableIds: /* @__PURE__ */ new Map(),
|
|
563
|
+
tableColumnIds: /* @__PURE__ */ new Map(),
|
|
564
|
+
pageIds: /* @__PURE__ */ new Map(),
|
|
565
|
+
globalElementIds: /* @__PURE__ */ new Map(),
|
|
566
|
+
globalElementData: /* @__PURE__ */ new Map()
|
|
567
|
+
};
|
|
568
|
+
const result = copyStyleData(value, {
|
|
569
|
+
replacementContext,
|
|
570
|
+
copyElement: (node) => node
|
|
571
|
+
});
|
|
572
|
+
expect(result).toMatchObject(expected);
|
|
767
573
|
});
|
|
768
|
-
|
|
769
|
-
this.send = send;
|
|
770
|
-
this.controls = /* @__PURE__ */ new Map();
|
|
771
|
-
this.setControls();
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
function copyShapeData(definition, value, context) {
|
|
775
|
-
if (value == null)
|
|
776
|
-
return value;
|
|
777
|
-
const newValue = {};
|
|
778
|
-
for (const [key, itemDefinition] of Object.entries(definition.config.type)) {
|
|
779
|
-
const prop = value[key];
|
|
780
|
-
newValue[key] = copy(itemDefinition, prop, context);
|
|
781
|
-
}
|
|
782
|
-
return newValue;
|
|
574
|
+
});
|
|
783
575
|
}
|
|
784
576
|
const SlotControlType = "makeswift::controls::slot";
|
|
785
577
|
function Slot() {
|
|
@@ -1824,7 +1616,7 @@ function richTextDAOToDTO(children, selection) {
|
|
|
1824
1616
|
};
|
|
1825
1617
|
}
|
|
1826
1618
|
const RichTextControlType = "makeswift::controls::rich-text";
|
|
1827
|
-
function RichText() {
|
|
1619
|
+
function RichText$1() {
|
|
1828
1620
|
return { type: RichTextControlType };
|
|
1829
1621
|
}
|
|
1830
1622
|
const RichTextControlMessageType = {
|
|
@@ -1898,5 +1690,228 @@ class RichTextControl extends PropController {
|
|
|
1898
1690
|
this.send({ type: RichTextControlMessageType.CHANGE_BOX_MODEL, payload: { boxModel } });
|
|
1899
1691
|
}
|
|
1900
1692
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1693
|
+
const Types = {
|
|
1694
|
+
Backgrounds: "Backgrounds",
|
|
1695
|
+
Border: "Border",
|
|
1696
|
+
BorderRadius: "BorderRadius",
|
|
1697
|
+
Checkbox: "Checkbox",
|
|
1698
|
+
Date: "Date",
|
|
1699
|
+
ElementID: "ElementID",
|
|
1700
|
+
Font: "Font",
|
|
1701
|
+
GapX: "GapX",
|
|
1702
|
+
GapY: "GapY",
|
|
1703
|
+
Grid: "Grid",
|
|
1704
|
+
Image: "Image",
|
|
1705
|
+
Images: "Images",
|
|
1706
|
+
Link: "Link",
|
|
1707
|
+
List: "List",
|
|
1708
|
+
Margin: "Margin",
|
|
1709
|
+
NavigationLinks: "NavigationLinks",
|
|
1710
|
+
Number: "Number",
|
|
1711
|
+
Padding: "Padding",
|
|
1712
|
+
ResponsiveColor: "ResponsiveColor",
|
|
1713
|
+
ResponsiveIconRadioGroup: "ResponsiveIconRadioGroup",
|
|
1714
|
+
ResponsiveLength: "ResponsiveLength",
|
|
1715
|
+
ResponsiveNumber: "ResponsiveNumber",
|
|
1716
|
+
ResponsiveOpacity: "ResponsiveOpacity",
|
|
1717
|
+
ResponsiveSelect: "ResponsiveSelect",
|
|
1718
|
+
RichText: "RichText",
|
|
1719
|
+
Shadows: "Shadows",
|
|
1720
|
+
Shape: "Shape",
|
|
1721
|
+
SocialLinks: "SocialLinks",
|
|
1722
|
+
Table: "Table",
|
|
1723
|
+
TableFormFields: "TableFormFields",
|
|
1724
|
+
Typeahead: "Typeahead",
|
|
1725
|
+
TextArea: "TextArea",
|
|
1726
|
+
TextInput: "TextInput",
|
|
1727
|
+
TextStyle: "TextStyle",
|
|
1728
|
+
Video: "Video",
|
|
1729
|
+
Width: "Width",
|
|
1730
|
+
Style: StyleControlType
|
|
1731
|
+
};
|
|
1732
|
+
function Backgrounds(options = {}) {
|
|
1733
|
+
return { type: Types.Backgrounds, options };
|
|
1734
|
+
}
|
|
1735
|
+
const BorderPropControllerFormat = {
|
|
1736
|
+
ClassName: "makeswift::prop-controllers::border::format::class-name",
|
|
1737
|
+
ResponsiveValue: "makeswift::prop-controllers:border::format::responsive-value"
|
|
1738
|
+
};
|
|
1739
|
+
function Border(options = {}) {
|
|
1740
|
+
return { type: Types.Border, options };
|
|
1741
|
+
}
|
|
1742
|
+
Border.Format = BorderPropControllerFormat;
|
|
1743
|
+
const BorderRadiusPropControllerFormat = {
|
|
1744
|
+
ClassName: "makeswift::prop-controllers::border-radius::format::class-name",
|
|
1745
|
+
ResponsiveValue: "makeswift::prop-controllers::border-radius::format::responsive-value"
|
|
1746
|
+
};
|
|
1747
|
+
function BorderRadius(options = {}) {
|
|
1748
|
+
return { type: Types.BorderRadius, options };
|
|
1749
|
+
}
|
|
1750
|
+
BorderRadius.Format = BorderRadiusPropControllerFormat;
|
|
1751
|
+
function Checkbox(options) {
|
|
1752
|
+
return { type: Types.Checkbox, options };
|
|
1753
|
+
}
|
|
1754
|
+
function Date(options = {}) {
|
|
1755
|
+
return { type: Types.Date, options };
|
|
1756
|
+
}
|
|
1757
|
+
function ElementID(options = {}) {
|
|
1758
|
+
return { type: Types.ElementID, options };
|
|
1759
|
+
}
|
|
1760
|
+
function Font(options = {}) {
|
|
1761
|
+
return { type: Types.Font, options };
|
|
1762
|
+
}
|
|
1763
|
+
function GapX(options = {}) {
|
|
1764
|
+
return { type: Types.GapX, options };
|
|
1765
|
+
}
|
|
1766
|
+
function GapY(options = {}) {
|
|
1767
|
+
return { type: Types.GapY, options };
|
|
1768
|
+
}
|
|
1769
|
+
function Grid(options = {}) {
|
|
1770
|
+
return { type: Types.Grid, options };
|
|
1771
|
+
}
|
|
1772
|
+
function Image(options = {}) {
|
|
1773
|
+
return { type: Types.Image, options };
|
|
1774
|
+
}
|
|
1775
|
+
function Images(options = {}) {
|
|
1776
|
+
return { type: Types.Images, options };
|
|
1777
|
+
}
|
|
1778
|
+
function Link(options = {}) {
|
|
1779
|
+
return { type: Types.Link, options };
|
|
1780
|
+
}
|
|
1781
|
+
function List(options) {
|
|
1782
|
+
return { type: Types.List, options };
|
|
1783
|
+
}
|
|
1784
|
+
const MarginPropControllerFormat = {
|
|
1785
|
+
ClassName: "makeswift::prop-controllers::margin::format::class-name",
|
|
1786
|
+
ResponsiveValue: "makeswift::prop-controllers::margin::format::responsive-value"
|
|
1787
|
+
};
|
|
1788
|
+
function Margin(options = {}) {
|
|
1789
|
+
return { type: Types.Margin, options };
|
|
1790
|
+
}
|
|
1791
|
+
Margin.Format = MarginPropControllerFormat;
|
|
1792
|
+
function NavigationLinks(options = {}) {
|
|
1793
|
+
return { type: Types.NavigationLinks, options };
|
|
1794
|
+
}
|
|
1795
|
+
function Number(options = {}) {
|
|
1796
|
+
return { type: Types.Number, options };
|
|
1797
|
+
}
|
|
1798
|
+
const PaddingPropControllerFormat = {
|
|
1799
|
+
ClassName: "makeswift::prop-controllers::padding::format::class-name",
|
|
1800
|
+
ResponsiveValue: "makeswift::prop-controllers::padding::format::responsive-value"
|
|
1801
|
+
};
|
|
1802
|
+
function Padding(options = {}) {
|
|
1803
|
+
return { type: Types.Padding, options };
|
|
1804
|
+
}
|
|
1805
|
+
Padding.Format = PaddingPropControllerFormat;
|
|
1806
|
+
function ResponsiveColor(options = {}) {
|
|
1807
|
+
return { type: Types.ResponsiveColor, options };
|
|
1808
|
+
}
|
|
1809
|
+
function ResponsiveIconRadioGroup(options) {
|
|
1810
|
+
return { type: Types.ResponsiveIconRadioGroup, options };
|
|
1811
|
+
}
|
|
1812
|
+
function ResponsiveLength(options = {}) {
|
|
1813
|
+
return { type: Types.ResponsiveLength, options };
|
|
1814
|
+
}
|
|
1815
|
+
function ResponsiveNumber(options = {}) {
|
|
1816
|
+
return { type: Types.ResponsiveNumber, options };
|
|
1817
|
+
}
|
|
1818
|
+
function ResponsiveOpacity(options = {}) {
|
|
1819
|
+
return { type: Types.ResponsiveOpacity, options };
|
|
1820
|
+
}
|
|
1821
|
+
function ResponsiveSelect(options) {
|
|
1822
|
+
return { type: Types.ResponsiveSelect, options };
|
|
1823
|
+
}
|
|
1824
|
+
function RichText(options = {}) {
|
|
1825
|
+
return { type: Types.RichText, options };
|
|
1826
|
+
}
|
|
1827
|
+
const ShadowsPropControllerFormat = {
|
|
1828
|
+
ClassName: "makeswift::prop-controllers::shadows::format::class-name",
|
|
1829
|
+
ResponsiveValue: "makeswift::prop-controllers::shadows::format::responsive-value"
|
|
1830
|
+
};
|
|
1831
|
+
function Shadows(options = {}) {
|
|
1832
|
+
return { type: Types.Shadows, options };
|
|
1833
|
+
}
|
|
1834
|
+
Shadows.Format = ShadowsPropControllerFormat;
|
|
1835
|
+
function Shape(options) {
|
|
1836
|
+
return { type: Types.Shape, options };
|
|
1837
|
+
}
|
|
1838
|
+
function SocialLinks(options = {}) {
|
|
1839
|
+
return { type: Types.SocialLinks, options };
|
|
1840
|
+
}
|
|
1841
|
+
function Table(options = {}) {
|
|
1842
|
+
return { type: Types.Table, options };
|
|
1843
|
+
}
|
|
1844
|
+
function TableFormFields(options = {}) {
|
|
1845
|
+
return { type: Types.TableFormFields, options };
|
|
1846
|
+
}
|
|
1847
|
+
function Typeahead(options) {
|
|
1848
|
+
return { type: Types.Typeahead, options };
|
|
1849
|
+
}
|
|
1850
|
+
function TextArea(options = {}) {
|
|
1851
|
+
return { type: Types.TextArea, options };
|
|
1852
|
+
}
|
|
1853
|
+
function TextInput(options = {}) {
|
|
1854
|
+
return { type: Types.TextInput, options };
|
|
1855
|
+
}
|
|
1856
|
+
function TextStyle(options = {}) {
|
|
1857
|
+
return { type: Types.TextStyle, options };
|
|
1858
|
+
}
|
|
1859
|
+
function Video(options = {}) {
|
|
1860
|
+
return { type: Types.Video, options };
|
|
1861
|
+
}
|
|
1862
|
+
const WidthPropControllerFormat = {
|
|
1863
|
+
ClassName: "makeswift::prop-controllers::width::format::class-name",
|
|
1864
|
+
ResponsiveValue: "makeswift::prop-controllers::width::format::responsive-value"
|
|
1865
|
+
};
|
|
1866
|
+
function Width(options = {}) {
|
|
1867
|
+
return { type: Types.Width, options };
|
|
1868
|
+
}
|
|
1869
|
+
Width.Format = WidthPropControllerFormat;
|
|
1870
|
+
var descriptors = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1871
|
+
__proto__: null,
|
|
1872
|
+
Types,
|
|
1873
|
+
Backgrounds,
|
|
1874
|
+
BorderPropControllerFormat,
|
|
1875
|
+
Border,
|
|
1876
|
+
BorderRadiusPropControllerFormat,
|
|
1877
|
+
BorderRadius,
|
|
1878
|
+
Checkbox,
|
|
1879
|
+
Date,
|
|
1880
|
+
ElementID,
|
|
1881
|
+
Font,
|
|
1882
|
+
GapX,
|
|
1883
|
+
GapY,
|
|
1884
|
+
Grid,
|
|
1885
|
+
Image,
|
|
1886
|
+
Images,
|
|
1887
|
+
Link,
|
|
1888
|
+
List,
|
|
1889
|
+
MarginPropControllerFormat,
|
|
1890
|
+
Margin,
|
|
1891
|
+
NavigationLinks,
|
|
1892
|
+
Number,
|
|
1893
|
+
PaddingPropControllerFormat,
|
|
1894
|
+
Padding,
|
|
1895
|
+
ResponsiveColor,
|
|
1896
|
+
ResponsiveIconRadioGroup,
|
|
1897
|
+
ResponsiveLength,
|
|
1898
|
+
ResponsiveNumber,
|
|
1899
|
+
ResponsiveOpacity,
|
|
1900
|
+
ResponsiveSelect,
|
|
1901
|
+
RichText,
|
|
1902
|
+
ShadowsPropControllerFormat,
|
|
1903
|
+
Shadows,
|
|
1904
|
+
Shape,
|
|
1905
|
+
SocialLinks,
|
|
1906
|
+
Table,
|
|
1907
|
+
TableFormFields,
|
|
1908
|
+
Typeahead,
|
|
1909
|
+
TextArea,
|
|
1910
|
+
TextInput,
|
|
1911
|
+
TextStyle,
|
|
1912
|
+
Video,
|
|
1913
|
+
WidthPropControllerFormat,
|
|
1914
|
+
Width
|
|
1915
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1916
|
+
export { MarginPropControllerFormat as $, NavigationLinks as A, Backgrounds as B, ColorControlType as C, Date as D, ElementID as E, Font as F, GapY as G, SocialLinks as H, ImageControlType as I, RichText as J, StyleControlProperty as K, ListControlType as L, Margin as M, Number as N, ImageControlValueFormat as O, Padding as P, StyleControlType as Q, RichTextPropControllerMessageType as R, ShapeControlType as S, Types as T, RichTextControlType as U, Video as V, Width as W, LinkControlType as X, BorderPropControllerFormat as Y, ShadowsPropControllerFormat as Z, BorderRadiusPropControllerFormat as _, copy as a, PaddingPropControllerFormat as a0, WidthPropControllerFormat as a1, Color as a2, copyColorData as a3, Image$1 as a4, copyImageData as a5, Link$1 as a6, copyLinkData as a7, List$1 as a8, ListControlMessageType as a9, createPropController as aA, ListControl as aa, copyListData as ab, Shape$1 as ac, ShapeControlMessageType as ad, ShapeControl as ae, copyShapeData as af, Slot as ag, SlotControlMessageType as ah, SlotControl as ai, copySlotData as aj, Style as ak, StyleControlMessageType as al, StyleControl as am, copyStyleData as an, ObjectType as ao, RichText$1 as ap, RichTextControlMessageType as aq, RichTextControl as ar, richTextDTOtoSelection as as, richTextDTOtoDAO as at, toSelectionDTO as au, richTextDAOToDTO as av, BlockType as aw, InlineType as ax, BlockTextAlignment as ay, BuilderEditMode as az, SlotControlType as b, copyElementReference as c, descriptors as d, TableFormFieldsMessageType as e, ResponsiveIconRadioGroup as f, Border as g, BorderRadius as h, Shadows as i, GapX as j, ResponsiveSelect as k, ResponsiveNumber as l, Checkbox as m, Grid as n, TextInput as o, Link as p, ResponsiveColor as q, reducer as r, TextStyle as s, Images as t, ResponsiveLength as u, TextArea as v, Table as w, TableFormFields as x, Image as y, ResponsiveOpacity as z };
|
|
1917
|
+
//# sourceMappingURL=descriptors.es.js.map
|