@makeswift/runtime 0.9.5 → 0.9.7
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/LiveProvider.es.js +2 -2
- package/dist/PreviewProvider.es.js +2 -2
- package/dist/ReadOnlyText.cjs.js +2 -1
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +4 -3
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +2 -1
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +4 -3
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/api.cjs.js +20 -1
- package/dist/api.cjs.js.map +1 -1
- package/dist/api.es.js +20 -1
- package/dist/api.es.js.map +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +1 -0
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +1 -1
- package/dist/index.cjs.js +58 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs10.js +2 -1
- package/dist/index.cjs10.js.map +1 -1
- package/dist/index.cjs5.js +29 -10
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.es.js +58 -33
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +4 -3
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es5.js +31 -12
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es9.js +2 -2
- package/dist/next.es.js +1 -1
- package/dist/react-page.cjs.js +16 -9
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +16 -10
- package/dist/react-page.es.js.map +1 -1
- package/dist/slate.cjs.js +19 -61
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +25 -65
- package/dist/slate.es.js.map +1 -1
- package/dist/state/breakpoints.cjs.js +13 -0
- package/dist/state/breakpoints.cjs.js.map +1 -1
- package/dist/state/breakpoints.es.js +13 -1
- package/dist/state/breakpoints.es.js.map +1 -1
- package/dist/types/src/api/graphql/documents/fragments.d.ts +1 -1
- package/dist/types/src/api/graphql/documents/fragments.d.ts.map +1 -1
- package/dist/types/src/api/graphql/documents/queries.d.ts.map +1 -1
- package/dist/types/src/api/graphql/generated/fragment-document-nodes.d.ts.map +1 -1
- package/dist/types/src/api/graphql/generated/types.d.ts +12 -0
- package/dist/types/src/api/graphql/generated/types.d.ts.map +1 -1
- package/dist/types/src/api/react.d.ts +3 -1
- package/dist/types/src/api/react.d.ts.map +1 -1
- 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/icon-radio-group.d.ts +1 -1
- package/dist/types/src/controls/icon-radio-group.d.ts.map +1 -1
- package/dist/types/src/controls/link.d.ts +1 -1
- package/dist/types/src/controls/link.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +2 -0
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/controls/select.d.ts +1 -1
- package/dist/types/src/controls/select.d.ts.map +1 -1
- package/dist/types/src/controls/typography.d.ts +1 -1
- package/dist/types/src/controls/typography.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/index.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts +2 -1
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/next/index.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/typography.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/typography.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/InlinePlugin/getValue.d.ts +1 -1
- package/dist/types/src/slate/InlinePlugin/getValue.d.ts.map +1 -1
- package/dist/types/src/slate/LinkPlugin/getValue.d.ts.map +1 -1
- package/dist/types/src/slate/TextAlignPlugin/getValue.d.ts +4 -0
- package/dist/types/src/slate/TextAlignPlugin/getValue.d.ts.map +1 -0
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/getValue.d.ts +4 -0
- package/dist/types/src/slate/TypographyPlugin/getValue.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/index.d.ts +0 -1
- package/dist/types/src/slate/index.d.ts.map +1 -1
- package/dist/types/src/slate/utils/responsive.d.ts +3 -5
- package/dist/types/src/slate/utils/responsive.d.ts.map +1 -1
- package/dist/types/src/state/makeswift-api-client.d.ts +1 -1
- package/dist/types/src/state/makeswift-api-client.d.ts.map +1 -1
- package/dist/types/src/state/modules/breakpoints.d.ts +2 -0
- package/dist/types/src/state/modules/breakpoints.d.ts.map +1 -1
- package/dist/types/types/locale.d.ts +1 -1
- package/dist/types.cjs2.js.map +1 -1
- package/dist/types.es2.js +1 -1
- package/dist/types.es2.js.map +1 -1
- package/dist/typography.cjs.js.map +1 -1
- package/dist/typography.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/src/slate/ColorPlugin/index.d.ts +0 -10
- package/dist/types/src/slate/ColorPlugin/index.d.ts.map +0 -1
package/dist/react-page.es.js
CHANGED
|
@@ -2085,6 +2085,7 @@ function richTextDTOtoDAO(data) {
|
|
|
2085
2085
|
return (_c = (_b = (_a2 = data.document) == null ? void 0 : _a2.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c : [];
|
|
2086
2086
|
}
|
|
2087
2087
|
function toInlineOrTextDTO(node) {
|
|
2088
|
+
var _a2;
|
|
2088
2089
|
if (isText(node)) {
|
|
2089
2090
|
return [
|
|
2090
2091
|
{
|
|
@@ -2109,7 +2110,7 @@ function toInlineOrTextDTO(node) {
|
|
|
2109
2110
|
object: ObjectType.Inline,
|
|
2110
2111
|
nodes: node.children.flatMap(toInlineOrTextDTO),
|
|
2111
2112
|
type: node.type,
|
|
2112
|
-
data: node.link
|
|
2113
|
+
data: (_a2 = node.link) != null ? _a2 : void 0
|
|
2113
2114
|
}
|
|
2114
2115
|
];
|
|
2115
2116
|
case InlineType.Code:
|
|
@@ -2362,6 +2363,9 @@ class RichTextV2Control extends PropController {
|
|
|
2362
2363
|
this.send({ type: RichTextV2ControlMessageType.CHANGE_BOX_MODEL, payload: { boxModel } });
|
|
2363
2364
|
}
|
|
2364
2365
|
}
|
|
2366
|
+
function isRichTextV1Data(value) {
|
|
2367
|
+
return value !== void 0 && typeof value === "object" && !Array.isArray(value);
|
|
2368
|
+
}
|
|
2365
2369
|
function isNonNullable(value) {
|
|
2366
2370
|
return value != null;
|
|
2367
2371
|
}
|
|
@@ -2446,7 +2450,7 @@ function getTypographyStyleSwatchIds(style) {
|
|
|
2446
2450
|
}).filter(isNonNullable)) != null ? _a2 : [];
|
|
2447
2451
|
}
|
|
2448
2452
|
function getSwatchIds(descriptor, prop) {
|
|
2449
|
-
var _a2;
|
|
2453
|
+
var _a2, _b;
|
|
2450
2454
|
if (prop == null)
|
|
2451
2455
|
return [];
|
|
2452
2456
|
switch (descriptor.type) {
|
|
@@ -2457,12 +2461,12 @@ function getSwatchIds(descriptor, prop) {
|
|
|
2457
2461
|
case Types.NavigationLinks: {
|
|
2458
2462
|
const value = prop;
|
|
2459
2463
|
return (_a2 = value == null ? void 0 : value.flatMap((item) => {
|
|
2460
|
-
var _a3,
|
|
2464
|
+
var _a3, _b2, _c, _d;
|
|
2461
2465
|
switch (item.type) {
|
|
2462
2466
|
case "button":
|
|
2463
2467
|
case "dropdown":
|
|
2464
2468
|
return [
|
|
2465
|
-
...(
|
|
2469
|
+
...(_b2 = (_a3 = item.payload.color) == null ? void 0 : _a3.map((override) => override.value).map((color) => color.swatchId)) != null ? _b2 : [],
|
|
2466
2470
|
...(_d = (_c = item.payload.textColor) == null ? void 0 : _c.map((override) => override.value).map((color) => color.swatchId)) != null ? _d : []
|
|
2467
2471
|
];
|
|
2468
2472
|
}
|
|
@@ -2474,20 +2478,20 @@ function getSwatchIds(descriptor, prop) {
|
|
|
2474
2478
|
return getBoxShadowsSwatchIds(prop);
|
|
2475
2479
|
case Types.RichText: {
|
|
2476
2480
|
let getNodeSwatchIds = function(node) {
|
|
2477
|
-
var _a3,
|
|
2481
|
+
var _a3, _b2, _c, _d;
|
|
2478
2482
|
switch (node.object) {
|
|
2479
2483
|
case "document":
|
|
2480
2484
|
case "block":
|
|
2481
2485
|
case "inline":
|
|
2482
|
-
return (
|
|
2486
|
+
return (_b2 = (_a3 = node.nodes) == null ? void 0 : _a3.flatMap(getNodeSwatchIds)) != null ? _b2 : [];
|
|
2483
2487
|
case "text":
|
|
2484
2488
|
return (_d = (_c = node.marks) == null ? void 0 : _c.flatMap(getMarkSwatchIds)) != null ? _d : [];
|
|
2485
2489
|
default:
|
|
2486
2490
|
return [];
|
|
2487
2491
|
}
|
|
2488
2492
|
}, getMarkSwatchIds = function(mark) {
|
|
2489
|
-
var _a3,
|
|
2490
|
-
return getTypographyStyleSwatchIds((
|
|
2493
|
+
var _a3, _b2;
|
|
2494
|
+
return getTypographyStyleSwatchIds((_b2 = (_a3 = mark.data) == null ? void 0 : _a3.value) == null ? void 0 : _b2.style);
|
|
2491
2495
|
};
|
|
2492
2496
|
const value = prop;
|
|
2493
2497
|
if (value == null || value.document == null)
|
|
@@ -2500,7 +2504,7 @@ function getSwatchIds(descriptor, prop) {
|
|
|
2500
2504
|
}
|
|
2501
2505
|
case StyleV2ControlType: {
|
|
2502
2506
|
const value = prop;
|
|
2503
|
-
return value.flatMap((value2) => getSwatchIds(descriptor.config.type, value2.value));
|
|
2507
|
+
return (_b = value == null ? void 0 : value.flatMap((value2) => getSwatchIds(descriptor.config.type, value2.value))) != null ? _b : [];
|
|
2504
2508
|
}
|
|
2505
2509
|
case RichTextV2ControlType: {
|
|
2506
2510
|
let getDescendantSwatchIds = function(descendant) {
|
|
@@ -2529,6 +2533,8 @@ function getSwatchIds(descriptor, prop) {
|
|
|
2529
2533
|
};
|
|
2530
2534
|
const descendants = prop;
|
|
2531
2535
|
const plugins = descriptor.config.plugins;
|
|
2536
|
+
if (isRichTextV1Data(descendants))
|
|
2537
|
+
return [];
|
|
2532
2538
|
return descendants.flatMap((d) => getDescendantSwatchIds(d));
|
|
2533
2539
|
}
|
|
2534
2540
|
case ShapeControlType: {
|
|
@@ -2945,5 +2951,5 @@ function configureStore({
|
|
|
2945
2951
|
locales: getInitialState(locales != null ? locales : preloadedState == null ? void 0 : preloadedState.locales)
|
|
2946
2952
|
}), applyMiddleware(thunk));
|
|
2947
2953
|
}
|
|
2948
|
-
export { StyleControlProperty as $, TableFormFields as A, Backgrounds as B, ComponentIcon as C, Date as D, ElementID as E, Font as F, GapY as G, Image$1 as H, Images as I, ResponsiveOpacity as J, NavigationLinks as K, Link$1 as L, Margin as M, Number as N, SocialLinks as O, Padding as P, RichText$1 as Q, RichTextPropControllerMessageType as R, Shadows as S, TableFormFieldsMessageType as T, useStyle as U, Video as V, Width as W, getBorderSwatchIds as X, isNonNullable as Y, getBoxShadowsSwatchIds as Z, getResponsiveColorSwatchIds as _, createDocumentReference as a,
|
|
2954
|
+
export { StyleControlProperty as $, TableFormFields as A, Backgrounds as B, ComponentIcon as C, Date as D, ElementID as E, Font as F, GapY as G, Image$1 as H, Images as I, ResponsiveOpacity as J, NavigationLinks as K, Link$1 as L, Margin as M, Number as N, SocialLinks as O, Padding as P, RichText$1 as Q, RichTextPropControllerMessageType as R, Shadows as S, TableFormFieldsMessageType as T, useStyle as U, Video as V, Width as W, getBorderSwatchIds as X, isNonNullable as Y, getBoxShadowsSwatchIds as Z, getResponsiveColorSwatchIds as _, createDocumentReference as a, StyleV2ControlMessageType as a$, ImageControlValueFormat as a0, isPropControllersHandle as a1, isRichTextV1Data as a2, StyleControlType as a3, RichTextV2ControlType as a4, RichTextControlType as a5, SlotControlType as a6, StyleV2ControlType as a7, ListControlType as a8, ShapeControlType as a9, copy as aA, merge as aB, Image as aC, copyImageData as aD, Link as aE, copyLinkData as aF, List as aG, ListControlMessageType as aH, ListControl as aI, copyListData as aJ, introspectListData as aK, Shape as aL, ShapeControlMessageType as aM, ShapeControl as aN, copyShapeData as aO, introspectShapeData as aP, Slot as aQ, SlotControlMessageType as aR, SlotControl as aS, copySlotData as aT, mergeSlotData as aU, Style as aV, StyleControlMessageType as aW, StyleControl as aX, copyStyleData as aY, unstable_useStyleV2ClassName as aZ, unstable_StyleV2 as a_, LinkControlType as aa, ImageControlType as ab, ColorControlType as ac, getComponentPropControllerDescriptors as ad, getPropControllers as ae, Types as af, BorderPropControllerFormat as ag, ShadowsPropControllerFormat as ah, BorderRadiusPropControllerFormat as ai, MarginPropControllerFormat as aj, PaddingPropControllerFormat as ak, WidthPropControllerFormat as al, configureStore as am, copyElementTree as an, getBreakpoints as ao, parseLocalesInput as ap, getDocument as aq, getElementId as ar, getIsPreview as as, getIsInBuilder as at, getReactComponent as au, getBuilderEditMode as av, getBackgroundsFileIds as aw, getBackgroundsSwatchIds as ax, Color as ay, copyColorData as az, isElementReference as b, StyleV2Control as b0, ObjectType as b1, RichText as b2, RichTextControlMessageType as b3, RichTextControl as b4, richTextDTOtoSelection as b5, richTextDTOtoDAO as b6, toSelectionDTO as b7, richTextDAOToDTO as b8, RichTextV2Mode as b9, reducer$4 as bA, reducer$3 as bB, reducer$2 as bC, reducer$1 as bD, getInitialState$2 as bE, createRichTextV2Plugin as ba, unstable_RichTextV2 as bb, RichTextV2ControlMessageType as bc, RichTextV2Control as bd, InlineType as be, RootBlockType as bf, BlockType as bg, BlockTextAlignment as bh, getInitialState$7 as bi, reducer$8 as bj, getDocument$1 as bk, getComponentsMeta as bl, getComponentPropControllerDescriptors$1 as bm, getLocales as bn, getDefaultLocale as bo, BuilderEditMode as bp, getDocumentKeysSortedByDepth as bq, getPropController as br, getPropControllersHandle as bs, getElement as bt, getElementPropControllerDescriptors as bu, createPropController as bv, reducer$7 as bw, reducer$9 as bx, reducer$6 as by, reducer$5 as bz, createDocument as c, descriptors as d, getSwatchIds as e, getFileIds as f, getPropControllerDescriptors as g, getTypographyIds as h, introspection as i, getTableIds as j, getPageIds as k, getElementChildren as l, ResponsiveIconRadioGroup as m, Border as n, BorderRadius as o, GapX as p, ResponsiveSelect as q, ResponsiveNumber as r, Checkbox as s, Grid as t, TextInput as u, ResponsiveColor as v, TextStyle as w, ResponsiveLength as x, TextArea as y, Table as z };
|
|
2949
2955
|
//# sourceMappingURL=react-page.es.js.map
|