@makeswift/runtime 0.9.0 → 0.9.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/Box.cjs.js +15 -15
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +10 -10
- package/dist/Button.cjs.js +12 -12
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +10 -10
- package/dist/Carousel.cjs.js +28 -28
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +7 -7
- package/dist/Countdown.cjs.js +15 -15
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +7 -7
- package/dist/Divider.cjs.js +12 -12
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +10 -10
- package/dist/Embed.cjs.js +3 -30
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +2 -29
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +51 -51
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +7 -7
- package/dist/Image.cjs.js +8 -8
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +7 -7
- package/dist/LiveProvider.cjs.js +6 -6
- package/dist/LiveProvider.es.js +8 -8
- package/dist/Navigation.cjs.js +27 -27
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +6 -6
- package/dist/PreviewProvider.cjs.js +7 -7
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +7 -7
- package/dist/ReadOnlyText.cjs.js +16 -13
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +11 -8
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +13 -10
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +9 -6
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +8 -8
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +6 -6
- package/dist/SocialLinks.cjs.js +14 -14
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +10 -10
- package/dist/Text.cjs.js +4 -4
- package/dist/Text.es.js +5 -5
- package/dist/Video.cjs.js +3 -30
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +2 -29
- package/dist/Video.es.js.map +1 -1
- package/dist/builder.cjs.js +4 -2
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +4 -2
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +9 -9
- package/dist/components.es.js +9 -9
- package/dist/control-serialization.cjs.js +88 -12
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +89 -13
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +15 -4
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +6 -3
- package/dist/controls.es.js.map +1 -1
- package/dist/deepEqual.cjs.js +40 -0
- package/dist/deepEqual.cjs.js.map +1 -0
- package/dist/deepEqual.es.js +39 -0
- package/dist/deepEqual.es.js.map +1 -0
- package/dist/index.cjs.js +102 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs10.js +173 -249
- package/dist/index.cjs10.js.map +1 -1
- package/dist/index.cjs11.js +375 -0
- package/dist/index.cjs11.js.map +1 -0
- package/dist/index.cjs2.js +14 -16
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs4.js +2 -1
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs6.js +700 -22
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +37 -13
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs8.js +17 -41
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.cjs9.js +13 -266
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.es.js +85 -80
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +174 -250
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es11.js +368 -0
- package/dist/index.es11.js.map +1 -0
- package/dist/index.es2.js +3 -5
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +1 -1
- package/dist/index.es4.js +2 -1
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es6.js +695 -22
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +33 -14
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es8.js +17 -39
- package/dist/index.es8.js.map +1 -1
- package/dist/index.es9.js +12 -261
- package/dist/index.es9.js.map +1 -1
- package/dist/leaf.cjs.js +1 -1
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +2 -2
- package/dist/main.cjs.js +4 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +4 -2
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +3 -3
- package/dist/next.es.js +4 -4
- package/dist/prop-controllers.cjs.js +4 -2
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +4 -2
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-page.cjs.js +958 -1431
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +852 -1343
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +3 -3
- package/dist/react.es.js +3 -3
- package/dist/select.cjs.js +21 -0
- package/dist/select.cjs.js.map +1 -0
- package/dist/select.es.js +16 -0
- package/dist/select.es.js.map +1 -0
- package/dist/slate.cjs.js +213 -12
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +207 -6
- package/dist/slate.es.js.map +1 -1
- package/dist/types/src/api/react.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/control-serialization.d.ts +3 -3
- package/dist/types/src/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts +2 -2
- package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/controls/style-v2.d.ts +5 -0
- package/dist/types/src/builder/serialization/controls/style-v2.d.ts.map +1 -0
- 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/components/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/types/src/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/types/src/components/page/Page.d.ts.map +1 -1
- package/dist/types/src/controls/control.d.ts +4 -2
- package/dist/types/src/controls/control.d.ts.map +1 -1
- package/dist/types/src/controls/icon-radio-group.d.ts +29 -0
- package/dist/types/src/controls/icon-radio-group.d.ts.map +1 -0
- package/dist/types/src/controls/index.d.ts +2 -0
- package/dist/types/src/controls/index.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +12 -3
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +1 -2
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/style-v2.d.ts +64 -0
- package/dist/types/src/controls/style-v2.d.ts.map +1 -0
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/next/document.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +6 -3
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/instances.d.ts +2 -2
- package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +5 -2
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/icon-radio-group.d.ts +4 -0
- package/dist/types/src/runtimes/react/controls/icon-radio-group.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +2 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +10 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +10 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +1 -1
- 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 +13 -0
- package/dist/types/src/runtimes/react/controls/style-v2.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls.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 +4 -0
- package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/ColorPlugin/index.d.ts +10 -0
- package/dist/types/src/slate/ColorPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/InlineModePlugin/index.d.ts +2 -0
- package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts +9 -0
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/index.d.ts +2 -0
- package/dist/types/src/slate/index.d.ts.map +1 -1
- package/dist/types/src/slate/types.d.ts +39 -0
- package/dist/types/src/slate/types.d.ts.map +1 -1
- package/dist/types/src/slate/utils/responsive.d.ts +16 -0
- package/dist/types/src/slate/utils/responsive.d.ts.map +1 -0
- package/dist/useMediaQuery.es.js +1 -1
- package/package.json +1 -1
package/dist/Text.cjs.js
CHANGED
|
@@ -29,16 +29,16 @@ require("redux");
|
|
|
29
29
|
require("redux-thunk");
|
|
30
30
|
require("./actions.cjs.js");
|
|
31
31
|
require("./state/breakpoints.cjs.js");
|
|
32
|
-
require("slate");
|
|
33
|
-
require("is-hotkey");
|
|
34
|
-
require("slate-react");
|
|
35
32
|
require("@emotion/css");
|
|
36
33
|
require("@emotion/serialize");
|
|
37
34
|
require("@emotion/utils");
|
|
35
|
+
require("slate");
|
|
38
36
|
require("./text-input.cjs.js");
|
|
39
37
|
require("./combobox.cjs.js");
|
|
38
|
+
require("./select.cjs.js");
|
|
40
39
|
require("use-sync-external-store/shim");
|
|
41
40
|
require("./types.cjs.js");
|
|
41
|
+
require("./deepEqual.cjs.js");
|
|
42
42
|
require("./box-models.cjs.js");
|
|
43
43
|
require("css-box-model");
|
|
44
44
|
require("color");
|
|
@@ -62,7 +62,7 @@ function _interopDefaultLegacy(e) {
|
|
|
62
62
|
}
|
|
63
63
|
var dynamic__default = /* @__PURE__ */ _interopDefaultLegacy(dynamic);
|
|
64
64
|
const EditableText = next.forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
65
|
-
return require("./index.
|
|
65
|
+
return require("./index.cjs11.js");
|
|
66
66
|
}))));
|
|
67
67
|
const ReadOnlyText = next.forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
68
68
|
return require("./ReadOnlyText.cjs.js");
|
package/dist/Text.es.js
CHANGED
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import dynamic from "next/dynamic";
|
|
21
21
|
import { forwardRef } from "react";
|
|
22
|
-
import {
|
|
22
|
+
import { B as forwardNextDynamicRef, F as useIsPreview } from "./index.es.js";
|
|
23
23
|
import { jsx } from "react/jsx-runtime";
|
|
24
24
|
import "use-sync-external-store/shim/with-selector";
|
|
25
25
|
import "./react-page.es.js";
|
|
@@ -27,16 +27,16 @@ import "redux";
|
|
|
27
27
|
import "redux-thunk";
|
|
28
28
|
import "./actions.es.js";
|
|
29
29
|
import "./state/breakpoints.es.js";
|
|
30
|
-
import "slate";
|
|
31
|
-
import "is-hotkey";
|
|
32
|
-
import "slate-react";
|
|
33
30
|
import "@emotion/css";
|
|
34
31
|
import "@emotion/serialize";
|
|
35
32
|
import "@emotion/utils";
|
|
33
|
+
import "slate";
|
|
36
34
|
import "./text-input.es.js";
|
|
37
35
|
import "./combobox.es.js";
|
|
36
|
+
import "./select.es.js";
|
|
38
37
|
import "use-sync-external-store/shim";
|
|
39
38
|
import "./types.es.js";
|
|
39
|
+
import "./deepEqual.es.js";
|
|
40
40
|
import "./box-models.es.js";
|
|
41
41
|
import "css-box-model";
|
|
42
42
|
import "color";
|
|
@@ -55,7 +55,7 @@ import "set-cookie-parser";
|
|
|
55
55
|
import "./constants.es.js";
|
|
56
56
|
import "uuid";
|
|
57
57
|
import "corporate-ipsum";
|
|
58
|
-
const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.
|
|
58
|
+
const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es11.js"))));
|
|
59
59
|
const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./ReadOnlyText.es.js"))));
|
|
60
60
|
const Text = forwardRef(function Text2(props, ref) {
|
|
61
61
|
const isPreview = useIsPreview();
|
package/dist/Video.cjs.js
CHANGED
|
@@ -22,43 +22,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
22
22
|
var css = require("@emotion/css");
|
|
23
23
|
var React = require("react");
|
|
24
24
|
var ReactPlayer = require("react-player");
|
|
25
|
-
var
|
|
25
|
+
var reactPage = require("./react-page.cjs.js");
|
|
26
26
|
var placeholders = require("./placeholders.cjs.js");
|
|
27
27
|
var jsxRuntime = require("react/jsx-runtime");
|
|
28
|
-
require("use-sync-external-store/shim/with-selector");
|
|
29
|
-
require("next/dynamic");
|
|
30
|
-
require("./react-page.cjs.js");
|
|
31
28
|
require("redux");
|
|
32
29
|
require("redux-thunk");
|
|
33
30
|
require("./actions.cjs.js");
|
|
34
31
|
require("./state/breakpoints.cjs.js");
|
|
35
|
-
require("slate");
|
|
36
|
-
require("is-hotkey");
|
|
37
|
-
require("slate-react");
|
|
38
32
|
require("@emotion/serialize");
|
|
39
33
|
require("@emotion/utils");
|
|
40
|
-
require("
|
|
41
|
-
require("./combobox.cjs.js");
|
|
42
|
-
require("use-sync-external-store/shim");
|
|
43
|
-
require("./types.cjs.js");
|
|
44
|
-
require("./box-models.cjs.js");
|
|
45
|
-
require("css-box-model");
|
|
46
|
-
require("color");
|
|
47
|
-
require("scroll-into-view-if-needed");
|
|
48
|
-
require("react-dom");
|
|
49
|
-
require("html-react-parser");
|
|
50
|
-
require("next/head");
|
|
51
|
-
require("zod");
|
|
52
|
-
require("@emotion/server/create-instance");
|
|
53
|
-
require("next/document");
|
|
54
|
-
require("cors");
|
|
55
|
-
require("path-to-regexp");
|
|
56
|
-
require("cookie");
|
|
57
|
-
require("http-proxy");
|
|
58
|
-
require("set-cookie-parser");
|
|
59
|
-
require("./constants.cjs.js");
|
|
60
|
-
require("uuid");
|
|
61
|
-
require("corporate-ipsum");
|
|
34
|
+
require("slate");
|
|
62
35
|
function _interopDefaultLegacy(e) {
|
|
63
36
|
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
64
37
|
}
|
|
@@ -79,7 +52,7 @@ const Video = React.forwardRef(function Video2({
|
|
|
79
52
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
80
53
|
ref,
|
|
81
54
|
id,
|
|
82
|
-
className: css.cx(
|
|
55
|
+
className: css.cx(reactPage.useStyle({
|
|
83
56
|
display: "flex",
|
|
84
57
|
flexDirection: "column",
|
|
85
58
|
overflow: "hidden"
|
package/dist/Video.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Video.cjs.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { forwardRef, Ref, useEffect, useState } from 'react'\nimport ReactPlayer from 'react-player'\n\nimport { ElementIDValue, VideoValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: string\n borderRadius?: string\n}\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n /**\n * @see https://github.com/cookpete/react-player/issues/1428\n */\n const [shouldRenderReactPlayer, setShouldRenderReactPlayer] = useState(false)\n\n useEffect(() => {\n setShouldRenderReactPlayer(true)\n }, [])\n\n return (\n <div\n ref={ref}\n id={id}\n className={cx(\n useStyle({ display: 'flex', flexDirection: 'column', overflow: 'hidden' }),\n width,\n margin,\n borderRadius,\n )}\n >\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {shouldRenderReactPlayer && canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </div>\n )\n})\n\nexport default Video\n"],"names":["ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","shouldRenderReactPlayer","setShouldRenderReactPlayer","useState","useEffect","cx","useStyle","display","flexDirection","overflow","position","paddingTop","top","left","right","bottom","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","_jsx","placeholders","src"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Video.cjs.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { forwardRef, Ref, useEffect, useState } from 'react'\nimport ReactPlayer from 'react-player'\n\nimport { ElementIDValue, VideoValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: string\n borderRadius?: string\n}\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n /**\n * @see https://github.com/cookpete/react-player/issues/1428\n */\n const [shouldRenderReactPlayer, setShouldRenderReactPlayer] = useState(false)\n\n useEffect(() => {\n setShouldRenderReactPlayer(true)\n }, [])\n\n return (\n <div\n ref={ref}\n id={id}\n className={cx(\n useStyle({ display: 'flex', flexDirection: 'column', overflow: 'hidden' }),\n width,\n margin,\n borderRadius,\n )}\n >\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {shouldRenderReactPlayer && canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </div>\n )\n})\n\nexport default Video\n"],"names":["ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","shouldRenderReactPlayer","setShouldRenderReactPlayer","useState","useEffect","cx","useStyle","display","flexDirection","overflow","position","paddingTop","top","left","right","bottom","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","_jsx","placeholders","src"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,eAAe,KAAK;AAEpBC,MAAAA,QAAQC,MAAAA,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,EAAQC;AAAAA,GAC5BC,KACA;AACMC,QAAAA,aAAaL,SAASA,MAAMM,OAAO,QAAQC,qBAAAA,WAAYC,QAAQR,MAAMM,GAA1B;AAI3C,QAAA,CAACG,yBAAyBC,8BAA8BC,MAAAA,SAAS,KAAD;AAEtEC,QAAAA,UAAU,MAAM;AACdF,+BAA2B,IAAD;AAAA,EADnB,GAEN,CAFM,CAAA;AAKP,wCAAA,OAAA;AAAA,IACE;AAAA,IACA;AAAA,IACA,WAAWG,OACTC,mBAAS;AAAA,MAAEC,SAAS;AAAA,MAAQC,eAAe;AAAA,MAAUC,UAAU;AAAA,IAAA,CAAvD,GACRhB,OACAC,QACAC,YAJW;AAAA,IAOb,yCAAA,OAAA;AAAA,MAAK,OAAO;AAAA,QAAEe,UAAU;AAAA,QAAYC,YAAa,GAAE,MAAMvB;AAAAA,MAAzD;AAAA,MACE,yCAAA,OAAA;AAAA,QAAK,OAAO;AAAA,UAAEsB,UAAU;AAAA,UAAYE,KAAK;AAAA,UAAGC,MAAM;AAAA,UAAGC,OAAO;AAAA,UAAGC,QAAQ;AAAA,QAAvE;AAAA,QACGd,UAAAA,2BAA2BJ,eAAe,sCACxCE,qBAAAA,YAAD,iCACMP,QADN;AAAA,UAEE,OAAM;AAAA,UACN,QAAO;AAAA,UACP,QAAQ;AAAA,YACNwB,OAAO;AAAA,cAAEC,eAAe;AAAA,gBAAEC,YAAY1B,SAAS,QAAQ,CAACA,MAAM2B;AAAAA,cAAtC;AAAA,YADlB;AAAA,YAENC,QAAQ;AAAA,cACNC,SAAS;AAAA,gBACPC,kBAAkB9B,SAAS,QAAQA,MAAM+B,SAAS,OAAO,SAAS;AAAA,cAD3D;AAAA,YADH;AAAA,UAFF;AAAA,QAAA,EAJV,IAcAC,2BAAA,IAAA,OAAA;AAAA,UAAK,OAAM;AAAA,UAAO,KAAKC,aAAAA,aAAajC,MAAMkC;AAAAA,UAAK,KAAI;AAAA,QAAA,CAAnD;AAAA,MAAA,CAhBJ;AAAA,IAAA,CADF;AAAA,EAAA,CAXJ;AAkCD,CAhDuB;;"}
|
package/dist/Video.es.js
CHANGED
|
@@ -20,43 +20,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
import { cx } from "@emotion/css";
|
|
21
21
|
import { forwardRef, useState, useEffect } from "react";
|
|
22
22
|
import ReactPlayer from "react-player";
|
|
23
|
-
import {
|
|
23
|
+
import { Z as useStyle } from "./react-page.es.js";
|
|
24
24
|
import { p as placeholders } from "./placeholders.es.js";
|
|
25
25
|
import { jsx } from "react/jsx-runtime";
|
|
26
|
-
import "use-sync-external-store/shim/with-selector";
|
|
27
|
-
import "next/dynamic";
|
|
28
|
-
import "./react-page.es.js";
|
|
29
26
|
import "redux";
|
|
30
27
|
import "redux-thunk";
|
|
31
28
|
import "./actions.es.js";
|
|
32
29
|
import "./state/breakpoints.es.js";
|
|
33
|
-
import "slate";
|
|
34
|
-
import "is-hotkey";
|
|
35
|
-
import "slate-react";
|
|
36
30
|
import "@emotion/serialize";
|
|
37
31
|
import "@emotion/utils";
|
|
38
|
-
import "
|
|
39
|
-
import "./combobox.es.js";
|
|
40
|
-
import "use-sync-external-store/shim";
|
|
41
|
-
import "./types.es.js";
|
|
42
|
-
import "./box-models.es.js";
|
|
43
|
-
import "css-box-model";
|
|
44
|
-
import "color";
|
|
45
|
-
import "scroll-into-view-if-needed";
|
|
46
|
-
import "react-dom";
|
|
47
|
-
import "html-react-parser";
|
|
48
|
-
import "next/head";
|
|
49
|
-
import "zod";
|
|
50
|
-
import "@emotion/server/create-instance";
|
|
51
|
-
import "next/document";
|
|
52
|
-
import "cors";
|
|
53
|
-
import "path-to-regexp";
|
|
54
|
-
import "cookie";
|
|
55
|
-
import "http-proxy";
|
|
56
|
-
import "set-cookie-parser";
|
|
57
|
-
import "./constants.es.js";
|
|
58
|
-
import "uuid";
|
|
59
|
-
import "corporate-ipsum";
|
|
32
|
+
import "slate";
|
|
60
33
|
const ASPECT_RATIO = 16 / 9;
|
|
61
34
|
const Video = forwardRef(function Video2({
|
|
62
35
|
id,
|
package/dist/Video.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Video.es.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { forwardRef, Ref, useEffect, useState } from 'react'\nimport ReactPlayer from 'react-player'\n\nimport { ElementIDValue, VideoValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: string\n borderRadius?: string\n}\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n /**\n * @see https://github.com/cookpete/react-player/issues/1428\n */\n const [shouldRenderReactPlayer, setShouldRenderReactPlayer] = useState(false)\n\n useEffect(() => {\n setShouldRenderReactPlayer(true)\n }, [])\n\n return (\n <div\n ref={ref}\n id={id}\n className={cx(\n useStyle({ display: 'flex', flexDirection: 'column', overflow: 'hidden' }),\n width,\n margin,\n borderRadius,\n )}\n >\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {shouldRenderReactPlayer && canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </div>\n )\n})\n\nexport default Video\n"],"names":["ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","shouldRenderReactPlayer","setShouldRenderReactPlayer","useState","useEffect","cx","useStyle","display","flexDirection","overflow","position","paddingTop","top","left","right","bottom","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","_jsx","placeholders","src"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Video.es.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { forwardRef, Ref, useEffect, useState } from 'react'\nimport ReactPlayer from 'react-player'\n\nimport { ElementIDValue, VideoValue } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: string\n borderRadius?: string\n}\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n /**\n * @see https://github.com/cookpete/react-player/issues/1428\n */\n const [shouldRenderReactPlayer, setShouldRenderReactPlayer] = useState(false)\n\n useEffect(() => {\n setShouldRenderReactPlayer(true)\n }, [])\n\n return (\n <div\n ref={ref}\n id={id}\n className={cx(\n useStyle({ display: 'flex', flexDirection: 'column', overflow: 'hidden' }),\n width,\n margin,\n borderRadius,\n )}\n >\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {shouldRenderReactPlayer && canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </div>\n )\n})\n\nexport default Video\n"],"names":["ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","shouldRenderReactPlayer","setShouldRenderReactPlayer","useState","useEffect","cx","useStyle","display","flexDirection","overflow","position","paddingTop","top","left","right","bottom","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","_jsx","placeholders","src"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,eAAe,KAAK;AAEpBC,MAAAA,QAAQC,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,EAAQC;AAAAA,GAC5BC,KACA;AACMC,QAAAA,aAAaL,SAASA,MAAMM,OAAO,QAAQC,YAAYC,QAAQR,MAAMM,GAA1B;AAI3C,QAAA,CAACG,yBAAyBC,8BAA8BC,SAAS,KAAD;AAEtEC,YAAU,MAAM;AACdF,+BAA2B,IAAD;AAAA,EADnB,GAEN,CAFM,CAAA;AAKP,6BAAA,OAAA;AAAA,IACE;AAAA,IACA;AAAA,IACA,WAAWG,GACTC,SAAS;AAAA,MAAEC,SAAS;AAAA,MAAQC,eAAe;AAAA,MAAUC,UAAU;AAAA,IAAA,CAAvD,GACRhB,OACAC,QACAC,YAJW;AAAA,IAOb,8BAAA,OAAA;AAAA,MAAK,OAAO;AAAA,QAAEe,UAAU;AAAA,QAAYC,YAAa,GAAE,MAAMvB;AAAAA,MAAzD;AAAA,MACE,8BAAA,OAAA;AAAA,QAAK,OAAO;AAAA,UAAEsB,UAAU;AAAA,UAAYE,KAAK;AAAA,UAAGC,MAAM;AAAA,UAAGC,OAAO;AAAA,UAAGC,QAAQ;AAAA,QAAvE;AAAA,QACGd,UAAAA,2BAA2BJ,eAAe,2BACxC,aAAD,iCACML,QADN;AAAA,UAEE,OAAM;AAAA,UACN,QAAO;AAAA,UACP,QAAQ;AAAA,YACNwB,OAAO;AAAA,cAAEC,eAAe;AAAA,gBAAEC,YAAY1B,SAAS,QAAQ,CAACA,MAAM2B;AAAAA,cAAtC;AAAA,YADlB;AAAA,YAENC,QAAQ;AAAA,cACNC,SAAS;AAAA,gBACPC,kBAAkB9B,SAAS,QAAQA,MAAM+B,SAAS,OAAO,SAAS;AAAA,cAD3D;AAAA,YADH;AAAA,UAFF;AAAA,QAAA,EAJV,IAcAC,oBAAA,OAAA;AAAA,UAAK,OAAM;AAAA,UAAO,KAAKC,aAAajC,MAAMkC;AAAAA,UAAK,KAAI;AAAA,QAAA,CAAnD;AAAA,MAAA,CAhBJ;AAAA,IAAA,CADF;AAAA,EAAA,CAXJ;AAkCD,CAhDuB;;"}
|
package/dist/builder.cjs.js
CHANGED
|
@@ -7,9 +7,11 @@ require("redux");
|
|
|
7
7
|
require("redux-thunk");
|
|
8
8
|
require("./actions.cjs.js");
|
|
9
9
|
require("./state/breakpoints.cjs.js");
|
|
10
|
+
require("react");
|
|
11
|
+
require("@emotion/css");
|
|
12
|
+
require("@emotion/serialize");
|
|
13
|
+
require("@emotion/utils");
|
|
10
14
|
require("slate");
|
|
11
|
-
require("is-hotkey");
|
|
12
|
-
require("slate-react");
|
|
13
15
|
exports.deserializeControl = controlSerialization.deserializeControl;
|
|
14
16
|
exports.deserializeControls = controlSerialization.deserializeControls;
|
|
15
17
|
exports.deserializeFunction = controlSerialization.deserializeFunction;
|
package/dist/builder.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/builder.es.js
CHANGED
|
@@ -5,7 +5,9 @@ import "redux";
|
|
|
5
5
|
import "redux-thunk";
|
|
6
6
|
import "./actions.es.js";
|
|
7
7
|
import "./state/breakpoints.es.js";
|
|
8
|
+
import "react";
|
|
9
|
+
import "@emotion/css";
|
|
10
|
+
import "@emotion/serialize";
|
|
11
|
+
import "@emotion/utils";
|
|
8
12
|
import "slate";
|
|
9
|
-
import "is-hotkey";
|
|
10
|
-
import "slate-react";
|
|
11
13
|
//# sourceMappingURL=builder.es.js.map
|
package/dist/builder.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"builder.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/components.cjs.js
CHANGED
|
@@ -20,25 +20,25 @@ var useMediaQuery = require("./useMediaQuery.cjs.js");
|
|
|
20
20
|
require("react");
|
|
21
21
|
require("@emotion/css");
|
|
22
22
|
require("uuid");
|
|
23
|
-
require("react/jsx-runtime");
|
|
24
|
-
require("./box-models.cjs.js");
|
|
25
|
-
require("css-box-model");
|
|
26
|
-
require("./actions.cjs.js");
|
|
27
|
-
require("use-sync-external-store/shim/with-selector");
|
|
28
|
-
require("next/dynamic");
|
|
29
23
|
require("./react-page.cjs.js");
|
|
30
24
|
require("redux");
|
|
31
25
|
require("redux-thunk");
|
|
26
|
+
require("./actions.cjs.js");
|
|
32
27
|
require("./state/breakpoints.cjs.js");
|
|
33
|
-
require("slate");
|
|
34
|
-
require("is-hotkey");
|
|
35
|
-
require("slate-react");
|
|
36
28
|
require("@emotion/serialize");
|
|
37
29
|
require("@emotion/utils");
|
|
30
|
+
require("slate");
|
|
31
|
+
require("react/jsx-runtime");
|
|
32
|
+
require("./box-models.cjs.js");
|
|
33
|
+
require("css-box-model");
|
|
34
|
+
require("use-sync-external-store/shim/with-selector");
|
|
35
|
+
require("next/dynamic");
|
|
38
36
|
require("./text-input.cjs.js");
|
|
39
37
|
require("./combobox.cjs.js");
|
|
38
|
+
require("./select.cjs.js");
|
|
40
39
|
require("use-sync-external-store/shim");
|
|
41
40
|
require("./types.cjs.js");
|
|
41
|
+
require("./deepEqual.cjs.js");
|
|
42
42
|
require("color");
|
|
43
43
|
require("scroll-into-view-if-needed");
|
|
44
44
|
require("react-dom");
|
package/dist/components.es.js
CHANGED
|
@@ -18,25 +18,25 @@ export { u as useMediaQuery } from "./useMediaQuery.es.js";
|
|
|
18
18
|
import "react";
|
|
19
19
|
import "@emotion/css";
|
|
20
20
|
import "uuid";
|
|
21
|
-
import "react/jsx-runtime";
|
|
22
|
-
import "./box-models.es.js";
|
|
23
|
-
import "css-box-model";
|
|
24
|
-
import "./actions.es.js";
|
|
25
|
-
import "use-sync-external-store/shim/with-selector";
|
|
26
|
-
import "next/dynamic";
|
|
27
21
|
import "./react-page.es.js";
|
|
28
22
|
import "redux";
|
|
29
23
|
import "redux-thunk";
|
|
24
|
+
import "./actions.es.js";
|
|
30
25
|
import "./state/breakpoints.es.js";
|
|
31
|
-
import "slate";
|
|
32
|
-
import "is-hotkey";
|
|
33
|
-
import "slate-react";
|
|
34
26
|
import "@emotion/serialize";
|
|
35
27
|
import "@emotion/utils";
|
|
28
|
+
import "slate";
|
|
29
|
+
import "react/jsx-runtime";
|
|
30
|
+
import "./box-models.es.js";
|
|
31
|
+
import "css-box-model";
|
|
32
|
+
import "use-sync-external-store/shim/with-selector";
|
|
33
|
+
import "next/dynamic";
|
|
36
34
|
import "./text-input.es.js";
|
|
37
35
|
import "./combobox.es.js";
|
|
36
|
+
import "./select.es.js";
|
|
38
37
|
import "use-sync-external-store/shim";
|
|
39
38
|
import "./types.es.js";
|
|
39
|
+
import "./deepEqual.es.js";
|
|
40
40
|
import "color";
|
|
41
41
|
import "scroll-into-view-if-needed";
|
|
42
42
|
import "react-dom";
|
|
@@ -33,9 +33,6 @@ var __objRest = (source, exclude) => {
|
|
|
33
33
|
var combobox = require("./combobox.cjs.js");
|
|
34
34
|
var reactPage = require("./react-page.cjs.js");
|
|
35
35
|
require("slate");
|
|
36
|
-
require("./state/breakpoints.cjs.js");
|
|
37
|
-
require("is-hotkey");
|
|
38
|
-
require("slate-react");
|
|
39
36
|
function isSerializedFunction(value) {
|
|
40
37
|
return value instanceof MessagePort;
|
|
41
38
|
}
|
|
@@ -119,19 +116,42 @@ function deserializeListControlDefinition(definition) {
|
|
|
119
116
|
config: __spreadProps(__spreadValues({}, definition.config), { type, getItemLabel })
|
|
120
117
|
});
|
|
121
118
|
}
|
|
122
|
-
function serializeRichTextControlV2(
|
|
119
|
+
function serializeRichTextControlV2(definition) {
|
|
123
120
|
var _b;
|
|
124
|
-
const _a =
|
|
121
|
+
const _a = definition.config, { plugins } = _a, config = __objRest(_a, ["plugins"]);
|
|
125
122
|
const transferables = [];
|
|
126
123
|
return [
|
|
127
|
-
__spreadProps(__spreadValues({},
|
|
124
|
+
__spreadProps(__spreadValues({}, definition), {
|
|
128
125
|
config: __spreadProps(__spreadValues({}, config), {
|
|
129
126
|
plugins: (_b = plugins == null ? void 0 : plugins.map((plugin) => {
|
|
130
|
-
|
|
127
|
+
const onKeyDown = plugin.onKeyDown && serializeFunction(plugin.onKeyDown);
|
|
128
|
+
if (onKeyDown)
|
|
129
|
+
transferables.push(onKeyDown);
|
|
130
|
+
const withPlugin = plugin.withPlugin && serializeFunction(plugin.withPlugin);
|
|
131
|
+
if (withPlugin)
|
|
132
|
+
transferables.push(withPlugin);
|
|
133
|
+
if (plugin.control) {
|
|
134
|
+
const [definition2, pluginTransferables] = serializeControl(plugin.control.definition);
|
|
135
|
+
transferables.push(...pluginTransferables);
|
|
136
|
+
const getValue = serializeFunction(plugin.control.getValue);
|
|
137
|
+
if (getValue)
|
|
138
|
+
transferables.push(getValue);
|
|
139
|
+
const onChange = serializeFunction(plugin.control.onChange);
|
|
140
|
+
if (onChange)
|
|
141
|
+
transferables.push(onChange);
|
|
142
|
+
return {
|
|
143
|
+
control: {
|
|
144
|
+
definition: definition2,
|
|
145
|
+
onChange,
|
|
146
|
+
getValue
|
|
147
|
+
},
|
|
148
|
+
onKeyDown,
|
|
149
|
+
withPlugin
|
|
150
|
+
};
|
|
151
|
+
}
|
|
131
152
|
return {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
153
|
+
onKeyDown,
|
|
154
|
+
withPlugin
|
|
135
155
|
};
|
|
136
156
|
})) != null ? _b : []
|
|
137
157
|
})
|
|
@@ -139,8 +159,34 @@ function serializeRichTextControlV2(control) {
|
|
|
139
159
|
transferables
|
|
140
160
|
];
|
|
141
161
|
}
|
|
142
|
-
function deserializeRichTextControlV2(
|
|
143
|
-
|
|
162
|
+
function deserializeRichTextControlV2(definition) {
|
|
163
|
+
var _a, _b;
|
|
164
|
+
return __spreadProps(__spreadValues({}, definition), {
|
|
165
|
+
config: __spreadProps(__spreadValues({}, definition.config), {
|
|
166
|
+
plugins: (_b = (_a = definition.config.plugins) == null ? void 0 : _a.map((plugin) => {
|
|
167
|
+
const onKeyDown = plugin.onKeyDown && deserializeFunction(plugin.onKeyDown);
|
|
168
|
+
const withPlugin = plugin.withPlugin && deserializeFunction(plugin.withPlugin);
|
|
169
|
+
if (plugin.control) {
|
|
170
|
+
const definition2 = deserializeControl(plugin.control.definition);
|
|
171
|
+
const getValue = deserializeFunction(plugin.control.getValue);
|
|
172
|
+
const onChange = deserializeFunction(plugin.control.onChange);
|
|
173
|
+
return {
|
|
174
|
+
control: {
|
|
175
|
+
definition: definition2,
|
|
176
|
+
onChange,
|
|
177
|
+
getValue
|
|
178
|
+
},
|
|
179
|
+
onKeyDown,
|
|
180
|
+
withPlugin
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
onKeyDown,
|
|
185
|
+
withPlugin
|
|
186
|
+
};
|
|
187
|
+
})) != null ? _b : []
|
|
188
|
+
})
|
|
189
|
+
});
|
|
144
190
|
}
|
|
145
191
|
function serializeShapeControlDefinition(definition) {
|
|
146
192
|
const [type, transferables] = Object.entries(definition.config.type).reduce(([type2, transferables2], [key, value]) => {
|
|
@@ -161,6 +207,32 @@ function deserializeShapeControlDefinition(definition) {
|
|
|
161
207
|
config: __spreadProps(__spreadValues({}, definition.config), { type })
|
|
162
208
|
});
|
|
163
209
|
}
|
|
210
|
+
function serializeStyleV2Control(definition) {
|
|
211
|
+
const [type, transferables] = serializeControl(definition.config.type);
|
|
212
|
+
const getStyle = definition.config.getStyle && serializeFunction(definition.config.getStyle);
|
|
213
|
+
if (getStyle) {
|
|
214
|
+
transferables.push(getStyle);
|
|
215
|
+
}
|
|
216
|
+
return [
|
|
217
|
+
__spreadProps(__spreadValues({}, definition), {
|
|
218
|
+
config: __spreadProps(__spreadValues({}, definition.config), {
|
|
219
|
+
type,
|
|
220
|
+
getStyle
|
|
221
|
+
})
|
|
222
|
+
}),
|
|
223
|
+
transferables
|
|
224
|
+
];
|
|
225
|
+
}
|
|
226
|
+
function deserializeStyleV2Control(definition) {
|
|
227
|
+
const type = deserializeControl(definition.config.type);
|
|
228
|
+
const getStyle = definition.config.getStyle && deserializeFunction(definition.config.getStyle);
|
|
229
|
+
return __spreadProps(__spreadValues({}, definition), {
|
|
230
|
+
config: __spreadProps(__spreadValues({}, definition.config), {
|
|
231
|
+
getStyle,
|
|
232
|
+
type
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
}
|
|
164
236
|
function serializeShapeControl(control) {
|
|
165
237
|
const { type } = control.options;
|
|
166
238
|
const transferables = [];
|
|
@@ -474,6 +546,8 @@ function serializeControl(control) {
|
|
|
474
546
|
return serializeRichTextControl(control);
|
|
475
547
|
case reactPage.RichTextV2ControlType:
|
|
476
548
|
return serializeRichTextControlV2(control);
|
|
549
|
+
case reactPage.StyleV2ControlType:
|
|
550
|
+
return serializeStyleV2Control(control);
|
|
477
551
|
case combobox.ComboboxControlType:
|
|
478
552
|
return serializeComboboxControlDefinition(control);
|
|
479
553
|
case reactPage.ShapeControlType:
|
|
@@ -524,6 +598,8 @@ function deserializeControl(serializedControl) {
|
|
|
524
598
|
return deserializeRichTextControl(serializedControl);
|
|
525
599
|
case reactPage.RichTextV2ControlType:
|
|
526
600
|
return deserializeRichTextControlV2(serializedControl);
|
|
601
|
+
case reactPage.StyleV2ControlType:
|
|
602
|
+
return deserializeStyleV2Control(serializedControl);
|
|
527
603
|
case combobox.ComboboxControlType:
|
|
528
604
|
return deserializeComboboxControlDefinition(serializedControl);
|
|
529
605
|
case reactPage.ShapeControlType:
|