@makeswift/runtime 0.12.2 → 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/SocialLinks.cjs.js +1 -1
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +1 -1
- package/dist/SocialLinks.es.js.map +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/components/builtin/SocialLinks/SocialLinks.d.ts +12 -2
- package/dist/types/src/components/builtin/SocialLinks/SocialLinks.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/options.d.ts +2 -1
- package/dist/types/src/components/builtin/SocialLinks/options.d.ts.map +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/prop-controllers/descriptors.d.ts +1 -1
- package/dist/types/src/prop-controllers/descriptors.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/index.es2.js
CHANGED
|
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
32
|
import { useMemo, useState, useEffect, useCallback, useRef, forwardRef, createElement, Children } from "react";
|
|
33
|
-
import {
|
|
33
|
+
import { aL as getBackgroundsFileIds, aM as getBackgroundsSwatchIds, _ as useStyle } from "./react-page.es.js";
|
|
34
34
|
import "use-sync-external-store/shim";
|
|
35
35
|
import { B as isNonNullable, F as useFiles, G as useSwatches, v as useResponsiveGridItem, c as DEFAULT_BOX_ANIMATE_TYPE, f as DEFAULT_ITEM_ANIMATE_TYPE, e as DEFAULT_BOX_ANIMATE_DURATION, d as DEFAULT_BOX_ANIMATE_DELAY, i as DEFAULT_ITEM_STAGGER_DURATION, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
|
|
36
36
|
import { match, P } from "ts-pattern";
|
package/dist/index.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node, Transforms, Text, Editor } from "slate";
|
|
2
2
|
import { ReactEditor } from "slate-react";
|
|
3
|
-
import {
|
|
3
|
+
import { ca as ElementUtils } from "./react-page.es.js";
|
|
4
4
|
function withBuilder(editor) {
|
|
5
5
|
editor.resetValue = function(value) {
|
|
6
6
|
var _a;
|
package/dist/index.es6.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
20
|
+
import { ca as ElementUtils, bP as createRichTextV2Plugin, aZ as Link, cb as onChange, cc as getValue, cd as isLinkElement, _ as useStyle, c6 as InlineType } from "./react-page.es.js";
|
|
21
21
|
import { L as Link$1 } from "./index.es3.js";
|
|
22
22
|
import { cx } from "@emotion/css";
|
|
23
23
|
import { jsx, Fragment } from "react/jsx-runtime";
|
package/dist/index.es8.js
CHANGED
|
@@ -37,7 +37,7 @@ import { Range, createEditor } from "slate";
|
|
|
37
37
|
import { ReactEditor, withReact, Slate, Editable } from "slate-react";
|
|
38
38
|
import { n as useResponsiveStyle, L as useEnhancedTypography, N as useTypographyClassName, u as useIsInBuilder, O as useBuilderEditMode, Q as pollBoxModel } from "./index.es.js";
|
|
39
39
|
import "ts-pattern";
|
|
40
|
-
import { _ as useStyle,
|
|
40
|
+
import { _ as useStyle, c5 as BlockType, c6 as InlineType, bH as richTextDTOtoDAO, bG as richTextDTOtoSelection, f as deepEqual, b_ as withBlock, bV as withTypography, bZ as onKeyDown, cj as BuilderEditMode } from "./react-page.es.js";
|
|
41
41
|
import "uuid";
|
|
42
42
|
import "escape-html";
|
|
43
43
|
import "slate-hyperscript";
|
package/dist/index.es9.js
CHANGED
|
@@ -34,7 +34,7 @@ import { Range, createEditor } from "slate";
|
|
|
34
34
|
import isHotkey from "is-hotkey";
|
|
35
35
|
import { ReactEditor, withReact, Slate, Editable } from "slate-react";
|
|
36
36
|
import "ts-pattern";
|
|
37
|
-
import {
|
|
37
|
+
import { bN as richTextV2DataToDescendents, c5 as BlockType, bK as RichTextV2Mode, c1 as InlineModePlugin, b$ as BlockPlugin, bW as TypographyPlugin, c3 as TextAlignPlugin, c9 as InlinePlugin, cj as BuilderEditMode } from "./react-page.es.js";
|
|
38
38
|
import "escape-html";
|
|
39
39
|
import "slate-hyperscript";
|
|
40
40
|
import "parse5";
|
package/dist/number.cjs.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var reactPage = require("./react-page.cjs.js");
|
|
3
|
+
const CheckboxControlDataTypeKey = reactPage.ControlDataTypeKey;
|
|
4
|
+
const CheckboxControlDataTypeValueV1 = "checkbox::v1";
|
|
2
5
|
const CheckboxControlType = "makeswift::controls::checkbox";
|
|
3
6
|
function Checkbox(config = {}) {
|
|
4
|
-
return { type: CheckboxControlType, config };
|
|
7
|
+
return { type: CheckboxControlType, config, version: 1 };
|
|
5
8
|
}
|
|
9
|
+
const NumberControlDataTypeKey = reactPage.ControlDataTypeKey;
|
|
10
|
+
const NumberControlDataTypeValueV1 = "number::v1";
|
|
6
11
|
const NumberControlType = "makeswift::controls::number";
|
|
7
12
|
function Number(config = {}) {
|
|
8
|
-
return { type: NumberControlType, config };
|
|
13
|
+
return { type: NumberControlType, config, version: 1 };
|
|
9
14
|
}
|
|
10
15
|
exports.Checkbox = Checkbox;
|
|
16
|
+
exports.CheckboxControlDataTypeKey = CheckboxControlDataTypeKey;
|
|
17
|
+
exports.CheckboxControlDataTypeValueV1 = CheckboxControlDataTypeValueV1;
|
|
11
18
|
exports.CheckboxControlType = CheckboxControlType;
|
|
12
19
|
exports.Number = Number;
|
|
20
|
+
exports.NumberControlDataTypeKey = NumberControlDataTypeKey;
|
|
21
|
+
exports.NumberControlDataTypeValueV1 = NumberControlDataTypeValueV1;
|
|
13
22
|
exports.NumberControlType = NumberControlType;
|
|
14
23
|
//# sourceMappingURL=number.cjs.js.map
|
package/dist/number.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.cjs.js","sources":["../src/controls/checkbox.ts","../src/controls/number.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"number.cjs.js","sources":["../src/controls/checkbox.ts","../src/controls/number.ts"],"sourcesContent":["import { ControlDataTypeKey } from \"./control-data-type-key\"\n\nexport const CheckboxControlDataTypeKey = ControlDataTypeKey\n\nexport const CheckboxControlDataTypeValueV1 = 'checkbox::v1'\n\nexport type CheckboxControlDataV0 = boolean\n\nexport type CheckboxControlDataV1 = {\n [CheckboxControlDataTypeKey]: typeof CheckboxControlDataTypeValueV1\n value: boolean,\n}\n\nexport type CheckboxControlData = CheckboxControlDataV0 | CheckboxControlDataV1\n\nexport const CheckboxControlType = 'makeswift::controls::checkbox'\n\ntype CheckboxControlConfig = {\n label?: string\n defaultValue?: boolean\n}\n\nexport type CheckboxControlDefinition<C extends CheckboxControlConfig = CheckboxControlConfig> = {\n type: typeof CheckboxControlType\n config: C\n version?: 1\n}\n\nexport function Checkbox<C extends CheckboxControlConfig>(\n config: C = {} as C,\n): CheckboxControlDefinition<C> {\n return { type: CheckboxControlType, config, version: 1 }\n}\n","import { ControlDataTypeKey } from \"./control-data-type-key\"\n\nexport const NumberControlDataTypeKey = ControlDataTypeKey\n\nexport const NumberControlDataTypeValueV1 = 'number::v1'\n\nexport type NumberControlDataV0 = number\n\nexport type NumberControlDataV1 = {\n [NumberControlDataTypeKey]: typeof NumberControlDataTypeValueV1\n value: number,\n}\n\nexport type NumberControlData = NumberControlDataV0 | NumberControlDataV1\n\nexport const NumberControlType = 'makeswift::controls::number'\n\ntype NumberControlConfig = {\n label?: string\n labelOrientation?: 'vertical' | 'horizontal'\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n}\n\nexport type NumberControlDefinition<C extends NumberControlConfig = NumberControlConfig> = {\n type: typeof NumberControlType\n config: C\n version?: 1\n}\n\nexport function Number<C extends NumberControlConfig>(\n config: C = {} as C,\n): NumberControlDefinition<C> {\n return { type: NumberControlType, config, version: 1 }\n}\n"],"names":["ControlDataTypeKey"],"mappings":";;AAEO,MAAM,6BAA6BA,UAAA;AAEnC,MAAM,iCAAiC;AAWvC,MAAM,sBAAsB;AAcjC,kBAAA,SAAY,IACkB;AAC9B,SAAO,EAAE,MAAM,qBAAqB,QAAQ,SAAS,EAAE;AACzD;AC9BO,MAAM,2BAA2BA,UAAA;AAEjC,MAAM,+BAA+B;AAWrC,MAAM,oBAAoB;AAmB/B,gBAAA,SAAY,IACgB;AAC5B,SAAO,EAAE,MAAM,mBAAmB,QAAQ,SAAS,EAAE;AACvD;;;;;;;;;"}
|
package/dist/number.es.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { aK as ControlDataTypeKey } from "./react-page.es.js";
|
|
2
|
+
const CheckboxControlDataTypeKey = ControlDataTypeKey;
|
|
3
|
+
const CheckboxControlDataTypeValueV1 = "checkbox::v1";
|
|
1
4
|
const CheckboxControlType = "makeswift::controls::checkbox";
|
|
2
5
|
function Checkbox(config = {}) {
|
|
3
|
-
return { type: CheckboxControlType, config };
|
|
6
|
+
return { type: CheckboxControlType, config, version: 1 };
|
|
4
7
|
}
|
|
8
|
+
const NumberControlDataTypeKey = ControlDataTypeKey;
|
|
9
|
+
const NumberControlDataTypeValueV1 = "number::v1";
|
|
5
10
|
const NumberControlType = "makeswift::controls::number";
|
|
6
11
|
function Number(config = {}) {
|
|
7
|
-
return { type: NumberControlType, config };
|
|
12
|
+
return { type: NumberControlType, config, version: 1 };
|
|
8
13
|
}
|
|
9
|
-
export {
|
|
14
|
+
export { CheckboxControlDataTypeKey as C, NumberControlDataTypeKey as N, CheckboxControlDataTypeValueV1 as a, NumberControlDataTypeValueV1 as b, NumberControlType as c, CheckboxControlType as d, Checkbox as e, Number as f };
|
|
10
15
|
//# sourceMappingURL=number.es.js.map
|
package/dist/number.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number.es.js","sources":["../src/controls/checkbox.ts","../src/controls/number.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"number.es.js","sources":["../src/controls/checkbox.ts","../src/controls/number.ts"],"sourcesContent":["import { ControlDataTypeKey } from \"./control-data-type-key\"\n\nexport const CheckboxControlDataTypeKey = ControlDataTypeKey\n\nexport const CheckboxControlDataTypeValueV1 = 'checkbox::v1'\n\nexport type CheckboxControlDataV0 = boolean\n\nexport type CheckboxControlDataV1 = {\n [CheckboxControlDataTypeKey]: typeof CheckboxControlDataTypeValueV1\n value: boolean,\n}\n\nexport type CheckboxControlData = CheckboxControlDataV0 | CheckboxControlDataV1\n\nexport const CheckboxControlType = 'makeswift::controls::checkbox'\n\ntype CheckboxControlConfig = {\n label?: string\n defaultValue?: boolean\n}\n\nexport type CheckboxControlDefinition<C extends CheckboxControlConfig = CheckboxControlConfig> = {\n type: typeof CheckboxControlType\n config: C\n version?: 1\n}\n\nexport function Checkbox<C extends CheckboxControlConfig>(\n config: C = {} as C,\n): CheckboxControlDefinition<C> {\n return { type: CheckboxControlType, config, version: 1 }\n}\n","import { ControlDataTypeKey } from \"./control-data-type-key\"\n\nexport const NumberControlDataTypeKey = ControlDataTypeKey\n\nexport const NumberControlDataTypeValueV1 = 'number::v1'\n\nexport type NumberControlDataV0 = number\n\nexport type NumberControlDataV1 = {\n [NumberControlDataTypeKey]: typeof NumberControlDataTypeValueV1\n value: number,\n}\n\nexport type NumberControlData = NumberControlDataV0 | NumberControlDataV1\n\nexport const NumberControlType = 'makeswift::controls::number'\n\ntype NumberControlConfig = {\n label?: string\n labelOrientation?: 'vertical' | 'horizontal'\n defaultValue?: number\n min?: number\n max?: number\n step?: number\n suffix?: string\n}\n\nexport type NumberControlDefinition<C extends NumberControlConfig = NumberControlConfig> = {\n type: typeof NumberControlType\n config: C\n version?: 1\n}\n\nexport function Number<C extends NumberControlConfig>(\n config: C = {} as C,\n): NumberControlDefinition<C> {\n return { type: NumberControlType, config, version: 1 }\n}\n"],"names":[],"mappings":";AAEO,MAAM,6BAA6B;AAEnC,MAAM,iCAAiC;AAWvC,MAAM,sBAAsB;AAcjC,kBAAA,SAAY,IACkB;AAC9B,SAAO,EAAE,MAAM,qBAAqB,QAAQ,SAAS,EAAE;AACzD;AC9BO,MAAM,2BAA2B;AAEjC,MAAM,+BAA+B;AAWrC,MAAM,oBAAoB;AAmB/B,gBAAA,SAAY,IACgB;AAC5B,SAAO,EAAE,MAAM,mBAAmB,QAAQ,SAAS,EAAE;AACvD;;"}
|
package/dist/react-page.cjs.js
CHANGED
|
@@ -294,7 +294,7 @@ function Color(config = {}) {
|
|
|
294
294
|
function copyColorData(value, context) {
|
|
295
295
|
if (value == null)
|
|
296
296
|
return value;
|
|
297
|
-
return tsPattern.match(value).with({ [
|
|
297
|
+
return tsPattern.match(value).with({ [ColorControlDataTypeKey]: ColorControlDataTypeValueV1 }, (val) => {
|
|
298
298
|
var _a;
|
|
299
299
|
return __spreadProps(__spreadValues({}, val), {
|
|
300
300
|
swatchId: (_a = context.replacementContext.swatchIds.get(val.swatchId)) != null ? _a : val.swatchId
|
|
@@ -1173,13 +1173,17 @@ function mergeShapeTranslatedData(definition2, data, translatedData, context) {
|
|
|
1173
1173
|
mergeTranslatedData(definition22, data[key], translatedData[key], context)
|
|
1174
1174
|
]));
|
|
1175
1175
|
}
|
|
1176
|
+
const TextAreaControlDataTypeKey = ControlDataTypeKey;
|
|
1177
|
+
const TextAreaControlDataTypeValueV1 = "text-area::v1";
|
|
1176
1178
|
const TextAreaControlType = "makeswift::controls::text-area";
|
|
1177
1179
|
function TextArea(config = {}) {
|
|
1178
|
-
return { type: TextAreaControlType, config };
|
|
1180
|
+
return { type: TextAreaControlType, config, version: 1 };
|
|
1179
1181
|
}
|
|
1182
|
+
const TextInputControlDataTypeKey = ControlDataTypeKey;
|
|
1183
|
+
const TextInputControlDataTypeValueV1 = "text-input::v1";
|
|
1180
1184
|
const TextInputControlType = "makeswift::controls::text-input";
|
|
1181
1185
|
function TextInput(config = {}) {
|
|
1182
|
-
return { type: TextInputControlType, config };
|
|
1186
|
+
return { type: TextInputControlType, config, version: 1 };
|
|
1183
1187
|
}
|
|
1184
1188
|
const SlotControlType = "makeswift::controls::slot";
|
|
1185
1189
|
function Slot() {
|
|
@@ -5220,9 +5224,13 @@ exports.TableFormFieldsMessageType = TableFormFieldsMessageType;
|
|
|
5220
5224
|
exports.TextAlignPlugin = TextAlignPlugin;
|
|
5221
5225
|
exports.TextArea = TextArea$1;
|
|
5222
5226
|
exports.TextArea$1 = TextArea;
|
|
5227
|
+
exports.TextAreaControlDataTypeKey = TextAreaControlDataTypeKey;
|
|
5228
|
+
exports.TextAreaControlDataTypeValueV1 = TextAreaControlDataTypeValueV1;
|
|
5223
5229
|
exports.TextAreaControlType = TextAreaControlType;
|
|
5224
5230
|
exports.TextInput = TextInput$1;
|
|
5225
5231
|
exports.TextInput$1 = TextInput;
|
|
5232
|
+
exports.TextInputControlDataTypeKey = TextInputControlDataTypeKey;
|
|
5233
|
+
exports.TextInputControlDataTypeValueV1 = TextInputControlDataTypeValueV1;
|
|
5226
5234
|
exports.TextInputControlType = TextInputControlType;
|
|
5227
5235
|
exports.TextStyle = TextStyle;
|
|
5228
5236
|
exports.Types = Types;
|