@makeswift/runtime 0.10.13 → 0.10.14
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 +2 -2
- package/dist/Button.cjs.js +1 -1
- package/dist/Button.es.js +2 -2
- package/dist/Carousel.cjs.js +1 -1
- package/dist/Carousel.es.js +2 -2
- package/dist/Countdown.es.js +1 -1
- package/dist/Divider.cjs.js +1 -1
- package/dist/Divider.es.js +2 -2
- package/dist/Embed.es.js +1 -1
- package/dist/Form.es.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/LiveProvider.cjs.js +1 -1
- package/dist/LiveProvider.es.js +2 -2
- package/dist/Navigation.cjs.js +1 -1
- package/dist/Navigation.es.js +2 -2
- package/dist/PreviewProvider.cjs.js +1 -1
- package/dist/PreviewProvider.es.js +2 -2
- package/dist/ReadOnlyText.es.js +1 -1
- package/dist/ReadOnlyTextV2.es.js +1 -1
- package/dist/Root.es.js +1 -1
- package/dist/SocialLinks.cjs.js +1 -1
- package/dist/SocialLinks.es.js +2 -2
- package/dist/Video.es.js +1 -1
- package/dist/control-serialization.cjs.js +1 -1
- package/dist/control-serialization.es.js +2 -2
- package/dist/controls.cjs.js +1 -1
- package/dist/controls.es.js +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs2.js +37 -6
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es2.js +38 -7
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es4.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js +1 -1
- package/dist/prop-controllers.cjs.js +1 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +1 -1
- package/dist/react-page.cjs.js +46 -38
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +45 -38
- package/dist/react-page.es.js.map +1 -1
- package/dist/slate.es.js +1 -1
- package/dist/toText.es.js +1 -1
- package/dist/types/src/components/hooks/useBackgrounds.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/copy/backgrounds.d.ts +2 -2
- package/dist/types/src/prop-controllers/copy/backgrounds.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +22 -5
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/index.d.ts +2 -1
- package/dist/types/src/prop-controllers/index.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/react-page.es.js
CHANGED
|
@@ -566,7 +566,7 @@ const Types = {
|
|
|
566
566
|
Style: StyleControlType
|
|
567
567
|
};
|
|
568
568
|
function Backgrounds(options = {}) {
|
|
569
|
-
return { type: Types.Backgrounds, options };
|
|
569
|
+
return { type: Types.Backgrounds, version: 1, options };
|
|
570
570
|
}
|
|
571
571
|
const BorderPropControllerFormat = {
|
|
572
572
|
ClassName: "makeswift::prop-controllers::border::format::class-name",
|
|
@@ -1221,41 +1221,51 @@ function mergeSlotData(base = { columns: [], elements: [] }, override = { column
|
|
|
1221
1221
|
});
|
|
1222
1222
|
return { columns: mergedColumns, elements: mergedElements };
|
|
1223
1223
|
}
|
|
1224
|
-
function copy$e(value, context) {
|
|
1224
|
+
function copy$e(descriptor, value, context) {
|
|
1225
1225
|
if (value == null)
|
|
1226
1226
|
return value;
|
|
1227
1227
|
return value.map((override) => __spreadProps(__spreadValues({}, override), {
|
|
1228
1228
|
value: override.value.map((backgroundItem) => {
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
});
|
|
1247
|
-
})
|
|
1229
|
+
return match([descriptor, backgroundItem]).with([P.any, { type: "color" }], ([, item]) => {
|
|
1230
|
+
var _a;
|
|
1231
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
1232
|
+
payload: item.payload === null ? null : __spreadProps(__spreadValues({}, item.payload), {
|
|
1233
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(item.payload.swatchId)) != null ? _a : item.payload.swatchId
|
|
1234
|
+
})
|
|
1235
|
+
});
|
|
1236
|
+
}).with([P.any, { type: "gradient" }], ([, item]) => {
|
|
1237
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
1238
|
+
payload: __spreadProps(__spreadValues({}, item.payload), {
|
|
1239
|
+
stops: item.payload.stops.map((stop) => {
|
|
1240
|
+
var _a;
|
|
1241
|
+
return __spreadProps(__spreadValues({}, stop), {
|
|
1242
|
+
color: stop.color == null ? null : __spreadProps(__spreadValues({}, stop.color), {
|
|
1243
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(stop.color.swatchId)) != null ? _a : stop.color.swatchId
|
|
1244
|
+
})
|
|
1245
|
+
});
|
|
1248
1246
|
})
|
|
1249
|
-
})
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1247
|
+
})
|
|
1248
|
+
});
|
|
1249
|
+
}).with([
|
|
1250
|
+
{ version: 1 },
|
|
1251
|
+
{ type: "image-v1", version: 1, payload: { image: { type: "makeswift-file" } } }
|
|
1252
|
+
], ([, item]) => {
|
|
1253
|
+
var _a;
|
|
1254
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
1255
|
+
payload: __spreadProps(__spreadValues({}, item.payload), {
|
|
1256
|
+
image: __spreadProps(__spreadValues({}, item.payload.image), {
|
|
1257
|
+
id: (_a = context.replacementContext.fileIds.get(item.payload.image.id)) != null ? _a : item.payload.image.id
|
|
1254
1258
|
})
|
|
1255
|
-
})
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
+
})
|
|
1260
|
+
});
|
|
1261
|
+
}).with([P.any, { type: "image", payload: { imageId: P.string } }], ([, item]) => {
|
|
1262
|
+
var _a;
|
|
1263
|
+
return __spreadProps(__spreadValues({}, item), {
|
|
1264
|
+
payload: __spreadProps(__spreadValues({}, item.payload), {
|
|
1265
|
+
imageId: (_a = context.replacementContext.fileIds.get(item.payload.imageId)) != null ? _a : item.payload.imageId
|
|
1266
|
+
})
|
|
1267
|
+
});
|
|
1268
|
+
}).otherwise(() => backgroundItem);
|
|
1259
1269
|
})
|
|
1260
1270
|
}));
|
|
1261
1271
|
}
|
|
@@ -1947,7 +1957,7 @@ function copy$2(value, context) {
|
|
|
1947
1957
|
function copy$1(descriptor, value, context) {
|
|
1948
1958
|
switch (descriptor.type) {
|
|
1949
1959
|
case "Backgrounds":
|
|
1950
|
-
return copy$e(value, context);
|
|
1960
|
+
return copy$e(descriptor, value, context);
|
|
1951
1961
|
case "Grid":
|
|
1952
1962
|
return copy$d(value, context);
|
|
1953
1963
|
case "NavigationLinks":
|
|
@@ -4343,12 +4353,9 @@ function getSwatchIds(descriptor, prop) {
|
|
|
4343
4353
|
function getBackgroundsFileIds(value) {
|
|
4344
4354
|
var _a;
|
|
4345
4355
|
return (_a = value == null ? void 0 : value.flatMap((override) => override.value).flatMap((backgroundItem) => {
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
default:
|
|
4350
|
-
return [];
|
|
4351
|
-
}
|
|
4356
|
+
return match(backgroundItem).with({ type: "image-v1", payload: { image: { type: "makeswift-file" } } }, (item) => [
|
|
4357
|
+
item.payload.image.id
|
|
4358
|
+
]).with({ type: "image", payload: { imageId: P.string } }, (item) => [item.payload.imageId]).otherwise(() => []);
|
|
4352
4359
|
})) != null ? _a : [];
|
|
4353
4360
|
}
|
|
4354
4361
|
function getFileIds(descriptor, prop) {
|
|
@@ -4734,5 +4741,5 @@ function configureStore({
|
|
|
4734
4741
|
locales: getInitialState(locales != null ? locales : preloadedState == null ? void 0 : preloadedState.locales)
|
|
4735
4742
|
}), applyMiddleware(thunk));
|
|
4736
4743
|
}
|
|
4737
|
-
export {
|
|
4744
|
+
export { Video as $, TextInput$1 as A, Backgrounds as B, ComponentIcon as C, ResponsiveColor as D, ElementID as E, TextStyle as F, GapY as G, Date as H, Images as I, Font as J, ResponsiveLength as K, Link$1 as L, Margin as M, Number as N, TextArea$1 as O, Padding as P, Table as Q, RichTextPropControllerMessageType as R, Shadows as S, TableFormFieldsMessageType as T, TableFormFields as U, Image$1 as V, Width as W, ResponsiveOpacity as X, NavigationLinks as Y, SocialLinks as Z, RichText as _, copy$9 as a, getListFileIds as a$, useStyle as a0, getBorderSwatchIds as a1, getBoxShadowsSwatchIds as a2, getResponsiveColorSwatchIds as a3, StyleControlProperty as a4, ImageControlValueFormat as a5, isPropControllersHandle as a6, isRichTextV1Data as a7, isNonNullable as a8, TypographyControlType as a9, getElementTreeTranslatableData as aA, parseLocalesInput as aB, getDocument as aC, getElementId as aD, getIsInBuilder as aE, getReactComponent as aF, getBuilderEditMode as aG, getIsPreview as aH, getBackgroundsFileIds as aI, getBackgroundsSwatchIds as aJ, Color as aK, copyColorData as aL, copy as aM, merge as aN, getTranslatableData as aO, unstable_IconRadioGroupIcon as aP, unstable_IconRadioGroup as aQ, Image as aR, copyImageData as aS, Link as aT, copyLinkData as aU, List as aV, ListControlMessageType as aW, ListControl as aX, copyListData as aY, getListElementChildren as aZ, getListSwatchIds as a_, StyleControlType as aa, RichTextV2ControlType as ab, RichTextControlType as ac, SlotControlType as ad, StyleV2ControlType as ae, ListControlType as af, ShapeControlType as ag, LinkControlType as ah, ImageControlType as ai, IconRadioGroupControlType as aj, ColorControlType as ak, SelectControlType as al, TextAreaControlType as am, TextInputControlType as an, getComponentPropControllerDescriptors as ao, getPropControllers as ap, Types as aq, BorderPropControllerFormat as ar, ShadowsPropControllerFormat as as, BorderRadiusPropControllerFormat as at, MarginPropControllerFormat as au, PaddingPropControllerFormat as av, WidthPropControllerFormat as aw, configureStore as ax, copyElementTree as ay, getBreakpoints as az, copy$8 as b, withInline as b$, getListTypographyIds as b0, getListPageIds as b1, getListTranslatableData as b2, Select as b3, Shape as b4, ShapeControlMessageType as b5, ShapeControl as b6, copyShapeData as b7, getShapeElementChildren as b8, getShapeSwatchIds as b9, richTextDAOToDTO as bA, RichTextV2Mode as bB, RichTextV2ControlMessageType as bC, RichTextV2Control as bD, richTextV2DataToDescendents as bE, richTextV2DescendentsToData as bF, createRichTextV2Plugin as bG, unstable_Typography as bH, getTypographySwatchIds as bI, getTypographyTypographyIds as bJ, TypographyActions as bK, TYPOGRAPHY_KEY as bL, withTypography as bM, TypographyPlugin as bN, BlockActions as bO, ListActions as bP, onKeyDown as bQ, withBlock as bR, BlockPlugin as bS, withInlineMode as bT, InlineModePlugin as bU, withTextAlign as bV, TextAlignPlugin as bW, RootBlockType as bX, BlockType as bY, InlineType as bZ, BlockTextAlignment as b_, getShapeTypographyIds as ba, getShapePageIds as bb, getShapeFileIds as bc, getShapeTranslatableData as bd, Slot as be, SlotControlMessageType as bf, SlotControl as bg, copySlotData as bh, mergeSlotData as bi, Style as bj, StyleControlMessageType as bk, StyleControl as bl, copyStyleData as bm, unstable_useStyleV2ClassName as bn, unstable_StyleV2 as bo, StyleV2ControlMessageType as bp, StyleV2Control as bq, TextArea as br, TextInput as bs, copyRichTextData as bt, ObjectType as bu, RichTextControlMessageType as bv, RichTextControl as bw, richTextDTOtoSelection as bx, richTextDTOtoDAO as by, toSelectionDTO as bz, createDocument as c, InlinePlugin as c0, ElementUtils as c1, onChange$1 as c2, getValue$3 as c3, isLinkElement as c4, getInitialState$7 as c5, reducer$8 as c6, getDocument$1 as c7, getComponentsMeta as c8, getComponentPropControllerDescriptors$1 as c9, BuilderEditMode as ca, getDocumentKeysSortedByDepth as cb, getPropController as cc, getPropControllersHandle as cd, getElement as ce, getElementPropControllerDescriptors as cf, createPropController as cg, reducer$7 as ch, reducer$9 as ci, reducer$6 as cj, reducer$5 as ck, reducer$4 as cl, reducer$3 as cm, reducer$2 as cn, reducer$1 as co, getInitialState$2 as cp, descriptors as d, copy$e as e, deepEqual as f, createDocumentReference as g, getPropControllerDescriptors as h, introspection as i, isElementReference as j, getDefaultLocale as k, getLocales as l, getSwatchIds as m, getFileIds as n, getTypographyIds as o, getTableIds as p, getPageIds as q, getElementChildren as r, ResponsiveIconRadioGroup as s, Border as t, BorderRadius as u, GapX as v, ResponsiveSelect as w, ResponsiveNumber as x, Checkbox as y, Grid as z };
|
|
4738
4745
|
//# sourceMappingURL=react-page.es.js.map
|