@makeswift/runtime 0.5.3 → 0.5.5
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 +1 -1
- package/dist/Box.es.js +1 -1
- package/dist/Button.cjs.js +1 -1
- package/dist/Button.es.js +1 -1
- package/dist/Carousel.cjs.js +1 -1
- package/dist/Carousel.es.js +1 -1
- package/dist/Countdown.cjs.js +1 -1
- package/dist/Countdown.es.js +1 -1
- package/dist/Divider.cjs.js +1 -1
- package/dist/Divider.es.js +1 -1
- package/dist/Embed.cjs.js +1 -1
- package/dist/Embed.es.js +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 +3 -3
- package/dist/LiveProvider.es.js +2 -2
- package/dist/Navigation.cjs.js +1 -1
- package/dist/Navigation.es.js +1 -1
- package/dist/PreviewProvider.cjs.js +18 -18
- package/dist/PreviewProvider.es.js +2 -2
- package/dist/Root.cjs.js +1 -1
- package/dist/Root.es.js +1 -1
- package/dist/SocialLinks.cjs.js +1 -1
- package/dist/SocialLinks.es.js +1 -1
- package/dist/Text.cjs.js +4 -4
- package/dist/Text.es.js +1 -1
- package/dist/Video.cjs.js +1 -1
- package/dist/Video.es.js +1 -1
- package/dist/components.cjs.js +5 -5
- package/dist/components.es.js +5 -5
- package/dist/{react-page.cjs.js → constants.cjs.js} +17 -1
- package/dist/constants.cjs.js.map +1 -0
- package/dist/{react-page.es.js → constants.es.js} +17 -2
- package/dist/constants.es.js.map +1 -0
- package/dist/index.cjs.js +40 -56
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +6 -6
- package/dist/index.es.js +4 -19
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +2 -2
- package/dist/index.es3.js +1 -1
- package/dist/main.cjs.js +3 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +1 -1
- package/dist/next.cjs.js +1 -1
- package/dist/next.es.js +2 -2
- package/dist/react.cjs.js +1 -1
- package/dist/react.es.js +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/next/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/react-page.cjs.js.map +0 -1
- package/dist/react-page.es.js.map +0 -1
package/dist/Box.cjs.js
CHANGED
|
@@ -40,7 +40,7 @@ var index = require("./index.cjs2.js");
|
|
|
40
40
|
var boxModels = require("./box-models.cjs.js");
|
|
41
41
|
require("use-sync-external-store/shim/with-selector");
|
|
42
42
|
require("next/dynamic");
|
|
43
|
-
require("./
|
|
43
|
+
require("./constants.cjs.js");
|
|
44
44
|
require("redux");
|
|
45
45
|
require("redux-thunk");
|
|
46
46
|
require("./actions.cjs.js");
|
package/dist/Box.es.js
CHANGED
|
@@ -38,7 +38,7 @@ import { a as useBoxAnimation, b as areBoxAnimationPropsEqual, B as BackgroundsC
|
|
|
38
38
|
import { p as parse, c as createBox } from "./box-models.es.js";
|
|
39
39
|
import "use-sync-external-store/shim/with-selector";
|
|
40
40
|
import "next/dynamic";
|
|
41
|
-
import "./
|
|
41
|
+
import "./constants.es.js";
|
|
42
42
|
import "redux";
|
|
43
43
|
import "redux-thunk";
|
|
44
44
|
import "./actions.es.js";
|
package/dist/Button.cjs.js
CHANGED
|
@@ -39,7 +39,7 @@ var css = require("@emotion/css");
|
|
|
39
39
|
var jsxRuntime = require("react/jsx-runtime");
|
|
40
40
|
require("use-sync-external-store/shim/with-selector");
|
|
41
41
|
require("next/dynamic");
|
|
42
|
-
require("./
|
|
42
|
+
require("./constants.cjs.js");
|
|
43
43
|
require("redux");
|
|
44
44
|
require("redux-thunk");
|
|
45
45
|
require("./actions.cjs.js");
|
package/dist/Button.es.js
CHANGED
|
@@ -37,7 +37,7 @@ import { cx } from "@emotion/css";
|
|
|
37
37
|
import { jsx } from "react/jsx-runtime";
|
|
38
38
|
import "use-sync-external-store/shim/with-selector";
|
|
39
39
|
import "next/dynamic";
|
|
40
|
-
import "./
|
|
40
|
+
import "./constants.es.js";
|
|
41
41
|
import "redux";
|
|
42
42
|
import "redux-thunk";
|
|
43
43
|
import "./actions.es.js";
|
package/dist/Carousel.cjs.js
CHANGED
|
@@ -43,7 +43,7 @@ var css = require("@emotion/css");
|
|
|
43
43
|
var jsxRuntime = require("react/jsx-runtime");
|
|
44
44
|
require("use-sync-external-store/shim/with-selector");
|
|
45
45
|
require("next/dynamic");
|
|
46
|
-
require("./
|
|
46
|
+
require("./constants.cjs.js");
|
|
47
47
|
require("redux");
|
|
48
48
|
require("redux-thunk");
|
|
49
49
|
require("./actions.cjs.js");
|
package/dist/Carousel.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { cx } from "@emotion/css";
|
|
|
41
41
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
42
42
|
import "use-sync-external-store/shim/with-selector";
|
|
43
43
|
import "next/dynamic";
|
|
44
|
-
import "./
|
|
44
|
+
import "./constants.es.js";
|
|
45
45
|
import "redux";
|
|
46
46
|
import "redux-thunk";
|
|
47
47
|
import "./actions.es.js";
|
package/dist/Countdown.cjs.js
CHANGED
|
@@ -37,7 +37,7 @@ var next = require("./index.cjs.js");
|
|
|
37
37
|
var jsxRuntime = require("react/jsx-runtime");
|
|
38
38
|
require("use-sync-external-store/shim/with-selector");
|
|
39
39
|
require("next/dynamic");
|
|
40
|
-
require("./
|
|
40
|
+
require("./constants.cjs.js");
|
|
41
41
|
require("redux");
|
|
42
42
|
require("redux-thunk");
|
|
43
43
|
require("./actions.cjs.js");
|
package/dist/Countdown.es.js
CHANGED
|
@@ -35,7 +35,7 @@ import { o as useStyle, r as responsiveStyle, s as colorToString } from "./index
|
|
|
35
35
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
36
|
import "use-sync-external-store/shim/with-selector";
|
|
37
37
|
import "next/dynamic";
|
|
38
|
-
import "./
|
|
38
|
+
import "./constants.es.js";
|
|
39
39
|
import "redux";
|
|
40
40
|
import "redux-thunk";
|
|
41
41
|
import "./actions.es.js";
|
package/dist/Divider.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var css = require("@emotion/css");
|
|
|
6
6
|
var jsxRuntime = require("react/jsx-runtime");
|
|
7
7
|
require("use-sync-external-store/shim/with-selector");
|
|
8
8
|
require("next/dynamic");
|
|
9
|
-
require("./
|
|
9
|
+
require("./constants.cjs.js");
|
|
10
10
|
require("redux");
|
|
11
11
|
require("redux-thunk");
|
|
12
12
|
require("./actions.cjs.js");
|
package/dist/Divider.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cx } from "@emotion/css";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import "use-sync-external-store/shim/with-selector";
|
|
6
6
|
import "next/dynamic";
|
|
7
|
-
import "./
|
|
7
|
+
import "./constants.es.js";
|
|
8
8
|
import "redux";
|
|
9
9
|
import "redux-thunk";
|
|
10
10
|
import "./actions.es.js";
|
package/dist/Embed.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var css = require("@emotion/css");
|
|
|
7
7
|
var jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
require("use-sync-external-store/shim/with-selector");
|
|
9
9
|
require("next/dynamic");
|
|
10
|
-
require("./
|
|
10
|
+
require("./constants.cjs.js");
|
|
11
11
|
require("redux");
|
|
12
12
|
require("redux-thunk");
|
|
13
13
|
require("./actions.cjs.js");
|
package/dist/Embed.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cx } from "@emotion/css";
|
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import "use-sync-external-store/shim/with-selector";
|
|
7
7
|
import "next/dynamic";
|
|
8
|
-
import "./
|
|
8
|
+
import "./constants.es.js";
|
|
9
9
|
import "redux";
|
|
10
10
|
import "redux-thunk";
|
|
11
11
|
import "./actions.es.js";
|
package/dist/Form.cjs.js
CHANGED
|
@@ -42,7 +42,7 @@ var index = require("./index.cjs3.js");
|
|
|
42
42
|
var boxModels = require("./box-models.cjs.js");
|
|
43
43
|
require("use-sync-external-store/shim/with-selector");
|
|
44
44
|
require("next/dynamic");
|
|
45
|
-
require("./
|
|
45
|
+
require("./constants.cjs.js");
|
|
46
46
|
require("redux");
|
|
47
47
|
require("redux-thunk");
|
|
48
48
|
require("./actions.cjs.js");
|
package/dist/Form.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { L as Link } from "./index.es3.js";
|
|
|
41
41
|
import { g as getBox } from "./box-models.es.js";
|
|
42
42
|
import "use-sync-external-store/shim/with-selector";
|
|
43
43
|
import "next/dynamic";
|
|
44
|
-
import "./
|
|
44
|
+
import "./constants.es.js";
|
|
45
45
|
import "redux";
|
|
46
46
|
import "redux-thunk";
|
|
47
47
|
import "./actions.es.js";
|
package/dist/Image.cjs.js
CHANGED
|
@@ -10,7 +10,7 @@ var nextVersion = require("./next-version.cjs.js");
|
|
|
10
10
|
var jsxRuntime = require("react/jsx-runtime");
|
|
11
11
|
require("use-sync-external-store/shim/with-selector");
|
|
12
12
|
require("next/dynamic");
|
|
13
|
-
require("./
|
|
13
|
+
require("./constants.cjs.js");
|
|
14
14
|
require("redux");
|
|
15
15
|
require("redux-thunk");
|
|
16
16
|
require("./actions.cjs.js");
|
package/dist/Image.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { m as major } from "./next-version.es.js";
|
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import "use-sync-external-store/shim/with-selector";
|
|
10
10
|
import "next/dynamic";
|
|
11
|
-
import "./
|
|
11
|
+
import "./constants.es.js";
|
|
12
12
|
import "redux";
|
|
13
13
|
import "redux-thunk";
|
|
14
14
|
import "./actions.es.js";
|
package/dist/LiveProvider.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
var React = require("react");
|
|
4
4
|
var next = require("./index.cjs.js");
|
|
5
|
-
var
|
|
5
|
+
var constants = require("./constants.cjs.js");
|
|
6
6
|
var actions = require("./actions.cjs.js");
|
|
7
7
|
var jsxRuntime = require("react/jsx-runtime");
|
|
8
8
|
require("use-sync-external-store/shim/with-selector");
|
|
@@ -37,13 +37,13 @@ function LiveProvider({
|
|
|
37
37
|
children,
|
|
38
38
|
rootElements
|
|
39
39
|
}) {
|
|
40
|
-
const store = React.useMemo(() =>
|
|
40
|
+
const store = React.useMemo(() => constants.configureStore({
|
|
41
41
|
preloadedState: next.storeContextDefaultValue.getState(),
|
|
42
42
|
rootElements
|
|
43
43
|
}), [rootElements]);
|
|
44
44
|
React.useEffect(() => {
|
|
45
45
|
var _a;
|
|
46
|
-
const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(actions.registerDocumentEffect(
|
|
46
|
+
const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(actions.registerDocumentEffect(constants.createDocument(documentKey, rootElement))));
|
|
47
47
|
return () => {
|
|
48
48
|
unregisterDocuments.forEach((unregisterDocument) => {
|
|
49
49
|
unregisterDocument();
|
package/dist/LiveProvider.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo, useEffect } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { q as configureStore, c as createDocument } from "./
|
|
2
|
+
import { T as storeContextDefaultValue, U as StoreContext, V as MakeswiftProvider } from "./index.es.js";
|
|
3
|
+
import { q as configureStore, c as createDocument } from "./constants.es.js";
|
|
4
4
|
import { F as registerDocumentEffect } from "./actions.es.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import "use-sync-external-store/shim/with-selector";
|
package/dist/Navigation.cjs.js
CHANGED
|
@@ -48,7 +48,7 @@ require("./next-version.cjs.js");
|
|
|
48
48
|
require("next/package.json");
|
|
49
49
|
require("use-sync-external-store/shim/with-selector");
|
|
50
50
|
require("next/dynamic");
|
|
51
|
-
require("./
|
|
51
|
+
require("./constants.cjs.js");
|
|
52
52
|
require("redux");
|
|
53
53
|
require("redux-thunk");
|
|
54
54
|
require("./actions.cjs.js");
|
package/dist/Navigation.es.js
CHANGED
|
@@ -47,7 +47,7 @@ import "./next-version.es.js";
|
|
|
47
47
|
import "next/package.json";
|
|
48
48
|
import "use-sync-external-store/shim/with-selector";
|
|
49
49
|
import "next/dynamic";
|
|
50
|
-
import "./
|
|
50
|
+
import "./constants.es.js";
|
|
51
51
|
import "redux";
|
|
52
52
|
import "redux-thunk";
|
|
53
53
|
import "./actions.es.js";
|
|
@@ -24,7 +24,7 @@ var next = require("./index.cjs.js");
|
|
|
24
24
|
var redux = require("redux");
|
|
25
25
|
var thunk = require("redux-thunk");
|
|
26
26
|
var immutable = require("immutable");
|
|
27
|
-
var
|
|
27
|
+
var constants = require("./constants.cjs.js");
|
|
28
28
|
var actions = require("./actions.cjs.js");
|
|
29
29
|
var boxModels = require("./box-models.cjs.js");
|
|
30
30
|
var slot = require("./slot.cjs.js");
|
|
@@ -74,24 +74,24 @@ function apply(data, operation) {
|
|
|
74
74
|
function getInitialState({
|
|
75
75
|
rootElements
|
|
76
76
|
} = {}) {
|
|
77
|
-
return
|
|
77
|
+
return constants.getInitialState({ rootElements });
|
|
78
78
|
}
|
|
79
79
|
function getReadOnlyDocumentsStateSlice(state) {
|
|
80
80
|
return state;
|
|
81
81
|
}
|
|
82
82
|
function getDocument(state, documentKey) {
|
|
83
|
-
return
|
|
83
|
+
return constants.getDocument$1(getReadOnlyDocumentsStateSlice(state), documentKey);
|
|
84
84
|
}
|
|
85
85
|
function reducer$1(state = getInitialState(), action) {
|
|
86
86
|
var _a;
|
|
87
|
-
const nextState =
|
|
87
|
+
const nextState = constants.reducer(state, action);
|
|
88
88
|
switch (action.type) {
|
|
89
89
|
case actions.ActionTypes.CHANGE_DOCUMENT: {
|
|
90
90
|
const currentRootElement = (_a = getDocument(nextState, action.payload.documentKey)) == null ? void 0 : _a.rootElement;
|
|
91
91
|
if (currentRootElement == null)
|
|
92
92
|
return nextState;
|
|
93
93
|
const nextRootElement = apply(currentRootElement, action.payload.operation);
|
|
94
|
-
return currentRootElement === nextRootElement ? nextState : new Map(nextState).set(action.payload.documentKey,
|
|
94
|
+
return currentRootElement === nextRootElement ? nextState : new Map(nextState).set(action.payload.documentKey, constants.createDocument(action.payload.documentKey, nextRootElement));
|
|
95
95
|
}
|
|
96
96
|
default:
|
|
97
97
|
return nextState;
|
|
@@ -99,12 +99,12 @@ function reducer$1(state = getInitialState(), action) {
|
|
|
99
99
|
}
|
|
100
100
|
const reducer = redux.combineReducers({
|
|
101
101
|
documents: reducer$1,
|
|
102
|
-
reactComponents:
|
|
102
|
+
reactComponents: constants.reducer$1,
|
|
103
103
|
boxModels: boxModels.reducer,
|
|
104
|
-
componentsMeta:
|
|
105
|
-
propControllers:
|
|
106
|
-
propControllerHandles:
|
|
107
|
-
isInBuilder:
|
|
104
|
+
componentsMeta: constants.reducer$2,
|
|
105
|
+
propControllers: constants.reducer$3,
|
|
106
|
+
propControllerHandles: constants.reducer$4,
|
|
107
|
+
isInBuilder: constants.reducer$5
|
|
108
108
|
});
|
|
109
109
|
function getBoxModelsStateSlice(state) {
|
|
110
110
|
return state.boxModels;
|
|
@@ -122,13 +122,13 @@ function getComponentsMetaStateSlice(state) {
|
|
|
122
122
|
return state.componentsMeta;
|
|
123
123
|
}
|
|
124
124
|
function getComponentsMeta(state) {
|
|
125
|
-
return
|
|
125
|
+
return constants.getComponentsMeta(getComponentsMetaStateSlice(state));
|
|
126
126
|
}
|
|
127
127
|
function getPropControllersStateSlice(state) {
|
|
128
128
|
return state.propControllers;
|
|
129
129
|
}
|
|
130
130
|
function getComponentPropControllerDescriptors(state, componentType) {
|
|
131
|
-
return
|
|
131
|
+
return constants.getComponentPropControllerDescriptors$1(getPropControllersStateSlice(state), componentType);
|
|
132
132
|
}
|
|
133
133
|
function getPropControllerHandlesStateSlice(state) {
|
|
134
134
|
return state.propControllerHandles;
|
|
@@ -355,7 +355,7 @@ function messageChannelMiddleware() {
|
|
|
355
355
|
}
|
|
356
356
|
function createAndRegisterPropControllers(documentKey, elementKey) {
|
|
357
357
|
return (dispatch, getState) => {
|
|
358
|
-
const descriptors =
|
|
358
|
+
const descriptors = constants.getElementPropControllerDescriptors(getState(), documentKey, elementKey);
|
|
359
359
|
if (descriptors == null)
|
|
360
360
|
return null;
|
|
361
361
|
const propControllers = Object.entries(descriptors).reduce((acc, [propName, descriptor]) => {
|
|
@@ -372,9 +372,9 @@ function propControllerHandlesMiddleware() {
|
|
|
372
372
|
switch (action.type) {
|
|
373
373
|
case actions.ActionTypes.REGISTER_COMPONENT_HANDLE: {
|
|
374
374
|
const { documentKey, elementKey, componentHandle } = action.payload;
|
|
375
|
-
const element =
|
|
375
|
+
const element = constants.getElement(getState(), documentKey, elementKey);
|
|
376
376
|
const propControllers = dispatch(createAndRegisterPropControllers(documentKey, elementKey));
|
|
377
|
-
if (element != null && !
|
|
377
|
+
if (element != null && !constants.isElementReference(element) && constants.isPropControllersHandle(componentHandle)) {
|
|
378
378
|
dispatch(actions.registerPropControllersHandle(documentKey, elementKey, componentHandle));
|
|
379
379
|
componentHandle.setPropControllers(propControllers);
|
|
380
380
|
}
|
|
@@ -382,13 +382,13 @@ function propControllerHandlesMiddleware() {
|
|
|
382
382
|
}
|
|
383
383
|
case actions.ActionTypes.UNREGISTER_COMPONENT_HANDLE: {
|
|
384
384
|
const { documentKey, elementKey } = action.payload;
|
|
385
|
-
const handle =
|
|
385
|
+
const handle = constants.getPropControllersHandle(getPropControllerHandlesStateSlice(getState()), documentKey, elementKey);
|
|
386
386
|
handle == null ? void 0 : handle.setPropControllers(null);
|
|
387
387
|
dispatch(actions.unregisterPropControllers(documentKey, elementKey));
|
|
388
388
|
break;
|
|
389
389
|
}
|
|
390
390
|
case actions.ActionTypes.MESSAGE_HOST_PROP_CONTROLLER: {
|
|
391
|
-
const propController =
|
|
391
|
+
const propController = constants.getPropController(getPropControllerHandlesStateSlice(getState()), action.payload.documentKey, action.payload.elementKey, action.payload.propName);
|
|
392
392
|
if (propController)
|
|
393
393
|
propController.recv(action.payload.message);
|
|
394
394
|
}
|
|
@@ -427,7 +427,7 @@ function PreviewProvider({
|
|
|
427
427
|
}), [client, rootElements]);
|
|
428
428
|
React.useEffect(() => {
|
|
429
429
|
var _a;
|
|
430
|
-
const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(actions.registerDocumentEffect(
|
|
430
|
+
const unregisterDocuments = Array.from((_a = rootElements == null ? void 0 : rootElements.entries()) != null ? _a : []).map(([documentKey, rootElement]) => store.dispatch(actions.registerDocumentEffect(constants.createDocument(documentKey, rootElement))));
|
|
431
431
|
return () => {
|
|
432
432
|
unregisterDocuments.forEach((unregisterDocument) => {
|
|
433
433
|
unregisterDocument();
|
|
@@ -18,11 +18,11 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { useMemo, useEffect } from "react";
|
|
21
|
-
import {
|
|
21
|
+
import { Q as deepEqual, T as storeContextDefaultValue, U as StoreContext, V as MakeswiftProvider } from "./index.es.js";
|
|
22
22
|
import { createStore, applyMiddleware, combineReducers } from "redux";
|
|
23
23
|
import thunk from "redux-thunk";
|
|
24
24
|
import { removeIn, setIn } from "immutable";
|
|
25
|
-
import { z as getInitialState$1, A as reducer$2, B as getDocument$1, c as createDocument, C as getComponentsMeta$1, D as getComponentPropControllerDescriptors$1, E as getPropController, F as getPropControllersHandle, G as getElement, H as getElementPropControllerDescriptors, i as isElementReference, I as isPropControllersHandle, J as reducer$3, K as reducer$5, L as reducer$6,
|
|
25
|
+
import { z as getInitialState$1, A as reducer$2, B as getDocument$1, c as createDocument, C as getComponentsMeta$1, D as getComponentPropControllerDescriptors$1, E as getPropController, F as getPropControllersHandle, G as getElement, H as getElementPropControllerDescriptors, i as isElementReference, I as isPropControllersHandle, J as reducer$3, K as reducer$5, L as reducer$6, N as reducer$7, O as reducer$8 } from "./constants.es.js";
|
|
26
26
|
import { A as ActionTypes, n as unregisterMeasurable, o as registerMeasurable, p as registerBuilderComponent, q as changeElementBoxModels, v as changeDocumentElementSize, w as handleWheel, x as handlePointerMove, y as setIsInBuilder, z as unregisterBuilderComponent, B as unregisterPropControllers, C as registerPropControllers, D as registerPropControllersHandle, E as messageBuilderPropController, F as registerDocumentEffect } from "./actions.es.js";
|
|
27
27
|
import { i as isMeasurable, a as getMeasurables$1, b as getBoxModels$1, m as measure, d as getBoxModel$1, r as reducer$4 } from "./box-models.es.js";
|
|
28
28
|
import { a5 as createPropController } from "./slot.es.js";
|
package/dist/Root.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@ var index = require("./index.cjs2.js");
|
|
|
9
9
|
var css = require("@emotion/css");
|
|
10
10
|
require("use-sync-external-store/shim/with-selector");
|
|
11
11
|
require("next/dynamic");
|
|
12
|
-
require("./
|
|
12
|
+
require("./constants.cjs.js");
|
|
13
13
|
require("redux");
|
|
14
14
|
require("redux-thunk");
|
|
15
15
|
require("./actions.cjs.js");
|
package/dist/Root.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { B as BackgroundsContainer, G as GridItem } from "./index.es2.js";
|
|
|
8
8
|
import { injectGlobal, cache } from "@emotion/css";
|
|
9
9
|
import "use-sync-external-store/shim/with-selector";
|
|
10
10
|
import "next/dynamic";
|
|
11
|
-
import "./
|
|
11
|
+
import "./constants.es.js";
|
|
12
12
|
import "redux";
|
|
13
13
|
import "redux-thunk";
|
|
14
14
|
import "./actions.es.js";
|
package/dist/SocialLinks.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ require("scroll-into-view-if-needed");
|
|
|
41
41
|
require("next/link");
|
|
42
42
|
require("use-sync-external-store/shim/with-selector");
|
|
43
43
|
require("next/dynamic");
|
|
44
|
-
require("./
|
|
44
|
+
require("./constants.cjs.js");
|
|
45
45
|
require("redux");
|
|
46
46
|
require("redux-thunk");
|
|
47
47
|
require("./actions.cjs.js");
|
package/dist/SocialLinks.es.js
CHANGED
|
@@ -40,7 +40,7 @@ import "scroll-into-view-if-needed";
|
|
|
40
40
|
import "next/link";
|
|
41
41
|
import "use-sync-external-store/shim/with-selector";
|
|
42
42
|
import "next/dynamic";
|
|
43
|
-
import "./
|
|
43
|
+
import "./constants.es.js";
|
|
44
44
|
import "redux";
|
|
45
45
|
import "redux-thunk";
|
|
46
46
|
import "./actions.es.js";
|
package/dist/Text.cjs.js
CHANGED
|
@@ -39,7 +39,7 @@ var boxModels = require("./box-models.cjs.js");
|
|
|
39
39
|
var slateReact = require("slate-react");
|
|
40
40
|
var Lists = require("@convertkit/slate-lists");
|
|
41
41
|
var next = require("./index.cjs.js");
|
|
42
|
-
var
|
|
42
|
+
var constants = require("./constants.cjs.js");
|
|
43
43
|
var css = require("@emotion/css");
|
|
44
44
|
var jsxRuntime = require("react/jsx-runtime");
|
|
45
45
|
var index = require("./index.cjs3.js");
|
|
@@ -101,11 +101,11 @@ function useTypographyMark(value) {
|
|
|
101
101
|
var _a, _b, _c;
|
|
102
102
|
const typography = next.useTypography((_a = value == null ? void 0 : value.id) != null ? _a : null);
|
|
103
103
|
const swatchIds = [
|
|
104
|
-
...
|
|
105
|
-
...
|
|
104
|
+
...constants.getTypographyStyleSwatchIds(value == null ? void 0 : value.style),
|
|
105
|
+
...constants.getTypographyStyleSwatchIds(typography == null ? void 0 : typography.style)
|
|
106
106
|
];
|
|
107
107
|
const swatches = next.useSwatches(swatchIds);
|
|
108
|
-
return overrideTypographyStyle((_b = typography == null ? void 0 : typography.style.map(withColor(swatches.filter(
|
|
108
|
+
return overrideTypographyStyle((_b = typography == null ? void 0 : typography.style.map(withColor(swatches.filter(constants.isNonNullable)))) != null ? _b : [], (_c = value == null ? void 0 : value.style.map(withColor(swatches.filter(constants.isNonNullable)))) != null ? _c : []);
|
|
109
109
|
}
|
|
110
110
|
function Mark(_a) {
|
|
111
111
|
var _b = _a, {
|
package/dist/Text.es.js
CHANGED
|
@@ -37,7 +37,7 @@ import { g as getBox } from "./box-models.es.js";
|
|
|
37
37
|
import { Editor } from "slate-react";
|
|
38
38
|
import Lists from "@convertkit/slate-lists";
|
|
39
39
|
import { J as useTypography, K as useSwatches, G as findDeviceOverride, o as useStyle, r as responsiveStyle, L as shallowMergeFallbacks, s as colorToString, u as useIsInBuilder } from "./index.es.js";
|
|
40
|
-
import { w as getTypographyStyleSwatchIds, l as isNonNullable } from "./
|
|
40
|
+
import { w as getTypographyStyleSwatchIds, l as isNonNullable } from "./constants.es.js";
|
|
41
41
|
import { cx } from "@emotion/css";
|
|
42
42
|
import { jsx } from "react/jsx-runtime";
|
|
43
43
|
import { L as Link } from "./index.es3.js";
|
package/dist/Video.cjs.js
CHANGED
|
@@ -27,7 +27,7 @@ var placeholders = require("./placeholders.cjs.js");
|
|
|
27
27
|
var jsxRuntime = require("react/jsx-runtime");
|
|
28
28
|
require("use-sync-external-store/shim/with-selector");
|
|
29
29
|
require("next/dynamic");
|
|
30
|
-
require("./
|
|
30
|
+
require("./constants.cjs.js");
|
|
31
31
|
require("redux");
|
|
32
32
|
require("redux-thunk");
|
|
33
33
|
require("./actions.cjs.js");
|
package/dist/Video.es.js
CHANGED
|
@@ -25,7 +25,7 @@ import { p as placeholders } from "./placeholders.es.js";
|
|
|
25
25
|
import { jsx } from "react/jsx-runtime";
|
|
26
26
|
import "use-sync-external-store/shim/with-selector";
|
|
27
27
|
import "next/dynamic";
|
|
28
|
-
import "./
|
|
28
|
+
import "./constants.es.js";
|
|
29
29
|
import "redux";
|
|
30
30
|
import "redux-thunk";
|
|
31
31
|
import "./actions.es.js";
|
package/dist/components.cjs.js
CHANGED
|
@@ -14,6 +14,7 @@ var Root = require("./Root.cjs.js");
|
|
|
14
14
|
var SocialLinks = require("./SocialLinks.cjs.js");
|
|
15
15
|
var Text = require("./Text.cjs.js");
|
|
16
16
|
var Video = require("./Video.cjs.js");
|
|
17
|
+
var constants = require("./constants.cjs.js");
|
|
17
18
|
var index = require("./index.cjs2.js");
|
|
18
19
|
require("react");
|
|
19
20
|
require("@emotion/css");
|
|
@@ -24,15 +25,14 @@ require("css-box-model");
|
|
|
24
25
|
require("./actions.cjs.js");
|
|
25
26
|
require("use-sync-external-store/shim/with-selector");
|
|
26
27
|
require("next/dynamic");
|
|
27
|
-
require("./react-page.cjs.js");
|
|
28
|
-
require("redux");
|
|
29
|
-
require("redux-thunk");
|
|
30
28
|
require("./slot.cjs.js");
|
|
31
|
-
require("./control.cjs.js");
|
|
32
29
|
require("./text-input.cjs.js");
|
|
33
30
|
require("./combobox.cjs.js");
|
|
31
|
+
require("./control.cjs.js");
|
|
34
32
|
require("use-sync-external-store/shim");
|
|
35
33
|
require("slate");
|
|
34
|
+
require("redux");
|
|
35
|
+
require("redux-thunk");
|
|
36
36
|
require("./types.cjs.js");
|
|
37
37
|
require("color");
|
|
38
38
|
require("scroll-into-view-if-needed");
|
|
@@ -73,7 +73,6 @@ exports.DEFAULT_ITEM_ANIMATE_DELAY = next.DEFAULT_ITEM_ANIMATE_DELAY;
|
|
|
73
73
|
exports.DEFAULT_ITEM_ANIMATE_DURATION = next.DEFAULT_ITEM_ANIMATE_DURATION;
|
|
74
74
|
exports.DEFAULT_ITEM_ANIMATE_TYPE = next.DEFAULT_ITEM_ANIMATE_TYPE;
|
|
75
75
|
exports.DEFAULT_ITEM_STAGGER_DURATION = next.DEFAULT_ITEM_STAGGER_DURATION;
|
|
76
|
-
exports.MakeswiftComponentType = next.MakeswiftComponentType;
|
|
77
76
|
exports.Page = next.Page;
|
|
78
77
|
exports.useBorder = next.useBorder;
|
|
79
78
|
exports.useBoxShadow = next.useBoxShadow;
|
|
@@ -91,5 +90,6 @@ exports.Root = Root["default"];
|
|
|
91
90
|
exports.SocialLinks = SocialLinks["default"];
|
|
92
91
|
exports.Text = Text["default"];
|
|
93
92
|
exports.Video = Video["default"];
|
|
93
|
+
exports.MakeswiftComponentType = constants.MakeswiftComponentType;
|
|
94
94
|
exports.useBackgrounds = index.useBackgrounds;
|
|
95
95
|
//# sourceMappingURL=components.cjs.js.map
|
package/dist/components.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Box } from "./Box.es.js";
|
|
2
|
-
export { d as DEFAULT_BOX_ANIMATE_DELAY, e as DEFAULT_BOX_ANIMATE_DURATION, c as DEFAULT_BOX_ANIMATE_TYPE, g as DEFAULT_ITEM_ANIMATE_DELAY, h as DEFAULT_ITEM_ANIMATE_DURATION, f as DEFAULT_ITEM_ANIMATE_TYPE, i as DEFAULT_ITEM_STAGGER_DURATION,
|
|
2
|
+
export { d as DEFAULT_BOX_ANIMATE_DELAY, e as DEFAULT_BOX_ANIMATE_DURATION, c as DEFAULT_BOX_ANIMATE_TYPE, g as DEFAULT_ITEM_ANIMATE_DELAY, h as DEFAULT_ITEM_ANIMATE_DURATION, f as DEFAULT_ITEM_ANIMATE_TYPE, i as DEFAULT_ITEM_STAGGER_DURATION, n as Page, j as useBorder, k as useBoxShadow, m as useMediaQuery, l as useResponsiveColor } from "./index.es.js";
|
|
3
3
|
export { default as Button } from "./Button.es.js";
|
|
4
4
|
export { default as Carousel } from "./Carousel.es.js";
|
|
5
5
|
export { default as Countdown } from "./Countdown.es.js";
|
|
@@ -12,6 +12,7 @@ export { default as Root } from "./Root.es.js";
|
|
|
12
12
|
export { default as SocialLinks } from "./SocialLinks.es.js";
|
|
13
13
|
export { default as Text } from "./Text.es.js";
|
|
14
14
|
export { default as Video } from "./Video.es.js";
|
|
15
|
+
export { M as MakeswiftComponentType } from "./constants.es.js";
|
|
15
16
|
export { u as useBackgrounds } from "./index.es2.js";
|
|
16
17
|
import "react";
|
|
17
18
|
import "@emotion/css";
|
|
@@ -22,15 +23,14 @@ import "css-box-model";
|
|
|
22
23
|
import "./actions.es.js";
|
|
23
24
|
import "use-sync-external-store/shim/with-selector";
|
|
24
25
|
import "next/dynamic";
|
|
25
|
-
import "./react-page.es.js";
|
|
26
|
-
import "redux";
|
|
27
|
-
import "redux-thunk";
|
|
28
26
|
import "./slot.es.js";
|
|
29
|
-
import "./control.es.js";
|
|
30
27
|
import "./text-input.es.js";
|
|
31
28
|
import "./combobox.es.js";
|
|
29
|
+
import "./control.es.js";
|
|
32
30
|
import "use-sync-external-store/shim";
|
|
33
31
|
import "slate";
|
|
32
|
+
import "redux";
|
|
33
|
+
import "redux-thunk";
|
|
34
34
|
import "./types.es.js";
|
|
35
35
|
import "color";
|
|
36
36
|
import "scroll-into-view-if-needed";
|
|
@@ -620,6 +620,22 @@ function configureStore({
|
|
|
620
620
|
} = {}) {
|
|
621
621
|
return redux.createStore(reducer, __spreadProps(__spreadValues({}, preloadedState), { documents: getInitialState$5({ rootElements }) }), redux.applyMiddleware(thunk__default["default"]));
|
|
622
622
|
}
|
|
623
|
+
const MakeswiftComponentType = {
|
|
624
|
+
Box: "./components/Box/index.js",
|
|
625
|
+
Button: "./components/Button/index.js",
|
|
626
|
+
Carousel: "./components/Carousel/index.js",
|
|
627
|
+
Countdown: "./components/Countdown/index.js",
|
|
628
|
+
Divider: "./components/Divider/index.js",
|
|
629
|
+
Embed: "./components/Embed/index.js",
|
|
630
|
+
Form: "./components/Form/index.js",
|
|
631
|
+
Image: "./components/Image/index.js",
|
|
632
|
+
Navigation: "./components/Navigation/index.js",
|
|
633
|
+
Root: "./components/Root/index.js",
|
|
634
|
+
SocialLinks: "./components/SocialLinks/index.js",
|
|
635
|
+
Text: "./components/Text/index.js",
|
|
636
|
+
Video: "./components/Video/index.js"
|
|
637
|
+
};
|
|
638
|
+
exports.MakeswiftComponentType = MakeswiftComponentType;
|
|
623
639
|
exports.configureStore = configureStore;
|
|
624
640
|
exports.copyElementTree = copyElementTree;
|
|
625
641
|
exports.createDocument = createDocument;
|
|
@@ -660,4 +676,4 @@ exports.reducer$2 = reducer$4;
|
|
|
660
676
|
exports.reducer$3 = reducer$3;
|
|
661
677
|
exports.reducer$4 = reducer$2;
|
|
662
678
|
exports.reducer$5 = reducer$1;
|
|
663
|
-
//# sourceMappingURL=
|
|
679
|
+
//# sourceMappingURL=constants.cjs.js.map
|