@makeswift/runtime 0.9.4 → 0.9.6
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 +3 -3
- package/dist/Box.es.js +3 -3
- package/dist/Button.cjs.js +3 -3
- package/dist/Button.es.js +3 -3
- package/dist/Carousel.cjs.js +3 -3
- package/dist/Carousel.es.js +3 -3
- package/dist/Countdown.cjs.js +1 -1
- package/dist/Countdown.es.js +1 -1
- package/dist/Divider.cjs.js +3 -3
- package/dist/Divider.es.js +3 -3
- package/dist/Embed.cjs.js +1 -0
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +1 -0
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +1 -1
- package/dist/Form.es.js +1 -1
- package/dist/Image.cjs.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/LiveProvider.cjs.js +4 -4
- package/dist/LiveProvider.es.js +5 -5
- package/dist/Navigation.cjs.js +2 -2
- package/dist/Navigation.es.js +2 -2
- package/dist/PreviewProvider.cjs.js +8 -7
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +11 -10
- package/dist/PreviewProvider.es.js.map +1 -1
- package/dist/ReadOnlyText.cjs.js +3 -2
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +5 -4
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +12 -12
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +14 -14
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +1 -1
- package/dist/Root.es.js +1 -1
- package/dist/SocialLinks.cjs.js +3 -3
- package/dist/SocialLinks.es.js +3 -3
- package/dist/Text.cjs.js +1 -1
- package/dist/Text.es.js +1 -1
- package/dist/Video.cjs.js +1 -0
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +1 -0
- package/dist/Video.es.js.map +1 -1
- package/dist/actions.cjs.js +467 -3
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +467 -4
- package/dist/actions.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/box-model.cjs.js +1 -0
- package/dist/box-model.cjs.js.map +1 -1
- package/dist/box-model.es.js +1 -0
- package/dist/box-model.es.js.map +1 -1
- package/dist/builder.cjs.js +1 -0
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +1 -0
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +1 -1
- package/dist/components.es.js +1 -1
- package/dist/control-serialization.cjs.js +1 -0
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +1 -0
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +1 -0
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +2 -1
- package/dist/controls.es.js.map +1 -1
- package/dist/index.cjs.js +71 -41
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs10.js +5 -4
- package/dist/index.cjs10.js.map +1 -1
- package/dist/index.cjs2.js +1 -0
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs5.js +30 -14
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +4 -4
- package/dist/index.es.js +74 -45
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +7 -6
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es2.js +2 -1
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es5.js +32 -16
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es8.js +1 -1
- package/dist/index.es9.js +6 -6
- package/dist/main.cjs.js +1 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -0
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +1 -1
- package/dist/next.es.js +2 -2
- package/dist/prop-controllers.cjs.js +1 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +1 -0
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-page.cjs.js +27 -32
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +27 -14
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +1 -1
- package/dist/react.es.js +1 -1
- package/dist/slate.cjs.js +25 -67
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +31 -71
- package/dist/slate.es.js.map +1 -1
- package/dist/state/breakpoints.cjs.js +14 -0
- package/dist/state/breakpoints.cjs.js.map +1 -1
- package/dist/state/breakpoints.es.js +14 -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/components/page/Page.d.ts.map +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/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 +11 -2
- 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/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.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/actions.d.ts +7 -7
- package/dist/types/src/state/actions.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/src/state/modules/locales.d.ts +6 -7
- package/dist/types/src/state/modules/locales.d.ts.map +1 -1
- package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/src/state/react-page.d.ts +3 -1
- package/dist/types/src/state/react-page.d.ts.map +1 -1
- package/dist/types/types/locale.d.ts +9 -0
- package/dist/types/types/locale.d.ts.map +1 -0
- package/dist/types.cjs2.js +8 -11
- package/dist/types.cjs2.js.map +1 -1
- package/dist/types.es2.js +9 -12
- 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/Box.cjs.js
CHANGED
|
@@ -42,6 +42,7 @@ var boxModels = require("./box-models.cjs.js");
|
|
|
42
42
|
require("use-sync-external-store/shim/with-selector");
|
|
43
43
|
require("next/dynamic");
|
|
44
44
|
require("./actions.cjs.js");
|
|
45
|
+
require("zod");
|
|
45
46
|
require("./typography.cjs.js");
|
|
46
47
|
require("./combobox.cjs.js");
|
|
47
48
|
require("slate");
|
|
@@ -51,13 +52,10 @@ require("redux-thunk");
|
|
|
51
52
|
require("./types.cjs.js");
|
|
52
53
|
require("./state/breakpoints.cjs.js");
|
|
53
54
|
require("color");
|
|
54
|
-
require("@emotion/serialize");
|
|
55
|
-
require("@emotion/utils");
|
|
56
55
|
require("scroll-into-view-if-needed");
|
|
57
56
|
require("react-dom");
|
|
58
57
|
require("html-react-parser");
|
|
59
58
|
require("next/head");
|
|
60
|
-
require("zod");
|
|
61
59
|
require("@emotion/server/create-instance");
|
|
62
60
|
require("next/document");
|
|
63
61
|
require("cors");
|
|
@@ -67,6 +65,8 @@ require("http-proxy");
|
|
|
67
65
|
require("set-cookie-parser");
|
|
68
66
|
require("./constants.cjs.js");
|
|
69
67
|
require("corporate-ipsum");
|
|
68
|
+
require("@emotion/serialize");
|
|
69
|
+
require("@emotion/utils");
|
|
70
70
|
require("./useMediaQuery.cjs.js");
|
|
71
71
|
require("next/image");
|
|
72
72
|
require("./useIsomorphicLayoutEffect.cjs.js");
|
package/dist/Box.es.js
CHANGED
|
@@ -40,6 +40,7 @@ import { p as parse, c as createBox } from "./box-models.es.js";
|
|
|
40
40
|
import "use-sync-external-store/shim/with-selector";
|
|
41
41
|
import "next/dynamic";
|
|
42
42
|
import "./actions.es.js";
|
|
43
|
+
import "zod";
|
|
43
44
|
import "./typography.es.js";
|
|
44
45
|
import "./combobox.es.js";
|
|
45
46
|
import "slate";
|
|
@@ -49,13 +50,10 @@ import "redux-thunk";
|
|
|
49
50
|
import "./types.es.js";
|
|
50
51
|
import "./state/breakpoints.es.js";
|
|
51
52
|
import "color";
|
|
52
|
-
import "@emotion/serialize";
|
|
53
|
-
import "@emotion/utils";
|
|
54
53
|
import "scroll-into-view-if-needed";
|
|
55
54
|
import "react-dom";
|
|
56
55
|
import "html-react-parser";
|
|
57
56
|
import "next/head";
|
|
58
|
-
import "zod";
|
|
59
57
|
import "@emotion/server/create-instance";
|
|
60
58
|
import "next/document";
|
|
61
59
|
import "cors";
|
|
@@ -65,6 +63,8 @@ import "http-proxy";
|
|
|
65
63
|
import "set-cookie-parser";
|
|
66
64
|
import "./constants.es.js";
|
|
67
65
|
import "corporate-ipsum";
|
|
66
|
+
import "@emotion/serialize";
|
|
67
|
+
import "@emotion/utils";
|
|
68
68
|
import "./useMediaQuery.es.js";
|
|
69
69
|
import "next/image";
|
|
70
70
|
import "./useIsomorphicLayoutEffect.es.js";
|
package/dist/Button.cjs.js
CHANGED
|
@@ -41,6 +41,7 @@ var jsxRuntime = require("react/jsx-runtime");
|
|
|
41
41
|
require("use-sync-external-store/shim/with-selector");
|
|
42
42
|
require("next/dynamic");
|
|
43
43
|
require("./actions.cjs.js");
|
|
44
|
+
require("zod");
|
|
44
45
|
require("./typography.cjs.js");
|
|
45
46
|
require("./combobox.cjs.js");
|
|
46
47
|
require("slate");
|
|
@@ -51,13 +52,10 @@ require("./types.cjs.js");
|
|
|
51
52
|
require("./state/breakpoints.cjs.js");
|
|
52
53
|
require("./box-models.cjs.js");
|
|
53
54
|
require("css-box-model");
|
|
54
|
-
require("@emotion/serialize");
|
|
55
|
-
require("@emotion/utils");
|
|
56
55
|
require("scroll-into-view-if-needed");
|
|
57
56
|
require("react-dom");
|
|
58
57
|
require("html-react-parser");
|
|
59
58
|
require("next/head");
|
|
60
|
-
require("zod");
|
|
61
59
|
require("@emotion/server/create-instance");
|
|
62
60
|
require("next/document");
|
|
63
61
|
require("cors");
|
|
@@ -69,6 +67,8 @@ require("./constants.cjs.js");
|
|
|
69
67
|
require("uuid");
|
|
70
68
|
require("corporate-ipsum");
|
|
71
69
|
require("next/link");
|
|
70
|
+
require("@emotion/serialize");
|
|
71
|
+
require("@emotion/utils");
|
|
72
72
|
function _interopDefaultLegacy(e) {
|
|
73
73
|
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
74
74
|
}
|
package/dist/Button.es.js
CHANGED
|
@@ -39,6 +39,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
39
39
|
import "use-sync-external-store/shim/with-selector";
|
|
40
40
|
import "next/dynamic";
|
|
41
41
|
import "./actions.es.js";
|
|
42
|
+
import "zod";
|
|
42
43
|
import "./typography.es.js";
|
|
43
44
|
import "./combobox.es.js";
|
|
44
45
|
import "slate";
|
|
@@ -49,13 +50,10 @@ import "./types.es.js";
|
|
|
49
50
|
import "./state/breakpoints.es.js";
|
|
50
51
|
import "./box-models.es.js";
|
|
51
52
|
import "css-box-model";
|
|
52
|
-
import "@emotion/serialize";
|
|
53
|
-
import "@emotion/utils";
|
|
54
53
|
import "scroll-into-view-if-needed";
|
|
55
54
|
import "react-dom";
|
|
56
55
|
import "html-react-parser";
|
|
57
56
|
import "next/head";
|
|
58
|
-
import "zod";
|
|
59
57
|
import "@emotion/server/create-instance";
|
|
60
58
|
import "next/document";
|
|
61
59
|
import "cors";
|
|
@@ -67,6 +65,8 @@ import "./constants.es.js";
|
|
|
67
65
|
import "uuid";
|
|
68
66
|
import "corporate-ipsum";
|
|
69
67
|
import "next/link";
|
|
68
|
+
import "@emotion/serialize";
|
|
69
|
+
import "@emotion/utils";
|
|
70
70
|
const Button = forwardRef(function Button2(_a, ref) {
|
|
71
71
|
var _b = _a, {
|
|
72
72
|
as,
|
package/dist/Carousel.cjs.js
CHANGED
|
@@ -38,6 +38,7 @@ var popcorn = require("@popmotion/popcorn");
|
|
|
38
38
|
var next = require("./index.cjs.js");
|
|
39
39
|
require("use-sync-external-store/shim");
|
|
40
40
|
var reactPage = require("./react-page.cjs.js");
|
|
41
|
+
require("./actions.cjs.js");
|
|
41
42
|
require("slate");
|
|
42
43
|
var useMediaQuery = require("./useMediaQuery.cjs.js");
|
|
43
44
|
var Image = require("./Image.cjs.js");
|
|
@@ -46,7 +47,6 @@ var state_breakpoints = require("./state/breakpoints.cjs.js");
|
|
|
46
47
|
var jsxRuntime = require("react/jsx-runtime");
|
|
47
48
|
require("use-sync-external-store/shim/with-selector");
|
|
48
49
|
require("next/dynamic");
|
|
49
|
-
require("./actions.cjs.js");
|
|
50
50
|
require("./typography.cjs.js");
|
|
51
51
|
require("./combobox.cjs.js");
|
|
52
52
|
require("redux");
|
|
@@ -55,8 +55,6 @@ require("./types.cjs.js");
|
|
|
55
55
|
require("./box-models.cjs.js");
|
|
56
56
|
require("css-box-model");
|
|
57
57
|
require("color");
|
|
58
|
-
require("@emotion/serialize");
|
|
59
|
-
require("@emotion/utils");
|
|
60
58
|
require("scroll-into-view-if-needed");
|
|
61
59
|
require("react-dom");
|
|
62
60
|
require("html-react-parser");
|
|
@@ -72,6 +70,8 @@ require("set-cookie-parser");
|
|
|
72
70
|
require("./constants.cjs.js");
|
|
73
71
|
require("uuid");
|
|
74
72
|
require("corporate-ipsum");
|
|
73
|
+
require("@emotion/serialize");
|
|
74
|
+
require("@emotion/utils");
|
|
75
75
|
require("next/image");
|
|
76
76
|
require("./placeholders.cjs.js");
|
|
77
77
|
require("./index.cjs3.js");
|
package/dist/Carousel.es.js
CHANGED
|
@@ -36,6 +36,7 @@ import { wrap } from "@popmotion/popcorn";
|
|
|
36
36
|
import { r as useBreakpoints, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
|
|
37
37
|
import "use-sync-external-store/shim";
|
|
38
38
|
import { U as useStyle } from "./react-page.es.js";
|
|
39
|
+
import "./actions.es.js";
|
|
39
40
|
import "slate";
|
|
40
41
|
import { u as useMediaQuery } from "./useMediaQuery.es.js";
|
|
41
42
|
import ImageComponent from "./Image.es.js";
|
|
@@ -44,7 +45,6 @@ import { getBaseBreakpoint } from "./state/breakpoints.es.js";
|
|
|
44
45
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
45
46
|
import "use-sync-external-store/shim/with-selector";
|
|
46
47
|
import "next/dynamic";
|
|
47
|
-
import "./actions.es.js";
|
|
48
48
|
import "./typography.es.js";
|
|
49
49
|
import "./combobox.es.js";
|
|
50
50
|
import "redux";
|
|
@@ -53,8 +53,6 @@ import "./types.es.js";
|
|
|
53
53
|
import "./box-models.es.js";
|
|
54
54
|
import "css-box-model";
|
|
55
55
|
import "color";
|
|
56
|
-
import "@emotion/serialize";
|
|
57
|
-
import "@emotion/utils";
|
|
58
56
|
import "scroll-into-view-if-needed";
|
|
59
57
|
import "react-dom";
|
|
60
58
|
import "html-react-parser";
|
|
@@ -70,6 +68,8 @@ import "set-cookie-parser";
|
|
|
70
68
|
import "./constants.es.js";
|
|
71
69
|
import "uuid";
|
|
72
70
|
import "corporate-ipsum";
|
|
71
|
+
import "@emotion/serialize";
|
|
72
|
+
import "@emotion/utils";
|
|
73
73
|
import "next/image";
|
|
74
74
|
import "./placeholders.es.js";
|
|
75
75
|
import "./index.es3.js";
|
package/dist/Countdown.cjs.js
CHANGED
|
@@ -39,6 +39,7 @@ var jsxRuntime = require("react/jsx-runtime");
|
|
|
39
39
|
require("redux");
|
|
40
40
|
require("redux-thunk");
|
|
41
41
|
require("./actions.cjs.js");
|
|
42
|
+
require("zod");
|
|
42
43
|
require("./state/breakpoints.cjs.js");
|
|
43
44
|
require("@emotion/serialize");
|
|
44
45
|
require("@emotion/utils");
|
|
@@ -56,7 +57,6 @@ require("scroll-into-view-if-needed");
|
|
|
56
57
|
require("react-dom");
|
|
57
58
|
require("html-react-parser");
|
|
58
59
|
require("next/head");
|
|
59
|
-
require("zod");
|
|
60
60
|
require("@emotion/server/create-instance");
|
|
61
61
|
require("next/document");
|
|
62
62
|
require("cors");
|
package/dist/Countdown.es.js
CHANGED
|
@@ -37,6 +37,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
37
37
|
import "redux";
|
|
38
38
|
import "redux-thunk";
|
|
39
39
|
import "./actions.es.js";
|
|
40
|
+
import "zod";
|
|
40
41
|
import "./state/breakpoints.es.js";
|
|
41
42
|
import "@emotion/serialize";
|
|
42
43
|
import "@emotion/utils";
|
|
@@ -54,7 +55,6 @@ import "scroll-into-view-if-needed";
|
|
|
54
55
|
import "react-dom";
|
|
55
56
|
import "html-react-parser";
|
|
56
57
|
import "next/head";
|
|
57
|
-
import "zod";
|
|
58
58
|
import "@emotion/server/create-instance";
|
|
59
59
|
import "next/document";
|
|
60
60
|
import "cors";
|
package/dist/Divider.cjs.js
CHANGED
|
@@ -8,6 +8,7 @@ var jsxRuntime = require("react/jsx-runtime");
|
|
|
8
8
|
require("use-sync-external-store/shim/with-selector");
|
|
9
9
|
require("next/dynamic");
|
|
10
10
|
require("./actions.cjs.js");
|
|
11
|
+
require("zod");
|
|
11
12
|
require("./typography.cjs.js");
|
|
12
13
|
require("./combobox.cjs.js");
|
|
13
14
|
require("slate");
|
|
@@ -19,13 +20,10 @@ require("./state/breakpoints.cjs.js");
|
|
|
19
20
|
require("./box-models.cjs.js");
|
|
20
21
|
require("css-box-model");
|
|
21
22
|
require("color");
|
|
22
|
-
require("@emotion/serialize");
|
|
23
|
-
require("@emotion/utils");
|
|
24
23
|
require("scroll-into-view-if-needed");
|
|
25
24
|
require("react-dom");
|
|
26
25
|
require("html-react-parser");
|
|
27
26
|
require("next/head");
|
|
28
|
-
require("zod");
|
|
29
27
|
require("@emotion/server/create-instance");
|
|
30
28
|
require("next/document");
|
|
31
29
|
require("cors");
|
|
@@ -36,6 +34,8 @@ require("set-cookie-parser");
|
|
|
36
34
|
require("./constants.cjs.js");
|
|
37
35
|
require("uuid");
|
|
38
36
|
require("corporate-ipsum");
|
|
37
|
+
require("@emotion/serialize");
|
|
38
|
+
require("@emotion/utils");
|
|
39
39
|
const Divider = React.forwardRef(function Divider2({
|
|
40
40
|
id,
|
|
41
41
|
variant,
|
package/dist/Divider.es.js
CHANGED
|
@@ -6,6 +6,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
import "use-sync-external-store/shim/with-selector";
|
|
7
7
|
import "next/dynamic";
|
|
8
8
|
import "./actions.es.js";
|
|
9
|
+
import "zod";
|
|
9
10
|
import "./typography.es.js";
|
|
10
11
|
import "./combobox.es.js";
|
|
11
12
|
import "slate";
|
|
@@ -17,13 +18,10 @@ import "./state/breakpoints.es.js";
|
|
|
17
18
|
import "./box-models.es.js";
|
|
18
19
|
import "css-box-model";
|
|
19
20
|
import "color";
|
|
20
|
-
import "@emotion/serialize";
|
|
21
|
-
import "@emotion/utils";
|
|
22
21
|
import "scroll-into-view-if-needed";
|
|
23
22
|
import "react-dom";
|
|
24
23
|
import "html-react-parser";
|
|
25
24
|
import "next/head";
|
|
26
|
-
import "zod";
|
|
27
25
|
import "@emotion/server/create-instance";
|
|
28
26
|
import "next/document";
|
|
29
27
|
import "cors";
|
|
@@ -34,6 +32,8 @@ import "set-cookie-parser";
|
|
|
34
32
|
import "./constants.es.js";
|
|
35
33
|
import "uuid";
|
|
36
34
|
import "corporate-ipsum";
|
|
35
|
+
import "@emotion/serialize";
|
|
36
|
+
import "@emotion/utils";
|
|
37
37
|
const Divider = forwardRef(function Divider2({
|
|
38
38
|
id,
|
|
39
39
|
variant,
|
package/dist/Embed.cjs.js
CHANGED
package/dist/Embed.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Embed.cjs.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Embed.cjs.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":";;;;;;;;;;;;;;;AAgBA,MAAMA,cAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBrB,MAAMC,aAAa;AAEbC,MAAAA,QAAQC,MAAAA,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAQC,OAAOP;AAAAA,GAC5BQ,KACA;AACA,QAAM,CAACC,WAAWC,gBAAgBC,MAAAA,SAAgC,IAAxB;AACpC,QAAA,CAACC,cAAcC,mBAAmBF,MAAAA,SAAS,KAAD;AAEhDG,4BAAAA,0BAA0B,MAAM;AAC9BD,oBAAgB,IAAD;AAAA,EADQ,GAEtB,CAFsB,CAAA;AAIzBE,QAAAA,oBAAoBP,KAAK,MAAMC,WAAW,CAACA,SAAD,CAAvB;AAEnBO,QAAAA,UAAU,MAAM;AAGV,QAAA,CAACP;AAAW;AAEhB,UAAMQ,SAASR,UAAUS,cAAcC,iBAAiBV,WAAWW,WAAWC,cAAc;AAAA,MAC1FC,WAAWC,MAAe;AACxB,eAAOA,KAAKC,QAAQC,kBAAkBxB,aAClCmB,WAAWM,gBACXN,WAAWO;AAAAA,MAChB;AAAA,IAAA,CALY;AAQf,UAAMC,QAAmB,CAAA;AAEzB,WAAOX,OAAOY,SAAP;AAAyBC,YAAAA,KAAKb,OAAOc;AAOL,2CAAA;AACrC,eAASC,IAAI,GAAGA,IAAIJ,MAAMK,QAAQD,KAAK;AAC/B,cAAA,IAAIE,QAAcC,CAAW,YAAA;;AACjC,gBAAMZ,OAAOK,MAAMI;AACbI,gBAAAA,SAASb,KAAKL,cAAcmB,cAAcpC,UAAjC;AAEfmC,iBAAOE,cAAcf,KAAKe;AAC1BC,gBAAMC,KAAKjB,KAAKkB,UAAhB,EAA4BC,QAAQ,CAAC;AAAA,YAAEC;AAAAA,YAAMC;AAAAA,gBAAY;AAChDC,mBAAAA,aAAaF,MAAMC,KAA1B;AAAA,UAAA,CADF;AAIOE,iBAAAA,SAAS,MAAMX;AACfY,iBAAAA,UAAU,MAAMZ;AAElBa,qBAAAA,eAAAA,mBAAYC,aAAab,QAAQb;AACjCyB,qBAAAA,eAAAA,mBAAYE,YAAY3B;AAEzB,cAAA,CAACa,OAAOe,aAAa,KAApB;AAAmC;QAAA,CAfpC;AAAA,MAiBP;AAAA,IACF;AAEoB,0BAAA,EAAGC,MAAMC,CAAS,UAAA;AAErCC,cAAQD,MAAMA,KAAd;AAAA,IAAA,CAFF;AAAA,EAAA,GAIC,CAAC5C,WAAWF,IAAZ,CAhDM;AAkDHgD,QAAAA,YAAYC,UAAAA,SAAS;AAAA,IAAEC,WAAW;AAAA,EAAA,CAAd;AAE1B,MAAI7C,iBAAiB;AAAc,WAAA;AAGjC,wCAAA,OAAA;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAWgD,IAAAA,GAAGH,WAAWlD,OAAOC,MAAnB;AAAA,IACb,yBAAyB;AAAA,MAAEqD,QAAQpD;AAAAA,IAAV;AAAA,EAAA,CAL7B;AAQD,CA3EuB;;"}
|
package/dist/Embed.es.js
CHANGED
package/dist/Embed.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Embed.es.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Embed.es.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,cAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBrB,MAAMC,aAAa;AAEbC,MAAAA,QAAQC,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAQC,OAAOP;AAAAA,GAC5BQ,KACA;AACA,QAAM,CAACC,WAAWC,gBAAgBC,SAAgC,IAAxB;AACpC,QAAA,CAACC,cAAcC,mBAAmBF,SAAS,KAAD;AAEhDG,4BAA0B,MAAM;AAC9BD,oBAAgB,IAAD;AAAA,EADQ,GAEtB,CAFsB,CAAA;AAIzBE,sBAAoBP,KAAK,MAAMC,WAAW,CAACA,SAAD,CAAvB;AAEnBO,YAAU,MAAM;AAGV,QAAA,CAACP;AAAW;AAEhB,UAAMQ,SAASR,UAAUS,cAAcC,iBAAiBV,WAAWW,WAAWC,cAAc;AAAA,MAC1FC,WAAWC,MAAe;AACxB,eAAOA,KAAKC,QAAQC,kBAAkBxB,aAClCmB,WAAWM,gBACXN,WAAWO;AAAAA,MAChB;AAAA,IAAA,CALY;AAQf,UAAMC,QAAmB,CAAA;AAEzB,WAAOX,OAAOY,SAAP;AAAyBC,YAAAA,KAAKb,OAAOc;AAOL,2CAAA;AACrC,eAASC,IAAI,GAAGA,IAAIJ,MAAMK,QAAQD,KAAK;AAC/B,cAAA,IAAIE,QAAcC,CAAW,YAAA;;AACjC,gBAAMZ,OAAOK,MAAMI;AACbI,gBAAAA,SAASb,KAAKL,cAAcmB,cAAcpC,UAAjC;AAEfmC,iBAAOE,cAAcf,KAAKe;AAC1BC,gBAAMC,KAAKjB,KAAKkB,UAAhB,EAA4BC,QAAQ,CAAC;AAAA,YAAEC;AAAAA,YAAMC;AAAAA,gBAAY;AAChDC,mBAAAA,aAAaF,MAAMC,KAA1B;AAAA,UAAA,CADF;AAIOE,iBAAAA,SAAS,MAAMX;AACfY,iBAAAA,UAAU,MAAMZ;AAElBa,qBAAAA,eAAAA,mBAAYC,aAAab,QAAQb;AACjCyB,qBAAAA,eAAAA,mBAAYE,YAAY3B;AAEzB,cAAA,CAACa,OAAOe,aAAa,KAApB;AAAmC;QAAA,CAfpC;AAAA,MAiBP;AAAA,IACF;AAEoB,0BAAA,EAAGC,MAAMC,CAAS,UAAA;AAErCC,cAAQD,MAAMA,KAAd;AAAA,IAAA,CAFF;AAAA,EAAA,GAIC,CAAC5C,WAAWF,IAAZ,CAhDM;AAkDHgD,QAAAA,YAAYC,SAAS;AAAA,IAAEC,WAAW;AAAA,EAAA,CAAd;AAE1B,MAAI7C,iBAAiB;AAAc,WAAA;AAGjC,6BAAA,OAAA;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAWgD,GAAGH,WAAWlD,OAAOC,MAAnB;AAAA,IACb,yBAAyB;AAAA,MAAEqD,QAAQpD;AAAAA,IAAV;AAAA,EAAA,CAL7B;AAQD,CA3EuB;;"}
|
package/dist/Form.cjs.js
CHANGED
|
@@ -44,6 +44,7 @@ var boxModels = require("./box-models.cjs.js");
|
|
|
44
44
|
require("redux");
|
|
45
45
|
require("redux-thunk");
|
|
46
46
|
require("./actions.cjs.js");
|
|
47
|
+
require("zod");
|
|
47
48
|
require("./state/breakpoints.cjs.js");
|
|
48
49
|
require("@emotion/serialize");
|
|
49
50
|
require("@emotion/utils");
|
|
@@ -58,7 +59,6 @@ require("scroll-into-view-if-needed");
|
|
|
58
59
|
require("react-dom");
|
|
59
60
|
require("html-react-parser");
|
|
60
61
|
require("next/head");
|
|
61
|
-
require("zod");
|
|
62
62
|
require("@emotion/server/create-instance");
|
|
63
63
|
require("next/document");
|
|
64
64
|
require("cors");
|
package/dist/Form.es.js
CHANGED
|
@@ -43,6 +43,7 @@ import { g as getBox } from "./box-models.es.js";
|
|
|
43
43
|
import "redux";
|
|
44
44
|
import "redux-thunk";
|
|
45
45
|
import "./actions.es.js";
|
|
46
|
+
import "zod";
|
|
46
47
|
import "./state/breakpoints.es.js";
|
|
47
48
|
import "@emotion/serialize";
|
|
48
49
|
import "@emotion/utils";
|
|
@@ -57,7 +58,6 @@ import "scroll-into-view-if-needed";
|
|
|
57
58
|
import "react-dom";
|
|
58
59
|
import "html-react-parser";
|
|
59
60
|
import "next/head";
|
|
60
|
-
import "zod";
|
|
61
61
|
import "@emotion/server/create-instance";
|
|
62
62
|
import "next/document";
|
|
63
63
|
import "cors";
|
package/dist/Image.cjs.js
CHANGED
|
@@ -11,6 +11,7 @@ var next = require("./index.cjs.js");
|
|
|
11
11
|
var nextVersion = require("./next-version.cjs.js");
|
|
12
12
|
var jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
require("./actions.cjs.js");
|
|
14
|
+
require("zod");
|
|
14
15
|
require("scroll-into-view-if-needed");
|
|
15
16
|
require("next/link");
|
|
16
17
|
require("redux");
|
|
@@ -30,7 +31,6 @@ require("color");
|
|
|
30
31
|
require("react-dom");
|
|
31
32
|
require("html-react-parser");
|
|
32
33
|
require("next/head");
|
|
33
|
-
require("zod");
|
|
34
34
|
require("@emotion/server/create-instance");
|
|
35
35
|
require("next/document");
|
|
36
36
|
require("cors");
|
package/dist/Image.es.js
CHANGED
|
@@ -9,6 +9,7 @@ import { z as useFile, r as useBreakpoints, o as useResponsiveWidth, n as useRes
|
|
|
9
9
|
import { m as major } from "./next-version.es.js";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
import "./actions.es.js";
|
|
12
|
+
import "zod";
|
|
12
13
|
import "scroll-into-view-if-needed";
|
|
13
14
|
import "next/link";
|
|
14
15
|
import "redux";
|
|
@@ -28,7 +29,6 @@ import "color";
|
|
|
28
29
|
import "react-dom";
|
|
29
30
|
import "html-react-parser";
|
|
30
31
|
import "next/head";
|
|
31
|
-
import "zod";
|
|
32
32
|
import "@emotion/server/create-instance";
|
|
33
33
|
import "next/document";
|
|
34
34
|
import "cors";
|
package/dist/LiveProvider.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ var jsxRuntime = require("react/jsx-runtime");
|
|
|
7
7
|
require("use-sync-external-store/shim/with-selector");
|
|
8
8
|
require("next/dynamic");
|
|
9
9
|
require("./actions.cjs.js");
|
|
10
|
+
require("zod");
|
|
10
11
|
require("./typography.cjs.js");
|
|
11
12
|
require("./combobox.cjs.js");
|
|
12
13
|
require("slate");
|
|
@@ -18,14 +19,11 @@ require("./state/breakpoints.cjs.js");
|
|
|
18
19
|
require("./box-models.cjs.js");
|
|
19
20
|
require("css-box-model");
|
|
20
21
|
require("color");
|
|
21
|
-
require("@emotion/css");
|
|
22
|
-
require("@emotion/serialize");
|
|
23
|
-
require("@emotion/utils");
|
|
24
22
|
require("scroll-into-view-if-needed");
|
|
23
|
+
require("@emotion/css");
|
|
25
24
|
require("react-dom");
|
|
26
25
|
require("html-react-parser");
|
|
27
26
|
require("next/head");
|
|
28
|
-
require("zod");
|
|
29
27
|
require("@emotion/server/create-instance");
|
|
30
28
|
require("next/document");
|
|
31
29
|
require("cors");
|
|
@@ -36,6 +34,8 @@ require("set-cookie-parser");
|
|
|
36
34
|
require("./constants.cjs.js");
|
|
37
35
|
require("uuid");
|
|
38
36
|
require("corporate-ipsum");
|
|
37
|
+
require("@emotion/serialize");
|
|
38
|
+
require("@emotion/utils");
|
|
39
39
|
function LiveProvider({
|
|
40
40
|
client,
|
|
41
41
|
children,
|
package/dist/LiveProvider.es.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { a as ReactRuntime,
|
|
2
|
+
import { a as ReactRuntime, N as StoreContext, O as MakeswiftProvider } from "./index.es.js";
|
|
3
3
|
import { al 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";
|
|
7
7
|
import "./actions.es.js";
|
|
8
|
+
import "zod";
|
|
8
9
|
import "./typography.es.js";
|
|
9
10
|
import "./combobox.es.js";
|
|
10
11
|
import "slate";
|
|
@@ -16,14 +17,11 @@ import "./state/breakpoints.es.js";
|
|
|
16
17
|
import "./box-models.es.js";
|
|
17
18
|
import "css-box-model";
|
|
18
19
|
import "color";
|
|
19
|
-
import "@emotion/css";
|
|
20
|
-
import "@emotion/serialize";
|
|
21
|
-
import "@emotion/utils";
|
|
22
20
|
import "scroll-into-view-if-needed";
|
|
21
|
+
import "@emotion/css";
|
|
23
22
|
import "react-dom";
|
|
24
23
|
import "html-react-parser";
|
|
25
24
|
import "next/head";
|
|
26
|
-
import "zod";
|
|
27
25
|
import "@emotion/server/create-instance";
|
|
28
26
|
import "next/document";
|
|
29
27
|
import "cors";
|
|
@@ -34,6 +32,8 @@ import "set-cookie-parser";
|
|
|
34
32
|
import "./constants.es.js";
|
|
35
33
|
import "uuid";
|
|
36
34
|
import "corporate-ipsum";
|
|
35
|
+
import "@emotion/serialize";
|
|
36
|
+
import "@emotion/utils";
|
|
37
37
|
function LiveProvider({
|
|
38
38
|
client,
|
|
39
39
|
children,
|
package/dist/Navigation.cjs.js
CHANGED
|
@@ -39,6 +39,7 @@ var reactPage = require("./react-page.cjs.js");
|
|
|
39
39
|
var jsxRuntime = require("react/jsx-runtime");
|
|
40
40
|
var next = require("./index.cjs.js");
|
|
41
41
|
require("use-sync-external-store/shim");
|
|
42
|
+
require("./actions.cjs.js");
|
|
42
43
|
require("slate");
|
|
43
44
|
require("./state/breakpoints.cjs.js");
|
|
44
45
|
var index$1 = require("./index.cjs3.js");
|
|
@@ -48,7 +49,7 @@ require("next/image");
|
|
|
48
49
|
require("./placeholders.cjs.js");
|
|
49
50
|
require("./next-version.cjs.js");
|
|
50
51
|
require("next/package.json");
|
|
51
|
-
require("
|
|
52
|
+
require("zod");
|
|
52
53
|
require("scroll-into-view-if-needed");
|
|
53
54
|
require("next/link");
|
|
54
55
|
require("redux");
|
|
@@ -66,7 +67,6 @@ require("color");
|
|
|
66
67
|
require("react-dom");
|
|
67
68
|
require("html-react-parser");
|
|
68
69
|
require("next/head");
|
|
69
|
-
require("zod");
|
|
70
70
|
require("@emotion/server/create-instance");
|
|
71
71
|
require("next/document");
|
|
72
72
|
require("cors");
|
package/dist/Navigation.es.js
CHANGED
|
@@ -38,6 +38,7 @@ import { U as useStyle } from "./react-page.es.js";
|
|
|
38
38
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
39
39
|
import { l as useResponsiveColor, p as useResponsiveTextStyle, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
|
|
40
40
|
import "use-sync-external-store/shim";
|
|
41
|
+
import "./actions.es.js";
|
|
41
42
|
import "slate";
|
|
42
43
|
import "./state/breakpoints.es.js";
|
|
43
44
|
import { L as Link } from "./index.es3.js";
|
|
@@ -47,7 +48,7 @@ import "next/image";
|
|
|
47
48
|
import "./placeholders.es.js";
|
|
48
49
|
import "./next-version.es.js";
|
|
49
50
|
import "next/package.json";
|
|
50
|
-
import "
|
|
51
|
+
import "zod";
|
|
51
52
|
import "scroll-into-view-if-needed";
|
|
52
53
|
import "next/link";
|
|
53
54
|
import "redux";
|
|
@@ -65,7 +66,6 @@ import "color";
|
|
|
65
66
|
import "react-dom";
|
|
66
67
|
import "html-react-parser";
|
|
67
68
|
import "next/head";
|
|
68
|
-
import "zod";
|
|
69
69
|
import "@emotion/server/create-instance";
|
|
70
70
|
import "next/document";
|
|
71
71
|
import "cors";
|
|
@@ -39,10 +39,8 @@ require("slate");
|
|
|
39
39
|
require("use-sync-external-store/shim");
|
|
40
40
|
require("./types.cjs.js");
|
|
41
41
|
require("color");
|
|
42
|
-
require("@emotion/css");
|
|
43
|
-
require("@emotion/serialize");
|
|
44
|
-
require("@emotion/utils");
|
|
45
42
|
require("scroll-into-view-if-needed");
|
|
43
|
+
require("@emotion/css");
|
|
46
44
|
require("react-dom");
|
|
47
45
|
require("html-react-parser");
|
|
48
46
|
require("next/head");
|
|
@@ -57,6 +55,8 @@ require("set-cookie-parser");
|
|
|
57
55
|
require("./constants.cjs.js");
|
|
58
56
|
require("uuid");
|
|
59
57
|
require("corporate-ipsum");
|
|
58
|
+
require("@emotion/serialize");
|
|
59
|
+
require("@emotion/utils");
|
|
60
60
|
require("css-box-model");
|
|
61
61
|
function _interopDefaultLegacy(e) {
|
|
62
62
|
return e && typeof e === "object" && "default" in e ? e : { "default": e };
|
|
@@ -443,15 +443,16 @@ function messageChannelMiddleware() {
|
|
|
443
443
|
});
|
|
444
444
|
const breakpoints = reactPage.getBreakpoints(state);
|
|
445
445
|
messageChannel.port1.postMessage(actions.setBreakpoints(breakpoints));
|
|
446
|
-
const locales = reactPage.getLocales(state)
|
|
447
|
-
const defaultLocale = reactPage.
|
|
446
|
+
const locales = reactPage.getLocales(state);
|
|
447
|
+
const defaultLocale = reactPage.getDefaultLocale(state);
|
|
448
448
|
const routerLocale = Router__default["default"].locale;
|
|
449
449
|
if (locales.length > 0)
|
|
450
450
|
messageChannel.port1.postMessage(actions.setLocales(locales));
|
|
451
451
|
if (defaultLocale != null)
|
|
452
452
|
messageChannel.port1.postMessage(actions.setDefaultLocale(defaultLocale));
|
|
453
|
-
if (routerLocale != null)
|
|
454
|
-
messageChannel.port1.postMessage(actions.setLocale(routerLocale));
|
|
453
|
+
if (routerLocale != null && locales.some((locale) => locale.toString() === routerLocale)) {
|
|
454
|
+
messageChannel.port1.postMessage(actions.setLocale(new Intl.Locale(routerLocale)));
|
|
455
|
+
}
|
|
455
456
|
Router__default["default"].events.on("routeChangeStart", () => {
|
|
456
457
|
messageChannel.port1.postMessage(actions.changePathnameStart());
|
|
457
458
|
});
|