@makeswift/runtime 0.12.3 → 0.12.4
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 +1 -1
- package/dist/PreviewProvider.es.js +1 -1
- package/dist/ReadOnlyText.es.js +1 -1
- package/dist/ReadOnlyTextV2.es.js +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +8 -1
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +2 -2
- package/dist/index.cjs.js +14 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +16 -8
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.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/number.cjs.js +11 -2
- package/dist/number.cjs.js.map +1 -1
- package/dist/number.es.js +8 -3
- package/dist/number.es.js.map +1 -1
- package/dist/react-page.cjs.js +11 -3
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +8 -4
- 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/controls/checkbox.d.ts +9 -1
- package/dist/types/src/controls/checkbox.d.ts.map +1 -1
- package/dist/types/src/controls/color.d.ts +1 -2
- package/dist/types/src/controls/color.d.ts.map +1 -1
- package/dist/types/src/controls/control-data-type-key.d.ts +2 -0
- package/dist/types/src/controls/control-data-type-key.d.ts.map +1 -0
- package/dist/types/src/controls/number.d.ts +9 -1
- package/dist/types/src/controls/number.d.ts.map +1 -1
- package/dist/types/src/controls/text-area.d.ts +9 -1
- package/dist/types/src/controls/text-area.d.ts.map +1 -1
- package/dist/types/src/controls/text-input.d.ts +10 -1
- package/dist/types/src/controls/text-input.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/checkbox.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/number.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/number.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/text-area.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/text-input.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/LiveProvider.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { a as ReactRuntime, K as StoreContext, M as MakeswiftProvider } from "./index.es.js";
|
|
3
|
-
import {
|
|
3
|
+
import { az as configureStore } from "./react-page.es.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import "use-sync-external-store/shim/with-selector";
|
|
6
6
|
import "next/dynamic";
|
|
@@ -23,7 +23,7 @@ import { J as ElementImperativeHandle, a as ReactRuntime, K as StoreContext, M a
|
|
|
23
23
|
import { createStore, applyMiddleware, combineReducers } from "redux";
|
|
24
24
|
import thunk from "redux-thunk";
|
|
25
25
|
import Router from "next/router";
|
|
26
|
-
import {
|
|
26
|
+
import { ce as getInitialState$3, cf as reducer$4, cg as getDocument$1, c as createDocument, ch as getComponentsMeta$1, ci as getComponentPropControllerDescriptors$1, aB as getBreakpoints, f as deepEqual, aI as getBuilderEditMode, cj as BuilderEditMode, ck as getDocumentKeysSortedByDepth, cl as getPropController, cm as getPropControllersHandle, cn as getElement, co as getElementPropControllerDescriptors, cp as createPropController, j as isElementReference, a4 as isPropControllersHandle, cq as reducer$5, cr as reducer$7, cs as reducer$8, ct as reducer$9, cu as reducer$a, cv as reducer$b, cw as reducer$c, cx as getInitialState$4 } from "./react-page.es.js";
|
|
27
27
|
import { removeIn, setIn } from "immutable";
|
|
28
28
|
import { A as ActionTypes, v as unregisterMeasurable, w as registerMeasurable, x as registerBuilderComponent, j as setBreakpoints, k as setLocale, y as changePathnameStart, z as changePathnameComplete, B as changeElementBoxModels, C as changeDocumentElementSize, D as handleWheel, E as handlePointerMove, F as elementFromPointChange, G as setIsInBuilder, H as unregisterBuilderComponent, I as unregisterPropControllers, J as registerPropControllers, K as registerPropControllersHandle, r as registerDocument, L as registerComponentHandle, M as messageBuilderPropController, N as registerDocumentEffect } from "./actions.es.js";
|
|
29
29
|
import { i as isMeasurable, a as getMeasurables$1, b as getBoxModels$1, m as measure, d as getBoxModel$1, r as reducer$6 } from "./box-models.es.js";
|
package/dist/ReadOnlyText.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { cx } from "@emotion/css";
|
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { L as useEnhancedTypography, N as useTypographyClassName, n as useResponsiveStyle } from "./index.es.js";
|
|
4
4
|
import "ts-pattern";
|
|
5
|
-
import {
|
|
5
|
+
import { bH as richTextDTOtoDAO, _ as useStyle, c5 as BlockType, c6 as InlineType } from "./react-page.es.js";
|
|
6
6
|
import "./actions.es.js";
|
|
7
7
|
import "slate";
|
|
8
8
|
import "uuid";
|
|
@@ -15,7 +15,7 @@ var __objRest = (source, exclude) => {
|
|
|
15
15
|
};
|
|
16
16
|
import { forwardRef } from "react";
|
|
17
17
|
import "ts-pattern";
|
|
18
|
-
import {
|
|
18
|
+
import { bK as RichTextV2Mode, c1 as InlineModePlugin, b$ as BlockPlugin, bW as TypographyPlugin, c3 as TextAlignPlugin, c9 as InlinePlugin, _ as useStyle } from "./react-page.es.js";
|
|
19
19
|
import "./actions.es.js";
|
|
20
20
|
import "slate";
|
|
21
21
|
import "uuid";
|
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
const import_meta = {};
|
|
33
33
|
import "ts-pattern";
|
|
34
34
|
import { C as ComboboxControlType } from "./combobox.es.js";
|
|
35
|
-
import {
|
|
35
|
+
import { ah as ListControlType, ai as ShapeControlType, ag as StyleV2ControlType, ad as RichTextV2ControlType, as as Types } from "./react-page.es.js";
|
|
36
36
|
import "./actions.es.js";
|
|
37
37
|
import "uuid";
|
|
38
38
|
import "slate";
|
package/dist/controls.cjs.js
CHANGED
|
@@ -22,14 +22,17 @@ require("@emotion/css");
|
|
|
22
22
|
require("@emotion/serialize");
|
|
23
23
|
require("@emotion/utils");
|
|
24
24
|
exports.Checkbox = number.Checkbox;
|
|
25
|
+
exports.CheckboxControlDataTypeKey = number.CheckboxControlDataTypeKey;
|
|
26
|
+
exports.CheckboxControlDataTypeValueV1 = number.CheckboxControlDataTypeValueV1;
|
|
25
27
|
exports.CheckboxControlType = number.CheckboxControlType;
|
|
26
28
|
exports.Number = number.Number;
|
|
29
|
+
exports.NumberControlDataTypeKey = number.NumberControlDataTypeKey;
|
|
30
|
+
exports.NumberControlDataTypeValueV1 = number.NumberControlDataTypeValueV1;
|
|
27
31
|
exports.NumberControlType = number.NumberControlType;
|
|
28
32
|
exports.Color = reactPage.Color;
|
|
29
33
|
exports.ColorControlDataTypeKey = reactPage.ColorControlDataTypeKey;
|
|
30
34
|
exports.ColorControlDataTypeValueV1 = reactPage.ColorControlDataTypeValueV1;
|
|
31
35
|
exports.ColorControlType = reactPage.ColorControlType;
|
|
32
|
-
exports.ControlDataTypeKey = reactPage.ControlDataTypeKey;
|
|
33
36
|
exports.IconRadioGroupControlType = reactPage.IconRadioGroupControlType;
|
|
34
37
|
exports.Image = reactPage.Image$1;
|
|
35
38
|
exports.ImageControlType = reactPage.ImageControlType;
|
|
@@ -68,8 +71,12 @@ exports.StyleV2Control = reactPage.StyleV2Control;
|
|
|
68
71
|
exports.StyleV2ControlMessageType = reactPage.StyleV2ControlMessageType;
|
|
69
72
|
exports.StyleV2ControlType = reactPage.StyleV2ControlType;
|
|
70
73
|
exports.TextArea = reactPage.TextArea$1;
|
|
74
|
+
exports.TextAreaControlDataTypeKey = reactPage.TextAreaControlDataTypeKey;
|
|
75
|
+
exports.TextAreaControlDataTypeValueV1 = reactPage.TextAreaControlDataTypeValueV1;
|
|
71
76
|
exports.TextAreaControlType = reactPage.TextAreaControlType;
|
|
72
77
|
exports.TextInput = reactPage.TextInput$1;
|
|
78
|
+
exports.TextInputControlDataTypeKey = reactPage.TextInputControlDataTypeKey;
|
|
79
|
+
exports.TextInputControlDataTypeValueV1 = reactPage.TextInputControlDataTypeValueV1;
|
|
73
80
|
exports.TextInputControlType = reactPage.TextInputControlType;
|
|
74
81
|
exports.TypographyControlType = reactPage.TypographyControlType;
|
|
75
82
|
exports.copy = reactPage.copy$3;
|
package/dist/controls.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/controls.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { e as Checkbox, C as CheckboxControlDataTypeKey, a as CheckboxControlDataTypeValueV1, d as CheckboxControlType, f as Number, N as NumberControlDataTypeKey, b as NumberControlDataTypeValueV1, c as NumberControlType } from "./number.es.js";
|
|
2
|
+
export { aP as Color, aN as ColorControlDataTypeKey, aO as ColorControlDataTypeValueV1, am as ColorControlType, al as IconRadioGroupControlType, aX as Image, ak as ImageControlType, a3 as ImageControlValueFormat, aZ as Link, aj as LinkControlType, a$ as List, b1 as ListControl, b0 as ListControlMessageType, ah as ListControlType, bD as ObjectType, Y as RichText, bF as RichTextControl, bE as RichTextControlMessageType, ae as RichTextControlType, bM as RichTextV2Control, bL as RichTextV2ControlMessageType, ad as RichTextV2ControlType, bK as RichTextV2Mode, ba as Select, an as SelectControlType, bb as Shape, bd as ShapeControl, bc as ShapeControlMessageType, ai as ShapeControlType, bm as Slot, bo as SlotControl, bn as SlotControlMessageType, af as SlotControlType, bs as Style, bu as StyleControl, bt as StyleControlMessageType, a2 as StyleControlProperty, ac as StyleControlType, bz as StyleV2Control, by as StyleV2ControlMessageType, ag as StyleV2ControlType, bA as TextArea, a6 as TextAreaControlDataTypeKey, a7 as TextAreaControlDataTypeValueV1, ao as TextAreaControlType, bB as TextInput, a8 as TextInputControlDataTypeKey, a9 as TextInputControlDataTypeValueV1, ap as TextInputControlType, ab as TypographyControlType, aR as copy, aQ as copyColorData, aY as copyImageData, a_ as copyLinkData, b2 as copyListData, bC as copyRichTextData, be as copyShapeData, bp as copySlotData, bv as copyStyleData, bP as createRichTextV2Plugin, b3 as getListElementChildren, b5 as getListFileIds, b7 as getListPageIds, b4 as getListSwatchIds, b8 as getListTranslatableData, b6 as getListTypographyIds, bf as getShapeElementChildren, bj as getShapeFileIds, bi as getShapePageIds, bg as getShapeSwatchIds, bk as getShapeTranslatableData, bh as getShapeTypographyIds, aT as getTranslatableData, bR as getTypographySwatchIds, bS as getTypographyTypographyIds, a5 as isRichTextV1Data, aS as merge, b9 as mergeListTranslatedData, bl as mergeShapeTranslatedData, br as mergeSlotControlTranslatedData, bq as mergeSlotData, aU as mergeTranslatedData, bJ as richTextDAOToDTO, bH as richTextDTOtoDAO, bG as richTextDTOtoSelection, bN as richTextV2DataToDescendents, bO as richTextV2DescendentsToData, bI as toSelectionDTO, aW as unstable_IconRadioGroup, aV as unstable_IconRadioGroupIcon, bx as unstable_StyleV2, bQ as unstable_Typography, bw as unstable_useStyleV2ClassName } from "./react-page.es.js";
|
|
3
3
|
export { a as Combobox, C as ComboboxControlType } from "./combobox.es.js";
|
|
4
4
|
import "redux";
|
|
5
5
|
import "redux-thunk";
|
package/dist/index.cjs.js
CHANGED
|
@@ -1251,7 +1251,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1251
1251
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1252
1252
|
return res.json(fonts2);
|
|
1253
1253
|
}
|
|
1254
|
-
const version = "0.12.
|
|
1254
|
+
const version = "0.12.4";
|
|
1255
1255
|
async function handler(req, res, { apiKey, siteVersions }) {
|
|
1256
1256
|
if (req.query.secret !== apiKey) {
|
|
1257
1257
|
return res.status(401).json({ message: "Unauthorized" });
|
|
@@ -3122,7 +3122,9 @@ function RenderHook({
|
|
|
3122
3122
|
return children(useHook(...parameters));
|
|
3123
3123
|
}
|
|
3124
3124
|
function useCheckboxControlValue(data, definition) {
|
|
3125
|
-
|
|
3125
|
+
var _a;
|
|
3126
|
+
const value = (_a = tsPattern.match(data).with({ [number.CheckboxControlDataTypeKey]: number.CheckboxControlDataTypeValueV1 }, (val) => val.value).otherwise((val) => val)) != null ? _a : definition.config.defaultValue;
|
|
3127
|
+
return value;
|
|
3126
3128
|
}
|
|
3127
3129
|
function useColorValue(data, definition) {
|
|
3128
3130
|
var _a, _b;
|
|
@@ -3255,8 +3257,10 @@ function ListControlValue({
|
|
|
3255
3257
|
children: (value) => renderFn([value, ...listControlValue])
|
|
3256
3258
|
}), children)([]);
|
|
3257
3259
|
}
|
|
3258
|
-
function useNumber(
|
|
3259
|
-
|
|
3260
|
+
function useNumber(data, definition) {
|
|
3261
|
+
var _a;
|
|
3262
|
+
const value = (_a = tsPattern.match(data).with({ [number.NumberControlDataTypeKey]: number.NumberControlDataTypeValueV1 }, (val) => val.value).otherwise((val) => val)) != null ? _a : definition.config.defaultValue;
|
|
3263
|
+
return value;
|
|
3260
3264
|
}
|
|
3261
3265
|
const EditableText$1 = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3262
3266
|
return require("./index.cjs8.js");
|
|
@@ -3524,10 +3528,14 @@ function StyleV2ControlValue({
|
|
|
3524
3528
|
})([]);
|
|
3525
3529
|
}
|
|
3526
3530
|
function useTextAreaValue(data, definition) {
|
|
3527
|
-
|
|
3531
|
+
var _a;
|
|
3532
|
+
const value = (_a = tsPattern.match(data).with({ [reactPage.TextAreaControlDataTypeKey]: reactPage.TextAreaControlDataTypeValueV1 }, (val) => val.value).otherwise((val) => val)) != null ? _a : definition.config.defaultValue;
|
|
3533
|
+
return value;
|
|
3528
3534
|
}
|
|
3529
3535
|
function useTextInputValue(data, definition) {
|
|
3530
|
-
|
|
3536
|
+
var _a;
|
|
3537
|
+
const value = (_a = tsPattern.match(data).with({ [reactPage.TextInputControlDataTypeKey]: reactPage.TextInputControlDataTypeValueV1 }, (val) => val.value).otherwise((val) => val)) != null ? _a : definition.config.defaultValue;
|
|
3538
|
+
return value;
|
|
3531
3539
|
}
|
|
3532
3540
|
function typographyFragementToTypographyControlData(typography) {
|
|
3533
3541
|
if (typography == null)
|