@makeswift/runtime 0.12.0 → 0.12.2
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/Carousel.cjs.js +1 -1
- package/dist/Carousel.es.js +1 -1
- package/dist/Navigation.cjs.js +1 -1
- package/dist/Navigation.es.js +1 -1
- package/dist/PreviewProvider.es.js +1 -1
- package/dist/ReadOnlyText.cjs.js +1 -1
- package/dist/ReadOnlyText.es.js +2 -2
- package/dist/ReadOnlyTextV2.cjs.js +1 -1
- package/dist/ReadOnlyTextV2.es.js +2 -2
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +1 -1
- package/dist/control-serialization.cjs.js +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +3 -0
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +1 -1
- package/dist/index.cjs.js +4 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.es.js +4 -3
- 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/react-page.cjs.js +17 -4
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +15 -5
- package/dist/react-page.es.js.map +1 -1
- package/dist/slate.es.js +1 -1
- package/dist/toText.cjs.js +1 -1
- package/dist/toText.es.js +2 -2
- package/dist/types/src/controls/color.d.ts +12 -4
- package/dist/types/src/controls/color.d.ts.map +1 -1
- package/dist/types/src/next/api-handler/handlers/proxy-preview-mode.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es2.js
CHANGED
|
@@ -33,8 +33,8 @@ import { useMemo, useState, useEffect, useCallback, useRef, forwardRef, createEl
|
|
|
33
33
|
import { aG as getBackgroundsFileIds, aH 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
|
-
import "./actions.es.js";
|
|
37
36
|
import { match, P } from "ts-pattern";
|
|
37
|
+
import "./actions.es.js";
|
|
38
38
|
import "uuid";
|
|
39
39
|
import "slate";
|
|
40
40
|
import "escape-html";
|
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 { c6 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 { c6 as ElementUtils, bL as createRichTextV2Plugin, aV as Link, c7 as onChange, c8 as getValue, c9 as isLinkElement, _ as useStyle, c2 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
|
@@ -36,8 +36,8 @@ import { useCallback, useState, useEffect, forwardRef, useImperativeHandle, useM
|
|
|
36
36
|
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
|
-
import { _ as useStyle, b_ as BlockType, b$ as InlineType, bA as richTextDTOtoDAO, bz as richTextDTOtoSelection, f as deepEqual, bT as withBlock, bO as withTypography, bS as onKeyDown, cc as BuilderEditMode } from "./react-page.es.js";
|
|
40
39
|
import "ts-pattern";
|
|
40
|
+
import { _ as useStyle, c1 as BlockType, c2 as InlineType, bD as richTextDTOtoDAO, bC as richTextDTOtoSelection, f as deepEqual, bW as withBlock, bR as withTypography, bV as onKeyDown, cf 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
|
@@ -33,8 +33,8 @@ import { useEffect, useMemo, useState, useRef, useCallback } from "react";
|
|
|
33
33
|
import { Range, createEditor } from "slate";
|
|
34
34
|
import isHotkey from "is-hotkey";
|
|
35
35
|
import { ReactEditor, withReact, Slate, Editable } from "slate-react";
|
|
36
|
-
import { bG as richTextV2DataToDescendents, b_ as BlockType, bD as RichTextV2Mode, bW as InlineModePlugin, bU as BlockPlugin, bP as TypographyPlugin, bY as TextAlignPlugin, c2 as InlinePlugin, cc as BuilderEditMode } from "./react-page.es.js";
|
|
37
36
|
import "ts-pattern";
|
|
37
|
+
import { bJ as richTextV2DataToDescendents, c1 as BlockType, bG as RichTextV2Mode, bZ as InlineModePlugin, bX as BlockPlugin, bS as TypographyPlugin, b$ as TextAlignPlugin, c5 as InlinePlugin, cf as BuilderEditMode } from "./react-page.es.js";
|
|
38
38
|
import "escape-html";
|
|
39
39
|
import "slate-hyperscript";
|
|
40
40
|
import "parse5";
|
package/dist/react-page.cjs.js
CHANGED
|
@@ -284,16 +284,26 @@ function reducer$1(state = getInitialState(), action) {
|
|
|
284
284
|
return state;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
+
const ControlDataTypeKey = "@@makeswift/type";
|
|
288
|
+
const ColorControlDataTypeKey = ControlDataTypeKey;
|
|
289
|
+
const ColorControlDataTypeValueV1 = "color::v1";
|
|
287
290
|
const ColorControlType = "makeswift::controls::color";
|
|
288
291
|
function Color(config = {}) {
|
|
289
|
-
return { type: ColorControlType, config };
|
|
292
|
+
return { type: ColorControlType, config, version: 1 };
|
|
290
293
|
}
|
|
291
294
|
function copyColorData(value, context) {
|
|
292
|
-
var _a;
|
|
293
295
|
if (value == null)
|
|
294
296
|
return value;
|
|
295
|
-
return
|
|
296
|
-
|
|
297
|
+
return tsPattern.match(value).with({ [ControlDataTypeKey]: ColorControlDataTypeValueV1 }, (val) => {
|
|
298
|
+
var _a;
|
|
299
|
+
return __spreadProps(__spreadValues({}, val), {
|
|
300
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(val.swatchId)) != null ? _a : val.swatchId
|
|
301
|
+
});
|
|
302
|
+
}).otherwise((val) => {
|
|
303
|
+
var _a;
|
|
304
|
+
return __spreadProps(__spreadValues({}, val), {
|
|
305
|
+
swatchId: (_a = context.replacementContext.swatchIds.get(val.swatchId)) != null ? _a : val.swatchId
|
|
306
|
+
});
|
|
297
307
|
});
|
|
298
308
|
}
|
|
299
309
|
class PropController {
|
|
@@ -5130,8 +5140,11 @@ exports.BorderRadiusPropControllerFormat = BorderRadiusPropControllerFormat;
|
|
|
5130
5140
|
exports.BuilderEditMode = BuilderEditMode;
|
|
5131
5141
|
exports.Checkbox = Checkbox;
|
|
5132
5142
|
exports.Color = Color;
|
|
5143
|
+
exports.ColorControlDataTypeKey = ColorControlDataTypeKey;
|
|
5144
|
+
exports.ColorControlDataTypeValueV1 = ColorControlDataTypeValueV1;
|
|
5133
5145
|
exports.ColorControlType = ColorControlType;
|
|
5134
5146
|
exports.ComponentIcon = ComponentIcon;
|
|
5147
|
+
exports.ControlDataTypeKey = ControlDataTypeKey;
|
|
5135
5148
|
exports.Date = Date;
|
|
5136
5149
|
exports.ElementID = ElementID;
|
|
5137
5150
|
exports.ElementUtils = ElementUtils;
|